瀏覽代碼

Merge branch 'master' of http://git.shengws.com/csx/Pad_New

csx 4 年之前
父節點
當前提交
e5d9d492f5

+ 24 - 4
src/pages/console/managementConsole/staff_role/editStaff/index.vue 查看文件

@@ -50,8 +50,11 @@
50 50
     <div class="staffBox">
51 51
       <van-field v-model="title" label="职位" placeholder="请填写"/>
52 52
     </div>
53
-    <div v-if="adminInfo.status == 1 && !adminInfo.admin.is_super_admin  &&  !adminInfo.is_sub_super_admin" class="stop" @click="onClick(2)">禁用该员工账号</div>
54
-    <div v-if="adminInfo.status != 1 && !adminInfo.admin.is_super_admin  &&  !adminInfo.is_sub_super_admin " class="stop1" @click="onClick(1)">恢复该员工账号</div>
53
+    <div v-if="isShow()" class="stop" @click="onClick(2)">禁用该员工账号</div>
54
+    <!--<div v-if="isShow()" class="stop" @click="onClick(2)">禁用该员工账号</div>-->
55
+
56
+    <div v-if="adminInfo.status == 1  &&  (!adminInfo.is_sub_super_admin || !this.is_sub_super_admin)" class="stop" @click="onClick(2)">禁用该员工账号</div>
57
+    <div v-if="adminInfo.status != 1  &&  (!adminInfo.is_sub_super_admin || !this.is_sub_super_admin)" class="stop1" @click="onClick(1)">恢复该员工账号</div>
55 58
 
56 59
     <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
57 60
       <van-picker show-toolbar :columns="user_type_name" @cancel="onCancel" @confirm="onUserTypeConfirm"/>
@@ -83,6 +86,7 @@
83 86
           admin:{},
84 87
 
85 88
         },
89
+        is_sub_super_admin:false,
86 90
         show1: false,
87 91
         show2: false,
88 92
         type_name:"",
@@ -132,6 +136,12 @@
132 136
       };
133 137
     },
134 138
     methods: {
139
+      isShow(){
140
+
141
+        // if(this.adminInfo.admin_user_id)
142
+
143
+
144
+      },
135 145
       onUserTypeConfirm(value, index){
136 146
         this.type_name = value
137 147
         this.show1 = false
@@ -171,12 +181,20 @@
171 181
 
172 182
       },
173 183
       save() {
184
+
174 185
         if (this.name.trim().length == 0) {
175 186
           this.$toast({
176 187
             message: "姓名不能为空!"
177 188
           });
178 189
           return;
179 190
         }
191
+        if(this.type_name.length == 0){
192
+          this.$toast({
193
+            message: "职称不能为空!"
194
+          });
195
+          return;
196
+        }
197
+
180 198
         if (this.role_ids.length <= 0) {
181 199
           this.$toast({
182 200
             message: "至少选择一种角色"
@@ -210,8 +228,8 @@
210 228
         GetAdminUserInfo(params).then(response => {
211 229
           if (response.data.state === 1) {
212 230
             this.adminInfo = response.data.data.user_info
213
-            console.log(this.adminInfo)
214
-            // this.name = this.adminInfo.
231
+            this.is_sub_super_admin = response.data.data.is_sub_super_admin
232
+
215 233
             this.name = this.adminInfo.user_name
216 234
             this.tel = this.adminInfo.admin.mobile
217 235
             this.title = this.adminInfo.user_title_name
@@ -235,6 +253,7 @@
235 253
               }
236 254
             }
237 255
 
256
+
238 257
             //如果当前用户是超级管理员,而且是在编辑自己的信息的时候,将子管理员角色去除
239 258
             for (let i = 0; i < this.roles.length; i++){
240 259
               if(this.adminInfo.admin.id == this.$store.getters.user.admin.id && this.$store.getters.user.admin.is_super_admin && this.roles[i].is_system == 1 && this.roles[i].name == "子管理员"){
@@ -244,6 +263,7 @@
244 263
             }
245 264
 
246 265
 
266
+
247 267
           } else {
248 268
             this.$toast({
249 269
               message: response.data.msg

+ 1 - 1
src/pages/console/managementConsole/staff_role/staffManagement/index.vue 查看文件

@@ -91,7 +91,7 @@ export default {
91 91
 
92 92
           for(let i = 0; i < response.data.data.admins.length; i++){
93 93
             if(response.data.data.admins[i].status == 1){
94
-              if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示管理员信息
94
+              if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示其他子管理员信息
95 95
                   if(response.data.data.admins[i].user_id != response.data.data.org_creator){
96 96
                     this.admin_user.push(response.data.data.admins[i])
97 97
                   }

+ 1 - 1
src/pages/console/managementConsole/staff_role/userManage/index.vue 查看文件

@@ -94,7 +94,7 @@ export default {
94 94
     //获取没被禁用的用户
95 95
 
96 96
     this.org_creator  = this.$store.getters.user.org.creator
97
-    console.log(this.org_creator)
97
+
98 98
     this.GetAllStaff();
99 99
   }
100 100
 };

+ 0 - 1
src/pages/homeIndex/index.vue 查看文件

@@ -330,7 +330,6 @@ export default {
330 330
     }
331 331
   },
332 332
   created() {
333
-    console.log("1111111")
334 333
     this.GetHomeData();
335 334
     setRem();
336 335
   }