gks 1 жил өмнө
parent
commit
629d8fa6d2

+ 12 - 5
src/views/GATHERWARNING/index.vue

@@ -157,33 +157,37 @@
         </template>
       </el-table-column> -->
       <el-table-column
+        width="160" 
         fixed="right"
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
+        prop="status"
       >
         <!-- 状态是“已解除”时不显示 -->
 
-        <template slot-scope="scope" v-if="scope.row.status != '1'">
+        <template slot-scope="scope" v-if="scope.row.status !=1">
           <el-button
             size="mini"
             type="text"
+            
+            v-if="checkPermi(['gather:GATHERWARNING:deal'])"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:GATHERWARNING:edit']"
             >处理</el-button
-          >
+            >
           <el-popconfirm
             title="确定取消吗?"
             @confirm="handleCancel(scope.row)"
           >
             <el-button
+              v-if="checkPermi(['gather:GATHERWARNING:cancel'])"
               style="margin-left: 5px"
               size="mini"
               type="text"
               slot="reference"
-              v-hasPermi="['business:GATHERWARNING:remove']"
               >取消</el-button
-            >
+              >
+              <!-- v-hasPermi="['business:GATHERWARNING:remove']" -->
           </el-popconfirm>
         </template>
         <!--        <template slot-scope="scope" v-if="scope.row.status != '1'">-->
@@ -269,6 +273,8 @@
 </template>
 
 <script>
+import { checkPermi } from "@/utils/permission"; // 权限判断函数
+
 import {
   listGATHERWARNING,
   getGATHERWARNING,
@@ -444,6 +450,7 @@ export default {
     this.getList();
   },
   methods: {
+    checkPermi,
     /** 查询数据采集预警列表 */
     getList() {
       this.loading = true;