Browse Source

Merge branch 'bug_mk' into dev

feature
mk 1 year ago
parent
commit
431b8f48a9
  1. 63
      src/views/modules/base/organization/organization.vue
  2. 27
      src/views/modules/communityService/fuwuzhaoren/personList.vue
  3. 28
      src/views/modules/communityService/gangweizhaoren/personList.vue
  4. 30
      src/views/modules/communityService/jinengzhaoren/personList.vue
  5. 29
      src/views/modules/communityService/policy/personList.vue
  6. 35
      src/views/modules/communityService/wennuanzhaoren/personList.vue

63
src/views/modules/base/organization/organization.vue

@ -487,7 +487,7 @@
v-model.trim="peoForm.manageScopes"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="true"
:show-all-levels="true"
clearable></el-cascader>
</el-form-item>
</el-form>
@ -611,7 +611,7 @@
v-model.trim="peoForm.manageScopes"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
:show-all-levels="true"
clearable></el-cascader>
</el-form-item>
</el-form>
@ -1330,10 +1330,15 @@ export default {
orgOptionProps :{
multiple: true,
emitPath: true,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
value: 'id',
label: 'label',
children: 'children',
checkStrictly: true,
lazy: true,
lazyLoad: (node, resolve) => {
this.loadOptions(node, resolve)
},
},
dialogVisiblePeoAgency:false,//
peoFormAgency:{
@ -1401,12 +1406,11 @@ export default {
methods: {
getOrgTreeList () {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.get('/actual/base/communityBuilding/tree/initTree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
this.orgOptions = []
this.orgOptions.push(res.data)
}
@ -1415,10 +1419,29 @@ export default {
return this.$message.error('网络错误')
})
},
async loadOptions(node, resolve) {
let data1 =node.data;
if (data1.level == 'district') {
resolve(this.orgOptions);
} else {
if(data1.level !== "building"){
const url = "/actual/base/communityBuilding/tree/nextTreeNode";
let params = {
level:data1.level,
id:data1.id
};
const { data, code, msg } =await requestGet(url, params);
data1.children=data
resolve(data);
}else{
return resolve()
}
}
},
// id
handleChangeTransferCascader (e) {
console.log("*********************");
function findItem (valueArr, coll) {
console.log("--------------------");
console.log(valueArr);
@ -1656,14 +1679,13 @@ export default {
//
async submitPeoDo () {
const targetAgencyIds = this.peoForm.manageScopes.map(innerArray => innerArray[innerArray.length - 1]);
// Set
const result = new Set();
// level agencyId
this.extractLevelAndAgencyId(this.orgOptions[0], targetAgencyIds, result);
// Set
const manageScopeArray = Array.from(result);
const url = "/gov/org/staff/addstaffv2";
const {
@ -1721,20 +1743,15 @@ export default {
},
//
async updatePeoDo () {
const targetAgencyIds = this.peoForm.manageScopes.map(innerArray => innerArray[innerArray.length - 1]);
// Set
const result = new Set();
console.log(this.orgOptions[0],targetAgencyIds,'11111112');
// level agencyId
this.extractLevelAndAgencyId(this.orgOptions[0], targetAgencyIds, result);
// Set
const manageScopeArray = Array.from(result);
const url = "/gov/org/staff/editstaff";
let params = {
staffId: this.userStaffId,
name: this.peoForm.name,
@ -1768,12 +1785,14 @@ export default {
// JSON level agencyId
extractLevelAndAgencyId(obj, agencyIds, result) {
if (obj && typeof obj === 'object') {
if (obj.level && obj.agencyId && agencyIds.includes(obj.agencyId)) {
result.add(`${obj.level}:${obj.agencyId}`);
console.log(obj,"1111");
if (obj.level && obj.id && agencyIds.includes(obj.id)) {
result.add(`${obj.level}:${obj.id}`);
}
if (Array.isArray(obj.subAgencyList)) {
obj.subAgencyList.forEach(subObj => {
if (Array.isArray(obj.children)) {
obj.children.forEach(subObj => {
this.extractLevelAndAgencyId(subObj, agencyIds, result);
});
}

27
src/views/modules/communityService/fuwuzhaoren/personList.vue

@ -97,6 +97,7 @@
</div>
<div class="div_btn">
<el-button type="primary" size="small" class="diy-button--blue" @click="onDeleteBatch">批量删除</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="onMessagePush">公众号消息推送</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button>
@ -283,7 +284,25 @@ export default {
}
},
methods: {
onDeleteBatch() {
if (this.selectedPersonListIds.length == 0) {
this.$message.warning("请先选中至少一项");
return;
}
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch(this.selectedPersonListIds);
})
.catch((err) => {
console.error(err);
this.$message.error("删除失败");
});
},
//
async handelCLickShowCheckPassword(row) {
console.log(row);
@ -345,7 +364,7 @@ export default {
})
.then(() => {
console.log(row);
this.deleteresiBatch(row);
this.deleteresiBatch([row.id]);
})
.catch((err) => {
if (err == "cancel") {
@ -355,11 +374,9 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
async deleteresiBatch(row) {
console.log(row);
let userIds = row.id;
async deleteresiBatch(ids) {
this.$http
.post("/actual/base/findPersonList/deleteFindPersonByServiceId/"+userIds)
.post("/actual/base/findPersonList/deleteFindPersonByServiceId",{ids})
.then(({ data: res }) => {
console.log(res);
if (res.code !== 0) {

28
src/views/modules/communityService/gangweizhaoren/personList.vue

@ -97,6 +97,7 @@
</div>
<div class="div_btn">
<el-button type="primary" size="small" class="diy-button--blue" @click="onDeleteBatch">批量删除</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="onMessagePush">公众号消息推送</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button>
@ -281,6 +282,25 @@ export default {
}
},
methods: {
onDeleteBatch() {
if (this.selectedPersonListIds.length == 0) {
this.$message.warning("请先选中至少一项");
return;
}
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch(this.selectedPersonListIds);
})
.catch((err) => {
console.error(err);
this.$message.error("删除失败");
});
},
//
async handelCLickShowCheckPassword(row) {
console.log(row);
@ -341,7 +361,7 @@ export default {
})
.then(() => {
console.log(row);
this.deleteresiBatch(row);
this.deleteresiBatch([row.id]);
})
.catch((err) => {
if (err == "cancel") {
@ -351,11 +371,9 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
async deleteresiBatch(row) {
console.log(row);
let userIds = row.id;
async deleteresiBatch(ids) {
this.$http
.post("/actual/base/findPersonList/deleteFindPersonByServiceId/"+userIds)
.post("/actual/base/findPersonList/deleteFindPersonByServiceId",{ids})
.then(({ data: res }) => {
console.log(res);
if (res.code !== 0) {

30
src/views/modules/communityService/jinengzhaoren/personList.vue

@ -97,6 +97,7 @@
</div>
<div class="div_btn">
<el-button type="primary" size="small" class="diy-button--blue" @click="onDeleteBatch">批量删除</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="onMessagePush">公众号消息推送</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button>
@ -282,7 +283,25 @@ export default {
}
},
methods: {
onDeleteBatch() {
if (this.selectedPersonListIds.length == 0) {
this.$message.warning("请先选中至少一项");
return;
}
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch(this.selectedPersonListIds);
})
.catch((err) => {
console.error(err);
this.$message.error("删除失败");
});
},
//
async handelCLickShowCheckPassword(row) {
console.log(row);
@ -343,7 +362,7 @@ export default {
})
.then(() => {
console.log(row);
this.deleteresiBatch(row);
this.deleteresiBatch([row.id]);
})
.catch((err) => {
if (err == "cancel") {
@ -353,11 +372,9 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
async deleteresiBatch(row) {
console.log(row);
let userIds = row.id;
async deleteresiBatch(ids) {
this.$http
.post("/actual/base/findPersonList/deleteFindPersonByServiceId/"+userIds)
.post("/actual/base/findPersonList/deleteFindPersonByServiceId",{ids})
.then(({ data: res }) => {
console.log(res);
if (res.code !== 0) {
@ -616,4 +633,7 @@ export default {
color: #f56c6c;
margin-right: 4px;
}
/deep/ .el-pagination{
text-align: right;
}
</style>

29
src/views/modules/communityService/policy/personList.vue

@ -122,6 +122,8 @@
</div>
<div class="div_btn">
<el-button type="primary" size="small" class="diy-button--blue" @click="onDeleteBatch">批量删除</el-button>
<el-button
type="primary"
size="small"
@ -286,6 +288,25 @@ export default {
};
},
methods: {
onDeleteBatch() {
if (this.selectedPersonListIds.length == 0) {
this.$message.warning("请先选中至少一项");
return;
}
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch(this.selectedPersonListIds);
})
.catch((err) => {
console.error(err);
this.$message.error("删除失败");
});
},
//
async handelCLickShowCheckPassword(row) {
console.log(row);
@ -347,7 +368,7 @@ export default {
})
.then(() => {
console.log(row);
this.deleteresiBatch(row);
this.deleteresiBatch([row.id]);
})
.catch((err) => {
if (err == "cancel") {
@ -357,11 +378,9 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
async deleteresiBatch(row) {
console.log(row);
let userIds = row.id;
async deleteresiBatch(ids) {
this.$http
.post("/actual/base/findPersonList/deleteFindPersonByPolicyId/"+userIds)
.post("/actual/base/findPersonList/deleteFindPersonByPolicyId",{ids})
.then(({ data: res }) => {
console.log(res);
if (res.code !== 0) {

35
src/views/modules/communityService/wennuanzhaoren/personList.vue

@ -100,6 +100,7 @@
</div>
<div class="div_btn">
<el-button type="primary" size="small" class="diy-button--blue" @click="onDeleteBatch">批量删除</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="onMessagePush">公众号消息推送</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button>
@ -289,6 +290,25 @@ export default {
}
},
methods: {
onDeleteBatch() {
if (this.selectedPersonListIds.length == 0) {
this.$message.warning("请先选中至少一项");
return;
}
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch(this.selectedPersonListIds);
})
.catch((err) => {
console.error(err);
this.$message.error("删除失败");
});
},
//
async handelCLickShowCheckPassword(row) {
console.log(row);
@ -349,8 +369,7 @@ export default {
type: "warning",
})
.then(() => {
console.log(row);
this.deleteresiBatch(row);
this.deleteresiBatch([row.id]);
})
.catch((err) => {
if (err == "cancel") {
@ -360,11 +379,9 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
async deleteresiBatch(row) {
console.log(row);
let userIds = row.id;
async deleteresiBatch(ids) {
this.$http
.post("/actual/base/findPersonList/deleteFindPersonByServiceId/"+userIds)
.post("/actual/base/findPersonList/deleteFindPersonByServiceId",{ids})
.then(({ data: res }) => {
console.log(res);
if (res.code !== 0) {
@ -610,8 +627,9 @@ export default {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
},
}
},
props: {
serviceId: {
type: String,
@ -627,7 +645,6 @@ export default {
}
},
}
</script>

Loading…
Cancel
Save