{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\IntelligentDeviceManage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\IntelligentDeviceManage.vue","mtime":1703831130600},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-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//\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 pagination from '@/components/pagination'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport IntelligentDevice from '@/api/basicConfiguration/IntelligentDevice'\r\nimport IntelligentDeviceDialog from './components/IntelligentDeviceDialog'\r\nimport utils from '@/utils.js'\r\nimport MapInit from '@/components/MapInit.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\n\r\nimport 'leaflet/dist/leaflet.css'\r\nimport 'leaflet.markercluster/dist/MarkerCluster.css'\r\nimport 'leaflet.markercluster/dist/MarkerCluster.Default.css'\r\nimport L from 'leaflet'\r\nimport 'leaflet.markercluster'\r\nimport wanzhou from '@/assets/js/wanzhougeojson.js'\r\n\r\nexport default {\r\n name: 'NoiseLevelManage',\r\n components: {\r\n pagination,\r\n IntelligentDeviceDialog,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n markLoading: false,\r\n tableMaxHeight: 400,\r\n tableData: [],\r\n sblxList: [], //设备类型\r\n pageResult: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'name',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'type',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n reqData: {\r\n querys: [],\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n showTotal: true,\r\n },\r\n },\r\n tableLoading: false,\r\n deleteIds: '',\r\n parameter: {\r\n size: 20,\r\n page: 1,\r\n },\r\n map: null,\r\n baseMapOverlay: null,\r\n zoom: 9,\r\n Clusterer: null,\r\n currentRow: null,\r\n }\r\n },\r\n\r\n created() {\r\n this.sblxList = dictUtils.getDictItemsFromCache('sblx')\r\n },\r\n mounted() {\r\n this.$nextTick(() => {\r\n this.roadMap()\r\n this.getData()\r\n })\r\n },\r\n methods: {\r\n roadMap() {\r\n this.map = new L.Map('map', {\r\n crs: L.CRS.EPSG4326,\r\n scrollWheelZoom: true,\r\n attributionControl: false,\r\n zoomControl: false,\r\n center: [30.707807, 108.390246],\r\n zoom: this.zoom,\r\n // layers: [lay, lay2],\r\n })\r\n const imageURL =\r\n window.context.frontMap +\r\n '/vec_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles' +\r\n '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}' +\r\n '&tk=bff554ec2d59ec30f9f7debffd440624'\r\n\r\n // 卫星底图\r\n const imageURL2 =\r\n window.context.frontMap +\r\n '/cva_c/wmts?layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles' +\r\n '&TileMatrix={z}&TileCol={x}&TileRow={y}' +\r\n '&tk=f6df78cf1738e5623e2291f608e7040e'\r\n //\t正常线路地图\r\n // const imageURLT = \"http://t0.tianditu.gov.cn/cia_w/wmts?\" +\r\n // \t\"SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles\" +\r\n // \t\"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}\" +\r\n // \t\"&tk=f6df78cf1738e5623e2291f608e7040e\";\r\n const lay = new L.TileLayer(imageURL, {\r\n zoomOffset: 1,\r\n zIndex: 1,\r\n })\r\n\r\n const lay2 = new L.TileLayer(imageURL2, {\r\n zoomOffset: 1,\r\n zIndex: 2,\r\n })\r\n const config = {\r\n layers: [lay, lay2],\r\n }\r\n\r\n lay2.addTo(this.map)\r\n lay.addTo(this.map)\r\n this.initWZ()\r\n },\r\n initWZ() {\r\n let countries = []\r\n countries = wanzhou.features\r\n var myStyle = {\r\n color: '#1a8cff', //'#d2e0e1',\r\n weight: 3,\r\n opacity: 1,\r\n fillColor: 'transparent', //'transparent',\r\n fillOpacity: 0,\r\n }\r\n this.baseMapOverlay = new L.geoJSON(countries, {\r\n style: myStyle,\r\n })\r\n this.map.addLayer(this.baseMapOverlay)\r\n this.baseMapOverlay.bringToBack()\r\n },\r\n //获取数据\r\n getData(page) {\r\n // this.map.clearOverLays()\r\n if (page) {\r\n this.reqData.pageBean.page = page\r\n }\r\n this.tableLoading = true\r\n this.reqData.querys = []\r\n if (this.querys[0].value) {\r\n this.reqData.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.reqData.querys.push(this.querys[1])\r\n }\r\n IntelligentDevice.dataQuery(this.reqData, (res) => {\r\n this.pageResult.total = res.total\r\n this.tableLoading = false\r\n this.tableData = res.rows\r\n this.tableData.length\r\n ? this.handlePoint(this.tableData)\r\n : this.clearPoints()\r\n })\r\n },\r\n handleCurrentRow(val) {\r\n this.currentRow = val\r\n this.currentRow && this.handlePoint([this.currentRow])\r\n },\r\n drawPoints(data) {\r\n //图标\r\n var icon = new L.icon({\r\n iconUrl: require('@/assets/img/icon-2.png'), //请求图标图片的URL\r\n iconSize: new L.point(30, 30), //图标可视区域的大小。\r\n iconAnchor: new L.point(15, 15),\r\n })\r\n this.MarkerGroup = [] //存放节点\r\n\r\n data.forEach((item) => {\r\n // let latlng = new L.LatLng(item.lttd, item.lgtd)\r\n var position = new L.LatLng(\r\n Number(item.lttd),\r\n Number(item.lgtd)\r\n )\r\n let marker = new L.Marker(position, {\r\n icon: icon,\r\n autoPan: true,\r\n })\r\n marker.bindPopup(`${item.name}`).openPopup()\r\n this.Clusterer.addLayer(marker)\r\n })\r\n this.map.addLayer(this.Clusterer)\r\n },\r\n handlePoint(data) {\r\n this.clearPoints()\r\n this.markerClusterer()\r\n this.drawPoints(data)\r\n },\r\n markerClusterer(type) {\r\n // 初始化点聚合\r\n this.Clusterer = new L.markerClusterGroup({\r\n spiderfyOnMaxZoom: false,\r\n showCoverageOnHover: false,\r\n zoomToBoundsOnClick: true,\r\n })\r\n\r\n // 聚合点点击事件,点击展开点\r\n this.Clusterer.on('clusterclick', function (e) {\r\n e.layer.zoomToBounds()\r\n })\r\n },\r\n clearPoints(type) {\r\n this.Clusterer &&\r\n this.Clusterer.clearLayers &&\r\n this.Clusterer.clearLayers()\r\n },\r\n handleCommand(command, row) {\r\n console.log(row, command)\r\n switch (command) {\r\n case 'edit':\r\n this.$refs.formDialog.edit(row.id)\r\n\r\n break\r\n case 'delete':\r\n this.$confirm('确认删除吗?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'success',\r\n }).then(() => {\r\n this.markLoading = true\r\n IntelligentDevice.remove(row.id, (res) => {\r\n if (res.state) {\r\n this.$message.success('删除成功')\r\n }\r\n this.getData(1)\r\n this.markLoading = false\r\n })\r\n })\r\n break\r\n\r\n default:\r\n break\r\n }\r\n },\r\n // 编辑\r\n handleEdit(item) {\r\n this.$refs.formDialog.edit(item.id)\r\n },\r\n // 过滤\r\n filterHandler(value, row, column) {\r\n return row.pilotLevel == value\r\n },\r\n // 删除\r\n handleDelete(item) {\r\n this.$confirm('确认删除吗?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'success',\r\n }).then(() => {\r\n this.markLoading = true\r\n IntelligentDevice.remove(item.id, (res) => {\r\n if (res.state) {\r\n this.$message.success('删除成功')\r\n }\r\n this.markLoading = false\r\n })\r\n })\r\n },\r\n //获取删除数据id集合\r\n handleSelectionChange(val) {\r\n let arr = val.map((item) => item.id)\r\n this.deleteIds = arr.join(',')\r\n console.log(this.deleteIds)\r\n },\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n handleSizeChange(val) {\r\n this.reqData.pageBean.pageSize = val\r\n this.getData()\r\n },\r\n handleCurrentChange(val) {\r\n this.reqData.pageBean.page = val\r\n this.getData()\r\n },\r\n },\r\n}\r\n",null]}