{"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":1691463999680},{"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//\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 VehicleManage from '@/api/manager/duty/vehicleManage.js'\r\n\r\nexport default {\r\n name: 'CmgtDutyVehicleMonitor',\r\n components: {},\r\n data() {\r\n return {\r\n // src: '/gisapi/station-n-map/#/DeviceManagerGisView?mapMode=2D',\r\n src:\r\n window.context.map +\r\n '/station-n-map/#/DeviceManagerGisView?mapMode=2D',\r\n point: {},\r\n showDialog: false,\r\n top: 0,\r\n left: 0,\r\n btnBoolen: true, //控制筛选弹层的显示与隐藏\r\n searchForm: {\r\n endTime: '',\r\n startTime: '',\r\n vehicleCode: ''\r\n },\r\n carList: [],\r\n rules: {\r\n vehicleCode: [\r\n {required: true, message: '请选择车辆', trigger: 'blur'}\r\n ],\r\n endTime: [\r\n {required: true, message: '请选择开始时间', trigger: 'blur'}\r\n ],\r\n startTime: [\r\n {required: true, message: '请选择结束时间', trigger: 'blur'}\r\n ]\r\n },\r\n timer:null\r\n }\r\n },\r\n created() {\r\n this.loadVehicle()\r\n },\r\n mounted() {\r\n const t = this\r\n this.timer = setInterval(function() {\r\n if (t.$refs.windowiframe.contentWindow.deviceGisFunction) {\r\n t.$refs.windowiframe.contentWindow.deviceGisFunction.layerVisible(\r\n []\r\n )\r\n t.$refs.windowiframe.contentWindow.deviceGisFunction.addPickListener(\r\n p => {\r\n // t.$refs.windowiframe.contentWindow.deviceGisFunction.removePopupLocator()\r\n t.showDialogData(p)\r\n }\r\n )\r\n clearInterval(t.timer)\r\n }\r\n }, 500)\r\n },\r\n methods: {\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(\r\n {\r\n id: this.point.data.id,\r\n points: JSON.parse(this.point.data.area)\r\n },\r\n []\r\n )\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 {\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n },\r\n params: {},\r\n querys: [\r\n {\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 ]\r\n },\r\n res => {\r\n this.carList = res.rows\r\n // const vs = res.rows.map(m => {\r\n // return {\r\n // id: m.id,\r\n // point: m.location.split(',', 2).map(Number),\r\n // statusName:\r\n // m.status === 'ONLINE'\r\n // ? '在线'\r\n // : m.status === 'CROSSING'\r\n // ? '越界'\r\n // : '离线',\r\n // flashInterval: m.status === 'CROSSING' ? 300 : 0,\r\n // icon:\r\n // m.status === 'ONLINE'\r\n // ? 'DUTY_V3_ONLINE.png'\r\n // : m.status === 'CROSSING'\r\n // ? 'DUTY_V3_ERROR.png'\r\n // : 'DUTY_V3_OFFLINE.png',\r\n // areaCode: 'CQBZ_BGC_F1',\r\n // ...m\r\n // }\r\n // })\r\n // const vs = [\r\n // {\r\n // id: '1668565199910608896',\r\n // name: '北广场岗亭1号',\r\n // dtype: 'WATCH',\r\n // longitude: '29.610250759373802',\r\n // latitude: '106.54715378409952',\r\n // area: '北广场配套服务区西',\r\n // areaCode: 'CQBZ_BGC_B1_004',\r\n // point: [106.54715378409952, 29.610250759373802],\r\n // icon: 'DUTY_V3_ONLINE.png'\r\n // }\r\n // ]\r\n // if (\r\n // this.$refs.windowiframe &&\r\n // this.$refs.windowiframe.contentWindow &&\r\n // this.$refs.windowiframe.contentWindow.deviceGisFunction\r\n // ) {\r\n // this.$refs.windowiframe.contentWindow.deviceGisFunction.addCarData(\r\n // vs\r\n // )\r\n // }\r\n // console.log('-------------vs-------------', JSON.stringify(vs))\r\n }\r\n )\r\n },\r\n // 获取图层数据\r\n getCarLat() {\r\n this.$refs.form.validate(valid => {\r\n if (valid) {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.clearPolyline()\r\n VehicleManage.getVehicleLat(\r\n this.qs.stringify(this.searchForm),\r\n res => {\r\n console.log(res)\r\n let arr = res.value.gpsInfo.map(item => {\r\n return [\r\n Number(item.latitude),\r\n Number(item.longitude)\r\n ]\r\n })\r\n console.log(arr)\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addPolyline(\r\n arr,\r\n '#509ffd'\r\n )\r\n }\r\n )\r\n }\r\n })\r\n },\r\n // 切换展开隐藏\r\n changeBtn() {\r\n this.btnBoolen = !this.btnBoolen\r\n },\r\n // 清空图层及搜索\r\n clearCarLat() {\r\n this.searchForm.vehicleCode = ''\r\n this.searchForm.startTime = ''\r\n this.searchForm.endTime = ''\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.clearPolyline()\r\n }\r\n },\r\n beforeDestroy() {\r\n clearInterval(this.timer)\r\n }\r\n}\r\n",null]}