diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js new file mode 100644 index 0000000..f5dc2bf --- /dev/null +++ b/src/api/ywts/cszl/gw.js @@ -0,0 +1,21 @@ +/** + * 管网接口 + */ +import request from "@/utils/request"; +// 智慧管网-管网概况统计 +export function getStatistics() { + return request({ + url: "zhgw-gktj/zhgw/gwgktj", + method: "post" + }); +} + +// 智慧管网-管网物联设备点位列表 +export function getArea(data) { + return request({ + url: "zhgw-gktj/zhgw/sbdwlb", + method: "post", + data, + params: data + }); +} diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js new file mode 100644 index 0000000..f5dc2bf --- /dev/null +++ b/src/api/ywts/cszl/gw.js @@ -0,0 +1,21 @@ +/** + * 管网接口 + */ +import request from "@/utils/request"; +// 智慧管网-管网概况统计 +export function getStatistics() { + return request({ + url: "zhgw-gktj/zhgw/gwgktj", + method: "post" + }); +} + +// 智慧管网-管网物联设备点位列表 +export function getArea(data) { + return request({ + url: "zhgw-gktj/zhgw/sbdwlb", + method: "post", + data, + params: data + }); +} diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue index 9865d3b..aad4675 100644 --- a/src/pages/ywts/cszl/gw/index.vue +++ b/src/pages/ywts/cszl/gw/index.vue @@ -1,13 +1,15 @@ + @@ -16,23 +18,38 @@ import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' import { getHeat, - getArea, getDevList, - getStatistics, getCasePointList, getCaseInfo } from "../../../../api/ywts/cszl/gd"; +import { + getStatistics, + getArea +} from "../../../../api/ywts/cszl/gw"; import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; +import Pop from "./pop.vue"; +import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model"; export default { name: 'Gw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop}, + // components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, data() { return { isListPage: false, + isShow: false, + showPop: false, + listQuery: { + deviceType: '', + startTime: '', + endTime: '', + isAlarm: '', + hasOrder: '', + keywords: '', + }, ktSelect: '', selectIndex: 'layerBtn', caseList: [], @@ -72,7 +89,7 @@ caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), menuTab: [{ - name: '基础设施', + name: '物联设备', value: 'device' } // , { @@ -91,6 +108,8 @@ } }, mounted() { + clearResetMap() + // 获取概况统计 getStatistics().then(response => { if(response.code === 200) { this.menus.device = response.data.value @@ -112,141 +131,96 @@ break } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) - } - }) - }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } - }) - data.forEach(item => { - AddLabelPoint( - item.id, - '', - this.caseIcon[item.status], - [item.lon, item.lat, 0], 'gd-case', item, - this.clickCase) - }) - } - }) - }, - // 查询工地点位 + // 查询管网物联设备点位 search() { const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) + // getArea({ + // deviceType: '', + // startTime: '', + // endTime: '', + // isAlarm: '', + // hasOrder: '', + // keywords: '', + // }).then(response => { + // if(response.code === 200) { + // clearUpMap() + // response.data.value.forEach(item => { + // // console.log(item.areaboundary) + // // todo : 画范围 + // AddLabelPoint( + // item.id, + // item.name, + // item.deviceStatus === '2' ? iconDoing: iconDone, + // [item.lon, item.lat, 0], 'gw', item, + // this.clickGw) + // }) + // } + // }) + const res = { + data: { + value: [ + { + id: '1', + name: '111', + deviceStatus: '2', + lon: '114.87665', + lat: '25.76418', + }, + { + id: '2', + name: '122211', + deviceStatus: '1', + lon: '114.87365', + lat: '25.76118', + } + ] + }} + const tempData = res.data.value + tempData.forEach(item => { + AddLabelPoint( + item.id, + item.name, + item.deviceStatus === '2' ? iconDoing : iconDone, + [item.lon, item.lat, 0], 'gw', item, + this.clickMarker) + }) }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击icon事件 + clickGw(eventArg) { const item = eventArg._data.data - // 恢复上一个marker - if(this.preCase !== null ) { - window.mmManager.removeById(this.preCase.id) - AddLabelPoint( - this.preCase.id, - '', - this.caseIcon[this.preCase.status], - [this.preCase.lon, this.preCase.lat, 0], 'gd-case', this.preCase, - this.clickCase) - } - // 保存当前marker - this.preCase = item - // 高亮当前marker - window.mmManager.removeById(item.id) - AddDivPointHighlight(item, this.caseColor[item.status]) - - // 查询事件详情 - this.isListPage = true - this.caseListQuery = { - startTime: this.time.startTime, - endTime: this.time.endTime, - id: item.id, - pageNo: 0, - pageSize: 5 - } - this.searchCaseMarkerList() - }, - // 事件换页 - changePage(val) { - if (val && val.page) { - this.caseListQuery.pageNo = val.page - } - this.searchCaseMarkerList() - }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } + this.isShow = true + console.log('点击icon', item); + this.$nextTick(() => { + this.$refs.gwPop.initData(item) }) }, - changeState(v) { - this.ktSelect = v - }, - handleTimeRange(time) { - this.isListPage = false - if(this.time.startTime !== '') { - this.time = time - this.casePoint() - } else { - this.time = time + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + // console.log(this.$refs.popRef) + this.$nextTick(() => { + this.$refs.pop.initData(item) + }) } - } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 点击menu + menuClick(e) { + console.log(e, 'menuClick') + clearResetMap() + this.search() + }, } } diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js new file mode 100644 index 0000000..f5dc2bf --- /dev/null +++ b/src/api/ywts/cszl/gw.js @@ -0,0 +1,21 @@ +/** + * 管网接口 + */ +import request from "@/utils/request"; +// 智慧管网-管网概况统计 +export function getStatistics() { + return request({ + url: "zhgw-gktj/zhgw/gwgktj", + method: "post" + }); +} + +// 智慧管网-管网物联设备点位列表 +export function getArea(data) { + return request({ + url: "zhgw-gktj/zhgw/sbdwlb", + method: "post", + data, + params: data + }); +} diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue index 9865d3b..aad4675 100644 --- a/src/pages/ywts/cszl/gw/index.vue +++ b/src/pages/ywts/cszl/gw/index.vue @@ -1,13 +1,15 @@ + @@ -16,23 +18,38 @@ import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' import { getHeat, - getArea, getDevList, - getStatistics, getCasePointList, getCaseInfo } from "../../../../api/ywts/cszl/gd"; +import { + getStatistics, + getArea +} from "../../../../api/ywts/cszl/gw"; import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; +import Pop from "./pop.vue"; +import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model"; export default { name: 'Gw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop}, + // components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, data() { return { isListPage: false, + isShow: false, + showPop: false, + listQuery: { + deviceType: '', + startTime: '', + endTime: '', + isAlarm: '', + hasOrder: '', + keywords: '', + }, ktSelect: '', selectIndex: 'layerBtn', caseList: [], @@ -72,7 +89,7 @@ caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), menuTab: [{ - name: '基础设施', + name: '物联设备', value: 'device' } // , { @@ -91,6 +108,8 @@ } }, mounted() { + clearResetMap() + // 获取概况统计 getStatistics().then(response => { if(response.code === 200) { this.menus.device = response.data.value @@ -112,141 +131,96 @@ break } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) - } - }) - }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } - }) - data.forEach(item => { - AddLabelPoint( - item.id, - '', - this.caseIcon[item.status], - [item.lon, item.lat, 0], 'gd-case', item, - this.clickCase) - }) - } - }) - }, - // 查询工地点位 + // 查询管网物联设备点位 search() { const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) + // getArea({ + // deviceType: '', + // startTime: '', + // endTime: '', + // isAlarm: '', + // hasOrder: '', + // keywords: '', + // }).then(response => { + // if(response.code === 200) { + // clearUpMap() + // response.data.value.forEach(item => { + // // console.log(item.areaboundary) + // // todo : 画范围 + // AddLabelPoint( + // item.id, + // item.name, + // item.deviceStatus === '2' ? iconDoing: iconDone, + // [item.lon, item.lat, 0], 'gw', item, + // this.clickGw) + // }) + // } + // }) + const res = { + data: { + value: [ + { + id: '1', + name: '111', + deviceStatus: '2', + lon: '114.87665', + lat: '25.76418', + }, + { + id: '2', + name: '122211', + deviceStatus: '1', + lon: '114.87365', + lat: '25.76118', + } + ] + }} + const tempData = res.data.value + tempData.forEach(item => { + AddLabelPoint( + item.id, + item.name, + item.deviceStatus === '2' ? iconDoing : iconDone, + [item.lon, item.lat, 0], 'gw', item, + this.clickMarker) + }) }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击icon事件 + clickGw(eventArg) { const item = eventArg._data.data - // 恢复上一个marker - if(this.preCase !== null ) { - window.mmManager.removeById(this.preCase.id) - AddLabelPoint( - this.preCase.id, - '', - this.caseIcon[this.preCase.status], - [this.preCase.lon, this.preCase.lat, 0], 'gd-case', this.preCase, - this.clickCase) - } - // 保存当前marker - this.preCase = item - // 高亮当前marker - window.mmManager.removeById(item.id) - AddDivPointHighlight(item, this.caseColor[item.status]) - - // 查询事件详情 - this.isListPage = true - this.caseListQuery = { - startTime: this.time.startTime, - endTime: this.time.endTime, - id: item.id, - pageNo: 0, - pageSize: 5 - } - this.searchCaseMarkerList() - }, - // 事件换页 - changePage(val) { - if (val && val.page) { - this.caseListQuery.pageNo = val.page - } - this.searchCaseMarkerList() - }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } + this.isShow = true + console.log('点击icon', item); + this.$nextTick(() => { + this.$refs.gwPop.initData(item) }) }, - changeState(v) { - this.ktSelect = v - }, - handleTimeRange(time) { - this.isListPage = false - if(this.time.startTime !== '') { - this.time = time - this.casePoint() - } else { - this.time = time + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + // console.log(this.$refs.popRef) + this.$nextTick(() => { + this.$refs.pop.initData(item) + }) } - } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 点击menu + menuClick(e) { + console.log(e, 'menuClick') + clearResetMap() + this.search() + }, } } diff --git a/src/pages/ywts/cszl/gw/pop.vue b/src/pages/ywts/cszl/gw/pop.vue new file mode 100644 index 0000000..053b489 --- /dev/null +++ b/src/pages/ywts/cszl/gw/pop.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js new file mode 100644 index 0000000..f5dc2bf --- /dev/null +++ b/src/api/ywts/cszl/gw.js @@ -0,0 +1,21 @@ +/** + * 管网接口 + */ +import request from "@/utils/request"; +// 智慧管网-管网概况统计 +export function getStatistics() { + return request({ + url: "zhgw-gktj/zhgw/gwgktj", + method: "post" + }); +} + +// 智慧管网-管网物联设备点位列表 +export function getArea(data) { + return request({ + url: "zhgw-gktj/zhgw/sbdwlb", + method: "post", + data, + params: data + }); +} diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue index 9865d3b..aad4675 100644 --- a/src/pages/ywts/cszl/gw/index.vue +++ b/src/pages/ywts/cszl/gw/index.vue @@ -1,13 +1,15 @@ + @@ -16,23 +18,38 @@ import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' import { getHeat, - getArea, getDevList, - getStatistics, getCasePointList, getCaseInfo } from "../../../../api/ywts/cszl/gd"; +import { + getStatistics, + getArea +} from "../../../../api/ywts/cszl/gw"; import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; +import Pop from "./pop.vue"; +import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model"; export default { name: 'Gw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop}, + // components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, data() { return { isListPage: false, + isShow: false, + showPop: false, + listQuery: { + deviceType: '', + startTime: '', + endTime: '', + isAlarm: '', + hasOrder: '', + keywords: '', + }, ktSelect: '', selectIndex: 'layerBtn', caseList: [], @@ -72,7 +89,7 @@ caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), menuTab: [{ - name: '基础设施', + name: '物联设备', value: 'device' } // , { @@ -91,6 +108,8 @@ } }, mounted() { + clearResetMap() + // 获取概况统计 getStatistics().then(response => { if(response.code === 200) { this.menus.device = response.data.value @@ -112,141 +131,96 @@ break } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) - } - }) - }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } - }) - data.forEach(item => { - AddLabelPoint( - item.id, - '', - this.caseIcon[item.status], - [item.lon, item.lat, 0], 'gd-case', item, - this.clickCase) - }) - } - }) - }, - // 查询工地点位 + // 查询管网物联设备点位 search() { const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) + // getArea({ + // deviceType: '', + // startTime: '', + // endTime: '', + // isAlarm: '', + // hasOrder: '', + // keywords: '', + // }).then(response => { + // if(response.code === 200) { + // clearUpMap() + // response.data.value.forEach(item => { + // // console.log(item.areaboundary) + // // todo : 画范围 + // AddLabelPoint( + // item.id, + // item.name, + // item.deviceStatus === '2' ? iconDoing: iconDone, + // [item.lon, item.lat, 0], 'gw', item, + // this.clickGw) + // }) + // } + // }) + const res = { + data: { + value: [ + { + id: '1', + name: '111', + deviceStatus: '2', + lon: '114.87665', + lat: '25.76418', + }, + { + id: '2', + name: '122211', + deviceStatus: '1', + lon: '114.87365', + lat: '25.76118', + } + ] + }} + const tempData = res.data.value + tempData.forEach(item => { + AddLabelPoint( + item.id, + item.name, + item.deviceStatus === '2' ? iconDoing : iconDone, + [item.lon, item.lat, 0], 'gw', item, + this.clickMarker) + }) }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击icon事件 + clickGw(eventArg) { const item = eventArg._data.data - // 恢复上一个marker - if(this.preCase !== null ) { - window.mmManager.removeById(this.preCase.id) - AddLabelPoint( - this.preCase.id, - '', - this.caseIcon[this.preCase.status], - [this.preCase.lon, this.preCase.lat, 0], 'gd-case', this.preCase, - this.clickCase) - } - // 保存当前marker - this.preCase = item - // 高亮当前marker - window.mmManager.removeById(item.id) - AddDivPointHighlight(item, this.caseColor[item.status]) - - // 查询事件详情 - this.isListPage = true - this.caseListQuery = { - startTime: this.time.startTime, - endTime: this.time.endTime, - id: item.id, - pageNo: 0, - pageSize: 5 - } - this.searchCaseMarkerList() - }, - // 事件换页 - changePage(val) { - if (val && val.page) { - this.caseListQuery.pageNo = val.page - } - this.searchCaseMarkerList() - }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } + this.isShow = true + console.log('点击icon', item); + this.$nextTick(() => { + this.$refs.gwPop.initData(item) }) }, - changeState(v) { - this.ktSelect = v - }, - handleTimeRange(time) { - this.isListPage = false - if(this.time.startTime !== '') { - this.time = time - this.casePoint() - } else { - this.time = time + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + // console.log(this.$refs.popRef) + this.$nextTick(() => { + this.$refs.pop.initData(item) + }) } - } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 点击menu + menuClick(e) { + console.log(e, 'menuClick') + clearResetMap() + this.search() + }, } } diff --git a/src/pages/ywts/cszl/gw/pop.vue b/src/pages/ywts/cszl/gw/pop.vue new file mode 100644 index 0000000..053b489 --- /dev/null +++ b/src/pages/ywts/cszl/gw/pop.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/pages/ywts/zyhj/yl/index.vue b/src/pages/ywts/zyhj/yl/index.vue index 787d735..af47c91 100644 --- a/src/pages/ywts/zyhj/yl/index.vue +++ b/src/pages/ywts/zyhj/yl/index.vue @@ -218,6 +218,7 @@ }, // 点击icon事件 clickYl(eventArg) { + console.log('clickYl'); const item = eventArg._data.data this.isShow = true this.$nextTick(() => { @@ -226,6 +227,7 @@ }, // 点击事件icon clickCase(eventArg) { + console.log('clickCase'); const item = eventArg._data.data // 恢复上一个marker if (this.preCase !== null) { @@ -340,6 +342,7 @@ }, // 点击点位 clickMarker(eventArg) { + console.log('clickMarker'); const showPop = (e) => { const item = e._data.data this.showPop = true