|
|
@@ -585,7 +585,8 @@ export default {
|
|
|
this.ticketStartTimeChange(newVal)
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters('sopSelectPoints', [
|
|
|
@@ -651,6 +652,8 @@ export default {
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
|
},
|
|
|
getTicket() {
|
|
|
+ this.getUser()
|
|
|
+
|
|
|
const ticketId = this.$route.query.ticketId
|
|
|
getJobTicketInfo(ticketId).then((response) => {
|
|
|
console.log(response, '编辑拿到路由参数')
|
|
|
@@ -693,7 +696,7 @@ export default {
|
|
|
EditBool: true
|
|
|
}
|
|
|
this.jobProps = [this.form]
|
|
|
- this.listUserOption = response.data.jobTicketUserList
|
|
|
+ // this.listUserOption = response.data.jobTicketUserList
|
|
|
console.log(this.form, 'form')
|
|
|
})
|
|
|
},
|
|
|
@@ -743,7 +746,7 @@ export default {
|
|
|
DeptChage(val) {
|
|
|
console.log(val, ' 部门下拉')
|
|
|
// 每次选中先清空用户下拉
|
|
|
- this.listUserOption = []
|
|
|
+ // this.listUserOption = []
|
|
|
this.dialogForm.nickName = null
|
|
|
const query = {
|
|
|
pageNum: 1,
|
|
|
@@ -911,17 +914,17 @@ export default {
|
|
|
// })
|
|
|
// },
|
|
|
// 共锁人下拉框删除事件
|
|
|
- handleCoLockerChange(newValues) {
|
|
|
- console.log(newValues, 'ticketUserDTOList-newsValue')
|
|
|
-
|
|
|
- // 根据新值更新 this.form.ticketUserDTOList
|
|
|
- this.form.ticketUserDTOList = this.form.ticketUserDTOList.filter((user) =>
|
|
|
- newValues.includes(user.userName)
|
|
|
- )
|
|
|
-
|
|
|
- // 更新 coLocker 显示的内容
|
|
|
- this.updateCoLocker()
|
|
|
- },
|
|
|
+ // handleCoLockerChange(newValues) {
|
|
|
+ // console.log(newValues, 'ticketUserDTOList-newsValue')
|
|
|
+ //
|
|
|
+ // // 根据新值更新 this.form.ticketUserDTOList
|
|
|
+ // this.form.ticketUserDTOList = this.form.ticketUserDTOList.filter((user) =>
|
|
|
+ // newValues.includes(user.userName)
|
|
|
+ // )
|
|
|
+ //
|
|
|
+ // // 更新 coLocker 显示的内容
|
|
|
+ // this.updateCoLocker()
|
|
|
+ // },
|
|
|
handleClick(tab, event) {
|
|
|
// console.log(tab, event);
|
|
|
},
|
|
|
@@ -982,8 +985,18 @@ export default {
|
|
|
const workshopId = await this.getWorkshopId(query1)
|
|
|
|
|
|
// 合并 newticketUserDTOList 到 this.form.ticketUserDTOList
|
|
|
- this.form.ticketUserDTOList.push(...this.newticketUserDTOList)
|
|
|
-
|
|
|
+ if (this.form.locker) {
|
|
|
+ const selectedUser = this.listUserOption.find(option => option.label === this.form.locker);
|
|
|
+ if (selectedUser) {
|
|
|
+ this.form.ticketUserDTOList.push({
|
|
|
+ userName: selectedUser.label,
|
|
|
+ userId: selectedUser.value,
|
|
|
+ userType: '0',
|
|
|
+ userRole: '0'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.form.ticketUserDTOList.push(...this.newticketUserDTOList);
|
|
|
const data = {
|
|
|
pointIds: this.form.pointIds,
|
|
|
sopId: this.form.sopId,
|