From 1446bc8d569c11d676580e615d57a2737960fac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 11:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../surProjectUserInfo/projectUserInfoDrawer.vue | 6 +++--- .../src/views/work/workTrain/workTrainDrawer.vue | 13 ++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ruoyi-ui/src/views/project/surProjectUserInfo/projectUserInfoDrawer.vue b/ruoyi-ui/src/views/project/surProjectUserInfo/projectUserInfoDrawer.vue index 49cec3a1..5d9a329d 100644 --- a/ruoyi-ui/src/views/project/surProjectUserInfo/projectUserInfoDrawer.vue +++ b/ruoyi-ui/src/views/project/surProjectUserInfo/projectUserInfoDrawer.vue @@ -233,12 +233,12 @@ export default { mounted() {}, beforeDestroy() {}, methods: { - onOpen() { + onOpen() { this.getList(); }, onClose() {}, /** 查询项目人员列表 */ - getList() { + getList() { if (this.formData.projectId) { this.loading = true; this.queryParams.projectId = this.formData.projectId; @@ -306,7 +306,7 @@ export default { this.$message.error("请选择下级节点数据,当前数据节点未查询到相关人员!"); return false; } - if (note.children.length > 10) { + if (note.children && note.children.length > 10) { this.$message.error("请选择下级节点数据,当前数据节点未查询到相关人员!"); return false; } diff --git a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue index 04dd3686..14a68063 100644 --- a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue +++ b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue @@ -272,12 +272,7 @@ export default { components: { ElImageViewer, }, - props: { - formData: { - projectId: String, - projectName: String, - }, - }, + props: {}, dicts: ["train_nature_zxpx"], data() { return { @@ -424,8 +419,8 @@ export default { /** 新增按钮操作 */ handleAdd() { this.reset(); - this.form.projectId = this.formData.projectId; - this.form.projectName = this.formData.projectName; + this.form.projectId = this.project.id; + this.form.projectName = this.project.projectName; this.open = true; this.title = "添加专项培训"; this.getDeptList(); @@ -481,7 +476,7 @@ export default { this.title = "修改专项培训"; const id = row.id || this.ids; let param = { - projectId: this.formData.projectId, + projectId: this.project.id, }; this.open = true; //获取项目部门列表的接口