{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CmgtDutyVehicleMonitor.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CmgtDutyVehicleMonitor.vue","mtime":1669105893759},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-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\r\n\r\nimport VehicleManage from '@/api/manager/duty/vehicleManage.js'\r\n\r\nexport default {\r\n name: 'CmgtDutyVehicleMonitor',\r\n components: {\r\n },\r\n data() {\r\n return {\r\n // src: '/gisapi/station-n-map/#/DeviceManagerGisView?mapMode=2D',\r\n src: 'http://183.230.176.125:18081/station-n-map/#/DeviceManagerGisView?mapMode=2D',\r\n timer: null,\r\n point: {},\r\n showDialog: false,\r\n top: 0,\r\n left: 0\r\n }\r\n },\r\n mounted() {\r\n const t = this\r\n this.timer = setInterval(function() {\r\n t.loadVehicle()\r\n }, 6000)\r\n\r\n setTimeout(function() {\r\n t.$refs.windowiframe.contentWindow.deviceGisFunction.addPickListener((p) => {\r\n // t.$refs.windowiframe.contentWindow.deviceGisFunction.removePopupLocator()\r\n t.showDialogData(p)\r\n })\r\n }, 10000)\r\n },\r\n\r\n destroyed() {\r\n if (this.timer) {\r\n window.clearInterval(this.timer)\r\n }\r\n },\r\n methods: {\r\n\r\n showDialogData(point) {\r\n if (point.data) {\r\n this.point = point\r\n this.showDialog = true\r\n if (this.point.data.area) {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.clearElectronicFence()\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addElectronicFence({ id: this.point.data.id, points: JSON.parse(this.point.data.area) }, [])\r\n }\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addPopupLocator(\r\n {\r\n position: point.gisPosition,\r\n locator: (windowPosition) => {\r\n this.left = parseInt(windowPosition.x) - 5\r\n this.top = parseInt(windowPosition.y) + 12\r\n }\r\n }\r\n )\r\n }\r\n },\r\n\r\n closeDialog() {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.removePopupLocator()\r\n this.point = {\r\n data: null\r\n }\r\n this.showDialog = false\r\n },\r\n\r\n loadVehicle() {\r\n VehicleManage.loadVehicle({\r\n pageBean: {\r\n pageSize: 20,\r\n page: 1\r\n },\r\n params: {},\r\n querys: [{\r\n group: 'main',\r\n operation: 'NOTNULL',\r\n parentGroup: '',\r\n property: 'location_',\r\n relation: 'AND',\r\n value: 'null'\r\n }]\r\n }, res => {\r\n const vs = res.rows.map(m => {\r\n return { id: m.id, point: m.location.split(',', 2).map(Number),\r\n statusName: (m.status === 'ONLINE' ? '在线' : (m.status === 'CROSSING' ? '越界' : '离线')),\r\n flashInterval: (m.status === 'CROSSING' ? 300 : 0),\r\n icon: (m.status === 'ONLINE' ? 'DUTY_V3_ONLINE.png' : (m.status === 'CROSSING' ? 'DUTY_V3_ERROR.png' : 'DUTY_V3_OFFLINE.png')),\r\n 'areaCode': 'CQBZ_BGC_F1', ...m }\r\n })\r\n if (this.$refs.windowiframe && this.$refs.windowiframe.contentWindow && this.$refs.windowiframe.contentWindow.deviceGisFunction) {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addCarData(vs)\r\n }\r\n // console.log('-------------vs-------------', JSON.stringify(vs))\r\n })\r\n }\r\n\r\n }\r\n}\r\n",null]}