dedsudiyu 1 year ago
parent
commit
07a81ca907

+ 1 - 0
src/directive/permission/hasPermiRouter.js

@@ -1,6 +1,7 @@
 /**
  * v-hasPermiRouter 操作权限处理
  * Copyright (c) 2023 ded
+ * 注意:此方法会通过路由名称进行过滤,所以不可以出现重复的路由名称
  */
 
 import store from '@/store'

+ 2 - 1
src/views/iotDevice/hardwareManagement/hardwareClassification/index.vue

@@ -36,7 +36,8 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="名称" prop="hardwareTypeName"  show-overflow-tooltip/>
           <el-table-column label="标识" prop="hardwareTypeKey" width="200" show-overflow-tooltip/>
-          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip
+                           v-hasPermiRouter="['iot:hardwareType:edit']">
             <template slot-scope="scope">
               <el-switch
                 @click.native="tableButton(5,scope.row)"

+ 2 - 1
src/views/iotDevice/hardwareManagement/hardwareEquipment/index.vue

@@ -99,7 +99,8 @@
               <span v-if="!scope.row.operatingState">未运行</span>
             </template>
           </el-table-column>
-          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip
+                           v-hasPermiRouter="['iot:hardware:edit']">
             <template slot-scope="scope">
               <el-switch
                 @click.native="tableButton(5,scope.row)"

+ 0 - 2
src/views/iotDevice/intelligenceIot/classConfig/addPage.vue

@@ -27,12 +27,10 @@
         <p class="page-submit-common-style-button"
            style="float: right;"
            @click="dialogOpen"
-           v-hasPermiRouter="['demo:demo:add']"
         >新增</p>
         <p class="page-out-common-style-button"
            style="float: right;margin-right:20px;"
            @click="backPage"
-           v-hasPermiRouter="['demo:demo:add']"
         >返回</p>
       </el-form>
     </div>

+ 0 - 1
src/views/iotDevice/monitoringWarning/warningMode/index.vue

@@ -31,7 +31,6 @@
           <p class="page-add-common-style-button"
              style="float: right;"
              @click="cardClick"
-             v-hasPermiRouter="['demo:demo:add']"
           >{{cardType?'切换列表':'切换卡片'}}</p>
           <p class="page-submit-common-style-button"
              style="float: right;margin-right:20px;"