csg6 1 year ago
parent
commit
d923237010

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

@@ -33,12 +33,16 @@
33
     <el-main>
33
     <el-main>
34
       <div class="headerTop">
34
       <div class="headerTop">
35
         <div>
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
             新增</el-button
39
             新增</el-button
38
           >
40
           >
39
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
41
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
40
           <!-- <el-button type="primary" class="el-icon-download"> 导出</el-button> -->
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
         </div>
46
         </div>
43
         <div>
47
         <div>
44
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
48
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
@@ -76,12 +80,18 @@
76
           </template>
80
           </template>
77
         </el-table-column>
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
           <template slot-scope="scope">
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
             </el-button>
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
             </el-button>
96
             </el-button>
87
           </template>
97
           </template>

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

@@ -67,7 +67,9 @@
67
     <el-main>
67
     <el-main>
68
       <div class="headerTop">
68
       <div class="headerTop">
69
         <div>
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
             新增</el-button
73
             新增</el-button
72
           >
74
           >
73
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
75
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
@@ -76,6 +78,7 @@
76
           type="primary"
78
           type="primary"
77
             class="el-icon-delete"
79
             class="el-icon-delete"
78
             @click="doBatchDelete"
80
             @click="doBatchDelete"
81
+            v-hasPermi="['doubledefense:measure:remove']"
79
           >
82
           >
80
             删除</el-button
83
             删除</el-button
81
           >
84
           >
@@ -151,12 +154,18 @@
151
           </template>
154
           </template>
152
         </el-table-column>
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
           <template slot-scope="scope">
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
             </el-button>
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
             </el-button>
170
             </el-button>
162
           </template>
171
           </template>

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

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

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

@@ -40,12 +40,22 @@
40
     <el-main>
40
     <el-main>
41
       <div class="headerTop">
41
       <div class="headerTop">
42
         <div>
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
             新增</el-button
49
             新增</el-button
45
           >
50
           >
46
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
51
           <!-- <el-button type="primary" class="el-icon-upload2"> 导入</el-button> -->
47
           <!-- <el-button type="primary" class="el-icon-download"> 导出</el-button> -->
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
         </div>
59
         </div>
50
         <div>
60
         <div>
51
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
61
           <right-toolbar  @queryTable="initList" :search="true" @update:showSearch="isSearch = !isSearch"></right-toolbar>
@@ -88,12 +98,18 @@
88
           </template>
98
           </template>
89
         </el-table-column>
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
           <template slot-scope="scope">
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
             </el-button>
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
             </el-button>
114
             </el-button>
99
           </template>
115
           </template>