Przeglądaj źródła

设备管理 设备列表 按钮权限

DESKTOP-O04BTUJ\muzen 3 lat temu
rodzic
commit
2faa5d84d6
1 zmienionych plików z 9 dodań i 6 usunięć
  1. 9 6
      src/views/device/list/index.vue

+ 9 - 6
src/views/device/list/index.vue

@@ -43,16 +43,19 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getChange(scope.row.id, '查看')">查看</el-button>
-          <el-button v-if="scope.row.status === 2" type="text" @click="getShelves(1, scope.row.id)" v-hasPermi="['device:list:up']">
+          <el-button type="text" @click="getChange(scope.row.id)" v-hasPermi="['device:list:edit']">
+            编辑
+          </el-button>
+          <el-button v-if="scope.row.status === 2" type="text" @click="getShelves(1, scope.row.id)"
+            v-hasPermi="['device:list:up']">
             上架
           </el-button>
-          <el-button v-else type="text" @click="getShelves(2, scope.row.id)" v-hasPermi="['device:list:down']">
+          <el-button v-else type="text" @click="getShelves(2, scope.row.id)"
+            v-hasPermi="['device:list:down']">
             下架
           </el-button>
-          <el-button type="text" @click="getChange(scope.row.id)" v-hasPermi="['device:list:edit']">
-            编辑
-          </el-button>
-          <el-button v-if="scope.row.status === 2" type="delete" @click="getDelete(scope.row.id)" v-hasPermi="['device:list:delete']">
+          <el-button v-if="scope.row.status === 2" type="delete" @click="getDelete(scope.row.id)"
+            v-hasPermi="['device:list:delete']">
             删除
           </el-button>
         </template>