|
|
@ -24,7 +24,7 @@ |
|
|
|
prop="categoryCode"> |
|
|
|
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|
|
|
|
|
|
|
<el-cascader v-model.trim="formData.categoryCode" :options="demandOptions" clearable class="cell-width-1" |
|
|
|
<el-cascader v-model.trim="formData.categoryCode" :props="{label:'categoryName',value:'categoryCode',children:'childCateList'}" :options="demandOptions" clearable class="cell-width-1" |
|
|
|
@change="handleCateSlect"></el-cascader> |
|
|
|
</div> |
|
|
|
|
|
|
@ -363,9 +363,8 @@ export default { |
|
|
|
// } |
|
|
|
// }, |
|
|
|
async getDemandOptions() { |
|
|
|
const url = "/governance/icresidemanddict/demandoption" |
|
|
|
let params = {} |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
const url = "/actual/base/serviceitem/listAllCategory" |
|
|
|
const { data, code, msg } = await requestPost(url) |
|
|
|
if (code === 0) { |
|
|
|
this.demandOptions = this.getFlagData( |
|
|
|
this.getTreeData(data), |
|
|
@ -391,10 +390,10 @@ export default { |
|
|
|
if (!Array.isArray(data)) return []; |
|
|
|
let arr = data.map((item) => { |
|
|
|
let _item = {}; |
|
|
|
if (item.children) { |
|
|
|
if (item.children.length === 0) |
|
|
|
_item = { ...item, children: undefined }; |
|
|
|
else _item = { ...item, children: this.getTreeData(item.children) }; |
|
|
|
if (item.childCateList) { |
|
|
|
if (item.childCateList.length === 0) |
|
|
|
_item = { ...item, childCateList: undefined }; |
|
|
|
else _item = { ...item, childCateList: this.getTreeData(item.childCateList) }; |
|
|
|
} else { |
|
|
|
_item = { ...item }; |
|
|
|
} |
|
|
@ -406,8 +405,8 @@ export default { |
|
|
|
if (!Array.isArray(data)) return []; |
|
|
|
let arr1 = data.filter((item) => item[flag]); |
|
|
|
let arr2 = arr1.map((item) => { |
|
|
|
if (item.children) |
|
|
|
return { ...item, children: this.getFlagData(item.children, flag) }; |
|
|
|
if (item.childCateList) |
|
|
|
return { ...item, childCateList: this.getFlagData(item.childCateList, flag) }; |
|
|
|
else return item; |
|
|
|
}); |
|
|
|
// console.log('arrr-oppp', arr2) |
|
|
@ -432,11 +431,11 @@ export default { |
|
|
|
this.$message.error("请先选择服务类型!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
const url = "/actual/base/serviceitem/listServerOrg"; |
|
|
|
const url = "/actual/base/serviceitem/listServerOrgNewTask"; |
|
|
|
let params = { |
|
|
|
serviceTypeId: this.formData.categoryCode, |
|
|
|
serverOrgCategoryCode: this.formData.categoryCode[1], |
|
|
|
serverOrgType: val, |
|
|
|
businessType: "resi_service", |
|
|
|
serverParentOrgCategoryCode:this.formData.categoryCode[0], |
|
|
|
}; |
|
|
|
let { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code == 0) { |
|
|
|