瀏覽代碼

调整机构用户

luojun 2 年之前
父節點
當前提交
aa2826640b
共有 2 個文件被更改,包括 46 次插入7 次删除
  1. 24 5
      src/views/system/dept/extend.vue
  2. 22 2
      src/views/system/user/index.vue

+ 24 - 5
src/views/system/dept/extend.vue

@@ -262,8 +262,15 @@
         </el-row>
       </div>
     </div>
-
-    <div v-if="type == 4">
+    <el-switch v-if="type == 4"
+    style="margin-top: 30px"
+          v-model="businessLibrary"
+          active-text
+          inactive-text="是否有业务库"
+          :active-value="1"
+          :inactive-value="0"
+        ></el-switch>
+    <div v-if="type == 4&businessLibrary>0" style="margin-top: 30px">
       <h3 class="title">业务库设置</h3>
       <div class="info-box">
         <el-form inline label-position="left" label-width="100px">
@@ -394,17 +401,26 @@
           </el-table-column>
         </el-table>
       </div>
-
+    </div>
+      <el-switch v-if="type == 4"
+    style="margin-top: 30px"
+          v-model="selfServiceBank"
+          active-text
+          inactive-text="是否有在行自助银行"
+          :active-value="1"
+          :inactive-value="0"
+        ></el-switch>
+        <div v-if="type == 4&selfServiceBank>0" style="margin-top: 30px">
       <h3 class="title">在行自助银行设置</h3>
       <div class="info-box">
-        <el-switch
+        <el-switch v-if="false"
           v-model="selfServiceBank"
           active-text
           inactive-text="是否有在行自助银行"
           :active-value="1"
           :inactive-value="0"
         ></el-switch>
-        <span style="margin-left: 50px">在行式大堂设备</span>
+        <span >在行式大堂设备</span>
         <div style="display: inline-block; width: 200px">
           <el-input-number
             style="margin-left: 10px"
@@ -1009,6 +1025,7 @@ export default {
       ownership: null,
       outsideArea: null,
       askari: 1,
+      businessLibrary:1,
       businessLibraryType: 1,
       dutyMode: 0,
       remoteControl: null,
@@ -1190,6 +1207,7 @@ export default {
           this.askari = data.data.askari;
           this.remoteControl = data.data.remoteControl;
           this.selfServiceBank = data.data.selfServiceBank;
+          this.businessLibrary=data.data.businessLibrary;
           this.lobbyEquipment = data.data.lobbyEquipment;
           this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
           this.extendId = data.data.id;
@@ -1638,6 +1656,7 @@ export default {
         dutyMode: this.dutyMode,
         remoteControl: this.remoteControl ? 1 : 0,
         selfServiceBank: this.selfServiceBank ? 1 : 0,
+        businessLibrary:this.businessLibrary?1:0,
         lobbyEquipment: this.lobbyEquipment,
         wallPenetratingEquipment: this.wallPenetratingEquipment,
         platformBrand: this.platformBrand,

+ 22 - 2
src/views/system/user/index.vue

@@ -320,6 +320,7 @@
           <el-col :span="10">
             <el-form-item label="所属机构" prop="orgId">
               <tree-select
+             
                 v-model="form.orgId"
                 :options="deptOptions"
                 :show-count="true"
@@ -333,6 +334,7 @@
           <el-col :span="10">
             <el-form-item label="用户角色" prop="roleIds">
               <el-select
+              ref="mySelect"
               @visible-change="selectRoles"
                 style="width: 100%"
                 v-model="form.roleIds"
@@ -407,7 +409,7 @@
             <el-form-item label="状态">
               <el-radio-group v-model="form.isLock">
                 <el-radio
-                  v-for="dict in dict.type.sys_normal_disable"
+                  v-for="dict in dict.type.sys_user_is_lock"
                   :key="`${dict.value}`"
                   :label="dict.value"
                   :disabled="form.source == 1"
@@ -486,7 +488,7 @@ import tableList from "@/mixins/tableList";
 
 export default {
   name: "User",
-  dicts: ["sys_normal_disable", "sys_user_sex"],
+  dicts: ["sys_normal_disable", "sys_user_sex","sys_user_is_lock"],
   components: { OrgTree },
   mixins: [tableList],
   data() {
@@ -630,7 +632,25 @@ export default {
     // });
   },
   mounted() {},
+  watch: {
+    'form.orgId': {
+      handler(newValue, oldValue) {
+        if(oldValue!=undefined){
+        // console.log('myValue changed:', newValue, oldValue)
+        // 在这里可以对值的改变做出响应
+        // this.deptOptions=[];
+        this.form.roleIds=null;
+      //   const dropdown = this.$refs.mySelect.$el.querySelector('.el-select-dropdown');
+      // dropdown.style.display = 'none';
+      }
+      },
+      deep: true
+    }},
   methods: {
+    cleanRoles(){
+      this.roleOptions=[];
+
+    },
     selectRoles(){
       selectrolesByOrgId({orgId:this.form.orgId}).then((res)=>{
         // console.log(res);