Browse Source

添加权限

DESKTOP-SVI9JE1\muzen 1 năm trước cách đây
mục cha
commit
843b25fbbd
2 tập tin đã thay đổi với 11 bổ sung10 xóa
  1. 4 3
      src/views/content/video/index.vue
  2. 7 7
      src/views/device/class/index.vue

+ 4 - 3
src/views/content/video/index.vue

@@ -9,7 +9,8 @@
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()">新增</el-button>
+        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()"
+          v-hasPermi="['content:video:add']">新增</el-button>
       </el-form-item>
     </el-form>
     <!-- 列表 -->
@@ -21,10 +22,10 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
-          <el-button type="text" @click="getDetail(scope.row.id)">编辑</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['content:video:edit']">编辑</el-button>
           <el-button type="text" v-clipboard:copy="getUrl(scope.row)" v-clipboard:success="copySuccess">复制链接</el-button>
           <el-button type="text" @click="getCode">下载二维码</el-button>
-          <el-button type="delete" @click="getDelete(scope.row)">删除</el-button>
+          <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['content:video:delete']">删除</el-button>
           <vue-qr :text="getUrl(scope.row)" ref="qrcode" style="display: none;" />
         </template>
       </el-table-column>

+ 7 - 7
src/views/device/class/index.vue

@@ -23,9 +23,9 @@
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()">新增</el-button>
-        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 2, '批量上架')">批量上架</el-button>
-        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 2, '批量下架')">批量下架</el-button>
+        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()" v-hasPermi="['device:class:add']">新增</el-button>
+        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 2, '批量上架')" v-hasPermi="['device:class:up']">批量上架</el-button>
+        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 2, '批量下架')" v-hasPermi="['device:class:down']">批量下架</el-button>
       </el-form-item>
     </el-form>
     <!-- 列表 -->
@@ -46,11 +46,11 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
-          <el-button v-if="scope.row.status === 1" type="text" @click="getChange(scope.row.id, 2, '下架')">下架</el-button>
+          <el-button v-if="scope.row.status === 1" type="text" @click="getChange(scope.row.id, 2, '下架')" v-hasPermi="['device:class:down']">下架</el-button>
           <span v-else style="margin-left: 10px;">
-            <el-button type="text" @click="getDetail(scope.row.id)">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row.id, 1, '上架')">上架</el-button>
-            <el-button type="delete" @click="getDelete(scope.row)">删除</el-button>
+            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['device:class:edit']">编辑</el-button>
+            <el-button type="text" @click="getChange(scope.row.id, 1, '上架')" v-hasPermi="['device:class:up']">上架</el-button>
+            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['device:class:delete']">删除</el-button>
           </span>
         </template>
       </el-table-column>