diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index aa6ddc52f..39d0b2c7e 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -99,8 +99,16 @@
批量删除
- 信息无误批量确认
+
+ confirmBatch(command)">
+ 信息无误确认
+
+ 全部确认
+ 批量确认
+
+
@@ -735,19 +743,40 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
- confirmBatch() {
- this.$confirm("是否确认信息", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
+ confirmBatch(command) {
+ if(command === '1'){
+ this.$confirm("是否全部确认信息", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
.then(() => {
this.confirresiBatch();
+ this.handleSearchFrom();
+
+ })
+ .catch((err) => {
+ if (err == "cancel") {
+ }
+ });
+ }else{
+ if (this.selection.length === 0)
+ return this.$message.error("请选择之后进行操作");
+ this.$confirm("是否批量确认信息", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.confirresiBatch(this.selection.map(item=>item.resiId));
+ this.handleSearchFrom();
})
.catch((err) => {
if (err == "cancel") {
}
});
+ }
+
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
@@ -1077,31 +1106,19 @@ export default {
this.$http
.post(`/actual/base/residentCategoryUpdateInfo/unchangeSingleUpdate/${userIds}` )
.then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- } else {
- this.$message.success("信息确定成功");
- this.handleSearchFrom();
- }
-})
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.$message.success("信息确定成功");
+ this.handleSearchFrom();
+ }
+ })
},
- async confirresiBatch() {
- let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form));
- _obj.attentionCrowds = _obj.attentionCrowds.flat();
-
- const url = `/actual/base/residentCategoryUpdateInfo/unchangeMultiUpdate`;
-
- let params = {
- pageNo: 1,
- pageSize: 100,
- ..._obj,
- };
-
- console.log(params);
-
+ async confirresiBatch(ids) {
+ const url = `/actual/base/residentCategoryUpdateInfo/unchangePartUpdate`;
+ let params = {ids};
const { data, code, msg } = await requestPost(url, params);
- console.log(data, "data");
if (code !== 0) {
return this.$message.error(msg);
} else {