Browse Source

增加通过人员角色 控制TPM维修工单确认按钮权限

java8
赵宏斌 5 months ago
parent
commit
e07feafd03
  1. 2
      src/api/eam/eam.js
  2. 18
      src/views/modules/eam/eamWorkOrderForDefect.vue
  3. 20
      src/views/modules/eam/eamWorkOrderForDefect2.vue

2
src/api/eam/eam.js

@ -206,6 +206,8 @@ export const eamDefectRecordSearch= data => createAPI(`/pms/eam/eamDefectRecordS
// 获取用户角色列表 // 获取用户角色列表
export const getUserRoleList= data => createAPI(`/pms/eam/getUserRoleList`,'post',data) export const getUserRoleList= data => createAPI(`/pms/eam/getUserRoleList`,'post',data)
// 获取确认权限人员列表
export const getConfirmButtonOperator= data => createAPI(`/pms/eam/getConfirmButtonOperator`,'post',data)
// 获取故障图片 // 获取故障图片
export const getFeedBackImages= data => createAPI(`/pms/eam/getFeedBackImages`,'post',data) export const getFeedBackImages= data => createAPI(`/pms/eam/getFeedBackImages`,'post',data)
// 获取领用出库信息 // 获取领用出库信息

18
src/views/modules/eam/eamWorkOrderForDefect.vue

@ -168,7 +168,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <a type="text" size="small" v-if="scope.row.status === '待审核'" @click="checkModal(scope.row)">审核</a>--> <!-- <a type="text" size="small" v-if="scope.row.status === '待审核'" @click="checkModal(scope.row)">审核</a>-->
<el-link style="cursor: pointer" v-if="(scope.row.status === '待审核' || scope.row.status === '已完工') && !authDetail" @click="reportModal(scope.row)">详情</el-link> <el-link style="cursor: pointer" v-if="(scope.row.status === '待审核' || scope.row.status === '已完工') && !authDetail" @click="reportModal(scope.row)">详情</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '待确认' && !authDetail" @click="confirmResult(scope.row)">确认</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '待确认' && !authDetail && confirmButtonFlag" @click="confirmResult(scope.row)">确认</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '未开工' && !authCancel" @click="cancelOrder(scope.row)">取消工单</el-link> <el-link style="cursor: pointer" v-if="scope.row.status === '未开工' && !authCancel" @click="cancelOrder(scope.row)">取消工单</el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -734,6 +734,7 @@ import {
getFeedBackImages, // getFeedBackImages, //
queryHistoryRecord, // queryHistoryRecord, //
getSparPartImages, // getSparPartImages, //
getConfirmButtonOperator, //
} from "@/api/eam/eam.js" } from "@/api/eam/eam.js"
import { import {
downLoadObjectFile, downLoadObjectFile,
@ -1451,6 +1452,8 @@ export default {
authSearch: false, authSearch: false,
authChange: false, authChange: false,
authDetail: false, authDetail: false,
confirmButtonOperatorList: [],
confirmButtonFlag: false,
authCancel: false, authCancel: false,
authCheck: false, authCheck: false,
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
@ -1779,6 +1782,7 @@ export default {
// , // ,
this.getUserDept() this.getUserDept()
} }
this.getConfirmButtonOperator()
}, },
methods: { methods: {
@ -1808,6 +1812,18 @@ export default {
} }
}) })
}, },
getConfirmButtonOperator(){
getConfirmButtonOperator().then(({data}) => {
if (data.code === 0) {
this.confirmButtonOperatorList = data.rows
let usernameList = []
this.confirmButtonOperatorList.forEach(val => {
usernameList.push(val.adminID)
})
this.confirmButtonFlag = usernameList.includes(this.$store.state.user.name)
}
})
},
// //
controlRowStyle({row, rowIndex}) { controlRowStyle({row, rowIndex}) {

20
src/views/modules/eam/eamWorkOrderForDefect2.vue

@ -168,7 +168,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <a type="text" size="small" v-if="scope.row.status === '待审核'" @click="checkModal(scope.row)">审核</a>--> <!-- <a type="text" size="small" v-if="scope.row.status === '待审核'" @click="checkModal(scope.row)">审核</a>-->
<el-link style="cursor: pointer" v-if="(scope.row.status === '待审核' || scope.row.status === '已完工') && !authDetail" @click="reportModal(scope.row)">详情</el-link> <el-link style="cursor: pointer" v-if="(scope.row.status === '待审核' || scope.row.status === '已完工') && !authDetail" @click="reportModal(scope.row)">详情</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '待确认' && !authDetail" @click="confirmResult(scope.row)">确认</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '待确认' && !authDetail && confirmButtonFlag" @click="confirmResult(scope.row)">确认</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === '未开工' && !authCancel" @click="cancelOrder(scope.row)">取消工单</el-link> <el-link style="cursor: pointer" v-if="scope.row.status === '未开工' && !authCancel" @click="cancelOrder(scope.row)">取消工单</el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -275,7 +275,7 @@
<el-input-number :controls="false" :step="0" :min="0" :disabled="detailData.status === '已完工'" v-model="detailData.responseTime" style="width: 80px"></el-input-number> <el-input-number :controls="false" :step="0" :min="0" :disabled="detailData.status === '已完工'" v-model="detailData.responseTime" style="width: 80px"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label=" " style="margin-left: 30px"> <el-form-item label=" " style="margin-left: 30px">
<el-checkbox v-model="detailData.uploadMalfunctionPicturesFlag" @input="checkboxInput"
<el-checkbox v-model="detailData.uploadMalfunctionPicturesFlag"
:class="detailData.uploadMalfunctionPicturesFlag==='Y'?'ifcheckboxColor':''" disabled :true-label="'Y'" :false-label="'N'"> :class="detailData.uploadMalfunctionPicturesFlag==='Y'?'ifcheckboxColor':''" disabled :true-label="'Y'" :false-label="'N'">
是否上传故障图片</el-checkbox> 是否上传故障图片</el-checkbox>
</el-form-item> </el-form-item>
@ -735,6 +735,7 @@ import {
getFeedBackImages, // getFeedBackImages, //
queryHistoryRecord, // queryHistoryRecord, //
getSparPartImages, // getSparPartImages, //
getConfirmButtonOperator, //
} from "@/api/eam/eam.js" } from "@/api/eam/eam.js"
import { import {
downLoadObjectFile, downLoadObjectFile,
@ -780,6 +781,8 @@ export default {
exportHeader: ["维修工单"], exportHeader: ["维修工单"],
exportFooter: [], exportFooter: [],
exportList: [], exportList: [],
confirmButtonOperatorList: [],
confirmButtonFlag: false,
// end // end
tagNo: '', tagNo: '',
coreComponentData: { coreComponentData: {
@ -1780,6 +1783,7 @@ export default {
// , // ,
this.getUserDept() this.getUserDept()
} }
this.getConfirmButtonOperator()
}, },
methods: { methods: {
@ -1809,6 +1813,18 @@ export default {
} }
}) })
}, },
getConfirmButtonOperator(){
getConfirmButtonOperator().then(({data}) => {
if (data.code === 0) {
this.confirmButtonOperatorList = data.rows
let usernameList = []
this.confirmButtonOperatorList.forEach(val => {
usernameList.push(val.adminID)
})
this.confirmButtonFlag = usernameList.includes(this.$store.state.user.name)
}
})
},
// //
controlRowStyle({row, rowIndex}) { controlRowStyle({row, rowIndex}) {

Loading…
Cancel
Save