zhaoSecond

This commit is contained in:
redamancy-qian
2022-04-14 23:38:46 +08:00
parent 217f2d2773
commit 1a5df34c4f
18 changed files with 463 additions and 108 deletions

View File

@@ -52,7 +52,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="small" type="primary" style="padding:5px;" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:category:edit']">修改</el-button>
<el-button size="small" type="danger" style="padding:5px;" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:category:remove']">删除</el-button>
<el-button size="small" type="danger" style="padding:5px;" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:category:remove']" :disabled="scope.row.isSys == '1' ? (canEdit ? false : true) : false">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -73,7 +73,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :disabled="form.isSys == '1' ? (canEdit ? false : true) : false"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@@ -96,6 +96,8 @@ export default {
dicts: ["iot_yes_no"],
data() {
return {
// 判断是否获取到修改权限
canEdit:false,
// 遮罩层
loading: true,
// 选中数组
@@ -151,8 +153,14 @@ export default {
},
created() {
this.getList();
this.init();
},
methods: {
init(){
if (this.$store.state.user.roles =="admin"){
this.canEdit = true
}
},
/** 查询产品分类列表 */
getList() {
this.loading = true;