Browse Source

Merge branch 'bug_mk' into dev

feature
mk 1 year ago
parent
commit
ef72f283ca
  1. 25
      src/views/modules/base/resi.vue

25
src/views/modules/base/resi.vue

@ -101,8 +101,9 @@
<!-- <el-button style="margin-left: 10px" v-if="btnAuths.ic_resi_batch_del" size="small" class="diy-button--add"
type="parimary" @click="confirmBatch"></el-button> -->
<!-- v-if="updeBtn" -->
<el-dropdown size="small" split-button type="primary" style="margin: 0 10px; height: 30px"
@command="(command) => confirmBatch(command)" v-if="updeBtn" >
@command="(command) => confirmBatch(command)" >
信息无误确认
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1" >全部确认</el-dropdown-item>
@ -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);

Loading…
Cancel
Save