diff --git a/src/views/modules/communityService/commonDemand/addForm.vue b/src/views/modules/communityService/commonDemand/addForm.vue
index 518564ee6..d16b276bc 100644
--- a/src/views/modules/communityService/commonDemand/addForm.vue
+++ b/src/views/modules/communityService/commonDemand/addForm.vue
@@ -832,8 +832,7 @@ export default {
},
// 如果服务方有选择第一个的话让它更新一下
handleChangeServiceTypeLevel2() {
- console.log(this.formData.serviceTypeLevel1Id);
- console.log(this.formData.serviceTypeLevel2Id);
+ console.log(this.formData.serviceOrgType);
if (this.formData.serviceOrgType) {
this.getServiceuserList(this.formData.serviceOrgType);
} else {
diff --git a/src/views/modules/communityService/commonDemand/detailForm.vue b/src/views/modules/communityService/commonDemand/detailForm.vue
index 3c02e9559..de171c2df 100644
--- a/src/views/modules/communityService/commonDemand/detailForm.vue
+++ b/src/views/modules/communityService/commonDemand/detailForm.vue
@@ -17,7 +17,10 @@
服务范围:
{{ formData.gridIdListName || "--" }}
-
+
政策依据:
{{ formData.policyTitle || "--" }}
@@ -172,6 +175,8 @@
showPersonList: false,
ruleList: [],
policyList: [],
+ serviceTypesLevel1:[],
+ serviceTypesLevel2:[]
};
},
components: { fileList },
@@ -179,6 +184,8 @@
await this.getPolicyList();
// if (this.serviceRecordId) {//详情
await this.loadInfo();
+ this.getserverType()
+ this.handleChangeServiceTypeLevel1()
this.initLoading = true;
if (
@@ -322,7 +329,42 @@
this.resetData();
this.$emit("diaDetailClose");
},
-
+ getserverType() {
+ this.$http
+ .get("/governance/commonServiceType/selectList/0")
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.serviceTypesLevel1 = res.data;
+ console.log(res.data);
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
+ },
+ // 服务类型下拉框选中事件
+ handleChangeServiceTypeLevel1() {
+ // this.formData.serviceTypeLevel2Id = "";
+ console.log(this.formData);
+ let str = this.formData.serviceTypeLevel1Id
+ this.$http
+ .get(
+ "/governance/commonServiceType/selectList/" +
+ str
+ )
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.serviceTypesLevel2 = res.data;
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
+ },
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
initMap() {
let { latitude, longitude } = this.feedbackFormData;
@@ -372,15 +414,13 @@
],
};
},
- // resiSearchTagNameText(){
- // let text = ""
- // if(this.resiSearchTagName){
- // text = this.resiSearchTagName
- // }else {
- // text = '--'
- // }
- // return text
- // },
+
+ serviceTypeLevel1IdText() {
+ const item = this.serviceTypesLevel1.find(entry => entry.id === this.formData.serviceTypeLevel1Id);
+ const item2 = this.serviceTypesLevel2.find(entry => entry.id === this.formData.serviceTypeLevel2Id);
+ return item2 ? item.name +'-' + item2.name : '--'; // 返回对应的 label,如果找不到则返回空字符串
+ }
+
},
props: {
serviceRecordId: {
diff --git a/src/views/modules/communityService/commonDemand/editForm.vue b/src/views/modules/communityService/commonDemand/editForm.vue
index a1e42694e..e0bb35c20 100644
--- a/src/views/modules/communityService/commonDemand/editForm.vue
+++ b/src/views/modules/communityService/commonDemand/editForm.vue
@@ -1,19 +1,8 @@