Browse Source

居民分类更新设置

feature
李素 2 years ago
parent
commit
4caa20a6a3
  1. 316
      src/views/modules/base/community/community.vue
  2. 406
      src/views/modules/base/community/roomTable.vue
  3. 46
      src/views/modules/base/resi.vue
  4. 36
      src/views/modules/home/index.vue

316
src/views/modules/base/community/community.vue

@ -1,29 +1,14 @@
<template> <template>
<div class="g-main"> <div class="g-main">
<div :style="{ height: rowHeight }" <div :style="{ height: rowHeight }" class="div_tree">
class="div_tree"> <el-input placeholder="输入关键字进行过滤" v-model="filterText" @keydown.native.enter="handleChangeSerch()">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText"
@keydown.native.enter="handleChangeSerch()">
</el-input> </el-input>
<el-scrollbar :style="{ height: treeHeight }" <el-scrollbar :style="{ height: treeHeight }" class="scrollar">
class="scrollar"> <el-tree ref="ref_tree" v-loading="treeLoading" class="filter_tree" :data="treeData" :props="defaultProps"
<el-tree ref="ref_tree" :highlight-current="true" node-key="id" :expand-on-click-node="false" :filter-node-method="filterNode"
v-loading="treeLoading" @node-click="handleNodeClick" lazy :auto-expand-parent="true" :default-expanded-keys="autoOpenArr"
class="filter_tree" :load="lazyLoadTree">
:data="treeData" <span slot-scope="{ node, data }" class="custom-tree-node">
:props="defaultProps"
:highlight-current="true"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
@node-click="handleNodeClick"
lazy
:auto-expand-parent="true"
:default-expanded-keys="autoOpenArr"
:load="lazyLoadTree">
<span slot-scope="{ node, data }"
class="custom-tree-node">
<!-- <img <!-- <img
v-if="showIcons(data)" v-if="showIcons(data)"
src="@/assets/images/index/abnormal.png" src="@/assets/images/index/abnormal.png"
@ -42,107 +27,57 @@
<span style="color: red">{{ data.showNum }}</span> <span style="color: red">{{ data.showNum }}</span>
<span>{{ ")" }}</span> <span>{{ ")" }}</span>
</span> --> </span> -->
<el-tooltip <el-tooltip :content="tooltipTitle" :disabled="isShowTooltip" placement="top" effect="dark">
:content="tooltipTitle" <span class="over-ellipsis" @mouseover="mouseOverNode($event)">
:disabled="isShowTooltip" {{ node.label }}
placement="top" </span>
effect="dark" </el-tooltip>
>
<span class="over-ellipsis" @mouseover="mouseOverNode($event)">
{{ node.label }}
</span>
</el-tooltip>
</span> </span>
</el-tree> </el-tree>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div class="div_left"> <div class="div_left">
<div class="m-search" <div class="m-search" style="flex-direction: column">
style="flex-direction: column">
<section :class="boxHeight ? 'm-form-box-height' : 'm-form-box-height-auto'"> <section :class="boxHeight ? 'm-form-box-height' : 'm-form-box-height-auto'">
<el-form :inline="true" <el-form :inline="true" class="communityHeight" ref="ref_searchform" :label-width="'100px'">
class="communityHeight" <el-form-item label="房主姓名" prop="ownerName">
ref="ref_searchform" <el-input v-model="ownerName" class="u-item-width-normal" size="small" clearable placeholder="请输入内容">
:label-width="'100px'">
<el-form-item label="房主姓名"
prop="ownerName">
<el-input v-model="ownerName"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入内容">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" <el-form-item label="联系电话" prop="ownerPhone">
prop="ownerPhone"> <el-input v-model="ownerPhone" class="u-item-width-normal" size="small" clearable placeholder="请输入联系电话">
<el-input v-model="ownerPhone"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入联系电话">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="房屋状态" <el-form-item label="房屋状态" prop="rentFlag">
prop="rentFlag"> <el-select class="u-item-width-normal" v-model="rentFlag" placeholder="请选择" size="small" clearable>
<el-select class="u-item-width-normal" <el-option v-for="item in rentList" :key="item.value" :label="item.label" :value="item.value">
v-model="rentFlag"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in rentList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="房屋用途" <el-form-item label="房屋用途" prop="purpose">
prop="purpose"> <el-select v-model="purpose" class="u-item-width-normal" placeholder="请选择" size="small" clearable>
<el-select v-model="purpose" <el-option v-for="item in purposeArr" :key="item.dictValue" :label="item.dictName"
class="u-item-width-normal" :value="item.dictValue">
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in purposeArr"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="更新时间" <el-form-item label="更新时间" prop="updateStartDate">
prop="updateStartDate"> <el-date-picker v-model="updateStartDate" :picker-options="startPickerOptions"
<el-date-picker v-model="updateStartDate" class="u-item-width-daterange" size="small" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="startPickerOptions" value="yyyy-MM-dd" placeholder="开始时间">
class="u-item-width-daterange"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker> </el-date-picker>
<span class="u-data-tag"></span> <span class="u-data-tag"></span>
<el-date-picker v-model="updateEndDate" <el-date-picker v-model="updateEndDate" :picker-options="endPickerOptions"
:picker-options="endPickerOptions" class="u-item-width-daterange u-data-tag" size="small" type="datetime"
class="u-item-width-daterange u-data-tag" value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd" placeholder="结束时间">
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark"> <el-input v-model="remark" class="u-item-width-normal" size="small" clearable placeholder="请输入备注">
<el-input v-model="remark"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入备注">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -232,15 +167,9 @@
</el-form> </el-form>
</section> </section>
<el-row> <el-row>
<el-col :span="24" <el-col :span="24" align="right">
align="right"> <el-button style="margin-left: 10px" size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px" <el-button size="small" class="diy-button--white" @click="resetSearch">重置</el-button>
size="small"
type="primary"
@click="handleSearch">查询</el-button>
<el-button size="small"
class="diy-button--white"
@click="resetSearch">重置</el-button>
<!-- <el-button style="margin: 0 6px 0 10px" <!-- <el-button style="margin: 0 6px 0 10px"
size="small" size="small"
class="div-table-button--blue" class="div-table-button--blue"
@ -252,54 +181,24 @@
</div> </div>
<div class=""> <div class="">
<build-table v-if="selTreeObj.level === 'neighborHood' && !showRoomTable" <build-table v-if="selTreeObj.level === 'neighborHood' && !showRoomTable" ref="ref_neighTable"
ref="ref_neighTable" :staffAgencyId="staffAgencyId" :showImportBtn="showImportBtn" :ownerName="ownerName" :ownerPhone="ownerPhone"
:staffAgencyId="staffAgencyId" :rentFlag="rentFlag" :purpose="purpose" :remark="remark" :updateStartDate="updateStartDate"
:showImportBtn="showImportBtn" :updateEndDate="updateEndDate" :searchHeight="searchHeight" @toNextLevel="toNextLevel"
:ownerName="ownerName" @refreshTree="refreshTree"></build-table>
:ownerPhone="ownerPhone"
:rentFlag="rentFlag" <room-table v-if="showRoomTable || selTreeObj.level === 'building'" :staffAgencyId="staffAgencyId"
:purpose="purpose" :showImportBtn="showImportBtn" :ownerName="ownerName" :ownerPhone="ownerPhone" :rentFlag="rentFlag"
:remark="remark" :purpose="purpose" :neighborHoodId="neighborHoodId" :buildingId="buildingId" :buildingUnitId="buildingUnitId"
:updateStartDate="updateStartDate" :houseId="houseId" :remark="remark" :updateStartDate="updateStartDate" :updateEndDate="updateEndDate"
:updateEndDate="updateEndDate" ref="ref_buildingTable" @refreshTree="refreshTree"></room-table>
:searchHeight="searchHeight"
@toNextLevel="toNextLevel" <community-table v-if="selTreeObj.level !== 'building' &&
@refreshTree="refreshTree"></build-table> selTreeObj.level !== 'neighborHood' &&
!showRoomTable
<room-table v-if="showRoomTable || selTreeObj.level === 'building'" " @toNextLevel="toNextLevel" :staffAgencyId="staffAgencyId" :ownerName="ownerName" :ownerPhone="ownerPhone"
:staffAgencyId="staffAgencyId" :rentFlag="rentFlag" :purpose="purpose" :remark="remark" :updateStartDate="updateStartDate"
:showImportBtn="showImportBtn" :updateEndDate="updateEndDate" ref="ref_communityTable" @refreshTree="refreshTree"></community-table>
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:neighborHoodId="neighborHoodId"
:buildingId="buildingId"
:buildingUnitId="buildingUnitId"
:houseId="houseId"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-if="
selTreeObj.level !== 'building' &&
selTreeObj.level !== 'neighborHood' &&
!showRoomTable
"
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div> </div>
</div> </div>
</div> </div>
@ -317,7 +216,7 @@ import nextTick from "dai-js/tools/nextTick";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
let loading; // let loading; //
export default { export default {
data () { data() {
let endDisabledDate = (time) => { let endDisabledDate = (time) => {
//datareturn //datareturn
let nowData = Date.now(); let nowData = Date.now();
@ -441,8 +340,8 @@ export default {
treeIsOk: true,// treeIsOk: true,//
isShowTooltip:false, isShowTooltip: false,
tooltipTitle:null, tooltipTitle: null,
}; };
}, },
components: { components: {
@ -451,11 +350,8 @@ export default {
buildTable, buildTable,
roomTable, roomTable,
}, },
async mounted () { async mounted() {
// console.log("",this.$route.query.param1)
this.searchHeight = this.$refs.ref_searchform.offsetHeight; this.searchHeight = this.$refs.ref_searchform.offsetHeight;
this.treeLoading = true; this.treeLoading = true;
await this.loadOrgData(); await this.loadOrgData();
@ -471,20 +367,34 @@ export default {
}); });
} }
this.treeLoading = false; this.treeLoading = false;
if (this.$route.query.param1 === 'zizhuM') {
this.rentFlag = '0';
} else if (this.$route.query.param1 === 'chuzuM') {
this.rentFlag = '1';
} else if (this.$route.query.param1 === 'xianzhiM') {
this.rentFlag = '2';
}
if (this.rentFlag !== '') {
this.handleSearch()
// console.log("this.rentFlag", this.rentFlag)
}
}, },
computed: { computed: {
rowHeight () { rowHeight() {
return this.$store.state.inIframe return this.$store.state.inIframe
? this.clientHeight - 140 + this.iframeHeight + "px" ? this.clientHeight - 140 + this.iframeHeight + "px"
: this.clientHeight - 140 + "px"; : this.clientHeight - 140 + "px";
}, },
treeHeight () { treeHeight() {
return this.$store.state.inIframe return this.$store.state.inIframe
? this.clientHeight - 245 + this.iframeHeight + "px" ? this.clientHeight - 245 + this.iframeHeight + "px"
: this.clientHeight - 245 + "px"; : this.clientHeight - 245 + "px";
}, },
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
showIcons () { showIcons() {
return function (data) { return function (data) {
if (data.level == "building") { if (data.level == "building") {
let arr = data.showNum.split("/"); let arr = data.showNum.split("/");
@ -502,10 +412,10 @@ export default {
// filterText (val) { // filterText (val) {
// this.$refs.ref_tree.filter(val); // this.$refs.ref_tree.filter(val);
// }, // },
updateStartDate () { } updateStartDate() { }
}, },
methods: { methods: {
mouseOverNode(event){ mouseOverNode(event) {
var target = event.target; var target = event.target;
let textLength = target.clientWidth; let textLength = target.clientWidth;
let containerLength = target.scrollWidth; let containerLength = target.scrollWidth;
@ -517,7 +427,7 @@ export default {
this.isShowTooltip = true; this.isShowTooltip = true;
} }
}, },
handleChangeV (val) { handleChangeV(val) {
this.buildingId = ""; this.buildingId = "";
this.buildingUnitId = ""; this.buildingUnitId = "";
this.houseId = ""; this.houseId = "";
@ -526,17 +436,17 @@ export default {
// this.getHouseList(); // this.getHouseList();
}, },
handleChangeB (val) { handleChangeB(val) {
this.buildingUnitId = ""; this.buildingUnitId = "";
this.houseId = ""; this.houseId = "";
this.getUniList(); this.getUniList();
// this.getHouseList(); // this.getHouseList();
}, },
handleChangeD () { handleChangeD() {
this.houseId = ""; this.houseId = "";
this.getHouseList(); this.getHouseList();
}, },
async lazyLoadTree (node, resolve) { async lazyLoadTree(node, resolve) {
const url = `/actual/base/communityBuilding/tree/nextTreeNode?id=${node.data.id}&level=${node.data.level}`; const url = `/actual/base/communityBuilding/tree/nextTreeNode?id=${node.data.id}&level=${node.data.level}`;
const { data, code, msg } = await requestGet(url); const { data, code, msg } = await requestGet(url);
@ -552,7 +462,7 @@ export default {
} }
// } // }
}, },
async getValiheList () { async getValiheList() {
const { user } = this.$store.state; const { user } = this.$store.state;
if (!this.selGridId) { if (!this.selGridId) {
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId; this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId;
@ -577,7 +487,7 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async getBuildList () { async getBuildList() {
const url = "/actual/base/communityBuilding/buildingoption"; const url = "/actual/base/communityBuilding/buildingoption";
let params = { let params = {
quartersId: this.neighborHoodId, quartersId: this.neighborHoodId,
@ -594,7 +504,7 @@ export default {
} }
}, },
// //
async handleChangeSerch () { async handleChangeSerch() {
this.startLoading(); this.startLoading();
this.$refs.ref_tree.$data.store.lazy = !this.filterText; this.$refs.ref_tree.$data.store.lazy = !this.filterText;
if (this.filterText.length > 0 && this.filterText != "") { if (this.filterText.length > 0 && this.filterText != "") {
@ -620,7 +530,7 @@ export default {
} }
this.endLoading(); this.endLoading();
}, },
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -628,13 +538,13 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();
} }
}, },
async getUniList () { async getUniList() {
const url = "/actual/base/communityBuildingUnit/unitoption"; const url = "/actual/base/communityBuildingUnit/unitoption";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = { let params = {
@ -651,7 +561,7 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
getHouseList () { getHouseList() {
let params = { let params = {
buildingId: this.buildingId, buildingId: this.buildingId,
unitId: this.buildingUnitId, unitId: this.buildingUnitId,
@ -671,7 +581,7 @@ export default {
}); });
}, },
handleSearch () { handleSearch() {
console.log(this.selTreeObj) console.log(this.selTreeObj)
this.showRoomTable = true; this.showRoomTable = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -681,7 +591,7 @@ export default {
}, },
// //
resetSearch () { resetSearch() {
this.ownerName = ""; this.ownerName = "";
this.ownerPhone = ""; this.ownerPhone = "";
this.rentFlag = ""; this.rentFlag = "";
@ -702,7 +612,7 @@ export default {
}); });
}, },
async loadOpenNode () { async loadOpenNode() {
const url = "/gov/org/building/tree-ids"; const url = "/gov/org/building/tree-ids";
let params = {}; let params = {};
@ -714,7 +624,7 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async loadTree (isRefresh) { async loadTree(isRefresh) {
const url = "/actual/base/communityBuilding/tree/initTree"; const url = "/actual/base/communityBuilding/tree/initTree";
const { data, code, msg } = await requestGet(url); const { data, code, msg } = await requestGet(url);
if (code === 0) { if (code === 0) {
@ -738,7 +648,7 @@ export default {
} }
}, },
handleTreeData (treeData) { handleTreeData(treeData) {
for (let i in treeData) { for (let i in treeData) {
treeData[i].showIcon = false; treeData[i].showIcon = false;
if (treeData[i].level === "building") { if (treeData[i].level === "building") {
@ -758,7 +668,7 @@ export default {
}, },
// //
async loadOrgData () { async loadOrgData() {
const url = "/gov/org/agency/maporg"; const url = "/gov/org/agency/maporg";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg" // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {}; let params = {};
@ -775,7 +685,8 @@ export default {
} }
}, },
async handleNodeClick (obj) { async handleNodeClick(obj) {
if (!this.treeIsOk) { if (!this.treeIsOk) {
setTimeout(() => { setTimeout(() => {
this.handleNodeClick(obj); this.handleNodeClick(obj);
@ -842,7 +753,7 @@ export default {
}, },
// //
async refreshTree () { async refreshTree() {
this.treeLoading = true; this.treeLoading = true;
await this.loadTree(this.selTreeObj.id); await this.loadTree(this.selTreeObj.id);
this.$nextTick(() => { this.$nextTick(() => {
@ -853,7 +764,7 @@ export default {
}, },
// //
async toNextLevel (row, level) { async toNextLevel(row, level) {
this.autoOpenArr = []; this.autoOpenArr = [];
@ -914,7 +825,7 @@ export default {
}, },
// //
getTreeObj (obj) { getTreeObj(obj) {
if (!obj.latitude) { if (!obj.latitude) {
obj.latitude = this.centerPoint[0]; obj.latitude = this.centerPoint[0];
} }
@ -926,13 +837,13 @@ export default {
}, },
filterNode (value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -940,7 +851,7 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();
@ -959,23 +870,24 @@ export default {
.m-search ::v-deep .el-row { .m-search ::v-deep .el-row {
margin-right: 0; margin-right: 0;
} }
.g-main { .g-main {
display: flex; display: flex;
} }
.scrollar { .scrollar {
margin-top: 30px; margin-top: 30px;
/deep/
.el-tree--highlight-current /deep/ .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
.el-tree-node.is-current
> .el-tree-node__content {
background: #e6f0ff; background: #e6f0ff;
border-radius: 2px; border-radius: 2px;
} }
/deep/ .el-tree-node:focus > .el-tree-node__content { /deep/ .el-tree-node:focus>.el-tree-node__content {
color: #0056d6; color: #0056d6;
// background-color: #e6f0ff; // background-color: #e6f0ff;
} }
// /deep/ .el-tree-node__expand-icon { // /deep/ .el-tree-node__expand-icon {
// color: #0043c8; // color: #0043c8;
// border: 1px solid #e1ecff; // border: 1px solid #e1ecff;
@ -1036,12 +948,15 @@ export default {
0px 3px 6px -4px rgba(0, 0, 0, 0.12); 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
// border-radius: 5px; // border-radius: 5px;
overflow-y: hidden; overflow-y: hidden;
/deep/ .el-scrollbar__wrap { /deep/ .el-scrollbar__wrap {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
/deep/ .el-scrollbar__bar{
/deep/ .el-scrollbar__bar {
right: -2px; right: -2px;
} }
// //
/deep/ .el-input--medium .el-input__inner { /deep/ .el-input--medium .el-input__inner {
height: 32px; height: 32px;
@ -1050,6 +965,7 @@ export default {
} }
} }
.custom-tree-node { .custom-tree-node {
flex: 1; flex: 1;
display: flex; display: flex;
@ -1067,6 +983,7 @@ export default {
white-space: nowrap; white-space: nowrap;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
} }
.filter_tree { .filter_tree {
overflow-x: auto; overflow-x: auto;
// background-color: #f6f6f6; // background-color: #f6f6f6;
@ -1077,6 +994,7 @@ export default {
// flex: 1; // flex: 1;
width: calc(100% - 200px); width: calc(100% - 200px);
} }
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
padding: 0; padding: 0;
} }

406
src/views/modules/base/community/roomTable.vue

@ -3,130 +3,74 @@
<div class="u-table-btn2"> <div class="u-table-btn2">
<div class="u-table-btn2-left"> <div class="u-table-btn2-left">
<!-- v-show="btnAuths.ic_house_add" --> <!-- v-show="btnAuths.ic_house_add" -->
<el-button v-if="agencyObj.level === 'building' || source !== 'search'" <el-button v-if="agencyObj.level === 'building' || source !== 'search'" class="diy-button--blue"
class="diy-button--blue" icon="el-icon-plus" size="small" :disabled="addDisabled" @click="handleAdd">新增房屋</el-button>
icon="el-icon-plus"
size="small"
:disabled="addDisabled"
@click="handleAdd">新增房屋</el-button>
<div class="u-btn-upload" <div class="u-btn-upload" v-if="showImportBtn">
v-if="showImportBtn">
<el-popover popper-class="btn-popper" <el-popover popper-class="btn-popper" placement="bottom" width="20" trigger="hover">
placement="bottom"
width="20"
trigger="hover">
<div class="table-more-btn"> <div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" --> <!-- v-if="btnAuths.ic_house_import" -->
<el-upload ref="upload" <el-upload ref="upload" :multiple="false" style="text-align: center" :show-file-list="false"
:multiple="false" :before-upload="beforeUpload" action="" accept=".xls,.xlsx" :limit="1" :on-exceed="handleExceed"
style="text-align: center" :http-request="uploadFile">
:show-file-list="false" <el-button style="" size="small" type="text" class="diy-button--other">导入房屋数据</el-button>
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style=""
size="small"
type="text"
class="diy-button--other">导入房屋数据</el-button>
</el-upload> </el-upload>
</div> </div>
<el-button size="small" <el-button size="small" style="float:right" class="diy-button--white" slot="reference">导入<i
style="float:right" class="el-icon-arrow-down el-icon--right"></i></el-button>
class="diy-button--white"
slot="reference">导入<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover> </el-popover>
</div> </div>
<!-- v-if="btnAuths.ic_house_export" --> <!-- v-if="btnAuths.ic_house_export" -->
<el-button style="float: left; margin-left: 10px" <el-button style="float: left; margin-left: 10px" class="diy-button--white" size="small"
class="diy-button--white" @click="handleExport">导出</el-button>
size="small"
@click="handleExport">导出</el-button>
<!-- v-if="btnAuths.ic_house_batch_del" --> <!-- v-if="btnAuths.ic_house_batch_del" -->
<el-button style="float: left; margin-left: 10px" <el-button style="float: left; margin-left: 10px" class="diy-button--white" size="small"
class="diy-button--white" @click="deleteBatch">批量删除</el-button>
size="small"
@click="deleteBatch">批量删除</el-button>
</div> </div>
<div> <div>
<el-popover popper-class="btn-popper" <el-popover popper-class="btn-popper" placement="bottom" style="margin-left: 10px" width="20" trigger="hover">
placement="bottom"
style="margin-left: 10px"
width="20"
trigger="hover">
<div class="table-more-btn"> <div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" --> <!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" <el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
class="diy-button--other" @click="handleExportModule('community')">下载小区模板</el-button>
size="small"
type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
</div> </div>
<div class="table-more-btn"> <div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" --> <!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" <el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
class="diy-button--other" @click="handleExportModule('building')">下载楼栋模板</el-button>
size="small"
type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
</div> </div>
<div class="table-more-btn"> <div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" --> <!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" <el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
class="diy-button--other" @click="handleExportModule('room')">下载房屋模板</el-button>
size="small"
type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
</div> </div>
<!-- v-if="btnAuths.ic_house_export_yhyd" --> <!-- v-if="btnAuths.ic_house_export_yhyd" -->
<div class="table-more-btn"> <div class="table-more-btn">
<el-button style="" <el-button style="" class="diy-button--other" size="small" type="text" :disabled="yihuyidangDisabled"
class="diy-button--other" @click="handleExportYihuyidang()">导出一户一档</el-button>
size="small"
type="text"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div> </div>
<!-- btnAuths.ic_house_smart_import && --> <!-- btnAuths.ic_house_smart_import && -->
<div v-if="displayedBaobiaoBtn" <div v-if="displayedBaobiaoBtn" class="table-more-btn">
class="table-more-btn"> <el-button size="small" class="diy-button--other" type="text" @click="reportForm">智能填报</el-button>
<el-button size="small"
class="diy-button--other"
type="text"
@click="reportForm">智能填报</el-button>
</div> </div>
<el-button size="small" <el-button size="small" style="float:right" class="diy-button--white" slot="reference">更多<i
style="float:right" class="el-icon-arrow-down el-icon--right"></i></el-button>
class="diy-button--white"
slot="reference">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover> </el-popover>
</div> </div>
</div> </div>
<div class="m-table-item"> <div class="m-table-item">
<el-table ref="ref_table" <el-table ref="ref_table" :data="tableData" v-loading="tableLoading" @sort-change="handleSortOrderChange" border
:data="tableData" :height="tableHeight" style="width: 100%" @select-all="selectAll" @selection-change="selectionChange">
v-loading="tableLoading" <el-table-column type="selection" :selectable="checkSelect" width="55">
@sort-change="handleSortOrderChange"
border
:height="tableHeight"
style="width: 100%"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column> </el-table-column>
<!-- <el-table-column fixed="left" <!-- <el-table-column fixed="left"
width="70" width="70"
@ -137,183 +81,84 @@
:index="indexMethod"> :index="indexMethod">
</el-table-column> --> </el-table-column> -->
<el-table-column prop="houseNameShow" <el-table-column prop="houseNameShow" header-align="left" align="left" label="房屋名称" fixed="left"
header-align="left" min-width="160">
align="left"
label="房屋名称"
fixed="left"
min-width="160">
</el-table-column> </el-table-column>
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName" label="所属小区" header-align="left" align="left" min-width="150">
label="所属小区"
header-align="left"
align="left"
min-width="150">
</el-table-column> </el-table-column>
<el-table-column prop="buildingName" <el-table-column prop="buildingName" label="所属楼栋" header-align="left" align="left" width="90">
label="所属楼栋"
header-align="left"
align="left"
width="90">
</el-table-column> </el-table-column>
<el-table-column prop="unitNum" <el-table-column prop="unitNum" label="单元号" header-align="left" align="left" width="80">
label="单元号"
header-align="left"
align="left"
width="80">
</el-table-column> </el-table-column>
<el-table-column prop="doorName" <el-table-column prop="doorName" label="门牌号" header-align="left" align="left" width="80">
label="门牌号"
header-align="left"
align="left"
width="80">
</el-table-column> </el-table-column>
<el-table-column prop="houseType" <el-table-column prop="houseType" label="类型" header-align="left" align="left" width="70">
label="类型"
header-align="left"
align="left"
width="70">
</el-table-column> </el-table-column>
<el-table-column prop="purpose" <el-table-column prop="purpose" label="用途" header-align="left" align="left" width="70">
label="用途"
header-align="left"
align="left"
width="70">
</el-table-column> </el-table-column>
<el-table-column prop="rentFlag" <el-table-column prop="rentFlag" label="房屋状态" header-align="left" align="left" width="90">
label="房屋状态"
header-align="left"
align="left"
width="90">
</el-table-column> </el-table-column>
<el-table-column prop="ownerName" <el-table-column prop="ownerName" label="房主姓名" header-align="left" align="left" width="90">
label="房主姓名"
header-align="left"
align="left"
width="90">
</el-table-column> </el-table-column>
<el-table-column prop="ownerPhone" <el-table-column prop="ownerPhone" label="联系方式" header-align="left" align="left" width="110">
label="联系方式"
header-align="left"
align="left"
width="110">
</el-table-column> </el-table-column>
<el-table-column prop="ownerIdCard" <el-table-column prop="ownerIdCard" label="证件号" header-align="left" align="left" width="170">
label="证件号"
header-align="left"
align="left"
width="170">
</el-table-column> </el-table-column>
<el-table-column prop="remark" <el-table-column prop="remark" label="备注" header-align="left" align="left" width="170">
label="备注"
header-align="left"
align="left"
width="170">
</el-table-column> </el-table-column>
<el-table-column prop="sort" <el-table-column prop="sort" sortable="custom" min-width="100" header-align="left" align="left" label="排序">
sortable="custom"
min-width="100"
header-align="left"
align="left"
label="排序">
<template slot-scope="scope"> <template slot-scope="scope">
<div @click="handleEditSort(scope.row)"> <div @click="handleEditSort(scope.row)">
<span v-if="!scope.row.isChange">{{ scope.row.sort }}</span> <span v-if="!scope.row.isChange">{{ scope.row.sort }}</span>
<!-- :precision="2" --> <!-- :precision="2" -->
<el-input-number v-else <el-input-number v-else @change="handleChangeSort(scope.row)" v-model="scope.row.sort"
@change="handleChangeSort(scope.row)" class="item_width_4" size="small" :min="0" :max="9999" label="描述文字"></el-input-number>
v-model="scope.row.sort"
class="item_width_4"
size="small"
:min="0"
:max="9999"
label="描述文字"></el-input-number>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
fixed="right"
width="220"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- v-if="btnAuths.ic_house_view" --> <!-- v-if="btnAuths.ic_house_view" -->
<el-button type="text" <el-button type="text" class="div-table-button--blue" size="small"
class="div-table-button--blue" @click="handleDetail(scope.row)">查看</el-button>
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<!-- btnAuths.ic_house_update && --> <!-- btnAuths.ic_house_update && -->
<el-button type="text" <el-button type="text" class="div-table-button--blue" size="small"
class="div-table-button--blue" @click="handleEdit(scope.row)">编辑</el-button>
size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<!-- btnAuths.ic_house_del && --> <!-- btnAuths.ic_house_del && -->
<el-button type="text" <el-button type="text" class="div-table-button--blue" size="small"
class="div-table-button--blue" @click="handleDelete(scope.row)">删除</el-button>
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div> <div>
<el-pagination @size-change="handleSizeChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
@current-change="handleCurrentChange" :page-sizes="[20, 50, 100, 200]" :page-size="pageSize" layout="sizes, prev, pager, next, total"
:current-page.sync="pageNo" :total="total">
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" <el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="formTitle"
:close-on-click-modal="false" width="670px" top="5vh" class="dialog-h" @closed="diaClose">
:close-on-press-escape="false" <room-form ref="ref_form" @dialogCancle="addFormCancle" @dialogOk="addFormOk"></room-form>
:title="formTitle"
width="670px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<room-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></room-form>
</el-dialog> </el-dialog>
<!-- 详情弹出框 --> <!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow" <el-dialog :visible.sync="detailShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="'查看房屋'"
:close-on-click-modal="false" width="820px" top="5vh" class="dialog-h" @closed="detailFormCancle">
:close-on-press-escape="false"
:title="'查看房屋'"
width="820px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">
<!-- :view_real_data="btnAuths.ic_house_view_real_data" --> <!-- :view_real_data="btnAuths.ic_house_view_real_data" -->
<room-detail ref="ref_form_detail" <room-detail ref="ref_form_detail" @diaDetailClose="detailFormCancle"></room-detail>
@diaDetailClose="detailFormCancle"></room-detail>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="diyDialog" <el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false" width="1150px"
:close-on-click-modal="false" title="导出模板" top="5vh" class="dialog-h">
:close-on-press-escape="false" <community-export-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="{
width="1150px" formCode: 'community_info',
title="导出模板" pageNo: pageNo,
top="5vh" pageSize: pageSize,
class="dialog-h"> conditions: queryConditions
<community-export-info v-if="diyDialog" }" :orgId="agencyObj.id" @close="handleDiyClose"></community-export-info>
ref="ref_diy"
:list="exportList"
:search="{
formCode: 'community_info',
pageNo: pageNo,
pageSize: pageSize,
conditions:queryConditions
}"
:orgId="agencyObj.id"
@close="handleDiyClose"></community-export-info>
</el-dialog> </el-dialog>
<baobiao ref="baobiao" /> <baobiao ref="baobiao" />
</div> </div>
@ -331,13 +176,13 @@ import util from "@/js/util";
let loading; // let loading; //
export default { export default {
data () { data() {
return { return {
searchHeight: 190,// searchHeight: 190,//
source: "tree", // source: "tree", //
importRoomLoading: false, importRoomLoading: false,
total: 0, total: 0,
pageSize:window.localStorage.getItem('pageSize') || 20, pageSize: window.localStorage.getItem('pageSize') || 20,
pageNo: 0, pageNo: 0,
sortType: "asc", //ascdesc sortType: "asc", //ascdesc
tableLoading: true, tableLoading: true,
@ -401,10 +246,9 @@ export default {
roomDetail, roomDetail,
communityExportInfo communityExportInfo
}, },
async mounted () { async mounted() {
this.updateBtnAuths(); this.updateBtnAuths();
this.getQueryConditions() this.getQueryConditions()
// this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({ // this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
// elseParams: { // elseParams: {
// categoryKeys: ["house_info"], // categoryKeys: ["house_info"],
@ -413,7 +257,7 @@ export default {
// }); // });
}, },
computed: { computed: {
tableHeight () { tableHeight() {
console.log(this.searchHeight) console.log(this.searchHeight)
let height = this.searchHeight + 270 let height = this.searchHeight + 270
return this.$store.state.inIframe ? this.clientHeight - height + this.iframeHeight : this.clientHeight - height return this.$store.state.inIframe ? this.clientHeight - height + this.iframeHeight : this.clientHeight - height
@ -424,7 +268,7 @@ export default {
}, },
methods: { methods: {
// //
updateBtnAuths () { updateBtnAuths() {
let rot = this.$route; let rot = this.$route;
if (Array.isArray(rot.meta.btns)) { if (Array.isArray(rot.meta.btns)) {
rot.meta.btns.forEach((item) => { rot.meta.btns.forEach((item) => {
@ -433,7 +277,7 @@ export default {
} }
}, },
reportForm () { reportForm() {
let paramMap = { let paramMap = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -461,25 +305,25 @@ export default {
}); });
}, },
indexMethod (index) { indexMethod(index) {
return index + 1; return index + 1;
}, },
handleSortOrderChange (value) { handleSortOrderChange(value) {
this.sortType = value.order === "ascending" ? "asc" : "desc"; this.sortType = value.order === "ascending" ? "asc" : "desc";
this.loadTable(); this.loadTable();
}, },
handleSortChange (value) { handleSortChange(value) {
this.sortType = value.order === "ascending" ? "asc" : "desc"; this.sortType = value.order === "ascending" ? "asc" : "desc";
this.loadTable(); this.loadTable();
}, },
handleEditSort (row) { handleEditSort(row) {
if (!row.isChange) { if (!row.isChange) {
row.isChange = true; row.isChange = true;
} }
}, },
async handleChangeSort (row, index) { async handleChangeSort(row, index) {
// row.isChange = false // row.isChange = false
let params = { let params = {
@ -502,7 +346,7 @@ export default {
} }
}, },
checkSelect (row, index) { checkSelect(row, index) {
let isChecked = true; let isChecked = true;
// if (row.showBtn) { // if (row.showBtn) {
// // // //
@ -513,9 +357,8 @@ export default {
return isChecked; return isChecked;
}, },
loadTreeFromSearch () { }, loadTreeFromSearch() { },
async loadTable(source, treeObj) {
async loadTable (source, treeObj) {
this.source = source; this.source = source;
this.tableLoading = true; this.tableLoading = true;
this.addDisabled = true this.addDisabled = true
@ -528,7 +371,6 @@ export default {
// //
this.agencyObj = treeObj; this.agencyObj = treeObj;
} }
if (this.agencyObj.level === "grid") { if (this.agencyObj.level === "grid") {
this.agencyLevel = "grid"; this.agencyLevel = "grid";
} else if (this.agencyObj.level === "neighborHood") { } else if (this.agencyObj.level === "neighborHood") {
@ -541,7 +383,6 @@ export default {
// if (fromTree) { // if (fromTree) {
// this.agencyObj = treeObj // this.agencyObj = treeObj
// } // }
// //
console.log(this.buildingId, '1111'); console.log(this.buildingId, '1111');
@ -563,7 +404,6 @@ export default {
buildingUnitId: this.buildingUnitId, buildingUnitId: this.buildingUnitId,
houseId: this.houseId, houseId: this.houseId,
}; };
const url = "/actual/base/communityHouse/listHouses"; const url = "/actual/base/communityHouse/listHouses";
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
@ -596,30 +436,30 @@ export default {
this.tableLoading = false; this.tableLoading = false;
}, },
diaClose () { diaClose() {
this.$refs.ref_form.resetData(); this.$refs.ref_form.resetData();
this.formShow = false; this.formShow = false;
}, },
handleDetail (row) { handleDetail(row) {
this.lookResiId = row.resiId; this.lookResiId = row.resiId;
let { agencyId, gridId, gridName, houseId, houseName} = row let { agencyId, gridId, gridName, houseId, houseName } = row
this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId, houseName}); this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId, houseName });
this.$router.push({ name: 'house-huaxiang' }); this.$router.push({ name: 'house-huaxiang' });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "house-huaxiang") { if (item.name === "house-huaxiang") {
return { ...item, title: name }; return { ...item, title: name };
} }
return item; return item;
}); });
}, },
detailFormCancle () { detailFormCancle() {
// this.$refs.ref_form_detail.diaDestroy() // this.$refs.ref_form_detail.diaDestroy()
this.detailShow = false; this.detailShow = false;
}, },
handleAdd () { handleAdd() {
this.formTitle = "新增房屋"; this.formTitle = "新增房屋";
this.formShow = true; this.formShow = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -627,7 +467,7 @@ export default {
}); });
}, },
handleEdit (row) { handleEdit(row) {
this.formTitle = "修改房屋"; this.formTitle = "修改房屋";
this.formShow = true; this.formShow = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -635,24 +475,24 @@ export default {
}); });
}, },
addFormCancle () { addFormCancle() {
this.formShow = false; this.formShow = false;
}, },
addFormOk () { addFormOk() {
this.formShow = false; this.formShow = false;
this.loadTable(); this.loadTable();
this.$emit('refreshTree') this.$emit('refreshTree')
}, },
selectAll (selection) { selectAll(selection) {
this.selection = selection; this.selection = selection;
}, },
selectionChange (selection) { selectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
async handleDelete (row) { async handleDelete(row) {
this.$confirm("确认删除?", "提示", { this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -674,7 +514,7 @@ export default {
}); });
}, },
deleteBatch () { deleteBatch() {
if (this.selection.length > 0) { if (this.selection.length > 0) {
this.$confirm("确认删除选择的房屋?", "提示", { this.$confirm("确认删除选择的房屋?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -704,7 +544,7 @@ export default {
} }
}, },
async deleteRoom (ids, forceDelete) { async deleteRoom(ids, forceDelete) {
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds"; const url = "/actual/base/communityHouse/deleteCommunityInfoByIds";
let params = { let params = {
forceDelete: forceDelete, forceDelete: forceDelete,
@ -748,7 +588,7 @@ export default {
// //
async handleExport () { async handleExport() {
// let title = this.agencyObj.label; // let title = this.agencyObj.label;
// title = title + ""; // title = title + "";
@ -802,7 +642,7 @@ export default {
// ); // );
await this.getExportList(); await this.getExportList();
}, },
async getExportList (type) { async getExportList(type) {
const url = "/oper/customize/icformitemgroup/list"; const url = "/oper/customize/icformitemgroup/list";
let params = { let params = {
formCode: "community_info", formCode: "community_info",
@ -826,7 +666,7 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async getQueryConditions () { async getQueryConditions() {
let params = { let params = {
formCode: "community_info", formCode: "community_info",
customerId: this.$store.state.user.customerId, customerId: this.$store.state.user.customerId,
@ -849,11 +689,11 @@ export default {
this.$message.error(data.msg); this.$message.error(data.msg);
} }
}, },
handleDiyClose () { handleDiyClose() {
this.diyDialog = false; this.diyDialog = false;
}, },
// //
download (data, fileName) { download(data, fileName) {
if (!data) { if (!data) {
return; return;
} }
@ -877,7 +717,7 @@ export default {
} }
}, },
handleExportModule (type) { handleExportModule(type) {
let title = '' let title = ''
let url = "" let url = ""
@ -910,7 +750,7 @@ export default {
}, },
// //
handleExportYihuyidang () { handleExportYihuyidang() {
this.yihuyidangDisabled = true; this.yihuyidangDisabled = true;
let title = this.agencyObj.label; let title = this.agencyObj.label;
title = title + "-一户一档"; title = title + "-一户一档";
@ -970,7 +810,7 @@ export default {
); );
}, },
// //
beforeUpload (file) { beforeUpload(file) {
this.files = file; this.files = file;
const isText = file.type === "application/vnd.ms-excel"; const isText = file.type === "application/vnd.ms-excel";
@ -987,11 +827,11 @@ export default {
} }
}, },
// //
handleExceed (files, fileList) { handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`); this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`);
}, },
async uploadFile () { async uploadFile() {
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!"); this.$message.warning("请选择要上传的文件!");
return false; return false;
@ -1045,7 +885,7 @@ export default {
); );
}, },
showMessage (msg) { showMessage(msg) {
this.$alert(msg, "操作结果", { this.$alert(msg, "操作结果", {
confirmButtonText: "关闭", confirmButtonText: "关闭",
callback: (action) => { callback: (action) => {
@ -1055,18 +895,18 @@ export default {
}); });
}, },
handleSizeChange (val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val;
this.pageNo = 1; this.pageNo = 1;
this.loadTable(); this.loadTable();
}, },
handleCurrentChange (val) { handleCurrentChange(val) {
this.pageNo = val; this.pageNo = val;
this.loadTable(); this.loadTable();
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -1074,7 +914,7 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();
@ -1082,7 +922,7 @@ export default {
}, },
}, },
watch: { watch: {
selection (val) { selection(val) {
if (val.length > 0) { if (val.length > 0) {
this.showDeletBtn = true; this.showDeletBtn = true;
} else { } else {
@ -1090,7 +930,7 @@ export default {
} }
}, },
'$store.state.sidebarFold': { '$store.state.sidebarFold': {
handler (newVal, oldVal) { handler(newVal, oldVal) {
if (newVal) {// if (newVal) {//
this.searchHeight = 155 this.searchHeight = 155
@ -1160,7 +1000,7 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss"; @import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss"; @import "@/assets/scss/modules/management/list-main.scss";
</style> </style>

46
src/views/modules/base/resi.vue

@ -502,69 +502,71 @@ export default {
switch (this.valueb) { switch (this.valueb) {
case '党员': case '党员':
_obj.partyFlag = 1 _obj.partyFlag = 1
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '残疾人': case '残疾人':
_obj.healthStatus.push('DISABILITY_FLAG'); _obj.healthStatus.push('DISABILITY_FLAG');
_obj.integrityScoreFrom = parseInt(0) // _obj.integrityScoreFrom = parseInt(0)
_obj.integrityScoreTo = parseInt(60) // _obj.integrityScoreTo = parseInt(60)
_obj.integrityScoreFrom = 0
_obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '退役军人': case '退役军人':
_obj.attentionCrowds.push('VETERAN_FLAG'); _obj.attentionCrowds.push('VETERAN_FLAG');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
_obj.partyFlag = 1; _obj.partyFlag = 1;
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '失业人员': case '失业人员':
_obj.careerStatus = 0 _obj.careerStatus = 0
_obj.integrityScoreFrom = 0
_obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
_obj.integrityScoreFrom = parseInt(0)
_obj.integrityScoreTo = parseInt(60)
break; break;
case '低保人员': case '低保人员':
_obj.attentionCrowds.push('SUBSISTENCE_ALLOW'); _obj.attentionCrowds.push('SUBSISTENCE_ALLOW');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '保障房人员': case '保障房人员':
_obj.attentionCrowds.push('ENSURE_HOUSE_FLAG'); _obj.attentionCrowds.push('ENSURE_HOUSE_FLAG');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '特殊人员': case '特殊人员':
_obj.attentionCrowds.push('ENSURE_HOUSE_FLAG'); _obj.attentionCrowds.push('ENSURE_HOUSE_FLAG');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '大病人员': case '大病人员':
_obj.healthStatus.push('SERIOUS_ILLNESS_F'); _obj.healthStatus.push('SERIOUS_ILLNESS_F');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '慢病人员': case '慢病人员':
_obj.healthStatus.push('CHRONIC_DISEASE_F'); _obj.healthStatus.push('CHRONIC_DISEASE_F');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '老年人': case '老年人':
_obj.attentionCrowds.push('OLD_PEOPLE_FLAG'); _obj.attentionCrowds.push('OLD_PEOPLE_FLAG');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;
case '特扶人员': case '特扶人员':
_obj.attentionCrowds.push('SPECIAL_SUPPORT_F'); _obj.attentionCrowds.push('SPECIAL_SUPPORT_F');
_obj.integrityScoreFrom = parseInt(0) _obj.integrityScoreFrom = 0
_obj.integrityScoreTo = parseInt(60) _obj.integrityScoreTo = 60
this.getTableData(_obj); this.getTableData(_obj);
break; break;

36
src/views/modules/home/index.vue

@ -200,7 +200,7 @@
<!-- <img src="@/assets/images/index/title-icon-zntx.png" /> --> <!-- <img src="@/assets/images/index/title-icon-zntx.png" /> -->
</div> </div>
<div class="more" @click="toNoticePage">更多></div> <div class="more" @click="toNoticePage">更多></div>
<div class="cnt" v-if="noticeData.length > 0"> <div class="cnt" v-if="noticeData.length > 0" style="margin-top: 0px;">
<div @click="handleClickNotice(item)" class="item" :key="'notice' + item.targetId + index" <div @click="handleClickNotice(item)" class="item" :key="'notice' + item.targetId + index"
v-for="(item, index) in noticeData"> v-for="(item, index) in noticeData">
<!-- <div class="item_left"> <!-- <div class="item_left">
@ -213,11 +213,10 @@
</div> </div>
<div class="item-title" <div class="item-title"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;"> style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;">
<img class="thumbnail_1" referrerpolicy="no-referrer" <img v-if="index === 0" class="thumbnail_1" referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/psjidpevo98fb607sd028bliakr139r25k82b2fbda-8291-4fe3-b190-bfe723a10036" />{{ src="https://lanhu.oss-cn-beijing.aliyuncs.com/psjidpevo98fb607sd028bliakr139r25k82b2fbda-8291-4fe3-b190-bfe723a10036" />{{
item.content }} item.content }}
</div> </div>
</div> </div>
<div class="item_left"> <div class="item_left">
<i class="i-tag" v-if="item.readFlag == 1">已读</i> <i class="i-tag" v-if="item.readFlag == 1">已读</i>
@ -236,7 +235,7 @@
<!-- <div class="white-box"> --> <!-- <div class="white-box"> -->
<div class="m-box m-tx" style=""> <div class="m-box m-tx" style="">
<div class="noe-text"> <span style="margin-top: 10px;">居民分类更新情况</span> <span class="update-settings" <div class="noe-text"> <span style="margin-top: 10px;">居民分类更新情况</span> <span class="update-settings"
style="margin-top: 10px;"><img referrerpolicy="no-referrer" style="margin-top: 10px;" v-show="showAll"><img referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</span> src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</span>
</div> </div>
<el-tabs v-model="activeName" style="width:100%;"> <el-tabs v-model="activeName" style="width:100%;">
@ -247,7 +246,7 @@
<th>居民类别</th> <th>居民类别</th>
<th>总人数</th> <th>总人数</th>
<th>分类信息不完整数</th> <th>分类信息不完整数</th>
<th>更新负责人</th> <th v-show="showAll">更新负责人</th>
<th>更新周期</th> <th>更新周期</th>
<th>更新人数</th> <th>更新人数</th>
</tr> </tr>
@ -257,8 +256,8 @@
<td style="opacity: 0.5;">{{ item.residentCategoryName }}</td> <td style="opacity: 0.5;">{{ item.residentCategoryName }}</td>
<td style="color: #2683DB;">{{ item.total }}</td> <td style="color: #2683DB;">{{ item.total }}</td>
<td style="color: red;">{{ item.nonIntegratedNum }}</td> <td style="color: red;">{{ item.nonIntegratedNum }}</td>
<td class="special-header" v-show="showAll">{{ item.userName }}</td>
<td class="special-header">{{ item.updatePeriodName }}</td> <td class="special-header">{{ item.updatePeriodName }}</td>
<td class="special-header">{{ item.updatedTime }}</td>
<td class="special-header">{{ item.updateResiNum }}</td> <td class="special-header">{{ item.updateResiNum }}</td>
</tr> </tr>
</tbody> </tbody>
@ -289,6 +288,7 @@ export default {
type: "jumin", type: "jumin",
searchKey: "", searchKey: "",
}, },
showAll:false,
typePlaceholder: { typePlaceholder: {
jumin: "请输入姓名或联系电话或证件号", jumin: "请输入姓名或联系电话或证件号",
@ -392,8 +392,6 @@ export default {
}, },
}, },
created() { created() {
}, },
mounted() { mounted() {
// this.ehso(); // this.ehso();
@ -410,7 +408,6 @@ export default {
"dynamicMenuRoutes----------------------------", "dynamicMenuRoutes----------------------------",
this.$store.state.sidebarMenuList this.$store.state.sidebarMenuList
); );
}, },
methods: { methods: {
initChart() { initChart() {
@ -468,6 +465,12 @@ export default {
window.addEventListener("resize", this.handleWindowResize); window.addEventListener("resize", this.handleWindowResize);
}); });
this.borderH(); this.borderH();
const level = localStorage.getItem('level');
console.log('Stored level:', level);
if(level == 'district'||'community'){
this.showAll = true
}
}, },
@ -512,6 +515,7 @@ export default {
} else if (msgType == "resident_base_info") { } else if (msgType == "resident_base_info") {
this.$refs.fastcall.showResiInfo(targetId); this.$refs.fastcall.showResiInfo(targetId);
} }
this.getNoticeData()
}, },
toNoticePage() { toNoticePage() {
@ -520,13 +524,12 @@ export default {
}); });
}, },
// //
jumpToHouse(e){ jumpToHouse(e) {
console.log("看看存进得什么",e)
this.$router.push({ this.$router.push({
path: "/main/base-community-community", path: "/main/base-community-community",
query: { query: {
param1: e, param1: e,
} }
}); });
}, },
@ -599,10 +602,9 @@ export default {
const url = "/message/intelligentMessage/list"; const url = "/message/intelligentMessage/list";
let params = { let params = {
last: "10", last: "10",
readFlag:'0'
}; };
const { data, code, msg } = await requestGet(url, params); const { data, code, msg } = await requestGet(url, params);
if (code === 0) { if (code === 0) {
if (data) { if (data) {
this.noticeData = data; this.noticeData = data;
@ -684,7 +686,7 @@ export default {
const nonIntegratedNum = Number(item.nonIntegratedNum); const nonIntegratedNum = Number(item.nonIntegratedNum);
let ratio = ''; let ratio = '';
if (total !== 0) { if (total !== 0) {
ratio = 1 - (nonIntegratedNum / total); ratio = nonIntegratedNum / total;
} }
// console.log("nonIntegratedNum", nonIntegratedNum) // console.log("nonIntegratedNum", nonIntegratedNum)
// console.log("total", total) // console.log("total", total)

Loading…
Cancel
Save