From db245cdc983f29c87b8ff06b7bba10d92e32117d 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: Sun, 27 Aug 2023 22:25:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/project/surProject/index.vue | 42 +++------ .../emergencyDrill/emergencyDrillDrawer.vue | 93 ++++++++++++------- .../views/work/workTrain/workTrainDrawer.vue | 74 ++++++++++----- 3 files changed, 124 insertions(+), 85 deletions(-) diff --git a/ruoyi-ui/src/views/project/surProject/index.vue b/ruoyi-ui/src/views/project/surProject/index.vue index 4d436acd..2c9feba4 100644 --- a/ruoyi-ui/src/views/project/surProject/index.vue +++ b/ruoyi-ui/src/views/project/surProject/index.vue @@ -385,7 +385,8 @@ command="handleAssess" icon="el-icon-coordinate" v-hasPermi="['project:assess:list']" - >季度考核管理 + >季度考核管理 项目成本产值管理 + >项目成本产值管理 删除项目 - + >删除项目 @@ -777,16 +779,8 @@ - - + + + + {{ title + " 【应急演练管理】" }} + + + + { + this.nodes = d.rows; + if (d.rows.length > 0) { + this.activeName = this.nodes[0].unitId + ""; + this.getworkTrainList(); + } else { + this.workTrainList = []; + } + }); + this.$api.publics + .selectProjectUnitUser({ + projectId: project.id, + }) + .then((d) => { + this.deptUserData = d.data; + }); + }, /** 查询应急演练列表 */ getworkTrainList() { - if (this.formData.projectId) { - this.loading = true; - this.queryParams.projectId = this.formData.projectId; - listWorkTrain(this.queryParams).then((response) => { - this.workTrainList = response.rows; - this.total = response.total; - this.loading = false; - }); - } + this.loading = true; + this.queryParams.deptId = this.activeName; + listWorkTrain(this.queryParams).then((response) => { + this.workTrainList = response.rows; + this.total = response.total; + this.loading = false; + }); }, // 多选框选中数据 handleSelectionChange(selection) { @@ -400,8 +429,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(); @@ -457,7 +486,7 @@ export default { this.title = "修改应急演练"; const id = row.id || this.ids; let param = { - projectId: this.formData.projectId, + projectId: this.project.id, }; //获取项目部门列表的接口 listProjectUnit(param).then((response) => { @@ -482,7 +511,7 @@ export default { this.$modal .confirm('是否确认删除应急演练编号为"' + ids + '"的数据项?') .then(function () { - return delSurProjectUserInfo(ids); + return delWorkTrain(ids); }) .then(() => { this.getworkTrainList(); diff --git a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue index 20b5d06e..827a3aad 100644 --- a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue +++ b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue @@ -1,13 +1,27 @@ + + {{ title + " 【专项培训管理】" }} + + + + { + this.nodes = d.rows; + if (d.rows.length > 0) { + this.activeName = this.nodes[0].unitId + ""; + this.getworkTrainList(); + } else { + this.workTrainList = []; + } + }); + }, /** 查询专项培训列表 */ getworkTrainList() { - if (this.formData.projectId) { - this.loading = true; - this.queryParams.projectId = this.formData.projectId; - listWorkTrain(this.queryParams).then((response) => { - this.workTrainList = response.rows; - this.total = response.total; - this.loading = false; - }); - } + this.loading = true; + this.queryParams.deptId = this.activeName; + listWorkTrain(this.queryParams).then((response) => { + this.workTrainList = response.rows; + this.total = response.total; + this.loading = false; + }); }, // 多选框选中数据 handleSelectionChange(selection) { @@ -483,7 +511,7 @@ export default { this.$modal .confirm('是否确认删除专项培训编号为"' + ids + '"的数据项?') .then(function () { - return delSurProjectUserInfo(ids); + return delWorkTrain(ids); }) .then(() => { this.getworkTrainList();