|
|
@@ -400,6 +400,8 @@
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
+ // 预加载用户列表(来自 taskMixin/index.js 的 this.userList)
|
|
|
+ this.getUser()
|
|
|
this.getWorkflow()
|
|
|
},
|
|
|
|
|
|
@@ -531,24 +533,25 @@
|
|
|
}
|
|
|
|
|
|
// 防御性编程,确保project.projectMembers存在且为字符串
|
|
|
- if (
|
|
|
- !this.project ||
|
|
|
- !this.project.projectMembers ||
|
|
|
- typeof this.project.projectMembers !== 'string'
|
|
|
- ) {
|
|
|
- return this.userList // 返回全部用户作为后备方案
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // !this.project ||
|
|
|
+ // !this.project.projectMembers ||
|
|
|
+ // typeof this.project.projectMembers !== 'string'
|
|
|
+ // ) {
|
|
|
+ // return this.userList // 返回全部用户作为后备方案
|
|
|
+ // }
|
|
|
|
|
|
- try {
|
|
|
- // 分割项目组成员ID并过滤用户列表
|
|
|
- const projectMemberIds = this.project.projectMembers.split(',')
|
|
|
- const filteredUsers = this.userList.filter((item) =>
|
|
|
- projectMemberIds.includes(item.userId)
|
|
|
- )
|
|
|
- return filteredUsers
|
|
|
- } catch (error) {
|
|
|
- return this.userList // 出错时返回全部用户作为后备方案
|
|
|
- }
|
|
|
+ // try {
|
|
|
+ // // 分割项目组成员ID并过滤用户列表
|
|
|
+ // const projectMemberIds = this.project.projectMembers.split(',')
|
|
|
+ // const filteredUsers = this.userList.filter((item) =>
|
|
|
+ // projectMemberIds.includes(item.userId)
|
|
|
+ // )
|
|
|
+ // return filteredUsers
|
|
|
+ // } catch (error) {
|
|
|
+ // return this.userList // 出错时返回全部用户作为后备方案
|
|
|
+ // }
|
|
|
+ return this.userList
|
|
|
},
|
|
|
// 获取日期选择器的配置选项,动态设置最小可选日期
|
|
|
getPickerOptions(row) {
|