Browse Source

共性需求批量删除

V1.0
mk 3 years ago
parent
commit
47bb3d4774
  1. 7
      src/assets/scss/modules/management/list-main.scss
  2. 58
      src/views/modules/communityService/gxxq/addForm.vue
  3. 7
      src/views/modules/communityService/gxxq/index.vue

7
src/assets/scss/modules/management/list-main.scss

@ -106,7 +106,12 @@
}
}
.div-flex{
.m-page{
display: flex;
justify-content: space-between;
}
}
// 弹性盒子
.f-flex {

58
src/views/modules/communityService/gxxq/addForm.vue

@ -444,6 +444,7 @@ export default {
this.formData.content = data.content;
this.formData.assignFlag = data.assignFlag
this.formData.resiSearchTagId = data.resiSearchTagId;
if( data.assignInfo){
this.newFormData.serviceTimeStart = data.assignInfo.serviceTimeStart;
this.newFormData.serviceTimeEnd = data.assignInfo.serviceTimeEnd;
this.newFormData.serverOrgType = data.assignInfo.serverOrgType;
@ -455,8 +456,9 @@ export default {
data.assignInfo.serviceScopeList[i].objectId
);
}
await this.handleChangeServiceTypeLevel1();
await this.getServiceuserList(data.assignInfo.serverOrgType);
}
await this.handleChangeServiceTypeLevel1();
await // this.formData = { ...data };
await this.getTagName();
@ -696,33 +698,47 @@ export default {
objectName: this.newArr[i].objectName,
});
}
this.newArr = []
//
let arr = [];
let isOk = false;
this.newFormData.serviceScopeList.forEach((item) => {
if (typeof item != "string") {
arr.push(item);
}
});
//
let isOk = false;
arr.findIndex((item) => {
if (
item.objectType == "neighborhood" ||
item.objectType == "agency" ||
item.objectType == "grid"
) {
isOk = true;
} else {
return (isOk = false);
}
});
console.log(isOk);
if (!isOk && this.formData.assignFlag) {
this.newArr = [];
this.$message.error("请选择正确的网格,社区,楼栋!");
return;
}
this.newFormData.serviceScopeList = arr;
//
// arr.forEach((item) => {
// if (
// item.objectType == "neighborhood" ||
// item.objectType == "agency" ||
// item.objectType == "grid"
// ) {
// isOk = true;
// } else {
// isOk = false
// this.newArr = [];
// this.newFormData.serviceScopeList = []
// arr = []
// this.$message.error(",,!");
// }
// });
for(let i in arr){
if(arr[i].objectType == "neighborhood" ||
arr[i].objectType == "agency" ||
arr[i].objectType == "grid"){
isOk = true;
}else{
isOk = false;
console.log( this.newArr,'没有清空?');
this.$message.error("请选择正确的网格,社区,楼栋!");
return
}
}
console.log( this.newArr);
this.newFormData.serviceScopeList = arr;
if (!isOk && this.formData.assignFlag) return
var url = "";
var params = {};
if (this.formType == "edit") {

7
src/views/modules/communityService/gxxq/index.vue

@ -204,7 +204,9 @@
<div class="div-flex">
<div class="m-page">
<el-button @click="deleteBatch" size="small" style="margin-top: 15px;">
批量删除
</el-button>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@ -214,9 +216,6 @@
layout="sizes, prev, pager, next, total"
:total="total"
>
<el-button @click="deleteBatch">
批量删除
</el-button>
</el-pagination>
</div>
</div>

Loading…
Cancel
Save