|
@@ -5,7 +5,7 @@
|
|
<p class="page-top-title-name-p" style="margin-left:20px;">基础配置</p>
|
|
<p class="page-top-title-name-p" style="margin-left:20px;">基础配置</p>
|
|
<p class="page-top-title-add-p" @click="submitButton">提交</p>
|
|
<p class="page-top-title-add-p" @click="submitButton">提交</p>
|
|
</div>
|
|
</div>
|
|
- <div class="page-max-big-box scrollbar-box">
|
|
|
|
|
|
+ <div class="page-max-big-box scrollbar-box" v-if="showType">
|
|
<el-form :model="configForm" ref="configForm"
|
|
<el-form :model="configForm" ref="configForm"
|
|
:inline="true" :rules="configRules" label-width="140px">
|
|
:inline="true" :rules="configRules" label-width="140px">
|
|
<div class="page-top-box">
|
|
<div class="page-top-box">
|
|
@@ -89,7 +89,7 @@
|
|
<p :class="checkType?'check-button':''" @click="checkButton(true)">管控类</p>
|
|
<p :class="checkType?'check-button':''" @click="checkButton(true)">管控类</p>
|
|
<p :class="!checkType?'check-button':''" @click="checkButton(false)">非管控类</p>
|
|
<p :class="!checkType?'check-button':''" @click="checkButton(false)">非管控类</p>
|
|
</div>
|
|
</div>
|
|
- <div v-for="(item,index) in configForm.controllist" :key="index">
|
|
|
|
|
|
+ <div v-for="(item,index) in configForm.controlList" :key="index">
|
|
<div v-if="item.controlType == checkType">
|
|
<div v-if="item.controlType == checkType">
|
|
<el-form-item label="双人认证" prop="verify" class="page-switch" label-width="70px">
|
|
<el-form-item label="双人认证" prop="verify" class="page-switch" label-width="70px">
|
|
<el-switch
|
|
<el-switch
|
|
@@ -173,6 +173,7 @@
|
|
name: 'index',
|
|
name: 'index',
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ showType:false,
|
|
checkType:true,
|
|
checkType:true,
|
|
configForm:{},
|
|
configForm:{},
|
|
configRules:{
|
|
configRules:{
|
|
@@ -197,8 +198,11 @@
|
|
chemicalBasicConfigList(){
|
|
chemicalBasicConfigList(){
|
|
chemicalBasicConfigList({}).then(response => {
|
|
chemicalBasicConfigList({}).then(response => {
|
|
let obj = response.data.basic[0];
|
|
let obj = response.data.basic[0];
|
|
- obj.controllist = response.data.contro;
|
|
|
|
|
|
+ obj.loginType = obj.loginType.split(',');
|
|
|
|
+ obj.verifyType = obj.verifyType.split(',');
|
|
|
|
+ obj.controlList = response.data.contro;
|
|
this.$set(this,'configForm',obj);
|
|
this.$set(this,'configForm',obj);
|
|
|
|
+ this.$set(this,'showType',true);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//切换
|
|
//切换
|
|
@@ -211,7 +215,10 @@
|
|
submitButton(){
|
|
submitButton(){
|
|
this.$refs["configForm"].validate(valid => {
|
|
this.$refs["configForm"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- chemicalBasicConfigAdd(this.configForm).then(response => {
|
|
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.configForm))
|
|
|
|
+ obj.loginType = obj.loginType+'';
|
|
|
|
+ obj.verifyType = obj.verifyType+''
|
|
|
|
+ chemicalBasicConfigAdd(obj).then(response => {
|
|
this.msgSuccess(response.message);
|
|
this.msgSuccess(response.message);
|
|
this.chemicalBasicConfigList();
|
|
this.chemicalBasicConfigList();
|
|
});
|
|
});
|