From 958684f77b1525502ddefecd1d6e9588c8352ce1 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 19 Jun 2024 10:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=9B=B4=E6=96=B0=E5=85=A5=E5=8F=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index eb73ecd90..f276e277a 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -101,8 +101,9 @@ + + @command="(command) => confirmBatch(command)" > 信息无误确认 全部确认 @@ -1117,13 +1118,31 @@ export default { } }) }, - + //处理参数 + extractSpecificKeys(obj, keys) { + const resultArray = []; + keys.forEach(key => { + if (key in obj) { + const value = obj[key]; + if (Array.isArray(value)) { + resultArray.push(...value); // 展开数组并加入结果数组 + } else { + resultArray.push(value); // 将非数组的值加入结果数组 + } + } + }); + return resultArray; + }, async confirresiBatch(ids) { this.valueb = this.$route.query.param1; let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form)); _obj.attentionCrowds = _obj.attentionCrowds.flat() + let updateCategorys = this.extractSpecificKeys(_obj,['attentionCrowds','healthStatus','specialCategoryCodes','identity']) const url = `/actual/base/residentCategoryUpdateInfo/unchangePartUpdate`; - let params = {ids,..._obj}; + let params = {ids,partyFlag:_obj.partyFlag,updateCategorys}; + if(!ids){ + params = { ..._obj,updateCategorys} + } const { data, code, msg } = await requestPost(url, params); if (code !== 0) { return this.$message.error(msg);