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);