|
@@ -140,11 +140,15 @@
|
|
|
</div>
|
|
|
<div class="form-max-box">
|
|
|
<el-form-item label="使用身份配置" prop="userType">
|
|
|
- <el-radio-group v-model="form.userType">
|
|
|
- <el-radio style="margin:4px 28px 0 20px;" label="-1">全部</el-radio>
|
|
|
- <el-radio style="margin:4px 30px 0 0;" label="11">教职工</el-radio>
|
|
|
- <el-radio label="22">学生</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ <el-checkbox-group v-model="form.userType">
|
|
|
+ <el-checkbox style="margin:4px 87px 0 20px;" label="11">教职工</el-checkbox>
|
|
|
+ <el-checkbox label="22">学生</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ <!--<el-radio-group v-model="form.userType">-->
|
|
|
+ <!--<el-radio style="margin:4px 28px 0 20px;" label="-1">全部</el-radio>-->
|
|
|
+ <!--<el-radio style="margin:4px 30px 0 0;" label="11">教职工</el-radio>-->
|
|
|
+ <!--<el-radio label="22">学生</el-radio>-->
|
|
|
+ <!--</el-radio-group>-->
|
|
|
<!--<el-select v-model="form.userType" placeholder="请配置使用身份" style="width:200px;">-->
|
|
|
<!--<el-option label="全部" value="-1" />-->
|
|
|
<!--<el-option label="教职工" value="11" />-->
|
|
@@ -153,29 +157,37 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="form-max-box">
|
|
|
- <el-form-item label="智能锁配置" prop="userType">
|
|
|
- <el-radio-group v-model="form.smartLock">
|
|
|
- <el-radio style="margin:4px 40px 0 20px;" :label="1">有</el-radio>
|
|
|
- <el-radio :label="0">无</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- <!--<el-select v-model="form.smartLock" placeholder="请配置智能锁" style="width:200px;">-->
|
|
|
- <!--<el-option label="有" :value="1" />-->
|
|
|
- <!--<el-option label="无" :value="0" />-->
|
|
|
- <!--</el-select>-->
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div class="form-max-box">
|
|
|
- <el-form-item label="气瓶标签配置" prop="userType">
|
|
|
- <el-radio-group v-model="form.airBottle">
|
|
|
- <el-radio style="margin:4px 40px 0 20px;" :label="1">有</el-radio>
|
|
|
- <el-radio :label="0">无</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- <!--<el-select v-model="form.airBottle" placeholder="请配置气瓶标签" style="width:200px;">-->
|
|
|
- <!--<el-option label="有" :value="1" />-->
|
|
|
- <!--<el-option label="无" :value="0" />-->
|
|
|
- <!--</el-select>-->
|
|
|
+ <el-form-item label="扩展配置" prop="expandType">
|
|
|
+ <el-checkbox-group v-model="form.expandType">
|
|
|
+ <el-checkbox style="margin:4px 30px 0 20px;" label="11">化学品柜智能锁</el-checkbox>
|
|
|
+ <el-checkbox label="22">气瓶标签</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
+ <!--<div class="form-max-box">-->
|
|
|
+ <!--<el-form-item label="智能锁配置" prop="smartLock">-->
|
|
|
+ <!--<el-radio-group v-model="form.smartLock">-->
|
|
|
+ <!--<el-radio style="margin:4px 40px 0 20px;" :label="1">有</el-radio>-->
|
|
|
+ <!--<el-radio :label="0">无</el-radio>-->
|
|
|
+ <!--</el-radio-group>-->
|
|
|
+ <!--<!–<el-select v-model="form.smartLock" placeholder="请配置智能锁" style="width:200px;">–>-->
|
|
|
+ <!--<!–<el-option label="有" :value="1" />–>-->
|
|
|
+ <!--<!–<el-option label="无" :value="0" />–>-->
|
|
|
+ <!--<!–</el-select>–>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="form-max-box">-->
|
|
|
+ <!--<el-form-item label="气瓶标签配置" prop="airBottle">-->
|
|
|
+ <!--<el-radio-group v-model="form.airBottle">-->
|
|
|
+ <!--<el-radio style="margin:4px 40px 0 20px;" :label="1">有</el-radio>-->
|
|
|
+ <!--<el-radio :label="0">无</el-radio>-->
|
|
|
+ <!--</el-radio-group>-->
|
|
|
+ <!--<!–<el-select v-model="form.airBottle" placeholder="请配置气瓶标签" style="width:200px;">–>-->
|
|
|
+ <!--<!–<el-option label="有" :value="1" />–>-->
|
|
|
+ <!--<!–<el-option label="无" :value="0" />–>-->
|
|
|
+ <!--<!–</el-select>–>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+ <!--</div>-->
|
|
|
</el-form>
|
|
|
<p class="inquire-button-one" style="margin:60px auto 60px;display: block" @click="submitForm">保存</p>
|
|
|
<!--查看图片-->
|
|
@@ -199,7 +211,10 @@
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
},
|
|
|
- form:{},
|
|
|
+ form:{
|
|
|
+ userType:[],
|
|
|
+ expandType:[]
|
|
|
+ },
|
|
|
rules: {
|
|
|
schoolName: [
|
|
|
{ required: true, message: "学校名称不能为空", trigger: "blur" },
|
|
@@ -234,6 +249,9 @@
|
|
|
],
|
|
|
airBottle: [
|
|
|
{ required: true, message: "请配置气瓶标签", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ expandType: [
|
|
|
+ { required: true, message: "请配置扩展配置", trigger: "blur" }
|
|
|
]
|
|
|
},
|
|
|
imgUrl:"",
|
|
@@ -249,6 +267,7 @@
|
|
|
methods: {
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|
|
|
+ let self = this;
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
let obj = {
|
|
@@ -260,9 +279,26 @@
|
|
|
operationGuide:this.form.operationGuide,
|
|
|
loginBanner:this.form.loginBanner,
|
|
|
homepageBanner:this.form.homepageBanner,
|
|
|
- userType:this.form.userType,
|
|
|
- smartLock:this.form.smartLock,
|
|
|
- airBottle:this.form.airBottle,
|
|
|
+ smartLock:0,
|
|
|
+ airBottle:0,
|
|
|
+ }
|
|
|
+ //判断使用身份配置
|
|
|
+ if(self.form.userType[1]){
|
|
|
+ obj.userType = '-1';
|
|
|
+ }else{
|
|
|
+ if(self.form.userType[0] == '11'){
|
|
|
+ obj.userType = '11';
|
|
|
+ }else if(self.form.userType[0] == '22'){
|
|
|
+ obj.userType = '22';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //判断扩展配置(智能锁配置/气瓶标签配置)
|
|
|
+ for(let i=0;i<self.form.expandType.length;i++){
|
|
|
+ if(self.form.expandType[i] == '11'){
|
|
|
+ obj.smartLock = 1;
|
|
|
+ }else if(self.form.expandType[i] == '22'){
|
|
|
+ obj.airBottle = 1;
|
|
|
+ }
|
|
|
}
|
|
|
updateLogoInfo(obj).then(response => {
|
|
|
this.msgSuccess(response.msg);
|
|
@@ -279,12 +315,32 @@
|
|
|
//获取数据
|
|
|
getLogoInfo(){
|
|
|
getLogoInfo().then(response => {
|
|
|
- this.$set(this,'form',response.data)
|
|
|
store.dispatch('settings/setSmartAlarmType', response.data.smartLock)
|
|
|
localStorage.setItem('setSmartAlarmType',response.data.smartLock)
|
|
|
localStorage.setItem('circularLogo',response.data.circularLogo)
|
|
|
localStorage.setItem('rectangleLogo',response.data.rectangleLogo)
|
|
|
localStorage.setItem('videoCover',response.data.videoCover)
|
|
|
+ //判断使用身份配置
|
|
|
+ let listOne = [];
|
|
|
+ if(response.data.userType == -1){
|
|
|
+ listOne.push('11')
|
|
|
+ listOne.push('22')
|
|
|
+ }else if(response.data.userType == 11){
|
|
|
+ listOne.push('11')
|
|
|
+ }else if(response.data.userType == 22){
|
|
|
+ listOne.push('22')
|
|
|
+ }
|
|
|
+ this.$set(response.data,'userType',listOne);
|
|
|
+ //判断扩展配置
|
|
|
+ let listTwo = [];
|
|
|
+ if(response.data.smartLock == 1){
|
|
|
+ listTwo.push('11')
|
|
|
+ }
|
|
|
+ if(response.data.airBottle == 1){
|
|
|
+ listTwo.push('22')
|
|
|
+ }
|
|
|
+ this.$set(response.data,'expandType',listTwo);
|
|
|
+ this.$set(this,'form',response.data)
|
|
|
});
|
|
|
},
|
|
|
//上传
|