Browse Source

服务方名称获取异常

V1.0
mk 3 years ago
parent
commit
8f1ae8f9cf
  1. 29
      src/views/modules/communityService/measure/index.vue

29
src/views/modules/communityService/measure/index.vue

@ -517,9 +517,9 @@
>
<el-option
v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
@ -1016,6 +1016,7 @@ export default {
this.form.serviceEndTime = val[1];
}
},
//
handleServiceChange(type, val) {
if (val === "social_org") {
if (type === "add") this.getServiceuserList(val, "add_demand");
@ -1045,6 +1046,7 @@ export default {
// this.$refs.ruleForm.resetFields()
this.dialogVisible = false;
},
//initForm
async formatRowForm(row, addType, disabled) {
this.form = { ...row, categoryCode: [row.parentCode, row.categoryCode] };
this.addType = addType;
@ -1070,7 +1072,7 @@ export default {
}
if (addType == "appoint" && row.serviceType) {
const type = row.serviceType == "social_org" ? "add_demand" : "";
await this.getServiceuserList(row.serviceType, type);
await this.getServiceuserList(row, type);
}
if (addType == "edit") {
await this.getDemandUserList();
@ -1098,7 +1100,7 @@ export default {
detailFormCancle() {
this.detailShow = false;
},
//form
async handleAppoint(row, type) {
await this.formatRowForm(row, type, true);
},
@ -1350,23 +1352,22 @@ export default {
return this.$message.error("网络错误");
});
},
//
async getServiceuserList(serviceType, query) {
if (!serviceType) return false;
const { demandUserId } = this.form;
const params = {
serviceName: "",
serviceType: serviceType,
queryPurpose: query,
const url = "/actual/base/serviceitem/listServerOrg";
let params = {
serviceTypeId: this.form.categoryCode[1],//ID
serverOrgType: serviceType,//
businessType: "resi_service",
};
await this.$http
.post("/governance/userdemand/servicelist", params)
.post(url, params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.serviceOptiondList = res.data.filter(
(item) => item.value != demandUserId
);
this.serviceOptiondList = res.data
}
})
.catch(() => {

Loading…
Cancel
Save