Commit a418d964 by lixiaomin

修改机器权限

parent 2cd42034
......@@ -35,6 +35,7 @@
</template>
<script>
import {getComponentBindList,getComBindMachineList} from "@/api/component/component";
import {checkPermi} from "@/utils/permission.js";
export default {
data() {
return {
......@@ -88,6 +89,11 @@ export default {
},
//弹出绑定机器页
handleComBindDialog(row){
let b=checkPermi(['machine:component:view']);
if(!b){
this.$message.error('暂无查看绑定机器数操作的权限!');
return;
}
this.bindDiaLog=true;
this.getComBindMachineList(row.component_name);
},
......
......@@ -75,6 +75,7 @@ import MachineDetailsCom from './machineDetailsCom.vue';
import MachineDetailsOther from './machineDetailsOther.vue';
import MachineDetailsAttribute from './machineDetailsAttribute.vue';
import {getModelList} from "@/api/model/model";
import {checkPermi} from "@/utils/permission.js";
export default {
components: { MachineDetailsLog,MachineDetailsCom,MachineDetailsOther,MachineDetailsAttribute},
data() {
......@@ -134,18 +135,38 @@ export default {
},
//日志
handleLogDialog(row){
let b=checkPermi(['machine:machineDetails:log']);
if(!b){
this.$message.error('暂无日志操作的权限!');
return;
}
this.$refs.machineDetailsLog.handleLogDialog(row);
},
//组件
handleComponentDialog(row){
let b=checkPermi(['machine:machineDetails:component']);
if(!b){
this.$message.error('暂无管理组件操作的权限!');
return;
}
this.$refs.machineDetailsCom.handleComDiaLog(row);
},
//属性监控
handleAttributeDialog(row){
let b=checkPermi(['machine:machineDetails:attribute']);
if(!b){
this.$message.error('暂无组件属性监控操作的权限!');
return;
}
this.$refs.machineDetailsAttribute.handleAttributeDialog(row);
},
//其他设置
handleOtherDialog(row){
let b=checkPermi(['machine:machineDetails:other']);
if(!b){
this.$message.error('暂无其他设置操作的权限!');
return;
}
this.$refs.machineDetailsOther.handleOthDiaLog(row);
},
//店铺绑定
......
......@@ -37,6 +37,7 @@
<script>
import {getComponentList,addMaterial} from "@/api/machine/machineDetails";
import {listMaterial} from "@/api/system/material";
import {checkPermi} from "@/utils/permission.js";
export default {
data() {
return {
......@@ -80,6 +81,11 @@ export default {
},
//弹出添加原料页面
handleMaterialDialog(row){
let b=checkPermi(['machine:machineDetails:material']);
if(!b){
this.$message.error('暂无添加原料操作的权限!');
return;
}
this.materialId=row.material_id;
this.ros_code=row.ros_code;
this.component_name=row.component_name;
......
......@@ -21,6 +21,7 @@
<script>
import {getModelList} from "@/api/model/model";
import ModelCom from './modelCom.vue';
import {checkPermi} from "@/utils/permission.js";
export default {
components: {ModelCom },
data() {
......@@ -65,6 +66,11 @@ export default {
},
//组件
handleComponentDialog(row){
let b=checkPermi(['machine:model:component']);
if(!b){
this.$message.error('暂无管理组件操作的权限!');
return;
}
this.$refs.modelCom.handleModelComDialog(row.id);
},
......
<template>
<div>
<el-dialog title="机型设置" :visible.sync="comDiaLog" width="1100px" append-to-body >
<el-button type="primary" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="handleAdd" v-hasPermi="['machine:model:add']">新增</el-button>
<el-tabs v-model="activeName" >
<el-tab-pane label="机型组件" name="first" >
<el-table v-loading="loading" :data="modelComponentList">
......@@ -47,9 +47,9 @@
<el-table-column label="组件状态" align="center" prop="state_desc"/>
<el-table-column label="原料" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleEditDialog(scope.row)" v-show=!scope.row.isShow>编辑组件属性</el-button>
<el-button v-hasPermi="['machine:model:edit']" size="mini" type="text" @click="handleEditDialog(scope.row)" v-show=!scope.row.isShow>编辑组件属性</el-button>
<el-button size="mini" type="text" @click="handleEnter(scope.$index, scope.row)" v-show=scope.row.isShow>确定</el-button>
<el-button size="mini" type="text" @click="handlDelete(scope.row)">删除</el-button>
<el-button v-hasPermi="['machine:model:del']" size="mini" type="text" @click="handlDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment