Sfoglia il codice sorgente

管理员列表操作优化

gzb
guozhongbo 7 mesi fa
parent
commit
0665ee70a0
1 ha cambiato i file con 24 aggiunte e 13 eliminazioni
  1. 24
    13
      src/views/regionSection/regionManage/adminManage.vue

+ 24
- 13
src/views/regionSection/regionManage/adminManage.vue Vedi File

@@ -48,22 +48,33 @@
48 48
           }}
49 49
         </template>
50 50
         <template slot-scope="{ row }" slot="enabledSlot">
51
-          <i-switch
52
-            size="large"
53
-            v-model="row.enabled"
54
-            :true-value="1"
55
-            :false-value="2"
56
-            @on-change="enabledChange(row)"
57
-          >
58
-            <span slot="open">启用</span>
59
-            <span slot="close">禁用</span>
60
-          </i-switch>
51
+          <div v-if="row.adminid === userInfo.adminid">
52
+            {{ row.enabled === 1 ? "启用" : "禁用" }}
53
+          </div>
54
+          <div v-else>
55
+            <i-switch
56
+              size="large"
57
+              v-model="row.enabled"
58
+              :true-value="1"
59
+              :false-value="2"
60
+              @on-change="enabledChange(row)"
61
+            >
62
+              <span slot="open">启用</span>
63
+              <span slot="close">禁用</span>
64
+            </i-switch>
65
+          </div>
61 66
         </template>
62 67
         <template slot-scope="{ row }" slot="actionSlot">
63 68
           <div class="action_list">
64 69
             <div @click="toView(row)">查看</div>
65 70
             <div @click="toEdit(row)">编辑</div>
66
-            <div class="action_del" @click="toDel(row)">删除</div>
71
+            <div
72
+              v-if="row.adminid != userInfo.adminid"
73
+              class="action_del"
74
+              @click="toDel(row)"
75
+            >
76
+              删除
77
+            </div>
67 78
           </div>
68 79
         </template>
69 80
       </Table>
@@ -571,7 +582,7 @@ export default {
571 582
     },
572 583
     // 新建
573 584
     toAdd() {
574
-      if(this.adminInfo.timer){
585
+      if (this.adminInfo.timer) {
575 586
         clearInterval(this.adminInfo.timer);
576 587
       }
577 588
       this.adminInfo = {
@@ -741,7 +752,7 @@ export default {
741 752
       }).then((res) => {
742 753
         this.showLoading = false;
743 754
         if (res.code === 0) {
744
-          if(this.adminInfo.timer){
755
+          if (this.adminInfo.timer) {
745 756
             clearInterval(this.adminInfo.timer);
746 757
           }
747 758
           this.adminInfo = {

Loading…
Annulla
Salva