Browse Source

可视化平台调整

shibei_master
jiangyy 3 years ago
parent
commit
af4cb4e193
  1. 12
      src/assets/scss/modules/visual/basicInfoMain.scss
  2. 11
      src/views/modules/base/community/buildTable.vue
  3. 18
      src/views/modules/base/community/community.vue
  4. 17
      src/views/modules/base/community/communityTable.vue
  5. 2
      src/views/modules/base/community/roomTable.vue
  6. 110
      src/views/modules/visual/basicinfo/basicInfoCommunity.vue
  7. 13
      src/views/modules/visual/basicinfo/basicInfoMain.vue

12
src/assets/scss/modules/visual/basicInfoMain.scss

@ -301,13 +301,23 @@
position: absolute; position: absolute;
bottom: 14px; bottom: 14px;
left: 9px; left: 9px;
display: flex;
justify-content: flex-start;
// margin-left: 7px; // margin-left: 7px;
> img { .div_icon_item{
.icon_img{
margin-left: 5px; margin-left: 5px;
width: 21px; width: 21px;
height: 20px; height: 20px;
} }
.icon_name{
text-align: center;
margin:5px;
font-size: 16px;
}
}
} }
.div_user:hover { .div_user:hover {
cursor: pointer; cursor: pointer;

11
src/views/modules/base/community/buildTable.vue

@ -71,6 +71,12 @@
<el-table-column prop="buildingName" <el-table-column prop="buildingName"
label="楼栋名称" label="楼栋名称"
min-width="180"> min-width="180">
<template slot-scope="scope">
<a class="name-a"
@click="handleToNextLevel(scope.row)">
{{ scope.row.buildingName }}
</a>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName"
label="所属小区" label="所属小区"
@ -97,10 +103,7 @@
align="center" align="center"
class="operate"> class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<el-button type="text" <el-button type="text"
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"

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

@ -19,6 +19,11 @@
:expand-on-click-node="false" :expand-on-click-node="false"
:filter-node-method="filterNode" :filter-node-method="filterNode"
@node-click="handleNodeClick"> @node-click="handleNodeClick">
<span slot-scope="{ node, data }"
class="custom-tree-node">
<span :id="data.id">{{ data.showName }}</span>
</span>
</el-tree> </el-tree>
</el-scrollbar> </el-scrollbar>
@ -194,6 +199,7 @@ export default {
handleSearch () { handleSearch () {
if (this.ownerName || this.ownerPhone || this.rentState) { if (this.ownerName || this.ownerPhone || this.rentState) {
this.showRoomTable = true this.showRoomTable = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState) this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState)
}) })
@ -315,16 +321,28 @@ export default {
if (level === 'community') { if (level === 'community') {
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data
this.openNodes.push(this.selTreeObj.id)
} else { } else {
this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data
} }
this.handleNodeClick(this.selTreeObj) this.handleNodeClick(this.selTreeObj)
this.$nextTick(() => { this.$nextTick(() => {
// ref_tree ref value node-key // ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id); this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
}); });
const node = document.getElementById(this.selTreeObj.id) // Iddom
setTimeout(() => {
if (node) {
this.$nextTick(() => {
node.scrollIntoView({ block: 'center' }) // scrollIntoViewdom block: 'center'
})
}
}, 100)
}, },
// //

17
src/views/modules/base/community/communityTable.vue

