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

Loading…
Cancel
Save