|
|
|
@ -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(() => { |
|
|
|
|