From be717ea0f140f43357fb96d8ab0ed48ddd779213 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 7 Aug 2023 18:03:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E6=89=BE=E4=BA=BA=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0,=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=89=BE=E4=BA=BA=E4=BA=BA=E5=91=98=E5=88=97=E8=A1=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/fuwuzhaoren/index.vue | 1 - .../fuwuzhaoren/personList.vue | 6 + .../communityService/policy/personList.vue | 429 +++++++++--------- .../communityService/policy/policyList.vue | 180 ++++---- 4 files changed, 320 insertions(+), 296 deletions(-) diff --git a/src/views/modules/communityService/fuwuzhaoren/index.vue b/src/views/modules/communityService/fuwuzhaoren/index.vue index 2c09be7df..d430f7cda 100644 --- a/src/views/modules/communityService/fuwuzhaoren/index.vue +++ b/src/views/modules/communityService/fuwuzhaoren/index.vue @@ -608,7 +608,6 @@ export default { async handlePersonList (row) { this.commonServiceId = row.serviceRecordId; this.tagId = row.resiSearchTagId; - this.showPersonList = true; }, diff --git a/src/views/modules/communityService/fuwuzhaoren/personList.vue b/src/views/modules/communityService/fuwuzhaoren/personList.vue index 9236c4e0f..eb156431e 100644 --- a/src/views/modules/communityService/fuwuzhaoren/personList.vue +++ b/src/views/modules/communityService/fuwuzhaoren/personList.vue @@ -264,6 +264,7 @@ export default { async handleSearch () { let url = '/actual/base/residentBaseInfo/commonServicePersonList/list' this.searchFormData.tagId = this.tagId + this.searchFormData.serviceId = this.serviceId let result = await requestPost(url, this.searchFormData) this.epmetResultResolver @@ -440,7 +441,12 @@ export default { tagId: { type: String, required: true, + }, + serviceId: { + type: String, + required: true, } + } } diff --git a/src/views/modules/communityService/policy/personList.vue b/src/views/modules/communityService/policy/personList.vue index 805fd596d..2c9b07b67 100644 --- a/src/views/modules/communityService/policy/personList.vue +++ b/src/views/modules/communityService/policy/personList.vue @@ -2,94 +2,119 @@
- + :inline="true" + :model="searchFormData" + ref="ref_searchform" + :label-width="'110px'" + > + @change="handleOrgChange" + :options="orgTree" + :props="orgOptionProps" + clearable + placeholder="请选择组织" + > + v-model="searchFormData.name" + class="u-item-width-normal" + size="small" + clearable + placeholder="请输入" + > + v-model="searchFormData.mobile" + class="u-item-width-normal" + size="small" + clearable + placeholder="请输入" + > + v-model="searchFormData.idCard" + class="u-item-width-normal" + size="small" + clearable + placeholder="请输入" + > + v-model="searchFormData.serveTimes" + class="u-item-width-normal" + size="small" + clearable + placeholder="请输入" + > - + + v-for="item in quartersSelectItems" + :key="item.value" + :label="item.label" + :value="item.value" + > - + + v-for="item in buildingSelectItems" + :key="item.value" + :label="item.label" + :value="item.value" + > - + + v-for="item in unitSelectItems" + :key="item.value" + :label="item.label" + :value="item.value" + > - + + v-for="item in homeSelectItems" + :key="item.value" + :label="item.label" + :value="item.value" + > @@ -97,100 +122,80 @@
- 标记享受服务人员 - 查询 + 标记享受服务人员 + 查询
- - - - - - - - - - - + :data="personList" + height="250" + border + @select-all="handleSelectAll" + @selection-change="handleTableRowsSelected" + style="width: 100%" + > + + + - + - + + + - + + - + - + - +
+ @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page.sync="searchFormData.pageNo" + :page-sizes="pageSizes" + :page-size="searchFormData.pageSize" + layout="sizes, prev, pager, next, total" + background + :total="total" + >
diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue index 1abf7109a..607601002 100644 --- a/src/views/modules/communityService/policy/policyList.vue +++ b/src/views/modules/communityService/policy/policyList.vue @@ -37,7 +37,7 @@ 导出 - 批量删除 @@ -193,7 +190,11 @@ :show-overflow-tooltip="true" > @@ -218,9 +219,7 @@ :show-overflow-tooltip="true" > @@ -295,6 +294,7 @@ ref="ref_person_list" :policyId="policyId" :tagId="tagId" + :serviceId="serviceId" > @@ -340,10 +340,10 @@ export default { title: "", // 政策标题 // content: "", //政策内容 expiredFlag: null, //是否过期;1:已过期;0:未过期 - policyLevel:null,//政策级别。0市级;1区级;2街道级 - resiSearchTagName:"",//人员标签搜索关键词 - createdTimeStart:"",//yyyy-MM-dd 发布时间,起始 - createdTimeEnd:"",//yyyy-MM-dd 发布时间,结束 + policyLevel: null, //政策级别。0市级;1区级;2街道级 + resiSearchTagName: "", //人员标签搜索关键词 + createdTimeStart: "", //yyyy-MM-dd 发布时间,起始 + createdTimeEnd: "", //yyyy-MM-dd 发布时间,结束 }, pageNo: 1, pageSize: window.localStorage.getItem("pageSize") || 20, @@ -361,7 +361,8 @@ export default { showPersonList: false, ruleList: [], - selection:[] + selection: [], + serviceId: "", }; }, computed: { @@ -380,24 +381,24 @@ export default { this.getTableData(); }, methods: { - onDeleteBatch () { + onDeleteBatch() { if (this.selection.length > 0) { this.$confirm("删除的数据无法恢复,确认删除?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" - }) - .then(() => { - this.delPolicyBatch(this.selection.map(i => i.id)); + type: "warning", }) - .catch(err => { - console.error(err) - }); + .then(() => { + this.delPolicyBatch(this.selection.map((i) => i.id)); + }) + .catch((err) => { + console.error(err); + }); } else { - this.$message.warning('请先选择要删除的政策') + this.$message.warning("请先选择要删除的政策"); } }, - + handleSearch(val) { console.log(this.formData); this.pageNo = 1; @@ -481,7 +482,7 @@ export default { async handleChu() { //导出改接口-政策找人 const url = "/governance/policy/policyExport"; - const {pageSize, pageNo, formData} = this; + const { pageSize, pageNo, formData } = this; axios({ url: window.SITE_CONFIG["apiURL"] + url, method: "post", @@ -492,26 +493,28 @@ export default { }, responseType: "blob", }) - .then((res) => { - let fileName = window.decodeURI( - res.headers["content-disposition"].split(";")[1].split("=")[1] - ); - console.log("filename", fileName); - let blob = new Blob([res.data], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}); - var url = window.URL.createObjectURL(blob); - var aLink = document.createElement("a"); - aLink.style.display = "none"; - aLink.href = url; - aLink.setAttribute("download", fileName); - document.body.appendChild(aLink); - aLink.click(); - document.body.removeChild(aLink); //下载完成移除元素 - window.URL.revokeObjectURL(url); //释放掉blob对象 - }) - .catch((err) => { - console.log("获取导出情失败", err); - return this.$message.error("网络错误"); + .then((res) => { + let fileName = window.decodeURI( + res.headers["content-disposition"].split(";")[1].split("=")[1] + ); + console.log("filename", fileName); + let blob = new Blob([res.data], { + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", }); + var url = window.URL.createObjectURL(blob); + var aLink = document.createElement("a"); + aLink.style.display = "none"; + aLink.href = url; + aLink.setAttribute("download", fileName); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + }) + .catch((err) => { + console.log("获取导出情失败", err); + return this.$message.error("网络错误"); + }); }, async handleDel(row) { this.policyId = row.id; @@ -523,21 +526,21 @@ export default { }) .then(() => { this.$http - .post("/governance/policy/deletePolicy/" + row.id) - .then(({ data: res }) => { - console.log("row2", row); - if (res.code !== 0) { - return this.$message.error(res.msg); - } else { - console.log("row3", row); - this.$message.success("删除成功"); - this.getTableData(); - } - }) - .catch((err) => { - console.log("row4", err); - return this.$message.error("网络错误"); - }); + .post("/governance/policy/deletePolicy/" + row.id) + .then(({ data: res }) => { + console.log("row2", row); + if (res.code !== 0) { + return this.$message.error(res.msg); + } else { + console.log("row3", row); + this.$message.success("删除成功"); + this.getTableData(); + } + }) + .catch((err) => { + console.log("row4", err); + return this.$message.error("网络错误"); + }); }) .catch((err) => { if (err == "cancel") { @@ -576,25 +579,25 @@ export default { } }, //写好的批量删除直接用 - // async delPolicy() { - // if (this.selection.length === 0) - // return this.$message.error("请选择之后进行操作"); - // let policyIds = this.selection.map((item) => item.id); - // this.$http - // .post("/governance/policy/deletePolicy", policyIds) - // .then(({ data: res }) => { - // if (res.code !== 0) { - // return this.$message.error(res.msg); - // } else { - // this.$message.success("删除成功"); - // this.getTableData(); - // } - // }) - // .catch((err) => { - // console.log("row4", err); - // return this.$message.error("网络错误"); - // }); - // }, + // async delPolicy() { + // if (this.selection.length === 0) + // return this.$message.error("请选择之后进行操作"); + // let policyIds = this.selection.map((item) => item.id); + // this.$http + // .post("/governance/policy/deletePolicy", policyIds) + // .then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg); + // } else { + // this.$message.success("删除成功"); + // this.getTableData(); + // } + // }) + // .catch((err) => { + // console.log("row4", err); + // return this.$message.error("网络错误"); + // }); + // }, selectAll(selection) { this.selection = selection; if (selection.length > 0) { @@ -603,8 +606,8 @@ export default { this.selAllFlag = false; } }, - handelSelection(row){ - this.selection = row + handelSelection(row) { + this.selection = row; }, async getTableData() { this.tableLoading = true; @@ -691,23 +694,22 @@ export default { this.formData = { title: "", // 政策标题 expiredFlag: null, //是否过期;1:已过期;0:未过期 - policyLevel:null,//政策级别。0市级;1区级;2街道级 - resiSearchTagName:"",//人员标签搜索关键词 - createdTimeStart:"",//yyyy-MM-dd 发布时间,起始 - createdTimeEnd:"",//yyyy-MM-dd 发布时间,结束 + policyLevel: null, //政策级别。0市级;1区级;2街道级 + resiSearchTagName: "", //人员标签搜索关键词 + createdTimeStart: "", //yyyy-MM-dd 发布时间,起始 + createdTimeEnd: "", //yyyy-MM-dd 发布时间,结束 }; this.pageNo = 1; this.getTableData(); }, - + // 人员列表查看 handlePersonList(row) { - debugger this.showPersonList = true; - this.policyId = row.id - this.tagId = row.resiSearchTagId - } + this.serviceId = row.serviceId; + this.tagId = row.resiSearchTagId; + }, }, };