diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index cfa00bafb..0d52a6e1e 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -216,7 +216,7 @@ export default { headerTypeList: [ { title: "序号", coulmn: 'index' }, { title: "单位名称", coulmn: 'unitName' }, - { title: "单位类型", coulmn: 'type' }, + { title: "单位类型", coulmn: 'typeName' }, ], headerStyle: [ { @@ -290,14 +290,15 @@ export default { await nextTick(100); await this.getAgencyList() await this.loadOrgData() + await this.getCateType(this.agencyId) this.loadUnit() this.getList(this.agencyId) this.getUnitList(this.agencyId) this.getCateCount(this.agencyId) - this.getCateType(this.agencyId) + await this.getWorkUserInfo() - await this.getMapUnitList(this.agencyId) + // await this.getMapUnitList(this.agencyId) }, watch: { timeRange (val) { @@ -490,6 +491,12 @@ export default { index: index + 1 } }) + const url = require('../../../../assets/img/shuju/measure/other.png') + this.iconUrlArray = [url, url, url, url, url, url, url, url] + + + //第一次加载完置为false + this.loadMap() } else { this.$message.error(msg) } @@ -676,7 +683,7 @@ export default { this.$message.error(msg) } }, - handleCascader (val) { + async handleCascader (val) { console.log('val-vvv', val) if (val.length > 0) { const _arr = val[val.length - 1].split('-') @@ -684,10 +691,11 @@ export default { this.agencyId = _arr[0] this.unitType = '' this.getList(_arr[0]) + await this.getCateType(_arr[0]) this.getUnitList(_arr[0]) this.getMapUnitList(_arr[0]) this.getCateCount(_arr[0]) - this.getCateType(_arr[0]) + } }, @@ -818,18 +826,18 @@ export default { item.urlIndex = 7 } }); - - - this.iconUrlArray = [ - require('../../../../assets/img/shuju/measure/lxdj.png'),//楼宇党建 - require('../../../../assets/img/shuju/measure/lxzz.png'),//两新组织 - require('../../../../assets/img/shuju/measure/qydw.png'),//区域单位党建 - require('../../../../assets/img/shuju/measure/jgzs.png'),//机关直属部门 - require('../../../../assets/img/shuju/measure/qita.png'),//社会团体 - require('../../../../assets/img/shuju/measure/minban.png'),//民办 - require('../../../../assets/img/shuju/measure/jijin.png'),//基金 - require('../../../../assets/img/shuju/measure/other.png')//其他 - ] + const url = require('../../../../assets/img/shuju/measure/other.png') + // this.iconUrlArray = [ + // require('../../../../assets/img/shuju/measure/lxdj.png'),//楼宇党建 + // require('../../../../assets/img/shuju/measure/lxzz.png'),//两新组织 + // require('../../../../assets/img/shuju/measure/qydw.png'),//区域单位党建 + // require('../../../../assets/img/shuju/measure/jgzs.png'),//机关直属部门 + // require('../../../../assets/img/shuju/measure/qita.png'),//社会团体 + // require('../../../../assets/img/shuju/measure/minban.png'),//民办 + // require('../../../../assets/img/shuju/measure/jijin.png'),//基金 + // require('../../../../assets/img/shuju/measure/other.png')//其他 + // ] + this.iconUrlArray = [url, url, url, url, url, url, url, url] //第一次加载完置为false @@ -848,22 +856,12 @@ export default { loadMap () { if (this.isfirstInit) { //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray - const _arr = [{ - "orgId": "6e511da6816e53af4cda952365a26eb9", - "count": 3, - "longitude": 120.361234, - "latitude": 36.094239, - "coordinates": "120.37347632357346,36.09504294565885,120.37521581993865,36.08259177518083,120.38620214806365,36.08240866726736,120.39343481896871,36.08039450117393,120.40158302420245,36.08048605775001,120.40194921907464,36.08240866726736,120.40085059254857,36.08506369796122,120.39947730153294,36.087535620741605,120.39792091831991,36.08973288950982,120.39801245917992,36.09284567689063,120.39892798303121,36.094859837745375,120.39892798303121,36.096782447262726,120.3927939491296,36.0965993419686,120.37347632357346,36.09504294565885", - "color": "#00E5ED", - "fillColor": "rgba(0, 229, 237, 0.16)" - }] + const polIconUrlArray = [ - 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png', - 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a775d15e62374350b80e5cdf1912a4eb.png', - 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/884efcf6d6b44224a7fda599dd1b14cb.png' + 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png' ] - - this.$refs.map.loadMap(this.agencyInfo, this.parentPolygon, polIconUrlArray, this.unitMapList, this.iconUrlArray, null) + console.log('this.unitTableData', this.unitTableData) + this.$refs.map.loadMap(this.agencyInfo, this.parentPolygon, polIconUrlArray, this.unitTableData, this.iconUrlArray, null) } else { this.$refs.map.refreshMap(null, this.unitMapList) diff --git a/src/views/modules/visual/communityParty/unitInfo.vue b/src/views/modules/visual/communityParty/unitInfo.vue index 37b9830e1..be42ad312 100644 --- a/src/views/modules/visual/communityParty/unitInfo.vue +++ b/src/views/modules/visual/communityParty/unitInfo.vue @@ -108,9 +108,9 @@ import { requestPost } from "@/js/dai/request"; export default { name: "dialogInfo", props: { - userId: { - type: String, - default: "", + list: { + type: Array, + default: () => [], }, gridName: { type: String, diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue index 77d91ae3d..93c8aa2a5 100644 --- a/src/views/modules/visual/components/screen-map/index.vue +++ b/src/views/modules/visual/components/screen-map/index.vue @@ -251,7 +251,6 @@ const vueGis = { this.addOverlay() } - console.log('showPolIconLayer-----------------------', this.showPolIconLayer) this.addMapClick() }, @@ -362,7 +361,7 @@ const vueGis = { id: oneIcon.id_ } }); - console.log('oneIcon----', oneIcon) + // console.log('oneIcon----', oneIcon) let polyIconStyle = new Style({ image: new Icon({ // anchor: [0.5, 0.5], @@ -383,7 +382,6 @@ const vueGis = { //加载icon图标 loadIcon () { iconSource.clear()//清空多边形标注 - if (this.iconArrays && this.iconArrays.length > 0) { let iconFeatures = []; @@ -399,13 +397,13 @@ const vueGis = { info: { ...oneIcon } } }); - + console.log('oneIcon-----ttt', oneIcon) let iconStyle = new Style({ image: new Icon({ // anchor: [0.5, 0.5], // imgSize: [32, 32], // scale: 0.5, - src: this.iconUrlArray[oneIcon.urlIndex] + src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0] }), // text: createTextStyle(oneIcon) }); @@ -591,7 +589,7 @@ const vueGis = { //初始化icon图层 initIconLayer () { - + console.log('initttttt-----icon') iconSource = new VectorSource({ //features: (new GeoJSON()).readFeatures(geojsonObject) });