Browse Source

pqc修改

master
shenzhouyu 3 months ago
parent
commit
0c040133d2
  1. 46
      src/views/modules/qc/PQCResultEntry.vue

46
src/views/modules/qc/PQCResultEntry.vue

@ -1338,7 +1338,7 @@ export default {
fixed: '', fixed: '',
columnWidth: 120, columnWidth: 120,
}, },
{
/*{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301015, functionId: 301015,
serialNumber: '301015Table1BatchRollNo', serialNumber: '301015Table1BatchRollNo',
@ -1373,7 +1373,7 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 150, columnWidth: 150,
},
},*/
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301015, functionId: 301015,
@ -1428,7 +1428,7 @@ export default {
fixed: '', fixed: '',
columnWidth: 130, columnWidth: 130,
}, },
{
/* {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301015, functionId: 301015,
serialNumber: '301015Table1InspectionCycle', serialNumber: '301015Table1InspectionCycle',
@ -1481,7 +1481,7 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 150, columnWidth: 150,
},
}, */
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301015, functionId: 301015,
@ -2776,12 +2776,12 @@ export default {
if (this.roleList.length > 0) { if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName && item.roleName.indexOf('换线点检') > -1) let filterList = this.roleList.filter(item => item.roleName && item.roleName.indexOf('换线点检') > -1)
if (filterList.length > 0) { if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
this.$set(this.operatorData, 'roleId', filterList[0].roleId != null && filterList[0].roleId !== '' ? Number(filterList[0].roleId) : '')
} else { } else {
this.operatorData.roleId = this.roleList[0].roleId
this.$set(this.operatorData, 'roleId', this.roleList[0].roleId != null && this.roleList[0].roleId !== '' ? Number(this.roleList[0].roleId) : '')
} }
} else { } else {
this.operatorData.roleId = ''
this.$set(this.operatorData, 'roleId', '')
} }
}, },
@ -2798,13 +2798,16 @@ export default {
setDefaultCollaborativeRole (callback) { setDefaultCollaborativeRole (callback) {
const apply = () => { const apply = () => {
if (this.roleList.length > 0) {
const roleName = this.isMhmResponsibleBu() ? this.defaultCollaborativeRoleName : '系统管理员'
const match = this.roleList.filter(item => item.roleName === roleName)
const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId
this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '')
if (this.isMhmResponsibleBu()) {
if (this.roleList.length > 0) {
const match = this.roleList.filter(item => item.roleName === this.defaultCollaborativeRoleName)
const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId
this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '')
} else {
this.$set(this.operatorData, 'roleId', '')
}
} else { } else {
this.$set(this.operatorData, 'roleId', '')
this.setDefaultLineInspectionRole()
} }
callback && callback() callback && callback()
} }
@ -2887,17 +2890,18 @@ export default {
this.operatorData.roleId = '' this.operatorData.roleId = ''
openDialog() openDialog()
} else { } else {
const apply = () => {
this.setDefaultLineInspectionRole()
openDialog()
}
if (this.roleList.length > 0) { if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '机修人员')
if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
} else {
this.operatorData.roleId = this.roleList[0].roleId
}
apply()
} else { } else {
this.operatorData.roleId = ''
getUserRoleList().then(({ data }) => {
this.roleList = (data && data.code === 0) ? (data.rows || []) : []
apply()
})
} }
openDialog()
} }
}, },

Loading…
Cancel
Save