csg6 hace 1 año
padre
commit
d923237010

+ 15 - 5
src/views/risk/analyse.vue

@@ -33,12 +33,16 @@
33 33
     <el-main>
34 34
       <div class="headerTop">
35 35
         <div>
36
-          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)">
36
+          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)"
37
+          v-hasPermi="['doubledefense:unit:add']"
38
+          >
37 39
             新增</el-button
38 40
           >
39 41
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
40 42
           <!-- <el-button type="primary" class="el-icon-download"> 导出</el-button> -->
41
-          <el-button type="primary" class="el-icon-delete" @click="doBatchDelete"> 删除</el-button>
43
+          <el-button type="primary" class="el-icon-delete" @click="doBatchDelete"
44
+            v-hasPermi="['doubledefense:unit:remove']"
45
+          > 删除</el-button>
42 46
         </div>
43 47
         <div>
44 48
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
@@ -76,12 +80,18 @@
76 80
           </template>
77 81
         </el-table-column>
78 82
 
79
-        <el-table-column label="操作" fixed="right" align="center" width="120">
83
+        <el-table-column label="操作" fixed="right" align="center" width="120"
84
+            v-if="$auth.hasPermi('doubledefense:unit:edita') || $auth.hasPermi('doubledefense:unit:remove')"
85
+        >
80 86
           <template slot-scope="scope">
81
-            <el-button type="text" size="mini" @click="doAdd(2, scope.row)">
87
+            <el-button type="text" size="mini" @click="doAdd(2, scope.row)"
88
+                v-hasPermi="['doubledefense:unit:edita']"
89
+            >
82 90
               编辑
83 91
             </el-button>
84
-            <el-button type="text" size="mini" @click="doDelete(scope.row)">
92
+            <el-button type="text" size="mini" @click="doDelete(scope.row)"
93
+                v-hasPermi="['doubledefense:unit:remove']"
94
+            >
85 95
               删除
86 96
             </el-button>
87 97
           </template>

+ 13 - 4
src/views/risk/controlMeasure.vue

@@ -67,7 +67,9 @@
67 67
     <el-main>
68 68
       <div class="headerTop">
69 69
         <div>
70
-          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)">
70
+          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)"
71
+            v-hasPermi="['doubledefense:measure:add']"
72
+          >
71 73
             新增</el-button
72 74
           >
73 75
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
@@ -76,6 +78,7 @@
76 78
           type="primary"
77 79
             class="el-icon-delete"
78 80
             @click="doBatchDelete"
81
+            v-hasPermi="['doubledefense:measure:remove']"
79 82
           >
80 83
             删除</el-button
81 84
           >
@@ -151,12 +154,18 @@
151 154
           </template>
152 155
         </el-table-column>
153 156
 
154
-        <el-table-column label="操作" fixed="right" align="center" width="120">
157
+        <el-table-column label="操作" fixed="right" align="center" width="120"
158
+          v-if="$auth.hasPermi('doubledefense:measure:edit') || $auth.hasPermi('doubledefense:measure:remove')"
159
+        >
155 160
           <template slot-scope="scope">
156
-            <el-button type="text" size="mini" @click="doAdd(2, scope.row)">
161
+            <el-button type="text" size="mini" @click="doAdd(2, scope.row)"
162
+              v-hasPermi="['doubledefense:measure:edit']"
163
+            >
157 164
               编辑
158 165
             </el-button>
159
-            <el-button type="text" size="mini" @click="doDelete(scope.row)">
166
+            <el-button type="text" size="mini" @click="doDelete(scope.row)"
167
+              v-hasPermi="['doubledefense:measure:remove']"
168
+            >
160 169
               删除
161 170
             </el-button>
162 171
           </template>

+ 17 - 3
src/views/risk/controlObject.vue

@@ -47,7 +47,9 @@
47 47
     <el-main>
48 48
       <div class="headerTop">
