ソースを参照

Merge remote-tracking branch 'origin/master'

吴树波 6 日 前
コミット
848c6426ca
1 ファイル変更35 行追加4 行削除
  1. 35 4
      src/views/company/companyConfig/index.vue

+ 35 - 4
src/views/company/companyConfig/index.vue

@@ -147,6 +147,23 @@
             </div>
           </el-form>
         </el-tab-pane>
+        <el-tab-pane label="配置销售端隐藏总账号" name="adminIsShowForm">
+          <el-form ref="adminIsShowForm" label-width="140px">
+            <el-form-item label="账号是否显示">
+              <el-row>
+                <el-switch v-model="adminIsShow"></el-switch>
+                <span style="margin-left: 10px;">
+                  <el-tag :type="adminIsShow ? 'success' : 'info'" size="mini">
+                    {{ adminIsShow ? '当前显示' : '当前隐藏' }}
+                  </el-tag>
+                </span>
+              </el-row>
+            </el-form-item>
+            <div style="float:right;margin-right:20px">
+              <el-button type="primary" @click="onSubmit7">提交</el-button>
+            </div>
+          </el-form>
+        </el-tab-pane>
       </el-tabs>
 
       <el-dialog :title="customerExt.title" :visible.sync="customerExt.open" width="500px" append-to-body>
@@ -198,6 +215,7 @@ export default {
   },
   data() {
     return {
+      adminIsShow: false,
       company:null,
       statusOptions:[],
       customerExt:{
@@ -238,6 +256,7 @@ export default {
       qwConfigForm:{},
       qwkfConfigForm:{},
       companyUserConfig: {},
+      adminIsShowForm:{},
       userIsDefaultBlack: null,
     };
   },
@@ -248,6 +267,7 @@ export default {
     this.getConfigKey("sys:qw:config");
     this.getConfigKey("customer:config");
     this.getConfigKey("sys:AiKf:config");
+    this.getConfigKey("company:admin:show");
     this.getDicts("sys_company_status").then((response) => {
       this.statusOptions = response.data;
     });
@@ -379,13 +399,16 @@ export default {
                 this.AiKfConfig=JSON.parse(response.data.configValue);
               }
             }else if (key=="companyUser:config"){
-              console.log(response.data)
               this.companyUserConfig=response.data;
               if(response.data.configValue != null){
                 this.userIsDefaultBlack = JSON.parse(response.data.configValue);
               }
+            }else if(key == "company:admin:show"){
+              this.adminIsShowForm = response.data;
+              if(response.data.configValue != null){
+                this.adminIsShow = JSON.parse(response.data.configValue);
+              }
             }
-
         });
     },
     onSubmit1() {
@@ -435,8 +458,6 @@ export default {
     },
     onSubmit6() {
       this.companyUserConfig.configValue=JSON.stringify(this.userIsDefaultBlack);
-      console.log(this.companyUserConfig)
-      console.log(this.userIsDefaultBlack)
       configUserCheck({userIsDefaultBlack: this.userIsDefaultBlack}).then(response => {
         if (response.code === 200) {
           this.msgSuccess("修改成功");
@@ -444,6 +465,16 @@ export default {
         }
       });
     },
+    onSubmit7() {
+      // 实现提交逻辑
+      this.adminIsShowForm.configValue=JSON.stringify(this.adminIsShow);
+      updateConfig(this.adminIsShowForm).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("修改成功");
+          this.getConfigKey("company:admin:show");
+        }
+      })
+    },
   }
 };
 </script>