Browse Source

社区查询房屋列表字段修改,导入按钮加loading

feature
mk 1 year ago
parent
commit
e88aff7524
  1. 128
      src/views/modules/shequ/chaxun.vue

128
src/views/modules/shequ/chaxun.vue

@ -75,6 +75,7 @@
<div class="header_btn"> <div class="header_btn">
<el-button <el-button
@click="handleExport" @click="handleExport"
:loading="btnLoading"
type="primary" type="primary"
size="small" size="small"
class="diy-button--white el-button--default" class="diy-button--white el-button--default"
@ -122,91 +123,8 @@
label="居民分类" label="居民分类"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> prop="categoryNameStr"
<template slot-scope="scope"> > </el-table-column>
<template v-if="scope.row.categoryInfo">
{{
scope.row.categoryInfo.bereavedPersonFlag == 1
? "特扶人员 "
: ""
}}
{{
scope.row.categoryInfo.chronicDiseaseFlag == 1
? "慢病 "
: ""
}}
{{
scope.row.categoryInfo.dementedFlag == 1 ? "失智老人 " : ""
}}
{{
scope.row.categoryInfo.disabilityFlag == 1 ? "残疾 " : ""
}}
{{
scope.row.categoryInfo.disabledFlag == 1 ? "失能老人 " : ""
}}
{{
scope.row.categoryInfo.emptyNesterFlag == 1
? "空巢老人 "
: ""
}}
{{
scope.row.categoryInfo.ensureHouseFlag == 1
? "保障房人员 "
: ""
}}
{{
scope.row.categoryInfo.fertileWomanFlag == 1
? "育龄妇女 "
: ""
}}
{{
scope.row.categoryInfo.floatingFlag == 1 ? "流动人口 " : ""
}}
{{
scope.row.categoryInfo.liveAloneFlag == 1 ? "独居老人 " : ""
}}
{{
scope.row.categoryInfo.oldPeopleFlag == 1 ? "老年人 " : ""
}}
{{ scope.row.categoryInfo.partyFlag == 1 ? "党员 " : "" }}
{{
scope.row.categoryInfo.petitionOfficerFlag == 1
? "信访人员 "
: ""
}}
{{
scope.row.categoryInfo.seriousIllnessFlag == 1
? "大病 "
: ""
}}
{{
scope.row.categoryInfo.specialCrowdFlag == 1
? "特殊人群 "
: ""
}}
{{
scope.row.categoryInfo.subsistenceAllowanceFlag == 1
? "低保人员 "
: ""
}}
{{ scope.row.categoryInfo.tenantFlag == 1 ? "租户 " : "" }}
{{
scope.row.categoryInfo.unemployedFlag == 1 ? "失业 " : ""
}}
{{
scope.row.categoryInfo.unitedFrontFlag == 1
? "统战人员 "
: ""
}}
{{
scope.row.categoryInfo.veteranFlag == 1 ? "退役军人 " : ""
}}
{{
scope.row.categoryInfo.volunteerFlag == 1 ? "志愿者 " : ""
}}
</template>
</template>
</el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"
align="center" align="center"
@ -276,10 +194,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="buildingUnitName" label="单元号"> <el-table-column prop="buildingUnitName" label="单元号">
</el-table-column> </el-table-column>
<el-table-column prop="doorName" label="门牌号"> </el-table-column> <el-table-column prop="houseName" label="门牌号"> </el-table-column>
<el-table-column prop="houseType" label="类型"> </el-table-column> <el-table-column prop="houseTypeName" label="类型"> </el-table-column>
<el-table-column prop="purpose" label="用途"> </el-table-column> <el-table-column prop="purposeName" label="用途"> </el-table-column>
<el-table-column prop="rentFlag" label="房屋状态"> <el-table-column prop="rentFlagName" label="房屋状态">
</el-table-column> </el-table-column>
<el-table-column prop="ownerName" label="房主姓名"> <el-table-column prop="ownerName" label="房主姓名">
</el-table-column> </el-table-column>
@ -383,6 +301,7 @@ export default {
data() { data() {
return { return {
btnLoading:false,
searchStatus: "ini", //ing over searchStatus: "ini", //ing over
searchData: { searchData: {
type: "fangwu", type: "fangwu",
@ -515,6 +434,7 @@ export default {
}, },
methods: { methods: {
async handleExport() { async handleExport() {
this.btnLoading = true;
const url = this.searchData.type === 'fangwu'?"/actual/base/communityHouse/houseSearchExport":'/actual/base/residentBaseInfo/residentSearchExport'; const url = this.searchData.type === 'fangwu'?"/actual/base/communityHouse/houseSearchExport":'/actual/base/residentBaseInfo/residentSearchExport';
axios({ axios({
url: window.SITE_CONFIG["apiURL"] + url, url: window.SITE_CONFIG["apiURL"] + url,
@ -541,8 +461,10 @@ export default {
aLink.click(); aLink.click();
document.body.removeChild(aLink); // document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob window.URL.revokeObjectURL(url); //blob
this.btnLoading = false;
}) })
.catch((err) => { .catch((err) => {
this.btnLoading = false;
return this.$message.error("网络错误"); return this.$message.error("网络错误");
}); });
}, },
@ -764,34 +686,8 @@ export default {
}); });
this.searchFangwu.loading = false; this.searchFangwu.loading = false;
if (code === 0) { if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.searchFangwu.total = data.total || 0; this.searchFangwu.total = data.total || 0;
this.searchFangwu.list = data.list this.searchFangwu.list = data.list;
? data.list.map((item) => {
const { houseType, rentFlag, purpose } = item;
item.houseType = {
1: "楼房",
2: "平房",
3: "别墅",
}[houseType];
item.rentFlag = {
0: "自住",
1: "出租",
2: "闲置",
3: "未售出",
}[rentFlag];
item.purpose = {
1: "住宅",
2: "商业",
3: "办公",
4: "工业",
5: "存储",
6: "商住混用",
7: "其它",
}[purpose];
return item;
})
: [];
} else { } else {
} }
this.getRulesList(); this.getRulesList();

Loading…
Cancel
Save