{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\EngineerStation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\EngineerStation.vue","mtime":1684458238606},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport EngineerStationModel from './module/EngineerStationModel.vue'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport gisMap from '@/api/frontScreen/gisMap.js'\r\nimport {gisCompMixin} from '@/mixins/gisCompMixin.js'\r\nexport default {\r\n name: 'EngineerStation',\r\n components: {EngineerStationModel},\r\n mixins: [gisCompMixin],\r\n data() {\r\n return {\r\n tabComp: true,\r\n // 指定坐标字段\r\n lg: 'lgtd',\r\n lt: 'lttd',\r\n modelName: 'EngineerStationModel',\r\n // 是否需要区别icon\r\n typeIcon: true,\r\n // 不同类型icon的key\r\n iconTypeKey: 'wkcn',\r\n activeName: '',\r\n form: {\r\n mpnm: '',\r\n },\r\n iconUrl0: require('./../../../../assets/img/gis_enginStation_b.png'),\r\n iconUrl1: require('./../../../../assets/img/gis_enginStation_gary.png'),\r\n filterData: [],\r\n params: {\r\n id: '',\r\n mpcd: '',\r\n mpnm: '',\r\n rscd: '',\r\n stlc: '',\r\n sttp: '',\r\n wkcn: '',\r\n },\r\n originData: [\r\n {\r\n mpnm: '测站1',\r\n cdlx: '山洪',\r\n lgtd: '106.484406',\r\n lttd: '29.831273',\r\n wkcn: '0',\r\n mptp: 4,\r\n },\r\n {\r\n mpnm: '测站2',\r\n cdlx: '山洪',\r\n lgtd: '106.367665',\r\n lttd: '29.762964',\r\n wkcn: '1',\r\n mptp: 3,\r\n },\r\n {\r\n mpnm: '测站3',\r\n cdlx: '山洪',\r\n lgtd: '106.448409',\r\n lttd: '29.68299',\r\n wkcn: 'g',\r\n mptp: 4,\r\n },\r\n {\r\n mpnm: '测站4',\r\n cdlx: '水文',\r\n lgtd: '106.448509',\r\n lttd: '29.68239',\r\n wkcn: 'g',\r\n mptp: 3,\r\n },\r\n {\r\n mpnm: '测站5',\r\n cdlx: '水文',\r\n lgtd: '106.434606',\r\n lttd: '29.837273',\r\n wkcn: 'r',\r\n mptp: 3,\r\n },\r\n {\r\n mpnm: '测站6',\r\n cdlx: '水文',\r\n lgtd: '106.388665',\r\n lttd: '29.767964',\r\n wkcn: 'g',\r\n mptp: 4,\r\n },\r\n {\r\n mpnm: '测站7',\r\n cdlx: '水文',\r\n lgtd: '106.398409',\r\n lttd: '29.78399',\r\n wkcn: 'r',\r\n mptp: 3,\r\n },\r\n {\r\n mpnm: '测站8',\r\n cdlx: '水库',\r\n lgtd: '106.598709',\r\n lttd: '29.89799',\r\n wkcn: 'r',\r\n mptp: 4,\r\n },\r\n {\r\n mpnm: '测站9',\r\n cdlx: '水库',\r\n lgtd: '106.498709',\r\n lttd: '29.69799',\r\n wkcn: 'g',\r\n mptp: 3,\r\n },\r\n ],\r\n gqsslx: [\r\n {\r\n name: '位移',\r\n value: '1',\r\n },\r\n // todo 20220607 暂时取消\r\n // {\r\n // name: '渗流',\r\n // value: '2',\r\n // },\r\n // todo 20220607 暂时取消\r\n {\r\n name: '渗压',\r\n value: '3',\r\n },\r\n ], //工情设施类型\r\n rsnms: [],\r\n currentPoint: {\r\n mpnm: '',\r\n },\r\n }\r\n },\r\n created() {\r\n // this.filterData = this.originData\r\n this.getFindRiverList()\r\n },\r\n mounted() {\r\n this.$nextTick(async () => {\r\n // this.gqsslx = dictUtils.getDictItemsFromCache('gqsslx')\r\n this.activeName = this.gqsslx[0].value\r\n await this.getFindGqStation()\r\n this.initMarkers()\r\n })\r\n //自动刷新获取数据(1000*60*10=>毫秒*秒*分钟,此时表示为10分钟)\r\n \tthis.refreshData=setInterval(()=>{\r\n \tthis.getFindGqStation()\r\n \tthis.updateMarkers()\r\n \t},1000*60*10);\r\n },\r\n //生命周期若已设置定时器,需清空定时器beforeDestroy()\r\n beforeDestroy(){\r\n \tclearInterval(this.refreshData);\r\n \tthis.refreshData=null;\r\n },\r\n methods: {\r\n getFindRiverList() {\r\n gisMap.geFindAll({}, (res) => {\r\n if (res.value) {\r\n this.rsnms = res.value\r\n }\r\n })\r\n },\r\n getFindGqStation() {\r\n return new Promise((resolve, reject) => {\r\n this.params.sttp = this.activeName\r\n gisMap.findGqStation(this.params, (res) => {\r\n if (res.state) {\r\n this.filterData = res.value\r\n // this.filterData.forEach(e=>{\r\n // \te.lgtd= '106.367665'\r\n // \te.lttd= '29.762964'\r\n // })\r\n resolve()\r\n }\r\n reject()\r\n })\r\n })\r\n },\r\n async handleTabClick(key) {\r\n this.calcTableHeight()\r\n this.map.closePopup()\r\n await this.getFindGqStation()\r\n this.updateMarkers()\r\n },\r\n drwaMarkers(latlng, name, item) {\r\n // 图片\r\n let icon = new L.icon({\r\n iconUrl: this[`${item.wkcn == 0 ? 'g' : 'r'}IconUrl`],\r\n iconSize: new L.point(24, 24),\r\n iconAnchor: new L.point(12, 20),\r\n })\r\n // 标点\r\n const sectionMarker = new L.marker(latlng, {icon})\r\n\r\n // label\r\n // const label = new T.Label({\r\n // text: name,\r\n // position: latlng,\r\n // offset: new this.T.Point(-9, 18),\r\n // })\r\n let infoWin = this.infoWindow()\r\n this.sectionMarker.addEventListener('click', () => {\r\n this.currentPoint = item\r\n infoWin.update()\r\n this.showInfo = true\r\n this.sectionMarker.openInfoWindow(infoWin)\r\n }) // 将标注添加到地图中\r\n this.map.addLayer(sectionMarker)\r\n // this.map.addOverLay(label)\r\n },\r\n tableRowClassName(row) {\r\n if (row.row.wkcn == 0) {\r\n return 'warning-row'\r\n }\r\n },\r\n infoWindow() {\r\n let sContent = this.$refs.EngineerStationModel.$el\r\n var infoWin = new L.popup({\r\n autoPan: true,\r\n maxHeight: 300,\r\n minWidth: 440,\r\n maxWidth: 600,\r\n }).setContent(sContent)\r\n return infoWin\r\n },\r\n async changeSearch() {\r\n // this.params.mpnm=this.form.mpnm\r\n await this.getFindGqStation()\r\n this.updateMarkers()\r\n },\r\n updateMarkers() {\r\n // 获得新的列表数据后清除旧的标点、重新创建地图标点\r\n this.searchClear = true\r\n this.clearMarkers()\r\n this.searchClear = false\r\n this.initMarkers()\r\n },\r\n },\r\n}\r\n",null]}