| eladmin-web-master/src/views/task/task/index.vue | ●●●●● patch | view | raw | blame | history | |
| eladmin-web-master/src/views/task/taskUser/index.vue | ●●●●● patch | view | raw | blame | history |
eladmin-web-master/src/views/task/task/index.vue
@@ -718,6 +718,21 @@ // 表单验证 this.$refs['divideForm'].validate((valid) => { if (valid) { // 判断用户角色 if (this.userRolesLevelMin !== this.roleLevelSuper && this.userRolesLevelMin !== this.roleLevelGeneral) { // 检索选中项目信息 const chooseProject = this.projects.filter((item) => { return item.id === this.divideForm.projectId }) // 判断是否是项目责任人 if (chooseProject.length !== 1 || chooseProject[0].liableUserId !== this.$store.state.user.user.id) { // 消息提示 this.crud.notify('您不是当前项目责任人,无法进行任务分配操作', CRUD.NOTIFICATION_TYPE.WARNING) // 分配表单加载 this.divideLoading = false return false } } // 分配任务 crudTask.divide(this.divideForm).then(res => { // 分配表单关闭 @@ -745,7 +760,7 @@ return item.id === this.form.projectId }) // 判断是否是项目责任人 if (chooseProject.projectLiableUserId === this.$store.state.user.user.id) { if (chooseProject.length === 1 && chooseProject[0].liableUserId === this.$store.state.user.user.id) { return true } else { // 消息提示 eladmin-web-master/src/views/task/taskUser/index.vue
@@ -512,7 +512,6 @@ // 表单赋值 this.form.divideUserIds = res }) } }, // 钩子:提交 - 之前 [CRUD.HOOK.beforeSubmit]() { @@ -525,7 +524,7 @@ return item.id === this.form.projectId }) // 判断是否是项目责任人 if (chooseProject.projectLiableUserId === this.$store.state.user.user.id || this.form.userId === this.$store.state.user.user.id) { if ((chooseProject.length === 1 && chooseProject[0].liableUserId === this.$store.state.user.user.id) || this.form.userId === this.$store.state.user.user.id) { return true } else { // 消息提示 @@ -535,6 +534,7 @@ } } } } </script> <style scoped>