{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CMGTDutyMonitorMap.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CMGTDutyMonitorMap.vue","mtime":1691463999680},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport CommonApi from '@/views/Manage/CommonApi.js';\nimport CmgtDutyWorkarrangeApi from '@/views/Manage/duty/api/CmgtDutyWorkarrangeApi';\nimport CmgtDutyJobApi from '@/views/Manage/duty/api/CmgtDutyJobApi';\nexport default {\n name: 'CMGTDutyMonitorMap',\n components: {},\n data: function data() {\n var _ref;\n\n return _ref = {\n // src: '/gisapi/station-n-map/#/DeviceManagerGisView?mapMode=2D',\n src: window.context.map + '/station-n-map/#/DeviceManagerGisView?mapMode=2D',\n jobOptions: [],\n jobValue: [],\n timer: null,\n point: {},\n showDialog: false,\n top: 0,\n left: 0,\n btnBoolen: true,\n //控制筛选弹层的显示与隐藏\n searchForm: {\n jobId: ''\n },\n rules: {\n jobId: [{\n required: true,\n message: '请选择岗位',\n trigger: 'blur'\n }]\n }\n }, _defineProperty(_ref, \"timer\", null), _defineProperty(_ref, \"personTimer\", null), _defineProperty(_ref, \"tableData\", []), _defineProperty(_ref, \"spanArr\", []), _ref;\n },\n created: function created() {\n this.initData();\n },\n mounted: function mounted() {\n var t = this;\n this.timer = setInterval(function () {\n if (t.$refs.windowiframe.contentWindow.deviceGisFunction) {\n t.$refs.windowiframe.contentWindow.deviceGisFunction.layerVisible([]);\n t.$refs.windowiframe.contentWindow.deviceGisFunction.addPickListener(function (p) {\n // t.$refs.windowiframe.contentWindow.deviceGisFunction.removePopupLocator()\n console.log(p);\n t.showDialogData(p);\n });\n clearInterval(t.timer);\n }\n }, 500);\n },\n methods: {\n initData: function initData() {\n var _this = this;\n\n CmgtDutyJobApi.loadCmgtDutyJob({\n pageBean: {\n pageSize: 100,\n page: 1\n },\n params: {},\n querys: []\n }, function (res) {\n _this.jobOptions = res.rows;\n });\n },\n // loadStaff() {\n // const query = {}\n // if (this.jobValue && this.jobValue.length > 0) {\n // query.jobIds = this.jobValue\n // }\n // if (this.$refs.windowiframe) {\n // this.$refs.windowiframe.contentWindow.deviceGisFunction.clearElectronicFence()\n // this.$refs.windowiframe.contentWindow.deviceGisFunction.removeAllPeople()\n // }\n // CmgtDutyWorkarrangeApi.findCurrentStaffOnDuty(query, res => {\n // const vs = res.value\n // .map(m => {\n // return {\n // ...m,\n // id: m.id,\n // job: m.job,\n // name: m.name,\n // icon:\n // m.status === 'ONLINE'\n // ? 'DUTY_P3_ONLINE.png'\n // : m.status === 'CROSSING'\n // ? 'DUTY_P3_ERROR.png'\n // : 'DUTY_P3_OFFLINE.png',\n // point: m.location ? m.location.split(',', 2).map(Number) : [],\n // areaCode: 'CQBZ_BGC_F1'\n // }\n // })\n // .filter(item => {\n // return item.point.length > 0\n // })\n // // 加区域\n // if (query.jobIds) {\n // query.jobIds.forEach(j => {\n // const jobOpt = this.jobOptions.find(o => {\n // if (o.id === j) {\n // return true\n // }\n // return false\n // })\n // if (jobOpt.area) {\n // const peops = vs.filter(v => {\n // return v.job === j\n // })\n // this.$refs.windowiframe.contentWindow.deviceGisFunction.addElectronicFence(\n // {id: j, points: JSON.parse(jobOpt.area)},\n // peops\n // )\n // }\n // })\n // } else {\n // this.$refs.windowiframe.contentWindow.deviceGisFunction.addPeopleData(\n // vs\n // )\n // }\n // console.log('-------------res-------------', vs)\n // })\n // },\n showDialogData: function showDialogData(point) {\n var _this2 = this;\n\n console.log('============', point);\n\n if (point.data) {\n this.point = point; // this.left = this.point.position.x\n // this.top = this.point.position.y + 25\n\n this.showDialog = true;\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addPopupLocator({\n position: point.gisPosition,\n locator: function locator(windowPosition) {\n _this2.left = parseInt(windowPosition.x) - 5;\n _this2.top = parseInt(windowPosition.y) + 12;\n }\n });\n }\n },\n closeDialog: function closeDialog() {\n this.$refs.windowiframe.contentWindow.deviceGisFunction.removePopupLocator();\n this.point = {\n data: null\n };\n this.showDialog = false;\n },\n searchUserLat: function searchUserLat() {\n var _this3 = this;\n\n clearInterval(this.personTimer);\n this.getUserLat();\n this.personTimer = setInterval(function () {\n _this3.getUserLat();\n }, 10000);\n },\n // 获取图层数据\n getUserLat: function getUserLat() {\n var _this4 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this4.$refs.windowiframe.contentWindow.deviceGisFunction.removeAllPeople();\n\n CmgtDutyJobApi.getCmgtDutyUserLatByID(_this4.qs.stringify(_this4.searchForm), function (res) {\n _this4.tableData = res.value;\n\n _this4.tableData.forEach(function (it) {\n if (!it.deviceCode) {\n it.deviceCode = '11111111';\n }\n });\n\n _this4.getSpanArr();\n\n var arr = res.value.map(function (item) {\n return _objectSpread({\n id: item.id,\n point: [Number(item.latitude), Number(item.longitude)],\n areaCode: item.areaCode,\n icon: 'DUTY_P1_ONLINE.png',\n name: item.name\n }, item);\n });\n\n _this4.$refs.windowiframe.contentWindow.deviceGisFunction.addPeopleData(arr);\n });\n }\n });\n },\n // 切换展开隐藏\n changeBtn: function changeBtn() {\n this.btnBoolen = !this.btnBoolen;\n },\n // 清空图层及搜索\n clearUserLat: function clearUserLat() {\n this.searchForm.jobId = '';\n this.tableData = [];\n this.$refs.windowiframe.contentWindow.deviceGisFunction.removeAllPeople();\n clearInterval(this.personTimer);\n },\n getSpanArr: function getSpanArr() {\n for (var i = 0; i < this.tableData.length; i++) {\n if (i === 0) {\n this.spanArr.push(1);\n this.pos = 0;\n } else {\n // 判断当前元素与上一个元素是否相同 deviceCode\n if (this.tableData[i].deviceCode === this.tableData[i - 1].deviceCode) {\n this.spanArr[this.pos] += 1;\n this.spanArr.push(0);\n } else {\n this.spanArr.push(1);\n this.pos = i;\n }\n }\n }\n },\n //进行表格合并\n objectSpanMethod: function objectSpanMethod(_ref2) {\n var row = _ref2.row,\n column = _ref2.column,\n rowIndex = _ref2.rowIndex,\n columnIndex = _ref2.columnIndex;\n\n if (columnIndex === 0) {\n var _row = this.spanArr[rowIndex];\n\n var _col = _row > 0 ? 1 : 0;\n\n return {\n rowspan: _row,\n colspan: _col\n };\n }\n }\n },\n beforeDestroy: function beforeDestroy() {\n clearInterval(this.timer);\n clearInterval(this.personTimer);\n }\n};",null]}