From 97c32a76e8f912049911a33d776888b5f5c35077 Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Tue, 26 Dec 2023 13:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/AddDialog/tab2.vue | 65 +++++++++++++++++++++++-- src/views/yingji/planManage.vue | 1 + 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/views/components/AddDialog/tab2.vue b/src/views/components/AddDialog/tab2.vue index 550341f..9caf24e 100644 --- a/src/views/components/AddDialog/tab2.vue +++ b/src/views/components/AddDialog/tab2.vue @@ -168,7 +168,14 @@ 草稿箱( {{ enterpriseTotal }} 家)
下一步
-
批量加入草稿箱
+
+ 批量加入草稿箱 +
@@ -227,6 +234,7 @@ export default { loading: true, // 选中数组 ids: [], + idsRow: [], // 非单个禁用 single: true, // 非多个禁用 @@ -294,6 +302,38 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map((item) => item.id); + let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO")); + this.idsRow = []; + selection.map((item) => { + this.idsRow.push({ + id: null, + isPoint: null, + district: item.district, + enterpriseId: item.enterpriseId, + enterpriseName: item.enterpriseName, + uuto: item.id, + lawSort: userInfo.lawSort, + lawAreas: userInfo.lawAreas, + lawLevel: userInfo.lawLevel, + lawHierarchy: userInfo.nickName, + plannedYear: this.$moment(new Date()).format("yyyy"), + plannedMonth: null, + status: 0, + checkStatus: null, + checkId: null, + checkAgeing: null, + createId: null, + createBy: null, + createTime: null, + updateId: null, + updateBy: null, + updateTime: null, + remark: null, + userId: null, + deptId: null, + }); + }); + this.single = selection.length !== 1; this.multiple = !selection.length; }, @@ -328,7 +368,22 @@ export default { btnNext() { this.$emit("nextTab", 2); }, - btnAdd() {}, + btnAdd() { + // console.log(this.idsRow); + let _this = this; + // console.log(this.idsRow.length); + this.idsRow.map((item, index) => { + // console.log(index); + addEnterprise(item).then((response) => { + if (index == _this.idsRow.length - 1) { + _this.$modal.msgSuccess("加入成功"); + _this.idsRow = []; + _this.getList(); //对应草稿箱的消失需要后台写 + _this.getPlanEnterpriseList(); + } + }); + }); + }, // 加入草稿箱 handleAddDrafts(row) { this.resetPlanEnterprise(); @@ -730,16 +785,16 @@ export default { .btn-add { width: 150px; height: 30px; - border: 1px solid #3ecaa7; + border: 1px solid #6bd7bc; border-radius: 2px; - background-color: #eff6ff; + background-color: #0ad9a5; display: flex; align-items: center; justify-content: center; font-size: 15px; font-family: "Alibaba PuHuiTi"; font-weight: 400; - color: #48e1bb; + color: #eff6ff; cursor: pointer; margin-left: 10px; } diff --git a/src/views/yingji/planManage.vue b/src/views/yingji/planManage.vue index 47ef81e..ed486e0 100644 --- a/src/views/yingji/planManage.vue +++ b/src/views/yingji/planManage.vue @@ -99,6 +99,7 @@ class="btn-del" icon="el-icon-delete" :disabled="multiple" + :style="multiple ? 'background: #eb7a9a;' : ''" @click="handleDelete" >批量删除