|
|
@@ -4,6 +4,7 @@
|
|
|
ref="crudRef"
|
|
|
:data="data"
|
|
|
:column="column"
|
|
|
+ :addBtn = "hasPermission('iot:product:add')"
|
|
|
v-model:page="state.page"
|
|
|
v-model:query="state.query"
|
|
|
:total="state.total"
|
|
|
@@ -11,7 +12,8 @@
|
|
|
:tableProps=" {
|
|
|
selection: true,
|
|
|
viewBtn: true,
|
|
|
- delBtn: true,
|
|
|
+ editBtn: hasPermission('iot:product:edit'),
|
|
|
+ delBtn: hasPermission('iot:product:remove'),
|
|
|
customTable: layoutType === 'card',
|
|
|
menuSlot: true,
|
|
|
menuWidth: 300,
|
|
|
@@ -64,13 +66,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="btn-group">
|
|
|
- <el-button class="cu-btn" type="primary" icon="EditPen" plain @click="crudRef.handleUpdate(item)">编辑</el-button>
|
|
|
+ <el-button class="cu-btn" type="primary" icon="EditPen" plain @click="crudRef.handleUpdate(item)" v-show = "hasPermission('iot:product:edit')">编辑</el-button>
|
|
|
<el-button class="cu-btn" type="warning" icon="View" plain @click="crudRef.handleView(item)">详情</el-button>
|
|
|
<el-button class="cu-btn" type="success" icon="ScaleToOriginal" plain @click="openObjectModel(item)">物模型</el-button>
|
|
|
- <el-divider direction="vertical" />
|
|
|
- <el-popconfirm title="是否确认删除?" @confirm="handleDel(item)">
|
|
|
+ <el-divider direction="vertical" v-show = "hasPermission('iot:product:remove')"/>
|
|
|
+ <el-popconfirm title="是否确认删除?" @confirm="handleDel(item)" >
|
|
|
<template #reference>
|
|
|
- <el-button type="danger" icon="Delete" plain />
|
|
|
+ <el-button type="danger" icon="Delete" plain v-show = "hasPermission('iot:product:remove')"/>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
</div>
|
|
|
@@ -106,6 +108,7 @@ import YtCrud from '@/components/common/yt-crud.vue'
|
|
|
import { getProductsList, saveProducts, IProductsVO, deleteProduct } from '../api/products.api'
|
|
|
import { getCategoriesAll } from '../api/categories.api'
|
|
|
import { ElDivider } from 'element-plus'
|
|
|
+import { hasPermission } from '@/utils/auth'
|
|
|
|
|
|
const crudRef = ref()
|
|
|
const nodeTypeOptions = [
|