Browse Source

管理员禁止修改自己状态

gzb
wangzhonglu 7 months ago
parent
commit
b2b87dbf43
1 changed files with 18 additions and 3 deletions
  1. 18
    3
      src/views/platformSection/regionManage/adminManage.vue

+ 18
- 3
src/views/platformSection/regionManage/adminManage.vue View File

41
         <template slot-scope="{ row }" slot="enabledSlot">
41
         <template slot-scope="{ row }" slot="enabledSlot">
42
           <i-switch
42
           <i-switch
43
             size="large"
43
             size="large"
44
+            :disabled="row.adminid === userInfo.adminid"
44
             v-model="row.enabled"
45
             v-model="row.enabled"
45
             :true-value="1"
46
             :true-value="1"
46
             :false-value="2"
47
             :false-value="2"
54
           <div class="action_list">
55
           <div class="action_list">
55
             <div @click="toView(row)">查看</div>
56
             <div @click="toView(row)">查看</div>
56
             <div @click="toEdit(row)">编辑</div>
57
             <div @click="toEdit(row)">编辑</div>
57
-            <div class="action_del" @click="toDel(row)">删除</div>
58
+            <div
59
+              class="action_del"
60
+              v-if="row.adminid !== userInfo.adminid"
61
+              @click="toDel(row)"
62
+            >
63
+              删除
64
+            </div>
58
           </div>
65
           </div>
59
         </template>
66
         </template>
60
       </Table>
67
       </Table>
155
         </FormItem>
162
         </FormItem>
156
         <FormItem label="状态" prop="enabled" style="width: 100%">
163
         <FormItem label="状态" prop="enabled" style="width: 100%">
157
           <RadioGroup v-model="adminInfo.enabled">
164
           <RadioGroup v-model="adminInfo.enabled">
158
-            <Radio :label="1">启用</Radio>
159
-            <Radio :label="2">禁用</Radio>
165
+            <Radio :label="1" :disabled="adminInfo.adminid === userInfo.adminid"
166
+              >启用</Radio
167
+            >
168
+            <Radio :label="2" :disabled="adminInfo.adminid === userInfo.adminid"
169
+              >禁用</Radio
170
+            >
160
           </RadioGroup>
171
           </RadioGroup>
161
         </FormItem>
172
         </FormItem>
162
         <FormItem
173
         <FormItem
279
       }
290
       }
280
     };
291
     };
281
     return {
292
     return {
293
+      userInfo: {},
282
       searchForm: {
294
       searchForm: {
283
         dropList: [],
295
         dropList: [],
284
         aname: "",
296
         aname: "",
442
     };
454
     };
443
   },
455
   },
444
   created() {
456
   created() {
457
+    this.userInfo = JSON.parse(
458
+      localStorage.getItem("xh_control_userInfo")
459
+    ).content;
445
     this.getSearchRegionList();
460
     this.getSearchRegionList();
446
     this.searchList();
461
     this.searchList();
447
   },
462
   },

Loading…
Cancel
Save