Browse Source

基础信息

shibei_master
jiangyy 4 years ago
parent
commit
a06a7eef64
  1. 30
      src/assets/scss/modules/visual/basicInfoMain.scss
  2. 3
      src/assets/scss/modules/visual/searchPerson.scss
  3. 196
      src/views/modules/visual/basicinfo/basicInfoCommunity.vue
  4. 43
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  5. 47
      src/views/modules/visual/basicinfo/peopleSearch.vue
  6. 68
      src/views/modules/workSys/mapConfig.vue

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

@ -31,6 +31,7 @@
.div_content {
display: flex;
.div_map {
width: 100%;
height: calc(88vh - 8px);
@ -163,21 +164,11 @@
}
}
.warning-box {
box-sizing: border-box;
width: 1881px;
height: 914px;
margin: auto;
color: #fff;
background: url('../../../img/modules/visual/warning-box.png') no-repeat
center;
background-size: 100% 100%;
padding: 45px 21px 35px 24px;
}
.div_community_info {
box-sizing: border-box;
width: 100%;
flex: 0 0 calc(100vw - 620px);
// width: calc(100vw - 560px);
height: calc(88vh);
color: #fff;
background: url('../../../img/modules/visual/warning-box.png') no-repeat
@ -188,6 +179,19 @@
margin-top: 28px;
margin-left: 24px;
display: flex;
.customer_select {
display: flex;
justify-content: flex-start;
> span {
width: auto;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
line-height: 34px;
}
}
> img {
height: 34px;
width: 46px;

3
src/assets/scss/modules/visual/searchPerson.scss

@ -32,6 +32,9 @@
color: #ffffff;
line-height: 53px;
}
.btn:hover {
cursor: pointer;
}
}
.list_box {

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

@ -7,14 +7,15 @@
<img src="../../../../assets/img/shuju/title-tip.png"
alt />
<div class="customer_select">
<!-- <span>{{neighborHoodName+'-'}}</span> -->
<el-select v-model="selBuildingId"
:popper-append-to-body="false"
style="width:100%"
placeholder="请选择">
<el-option v-for="item in buildingArray"
:key="item.buildingId"
:label="item.buildingName"
:value="item.buildingId">
:value="item.buildingId"
@click="handleClickBuilding(index)">
</el-option>
</el-select>
</div>
@ -48,7 +49,7 @@
alt />
<div class="user_list"
v-show="item.showAllUser">
v-show="item.showAllUser&&userArray.length>0">
<div v-for="(userItem,userIndex) in userArray"
:key="userIndex"
class="user_item"
@ -89,56 +90,7 @@ export default {
//id
neighborHoodId: '',
neighborHoodName: '',
buildingArray: [
{
buildingId: "1",
buildingName: '1号楼'
},
{
buildingId: "2",
buildingName: '2号楼'
},
{
buildingId: "3",
buildingName: '3号楼'
},
{
buildingId: "4",
buildingName: '4号楼'
},
{
buildingId: "5",
buildingName: '5号楼'
},
{
buildingId: "6",
buildingName: '6号楼'
},
{
buildingId: "7",
buildingName: '1号楼'
},
{
buildingId: "8",
buildingName: '2号楼'
},
{
buildingId: "9",
buildingName: '3号楼'
},
{
buildingId: "10",
buildingName: '4号楼'
},
{
buildingId: "11",
buildingName: '5号楼'
},
{
buildingId: "12",
buildingName: '6号楼'
}
],//
buildingArray: [],//
selBuildingId: '',
selBuildingName: '',
@ -405,35 +357,14 @@ export default {
selHouseName: '',
selHouseIndex: 0,
userArray: [
{
name: '张三',
userId: '1',
},
{
name: '李三四',
userId: '2',
},
{
name: '王婷',
userId: '3',
}
,
{
name: '王婷婷婷王婷婷婷',
userId: '4',
}
],
userArray: [],
selUserName: '',
selUserId: '',
orgData: {},//
orgId: '',
orgLevel: '',
//
runNum: 0,
runAgencyArray: [],
@ -461,17 +392,28 @@ export default {
},
//
handleClickBuilding (index) {
this.selBuildingId = this.buildingArray[index].buildingId
this.selBuildingName = this.buildingArray[index].buildingName
this.$emit('refreshInfoList', this.selBuildingId, 'building')
},
//
handleClickRoom (index) {
this.selHouseIndex = index
this.selHouseId = this.roomArray[index].houseId
this.selHouseName = this.roomArray[index].houseName
// this.$emit('refreshInfoList', this.selHouseId, 'room')
},
//
async handleShowAllUser (selIndex) {
// this.startLoading()
this.roomArray.forEach((element, index) => {
let obj = JSON.parse(JSON.stringify(element))
if (index === selIndex) {
obj.showAllUser = !obj.showAllUser
this.$set(this.roomArray, selIndex, obj)
@ -483,7 +425,7 @@ export default {
// element.showAllUser = false
}
});
// this.endLoading()
},
@ -496,80 +438,33 @@ export default {
},
//
toSubAgency (e) {
//neighborHood
this.runNum++
this.runAgencyArray.push(this.orgData)
this.subAgencyArray.forEach(item => {
if (item.id === e.selected[0].id_) {
this.selPolygonId = item.id
this.selPolygon = item
this.orgId = item.id
this.orgLevel = item.level
}
});
console.log(this.runNum)
console.log(this.runAgencyArray)
if (this.orgLevel === 'neighborHood') {
} else {
this.refreshMap(true)
}
},
//
handleClickAgency (index) {
const cutNum = this.runAgencyArray.length - index//
this.runNum = this.runNum - cutNum
this.orgData = this.runAgencyArray[index]
for (let i = 0; i < cutNum; i++) {
this.runAgencyArray.pop()
}
this.orgId = this.orgData.id
this.orgLevel = this.orgData.level
console.log(this.runAgencyArray)
console.log(this.orgData)
if (this.orgLevel === 'neighborHood') {//
} else {
this.refreshMap(true)
}
},
//
async loadBuilding () {
// const url = "/gov/org/agency/baseinfofamilybuilding"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/baseinfofamilybuilding"
const url = "/gov/org/agency/baseinfofamilybuilding"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/baseinfofamilybuilding"
let params = {
neighborHoodId: this.orgId
neighborHoodId: this.neighborHoodId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.buildingArray = data
this.buildingArray = data
this.buildingArray.forEach(item => {
item.buildingName = this.neighborHoodName + "-" + item.buildingName
if (!this.buildingArray[0].buildingName) {
item.buildingName = '楼'
}
});
if (this.buildingArray.length > 0) {
this.selBuildingId = this.buildingArray[0].buildingId
this.selBuildingName = this.buildingArray[0].buildingName
} else {
this.selBuildingId = ''
this.selBuildingName = ''
}
} else {
this.$message.error(msg)
}
@ -578,8 +473,8 @@ export default {
//
async loadRoom () {
// const url = "/gov/org/ichouse/houselist"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/ichouse/houselist"
const url = "/gov/org/ichouse/houselist"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/ichouse/houselist"
let params = {
buildingId: this.selBuildingId
}
@ -587,15 +482,13 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.roomArray = data
this.roomArray = data
if (this.roomArray.length > 0) {
this.selHouseId = this.roomArray[0].houseId
this.selHouseName = this.roomArray[0].houseName
this.roomArray.forEach(roomItem => {
let iconArrayShow = JSON.parse(JSON.stringify(roomItem.categoryList))
// debugger
if (iconArrayShow.length > 0) {
if (iconArrayShow[0].isSpecial === '1') {//
roomItem.isParty = true
@ -625,8 +518,8 @@ export default {
//
async loadUser (houseId, index) {
// const url = "/epmetuser/icresiuser/getpeoplebyroom"
const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom"
const url = "/epmetuser/icresiuser/getpeoplebyroom"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom"
let params = {
homeId: houseId
}
@ -634,8 +527,10 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.userArray = data
this.userArray = data
if (this.userArray.length === 0) {
this.$message.warning('该房间下没有住户')
}
} else {
this.$message.error(msg)
@ -666,6 +561,11 @@ export default {
},
computed: {
// selectWidth () {
// let width = this.selHouseName.length * 200
// console.log(width)
// return width + 'px';
// },
mapHeight () {
@ -735,8 +635,16 @@ export default {
}
/* 修改的是el-input上下的小图标的颜色 */
/deep/ .el-select .el-input .el-select__caret {
/deep/ .el-select .el-input .el-select__caret::before {
color: #fff;
content: "";
background: url("../../../../assets/img/xiala.png") center center no-repeat;
position: absolute;
width: 100%;
height: 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* 修改总体选项的样式 最外层 */

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

@ -14,22 +14,21 @@
</div>
</div>
<people-search v-if="orgLevel==='search'"
<people-search v-show="orgLevel==='search'"
@toSubAgency="toSubAgency"
ref="ref_search"></people-search>
<people v-else-if="orgLevel==='people'"
<people v-if="orgLevel==='people'"
:userId="selUserId"
ref="ref_people"></people>
<div v-else
<div v-show="orgLevel!=='people' && orgLevel!=='search'"
class="div_content">
<!-- <basic-info-community ref="ref_community"></basic-info-community> -->
<basic-info-community v-show="orgLevel==='neighborHood'"
ref="ref_community"
@refreshInfoList="refreshInfoList"></basic-info-community>
<basic-info-community v-if="orgLevel==='neighborHood'"
ref="ref_community"></basic-info-community>
<div v-else
<div v-show="orgLevel!=='people' && orgLevel!=='search' && orgLevel!=='neighborHood'"
id="map"
class="div_map">
</div>
@ -294,8 +293,8 @@ const vueGis = {
//infolist
async loadList () {
// const url = "/epmetuser/statsresiwarn/list"
const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/statsresiwarn/list"
const url = "/epmetuser/statsresiwarn/list"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/statsresiwarn/list"
let params = {
id: this.orgId,
level: this.orgLevel
@ -304,8 +303,8 @@ const vueGis = {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.listData = data
this.listData = this.listData1
this.listData = data
// this.listData = this.listData1
this.listDatashow = []
let itemArray = []
this.listData.forEach((item, index) => {
@ -329,6 +328,12 @@ const vueGis = {
}
},
//list
refreshInfoList (selId, type) {
this.orgId = houselIdseId
this.level = ''
},
// type:polygon / search people
async toSubAgency (type, e, searchName) {
//neighborHood
@ -355,7 +360,6 @@ const vueGis = {
name: '搜索'
}
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_search.loadList();
});
@ -369,10 +373,13 @@ const vueGis = {
});
if (this.orgLevel === 'neighborHood') {
this.loadList()
this.$nextTick(() => {
// id
this.$refs.ref_community.initData('', '南山111小区');
this.$refs.ref_community.initData(this.orgData.id, this.orgData.name);
});
} else {
this.refreshMap(true)
}
@ -420,15 +427,19 @@ const vueGis = {
} else if (this.orgLevel === 'search') {
this.$nextTick(() => {
debugger
// ref_tree ref value node-key
this.$refs.ref_search.loadByName(this.searchName);
});
} else if (this.orgLevel === 'neighborHood') {//
} else {
this.$nextTick(() => {
this.refreshMap(true)
this.$forceUpdate()
});
}
},

47
src/views/modules/visual/basicinfo/peopleSearch.vue

@ -78,40 +78,7 @@ export default {
data () {
return {
headerList: [],
tableData: [
{
sort: 1,
name: '杨明',
gridName: '市北区第二网格市北区第二网格市北区第二网格市北区第二网格',
neighborHoodName: '南宁路小区',
buildNum: '2号楼',
userId: '1',
},
{
sort: 2,
name: '杨明',
gridName: '市北区第二网格',
neighborHoodName: '南宁路小区',
buildNum: '2号楼',
userId: '1',
},
{
sort: 3,
name: '杨明',
gridName: '市北区第二网格',
neighborHoodName: '南宁路小区',
buildNum: '2号楼',
userId: '2',
},
{
sort: 4,
name: '杨明',
gridName: '市北区第二网格',
neighborHoodName: '南宁路小区',
buildNum: '2号楼',
userId: '3',
},
],
tableData: [],
searchName: '',
pageSize: 4,
pageNo: 1,
@ -125,13 +92,16 @@ export default {
loadByName (searchName) {
this.searchName = searchName
if (this.searchName) {
this.loadList()
}
},
async loadList () {
// const url = "/epmetuser/icresiuser/searchbyname"
const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/searchbyname"
if (this.searchName) {
const url = "/epmetuser/icresiuser/searchbyname"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/searchbyname"
let params = {
name: this.searchName,
pageSize: this.pageSize,
@ -146,6 +116,9 @@ export default {
} else {
this.$message.error(msg)
}
} else {
}
},
//

68
src/views/modules/workSys/mapConfig.vue

@ -2,8 +2,9 @@
<div style="position: relative">
<div class="div_search">
<el-select v-model="selAgencyId"
placeholder="请选择未添加标注的组织">
placeholder="无下级组织">
<el-option @click.native="orgChange(index)"
v-for="(item,index) in subAgencyArray"
:key="item.id"
@ -11,7 +12,7 @@
:value="item.id">
</el-option>
</el-select>
<div v-if="subAgencyArray.length>0">
<el-button v-if="showBtn&&!hasPolygon"
style="margin-left:10px"
type="primary"
@ -27,7 +28,7 @@
type="primary"
icon="el-icon-delete"
@click="handleDelPolygon">删除区域</el-button> -->
</div>
</div>
<div class="div_back">
<el-button v-if="runNum>0"
@ -36,6 +37,9 @@
icon="el-icon-back"
@click="handleBack">返回上一级</el-button>
</div>
<div class="div_tip">
<span>按住alt键单击标注可以进入下一级地图</span>
</div>
<div id="map"
class="div_map"
:style="{height:mapHeight+'px'}"></div>
@ -153,6 +157,7 @@ const vueGis = {
async mounted () {
//
await this.loadOrgData()
// this.runAgency.push(this.orgData)
//
this.initMap()
@ -167,7 +172,6 @@ const vueGis = {
methods: {
//
orgChange (index) {
this.selAgencyIndex = index
selectedFeatures.clear()
@ -204,20 +208,6 @@ const vueGis = {
}
},
//
highlightPolygon () {
let features = polygonSource.getFeatures()
features.forEach(element => {
if (element.id_ === this.selAgencyId) {
selectedFeatures.push(element)
}
});
},
//
handleBack () {
@ -248,11 +238,18 @@ const vueGis = {
if (code === 0) {
this.orgData = data
this.runAgency.push(data)
this.subAgencyArray = []
if (this.runNum === 0) {//
this.subAgencyArray.push(data)
this.selAgencyId = data.id
} else {
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
this.selAgencyId = this.subAgencyArray[0].id
} else {
this.subAgencyArray = []
this.selAgencyId = ''
}
}
} else {
@ -322,7 +319,6 @@ const vueGis = {
//feature
selectFeature (e) {
// console.log(e)
if (this.method === undefined || this.method === '') {
this.selAgencyId = e.selected[0].id_
@ -360,6 +356,18 @@ const vueGis = {
}
},
//
highlightPolygon () {
let features = polygonSource.getFeatures()
features.forEach(element => {
if (element.id_ === this.selAgencyId) {
selectedFeatures.push(element)
}
});
},
//
setMapLocation () {
this.centerPoint = []
@ -416,7 +424,7 @@ const vueGis = {
})
map.on('singleclick', function (e) {
console.log(e.coordinate)
// console.log(e.coordinate)
// console.log(transform(e.coordinate, 'EPSG:3857', 'EPSG:4326'));
})
@ -533,7 +541,6 @@ const vueGis = {
},
//
handleDelPolygon () {
map.removeInteraction(draw);
@ -616,6 +623,7 @@ const vueGis = {
});
},
//
async addPolygon (coorString) {
const url = "/gov/org/agency/mapaddarea"
@ -642,7 +650,6 @@ const vueGis = {
});
}
},
//
@ -739,19 +746,28 @@ export default vueGis;
<style scoped>
.div_search {
z-index: 9999;
z-index: 10;
position: absolute;
top: 20px;
left: 20px;
display: flex;
}
.div_back {
z-index: 9999;
z-index: 10;
position: absolute;
top: 20px;
right: 20px;
display: flex;
}
.div_tip {
z-index: 10;
position: absolute;
bottom: 1px;
right: 2px;
background: rgba(255, 255, 255, 0.6);
padding: 3px 10px;
font-size: 15px;
}
.div_map {
width: 100%;
}

Loading…
Cancel
Save