瀏覽代碼

设备类型 分类管理 添加按钮权限

DESKTOP-O04BTUJ\muzen 3 年之前
父節點
當前提交
511e9d7089
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. 10 5
      src/views/device/category/index.vue

+ 10 - 5
src/views/device/category/index.vue

@@ -3,7 +3,8 @@
     <!-- 搜索 -->
     <!-- 搜索 -->
     <el-form inline label-width="100px" size="mini" @submit.native.prevent>
     <el-form inline label-width="100px" size="mini" @submit.native.prevent>
       <el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-plus" plain @click="getChange()">新增</el-button>
+        <el-button type="primary" icon="el-icon-plus" plain @click="getChange()"
+          v-hasPermi="['device:category:add']">新增</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
@@ -16,10 +17,14 @@
           <dict-tag :options="dict.type.dev_normal_disable" :value="scope.row.status" />
           <dict-tag :options="dict.type.dev_normal_disable" :value="scope.row.status" />
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column>
+      <el-table-column label="操作" align="center">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button type="text" @click="getChange(scope.row)">编辑</el-button>
-          <el-button type="delete" @click="getDelete(scope.row.id)">删除</el-button>
+          <el-button type="text" @click="getChange(scope.row)" v-hasPermi="['device:category:edit']">
+            编辑
+          </el-button>
+          <el-button type="delete" @click="getDelete(scope.row.id)" v-hasPermi="['device:category:delete']">
+            删除
+          </el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -161,7 +166,7 @@ export default {
             }
             }
           });
           });
         })
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     },
   },
   },
 };
 };