From cb1de69384356b1dd4b34ea4686f001c7b354eda Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 21 Feb 2023 15:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E6=89=BE=E4=BA=BA=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=BF=E7=AD=96=E7=B1=BB=E5=9E=8B=E5=8F=8C?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/policy/addPolicy.vue | 170 +++++++++++++----- .../communityService/policy/policyList.vue | 2 +- 2 files changed, 125 insertions(+), 47 deletions(-) diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index 6a72359a2..34f44ef42 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -8,25 +8,56 @@ :rules="dataRule" :disabled="formType==='detail'" class="div_form"> + + +
+ + + + + + + + + + + + +
+
- - - - - - + style="display: block"> + + - @@ -47,14 +78,21 @@ - - - + prop="policyLevel"> + + + + + -
@@ -101,15 +139,15 @@ :index="index">
- + --> -
+ - @@ -119,7 +157,7 @@ :options="demandOptions" :props="optionProps" @change="handleCateSlect"> - + --> { + if (res.code !== 0) { + return this.$message.error(res.msg); + } else { + this.serviceTypesLevel1 = res.data; + } + }) + .catch(() => { + return this.$message.error("网络错误"); + }); }, @@ -656,6 +713,8 @@ export default { resetData () { this.ruleList = [] this.formData = { + serviceTypeLevel1Id:'', + serviceTypeLevel2Id:'', policyLevel: '',//政府级别 startDate: '',//起始时间yyyy-MM-dd endDate: '',//截止时间yyyy-MM-dd @@ -680,6 +739,23 @@ export default { if (loading) { loading.close() } + }, + + // 服务类型下拉框选中事件 + handleChangeServiceTypeLevel1() { + this.formData.policyTypeLevel2Id = '' + this.$http + .get("/governance/commonServiceType/selectList/" + this.formData.policyTypeLevel1Id) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } else { + this.serviceTypesLevel2 = res.data; + } + }) + .catch(() => { + return this.$message.error("网络错误"); + }) } }, computed: { @@ -697,7 +773,9 @@ export default { return { - + serviceType: [ + { required: true, message: '政策类型不能为空', trigger: 'blur' } + ], policyLevel: [ { required: true, message: '政策级别不能为空', trigger: 'change' } ], diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue index 33f8a5ec3..b892fe562 100644 --- a/src/views/modules/communityService/policy/policyList.vue +++ b/src/views/modules/communityService/policy/policyList.vue @@ -401,7 +401,7 @@ export default { async getTableData () { this.tableLoading = true - const url = "/heart/policy/list"; + const url = "/governance/policy/list"; // const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList"; const { pageSize, pageNo, formData } = this; const { data, code, msg } = await requestPost(url, {