|
@ -52,7 +52,7 @@ |
|
|
<view class="group_2" v-if="selectVale === 'resi'"> |
|
|
<view class="group_2" v-if="selectVale === 'resi'"> |
|
|
<view class="section_2"> |
|
|
<view class="section_2"> |
|
|
<view class="box_16"> |
|
|
<view class="box_16"> |
|
|
<jia-cascader :itemList="angencyList" @completeChange="completeGrid" @inputChange="changeResiCascader" :border="false" :clearIcon="false"></jia-cascader> |
|
|
<jia-cascader v-if="selectVale === 'resi' && resiText" :itemList="angencyList" @completeChange="completeGrid" @inputChange="changeResiCascader" :border="false" :clearIcon="false" :request="true" :receiveData="receiveData" :placeholder="resiText"></jia-cascader> |
|
|
</view> |
|
|
</view> |
|
|
<view class="box_17"> |
|
|
<view class="box_17"> |
|
|
<view class="tabs"> |
|
|
<view class="tabs"> |
|
@ -220,13 +220,7 @@ |
|
|
<view class="group_2" v-if="selectVale === 'house'"> |
|
|
<view class="group_2" v-if="selectVale === 'house'"> |
|
|
<view class="section_2"> |
|
|
<view class="section_2"> |
|
|
<view class="box_16" v-if="!houseListSearchFlag"> |
|
|
<view class="box_16" v-if="!houseListSearchFlag"> |
|
|
<text lines="1" class="text_4" @tap="handelClickShowTreeFw">{{ cascaderNameFw }}</text> |
|
|
<jia-cascader v-if="houseText && selectVale === 'house'" :itemList="angencyFwList" @completeChange="completeGrid1" @inputChange="changeHouseCascader" :border="false" :clearIcon="false" :request="true" :receiveData="receiveDataFw" :placeholder="houseText"></jia-cascader> |
|
|
<view class="image-text_9"> |
|
|
|
|
|
<view class="image-text_qh"> |
|
|
|
|
|
<image src="/static/images/swapHorizontal.png" class="image_8"></image> |
|
|
|
|
|
<text lines="1" class="text_5" @tap="handelClickShowTreeFw">切换</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="box_17" v-if="!houseListSearchFlag"> |
|
|
<view class="box_17" v-if="!houseListSearchFlag"> |
|
|
<view class="tabs"> |
|
|
<view class="tabs"> |
|
@ -363,20 +357,6 @@ export default { |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
tableFwData: [], |
|
|
tableFwData: [], |
|
|
|
|
|
|
|
|
resiList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '', |
|
|
|
|
|
resiTags: [''], |
|
|
|
|
|
nationalityName: '', |
|
|
|
|
|
nationName: '', |
|
|
|
|
|
mobile: '', |
|
|
|
|
|
idNum: '', |
|
|
|
|
|
agencyName: '', |
|
|
|
|
|
homeName: '', |
|
|
|
|
|
updatedTime: '' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
lowerThreshold: '10', |
|
|
lowerThreshold: '10', |
|
@ -391,7 +371,6 @@ export default { |
|
|
angencyId: null, |
|
|
angencyId: null, |
|
|
category: null, |
|
|
category: null, |
|
|
searchOrgIdPath: '', |
|
|
searchOrgIdPath: '', |
|
|
cascaderFwValue: '', |
|
|
|
|
|
angencyList: [], |
|
|
angencyList: [], |
|
|
|
|
|
|
|
|
//组织树 |
|
|
//组织树 |
|
@ -399,14 +378,6 @@ export default { |
|
|
|
|
|
|
|
|
agencyName: '', |
|
|
agencyName: '', |
|
|
|
|
|
|
|
|
fieldName: { |
|
|
|
|
|
text: 'label', |
|
|
|
|
|
value: 'id', |
|
|
|
|
|
children: 'children' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
cascaderNameFw: null, |
|
|
|
|
|
|
|
|
|
|
|
params: { |
|
|
params: { |
|
|
agencyId: '', |
|
|
agencyId: '', |
|
|
orgId: '', |
|
|
orgId: '', |
|
@ -452,7 +423,6 @@ export default { |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
tempList: [], |
|
|
tempList: [], |
|
|
angencyJmList: [], |
|
|
|
|
|
houseListSearchFlag: false, |
|
|
houseListSearchFlag: false, |
|
|
cascaderName: '', |
|
|
cascaderName: '', |
|
|
statusHeight: '', |
|
|
statusHeight: '', |
|
@ -461,7 +431,11 @@ export default { |
|
|
loadLeve: '', |
|
|
loadLeve: '', |
|
|
resiSearch: '', |
|
|
resiSearch: '', |
|
|
houseSearch: '', |
|
|
houseSearch: '', |
|
|
carList:[] |
|
|
carList:[], |
|
|
|
|
|
receiveData:[], |
|
|
|
|
|
receiveDataFw:[], |
|
|
|
|
|
houseText:'', |
|
|
|
|
|
resiText:'' |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
@ -538,7 +512,8 @@ export default { |
|
|
onShareAppMessage() {}, |
|
|
onShareAppMessage() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
completeGrid(e) { |
|
|
completeGrid(e) { |
|
|
|
|
|
}, |
|
|
|
|
|
completeGrid1(e) { |
|
|
}, |
|
|
}, |
|
|
async carInfoPage(){ |
|
|
async carInfoPage(){ |
|
|
try { |
|
|
try { |
|
@ -582,6 +557,17 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
changeResiCascader(e){ |
|
|
changeResiCascader(e){ |
|
|
|
|
|
const {level,value} = e |
|
|
|
|
|
getNextTree({ |
|
|
|
|
|
level, |
|
|
|
|
|
id: value |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
|
|
|
this.receiveData = this.convertLabelToText(res.data) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.receiveData = null |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
this.searchOrgIdPath = e.value; |
|
|
this.searchOrgIdPath = e.value; |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
@ -596,44 +582,30 @@ export default { |
|
|
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.item.id}` |
|
|
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.item.id}` |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getUnitoption(val) { |
|
|
getUnitoption(val) { |
|
|
|
|
|
const level = val[0].level; |
|
|
getNextTree({ |
|
|
getNextTree({ |
|
|
level: val[0].level, |
|
|
level: level, |
|
|
id: val[0].id || val[0].agencyId |
|
|
id: val[0].id || val[0].value |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if (res.data.length > 0) { |
|
|
if (res.data.length > 0) { |
|
|
if (res.data[0].level != 'unit' || res.data[0].level == 'unit') { |
|
|
if(level !== 'unit'){ |
|
|
|
|
|
this.getUnitoption(res.data); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
tempList:this.tempList.concat([res.data[0]]) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
let houseText = this.tempList.map(item=>item.label).join('-') |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
tempList: this.tempList.concat([res.data[0]]) |
|
|
houseText |
|
|
}); |
|
|
}) |
|
|
this.getUnitoption(res.data); |
|
|
if(level === 'unit'){ |
|
|
} |
|
|
this.setData({ |
|
|
let unitId = this.tempList.filter((item) => item.level == 'unit')[0]?.id; |
|
|
'params1.searchOrgIdPath': val[0].id, |
|
|
this.setData({ |
|
|
'params.orgId': val[0].id, |
|
|
cascaderNameFw: this.tempList |
|
|
}); |
|
|
.map((item) => item.label) |
|
|
this.getTableFwData(); |
|
|
.splice(0, this.tempList.length - 1) |
|
|
|
|
|
.join(','), |
|
|
|
|
|
'params1.searchOrgIdPath': unitId, |
|
|
|
|
|
'params.orgId': unitId |
|
|
|
|
|
}); |
|
|
|
|
|
const data = res.data.map((item) => { |
|
|
|
|
|
if (item.level != 'unit') { |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: [] |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: null |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
const arr = this.getTreeFun(val[0].agencyId, this.angencyFwList, data); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
angencyFwList: arr |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
const arr = this.getTreeFun(val[0].agencyId, this.angencyFwList, null); |
|
|
const arr = this.getTreeFun(val[0].agencyId, this.angencyFwList, null); |
|
|
this.setData({ |
|
|
this.setData({ |
|
@ -681,9 +653,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getTopTreeData() { |
|
|
getTopTreeData() { |
|
|
api.getAgencygridtree().then((res) => { |
|
|
api.getTopTree().then((res) => { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
angencyList: this.convertLabelToText([res.data]) |
|
|
angencyList: this.convertLabelToText([res.data]), |
|
|
|
|
|
angencyFwList: this.convertLabelToText([res.data]), |
|
|
|
|
|
resiText:app.globalData.user.agencyName |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@ -693,17 +667,17 @@ export default { |
|
|
...node |
|
|
...node |
|
|
}; |
|
|
}; |
|
|
// 将 label 替换为 text |
|
|
// 将 label 替换为 text |
|
|
if (newNode.agencyName !== undefined) { |
|
|
if (newNode.label !== undefined) { |
|
|
newNode.text = newNode.agencyName; |
|
|
newNode.text = newNode.label; |
|
|
delete newNode.agencyName; |
|
|
delete newNode.label; |
|
|
} |
|
|
} |
|
|
if (newNode.subAgencyList && newNode.subAgencyList.length > 0) { |
|
|
if (newNode.children && newNode.children.length > 0) { |
|
|
newNode.children = newNode.subAgencyList |
|
|
newNode.children = newNode.children |
|
|
delete newNode.subAgencyList; |
|
|
delete newNode.children; |
|
|
} |
|
|
} |
|
|
if (newNode.agencyId) { |
|
|
if (newNode.id) { |
|
|
newNode.value = newNode.agencyId |
|
|
newNode.value = newNode.id |
|
|
delete newNode.agencyId; |
|
|
delete newNode.id; |
|
|
} |
|
|
} |
|
|
if (newNode.children && newNode.children.length > 0) { |
|
|
if (newNode.children && newNode.children.length > 0) { |
|
|
newNode.children = this.convertLabelToText(newNode.children); |
|
|
newNode.children = this.convertLabelToText(newNode.children); |
|
@ -730,100 +704,44 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onChangeJm(e) { |
|
|
|
|
|
console.log(e); |
|
|
|
|
|
const { value, selectedOptions } = e.detail; |
|
|
|
|
|
const level = selectedOptions[selectedOptions.length - 1].level; |
|
|
|
|
|
const orgId = selectedOptions[selectedOptions.length - 1].id; |
|
|
|
|
|
const cascaderName = selectedOptions.map((item) => item.label).join(''); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
searchOrgIdPath: orgId, |
|
|
|
|
|
cascaderName, |
|
|
|
|
|
tableData: [], |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
selectedOptions, |
|
|
|
|
|
loadLeve: selectedOptions.findIndex((item) => item.level === 'house') !== -1 ? 'house' : '' |
|
|
|
|
|
}); |
|
|
|
|
|
getNextTree({ |
|
|
|
|
|
level, |
|
|
|
|
|
id: value |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
|
|
|
const data = res.data.map((item) => { |
|
|
|
|
|
if (item.level != 'house') { |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: [] |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: null |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
const arr = this.getTreeFun(value, this.angencyJmList, data); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
angencyJmList: arr |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
const arr = this.getTreeFun(value, this.angencyJmList, null); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
angencyJmList: arr |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
this.getAllOrgCategoryCount(); |
|
|
|
|
|
this.getTableData(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onFinishJm(e) { |
|
|
|
|
|
this.setData({ |
|
|
changeHouseCascader(e) { |
|
|
pageNo: 1, |
|
|
const { value, level } = e; |
|
|
searchOrgIdPath: e.detail.selectedOptions[e.detail.selectedOptions.length - 1].id, |
|
|
const updateParamsAndFetchData = (orgId) => { |
|
|
cascaderName: e.detail.selectedOptions.map((item) => item.label).join(','), |
|
|
this.setData({ |
|
|
tableData: [] |
|
|
params: { |
|
|
}); |
|
|
...this.params, |
|
|
this.getAllOrgCategoryCount(); |
|
|
agencyId: app.globalData.user.agencyId, |
|
|
}, |
|
|
orgId, |
|
|
|
|
|
}, |
|
|
|
|
|
'params1.searchOrgIdPath': orgId |
|
|
|
|
|
}); |
|
|
|
|
|
this.getTableFwData(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
onChangeFw(e) { |
|
|
if (level === 'unit') { |
|
|
const { value, tabIndex, selectedOptions } = e.detail; |
|
|
this.receiveDataFw = null; |
|
|
if (tabIndex > 0 && selectedOptions[selectedOptions.length - 1].level != 'unit') { |
|
|
updateParamsAndFetchData(value); |
|
|
const level = selectedOptions[selectedOptions.length - 1].level; |
|
|
} else { |
|
|
getNextTree({ |
|
|
getNextTree({ level, id: value }).then((res) => { |
|
|
level, |
|
|
|
|
|
id: value |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
if (res.data.length > 0) { |
|
|
const data = res.data.map((item) => { |
|
|
this.receiveDataFw = this.convertLabelToText(res.data); |
|
|
if (item.level != 'unit') { |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: [] |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: null |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
const arr = this.getTreeFun(value, this.angencyFwList, data); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
angencyFwList: arr |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
const arr = this.getTreeFun(value, this.angencyFwList, null); |
|
|
this.receiveDataFw = null; |
|
|
this.setData({ |
|
|
updateParamsAndFetchData(value); |
|
|
angencyFwList: arr |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handelClickSearchType(e) { |
|
|
handelClickSearchType(e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
selectVale: e.currentTarget.dataset.type |
|
|
selectVale: e.currentTarget.dataset.type, |
|
|
|
|
|
receiveData:null, |
|
|
|
|
|
houseText:null, |
|
|
|
|
|
tempList:[] |
|
|
}); |
|
|
}); |
|
|
if (e.currentTarget.dataset.type === 'resi') { |
|
|
if (e.currentTarget.dataset.type === 'resi') { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|