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 getConfirmButtonOperator= data => createAPI(`/pms/eam/getConfirmButtonOperator`,'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">
<!-- <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 === '待确认' && !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>
</template>
</el-table-column>
@ -734,6 +734,7 @@ import {
getFeedBackImages, //
queryHistoryRecord, //
getSparPartImages, //
getConfirmButtonOperator, //
} from "@/api/eam/eam.js"
import {
downLoadObjectFile,
@ -1451,6 +1452,8 @@ export default {
authSearch: false,
authChange: false,
authDetail: false,
confirmButtonOperatorList: [],
confirmButtonFlag: false,
authCancel: false,
authCheck: false,
menuId: this.$route.meta.menuId,
@ -1779,6 +1782,7 @@ export default {
// ,
this.getUserDept()
}
this.getConfirmButtonOperator()
},
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}) {

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

@ -168,7 +168,7 @@
<template slot-scope="scope">
<!-- <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 === '待确认' && !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>
</template>
</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-form-item>
<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'">
是否上传故障图片</el-checkbox>
</el-form-item>
@ -735,6 +735,7 @@ import {
getFeedBackImages, //
queryHistoryRecord, //
getSparPartImages, //
getConfirmButtonOperator, //
} from "@/api/eam/eam.js"
import {
downLoadObjectFile,
@ -780,6 +781,8 @@ export default {
exportHeader: ["维修工单"],
exportFooter: [],
exportList: [],
confirmButtonOperatorList: [],
confirmButtonFlag: false,
// end
tagNo: '',
coreComponentData: {
@ -1780,6 +1783,7 @@ export default {
// ,
this.getUserDept()
}
this.getConfirmButtonOperator()
},
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}) {

Loading…
Cancel
Save