Browse Source

更换居民分类统计列表接口

v1.1
战立标 2 years ago
parent
commit
42b85fac36
  1. 82
      src/views/dataBoard/renfang/resi/class.vue

82
src/views/dataBoard/renfang/resi/class.vue

@ -1,16 +1,17 @@
<template> <template>
<div class="g-pgi"> <div class="g-pgi">
<!-- 组织路由 --> <!-- 组织路由 -->
<cpt-bread :separator="'/'" @tap="handleClickBreadItem" :breadList="breadList"></cpt-bread> <cpt-bread :breadList="breadList" :separator="'/'" @tap="handleClickBreadItem"></cpt-bread>
<div class="m-title"> <div class="m-title">
<img class="title_img" src="@/assets/images/index/list-logo.png" alt /> <img alt class="title_img" src="@/assets/images/index/list-logo.png"/>
<div class="tip_title">{{ tableTitle }}</div> <div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div> <div class="title_line"></div>
<div class="second-select" v-if="type_id == 'special_popu'"> <div v-if="type_id == 'special_popu'" class="second-select">
<el-select v-model="subclassId" :popper-append-to-body="false" placeholder="请选择"> <el-select v-model="subclassId" :popper-append-to-body="false" placeholder="请选择">
<el-option v-for="item in subclassList" :key="item.value" :label="item.label" :value="item.value" @click.native="handleChangeDate(item.value)"></el-option> <el-option v-for="item in subclassList" :key="item.value" :label="item.label" :value="item.value"
@click.native="handleChangeDate(item.value)"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -18,17 +19,18 @@
<div class="g-listbox"> <div class="g-listbox">
<cpt-tb <cpt-tb
:col-list="colList" :col-list="colList"
:loading="loading"
:header="header" :header="header"
:list="list" :list="list"
:loading="loading"
:total="total" :total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange" @handlePageNoChange="handlePageNoChange"
@handleSizeChange="handleSizeChange"
@operate="showInfo" @operate="showInfo"
></cpt-tb> ></cpt-tb>
</div> </div>
<resi-details @close="displayedResiId = ''" :resi-id="displayedResiId" :popupShow="popupShow" v-if="displayedResiId" /> <resi-details v-if="displayedResiId" :popupShow="popupShow" :resi-id="displayedResiId"
@close="displayedResiId = ''"/>
</div> </div>
</template> </template>
@ -36,8 +38,9 @@
import cptTb from '@/views/dataBoard/cpts/tb'; import cptTb from '@/views/dataBoard/cpts/tb';
import cptBread from '@/views/dataBoard/renfang/cpts/bread'; import cptBread from '@/views/dataBoard/renfang/cpts/bread';
import resiDetails from '@/views/dataBoard/cpts/resi-details'; import resiDetails from '@/views/dataBoard/cpts/resi-details';
import { requestPostBi } from '@/js/dai/request-bipass'; // import { requestPostBi } from '@/js/dai/request-bipass';
import getQueryPara from 'dai-js/modules/getQueryPara'; import getQueryPara from 'dai-js/modules/getQueryPara';
import {requestPost} from "@/js/dai/request";
export default { export default {
name: 'resi-list', name: 'resi-list',
@ -138,7 +141,7 @@ export default {
this.tableTitle = type_name + '居民列表'; this.tableTitle = type_name + '居民列表';
this.pageNo = 1; this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); // this.getCount();
if (this.type_id == 'special_popu') { if (this.type_id == 'special_popu') {
this.getSubclass(); this.getSubclass();
} }
@ -166,11 +169,12 @@ export default {
} }
}, },
handleSearch() {}, handleSearch() {
},
showInfo(index) { showInfo(index) {
let item = this.srcTableData[index]; let item = this.srcTableData[index];
this.displayedResiId = item.user_id; this.displayedResiId = item.resiId;
this.popupShow = true; this.popupShow = true;
}, },
@ -222,9 +226,14 @@ export default {
async getList() { async getList() {
const {org_id, type_id, subclassId, pageNo, pageSize} = this; const {org_id, type_id, subclassId, pageNo, pageSize} = this;
this.loading = true; this.loading = true;
let url = ''; let url = '/actual/base/residentBaseInfo/page';
let queryParam = {}; let queryParam = {
if (this.pageType == 'normal') { org_id,
categoryKey: subclassId || type_id,
pageNo,
pageSize
};
/* if (this.pageType == 'normal') {
url = 'resident_class_list'; url = 'resident_class_list';
queryParam = { queryParam = {
org_id, org_id,
@ -240,54 +249,31 @@ export default {
page_num: pageNo, page_num: pageNo,
page_size: pageSize page_size: pageSize
}; };
} }*/
const { data, code, msg } = await requestPostBi( const {data, code, msg} = await requestPost(
url, url,
{
queryParam queryParam
},
{
// mockId: 60069169,
}
); );
this.loading = false; this.loading = false;
if (code === 0) { if (code === 0) {
this.srcTableData = data; this.srcTableData = data.list;
// this.total = data.total; this.total = data.total;
if (this.pageType == 'normal') { this.list = data.list.map((item, index) => {
this.list = data.map((item, index) => {
return [
index + 1,
item.user_name ? item.user_name : '--',
item.grid ? item.grid : '--',
item.house ? item.house : '--',
item.telephone ? item.telephone : '--',
item.idcard ? item.idcard : '--',
item.gender ? item.gender : '--',
item.birthday ? item.birthday : '--',
{ type: 'operate', list: ['查看'] }
];
});
} else {
this.list = data.map((item, index) => {
return [ return [
index + 1, index + 1,
item.name ? item.name : '--', item.name ? item.name : '--',
item.grid ? item.grid : '--', item.gridName ? item.gridName : '--',
item.room ? item.room : '--', item.homeName ? item.homeName : '--',
item.telephone ? item.telephone : '--', item.mobile ? item.mobile : '--',
item.idcard ? item.idcard : '--', item.idNum ? item.idNum : '--',
item.gender ? item.gender : '--', item.gender == 1 ? '男' : item.gender == '2' ? '女' : '--',
item.birthday ? item.birthday : '--', item.birthday ? item.birthday : '--',
{type: 'operate', list: ['查看']} {type: 'operate', list: ['查看']}
]; ];
}); });
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -341,4 +327,4 @@ export default {
}; };
</script> </script>
<style lang="scss" src="@/assets/scss/dataBoard/listBox.scss" scoped></style> <style lang="scss" scoped src="@/assets/scss/dataBoard/listBox.scss"></style>

Loading…
Cancel
Save