|
@ -7,9 +7,7 @@ |
|
|
<image src="/static/images/work2/Header.png" class="back" @tap="back" mode="" /> |
|
|
<image src="/static/images/work2/Header.png" class="back" @tap="back" mode="" /> |
|
|
<text lines="1" class="header_text_1" :style="' top: ' + statusHeight + 'px;width: 50rpx;height: 50rpx;'">{{ agencyName }}</text> |
|
|
<text lines="1" class="header_text_1" :style="' top: ' + statusHeight + 'px;width: 50rpx;height: 50rpx;'">{{ agencyName }}</text> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <view class="box_15" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> |
|
|
|
|
|
<text lines="1" class="text_1" style=" top: {{statusHeight}}px;width: 50rpx;height: 50rpx;">{{agencyName}}</text> |
|
|
|
|
|
</view> --> |
|
|
|
|
|
<view class="text-wrapper_30"> |
|
|
<view class="text-wrapper_30"> |
|
|
<view @tap="handelClickSearchType" data-type="resi"> |
|
|
<view @tap="handelClickSearchType" data-type="resi"> |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'resi' ? 'font_bold' : '')">查居民</text> |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'resi' ? 'font_bold' : '')">查居民</text> |
|
@ -19,7 +17,7 @@ |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'house' ? 'font_bold' : '')">查房屋</text> |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'house' ? 'font_bold' : '')">查房屋</text> |
|
|
<image src="/static/images/work/select.png" mode="" v-if="selectVale == 'house'" /> |
|
|
<image src="/static/images/work/select.png" mode="" v-if="selectVale == 'house'" /> |
|
|
</view> |
|
|
</view> |
|
|
<view> |
|
|
<view @tap="handelClickSearchType" data-type="car"> |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'car' ? 'font_bold' : '')">查车辆</text> |
|
|
<text lines="1" :class="'text_3 ' + (selectVale === 'car' ? 'font_bold' : '')">查车辆</text> |
|
|
<image src="/static/images/work/select.png" mode="" v-if="selectVale == 'car'" /> |
|
|
<image src="/static/images/work/select.png" mode="" v-if="selectVale == 'car'" /> |
|
|
</view> |
|
|
</view> |
|
@ -28,7 +26,7 @@ |
|
|
<image src="/static/images/work/search.png" mode="" class="search_img" /> |
|
|
<image src="/static/images/work/search.png" mode="" class="search_img" /> |
|
|
<input |
|
|
<input |
|
|
type="text" |
|
|
type="text" |
|
|
:placeholder="selectVale === 'resi' ? '姓名/手机/身份证' : '小区/楼栋/单元'" |
|
|
:placeholder="selectVale === 'resi' ? '姓名/手机/身份证' :selectVale === 'house'? '小区/楼栋/单元':'车牌号/车主姓名/手机号'" |
|
|
@input="handelBlurKeyWord" |
|
|
@input="handelBlurKeyWord" |
|
|
@blur="handelBlurKeyWord" |
|
|
@blur="handelBlurKeyWord" |
|
|
:value="keyWord" |
|
|
:value="keyWord" |
|
@ -54,11 +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"> |
|
|
<text lines="1" class="text_4">{{ cascaderName }}</text> |
|
|
<jia-cascader :itemList="angencyList" @completeChange="completeGrid" @inputChange="changeResiCascader" :border="false" :clearIcon="false"></jia-cascader> |
|
|
<view class="image-text_9"> |
|
|
|
|
|
<image src="/static/images/swapHorizontal.png" class="image_8"></image> |
|
|
|
|
|
<text lines="1" class="text_5" @tap="handelClickShowTree">切换</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="box_17"> |
|
|
<view class="box_17"> |
|
|
<view class="tabs"> |
|
|
<view class="tabs"> |
|
@ -300,31 +294,53 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view v-if="selectVale === 'house' && selectedOptions" @tap="toAddHouse" class="btoBtn">新增房屋</view> |
|
|
<view v-if="selectVale === 'house' && selectedOptions" @tap="toAddHouse" class="btoBtn">新增房屋</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="group_2" v-if="selectVale === 'car'" style="height: calc(100vh - 269px);"> |
|
|
|
|
|
<view class="section_2"> |
|
|
|
|
|
<view class="box_16"> |
|
|
|
|
|
<text lines="1" class="text_4">{{ cascaderName }}</text> |
|
|
|
|
|
<view class="image-text_9"> |
|
|
|
|
|
<image src="/static/images/swapHorizontal.png" class="image_8"></image> |
|
|
|
|
|
<text lines="1" class="text_5" @tap="handelClickShowTree">切换</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<scroll-view class="scroll" style="height: calc(100vh - 335px);" :scroll-y="true" :lower-threshold="lowerThreshold" @scrolltolower="onScrollToLower"> |
|
|
|
|
|
<view class="form_item" :wx:key="index" :data-resiId="item.resiId" v-for="(item, index) in carList" :key="index"> |
|
|
|
|
|
<view class="updata1"> |
|
|
|
|
|
<view class="box_18" style="width: auto;"> |
|
|
|
|
|
<view style="display: flex; align-items: center; max-width: 390rpx; overflow: hidden"> |
|
|
|
|
|
<view style="display: flex"> |
|
|
|
|
|
<text lines="1" class="text_16">{{ item.carNumber }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="text-wrapper_9" style="position: none;width: auto;"> |
|
|
|
|
|
<view style="color: #afafaf;font-size:14px ;"><text v-if="item.carColor">{{ item.carColor }}·</text>{{item.carBrand}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="text-wrapper_13"> |
|
|
|
|
|
<text lines="1" class="text_27">车主</text> |
|
|
|
|
|
<text lines="1" class="text_28">:</text> |
|
|
|
|
|
<text lines="1" class="text_29">{{ item.carOwnerName }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="text-wrapper_12"> |
|
|
|
|
|
<text lines="1" class="text_25">电话:</text> |
|
|
|
|
|
<text lines="1" class="text_26">{{ item.carOwnerMobile || '--' }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="text-wrapper_14"> |
|
|
|
|
|
<text lines="1" class="text_30">地址:</text> |
|
|
|
|
|
<text lines="1" class="text_31">{{ item.orgNamePath || '' }}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- <load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}"></load-more> --> |
|
|
|
|
|
<!-- <no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data> --> |
|
|
|
|
|
<view class="loadVisible">{{ loadMoreType == 'more' ? '加载中...' : '暂无数据' }}</view> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
<custom-tab-bar></custom-tab-bar> |
|
|
<custom-tab-bar></custom-tab-bar> |
|
|
<van-popup :show="showAngenCascader" round position="bottom"> |
|
|
|
|
|
<van-cascader |
|
|
|
|
|
:field-names="fieldName" |
|
|
|
|
|
v-if="showAngenCascader" |
|
|
|
|
|
:value="searchOrgIdPath" |
|
|
|
|
|
title="请选择" |
|
|
|
|
|
:options="angencyJmList" |
|
|
|
|
|
@close="onClose" |
|
|
|
|
|
@change="onChangeJm" |
|
|
|
|
|
@finish="onFinishJm" |
|
|
|
|
|
/> |
|
|
|
|
|
</van-popup> |
|
|
|
|
|
<van-popup :show="showFw" round position="bottom"> |
|
|
|
|
|
<van-cascader |
|
|
|
|
|
v-if="showFw" |
|
|
|
|
|
:field-names="fieldName" |
|
|
|
|
|
:value="cascaderFwValue" |
|
|
|
|
|
title="请选择所在地区" |
|
|
|
|
|
:options="angencyFwList" |
|
|
|
|
|
@close="onCloseFw" |
|
|
|
|
|
@change="onChangeFw" |
|
|
|
|
|
@finish="onFinishFw" |
|
|
|
|
|
/> |
|
|
|
|
|
</van-popup> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -333,7 +349,7 @@ import customTabBar from '../../components/custom-tab-bar/index.vue'; |
|
|
import loadMore from '../../components/loadMore/loadMore'; |
|
|
import loadMore from '../../components/loadMore/loadMore'; |
|
|
import noData from '../../components/noData/nodata'; |
|
|
import noData from '../../components/noData/nodata'; |
|
|
const app = getApp(); |
|
|
const app = getApp(); |
|
|
import api, { getAllOrgCategoryCount, getResidentBaseInfo, getTopTree, getNextTree, houseSearch, allOrgHouseInfo, getCommunityHouse } from '../../utils/api'; |
|
|
import api, { getResidentBaseInfo, getNextTree, houseSearch, allOrgHouseInfo, getCommunityHouse } from '../../utils/api'; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
customTabBar, |
|
|
customTabBar, |
|
@ -381,9 +397,6 @@ export default { |
|
|
//组织树 |
|
|
//组织树 |
|
|
angencyFwList: [], |
|
|
angencyFwList: [], |
|
|
|
|
|
|
|
|
//房屋组织树 |
|
|
|
|
|
showAngenCascader: false, |
|
|
|
|
|
|
|
|
|
|
|
agencyName: '', |
|
|
agencyName: '', |
|
|
|
|
|
|
|
|
fieldName: { |
|
|
fieldName: { |
|
@ -393,7 +406,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
cascaderNameFw: null, |
|
|
cascaderNameFw: null, |
|
|
showFw: false, |
|
|
|
|
|
|
|
|
|
|
|
params: { |
|
|
params: { |
|
|
agencyId: '', |
|
|
agencyId: '', |
|
@ -448,7 +460,8 @@ export default { |
|
|
selectedOptions: '', |
|
|
selectedOptions: '', |
|
|
loadLeve: '', |
|
|
loadLeve: '', |
|
|
resiSearch: '', |
|
|
resiSearch: '', |
|
|
houseSearch: '' |
|
|
houseSearch: '', |
|
|
|
|
|
carList:[] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
@ -524,6 +537,59 @@ export default { |
|
|
*/ |
|
|
*/ |
|
|
onShareAppMessage() {}, |
|
|
onShareAppMessage() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
completeGrid(e) { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
async carInfoPage(){ |
|
|
|
|
|
try { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
loadMoreVisible: true, |
|
|
|
|
|
nodata: false, |
|
|
|
|
|
loadMoreType: 'more' |
|
|
|
|
|
}); |
|
|
|
|
|
let parm = { |
|
|
|
|
|
agencyId:'', |
|
|
|
|
|
orgIdPath:'',//所属组织 |
|
|
|
|
|
keyword:this.keyWord, |
|
|
|
|
|
pageSize:this.pageSize, |
|
|
|
|
|
pageNo:this.pageNo |
|
|
|
|
|
} |
|
|
|
|
|
let { data, code, msg } = await api.carInfoPage(parm); |
|
|
|
|
|
if (code == 0) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
loadMoreType: data.list.length === this.pageSize ? 'more' : 'none', |
|
|
|
|
|
carList: this.carList.concat(...data.list) |
|
|
|
|
|
}); |
|
|
|
|
|
if (this.carList.length == 0) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
loadMoreVisible: false, |
|
|
|
|
|
nodata: true |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
loadMoreVisible: false, |
|
|
|
|
|
nodata: true, |
|
|
|
|
|
loadMoreType: 'none' |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
loadMoreVisible: false, |
|
|
|
|
|
nodata: true, |
|
|
|
|
|
loadMoreType: 'none' |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
changeResiCascader(e){ |
|
|
|
|
|
this.searchOrgIdPath = e.value; |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
tableData: [] |
|
|
|
|
|
}); |
|
|
|
|
|
this.getTableData(); |
|
|
|
|
|
this.getAllOrgCategoryCount(); |
|
|
|
|
|
}, |
|
|
handelClickedit(e) { |
|
|
handelClickedit(e) { |
|
|
console.log(e); |
|
|
console.log(e); |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
@ -615,31 +681,37 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getTopTreeData() { |
|
|
getTopTreeData() { |
|
|
getTopTree().then((res) => { |
|
|
api.getAgencygridtree().then((res) => { |
|
|
const arr = res.data.children.map((item) => { |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
children: [] |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
angencyFwList: [ |
|
|
angencyList: this.convertLabelToText([res.data]) |
|
|
{ |
|
|
|
|
|
...res.data, |
|
|
|
|
|
children: arr |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
angencyJmList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
...res.data, |
|
|
|
|
|
children: arr |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}); |
|
|
}); |
|
|
console.log(this.angencyFwList); |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
convertLabelToText(tree) { |
|
|
|
|
|
return tree.map(node => { |
|
|
|
|
|
const newNode = { |
|
|
|
|
|
...node |
|
|
|
|
|
}; |
|
|
|
|
|
// 将 label 替换为 text |
|
|
|
|
|
if (newNode.agencyName !== undefined) { |
|
|
|
|
|
newNode.text = newNode.agencyName; |
|
|
|
|
|
delete newNode.agencyName; |
|
|
|
|
|
} |
|
|
|
|
|
if (newNode.subAgencyList && newNode.subAgencyList.length > 0) { |
|
|
|
|
|
newNode.children = newNode.subAgencyList |
|
|
|
|
|
delete newNode.subAgencyList; |
|
|
|
|
|
} |
|
|
|
|
|
if (newNode.agencyId) { |
|
|
|
|
|
newNode.value = newNode.agencyId |
|
|
|
|
|
delete newNode.agencyId; |
|
|
|
|
|
} |
|
|
|
|
|
if (newNode.children && newNode.children.length > 0) { |
|
|
|
|
|
newNode.children = this.convertLabelToText(newNode.children); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return newNode; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
getTreeFun(id, arr, data) { |
|
|
getTreeFun(id, arr, data) { |
|
|
return arr.map((item) => { |
|
|
return arr.map((item) => { |
|
|
if (id == item.id) { |
|
|
if (id == item.id) { |
|
@ -749,38 +821,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onCloseFw() { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showFw: false |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onFinishFw(e) { |
|
|
|
|
|
const { selectedOptions, value } = e.detail; |
|
|
|
|
|
const level = selectedOptions[selectedOptions.length - 1].level; |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
cascaderNameFw: e.detail.selectedOptions.map((item) => item.label).join(' '), |
|
|
|
|
|
showFw: false, |
|
|
|
|
|
cascaderFwValue: value, |
|
|
|
|
|
params: { |
|
|
|
|
|
...this.params, |
|
|
|
|
|
orgId: value, |
|
|
|
|
|
level: level == 'grid' ? 'grid' : 'agency', |
|
|
|
|
|
agencyId: app.globalData.user.agencyId |
|
|
|
|
|
}, |
|
|
|
|
|
params1: { |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
...this.params1, |
|
|
|
|
|
searchOrgIdPath: value, |
|
|
|
|
|
// orgId: value, |
|
|
|
|
|
level |
|
|
|
|
|
}, |
|
|
|
|
|
tableFwData: [], |
|
|
|
|
|
selectedOptions |
|
|
|
|
|
}); |
|
|
|
|
|
this.getTableFwData(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handelClickSearchType(e) { |
|
|
handelClickSearchType(e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
selectVale: e.currentTarget.dataset.type |
|
|
selectVale: e.currentTarget.dataset.type |
|
@ -798,21 +838,14 @@ export default { |
|
|
tableFwData: [] |
|
|
tableFwData: [] |
|
|
}); |
|
|
}); |
|
|
this.getUnitoption(this.angencyFwList); |
|
|
this.getUnitoption(this.angencyFwList); |
|
|
|
|
|
} else if (e.currentTarget.dataset.type === 'car') { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
carList: [] |
|
|
|
|
|
}); |
|
|
|
|
|
this.carInfoPage(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handelClickShowTree() { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showAngenCascader: true |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handelClickShowTreeFw() { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showFw: true |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async handelClickSearch() { |
|
|
async handelClickSearch() { |
|
|
if (this.selectVale === 'resi') { |
|
|
if (this.selectVale === 'resi') { |
|
|
this.setData({ |
|
|
this.setData({ |
|
@ -821,7 +854,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|
this.getAllOrgCategoryCount(); |
|
|
this.getAllOrgCategoryCount(); |
|
|
} else { |
|
|
} else if(this.selectVale === 'house'){ |
|
|
if (this.keyWord) { |
|
|
if (this.keyWord) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
houseListSearchFlag: true, |
|
|
houseListSearchFlag: true, |
|
@ -837,6 +870,12 @@ export default { |
|
|
tableFwData: [] |
|
|
tableFwData: [] |
|
|
}); |
|
|
}); |
|
|
this.getTableFwData(); |
|
|
this.getTableFwData(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
carList:[] |
|
|
|
|
|
}); |
|
|
|
|
|
this.carInfoPage() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -891,12 +930,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onClose() { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showAngenCascader: false |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onScrollToLower(e) { |
|
|
onScrollToLower(e) { |
|
|
if (this.loadMoreType === 'more') { |
|
|
if (this.loadMoreType === 'more') { |
|
|
this.setData({ |
|
|
this.setData({ |
|
@ -956,9 +990,6 @@ export default { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
console.log('CatchClause', err); |
|
|
|
|
|
console.log('CatchClause', err); |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
loadMoreVisible: false, |
|
|
loadMoreVisible: false, |
|
|
nodata: true, |
|
|
nodata: true, |
|
|