|
|
@ -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,14 +2798,17 @@ export default { |
|
|
|
|
|
|
|
|
setDefaultCollaborativeRole (callback) { |
|
|
setDefaultCollaborativeRole (callback) { |
|
|
const apply = () => { |
|
|
const apply = () => { |
|
|
|
|
|
if (this.isMhmResponsibleBu()) { |
|
|
if (this.roleList.length > 0) { |
|
|
if (this.roleList.length > 0) { |
|
|
const roleName = this.isMhmResponsibleBu() ? this.defaultCollaborativeRoleName : '系统管理员' |
|
|
|
|
|
const match = this.roleList.filter(item => item.roleName === roleName) |
|
|
|
|
|
|
|
|
const match = this.roleList.filter(item => item.roleName === this.defaultCollaborativeRoleName) |
|
|
const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId |
|
|
const roleId = match.length > 0 ? match[0].roleId : this.roleList[0].roleId |
|
|
this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '') |
|
|
this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '') |
|
|
} else { |
|
|
} else { |
|
|
this.$set(this.operatorData, 'roleId', '') |
|
|
this.$set(this.operatorData, 'roleId', '') |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setDefaultLineInspectionRole() |
|
|
|
|
|
} |
|
|
callback && callback() |
|
|
callback && callback() |
|
|
} |
|
|
} |
|
|
if (this.roleList.length > 0) { |
|
|
if (this.roleList.length > 0) { |
|
|
@ -2887,17 +2890,18 @@ export default { |
|
|
this.operatorData.roleId = '' |
|
|
this.operatorData.roleId = '' |
|
|
openDialog() |
|
|
openDialog() |
|
|
} else { |
|
|
} else { |
|
|
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 |
|
|
|
|
|
|
|
|
const apply = () => { |
|
|
|
|
|
this.setDefaultLineInspectionRole() |
|
|
|
|
|
openDialog() |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.roleList.length > 0) { |
|
|
|
|
|
apply() |
|
|
} else { |
|
|
} else { |
|
|
this.operatorData.roleId = '' |
|
|
|
|
|
|
|
|
getUserRoleList().then(({ data }) => { |
|
|
|
|
|
this.roleList = (data && data.code === 0) ? (data.rows || []) : [] |
|
|
|
|
|
apply() |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
openDialog() |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|