Commit a418d964 by lixiaomin

修改机器权限

parent 2cd42034
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
</template> </template>
<script> <script>
import {getComponentBindList,getComBindMachineList} from "@/api/component/component"; import {getComponentBindList,getComBindMachineList} from "@/api/component/component";
import {checkPermi} from "@/utils/permission.js";
export default { export default {
data() { data() {
return { return {
...@@ -88,6 +89,11 @@ export default { ...@@ -88,6 +89,11 @@ export default {
}, },
//弹出绑定机器页 //弹出绑定机器页
handleComBindDialog(row){ handleComBindDialog(row){
let b=checkPermi(['machine:component:view']);
if(!b){
this.$message.error('暂无查看绑定机器数操作的权限!');
return;
}
this.bindDiaLog=true; this.bindDiaLog=true;
this.getComBindMachineList(row.component_name); this.getComBindMachineList(row.component_name);
}, },
......
...@@ -75,6 +75,7 @@ import MachineDetailsCom from './machineDetailsCom.vue'; ...@@ -75,6 +75,7 @@ import MachineDetailsCom from './machineDetailsCom.vue';
import MachineDetailsOther from './machineDetailsOther.vue'; import MachineDetailsOther from './machineDetailsOther.vue';
import MachineDetailsAttribute from './machineDetailsAttribute.vue'; import MachineDetailsAttribute from './machineDetailsAttribute.vue';
import {getModelList} from "@/api/model/model"; import {getModelList} from "@/api/model/model";
import {checkPermi} from "@/utils/permission.js";
export default { export default {
components: { MachineDetailsLog,MachineDetailsCom,MachineDetailsOther,MachineDetailsAttribute}, components: { MachineDetailsLog,MachineDetailsCom,MachineDetailsOther,MachineDetailsAttribute},
data() { data() {
...@@ -134,18 +135,38 @@ export default { ...@@ -134,18 +135,38 @@ export default {
}, },
//日志 //日志
handleLogDialog(row){ handleLogDialog(row){
let b=checkPermi(['machine:machineDetails:log']);
if(!b){
this.$message.error('暂无日志操作的权限!');
return;
}
this.$refs.machineDetailsLog.handleLogDialog(row); this.$refs.machineDetailsLog.handleLogDialog(row);
}, },
//组件 //组件
handleComponentDialog(row){ handleComponentDialog(row){
let b=checkPermi(['machine:machineDetails:component']);
if(!b){
this.$message.error('暂无管理组件操作的权限!');
return;
}
this.$refs.machineDetailsCom.handleComDiaLog(row); this.$refs.machineDetailsCom.handleComDiaLog(row);
}, },
//属性监控 //属性监控
handleAttributeDialog(row){ handleAttributeDialog(row){
let b=checkPermi(['machine:machineDetails:attribute']);
if(!b){
this.$message.error('暂无组件属性监控操作的权限!');
return;
}
this.$refs.machineDetailsAttribute.handleAttributeDialog(row); this.$refs.machineDetailsAttribute.handleAttributeDialog(row);
}, },
//其他设置 //其他设置
handleOtherDialog(row){ handleOtherDialog(row){
let b=checkPermi(['machine:machineDetails:other']);
if(!b){
this.$message.error('暂无其他设置操作的权限!');
return;
}
this.$refs.machineDetailsOther.handleOthDiaLog(row); this.$refs.machineDetailsOther.handleOthDiaLog(row);
}, },
//店铺绑定 //店铺绑定
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<script> <script>
import {getComponentList,addMaterial} from "@/api/machine/machineDetails"; import {getComponentList,addMaterial} from "@/api/machine/machineDetails";
import {listMaterial} from "@/api/system/material"; import {listMaterial} from "@/api/system/material";
import {checkPermi} from "@/utils/permission.js";
export default { export default {
data() { data() {
return { return {
...@@ -80,6 +81,11 @@ export default { ...@@ -80,6 +81,11 @@ export default {
}, },
//弹出添加原料页面 //弹出添加原料页面
handleMaterialDialog(row){ handleMaterialDialog(row){
let b=checkPermi(['machine:machineDetails:material']);
if(!b){
this.$message.error('暂无添加原料操作的权限!');
return;
}
this.materialId=row.material_id; this.materialId=row.material_id;
this.ros_code=row.ros_code; this.ros_code=row.ros_code;
this.component_name=row.component_name; this.component_name=row.component_name;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<script> <script>
import {getModelList} from "@/api/model/model"; import {getModelList} from "@/api/model/model";
import ModelCom from './modelCom.vue'; import ModelCom from './modelCom.vue';
import {checkPermi} from "@/utils/permission.js";
export default { export default {
components: {ModelCom }, components: {ModelCom },
data() { data() {
...@@ -65,6 +66,11 @@ export default { ...@@ -65,6 +66,11 @@ export default {
}, },
//组件 //组件
handleComponentDialog(row){ handleComponentDialog(row){
let b=checkPermi(['machine:model:component']);
if(!b){
this.$message.error('暂无管理组件操作的权限!');
return;
}
this.$refs.modelCom.handleModelComDialog(row.id); this.$refs.modelCom.handleModelComDialog(row.id);
}, },
......
<template> <template>
<div> <div>
<el-dialog title="机型设置" :visible.sync="comDiaLog" width="1100px" append-to-body > <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-tabs v-model="activeName" >
<el-tab-pane label="机型组件" name="first" > <el-tab-pane label="机型组件" name="first" >
<el-table v-loading="loading" :data="modelComponentList"> <el-table v-loading="loading" :data="modelComponentList">
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
<el-table-column label="组件状态" align="center" prop="state_desc"/> <el-table-column label="组件状态" align="center" prop="state_desc"/>
<el-table-column label="原料" align="center"> <el-table-column label="原料" align="center">
<template slot-scope="scope"> <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="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> </template>
</el-table-column> </el-table-column>
</el-table> </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