{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\components\\GisMapDrawer.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\components\\GisMapDrawer.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\r\nexport default {\r\n name: 'GisMapDrawer',\r\n components: {},\r\n props: {\r\n afterConfirm: {\r\n type: Function,\r\n default: null,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n drawer: false,\r\n selectVal: [],\r\n params: null,\r\n title: '',\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 }\r\n },\r\n methods: {\r\n setArea(row) {\r\n this.params = row\r\n\r\n this.title = '设置【' + row.name + '】的区域'\r\n this.selectVal = []\r\n this.drawer = true\r\n\r\n if (this.params.area) {\r\n if (this.$refs.windowiframe) {\r\n this.clear()\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.addElectronicFence(\r\n {\r\n id: this.params.id,\r\n points: JSON.parse(this.params.area),\r\n },\r\n []\r\n )\r\n } else {\r\n const t = this\r\n setTimeout(function () {\r\n t.clear()\r\n t.$refs.windowiframe.contentWindow.deviceGisFunction.addElectronicFence(\r\n {\r\n id: t.params.id,\r\n points: JSON.parse(t.params.area),\r\n },\r\n []\r\n )\r\n }, 6000)\r\n }\r\n } else {\r\n if (this.$refs.windowiframe) {\r\n this.clear()\r\n }\r\n }\r\n },\r\n selectPoint() {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction\r\n .pickPoint()\r\n .then((point) => {\r\n // alert(point)\r\n this.selectVal.push(point)\r\n console.log(point)\r\n })\r\n },\r\n\r\n selectArea() {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction\r\n .drawPolygon()\r\n .then((area) => {\r\n this.selectVal = []\r\n this.selectVal.push(area)\r\n console.log(area)\r\n })\r\n },\r\n\r\n clear() {\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.clearPolygonDraw()\r\n this.$refs.windowiframe.contentWindow.deviceGisFunction.clearElectronicFence()\r\n },\r\n\r\n confirm() {\r\n if (\r\n !this.selectVal ||\r\n this.selectVal === null ||\r\n this.selectVal.length === 0\r\n ) {\r\n this.$message.warning('没有任何可选信息')\r\n return\r\n }\r\n this.$emit('confirm', this.selectVal, this.params)\r\n this.drawer = false\r\n },\r\n },\r\n}\r\n",null]}