49 49
         <div>
50
-          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)">
50
+          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)"
51
+          v-hasPermi="['doubledefense:hazard:add']"
52
+          >
51 53
             新增</el-button
52 54
           >
53 55
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
@@ -56,6 +58,7 @@
56 58
           type="primary"
57 59
             class="el-icon-delete"
58 60
             @click="doBatchDelete"
61
+            v-hasPermi="['doubledefense:hazard:remove']"
59 62
           >
60 63
             删除</el-button
61 64
           >
@@ -130,22 +133,33 @@
130 133
             }}</span>
131 134
           </template>
132 135
         </el-table-column>
136
+
133 137
         <el-table-column
134 138
           label="操作"
135 139
           fixed="right"
136 140
           align="center"
137 141
           show-overflow-tooltip
138 142
           width="120"
143
+          v-if="$auth.hasPermi('doubledefense:hazard:edit', 'doubledefense:hazard:remove')"
144
+          
139 145
         >
146
+
140 147
           <template #default="{ row }">
141
-            <el-button type="text" size="mini" @click="doAdd(2, row)">
148
+            <el-button 
149
+              type="text" size="mini" @click="doAdd(2, row)"
150
+              v-hasPermi="['doubledefense:hazard:edit']"
151
+            >
142 152
               编辑
143 153
             </el-button>
144
-            <el-button type="text" size="mini" @click="doDelete(row)">
154
+            <el-button type="text" size="mini" @click="doDelete(row)"
155
+            v-hasPermi="['doubledefense:hazard:remove']"
156
+            >
145 157
               删除
146 158
             </el-button>
147 159
           </template>
160
+
148 161
         </el-table-column>
162
+
149 163
       </el-table>
150 164
       <pagination
151 165
         v-show="total > 0"

+ 21 - 5
src/views/risk/riskEvent.vue

@@ -40,12 +40,22 @@
40 40
     <el-main>
41 41
       <div class="headerTop">
42 42
         <div>
43
-          <el-button type="primary" class="el-icon-plus" @click="doAdd(1)">
43
+          <el-button 
44
+            type="primary" 
45
+            class="el-icon-plus" 
46
+            @click="doAdd(1)"
47
+            v-hasPermi="['doubledefense:event:add']"
48
+          >
44 49
             新增</el-button
45 50
           >
46 51
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
47 52
           <!-- <el-button type="primary" class="el-icon-download"> 导出</el-button> -->
48
-          <el-button type="primary" class="el-icon-delete" @click="doBatchDelete"> 删除</el-button>
53
+          <el-button 
54
+            type="primary" 
55
+            class="el-icon-delete" 
56
+            @click="doBatchDelete"
57
+            v-hasPermi="['doubledefense:event:remove']"
58
+          > 删除</el-button>
49 59
         </div>
50 60
         <div>
51 61
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
@@ -88,12 +98,18 @@
88 98
           </template>
89 99
         </el-table-column>
90 100
 
91
-        <el-table-column label="操作" fixed="right" align="center" width="120">
101
+        <el-table-column label="操作" fixed="right" align="center" width="120"
102
+          v-if="$auth.hasPermi('doubledefense:event:edit') || $auth.hasPermi('doubledefense:event:remove')"
103
+        >
92 104
           <template slot-scope="scope">
93
-            <el-button type="text" size="mini" @click="doAdd(2, scope.row)">
105
+            <el-button type="text" size="mini" @click="doAdd(2, scope.row)"
106
+              v-hasPermi="['doubledefense:event:edit']"
107
+            >
94 108
               编辑
95 109
             </el-button>
96
-            <el-button type="text" size="mini" @click="doDelete(scope.row)">
110
+            <el-button type="text" size="mini" @click="doDelete(scope.row)"
111
+              v-hasPermi="['doubledefense:event:remove']"
112
+            >
97 113
               删除
98 114
             </el-button>
99 115
           </template>