{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/electronicFenceEdit.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/electronicFenceEdit.vue","mtime":1748415977261},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/babel.config.js","mtime":1725957645200},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\n// import { parseTime } from \"@/utils/index\";\n// import selfTable from \"@/components/common/selfTable\";\nimport { createRailAccess, updateRailAccess } from \"@/api/security-station-rails-controller\";\n// import { nanoid } from \"nanoid\";\n\nexport default {\n name: \"trajectory\",\n components: {\n // selfTable,\n },\n props: {\n stationId: String,\n info: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n electronicFenceInfo: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n map: {\n type: Object,\n default: function _default() {\n return null;\n }\n },\n stationVisible: {\n type: Boolean,\n default: true\n }\n },\n watch: {\n info: {\n handler: function handler(newVal) {\n if (Object.keys(newVal).length !== 0) {\n this.form.stationId = newVal.stationId;\n this.form.peopleNum = newVal.countOfSecurityMan;\n if (Object.keys(this.electronicFenceInfo).length === 0) {\n this.form.stationName = newVal.name;\n }\n }\n },\n immediate: true,\n deep: true\n },\n electronicFenceInfo: {\n handler: function handler(newVal) {\n if (newVal && Object.keys(newVal).length !== 0) {\n var deepVal = JSON.parse(JSON.stringify(newVal));\n this.form.stationName = deepVal.stationName;\n this.form.id = deepVal.id;\n this.form.name = deepVal.name;\n this.form.ruleType = deepVal.ruleType;\n this.form.shapeType = deepVal.shapeType;\n this.form.shapedLocation = deepVal.shapedLocation;\n this.form.stationId = deepVal.stationId;\n this.form.peopleNum = deepVal.countOfSecurityMan;\n this.form.time = deepVal.time;\n this.form.note = deepVal.note;\n // if (deepVal.shapeType === \"Circle\") {\n // this.setCircle(deepVal.shapedLocation);\n // } else if (deepVal.shapeType === \"Crib\") {\n // this.setRectangle(deepVal.shapedLocation);\n // } else if (deepVal.shapeType === \"Polygon\") {\n // this.setPolygon(deepVal.shapedLocation);\n // }\n // this.form = newVal\n this.isAdd = false;\n } else {\n this.isAdd = true;\n this.reset();\n }\n },\n immediate: true,\n deep: true\n }\n },\n data: function data() {\n return {\n isAdd: false,\n typeList: [{\n id: \"Exit\",\n name: \"离开告警\"\n }, {\n id: \"Enter\",\n name: \"进入告警\"\n }\n // {\n // id: \"Access\",\n // name: \"进出告警\",\n // },\n ],\n areaList: [{\n id: \"Crib\",\n icon: require(\"@/assets/images/mapToolbar/框选.png\"),\n name: \"框形选择\"\n }, {\n id: \"Circle\",\n icon: require(\"@/assets/images/mapToolbar/圈选.png\"),\n name: \"圆形选择\"\n }, {\n id: \"Polygon\",\n icon: require(\"@/assets/images/mapToolbar/多边形选择.png\"),\n name: \"多边形选择\"\n }],\n form: {\n id: \"\",\n name: \"\",\n ruleType: \"Exit\",\n stationId: \"\",\n stationName: \"\",\n peopleNum: \"\",\n time: \"\",\n note: \"\",\n shapeType: \"\",\n peopleList: [],\n shapedLocation: {\n geos: [],\n radius: \"\"\n }\n },\n Circle: null,\n mousetool: null\n };\n },\n methods: {\n changeAreaType: function changeAreaType(id) {\n var that = this;\n this.form.shapeType = id;\n if (this.mouseTool) {\n this.mouseTool.close(true);\n }\n this.$emit(\"cleanFigure\");\n if (id === \"Circle\") {\n that.drawCircle();\n } else if (id === \"Crib\") {\n that.drawRectangle();\n } else if (id === \"Polygon\") {\n that.drawPolygon();\n }\n },\n drawPolygon: function drawPolygon() {\n // todo: draw Polygon\n this.$emit(\"draw\", \"Polygon\");\n },\n drawCircle: function drawCircle() {\n // todo: draw Circle\n this.$emit(\"draw\", \"Circle\");\n },\n drawRectangle: function drawRectangle() {\n // todo: draw Rectangle\n this.$emit(\"draw\", \"Rectangle\");\n },\n setCircle: function setCircle(data) {},\n setRectangle: function setRectangle(data) {},\n setPolygon: function setPolygon(data) {},\n cancel: function cancel() {\n if (this.mouseTool) {\n this.mouseTool.close(true);\n }\n this.$emit(\"cancel\");\n },\n updateGeometry: function updateGeometry(_ref) {\n var geos = _ref.geos,\n radius = _ref.radius;\n this.form.shapedLocation = {\n geos: geos,\n radius: radius\n };\n },\n updateStation: function updateStation(station) {\n this.form.stationName = station.stationName;\n this.form.peopleNum = station.countOfSecurityMan;\n this.form.stationId = station.stationId;\n },\n reset: function reset() {\n this.form.id = \"\";\n this.form.name = \"\";\n this.form.ruleType = \"Exit\";\n this.form.time = [];\n this.form.note = \"\";\n this.form.shapeType = \"\";\n this.form.stationName = \"\";\n this.form.peopleNum = \"\";\n this.form.shapedLocation = {\n geos: [],\n radius: \"\"\n };\n this.$emit(\"cleanFigure\");\n },\n saveRail: function saveRail() {\n if (this.form.shapedLocation.geos.length === 0) {\n this.$message.warning(\"请选择围栏区域\");\n return;\n }\n // 发送数据到父窗口并请求关闭\n window.parent.postMessage({\n shapeType: this.form.shapeType,\n shapedLocation: this.form.shapedLocation\n }, '*');\n\n // 可选:本地提示\n this.$message.success('数据保存成功,即将关闭窗口');\n }\n }\n};",null]}