@yimou6/common-ui 1.13.19 → 1.13.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.cdn.js +25 -22
- package/cdn/index.cdn.js.map +1 -1
- package/cdn/index.cdn.mjs +19 -16
- package/cdn/index.cdn.mjs.map +1 -1
- package/cdn/index.css +1 -1
- package/es/components/geoMark/index.d.ts +733 -0
- package/es/components/geoMark/index.mjs +9 -0
- package/es/components/geoMark/index.mjs.map +1 -0
- package/es/components/geoMark/src/DragIcon.vue.d.ts +77 -0
- package/es/components/geoMark/src/DragIcon.vue.mjs +6 -0
- package/es/components/geoMark/src/DragIcon.vue.mjs.map +1 -0
- package/es/components/geoMark/src/DragIcon.vue2.mjs +67 -0
- package/es/components/geoMark/src/DragIcon.vue2.mjs.map +1 -0
- package/es/components/geoMark/src/assets//344/277/235/345/255/230.png.mjs +4 -0
- package/es/components/geoMark/src/assets//344/277/235/345/255/230.png.mjs.map +1 -0
- package/es/components/geoMark/src/assets//345/210/240/351/231/244.png.mjs +4 -0
- package/es/components/geoMark/src/assets//345/210/240/351/231/244.png.mjs.map +1 -0
- package/es/components/geoMark/src/assets//347/274/226/350/276/221.png.mjs +4 -0
- package/es/components/geoMark/src/assets//347/274/226/350/276/221.png.mjs.map +1 -0
- package/es/components/geoMark/src/assets//351/242/234/350/211/262.png.mjs +4 -0
- package/es/components/geoMark/src/assets//351/242/234/350/211/262.png.mjs.map +1 -0
- package/es/components/geoMark/src/default.png.mjs +4 -0
- package/es/components/geoMark/src/default.png.mjs.map +1 -0
- package/es/components/geoMark/src/floorRight/floor.vue.d.ts +15 -0
- package/es/components/geoMark/src/floorRight/floor.vue.mjs +6 -0
- package/es/components/geoMark/src/floorRight/floor.vue.mjs.map +1 -0
- package/es/components/geoMark/src/floorRight/floor.vue2.mjs +119 -0
- package/es/components/geoMark/src/floorRight/floor.vue2.mjs.map +1 -0
- package/es/components/geoMark/src/geoMark.d.ts +164 -0
- package/es/components/geoMark/src/geoMark.mjs +6 -0
- package/es/components/geoMark/src/geoMark.mjs.map +1 -0
- package/es/components/geoMark/src/geoMark.vue.d.ts +734 -0
- package/es/components/geoMark/src/geoMark.vue.mjs +6 -0
- package/es/components/geoMark/src/geoMark.vue.mjs.map +1 -0
- package/es/components/geoMark/src/geoMark.vue2.mjs +1425 -0
- package/es/components/geoMark/src/geoMark.vue2.mjs.map +1 -0
- package/es/components/geoMark/src/openMap.vue.d.ts +326 -0
- package/es/components/geoMark/src/openMap.vue.mjs +6 -0
- package/es/components/geoMark/src/openMap.vue.mjs.map +1 -0
- package/es/components/geoMark/src/openMap.vue2.mjs +422 -0
- package/es/components/geoMark/src/openMap.vue2.mjs.map +1 -0
- package/es/components/geoMark/src/waring.png.mjs +4 -0
- package/es/components/geoMark/src/waring.png.mjs.map +1 -0
- package/es/components/geoMark/src//346/226/260/345/274/271/346/241/206.png.mjs +4 -0
- package/es/components/geoMark/src//346/226/260/345/274/271/346/241/206.png.mjs.map +1 -0
- package/es/components/geoMark/src//347/201/255/347/201/253/345/231/250.png.mjs +4 -0
- package/es/components/geoMark/src//347/201/255/347/201/253/345/231/250.png.mjs.map +1 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/map/src/map.vue2.mjs +1 -1
- package/es/components/map/src/map.vue2.mjs.map +1 -1
- package/es/components/tzj-player/index.d.ts +10 -0
- package/es/components/tzj-player/src/ctyun-player.vue.d.ts +2 -0
- package/es/components/tzj-player/src/easyPlayer.vue.d.ts +2 -0
- package/es/components/tzj-player/src/easyPlayer.vue2.mjs +61 -37
- package/es/components/tzj-player/src/easyPlayer.vue2.mjs.map +1 -1
- package/es/components/tzj-player/src/tzj-player.vue.d.ts +10 -0
- package/es/components/tzj-player/src/yunzhiyanPlayer.vue.d.ts +2 -0
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/es/installer.mjs +3 -1
- package/es/installer.mjs.map +1 -1
- package/global.d.ts +5 -0
- package/lib/components/geoMark/index.d.ts +733 -0
- package/lib/components/geoMark/index.js +15 -0
- package/lib/components/geoMark/index.js.map +1 -0
- package/lib/components/geoMark/src/DragIcon.vue.d.ts +77 -0
- package/lib/components/geoMark/src/DragIcon.vue.js +10 -0
- package/lib/components/geoMark/src/DragIcon.vue.js.map +1 -0
- package/lib/components/geoMark/src/DragIcon.vue2.js +71 -0
- package/lib/components/geoMark/src/DragIcon.vue2.js.map +1 -0
- package/lib/components/geoMark/src/assets//344/277/235/345/255/230.png.js +8 -0
- package/lib/components/geoMark/src/assets//344/277/235/345/255/230.png.js.map +1 -0
- package/lib/components/geoMark/src/assets//345/210/240/351/231/244.png.js +8 -0
- package/lib/components/geoMark/src/assets//345/210/240/351/231/244.png.js.map +1 -0
- package/lib/components/geoMark/src/assets//347/274/226/350/276/221.png.js +8 -0
- package/lib/components/geoMark/src/assets//347/274/226/350/276/221.png.js.map +1 -0
- package/lib/components/geoMark/src/assets//351/242/234/350/211/262.png.js +8 -0
- package/lib/components/geoMark/src/assets//351/242/234/350/211/262.png.js.map +1 -0
- package/lib/components/geoMark/src/default.png.js +8 -0
- package/lib/components/geoMark/src/default.png.js.map +1 -0
- package/lib/components/geoMark/src/floorRight/floor.vue.d.ts +15 -0
- package/lib/components/geoMark/src/floorRight/floor.vue.js +10 -0
- package/lib/components/geoMark/src/floorRight/floor.vue.js.map +1 -0
- package/lib/components/geoMark/src/floorRight/floor.vue2.js +123 -0
- package/lib/components/geoMark/src/floorRight/floor.vue2.js.map +1 -0
- package/lib/components/geoMark/src/geoMark.d.ts +164 -0
- package/lib/components/geoMark/src/geoMark.js +8 -0
- package/lib/components/geoMark/src/geoMark.js.map +1 -0
- package/lib/components/geoMark/src/geoMark.vue.d.ts +734 -0
- package/lib/components/geoMark/src/geoMark.vue.js +10 -0
- package/lib/components/geoMark/src/geoMark.vue.js.map +1 -0
- package/lib/components/geoMark/src/geoMark.vue2.js +1429 -0
- package/lib/components/geoMark/src/geoMark.vue2.js.map +1 -0
- package/lib/components/geoMark/src/openMap.vue.d.ts +326 -0
- package/lib/components/geoMark/src/openMap.vue.js +10 -0
- package/lib/components/geoMark/src/openMap.vue.js.map +1 -0
- package/lib/components/geoMark/src/openMap.vue2.js +426 -0
- package/lib/components/geoMark/src/openMap.vue2.js.map +1 -0
- package/lib/components/geoMark/src/waring.png.js +8 -0
- package/lib/components/geoMark/src/waring.png.js.map +1 -0
- package/lib/components/geoMark/src//346/226/260/345/274/271/346/241/206.png.js +8 -0
- package/lib/components/geoMark/src//346/226/260/345/274/271/346/241/206.png.js.map +1 -0
- package/lib/components/geoMark/src//347/201/255/347/201/253/345/231/250.png.js +8 -0
- package/lib/components/geoMark/src//347/201/255/347/201/253/345/231/250.png.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +4 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/map/src/map.vue2.js +1 -1
- package/lib/components/map/src/map.vue2.js.map +1 -1
- package/lib/components/tzj-player/index.d.ts +10 -0
- package/lib/components/tzj-player/src/ctyun-player.vue.d.ts +2 -0
- package/lib/components/tzj-player/src/easyPlayer.vue.d.ts +2 -0
- package/lib/components/tzj-player/src/easyPlayer.vue2.js +60 -36
- package/lib/components/tzj-player/src/easyPlayer.vue2.js.map +1 -1
- package/lib/components/tzj-player/src/tzj-player.vue.d.ts +10 -0
- package/lib/components/tzj-player/src/yunzhiyanPlayer.vue.d.ts +2 -0
- package/lib/index.js +8 -4
- package/lib/index.js.map +1 -1
- package/lib/installer.js +3 -1
- package/lib/installer.js.map +1 -1
- package/package.json +3 -1
- package/theme-default/i-geo-mark.css +1 -0
- package/theme-default/index.css +1 -1
|
@@ -0,0 +1,1425 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, onUnmounted, computed, nextTick, resolveComponent, openBlock, createElementBlock, createVNode, createBlock, withCtx, createElementVNode, Fragment, renderList, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, unref } from 'vue';
|
|
2
|
+
import { isNil } from 'lodash-es';
|
|
3
|
+
import { primaryAction, platformModifierKeyOnly, never } from 'ol/events/condition.js';
|
|
4
|
+
import Feature from 'ol/Feature';
|
|
5
|
+
import GeoJSON from 'ol/format/GeoJSON.js';
|
|
6
|
+
import Point from 'ol/geom/Point.js';
|
|
7
|
+
import Polygon from 'ol/geom/Polygon.js';
|
|
8
|
+
import Draw from 'ol/interaction/Draw.js';
|
|
9
|
+
import Modify from 'ol/interaction/Modify.js';
|
|
10
|
+
import Translate from 'ol/interaction/Translate.js';
|
|
11
|
+
import VectorLayer from 'ol/layer/Vector.js';
|
|
12
|
+
import { Fill, Stroke, Text } from 'ol/style';
|
|
13
|
+
import CircleStyle from 'ol/style/Circle.js';
|
|
14
|
+
import Style from 'ol/style/Style';
|
|
15
|
+
import img$5 from './assets/保存.png.mjs';
|
|
16
|
+
import img$2 from './assets/删除.png.mjs';
|
|
17
|
+
import img$3 from './assets/编辑.png.mjs';
|
|
18
|
+
import img$4 from './assets/颜色.png.mjs';
|
|
19
|
+
import img from './default.png.mjs';
|
|
20
|
+
import './DragIcon.vue.mjs';
|
|
21
|
+
import './floorRight/floor.vue.mjs';
|
|
22
|
+
import { GeoMarkProps } from './geoMark.mjs';
|
|
23
|
+
import './openMap.vue.mjs';
|
|
24
|
+
import img$7 from './waring.png.mjs';
|
|
25
|
+
import img$6 from './新弹框.png.mjs';
|
|
26
|
+
import img$1 from './灭火器.png.mjs';
|
|
27
|
+
import _sfc_main$1 from './floorRight/floor.vue2.mjs';
|
|
28
|
+
import _sfc_main$2 from './DragIcon.vue2.mjs';
|
|
29
|
+
import _sfc_main$3 from './openMap.vue2.mjs';
|
|
30
|
+
|
|
31
|
+
var __defProp = Object.defineProperty;
|
|
32
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
33
|
+
const _hoisted_1 = {
|
|
34
|
+
id: "ypc-map-container",
|
|
35
|
+
class: "relative w-full h-full overflow-hidden t-geo-mark"
|
|
36
|
+
};
|
|
37
|
+
const _hoisted_2 = { class: "flex items-center justify-between w-full h-full -mt-2" };
|
|
38
|
+
const _hoisted_3 = { key: 0 };
|
|
39
|
+
const _hoisted_4 = { class: "flex items-center justify-between w-full h-full -mt-2" };
|
|
40
|
+
const _hoisted_5 = ["onClick"];
|
|
41
|
+
const _hoisted_6 = ["onClick"];
|
|
42
|
+
const _hoisted_7 = ["onClick"];
|
|
43
|
+
const _hoisted_8 = ["onClick"];
|
|
44
|
+
const _hoisted_9 = { class: "grid grid-cols-3 gap-2 p-1" };
|
|
45
|
+
const _hoisted_10 = ["onClick"];
|
|
46
|
+
const _hoisted_11 = { class: "text-xs mt-1" };
|
|
47
|
+
const _hoisted_12 = { class: "flex px-3.5 justify-between flex-shrink-0 w-full h-10 py-1 select-none -mt-5 p-2" };
|
|
48
|
+
const _hoisted_13 = { class: "flex justify-between w-30" };
|
|
49
|
+
const _hoisted_14 = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "grid gap-1 mt-4 px-3.5 w-full grid-cols-12"
|
|
52
|
+
};
|
|
53
|
+
const _hoisted_15 = { class: "col-span-4" };
|
|
54
|
+
const _hoisted_16 = {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: "grid gap-1 mt-4 px-3.5 w-full grid-cols-12"
|
|
57
|
+
};
|
|
58
|
+
const _hoisted_17 = {
|
|
59
|
+
key: 2,
|
|
60
|
+
style: { "height": "calc(100% - 100px)" },
|
|
61
|
+
class: "w-full mt-4 pb-5 overflow-x-hidden overflow-y-auto panel"
|
|
62
|
+
};
|
|
63
|
+
const _hoisted_18 = ["title"];
|
|
64
|
+
const _hoisted_19 = { class: "col-span-1 cursor-pointer" };
|
|
65
|
+
const _hoisted_20 = { class: "col-span-4 break-words" };
|
|
66
|
+
const _hoisted_21 = ["title"];
|
|
67
|
+
const _hoisted_22 = ["title"];
|
|
68
|
+
const _hoisted_23 = {
|
|
69
|
+
key: 3,
|
|
70
|
+
style: { "height": "calc(100% - 100px)" },
|
|
71
|
+
class: "w-full mt-4 overflow-x-hidden overflow-y-auto panel"
|
|
72
|
+
};
|
|
73
|
+
const _hoisted_24 = { class: "col-span-1" };
|
|
74
|
+
const _hoisted_25 = { class: "col-span-1" };
|
|
75
|
+
const _hoisted_26 = {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "!w-8 h-full t-image-point"
|
|
78
|
+
};
|
|
79
|
+
const _hoisted_27 = { class: "col-span-8" };
|
|
80
|
+
const _hoisted_28 = ["onClick"];
|
|
81
|
+
const _hoisted_29 = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "flex flex-col justify-start text-white opacity-80 t-bg-overlay flex-nowrap"
|
|
84
|
+
};
|
|
85
|
+
const _hoisted_30 = ["src"];
|
|
86
|
+
const _hoisted_31 = { class: "flex t-overlay-item items-center w-full !mt-10 justify-items-start" };
|
|
87
|
+
const _hoisted_32 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
88
|
+
const _hoisted_33 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
89
|
+
const _hoisted_34 = ["title"];
|
|
90
|
+
const _hoisted_35 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
91
|
+
const _hoisted_36 = ["title"];
|
|
92
|
+
const _hoisted_37 = {
|
|
93
|
+
key: 1,
|
|
94
|
+
class: "flex flex-col justify-start text-white opacity-80 t-bg-overlay flex-nowrap"
|
|
95
|
+
};
|
|
96
|
+
const _hoisted_38 = ["src"];
|
|
97
|
+
const _hoisted_39 = { class: "flex t-overlay-item items-center w-full !mt-10 justify-items-start" };
|
|
98
|
+
const _hoisted_40 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
99
|
+
const _hoisted_41 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
100
|
+
const _hoisted_42 = { class: "flex items-center w-full t-overlay-item justify-items-start" };
|
|
101
|
+
const _hoisted_43 = ["src"];
|
|
102
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
103
|
+
...{ name: "IGeoMark" },
|
|
104
|
+
__name: "geoMark",
|
|
105
|
+
props: GeoMarkProps,
|
|
106
|
+
emits: ["closeMain", "saveMain"],
|
|
107
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
108
|
+
const props = __props;
|
|
109
|
+
const emit = __emit;
|
|
110
|
+
const activatedPositionOverlayWaring = ref([]);
|
|
111
|
+
const drawInteraction = ref(null);
|
|
112
|
+
const modifyInteraction = ref(null);
|
|
113
|
+
const translateInteraction = ref(null);
|
|
114
|
+
const currentDrawType = ref("Polygon");
|
|
115
|
+
onMounted(() => {
|
|
116
|
+
window.addEventListener("popstate", (e) => {
|
|
117
|
+
document.documentElement.classList.remove("dark");
|
|
118
|
+
e.preventDefault();
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
onUnmounted(() => {
|
|
122
|
+
document.documentElement.classList.remove("dark");
|
|
123
|
+
});
|
|
124
|
+
const activatedList = ref(true);
|
|
125
|
+
const activatedFold = ref(false);
|
|
126
|
+
const FnUpdateActivatedFold = /* @__PURE__ */ __name(() => {
|
|
127
|
+
activatedFold.value = !activatedFold.value;
|
|
128
|
+
}, "FnUpdateActivatedFold");
|
|
129
|
+
const listFloor = ref([]);
|
|
130
|
+
const listDevice = ref([]);
|
|
131
|
+
const listAllDevice = ref([]);
|
|
132
|
+
const list_title = ref("\u8BBE\u5907\u4FE1\u606F\u5217\u8868");
|
|
133
|
+
const configIcon = ref({});
|
|
134
|
+
const configTopBar = ref([
|
|
135
|
+
{ name: `\u5355\u4F4D\u540D\uFF1A`, icon: "icon-jianzhu02-L", value: "-----" },
|
|
136
|
+
{ name: `\u5EFA\u7B51\u540D\uFF1A`, icon: "icon-jianzhu03-L", value: "-----" },
|
|
137
|
+
{ name: "\u9000\u51FA", icon: "icon-fanhui3", value: "-----" }
|
|
138
|
+
]);
|
|
139
|
+
const configBottomBar = ref([
|
|
140
|
+
{ name: "\u9009\u62E9", icon: "icon-xuanze" },
|
|
141
|
+
{ name: "\u7F16\u8F91", icon: "icon-xiugai" },
|
|
142
|
+
{ name: "\u91CD\u7F6E", icon: "icon-zhongzhi1" },
|
|
143
|
+
{ name: "\u653E\u5927", icon: "icon-fangda" },
|
|
144
|
+
{ name: "\u7F29\u5C0F", icon: "icon-suoxiao" },
|
|
145
|
+
{ name: "\u989C\u8272", icon: "icon-yanse" },
|
|
146
|
+
{ name: "\u533A\u57DF\u8BBE\u7F6E", icon: "icon-shezhi" },
|
|
147
|
+
{ name: "\u539F\u59CB\u5C3A\u5BF8", icon: "icon-chicun" },
|
|
148
|
+
{ name: "\u4FDD\u5B58", icon: "icon-Save" }
|
|
149
|
+
]);
|
|
150
|
+
const configBottomBar2 = ref([
|
|
151
|
+
{ name: "\u533A\u57DF\u6A21\u677F", icon: "icon-moban2" },
|
|
152
|
+
{ name: "\u533A\u57DF\u7ED8\u5236", icon: "icon-pencel" }
|
|
153
|
+
]);
|
|
154
|
+
const activatedMode = computed(() => {
|
|
155
|
+
return props.type || "edit";
|
|
156
|
+
});
|
|
157
|
+
const activatedBottomBar = ref("\u9009\u62E9");
|
|
158
|
+
const activatedFloor = ref();
|
|
159
|
+
const refFloor = ref(null);
|
|
160
|
+
const alarmType = ref("fire");
|
|
161
|
+
const filtrationType = ref([]);
|
|
162
|
+
const _waring = ref(null);
|
|
163
|
+
const hasWaring = computed(() => {
|
|
164
|
+
const w = _waring.value;
|
|
165
|
+
return w != null && w !== "";
|
|
166
|
+
});
|
|
167
|
+
const isWaringCode = /* @__PURE__ */ __name((code) => {
|
|
168
|
+
const w = _waring.value;
|
|
169
|
+
return w != null && w !== "" && w === code;
|
|
170
|
+
}, "isWaringCode");
|
|
171
|
+
const imgUrl = ref(img);
|
|
172
|
+
const rrefMap = ref(null);
|
|
173
|
+
const mapReady = ref(false);
|
|
174
|
+
const pendingInit = ref(null);
|
|
175
|
+
const activatedPositionOverlay = ref([]);
|
|
176
|
+
const activatedPropertiesOverlay = ref({});
|
|
177
|
+
const activatedArrayFeatures = ref([]);
|
|
178
|
+
const activatedFeature = ref(null);
|
|
179
|
+
const move1 = ref([]);
|
|
180
|
+
const defaultColor = ref("rgba(255,255,51,0.2)");
|
|
181
|
+
const colorList = ref([
|
|
182
|
+
{ name: "\u9EC4\u8272", value: "rgba(255,255,51,0.2)" },
|
|
183
|
+
{ name: "\u7EA2\u8272", value: "rgba(255,0,0,0.25)" },
|
|
184
|
+
{ name: "\u7EFF\u8272", value: "rgba(0,255,0,0.25)" },
|
|
185
|
+
{ name: "\u84DD\u8272", value: "rgba(0,120,255,0.25)" },
|
|
186
|
+
{ name: "\u6A59\u8272", value: "rgba(255,150,0,0.3)" },
|
|
187
|
+
{ name: "\u7D2B\u8272", value: "rgba(150,0,255,0.25)" }
|
|
188
|
+
]);
|
|
189
|
+
const center = ref([0, 0]);
|
|
190
|
+
const zoom = ref(1);
|
|
191
|
+
const projection = ref("EPSG:3857");
|
|
192
|
+
const size = ref([800, 600]);
|
|
193
|
+
const extent = ref([0, 0, 800, 600]);
|
|
194
|
+
const configOptionsDeviceType = ref([]);
|
|
195
|
+
const configOptionsDeviceModel = ref([]);
|
|
196
|
+
const configOptionsManufacturer = ref([]);
|
|
197
|
+
const queryDeviceList = ref({
|
|
198
|
+
activatedDeviceType: "",
|
|
199
|
+
activatedManufacturer: "",
|
|
200
|
+
activatedDeviceModel: ""
|
|
201
|
+
});
|
|
202
|
+
const activatedDragItem = ref();
|
|
203
|
+
const deviceTypeSet = /* @__PURE__ */ new Set();
|
|
204
|
+
const manufacturerSet = /* @__PURE__ */ new Set();
|
|
205
|
+
const deviceModelSet = /* @__PURE__ */ new Set();
|
|
206
|
+
const createAdvancedStyle = /* @__PURE__ */ __name((_feature) => {
|
|
207
|
+
return [
|
|
208
|
+
new Style({
|
|
209
|
+
fill: new Fill({ color: "rgba(255, 255, 255, 0.2)" }),
|
|
210
|
+
stroke: new Stroke({ color: "#ffcc33", width: 2 }),
|
|
211
|
+
image: new CircleStyle({
|
|
212
|
+
radius: 7,
|
|
213
|
+
fill: new Fill({ color: "#ffcc33" })
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
];
|
|
217
|
+
}, "createAdvancedStyle");
|
|
218
|
+
const initAdvancedModify = /* @__PURE__ */ __name(() => {
|
|
219
|
+
if (!rrefMap.value) return;
|
|
220
|
+
const source = rrefMap.value.getVectorSource();
|
|
221
|
+
if (modifyInteraction.value) {
|
|
222
|
+
rrefMap.value.getMap().removeInteraction(modifyInteraction.value);
|
|
223
|
+
}
|
|
224
|
+
modifyInteraction.value = new Modify({
|
|
225
|
+
source,
|
|
226
|
+
condition(event) {
|
|
227
|
+
return primaryAction(event) && !platformModifierKeyOnly(event);
|
|
228
|
+
},
|
|
229
|
+
deleteCondition: never,
|
|
230
|
+
insertVertexCondition: never,
|
|
231
|
+
style(feature, resolution) {
|
|
232
|
+
return createAdvancedStyle(feature);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
modifyInteraction.value.on("modifystart", (event) => {
|
|
236
|
+
event.features.forEach((feature) => {
|
|
237
|
+
feature.set(
|
|
238
|
+
"modifyGeometry",
|
|
239
|
+
{ geometry: feature.getGeometry().clone() },
|
|
240
|
+
true
|
|
241
|
+
);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
modifyInteraction.value.on("modifyend", (event) => {
|
|
245
|
+
event.features.forEach((feature) => {
|
|
246
|
+
const modifyGeometry = feature.get("modifyGeometry");
|
|
247
|
+
if (modifyGeometry) {
|
|
248
|
+
feature.setGeometry(modifyGeometry.geometry);
|
|
249
|
+
feature.unset("modifyGeometry", true);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
rrefMap.value.getMap().addInteraction(modifyInteraction.value);
|
|
254
|
+
}, "initAdvancedModify");
|
|
255
|
+
const initTranslate = /* @__PURE__ */ __name(() => {
|
|
256
|
+
if (!rrefMap.value) return;
|
|
257
|
+
if (translateInteraction.value) {
|
|
258
|
+
rrefMap.value.getMap().removeInteraction(translateInteraction.value);
|
|
259
|
+
}
|
|
260
|
+
translateInteraction.value = new Translate({
|
|
261
|
+
condition(event) {
|
|
262
|
+
return primaryAction(event) && platformModifierKeyOnly(event);
|
|
263
|
+
},
|
|
264
|
+
layers: [
|
|
265
|
+
rrefMap.value.getMap().getLayers().getArray().filter((layer) => layer instanceof VectorLayer)
|
|
266
|
+
]
|
|
267
|
+
});
|
|
268
|
+
rrefMap.value.getMap().addInteraction(translateInteraction.value);
|
|
269
|
+
}, "initTranslate");
|
|
270
|
+
const initDraw = /* @__PURE__ */ __name((type = "Polygon") => {
|
|
271
|
+
if (!rrefMap.value) return;
|
|
272
|
+
if (drawInteraction.value) {
|
|
273
|
+
rrefMap.value.getMap().removeInteraction(drawInteraction.value);
|
|
274
|
+
}
|
|
275
|
+
drawInteraction.value = new Draw({
|
|
276
|
+
source: rrefMap.value.getVectorSource(),
|
|
277
|
+
type
|
|
278
|
+
});
|
|
279
|
+
drawInteraction.value.on("drawend", (event) => {
|
|
280
|
+
const feature = event.feature;
|
|
281
|
+
feature.set("color", defaultColor.value);
|
|
282
|
+
feature.set("text", "\u65B0\u7ED8\u5236\u533A\u57DF");
|
|
283
|
+
feature.setStyle(createAdvancedStyle(feature));
|
|
284
|
+
});
|
|
285
|
+
rrefMap.value.getMap().addInteraction(drawInteraction.value);
|
|
286
|
+
}, "initDraw");
|
|
287
|
+
const open = /* @__PURE__ */ __name(async (params = {
|
|
288
|
+
listFloor: [],
|
|
289
|
+
listDevice: [],
|
|
290
|
+
mode: "edit",
|
|
291
|
+
defaultFloor: null,
|
|
292
|
+
waring: null,
|
|
293
|
+
listTitle: "\u8BBE\u5907\u4FE1\u606F\u5217\u8868",
|
|
294
|
+
configIcon: {},
|
|
295
|
+
configTopBar: [],
|
|
296
|
+
type: "edit",
|
|
297
|
+
featureType: ["Areas"]
|
|
298
|
+
}) => {
|
|
299
|
+
var _a, _b;
|
|
300
|
+
if (params.featureType && params.featureType.length > 0) {
|
|
301
|
+
filtrationType.value = params.featureType;
|
|
302
|
+
}
|
|
303
|
+
if (params.type) {
|
|
304
|
+
alarmType.value = params.type;
|
|
305
|
+
}
|
|
306
|
+
if (params.listTitle) {
|
|
307
|
+
list_title.value = params.listTitle;
|
|
308
|
+
}
|
|
309
|
+
listFloor.value = params.listFloor;
|
|
310
|
+
listDevice.value = params.listDevice;
|
|
311
|
+
listAllDevice.value = params.listDevice;
|
|
312
|
+
configIcon.value = params.configIcon || {};
|
|
313
|
+
configTopBar.value = params.configTopBar || [];
|
|
314
|
+
_waring.value = (_a = params.waring) != null ? _a : null;
|
|
315
|
+
const defaultFloor = params.defaultFloor ? params.defaultFloor : listFloor.value[0];
|
|
316
|
+
(_b = refFloor.value) == null ? void 0 : _b.init(listFloor.value, defaultFloor);
|
|
317
|
+
const floorList = listFloor.value.map((item) => item.floor);
|
|
318
|
+
listAllDevice.value.filter((ls) => ls.floor != null && floorList.includes(ls.floor)).forEach((item) => {
|
|
319
|
+
if (item.deviceTypeName) deviceTypeSet.add(item.deviceTypeName);
|
|
320
|
+
if (item.manufacturerName) manufacturerSet.add(item.manufacturerName);
|
|
321
|
+
if (item.deviceModelName) deviceModelSet.add(item.deviceModelName);
|
|
322
|
+
});
|
|
323
|
+
configOptionsDeviceType.value = Array.from(deviceTypeSet).map((type) => ({
|
|
324
|
+
label: type,
|
|
325
|
+
value: type,
|
|
326
|
+
key: type
|
|
327
|
+
})).filter((e) => !isNil(e.label));
|
|
328
|
+
configOptionsManufacturer.value = Array.from(manufacturerSet).map((manufacturer) => ({
|
|
329
|
+
label: manufacturer,
|
|
330
|
+
value: manufacturer,
|
|
331
|
+
key: manufacturer
|
|
332
|
+
})).filter((e) => !isNil(e.label));
|
|
333
|
+
configOptionsDeviceModel.value = Array.from(deviceModelSet).map((deviceModel) => ({
|
|
334
|
+
label: deviceModel,
|
|
335
|
+
value: deviceModel,
|
|
336
|
+
key: deviceModel
|
|
337
|
+
})).filter((e) => !isNil(e.label));
|
|
338
|
+
if (mapReady.value) {
|
|
339
|
+
initMap(activatedFloor.value || defaultFloor);
|
|
340
|
+
} else {
|
|
341
|
+
activatedFloor.value = defaultFloor;
|
|
342
|
+
pendingInit.value = defaultFloor;
|
|
343
|
+
}
|
|
344
|
+
}, "open");
|
|
345
|
+
const handleMapReady = /* @__PURE__ */ __name(() => {
|
|
346
|
+
mapReady.value = true;
|
|
347
|
+
const floor = pendingInit.value || activatedFloor.value;
|
|
348
|
+
if (floor) {
|
|
349
|
+
pendingInit.value = null;
|
|
350
|
+
initMap(floor);
|
|
351
|
+
}
|
|
352
|
+
}, "handleMapReady");
|
|
353
|
+
const locateWaringFeature = /* @__PURE__ */ __name((centerOnWarning) => {
|
|
354
|
+
if (!hasWaring.value || !rrefMap.value) return;
|
|
355
|
+
const features = rrefMap.value.getVectorSource().getFeatures();
|
|
356
|
+
const target = features.find(
|
|
357
|
+
(feature) => isWaringCode(feature.get("code"))
|
|
358
|
+
);
|
|
359
|
+
if (!target) return;
|
|
360
|
+
const position = target.getGeometry().getCoordinates();
|
|
361
|
+
activatedPositionOverlayWaring.value = position;
|
|
362
|
+
if (centerOnWarning) {
|
|
363
|
+
activatedPositionOverlay.value = position;
|
|
364
|
+
activatedPropertiesOverlay.value = target.getProperties();
|
|
365
|
+
setTimeout(() => {
|
|
366
|
+
var _a, _b;
|
|
367
|
+
(_b = (_a = rrefMap.value) == null ? void 0 : _a.getView()) == null ? void 0 : _b.setCenter(position);
|
|
368
|
+
}, 0);
|
|
369
|
+
}
|
|
370
|
+
}, "locateWaringFeature");
|
|
371
|
+
function loadFeaturesAndHandleWarning(geojson, centerOnWarning = true) {
|
|
372
|
+
var _a, _b;
|
|
373
|
+
const features = new GeoJSON().readFeatures(geojson);
|
|
374
|
+
activatedArrayFeatures.value = features;
|
|
375
|
+
(_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().addFeatures(features);
|
|
376
|
+
(_b = rrefMap.value) == null ? void 0 : _b.getVectorSource().on("addfeature", (event) => {
|
|
377
|
+
});
|
|
378
|
+
setTimeout(() => {
|
|
379
|
+
locateWaringFeature(centerOnWarning);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
__name(loadFeaturesAndHandleWarning, "loadFeaturesAndHandleWarning");
|
|
383
|
+
async function initMap(defaultFloor) {
|
|
384
|
+
var _a, _b, _c, _d;
|
|
385
|
+
(_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().clear();
|
|
386
|
+
await loadingSource(defaultFloor);
|
|
387
|
+
(_b = rrefMap.value) == null ? void 0 : _b.getMap().on("pointermove", (evt) => {
|
|
388
|
+
var _a2, _b2, _c2, _d2, _e;
|
|
389
|
+
const pixel = (_a2 = rrefMap.value) == null ? void 0 : _a2.getMap().getEventPixel(evt.originalEvent);
|
|
390
|
+
const viewCoordinate = (_b2 = rrefMap.value) == null ? void 0 : _b2.getMap().getCoordinateFromPixel(pixel);
|
|
391
|
+
if (viewCoordinate) {
|
|
392
|
+
move1.value = viewCoordinate;
|
|
393
|
+
}
|
|
394
|
+
if (activatedBottomBar.value === "\u7F16\u8F91") {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
let feature;
|
|
398
|
+
if ((_c2 = rrefMap.value) == null ? void 0 : _c2.getMap().hasFeatureAtPixel(pixel)) {
|
|
399
|
+
if (hasWaring.value) {
|
|
400
|
+
activatedPositionOverlay.value = [];
|
|
401
|
+
}
|
|
402
|
+
const viewCoordinate2 = (_d2 = rrefMap.value) == null ? void 0 : _d2.getMap().getCoordinateFromPixel(pixel);
|
|
403
|
+
if (viewCoordinate2) {
|
|
404
|
+
activatedPositionOverlay.value = viewCoordinate2;
|
|
405
|
+
}
|
|
406
|
+
feature = (_e = rrefMap.value) == null ? void 0 : _e.getMap().forEachFeatureAtPixel(
|
|
407
|
+
pixel,
|
|
408
|
+
(feature2, layer) => {
|
|
409
|
+
return feature2;
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
if (feature) {
|
|
413
|
+
activatedPropertiesOverlay.value = feature.getProperties();
|
|
414
|
+
}
|
|
415
|
+
} else {
|
|
416
|
+
if (activatedMode.value === "edit") {
|
|
417
|
+
activatedPositionOverlay.value = [];
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
(_c = rrefMap.value) == null ? void 0 : _c.getMap().on("contextmenu", (event) => {
|
|
422
|
+
var _a2;
|
|
423
|
+
activatedFeature.value = ((_a2 = rrefMap.value) == null ? void 0 : _a2.getMap().forEachFeatureAtPixel(
|
|
424
|
+
event.pixel,
|
|
425
|
+
(feature) => feature
|
|
426
|
+
)) || null;
|
|
427
|
+
activatedBottomBar.value = "\u9009\u62E9";
|
|
428
|
+
});
|
|
429
|
+
(_d = rrefMap.value) == null ? void 0 : _d.getVectorSource().on("change", (item) => {
|
|
430
|
+
var _a2;
|
|
431
|
+
const features = ((_a2 = rrefMap.value) == null ? void 0 : _a2.getVectorSource().getFeatures()) || [];
|
|
432
|
+
activatedArrayFeatures.value = features;
|
|
433
|
+
});
|
|
434
|
+
nextTick(() => {
|
|
435
|
+
initAdvancedModify();
|
|
436
|
+
initTranslate();
|
|
437
|
+
initDraw(currentDrawType.value);
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
__name(initMap, "initMap");
|
|
441
|
+
const imageDimensionsCache = /* @__PURE__ */ new Map();
|
|
442
|
+
const getImageDimensions = /* @__PURE__ */ __name((imageUrl) => {
|
|
443
|
+
const cached = imageDimensionsCache.get(imageUrl);
|
|
444
|
+
if (cached) return Promise.resolve(cached);
|
|
445
|
+
return new Promise((resolve, reject) => {
|
|
446
|
+
const img = new Image();
|
|
447
|
+
img.onload = () => {
|
|
448
|
+
const dims = { width: img.naturalWidth, height: img.naturalHeight };
|
|
449
|
+
imageDimensionsCache.set(imageUrl, dims);
|
|
450
|
+
resolve(dims);
|
|
451
|
+
};
|
|
452
|
+
img.onerror = reject;
|
|
453
|
+
img.src = imageUrl;
|
|
454
|
+
});
|
|
455
|
+
}, "getImageDimensions");
|
|
456
|
+
const loadingSource = /* @__PURE__ */ __name(async (data, centerOnWarning = true) => {
|
|
457
|
+
var _a, _b, _c;
|
|
458
|
+
activatedPositionOverlay.value = [];
|
|
459
|
+
activatedPositionOverlayWaring.value = [];
|
|
460
|
+
activatedPropertiesOverlay.value = {};
|
|
461
|
+
activatedFeature.value = null;
|
|
462
|
+
(_a = rrefMap.value) == null ? void 0 : _a.calculateAutoZoom();
|
|
463
|
+
if (!data) {
|
|
464
|
+
listDevice.value = [];
|
|
465
|
+
activatedFloor.value = void 0;
|
|
466
|
+
(_b = rrefMap.value) == null ? void 0 : _b.getVectorSource().clear();
|
|
467
|
+
imgUrl.value = "";
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
listDevice.value = listAllDevice.value.filter((item) => {
|
|
471
|
+
return item.floor === data.floor;
|
|
472
|
+
});
|
|
473
|
+
activatedFloor.value = data;
|
|
474
|
+
(_c = rrefMap.value) == null ? void 0 : _c.getVectorSource().clear();
|
|
475
|
+
const url = data.bucketName || img;
|
|
476
|
+
let dims;
|
|
477
|
+
try {
|
|
478
|
+
dims = await getImageDimensions(url);
|
|
479
|
+
imgUrl.value = url;
|
|
480
|
+
} catch {
|
|
481
|
+
try {
|
|
482
|
+
dims = await getImageDimensions(img);
|
|
483
|
+
imgUrl.value = img;
|
|
484
|
+
} catch {
|
|
485
|
+
dims = { width: 800, height: 600 };
|
|
486
|
+
imgUrl.value = "";
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
size.value = [dims.width, dims.height];
|
|
490
|
+
extent.value = [0, 0, dims.width, dims.height];
|
|
491
|
+
center.value = [dims.width / 2, dims.height / 2];
|
|
492
|
+
if (rrefMap.value) {
|
|
493
|
+
const view = rrefMap.value.getView();
|
|
494
|
+
if (view) {
|
|
495
|
+
view.setCenter(center.value);
|
|
496
|
+
view.setZoom(zoom.value);
|
|
497
|
+
}
|
|
498
|
+
rrefMap.value.calculateAutoZoom && rrefMap.value.calculateAutoZoom();
|
|
499
|
+
}
|
|
500
|
+
if (data == null ? void 0 : data.bucketName) {
|
|
501
|
+
if (filtrationType.value && filtrationType.value.length > 0) {
|
|
502
|
+
const geoConfig = {
|
|
503
|
+
Areas: { geojson: data == null ? void 0 : data.geojson, geomType: "Polygon" },
|
|
504
|
+
Devices: { geojson: data == null ? void 0 : data.geojson, geomType: "Point" },
|
|
505
|
+
Facilities: { geojson: data == null ? void 0 : data.facilityGeoJson, geomType: "Point" },
|
|
506
|
+
Cameras: { geojson: data == null ? void 0 : data.videoGeoJson, geomType: "Point" }
|
|
507
|
+
};
|
|
508
|
+
filtrationType.value.forEach((element) => {
|
|
509
|
+
const conf = geoConfig[element];
|
|
510
|
+
if (!(conf == null ? void 0 : conf.geojson)) return;
|
|
511
|
+
const filtered = JSON.parse(conf.geojson).features.filter(
|
|
512
|
+
(feature) => feature.geometry && feature.geometry.type === conf.geomType
|
|
513
|
+
);
|
|
514
|
+
loadFeaturesAndHandleWarning(
|
|
515
|
+
JSON.stringify({ type: "FeatureCollection", features: filtered }),
|
|
516
|
+
centerOnWarning
|
|
517
|
+
);
|
|
518
|
+
});
|
|
519
|
+
} else {
|
|
520
|
+
if ((data == null ? void 0 : data.videoGeoJson) && alarmType.value === "video") {
|
|
521
|
+
if (!(data == null ? void 0 : data.videoGeoJson)) {
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
loadFeaturesAndHandleWarning(data == null ? void 0 : data.videoGeoJson, centerOnWarning);
|
|
525
|
+
} else {
|
|
526
|
+
if (!(data == null ? void 0 : data.geojson)) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
loadFeaturesAndHandleWarning(data == null ? void 0 : data.geojson, centerOnWarning);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}, "loadingSource");
|
|
534
|
+
const FnUpdateFloor = /* @__PURE__ */ __name((item) => {
|
|
535
|
+
loadingSource(item, false);
|
|
536
|
+
}, "FnUpdateFloor");
|
|
537
|
+
const FnUpdateDrawFeature2 = /* @__PURE__ */ __name((event) => {
|
|
538
|
+
event.feature.set("color", defaultColor.value);
|
|
539
|
+
event.feature.set("drawType", "lineString");
|
|
540
|
+
}, "FnUpdateDrawFeature2");
|
|
541
|
+
const FnUpdateDrawFeature = /* @__PURE__ */ __name((event) => {
|
|
542
|
+
event.feature.set("color", defaultColor.value);
|
|
543
|
+
event.feature.set("text", "\u91CD\u70B9\u9632\u63A7\u533A\u57DF");
|
|
544
|
+
}, "FnUpdateDrawFeature");
|
|
545
|
+
const FnOverrideStyle = /* @__PURE__ */ __name((feature, style) => {
|
|
546
|
+
var _a, _b, _c, _d, _e, _f;
|
|
547
|
+
const code = (_a = feature.getProperties()) == null ? void 0 : _a.code;
|
|
548
|
+
const iconUrl = configIcon.value[code] || img$1;
|
|
549
|
+
if (code && iconUrl) {
|
|
550
|
+
const isWarningOrEdit = isWaringCode(code) || activatedMode.value === "edit";
|
|
551
|
+
const scale = isWarningOrEdit ? 1 : 0.8;
|
|
552
|
+
const deviceState = (_e = (_d = (_b = listDevice.value.find((item) => item.code === code)) == null ? void 0 : _b.state) != null ? _d : (_c = feature.get("other")) == null ? void 0 : _c.state) != null ? _e : feature.get("state");
|
|
553
|
+
const iconStyle = (_f = rrefMap.value) == null ? void 0 : _f.createIcon(iconUrl, scale, deviceState);
|
|
554
|
+
feature.setStyle(iconStyle);
|
|
555
|
+
} else {
|
|
556
|
+
updateFeatureStyle(feature);
|
|
557
|
+
}
|
|
558
|
+
return style;
|
|
559
|
+
}, "FnOverrideStyle");
|
|
560
|
+
const deleteFeature = /* @__PURE__ */ __name((feature) => {
|
|
561
|
+
var _a;
|
|
562
|
+
(_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().removeFeature(feature);
|
|
563
|
+
}, "deleteFeature");
|
|
564
|
+
const updateFeatureStyle = /* @__PURE__ */ __name((feature = activatedFeature.value, isSelected = false, _offset = 0.4) => {
|
|
565
|
+
if (!feature) {
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
const text = new Text({
|
|
569
|
+
overflow: true,
|
|
570
|
+
textBaseline: "middle",
|
|
571
|
+
font: "normal 14px \u5FAE\u8F6F\u96C5\u9ED1",
|
|
572
|
+
text: feature.get("text") || "\u91CD\u70B9\u533A\u57DF",
|
|
573
|
+
fill: new Fill({
|
|
574
|
+
color: "red"
|
|
575
|
+
}),
|
|
576
|
+
backgroundFill: new Fill({
|
|
577
|
+
color: "white"
|
|
578
|
+
}),
|
|
579
|
+
padding: [2, 5, 2, 5]
|
|
580
|
+
});
|
|
581
|
+
const textStyle = new Style({
|
|
582
|
+
text,
|
|
583
|
+
fill: new Fill({
|
|
584
|
+
color: feature.get("color") || "rgba(255,255,51,0.2)"
|
|
585
|
+
}),
|
|
586
|
+
stroke: new Stroke({
|
|
587
|
+
color: feature.get("color") || "rgba(255,255,51,0.2)",
|
|
588
|
+
width: isSelected ? 4 : 1
|
|
589
|
+
})
|
|
590
|
+
});
|
|
591
|
+
feature.setStyle(textStyle);
|
|
592
|
+
}, "updateFeatureStyle");
|
|
593
|
+
const FnSetColor = /* @__PURE__ */ __name((color) => {
|
|
594
|
+
defaultColor.value = color;
|
|
595
|
+
if (activatedFeature.value) {
|
|
596
|
+
activatedFeature.value.set("color", color);
|
|
597
|
+
updateFeatureStyle(activatedFeature.value, true);
|
|
598
|
+
}
|
|
599
|
+
activatedBottomBar.value = "\u9009\u62E9";
|
|
600
|
+
}, "FnSetColor");
|
|
601
|
+
const handlerChecked = /* @__PURE__ */ __name((key) => {
|
|
602
|
+
var _a, _b, _c, _d, _e, _f;
|
|
603
|
+
activatedBottomBar.value = key;
|
|
604
|
+
switch (key) {
|
|
605
|
+
case "\u4FDD\u5B58":
|
|
606
|
+
FnSaveMain();
|
|
607
|
+
break;
|
|
608
|
+
case "\u91CD\u7F6E":
|
|
609
|
+
(_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().clear();
|
|
610
|
+
break;
|
|
611
|
+
case "\u653E\u5927": {
|
|
612
|
+
const view = (_b = rrefMap.value) == null ? void 0 : _b.getView();
|
|
613
|
+
if (view) view.setZoom(((_c = view.getZoom()) != null ? _c : 1) + 1);
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
case "\u7F29\u5C0F": {
|
|
617
|
+
const view = (_d = rrefMap.value) == null ? void 0 : _d.getView();
|
|
618
|
+
if (view) view.setZoom(((_e = view.getZoom()) != null ? _e : 1) - 1);
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
case "\u533A\u57DF\u6A21\u677F":
|
|
622
|
+
(function() {
|
|
623
|
+
var _a2;
|
|
624
|
+
const feature = new Feature({
|
|
625
|
+
geometry: new Polygon([
|
|
626
|
+
[
|
|
627
|
+
[786.3792005168201, 338.76241851619795],
|
|
628
|
+
[745.2306619461384, 268.6210691239884],
|
|
629
|
+
[720.3979398123276, 226.2914822164155],
|
|
630
|
+
[689.3061489176491, 181.81733917636961],
|
|
631
|
+
[650.6757212309868, 224.32142350364663],
|
|
632
|
+
[635.9358768302526, 239.17937425863389],
|
|
633
|
+
[628.3098681327549, 250.58557144777728],
|
|
634
|
+
[607.7260105988584, 269.24237742792496],
|
|
635
|
+
[657.7235396817343, 346.765203291549],
|
|
636
|
+
[667.2401356802386, 362.85727288146916],
|
|
637
|
+
[709.1159873844781, 428.26685621909996],
|
|
638
|
+
[786.3792005168201, 338.76241851619795]
|
|
639
|
+
]
|
|
640
|
+
]),
|
|
641
|
+
text: "\u91CD\u70B9\u6D88\u9632\u533A\u57DF\u4ED3\u5E93",
|
|
642
|
+
color: defaultColor.value
|
|
643
|
+
});
|
|
644
|
+
(_a2 = rrefMap.value) == null ? void 0 : _a2.getVectorSource().addFeature(feature);
|
|
645
|
+
})();
|
|
646
|
+
break;
|
|
647
|
+
case "\u539F\u59CB\u5C3A\u5BF8":
|
|
648
|
+
(_f = rrefMap.value) == null ? void 0 : _f.getView().setZoom(1);
|
|
649
|
+
break;
|
|
650
|
+
default:
|
|
651
|
+
break;
|
|
652
|
+
}
|
|
653
|
+
}, "handlerChecked");
|
|
654
|
+
const dragStart = /* @__PURE__ */ __name((item) => {
|
|
655
|
+
activatedDragItem.value = item;
|
|
656
|
+
}, "dragStart");
|
|
657
|
+
const dragEnd = /* @__PURE__ */ __name((evt) => {
|
|
658
|
+
setTimeout(() => {
|
|
659
|
+
var _a;
|
|
660
|
+
const viewCoordinate = move1.value;
|
|
661
|
+
if (activatedDragItem.value && viewCoordinate) {
|
|
662
|
+
const feature = new Feature({
|
|
663
|
+
geometry: new Point([viewCoordinate[0], viewCoordinate[1]]),
|
|
664
|
+
type: "\u706D\u706B\u5668",
|
|
665
|
+
deviceType: activatedDragItem.value.deviceType,
|
|
666
|
+
code: activatedDragItem.value.code,
|
|
667
|
+
other: activatedDragItem.value
|
|
668
|
+
});
|
|
669
|
+
(_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().addFeature(feature);
|
|
670
|
+
}
|
|
671
|
+
}, 100);
|
|
672
|
+
}, "dragEnd");
|
|
673
|
+
const listUnitDevice = computed(() => {
|
|
674
|
+
const codeArr = activatedArrayFeatures.value.reduce(
|
|
675
|
+
(acc, item) => {
|
|
676
|
+
if (item.values_.geometry.getType() === "Point") {
|
|
677
|
+
acc.push(item.values_.code);
|
|
678
|
+
}
|
|
679
|
+
return acc;
|
|
680
|
+
},
|
|
681
|
+
[]
|
|
682
|
+
);
|
|
683
|
+
let _listUnitDevice = listDevice.value.filter((item) => {
|
|
684
|
+
return !codeArr.some((code) => item.code === code);
|
|
685
|
+
});
|
|
686
|
+
if (queryDeviceList.value.activatedDeviceModel) {
|
|
687
|
+
_listUnitDevice = _listUnitDevice.filter((item) => {
|
|
688
|
+
return item.deviceModelName === queryDeviceList.value.activatedDeviceModel;
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
if (queryDeviceList.value.activatedDeviceType) {
|
|
692
|
+
_listUnitDevice = _listUnitDevice.filter((item) => {
|
|
693
|
+
return item.deviceTypeName === queryDeviceList.value.activatedDeviceType;
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
if (queryDeviceList.value.activatedManufacturer) {
|
|
697
|
+
_listUnitDevice = _listUnitDevice.filter((item) => {
|
|
698
|
+
return item.manufacturerName === queryDeviceList.value.activatedManufacturer;
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
return _listUnitDevice;
|
|
702
|
+
});
|
|
703
|
+
const FnCloseMain = /* @__PURE__ */ __name(() => {
|
|
704
|
+
emit("closeMain");
|
|
705
|
+
}, "FnCloseMain");
|
|
706
|
+
const FnSaveMain = /* @__PURE__ */ __name(() => {
|
|
707
|
+
var _a;
|
|
708
|
+
document.documentElement.classList.remove("dark");
|
|
709
|
+
const features = ((_a = rrefMap.value) == null ? void 0 : _a.getVectorSource().getFeatures()) || [];
|
|
710
|
+
const jsonObj = new GeoJSON().writeFeatures(features);
|
|
711
|
+
emit("saveMain", { geojson: jsonObj, floor: activatedFloor.value });
|
|
712
|
+
}, "FnSaveMain");
|
|
713
|
+
const configMenuItems = ref([
|
|
714
|
+
{
|
|
715
|
+
text: "\u5220\u9664",
|
|
716
|
+
icon: img$2,
|
|
717
|
+
callback: /* @__PURE__ */ __name((val) => {
|
|
718
|
+
if (rrefMap.value.getVectorSource()) {
|
|
719
|
+
rrefMap.value.getVectorSource().removeFeature(activatedFeature.value);
|
|
720
|
+
}
|
|
721
|
+
}, "callback")
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
text: "\u7F16\u8F91",
|
|
725
|
+
icon: img$3,
|
|
726
|
+
classname: "some-style-class",
|
|
727
|
+
callback: /* @__PURE__ */ __name((val) => {
|
|
728
|
+
activatedBottomBar.value = "\u7F16\u8F91";
|
|
729
|
+
}, "callback")
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
text: "\u989C\u8272",
|
|
733
|
+
icon: img$4,
|
|
734
|
+
classname: "some-style-class",
|
|
735
|
+
callback: /* @__PURE__ */ __name((val) => {
|
|
736
|
+
activatedBottomBar.value = "\u989C\u8272";
|
|
737
|
+
}, "callback")
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
text: "\u4FDD\u5B58",
|
|
741
|
+
icon: img$5,
|
|
742
|
+
classname: "some-style-class",
|
|
743
|
+
callback: /* @__PURE__ */ __name((val) => {
|
|
744
|
+
FnSaveMain();
|
|
745
|
+
}, "callback")
|
|
746
|
+
}
|
|
747
|
+
]);
|
|
748
|
+
__expose({
|
|
749
|
+
open
|
|
750
|
+
});
|
|
751
|
+
return (_ctx, _cache) => {
|
|
752
|
+
const _component_el_card = resolveComponent("el-card");
|
|
753
|
+
const _component_el_popover = resolveComponent("el-popover");
|
|
754
|
+
const _component_el_option = resolveComponent("el-option");
|
|
755
|
+
const _component_el_select = resolveComponent("el-select");
|
|
756
|
+
const _component_el_input = resolveComponent("el-input");
|
|
757
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
758
|
+
createVNode(
|
|
759
|
+
_sfc_main$1,
|
|
760
|
+
{
|
|
761
|
+
ref_key: "refFloor",
|
|
762
|
+
ref: refFloor,
|
|
763
|
+
onChangeFloor: FnUpdateFloor
|
|
764
|
+
},
|
|
765
|
+
null,
|
|
766
|
+
512
|
|
767
|
+
/* NEED_PATCH */
|
|
768
|
+
),
|
|
769
|
+
activatedMode.value === "edit" ? (openBlock(), createBlock(_component_el_card, {
|
|
770
|
+
key: 0,
|
|
771
|
+
style: { "height": "50px", "width": "680px", "z-index": "999999999 !important", "top": "5px", "left": "5px" },
|
|
772
|
+
class: "absolute tob-6"
|
|
773
|
+
}, {
|
|
774
|
+
default: withCtx(() => [
|
|
775
|
+
createElementVNode("div", _hoisted_2, [
|
|
776
|
+
(openBlock(true), createElementBlock(
|
|
777
|
+
Fragment,
|
|
778
|
+
null,
|
|
779
|
+
renderList(configTopBar.value, (o) => {
|
|
780
|
+
return openBlock(), createElementBlock("div", {
|
|
781
|
+
key: o.name,
|
|
782
|
+
class: "mr-3 cursor-pointer text item t truncate ...",
|
|
783
|
+
onClick: _cache[0] || (_cache[0] = ($event) => FnCloseMain())
|
|
784
|
+
}, [
|
|
785
|
+
createElementVNode(
|
|
786
|
+
"i",
|
|
787
|
+
{
|
|
788
|
+
class: normalizeClass(["iconfont", [o.icon]])
|
|
789
|
+
},
|
|
790
|
+
null,
|
|
791
|
+
2
|
|
792
|
+
/* CLASS */
|
|
793
|
+
),
|
|
794
|
+
createTextVNode(
|
|
795
|
+
" " + toDisplayString(o.name) + " ",
|
|
796
|
+
1
|
|
797
|
+
/* TEXT */
|
|
798
|
+
),
|
|
799
|
+
o.name !== "\u9000\u51FA" ? (openBlock(), createElementBlock(
|
|
800
|
+
"span",
|
|
801
|
+
_hoisted_3,
|
|
802
|
+
toDisplayString(o.value),
|
|
803
|
+
1
|
|
804
|
+
/* TEXT */
|
|
805
|
+
)) : createCommentVNode("v-if", true)
|
|
806
|
+
]);
|
|
807
|
+
}),
|
|
808
|
+
128
|
|
809
|
+
/* KEYED_FRAGMENT */
|
|
810
|
+
))
|
|
811
|
+
])
|
|
812
|
+
]),
|
|
813
|
+
_: 1
|
|
814
|
+
/* STABLE */
|
|
815
|
+
})) : createCommentVNode("v-if", true),
|
|
816
|
+
activatedMode.value === "edit" ? (openBlock(), createBlock(_component_el_card, {
|
|
817
|
+
key: 1,
|
|
818
|
+
style: { "height": "50px", "width": "920px", "z-index": "999999999 !important", "transform": "translateX(-50%)", "left": "50%" },
|
|
819
|
+
class: "absolute bottom-6"
|
|
820
|
+
}, {
|
|
821
|
+
default: withCtx(() => [
|
|
822
|
+
createElementVNode("div", _hoisted_4, [
|
|
823
|
+
(openBlock(true), createElementBlock(
|
|
824
|
+
Fragment,
|
|
825
|
+
null,
|
|
826
|
+
renderList(configBottomBar.value, (o) => {
|
|
827
|
+
return openBlock(), createElementBlock(
|
|
828
|
+
Fragment,
|
|
829
|
+
{
|
|
830
|
+
key: o.name
|
|
831
|
+
},
|
|
832
|
+
[
|
|
833
|
+
o.name !== "\u989C\u8272" && o.name !== "\u533A\u57DF\u8BBE\u7F6E" ? (openBlock(), createElementBlock("div", {
|
|
834
|
+
key: 0,
|
|
835
|
+
class: normalizeClass(["mr-3 cursor-pointer text item", [activatedBottomBar.value === o.name ? "bg-red-600" : ""]]),
|
|
836
|
+
onClick: /* @__PURE__ */ __name(($event) => handlerChecked(o.name), "onClick")
|
|
837
|
+
}, [
|
|
838
|
+
createElementVNode("span", null, [
|
|
839
|
+
createElementVNode(
|
|
840
|
+
"i",
|
|
841
|
+
{
|
|
842
|
+
class: normalizeClass(["iconfont", [o.icon]])
|
|
843
|
+
},
|
|
844
|
+
null,
|
|
845
|
+
2
|
|
846
|
+
/* CLASS */
|
|
847
|
+
),
|
|
848
|
+
createTextVNode(
|
|
849
|
+
" " + toDisplayString(o.name),
|
|
850
|
+
1
|
|
851
|
+
/* TEXT */
|
|
852
|
+
)
|
|
853
|
+
])
|
|
854
|
+
], 10, _hoisted_5)) : o.name === "\u533A\u57DF\u8BBE\u7F6E" ? (openBlock(), createBlock(
|
|
855
|
+
_component_el_popover,
|
|
856
|
+
{
|
|
857
|
+
key: 1,
|
|
858
|
+
width: 250,
|
|
859
|
+
style: { "height": "350px !important" },
|
|
860
|
+
placement: "top",
|
|
861
|
+
trigger: "click",
|
|
862
|
+
"popper-class": "t-popper"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
reference: withCtx(() => [
|
|
866
|
+
createElementVNode("div", {
|
|
867
|
+
class: normalizeClass(["mr-3 cursor-pointer text item", [activatedBottomBar.value === o.name ? "bg-red-600" : ""]]),
|
|
868
|
+
onClick: /* @__PURE__ */ __name(($event) => handlerChecked(o.name), "onClick")
|
|
869
|
+
}, [
|
|
870
|
+
createElementVNode("span", null, [
|
|
871
|
+
createElementVNode(
|
|
872
|
+
"i",
|
|
873
|
+
{
|
|
874
|
+
class: normalizeClass(["iconfont", [o.icon]])
|
|
875
|
+
},
|
|
876
|
+
null,
|
|
877
|
+
2
|
|
878
|
+
/* CLASS */
|
|
879
|
+
),
|
|
880
|
+
createTextVNode(
|
|
881
|
+
" " + toDisplayString(o.name),
|
|
882
|
+
1
|
|
883
|
+
/* TEXT */
|
|
884
|
+
)
|
|
885
|
+
])
|
|
886
|
+
], 10, _hoisted_6)
|
|
887
|
+
]),
|
|
888
|
+
default: withCtx(() => [
|
|
889
|
+
(openBlock(true), createElementBlock(
|
|
890
|
+
Fragment,
|
|
891
|
+
null,
|
|
892
|
+
renderList(configBottomBar2.value, (o2) => {
|
|
893
|
+
return openBlock(), createElementBlock("div", {
|
|
894
|
+
key: o2.name,
|
|
895
|
+
class: normalizeClass(["mr-3 cursor-pointer text item", [activatedBottomBar.value === o2.name ? "bg-red-600" : ""]]),
|
|
896
|
+
onClick: /* @__PURE__ */ __name(($event) => handlerChecked(o2.name), "onClick")
|
|
897
|
+
}, [
|
|
898
|
+
createElementVNode("span", null, [
|
|
899
|
+
createElementVNode(
|
|
900
|
+
"i",
|
|
901
|
+
{
|
|
902
|
+
class: normalizeClass(["iconfont", [o2.icon]])
|
|
903
|
+
},
|
|
904
|
+
null,
|
|
905
|
+
2
|
|
906
|
+
/* CLASS */
|
|
907
|
+
),
|
|
908
|
+
createTextVNode(
|
|
909
|
+
" " + toDisplayString(o2.name),
|
|
910
|
+
1
|
|
911
|
+
/* TEXT */
|
|
912
|
+
)
|
|
913
|
+
])
|
|
914
|
+
], 10, _hoisted_7);
|
|
915
|
+
}),
|
|
916
|
+
128
|
|
917
|
+
/* KEYED_FRAGMENT */
|
|
918
|
+
))
|
|
919
|
+
]),
|
|
920
|
+
_: 2
|
|
921
|
+
/* DYNAMIC */
|
|
922
|
+
},
|
|
923
|
+
1024
|
|
924
|
+
/* DYNAMIC_SLOTS */
|
|
925
|
+
)) : (openBlock(), createBlock(
|
|
926
|
+
_component_el_popover,
|
|
927
|
+
{
|
|
928
|
+
key: 2,
|
|
929
|
+
width: 250,
|
|
930
|
+
style: { "height": "350px !important" },
|
|
931
|
+
placement: "top",
|
|
932
|
+
trigger: "click",
|
|
933
|
+
"popper-class": "t-popper"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
reference: withCtx(() => [
|
|
937
|
+
createElementVNode("div", {
|
|
938
|
+
class: normalizeClass(["mr-3 cursor-pointer text item", [activatedBottomBar.value === o.name ? "bg-red-600" : ""]]),
|
|
939
|
+
onClick: /* @__PURE__ */ __name(($event) => handlerChecked(o.name), "onClick")
|
|
940
|
+
}, [
|
|
941
|
+
createElementVNode("span", null, [
|
|
942
|
+
createElementVNode(
|
|
943
|
+
"i",
|
|
944
|
+
{
|
|
945
|
+
class: normalizeClass(["iconfont", [o.icon]])
|
|
946
|
+
},
|
|
947
|
+
null,
|
|
948
|
+
2
|
|
949
|
+
/* CLASS */
|
|
950
|
+
),
|
|
951
|
+
createTextVNode(
|
|
952
|
+
" " + toDisplayString(o.name),
|
|
953
|
+
1
|
|
954
|
+
/* TEXT */
|
|
955
|
+
)
|
|
956
|
+
])
|
|
957
|
+
], 10, _hoisted_8)
|
|
958
|
+
]),
|
|
959
|
+
default: withCtx(() => [
|
|
960
|
+
createElementVNode("div", _hoisted_9, [
|
|
961
|
+
(openBlock(true), createElementBlock(
|
|
962
|
+
Fragment,
|
|
963
|
+
null,
|
|
964
|
+
renderList(colorList.value, (c) => {
|
|
965
|
+
return openBlock(), createElementBlock("div", {
|
|
966
|
+
key: c.value,
|
|
967
|
+
class: "flex flex-col items-center cursor-pointer",
|
|
968
|
+
onClick: /* @__PURE__ */ __name(($event) => FnSetColor(c.value), "onClick")
|
|
969
|
+
}, [
|
|
970
|
+
createElementVNode(
|
|
971
|
+
"span",
|
|
972
|
+
{
|
|
973
|
+
class: "w-8 h-8 rounded border border-gray-300",
|
|
974
|
+
style: normalizeStyle({ backgroundColor: c.value })
|
|
975
|
+
},
|
|
976
|
+
null,
|
|
977
|
+
4
|
|
978
|
+
/* STYLE */
|
|
979
|
+
),
|
|
980
|
+
createElementVNode(
|
|
981
|
+
"span",
|
|
982
|
+
_hoisted_11,
|
|
983
|
+
toDisplayString(c.name),
|
|
984
|
+
1
|
|
985
|
+
/* TEXT */
|
|
986
|
+
)
|
|
987
|
+
], 8, _hoisted_10);
|
|
988
|
+
}),
|
|
989
|
+
128
|
|
990
|
+
/* KEYED_FRAGMENT */
|
|
991
|
+
))
|
|
992
|
+
])
|
|
993
|
+
]),
|
|
994
|
+
_: 2
|
|
995
|
+
/* DYNAMIC */
|
|
996
|
+
},
|
|
997
|
+
1024
|
|
998
|
+
/* DYNAMIC_SLOTS */
|
|
999
|
+
))
|
|
1000
|
+
],
|
|
1001
|
+
64
|
|
1002
|
+
/* STABLE_FRAGMENT */
|
|
1003
|
+
);
|
|
1004
|
+
}),
|
|
1005
|
+
128
|
|
1006
|
+
/* KEYED_FRAGMENT */
|
|
1007
|
+
))
|
|
1008
|
+
])
|
|
1009
|
+
]),
|
|
1010
|
+
_: 1
|
|
1011
|
+
/* STABLE */
|
|
1012
|
+
})) : createCommentVNode("v-if", true),
|
|
1013
|
+
activatedMode.value === "edit" ? (openBlock(), createBlock(_component_el_card, {
|
|
1014
|
+
key: 2,
|
|
1015
|
+
style: { "width": "500px", "z-index": "999999999 !important" },
|
|
1016
|
+
class: normalizeClass(["absolute right-6", [activatedFold.value === true ? "t-fold " : "t-unfold open-info-list"]]),
|
|
1017
|
+
"body-style": { height: "100%" }
|
|
1018
|
+
}, {
|
|
1019
|
+
default: withCtx(() => [
|
|
1020
|
+
createElementVNode("div", _hoisted_12, [
|
|
1021
|
+
createElementVNode("div", _hoisted_13, [
|
|
1022
|
+
createElementVNode(
|
|
1023
|
+
"span",
|
|
1024
|
+
{
|
|
1025
|
+
class: normalizeClass(["flex items-center mr-5 cursor-pointer", [activatedList.value ? "text-primary" : ""]]),
|
|
1026
|
+
onClick: _cache[1] || (_cache[1] = ($event) => activatedList.value = true)
|
|
1027
|
+
},
|
|
1028
|
+
toDisplayString(list_title.value),
|
|
1029
|
+
3
|
|
1030
|
+
/* TEXT, CLASS */
|
|
1031
|
+
),
|
|
1032
|
+
createElementVNode(
|
|
1033
|
+
"span",
|
|
1034
|
+
{
|
|
1035
|
+
class: normalizeClass(["flex items-center cursor-pointer", [!activatedList.value ? "text-primary" : ""]]),
|
|
1036
|
+
onClick: _cache[2] || (_cache[2] = ($event) => activatedList.value = false)
|
|
1037
|
+
},
|
|
1038
|
+
" \u6807\u6CE8\u4FE1\u606F\u5217\u8868 ",
|
|
1039
|
+
2
|
|
1040
|
+
/* CLASS */
|
|
1041
|
+
)
|
|
1042
|
+
]),
|
|
1043
|
+
activatedFold.value ? (openBlock(), createElementBlock("span", {
|
|
1044
|
+
key: 0,
|
|
1045
|
+
class: "flex items-center cursor-pointer text-primary",
|
|
1046
|
+
onClick: FnUpdateActivatedFold
|
|
1047
|
+
}, " \u5C55\u5F00 ")) : (openBlock(), createElementBlock("span", {
|
|
1048
|
+
key: 1,
|
|
1049
|
+
class: "flex items-center cursor-pointer text-primary",
|
|
1050
|
+
onClick: FnUpdateActivatedFold
|
|
1051
|
+
}, " \u6536\u8D77 "))
|
|
1052
|
+
]),
|
|
1053
|
+
createVNode(_component_el_select, {
|
|
1054
|
+
modelValue: queryDeviceList.value.activatedDeviceType,
|
|
1055
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => queryDeviceList.value.activatedDeviceType = $event),
|
|
1056
|
+
clearable: "",
|
|
1057
|
+
style: { "width": "32%" },
|
|
1058
|
+
class: "mr-2",
|
|
1059
|
+
placeholder: "\u8BF7\u9009\u62E9\u7C7B\u578B",
|
|
1060
|
+
teleported: false
|
|
1061
|
+
}, {
|
|
1062
|
+
default: withCtx(() => [
|
|
1063
|
+
(openBlock(true), createElementBlock(
|
|
1064
|
+
Fragment,
|
|
1065
|
+
null,
|
|
1066
|
+
renderList(configOptionsDeviceType.value, (item) => {
|
|
1067
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1068
|
+
key: item.value,
|
|
1069
|
+
label: item.label,
|
|
1070
|
+
value: item.value
|
|
1071
|
+
}, null, 8, ["label", "value"]);
|
|
1072
|
+
}),
|
|
1073
|
+
128
|
|
1074
|
+
/* KEYED_FRAGMENT */
|
|
1075
|
+
))
|
|
1076
|
+
]),
|
|
1077
|
+
_: 1
|
|
1078
|
+
/* STABLE */
|
|
1079
|
+
}, 8, ["modelValue"]),
|
|
1080
|
+
createVNode(_component_el_select, {
|
|
1081
|
+
modelValue: queryDeviceList.value.activatedDeviceModel,
|
|
1082
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => queryDeviceList.value.activatedDeviceModel = $event),
|
|
1083
|
+
clearable: "",
|
|
1084
|
+
style: { "width": "32%" },
|
|
1085
|
+
class: "mr-2",
|
|
1086
|
+
placeholder: "\u8BF7\u9009\u62E9\u578B\u53F7",
|
|
1087
|
+
teleported: false
|
|
1088
|
+
}, {
|
|
1089
|
+
default: withCtx(() => [
|
|
1090
|
+
(openBlock(true), createElementBlock(
|
|
1091
|
+
Fragment,
|
|
1092
|
+
null,
|
|
1093
|
+
renderList(configOptionsDeviceModel.value, (item) => {
|
|
1094
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1095
|
+
key: item.value,
|
|
1096
|
+
label: item.label,
|
|
1097
|
+
value: item.value
|
|
1098
|
+
}, null, 8, ["label", "value"]);
|
|
1099
|
+
}),
|
|
1100
|
+
128
|
|
1101
|
+
/* KEYED_FRAGMENT */
|
|
1102
|
+
))
|
|
1103
|
+
]),
|
|
1104
|
+
_: 1
|
|
1105
|
+
/* STABLE */
|
|
1106
|
+
}, 8, ["modelValue"]),
|
|
1107
|
+
createVNode(_component_el_select, {
|
|
1108
|
+
modelValue: queryDeviceList.value.activatedManufacturer,
|
|
1109
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => queryDeviceList.value.activatedManufacturer = $event),
|
|
1110
|
+
clearable: "",
|
|
1111
|
+
style: { "width": "32%" },
|
|
1112
|
+
placeholder: "\u8BF7\u9009\u62E9\u5382\u5546",
|
|
1113
|
+
teleported: false
|
|
1114
|
+
}, {
|
|
1115
|
+
default: withCtx(() => [
|
|
1116
|
+
(openBlock(true), createElementBlock(
|
|
1117
|
+
Fragment,
|
|
1118
|
+
null,
|
|
1119
|
+
renderList(configOptionsManufacturer.value, (item) => {
|
|
1120
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1121
|
+
key: item.value,
|
|
1122
|
+
label: item.label,
|
|
1123
|
+
value: item.value
|
|
1124
|
+
}, null, 8, ["label", "value"]);
|
|
1125
|
+
}),
|
|
1126
|
+
128
|
|
1127
|
+
/* KEYED_FRAGMENT */
|
|
1128
|
+
))
|
|
1129
|
+
]),
|
|
1130
|
+
_: 1
|
|
1131
|
+
/* STABLE */
|
|
1132
|
+
}, 8, ["modelValue"]),
|
|
1133
|
+
activatedList.value ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
1134
|
+
_cache[6] || (_cache[6] = createElementVNode(
|
|
1135
|
+
"span",
|
|
1136
|
+
{ class: "col-span-1" },
|
|
1137
|
+
"\u56FE\u6807",
|
|
1138
|
+
-1
|
|
1139
|
+
/* CACHED */
|
|
1140
|
+
)),
|
|
1141
|
+
_cache[7] || (_cache[7] = createElementVNode(
|
|
1142
|
+
"span",
|
|
1143
|
+
{ class: "col-span-4" },
|
|
1144
|
+
"\u7F16\u53F7",
|
|
1145
|
+
-1
|
|
1146
|
+
/* CACHED */
|
|
1147
|
+
)),
|
|
1148
|
+
createCommentVNode(' <span class="col-span-2 text-center">\u697C\u5C42</span> '),
|
|
1149
|
+
createElementVNode(
|
|
1150
|
+
"span",
|
|
1151
|
+
_hoisted_15,
|
|
1152
|
+
toDisplayString(list_title.value === "\u8BBE\u5907\u4FE1\u606F\u5217\u8868" ? "\u8BBE\u5907\u7C7B\u578B" : "\u8BBE\u65BD\u7C7B\u578B"),
|
|
1153
|
+
1
|
|
1154
|
+
/* TEXT */
|
|
1155
|
+
),
|
|
1156
|
+
_cache[8] || (_cache[8] = createElementVNode(
|
|
1157
|
+
"span",
|
|
1158
|
+
{ class: "col-span-3" },
|
|
1159
|
+
"\u4F4D\u7F6E",
|
|
1160
|
+
-1
|
|
1161
|
+
/* CACHED */
|
|
1162
|
+
))
|
|
1163
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_16, _cache[9] || (_cache[9] = [
|
|
1164
|
+
createElementVNode(
|
|
1165
|
+
"span",
|
|
1166
|
+
{ class: "col-span-1" },
|
|
1167
|
+
"\u5E8F\u53F7",
|
|
1168
|
+
-1
|
|
1169
|
+
/* CACHED */
|
|
1170
|
+
),
|
|
1171
|
+
createElementVNode(
|
|
1172
|
+
"span",
|
|
1173
|
+
{ class: "col-span-1" },
|
|
1174
|
+
"\u56FE\u6807",
|
|
1175
|
+
-1
|
|
1176
|
+
/* CACHED */
|
|
1177
|
+
),
|
|
1178
|
+
createElementVNode(
|
|
1179
|
+
"span",
|
|
1180
|
+
{ class: "col-span-8" },
|
|
1181
|
+
"\u540D\u79F0",
|
|
1182
|
+
-1
|
|
1183
|
+
/* CACHED */
|
|
1184
|
+
),
|
|
1185
|
+
createElementVNode(
|
|
1186
|
+
"span",
|
|
1187
|
+
{ class: "col-span-2" },
|
|
1188
|
+
"\u64CD\u4F5C",
|
|
1189
|
+
-1
|
|
1190
|
+
/* CACHED */
|
|
1191
|
+
)
|
|
1192
|
+
]))),
|
|
1193
|
+
activatedList.value ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
1194
|
+
createCommentVNode(" {{ listUnitDevice.length }} "),
|
|
1195
|
+
(openBlock(true), createElementBlock(
|
|
1196
|
+
Fragment,
|
|
1197
|
+
null,
|
|
1198
|
+
renderList(listUnitDevice.value, (item, index) => {
|
|
1199
|
+
return openBlock(), createElementBlock("div", {
|
|
1200
|
+
key: index,
|
|
1201
|
+
class: "grid gap-1 mt-4 px-3.5 w-full grid-cols-12",
|
|
1202
|
+
title: item.deviceTypeName
|
|
1203
|
+
}, [
|
|
1204
|
+
createElementVNode("span", _hoisted_19, [
|
|
1205
|
+
createVNode(_sfc_main$2, {
|
|
1206
|
+
icon: configIcon.value[item.code] || unref(img$1),
|
|
1207
|
+
item,
|
|
1208
|
+
"map-ref": rrefMap.value,
|
|
1209
|
+
move1: move1.value,
|
|
1210
|
+
onDragstart: dragStart,
|
|
1211
|
+
onDragend: dragEnd
|
|
1212
|
+
}, null, 8, ["icon", "item", "map-ref", "move1"])
|
|
1213
|
+
]),
|
|
1214
|
+
createElementVNode(
|
|
1215
|
+
"span",
|
|
1216
|
+
_hoisted_20,
|
|
1217
|
+
toDisplayString(item.code),
|
|
1218
|
+
1
|
|
1219
|
+
/* TEXT */
|
|
1220
|
+
),
|
|
1221
|
+
createElementVNode("span", {
|
|
1222
|
+
class: "col-span-4 break-words",
|
|
1223
|
+
title: item.remark || item.deviceTypeName || item.videoName
|
|
1224
|
+
}, toDisplayString(item.remark || item.deviceTypeName || item.videoName), 9, _hoisted_21),
|
|
1225
|
+
createElementVNode("span", {
|
|
1226
|
+
class: "col-span-3 break-words",
|
|
1227
|
+
title: item.locationDesc
|
|
1228
|
+
}, toDisplayString(item.locationDesc || item.addressDesc), 9, _hoisted_22)
|
|
1229
|
+
], 8, _hoisted_18);
|
|
1230
|
+
}),
|
|
1231
|
+
128
|
|
1232
|
+
/* KEYED_FRAGMENT */
|
|
1233
|
+
))
|
|
1234
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
1235
|
+
(openBlock(true), createElementBlock(
|
|
1236
|
+
Fragment,
|
|
1237
|
+
null,
|
|
1238
|
+
renderList(activatedArrayFeatures.value, (item, index) => {
|
|
1239
|
+
return openBlock(), createElementBlock("div", {
|
|
1240
|
+
key: item,
|
|
1241
|
+
class: "grid gap-1 mt-4 px-3.5 w-full grid-cols-12"
|
|
1242
|
+
}, [
|
|
1243
|
+
createElementVNode(
|
|
1244
|
+
"span",
|
|
1245
|
+
_hoisted_24,
|
|
1246
|
+
toDisplayString(index + 1),
|
|
1247
|
+
1
|
|
1248
|
+
/* TEXT */
|
|
1249
|
+
),
|
|
1250
|
+
createElementVNode("span", _hoisted_25, [
|
|
1251
|
+
item.values_.geometry.getType() === "Point" ? (openBlock(), createElementBlock("div", _hoisted_26)) : (openBlock(), createElementBlock(
|
|
1252
|
+
"div",
|
|
1253
|
+
{
|
|
1254
|
+
key: 1,
|
|
1255
|
+
class: "!w-8 h-full",
|
|
1256
|
+
style: normalizeStyle(`background-color:${item.values_.color}`)
|
|
1257
|
+
},
|
|
1258
|
+
null,
|
|
1259
|
+
4
|
|
1260
|
+
/* STYLE */
|
|
1261
|
+
))
|
|
1262
|
+
]),
|
|
1263
|
+
createElementVNode("span", _hoisted_27, [
|
|
1264
|
+
item.values_.geometry.getType() === "Point" ? (openBlock(), createBlock(_component_el_input, {
|
|
1265
|
+
key: 0,
|
|
1266
|
+
modelValue: item.values_.type,
|
|
1267
|
+
"onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.values_.type = $event, "onUpdate:modelValue"),
|
|
1268
|
+
size: "large",
|
|
1269
|
+
clearable: ""
|
|
1270
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createBlock(_component_el_input, {
|
|
1271
|
+
key: 1,
|
|
1272
|
+
modelValue: item.values_.text,
|
|
1273
|
+
"onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.values_.text = $event, "onUpdate:modelValue"),
|
|
1274
|
+
size: "large",
|
|
1275
|
+
clearable: "",
|
|
1276
|
+
onChange: /* @__PURE__ */ __name(($event) => updateFeatureStyle(item), "onChange")
|
|
1277
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]))
|
|
1278
|
+
]),
|
|
1279
|
+
createElementVNode("span", {
|
|
1280
|
+
class: "flex items-center justify-center col-span-2 cursor-pointer",
|
|
1281
|
+
onClick: /* @__PURE__ */ __name(($event) => deleteFeature(item), "onClick")
|
|
1282
|
+
}, _cache[10] || (_cache[10] = [
|
|
1283
|
+
createElementVNode(
|
|
1284
|
+
"i",
|
|
1285
|
+
{ class: "iconfont icon-shanchu" },
|
|
1286
|
+
null,
|
|
1287
|
+
-1
|
|
1288
|
+
/* CACHED */
|
|
1289
|
+
)
|
|
1290
|
+
]), 8, _hoisted_28)
|
|
1291
|
+
]);
|
|
1292
|
+
}),
|
|
1293
|
+
128
|
|
1294
|
+
/* KEYED_FRAGMENT */
|
|
1295
|
+
))
|
|
1296
|
+
]))
|
|
1297
|
+
]),
|
|
1298
|
+
_: 1
|
|
1299
|
+
/* STABLE */
|
|
1300
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
1301
|
+
listFloor.value.length > 0 && activatedFloor.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
1302
|
+
key: 3,
|
|
1303
|
+
ref_key: "rrefMap",
|
|
1304
|
+
ref: rrefMap,
|
|
1305
|
+
"api-key": "AjtUzWJBHlI3Ma_Ke6Qv2fGRXEs0ua5hUQi54ECwfXTiWsitll4AkETZDihjcfeI",
|
|
1306
|
+
center: center.value,
|
|
1307
|
+
zoom: zoom.value,
|
|
1308
|
+
projection: projection.value,
|
|
1309
|
+
"img-url": imgUrl.value,
|
|
1310
|
+
size: size.value,
|
|
1311
|
+
extent: extent.value,
|
|
1312
|
+
"config-menu-items": configMenuItems.value,
|
|
1313
|
+
"activated-bottom-bar": activatedBottomBar.value,
|
|
1314
|
+
onReady: handleMapReady,
|
|
1315
|
+
_waring: hasWaring.value ? _waring.value : null,
|
|
1316
|
+
"activated-position-overlay-waring": activatedPositionOverlayWaring.value,
|
|
1317
|
+
"activated-position-overlay": activatedPositionOverlay.value,
|
|
1318
|
+
"activated-properties-overlay": activatedPropertiesOverlay.value,
|
|
1319
|
+
list_title: list_title.value,
|
|
1320
|
+
"alarm-type": alarmType.value,
|
|
1321
|
+
"svg-overlay": unref(img$6),
|
|
1322
|
+
"waring-icon": unref(img$7),
|
|
1323
|
+
FnUpdateDrawFeature,
|
|
1324
|
+
FnUpdateDrawFeature2,
|
|
1325
|
+
FnOverrideStyle
|
|
1326
|
+
}, {
|
|
1327
|
+
overlay: withCtx(() => {
|
|
1328
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
1329
|
+
return [
|
|
1330
|
+
activatedPropertiesOverlay.value.type && list_title.value === "\u8BBE\u5907\u4FE1\u606F\u5217\u8868" ? (openBlock(), createElementBlock("div", _hoisted_29, [
|
|
1331
|
+
createElementVNode("img", {
|
|
1332
|
+
src: unref(img$6),
|
|
1333
|
+
alt: "",
|
|
1334
|
+
class: "absolute w-full h-full"
|
|
1335
|
+
}, null, 8, _hoisted_30),
|
|
1336
|
+
createElementVNode(
|
|
1337
|
+
"div",
|
|
1338
|
+
_hoisted_31,
|
|
1339
|
+
" \u8BBE\u5907\u7F16\u7801\uFF1A " + toDisplayString((_a = activatedPropertiesOverlay.value.other) == null ? void 0 : _a.code),
|
|
1340
|
+
1
|
|
1341
|
+
/* TEXT */
|
|
1342
|
+
),
|
|
1343
|
+
createElementVNode(
|
|
1344
|
+
"div",
|
|
1345
|
+
_hoisted_32,
|
|
1346
|
+
" \u521B\u5EFA\u65E5\u671F\uFF1A " + toDisplayString((_b = activatedPropertiesOverlay.value.other) == null ? void 0 : _b.createTime),
|
|
1347
|
+
1
|
|
1348
|
+
/* TEXT */
|
|
1349
|
+
),
|
|
1350
|
+
createElementVNode("div", _hoisted_33, [
|
|
1351
|
+
_cache[11] || (_cache[11] = createTextVNode(
|
|
1352
|
+
" \u8BBE\u5907\u4F4D\u7F6E\uFF1A ",
|
|
1353
|
+
-1
|
|
1354
|
+
/* CACHED */
|
|
1355
|
+
)),
|
|
1356
|
+
createElementVNode("div", {
|
|
1357
|
+
class: "w-52 flex justify-start items-center text-gradient2 truncate ...",
|
|
1358
|
+
title: ((_c = activatedPropertiesOverlay.value.other) == null ? void 0 : _c.videoName) || ((_d = activatedPropertiesOverlay.value.other) == null ? void 0 : _d.addressDesc)
|
|
1359
|
+
}, toDisplayString(alarmType.value === "video" ? (_e = activatedPropertiesOverlay.value.other) == null ? void 0 : _e.videoName : (_f = activatedPropertiesOverlay.value.other) == null ? void 0 : _f.addressDesc), 9, _hoisted_34)
|
|
1360
|
+
]),
|
|
1361
|
+
createElementVNode("div", _hoisted_35, [
|
|
1362
|
+
_cache[12] || (_cache[12] = createTextVNode(
|
|
1363
|
+
" \u8BBE\u5907\u7C7B\u578B\uFF1A ",
|
|
1364
|
+
-1
|
|
1365
|
+
/* CACHED */
|
|
1366
|
+
)),
|
|
1367
|
+
createElementVNode("div", {
|
|
1368
|
+
class: "w-52 flex justify-start items-center text-gradient2 truncate ...",
|
|
1369
|
+
title: ((_g = activatedPropertiesOverlay.value.other) == null ? void 0 : _g.remark) || ((_h = activatedPropertiesOverlay.value.other) == null ? void 0 : _h.deviceTypeName) || ((_i = activatedPropertiesOverlay.value.other) == null ? void 0 : _i.facilityTypeName)
|
|
1370
|
+
}, toDisplayString(alarmType.value === "video" ? "\u6444\u50CF\u5934" : ((_j = activatedPropertiesOverlay.value.other) == null ? void 0 : _j.remark) || ((_k = activatedPropertiesOverlay.value.other) == null ? void 0 : _k.facilityTypeName) || ((_l = activatedPropertiesOverlay.value.other) == null ? void 0 : _l.deviceTypeName)), 9, _hoisted_36)
|
|
1371
|
+
])
|
|
1372
|
+
])) : createCommentVNode("v-if", true),
|
|
1373
|
+
createCommentVNode(" \u8BBE\u65BD\u4FE1\u606F\u5F39\u7A97 "),
|
|
1374
|
+
activatedPropertiesOverlay.value.type && list_title.value === "\u8BBE\u65BD\u4FE1\u606F\u5217\u8868" ? (openBlock(), createElementBlock("div", _hoisted_37, [
|
|
1375
|
+
createElementVNode("img", {
|
|
1376
|
+
src: unref(img$6),
|
|
1377
|
+
alt: "",
|
|
1378
|
+
class: "absolute w-full h-full"
|
|
1379
|
+
}, null, 8, _hoisted_38),
|
|
1380
|
+
createElementVNode(
|
|
1381
|
+
"div",
|
|
1382
|
+
_hoisted_39,
|
|
1383
|
+
" \u8BBE\u65BD\u7F16\u7801\uFF1A " + toDisplayString((_m = activatedPropertiesOverlay.value.other) == null ? void 0 : _m.code),
|
|
1384
|
+
1
|
|
1385
|
+
/* TEXT */
|
|
1386
|
+
),
|
|
1387
|
+
createElementVNode(
|
|
1388
|
+
"div",
|
|
1389
|
+
_hoisted_40,
|
|
1390
|
+
" \u521B\u5EFA\u65E5\u671F\uFF1A " + toDisplayString((_n = activatedPropertiesOverlay.value.other) == null ? void 0 : _n.createTime),
|
|
1391
|
+
1
|
|
1392
|
+
/* TEXT */
|
|
1393
|
+
),
|
|
1394
|
+
createElementVNode(
|
|
1395
|
+
"div",
|
|
1396
|
+
_hoisted_41,
|
|
1397
|
+
" \u8BBE\u65BD\u578B\u53F7\uFF1A " + toDisplayString((_o = activatedPropertiesOverlay.value.other) == null ? void 0 : _o.deviceModelName),
|
|
1398
|
+
1
|
|
1399
|
+
/* TEXT */
|
|
1400
|
+
),
|
|
1401
|
+
createElementVNode(
|
|
1402
|
+
"div",
|
|
1403
|
+
_hoisted_42,
|
|
1404
|
+
" \u8BBE\u65BD\u5382\u5546\uFF1A " + toDisplayString((_p = activatedPropertiesOverlay.value.other) == null ? void 0 : _p.manufacturerName),
|
|
1405
|
+
1
|
|
1406
|
+
/* TEXT */
|
|
1407
|
+
)
|
|
1408
|
+
])) : createCommentVNode("v-if", true)
|
|
1409
|
+
];
|
|
1410
|
+
}),
|
|
1411
|
+
_: 1
|
|
1412
|
+
/* STABLE */
|
|
1413
|
+
}, 8, ["center", "zoom", "projection", "img-url", "size", "extent", "config-menu-items", "activated-bottom-bar", "_waring", "activated-position-overlay-waring", "activated-position-overlay", "activated-properties-overlay", "list_title", "alarm-type", "svg-overlay", "waring-icon"])) : (openBlock(), createElementBlock("img", {
|
|
1414
|
+
key: 4,
|
|
1415
|
+
src: unref(img),
|
|
1416
|
+
alt: "\u9ED8\u8BA4\u5E95\u56FE",
|
|
1417
|
+
style: normalizeStyle({ width: `${size.value[0]}px`, height: `${size.value[1]}px` })
|
|
1418
|
+
}, null, 12, _hoisted_43))
|
|
1419
|
+
]);
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
export { _sfc_main as default };
|
|
1425
|
+
//# sourceMappingURL=geoMark.vue2.mjs.map
|