This commit is contained in:
shijingjing
2022-07-21 16:03:34 +08:00
parent 361cf2633b
commit a829cd36a4
2 changed files with 77 additions and 25 deletions

View File

@@ -4,16 +4,18 @@
<div class="search"><u-search placeholder="请输入姓名、身份证号" v-model="name" :show-action="false"></u-search></div>
<div class="select">
<div class="left">
<AiSelect v-model="declareReason" :list="areaList" @data="areaSelect">
<span v-if="!declareReason" style="color: #999;">地区筛选</span>
<span v-else>{{ $dict.getLabel('helpDeclarationReason', declareReason) }}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
</AiSelect>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" :name.sync="areaName" @select="areaSelect" selectRoot>
<div>
<span v-if="areaId" style="color:#333;fontSize: 14px;" class="areaName">{{ areaName }}</span>
<span v-else style="color: #999;fontSize: 14px;" class="areaName">所在地区</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;margin-top:18px" @select="areaSelect(e)"></u-icon>
</div>
</AiAreaPicker>
</div>
<div class="right">
<AiSelect v-model="declareReason" :list="typeList" @data="typeSelect">
<span v-if="!declareReason" style="color: #999;">户型类型</span>
<span v-else>{{ $dict.getLabel('helpDeclarationReason', declareReason) }}</span>
<AiSelect v-model="houseType" :list="typeList" @data="typeSelect">
<span v-if="!houseType" style="color: #999;">户型类型</span>
<span v-else>{{ $dict.getLabel('fpHouseType', houseType) }}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
</AiSelect>
</div>
@@ -32,6 +34,7 @@
{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
</div>
</div>
<AiEmpty v-if="!list.length" description="暂无数据"></AiEmpty>
</div>
@@ -39,6 +42,7 @@
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "AppHelpEffect",
appName: '帮扶成效',
@@ -52,11 +56,40 @@ export default {
houseType: 1,
provertyStatus: 0,
list: [],
areaId: '',
areaName: '',
houseType: '',
}
},
computed: {
...mapState(['user'])
},
methods: {
areaSelect() {},
typeSelect() {},
areaSelect(e) {
this.areaId =e
this.current = 1
this.list = []
this.$nextTick(() => {
this.getList()
})
},
onLoad() {
this.$dict.load('fpHouseType').then(() => {
this.typeList = this.$dict.getDict('fpHouseType').map((item) =>{
return {
label: item.dictName,
value: item.dictValue
}
})
this.typeList.unshift({ label: '全部类型', value: ''})
})
},
typeSelect(v) {
this.current = 1
this.list = []
this.houseType = v?.[0].value
this.getList()
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
@@ -65,7 +98,9 @@ export default {
params: {
current: this.current,
provertyStatus: this.provertyStatus,
name: this.name,
con: this.name,
area: this.areaId,
houseType: this.houseType
},
}).then((res) => {
if (res?.data) {
@@ -97,8 +132,9 @@ export default {
.select {
width: 100%;
display: flex;
height: 60px;
line-height: 60px;
height: 86px;
line-height: 86px;
text-align: center;
::v-deep .AiSelect .display {
justify-content: center;
@@ -106,7 +142,7 @@ export default {
.left,
.right {
width: 50%;
flex: 1;
}
}
.cardList {