按钮权限设置

main
weitingdong 11 months ago
parent 1548e5e071
commit 2b1465e6e3
  1. 13
      src/views/inspection/inspectionobject.vue
  2. 10
      src/views/inspection/inspectionobjectDetail.vue
  3. 8
      src/views/leger/equipmentledger.vue
  4. 12
      src/views/leger/equipmentledgerDetail.vue
  5. 10
      src/views/leger/toolinventoryrecord.vue
  6. 22
      src/views/leger/toolinventoryrecordDetail.vue
  7. 12
      src/views/smart/workpermit.vue
  8. 12
      src/views/smart/workpermitDetail.vue

@ -24,36 +24,39 @@
size="small"
icon="el-icon-delete"
plain
v-if="permission.inspectionroute_delete"
v-if="permission.inspectionobject_delete"
@click="handleDelete">批量删除
</el-button>
</template>
<template slot="menuRight">
<el-button type="primary"
size="small"
v-if="permission.inspectionroute_add"
v-if="permission.inspectionobject_add"
plain
@click="handleDetailAdd">新增
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.inspectionobject_effect"
@click="handleTakeEffect">生效
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.inspectionobject_lapse"
@click="handleLapse">失效
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.inspectionobject_export"
@click="handleExport">导出
</el-button>
</template>
<template #menu="{row,index,size}">
<el-button v-if="permission.inspectionroute_view" @click="handleDetailSearch(row,index)" type="text">查看</el-button>
<el-button v-if="permission.inspectionroute_delete" @click="rowDel(row)" type="text">删除</el-button>
<el-button v-if="permission.inspectionobject_view" @click="handleDetailSearch(row,index)" type="text">查看</el-button>
<el-button v-if="permission.inspectionobject_delete" @click="rowDel(row)" type="text">删除</el-button>
</template>
</avue-crud>
<el-dialog title="失效"
@ -232,7 +235,7 @@
...mapGetters(["permission"]),
permissionList() {
// this.option.column = this.option.column.filter(v => {
// return this.permission['inspectionroute_col_' + v.prop]
// return this.permission['inspectionobject_col_' + v.prop]
// })
return {
addBtn: false,

@ -9,14 +9,14 @@
<div class="container">
<span >
<el-button type="primary"
size="large"
size="small"
@click="handleFormSubmit"
v-if="addUpdateShowButton">
v-if="addUpdateShowButton && permission.inspectionobject_add">
确定</el-button>
<el-button type="primary"
size="small"
@click="seachToUpdate"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.inspectionobject_edit">
修改</el-button>
</span>
</div>
@ -30,7 +30,7 @@ import {getToken} from "@/util/auth";
import request from "@/router/axios";
export default {
name: "inspectionrouteDetail",
name: "inspectionobjectDetail",
data() {
return {
addUpdateShowButton:{},
@ -233,7 +233,7 @@ export default {
...mapGetters(["permission"]),
permissionList() {
// this.option.column = this.option.column.filter(v => {
// return this.permission['inspectionroute_col_' + v.prop]
// return this.permission['inspectionobject_col_' + v.prop]
// })
return {
addBtn: false,

@ -32,27 +32,31 @@
<el-button type="primary"
size="small"
plain
v-if="permission.equipmentledger_add"
@click="handleDetailAdd">新增
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.equipmentledger_audit"
@click="handleAuditing">批量审核
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.equipmentledger_reject"
@click="handleReject">批量驳回
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.equipmentledger_export"
@click="handleExport()">导出
</el-button>
</template>
<template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看详情</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button>
<el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.equipmentledger_view">查看详情</el-button>
<el-button @click="rowDel(row)" type="text" v-if="permission.equipmentledger_delete">删除</el-button>
</template>
</avue-crud>
</basic-container>

@ -75,32 +75,32 @@
<el-button type="primary"
size="large"
@click="handleFormSubmit"
v-if="addUpdateShowButton">
v-if="addUpdateShowButton && permission.equipmentledger_add">
确定</el-button>
<el-button type="text"
size="large"
@click="back"
v-if="addUpdateShowButton">
v-if="addUpdateShowButton ">
取消</el-button>
<el-button type="primary"
size="small"
@click="auditing"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.equipmentledger_audit">
审核</el-button>
<el-button type="primary"
size="small"
@click="reject"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.equipmentledger_reject">
驳回</el-button>
<el-button type="primary"
size="small"
@click="seachToUpdate"
v-if="UpdateShowButton">
v-if="UpdateShowButton && permission.equipmentledger_edit">
修改</el-button>
<el-button type="primary"
size="small"
@click="del"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.equipmentledger_delete">
删除</el-button>
</span>
</div>

@ -31,27 +31,31 @@
<el-button type="primary"
size="small"
plain
v-if="permission.toolinventoryrecord_add"
@click="handleDetailAdd">新增
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.toolinventoryrecord_audit"
@click="handleAuditing">批量审核
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.toolinventoryrecord_reject"
@click="handleReject">批量驳回
</el-button>
<el-button type="primary"
size="small"
plain
@click="handleExport">导出
v-if="permission.toolinventoryrecord_export"
@click="handleExport()">导出
</el-button>
</template>
<template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button>
<el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.toolinventoryrecord_view">查看详情</el-button>
<el-button @click="rowDel(row)" type="text" v-if="permission.toolinventoryrecord_delete">删除</el-button>
</template>
</avue-crud>
</basic-container>

@ -100,35 +100,35 @@
</span>
<div class="container">
<span >
<el-button type="text"
size="large"
@click="back"
v-if="addUpdateShowButton">
取消</el-button>
<el-button type="primary"
size="large"
@click="handleFormSubmit"
v-if="addUpdateShowButton">
v-if="addUpdateShowButton && permission.toolinventoryrecord_add">
确定</el-button>
<el-button type="text"
size="large"
@click="back"
v-if="addUpdateShowButton ">
取消</el-button>
<el-button type="primary"
size="small"
@click="auditing"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.toolinventoryrecord_audit">
审核</el-button>
<el-button type="primary"
size="small"
@click="reject"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.toolinventoryrecord_reject">
驳回</el-button>
<el-button type="primary"
size="small"
@click="seachToUpdate"
v-if="UpdateShowButton">
v-if="UpdateShowButton && permission.toolinventoryrecord_edit">
修改</el-button>
<el-button type="primary"
size="small"
@click="del"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.toolinventoryrecord_delete">
删除</el-button>
</span>
</div>
@ -173,7 +173,7 @@ import {readonly} from "vue";
import {getToken} from "@/util/auth";
import {getListByTaskNo} from "@/api/inspection/inspectionresult";
export default {
name: "equipmentledgerDetail",
name: "toolinventoryrecordDetail",
data () {
return {
checkStatusValue:{},

@ -23,7 +23,7 @@
size="small"
icon="el-icon-delete"
plain
v-if="permission.equipmentledger_delete"
v-if="permission.workpermit_delete"
@click="handleDelete">批量删除
</el-button>
</template>
@ -31,28 +31,32 @@
<el-button type="primary"
size="small"
plain
v-if="permission.workpermit_add"
@click="handleDetailAdd">新增
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.workpermit_audit"
@click="handleAuditing">批量审核
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.workpermit_reject"
@click="handleReject">批量驳回
</el-button>
<el-button type="primary"
size="small"
plain
v-if="permission.workpermit_export"
@click="handleExport()">导出
</el-button>
</template>
<template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看详情</el-button>
<el-button @click="handleCloseTicket(row)" type="text">关票</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button>
<el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.workpermit_view">查看详情</el-button>
<el-button @click="handleCloseTicket(row)" type="text" v-if="permission.workpermit_close">关票</el-button>
<el-button @click="rowDel(row)" type="text" v-if="permission.workpermit_delete">删除</el-button>
</template>
</avue-crud>
<el-dialog title="关票提醒"

@ -48,7 +48,7 @@
<el-button type="primary"
size="large"
@click="handleFormSubmit"
v-if="addUpdateShowButton">
v-if="addUpdateShowButton && permission.workpermit_add">
确定</el-button>
<el-button type="text"
size="large"
@ -58,27 +58,27 @@
<el-button type="primary"
size="small"
@click="closeTicket"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.workpermit_close">
关票</el-button>
<el-button type="primary"
size="small"
@click="auditing"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.workpermit_audit">
审核</el-button>
<el-button type="primary"
size="small"
@click="reject"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.workpermit_reject">
驳回</el-button>
<el-button type="primary"
size="small"
@click="seachToUpdate"
v-if="UpdateShowButton">
v-if="UpdateShowButton && permission.workpermit_edit">
修改</el-button>
<el-button type="primary"
size="small"
@click="del"
v-if="shouldShowButton">
v-if="shouldShowButton && permission.workorder_delete">
删除</el-button>
</span>
</div>

Loading…
Cancel
Save