@ -96,11 +96,12 @@
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName"
label="小区名称" label="小区名称"
min-width="100"> min-width="100">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<a class="name-a" @click="handleDetail(scope.row)"> <a class="name-a"
@click="handleToNextLevel(scope.row)">
{{ scope.row.neighborHoodName }} {{ scope.row.neighborHoodName }}
</a> </a>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column prop="agencyName" <el-table-column prop="agencyName"
label="所属组织" label="所属组织"
@ -131,14 +132,6 @@
class="operate"> class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<!-- <el-button type="text"
class="div-table-button--qr"
size="small"
@click="handleDownQr(scope.row, 'neighborHood')">二维码</el-button> -->
<el-button type="text" <el-button type="text"
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"
@ -236,10 +229,8 @@ export default {
}, },
computed: { computed: {
tableHeight () { tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 310 + this.iframeHeight : this.clientHeight - 310 return this.$store.state.inIframe ? this.clientHeight - 310 + this.iframeHeight : this.clientHeight - 310
}, },
...mapGetters(['clientHeight', 'iframeHeight']) ...mapGetters(['clientHeight', 'iframeHeight'])

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

@ -244,7 +244,7 @@ export default {
this.ownerPhone = null this.ownerPhone = null
this.rentFlag = null this.rentFlag = null
} else if (source === 'search') {// } else if (source === 'search') {//
this.agencyObj = treeObj
this.ownerName = ownerName this.ownerName = ownerName
this.ownerPhone = ownerPhone this.ownerPhone = ownerPhone
this.rentFlag = rentFlag this.rentFlag = rentFlag

110
src/views/modules/visual/basicinfo/basicInfoCommunity.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="div_community_info" <div class="div_community_info"
@click="handleShowAllUser()"> @click="handleCloseAllUser()">
<div class="div_select"> <div class="div_select">
<img src="../../../../assets/img/shuju/title-tip.png" <img src="../../../../assets/img/shuju/title-tip.png"
@ -10,7 +10,8 @@
<div class="second-select"> <div class="second-select">
<el-select v-model="selBuildingId" <el-select v-model="selBuildingId"
:popper-append-to-body="false" :popper-append-to-body="false"
placeholder="请选择"> placeholder="请选择"
@click="handleCloseAllUser()">
<el-option v-for="(item,index) in buildingArray" <el-option v-for="(item,index) in buildingArray"
:key="item.buildingId" :key="item.buildingId"
:label="item.buildingName" :label="item.buildingName"
@ -21,8 +22,10 @@
</div> </div>
</div> </div>
<div class="div_room_bar"> <div class="div_room_bar">
<el-scrollbar style="height:100%"> <el-scrollbar v-if="roomArray.length>0"
style="height:100%">
<div class="info_loading" <div class="info_loading"
v-if="roomLoaded"> v-if="roomLoaded">
<screen-loading>加载中</screen-loading> <screen-loading>加载中</screen-loading>
@ -41,17 +44,35 @@
alt /> alt />
</div> </div>
<div class="icon_category"> <div class="icon_category">
<img v-for="(iconItem,iconIndex) in item.iconArrayShow"
:key="iconIndex" <div class="div_icon_item"
v-for="(iconItem,iconIndex) in item.iconArrayShow"
:key="iconIndex">
<el-popover trigger="click"
popper-class="icon_popover"
width="10"
placement="bottom">
<div class="icon_name">{{iconItem.name}} </div>
<div slot="reference">
<img class="icon_img"
:src="iconItem.iconUrl" :src="iconItem.iconUrl"
alt /> alt />
</div> </div>
<!-- <el-popover v-model="item.showAllUser" </el-popover>
</div>
<!-- <img v-for="(iconItem,iconIndex) in item.iconArrayShow"
:key="iconIndex"
:src="iconItem.iconUrl"
alt /> -->
</div>
<el-popover v-model="item.showAllUser"
placement="bottom" placement="bottom"
width="50" width="50"
popper-class="my_popover" popper-class="my_popover"
trigger="click"> trigger="manual">
<div class="user_list"> <div class="user_list">
<div v-for="(userItem,userIndex) in userArray" <div v-for="(userItem,userIndex) in userArray"
:key="userIndex" :key="userIndex"
@ -77,9 +98,9 @@
alt /> alt />
</div> </div>
</el-popover> --> </el-popover>
<div @click.stop="handleShowAllUser(index)" <!-- <div @click.stop="handleShowAllUser(index)"
class="div_user"> class="div_user">
<span>全部成员</span> <span>全部成员</span>
@ -103,12 +124,18 @@
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
<div v-else
class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div> </div>
</div> </div>
@ -119,6 +146,7 @@ import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import ScreenLoading from "@/views/modules/visual/cpts/loading"; import ScreenLoading from "@/views/modules/visual/cpts/loading";
import nextTick from "dai-js/tools/nextTick";
let loading;// let loading;//
@ -157,6 +185,7 @@ export default {
}, },
methods: { methods: {
//id //id
async initData (neighborHoodId, neighborHoodName) { async initData (neighborHoodId, neighborHoodName) {
@ -194,28 +223,40 @@ export default {
}, },
// //
async handleShowAllUser (selIndex) { async handleShowAllUser (selIndex) {
// this.startLoading()
this.userArray = []
this.roomArray.forEach((element, index) => {
let obj = JSON.parse(JSON.stringify(element))
obj.showAllUser = false
this.$set(this.roomArray, index, obj)
// element.showAllUser = false
});
await nextTick(100);
if ((selIndex === 0 || selIndex) && !this.roomArray[selIndex].showAllUser) { if ((selIndex === 0 || selIndex) && !this.roomArray[selIndex].showAllUser) {
await this.loadUser(this.roomArray[selIndex].houseId, selIndex) await this.loadUser(this.roomArray[selIndex].houseId, selIndex)
} }
this.roomArray.forEach((element, index) => { },
let obj = JSON.parse(JSON.stringify(element)) //
async handleCloseAllUser () {
if (index === selIndex) { this.userArray = []
obj.showAllUser = !obj.showAllUser this.roomArray.forEach((element, index) => {
this.$set(this.roomArray, selIndex, obj)
let obj = JSON.parse(JSON.stringify(element))
} else {
obj.showAllUser = false obj.showAllUser = false
this.$set(this.roomArray, index, obj) this.$set(this.roomArray, index, obj)
// element.showAllUser = false
}
}); });
// this.endLoading()
}, },
@ -228,6 +269,13 @@ export default {
}, },
onEnterTd () {
console.log('进入')
},
onLeaveTd () {
console.log('出来')
},
// //
async loadBuilding () { async loadBuilding () {
const url = "/gov/org/agency/baseinfofamilybuilding" const url = "/gov/org/agency/baseinfofamilybuilding"
@ -320,7 +368,7 @@ export default {
}, },
// //
async loadUser (houseId, index) { async loadUser (houseId, selIndex) {
const url = "/epmetuser/icresiuser/getpeoplebyroom" const url = "/epmetuser/icresiuser/getpeoplebyroom"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom" // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom"
let params = { let params = {
@ -333,6 +381,11 @@ export default {
this.userArray = data this.userArray = data
if (this.userArray.length === 0) { if (this.userArray.length === 0) {
this.$message.warning('该房间下没有住户') this.$message.warning('该房间下没有住户')
} else {
let objItem = JSON.parse(JSON.stringify(this.roomArray[selIndex]))
objItem.showAllUser = true
this.$set(this.roomArray, selIndex, objItem)
} }
} else { } else {
@ -433,7 +486,7 @@ export default {
.second-select { .second-select {
margin: 0 10px 10px; margin: 0 10px 10px;
::v-deep .el-input { ::v-deep .el-input {
width: 180px; width: 380px;
height: 36px; height: 36px;
.el-input__inner { .el-input__inner {
height: 100%; height: 100%;
@ -442,6 +495,7 @@ export default {
line-height: 36px; line-height: 36px;
background: #06186d; background: #06186d;
border: 1px solid #1a64cc; border: 1px solid #1a64cc;
width: 380px;
} }
.el-icon-arrow-up:before { .el-icon-arrow-up:before {
@ -491,6 +545,12 @@ export default {
/deep/ .el-scrollbar__wrap { /deep/ .el-scrollbar__wrap {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
.no-data {
padding-top: 120px;
display: flex;
justify-content: center;
}
} }
</style> </style>
<style lang="scss" > <style lang="scss" >
@ -499,4 +559,10 @@ export default {
margin-top: 10px; margin-top: 10px;
border: 0; border: 0;
} }
.el-popover.icon_popover {
min-width: 80px !important;
margin-top: 5px !important;
padding: 6px !important;
background-color: rgb(247, 250, 253);
}
</style> </style>

13
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -107,7 +107,8 @@
<div class="list_item"> <div class="list_item">
<div v-for="(colItem,colIndex) in item" <div v-for="(colItem,colIndex) in item"
:key="colIndex" :key="colIndex"
class="list_item_col" @click="handleTo(colItem)"> class="list_item_col"
@click="handleTo(colItem)">
<img :src="colItem.dataIcon" <img :src="colItem.dataIcon"
alt /> alt />
<div class="item_content"> <div class="item_content">
@ -526,8 +527,18 @@ const vueGis = {
// //
handleClickAgency (index) { handleClickAgency (index) {
//
if (this.orgLevel === 'neighborHood') {
this.$nextTick(() => {
// id
this.$refs.ref_community.handleCloseAllUser();
});
}
const cutNum = this.runAgencyArray.length - index// const cutNum = this.runAgencyArray.length - index//
this.runNum = this.runNum - cutNum this.runNum = this.runNum - cutNum
this.orgData = this.runAgencyArray[index] this.orgData = this.runAgencyArray[index]
for (let i = 0; i < cutNum; i++) { for (let i = 0; i < cutNum; i++) {

Loading…
Cancel
Save