zjh-web-ui 1.0.10 → 1.0.11
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/config/resolver.js +1 -1
- package/dist/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.js +23 -23
- package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.js +2 -2
- package/dist/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue2.js +27 -27
- package/dist/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.js +38 -38
- package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.js +2 -2
- package/dist/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue2.js +80 -80
- package/dist/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.js +23 -23
- package/dist/components/HuiCountDownButton/HuiCountDownButton.vue.js +14 -14
- package/dist/components/HuiDataView/HuiDataView.vue2.js +37 -37
- package/dist/components/HuiGridForm/HuiGridForm.vue.js +2 -2
- package/dist/components/HuiGridForm/HuiGridForm.vue2.js +103 -103
- package/dist/components/HuiGridForm/HuiGridFormHooks.js +1 -1
- package/dist/components/HuiLineEditDialog/HuiLineEditDialog.vue2.js +69 -69
- package/dist/components/HuiLineEditPopover/HuiLineEditPopover.vue2.js +47 -47
- package/dist/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.js +21 -21
- package/dist/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.js +49 -49
- package/dist/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue2.js +2 -2
- package/dist/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.js +14 -14
- package/dist/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.js +18 -18
- package/dist/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.js +50 -50
- package/dist/components/HuiTags/HuiTags.vue2.js +9 -9
- package/dist/components/HuiTagsMore/HuiTagsMore.vue.js +12 -16
- package/dist/components/HuiTinymce/HuiTinymce.vue.js +10 -10
- package/dist/components/HuiTinymceDialog/HuiTinymceDialog.vue.js +43 -43
- package/dist/components/HuiTip/HuiTip.vue.js +15 -15
- package/dist/hooks/useHuiFormDialog/useHuiFormDialog.js +1 -1
- package/dist/index.d.ts +2116 -0
- package/dist/style.css +1 -1
- package/dist/utils/hui-rules.js +1 -1
- package/dist/utils/hui-tool/message-box/index.js +3 -3
- package/dist/utils/hui-tool/message-box/message-box.vue2.js +112 -0
- package/dist/utils/hui-tool/message-box/message-box.vue3.js +2 -2
- package/global.d.ts +21 -21
- package/package.json +1 -1
- package/types/index.d.ts +2115 -12
- package/dist/utils/hui-tool/message-box/message-box.vue.js +0 -112
- package/types/components/AMapConfig.d.ts +0 -2
- package/types/components/HuiAMapMassMarkers/HuiAMapMassMarkers.vue.d.ts +0 -105
- package/types/components/HuiAMapMassMarkers/index.d.ts +0 -107
- package/types/components/HuiAMapMassMarkers/type.d.ts +0 -58
- package/types/components/HuiAMapSearchAddress/HuiAMapSearchAddress.vue.d.ts +0 -76
- package/types/components/HuiAMapSearchAddress/index.d.ts +0 -77
- package/types/components/HuiAMapSearchAddress/type.d.ts +0 -19
- package/types/components/HuiAMapSearchAddressDialog/HuiAMapSearchAddressDialog.vue.d.ts +0 -38
- package/types/components/HuiAMapSearchAddressDialog/index.d.ts +0 -71
- package/types/components/HuiAMapSearchAddressDialog/type.d.ts +0 -17
- package/types/components/HuiAMapSelectAddress/HuiAMapSelectAddress.vue.d.ts +0 -76
- package/types/components/HuiAMapSelectAddress/index.d.ts +0 -77
- package/types/components/HuiAMapSelectAddress/type.d.ts +0 -19
- package/types/components/HuiAMapSelectAddressDialog/HuiAMapSelectAddressDialog.vue.d.ts +0 -38
- package/types/components/HuiAMapSelectAddressDialog/index.d.ts +0 -71
- package/types/components/HuiAMapSelectAddressDialog/type.d.ts +0 -17
- package/types/components/HuiCountDownButton/HuiCountDownButton.vue.d.ts +0 -44
- package/types/components/HuiCountDownButton/index.d.ts +0 -76
- package/types/components/HuiCountDownButton/type.d.ts +0 -20
- package/types/components/HuiDataView/HuiDataView.vue.d.ts +0 -60
- package/types/components/HuiDataView/index.d.ts +0 -109
- package/types/components/HuiDataView/type.d.ts +0 -49
- package/types/components/HuiGridForm/HuiGridForm.vue.d.ts +0 -77
- package/types/components/HuiGridForm/HuiGridFormHooks.d.ts +0 -4
- package/types/components/HuiGridForm/index.d.ts +0 -175
- package/types/components/HuiGridForm/type.d.ts +0 -67
- package/types/components/HuiLineEditDialog/HuiLineEditDialog.vue.d.ts +0 -75
- package/types/components/HuiLineEditDialog/index.d.ts +0 -173
- package/types/components/HuiLineEditDialog/type.d.ts +0 -86
- package/types/components/HuiLineEditPopover/HuiLineEditPopover.vue.d.ts +0 -74
- package/types/components/HuiLineEditPopover/index.d.ts +0 -133
- package/types/components/HuiLineEditPopover/type.d.ts +0 -23
- package/types/components/HuiPreviewRichTextDialog/HuiPreviewRichTextDialog.vue.d.ts +0 -31
- package/types/components/HuiPreviewRichTextDialog/index.d.ts +0 -22
- package/types/components/HuiPreviewRichTextDialog/type.d.ts +0 -4
- package/types/components/HuiRegionTreeDialog/HuiRegionTreeDialog.vue.d.ts +0 -53
- package/types/components/HuiRegionTreeDialog/index.d.ts +0 -68
- package/types/components/HuiRegionTreeDialog/type.d.ts +0 -24
- package/types/components/HuiRegionTreeSelect/HuiRegionTreeSelect.vue.d.ts +0 -25
- package/types/components/HuiRegionTreeSelect/index.d.ts +0 -29
- package/types/components/HuiRegionTreeSelect/type.d.ts +0 -6
- package/types/components/HuiSelectLoadStatus/HuiSelectLoadStatus.vue.d.ts +0 -14
- package/types/components/HuiSelectLoadStatus/index.d.ts +0 -33
- package/types/components/HuiSelectLoadStatus/type.d.ts +0 -11
- package/types/components/HuiShowUrlDialog/HuiShowUrlDialog.vue.d.ts +0 -37
- package/types/components/HuiShowUrlDialog/index.d.ts +0 -40
- package/types/components/HuiShowUrlDialog/type.d.ts +0 -11
- package/types/components/HuiStringArrayInputDialog/HuiStringArrayInputDialog.vue.d.ts +0 -44
- package/types/components/HuiStringArrayInputDialog/index.d.ts +0 -67
- package/types/components/HuiStringArrayInputDialog/type.d.ts +0 -33
- package/types/components/HuiTags/HuiTags.vue.d.ts +0 -37
- package/types/components/HuiTags/index.d.ts +0 -36
- package/types/components/HuiTagsMore/HuiTagsMore.vue.d.ts +0 -93
- package/types/components/HuiTagsMore/index.d.ts +0 -92
- package/types/components/HuiTinymce/HuiTinymce.vue.d.ts +0 -62
- package/types/components/HuiTinymce/HuiTinymceLinkHooks.d.ts +0 -3
- package/types/components/HuiTinymce/HuiTinymceSettingHooks.d.ts +0 -3
- package/types/components/HuiTinymce/index.d.ts +0 -66
- package/types/components/HuiTinymce/type.d.ts +0 -51
- package/types/components/HuiTinymceDialog/HuiTinymceDialog.vue.d.ts +0 -53
- package/types/components/HuiTinymceDialog/index.d.ts +0 -78
- package/types/components/HuiTinymceDialog/type.d.ts +0 -12
- package/types/components/HuiTip/HuiTip.vue.d.ts +0 -22
- package/types/components/HuiTip/index.d.ts +0 -99
- package/types/components/HuiTip/type.d.ts +0 -14
- package/types/components-install-list.d.ts +0 -3328
- package/types/components.d.ts +0 -21
- package/types/delegate.d.ts +0 -41
- package/types/directives/index.d.ts +0 -4
- package/types/directives/install-loadmore.d.ts +0 -7
- package/types/directives/select-loadmore.d.ts +0 -7
- package/types/hooks/index.d.ts +0 -3
- package/types/hooks/useHuiDialog/useHuiDialog.d.ts +0 -18
- package/types/hooks/useHuiFormDialog/formDialogPropsDef.d.ts +0 -3
- package/types/hooks/useHuiFormDialog/type.d.ts +0 -90
- package/types/hooks/useHuiFormDialog/useHuiFormDialog.d.ts +0 -32
- package/types/install-helper/install.d.ts +0 -18
- package/types/install-helper/typescript.d.ts +0 -14
- package/types/utils/hui-rules.d.ts +0 -80
- package/types/utils/hui-tool/index.d.ts +0 -8
- package/types/utils/hui-tool/message-box/index.d.ts +0 -18
- package/types/utils/hui-tool/message-box/message-box.vue.d.ts +0 -36
- package/types/utils/hui-tool/msg-tool.d.ts +0 -26
- package/types/utils/index.d.ts +0 -2
package/config/resolver.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as h, mergeModels as d, ref as
|
|
2
|
-
import { testUtils as s } from "
|
|
3
|
-
import { addAMap as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as h, mergeModels as d, ref as M, useModel as w, onMounted as k, createElementBlock as v, openBlock as y, normalizeStyle as b, nextTick as g } from "vue";
|
|
2
|
+
import { testUtils as s } from "zjh-utils";
|
|
3
|
+
import { addAMap as x } from "../AMapConfig.js";
|
|
4
|
+
const A = /* @__PURE__ */ h({
|
|
5
5
|
name: "HuiAMapMassMarkers",
|
|
6
6
|
__name: "HuiAMapMassMarkers",
|
|
7
7
|
props: /* @__PURE__ */ d({
|
|
@@ -12,8 +12,8 @@ const x = /* @__PURE__ */ h({
|
|
|
12
12
|
direction: { default: "top" },
|
|
13
13
|
textStyle: { default: () => ({
|
|
14
14
|
fontSize: 12,
|
|
15
|
-
fillColor: window.theme.colors.white,
|
|
16
|
-
backgroundColor: window.theme.colors.ccc,
|
|
15
|
+
// fillColor: window.theme.colors.white,
|
|
16
|
+
// backgroundColor: window.theme.colors.ccc,
|
|
17
17
|
borderRadius: 2
|
|
18
18
|
}) },
|
|
19
19
|
iconPath: { default: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png" },
|
|
@@ -24,20 +24,20 @@ const x = /* @__PURE__ */ h({
|
|
|
24
24
|
modelModifiers: {}
|
|
25
25
|
}),
|
|
26
26
|
emits: /* @__PURE__ */ d(["pointClick"], ["update:modelValue"]),
|
|
27
|
-
setup(i, { expose: c, emit:
|
|
28
|
-
const
|
|
29
|
-
function l(
|
|
30
|
-
|
|
27
|
+
setup(i, { expose: c, emit: u }) {
|
|
28
|
+
const m = u, a = i, n = M(null), o = w(i, "modelValue");
|
|
29
|
+
function l(t, e) {
|
|
30
|
+
m("pointClick", e);
|
|
31
31
|
}
|
|
32
32
|
function p() {
|
|
33
33
|
g(() => {
|
|
34
34
|
n.value = new window.AMap.Map("mapContainer", {
|
|
35
35
|
zoom: 10,
|
|
36
36
|
viewMode: "3D",
|
|
37
|
-
center:
|
|
37
|
+
center: o.value.length ? o.value[0].position : a.mapCenter,
|
|
38
38
|
showLabel: a.showLabel
|
|
39
39
|
});
|
|
40
|
-
const
|
|
40
|
+
const t = new window.AMap.LabelsLayer({
|
|
41
41
|
zooms: [3, 20],
|
|
42
42
|
// 缩放范围
|
|
43
43
|
zIndex: 1e3,
|
|
@@ -45,11 +45,11 @@ const x = /* @__PURE__ */ h({
|
|
|
45
45
|
collision: !1
|
|
46
46
|
// 该层内标注是否避让
|
|
47
47
|
});
|
|
48
|
-
n.value.add(
|
|
48
|
+
n.value.add(t), s.isArray(o.value) && s.isNotEmpty(o.value) && o.value.forEach((e) => {
|
|
49
49
|
const r = new window.AMap.LabelMarker({
|
|
50
|
-
position:
|
|
50
|
+
position: e.position,
|
|
51
51
|
text: {
|
|
52
|
-
content:
|
|
52
|
+
content: e.name,
|
|
53
53
|
direction: a.direction,
|
|
54
54
|
style: {
|
|
55
55
|
...a.textStyle
|
|
@@ -57,26 +57,26 @@ const x = /* @__PURE__ */ h({
|
|
|
57
57
|
},
|
|
58
58
|
icon: {
|
|
59
59
|
type: "iamge",
|
|
60
|
-
image:
|
|
60
|
+
image: e.iconPath || a.iconPath,
|
|
61
61
|
size: a.iconSize
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
|
|
64
|
+
t.add(r), r.on("click", (f) => l(f, e));
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
return k(async () => {
|
|
69
69
|
try {
|
|
70
|
-
await
|
|
71
|
-
} catch (
|
|
72
|
-
console.error("Error loading map:",
|
|
70
|
+
await x(), p();
|
|
71
|
+
} catch (t) {
|
|
72
|
+
console.error("Error loading map:", t);
|
|
73
73
|
}
|
|
74
|
-
}), c({ handleLabelMarkerClick: l }), (
|
|
74
|
+
}), c({ handleLabelMarkerClick: l }), (t, e) => (y(), v("div", {
|
|
75
75
|
id: "mapContainer",
|
|
76
|
-
style: b({ height:
|
|
76
|
+
style: b({ height: i.height, width: i.width })
|
|
77
77
|
}, null, 4));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
A as default
|
|
82
82
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HuiAMapSearchAddress.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c7f1eb0d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as J, mergeModels as Q, ref as s, useModel as W, onMounted as X, nextTick as
|
|
1
|
+
import { defineComponent as J, mergeModels as Q, ref as s, useModel as W, onMounted as X, nextTick as N, watch as b, reactive as Y, computed as $, createElementBlock as P, openBlock as h, createElementVNode as i, createVNode as ee, unref as g, withDirectives as ae, createBlock as H, withCtx as z, Fragment as te, renderList as le, toDisplayString as D, normalizeStyle as oe } from "vue";
|
|
2
2
|
import { addAMap as ne } from "../AMapConfig.js";
|
|
3
|
-
import { testUtils as d } from "
|
|
3
|
+
import { testUtils as d } from "zjh-utils";
|
|
4
4
|
import { HuiTool as se } from "../../utils/hui-tool/index.js";
|
|
5
5
|
import { selectLoadmore as ie } from "../../directives/select-loadmore.js";
|
|
6
6
|
import { ElCascader as re, ElSelect as de, ElOption as ue } from "element-plus";
|
|
7
|
-
const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { class: "flex h-32 lh-32 mb-20" }, ve = { class: "flex justify-between text-14" }, fe = { class: "c-regular" }, he = { class: "c-disabled" }, ge = ["id"],
|
|
7
|
+
const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { class: "flex h-32 lh-32 mb-20" }, ve = { class: "flex justify-between text-14" }, fe = { class: "c-regular" }, he = { class: "c-disabled" }, ge = ["id"], ke = /* @__PURE__ */ J({
|
|
8
8
|
name: "HuiAMapSearchAddress",
|
|
9
9
|
__name: "HuiAMapSearchAddress",
|
|
10
10
|
props: /* @__PURE__ */ Q({
|
|
@@ -20,8 +20,8 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
20
20
|
modelModifiers: {}
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
|
-
setup(
|
|
24
|
-
const C =
|
|
23
|
+
setup(w, { expose: K }) {
|
|
24
|
+
const C = w, O = s(""), u = s(null), c = s(null), t = W(w, "modelValue"), m = s(""), r = s([]), E = s([]), p = s([]), M = s(""), S = s(F(2));
|
|
25
25
|
X(async () => {
|
|
26
26
|
E.value = await window.huiDelegate.getRegionTree(), V();
|
|
27
27
|
});
|
|
@@ -31,14 +31,14 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function L() {
|
|
34
|
-
|
|
34
|
+
N(() => {
|
|
35
35
|
R(() => {
|
|
36
36
|
var l, e, a, o;
|
|
37
37
|
if (d.isNotEmpty(t.value)) {
|
|
38
|
-
const { provinceName: n, cityName:
|
|
39
|
-
r.value = [{ ...t.value, pname: n, cityname:
|
|
38
|
+
const { provinceName: n, cityName: x, districtName: f, street: k, streetShort: q } = t.value;
|
|
39
|
+
r.value = [{ ...t.value, pname: n, cityname: x, adname: f, address: q, name: k }], m.value = t.value.id, p.value = t.value.regionCode;
|
|
40
40
|
}
|
|
41
|
-
(l = t.value) != null && l.longitude && ((e = t.value) != null && e.latitude) && (
|
|
41
|
+
(l = t.value) != null && l.longitude && ((e = t.value) != null && e.latitude) && (A(t.value.longitude, t.value.latitude), _(t.value.longitude, t.value.latitude)), (a = t.value) != null && a.lon && ((o = t.value) != null && o.lat) && (A(t.value.lon, t.value.lat), _(t.value.lon, t.value.lat));
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -54,31 +54,31 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
54
54
|
})()
|
|
55
55
|
}), c.value.setMapStyle('amap://styles/f695f9484e6fb466b6680b7806a5eae6")'), l();
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
d.isArray(l) ?
|
|
59
|
-
}),
|
|
57
|
+
b(p, (l) => {
|
|
58
|
+
d.isArray(l) ? M.value = l[l.length - 1] : M.value = l;
|
|
59
|
+
}), b(t, (l) => {
|
|
60
60
|
O.value = l.formattedAddress;
|
|
61
61
|
}, { deep: !0 });
|
|
62
|
-
const
|
|
63
|
-
city: $(() =>
|
|
62
|
+
const y = Y({
|
|
63
|
+
city: $(() => M.value),
|
|
64
64
|
citylimit: !1,
|
|
65
65
|
pageSize: 20,
|
|
66
66
|
pageIndex: 1,
|
|
67
67
|
extensions: "all"
|
|
68
68
|
}), I = s(0), v = s("");
|
|
69
|
-
|
|
70
|
-
r.value = [],
|
|
69
|
+
b(v, () => {
|
|
70
|
+
r.value = [], y.pageIndex = 1;
|
|
71
71
|
});
|
|
72
72
|
function U(l) {
|
|
73
73
|
const e = r.value.find((n) => n.id == l) || {};
|
|
74
74
|
t.value = e, p.value = e.adcode;
|
|
75
75
|
const a = e.location.KT || e.location.lat, o = e.location.KL || e.location.lng;
|
|
76
|
-
B(),
|
|
76
|
+
B(), A(o, a), _(o, a), c.value.setCenter([o, a]), c.value.setZoom(18);
|
|
77
77
|
}
|
|
78
78
|
function T(l) {
|
|
79
79
|
d.isEmpty(l) || (v.value = l, window.AMap.plugin("AMap.PlaceSearch", async function() {
|
|
80
|
-
await
|
|
81
|
-
var e = new window.AMap.PlaceSearch(
|
|
80
|
+
await N();
|
|
81
|
+
var e = new window.AMap.PlaceSearch(y);
|
|
82
82
|
e.search(v.value, function(a, o) {
|
|
83
83
|
d.isEmpty(o) || d.isEmpty(o.poiList.pois) || (o.poiList.pois.forEach((n) => {
|
|
84
84
|
n.provinceName = n.pname, n.cityName = n.cityname, n.districtName = n.adname, n.street = n.address, n.streetShort = n.name, n.addressName = n.name;
|
|
@@ -87,9 +87,9 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
89
|
function j() {
|
|
90
|
-
r.value.length >= I.value || (
|
|
90
|
+
r.value.length >= I.value || (y.pageIndex++, T(v.value));
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function A(l, e) {
|
|
93
93
|
B(), u.value = new window.AMap.Marker({
|
|
94
94
|
position: [l, e],
|
|
95
95
|
map: c.value
|
|
@@ -104,13 +104,13 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
104
104
|
const o = document.createElement("span");
|
|
105
105
|
o.className = "AMap__marker top-0 abs", o.innerHTML = l, e.appendChild(o), u.value.setContent(e);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function _(l, e) {
|
|
108
108
|
window.AMap.plugin("AMap.Geocoder", function() {
|
|
109
109
|
new window.AMap.Geocoder().getAddress([l, e], (o, n) => {
|
|
110
|
-
o === "complete" && n.info === "OK" ?
|
|
110
|
+
o === "complete" && n.info === "OK" ? N(() => {
|
|
111
111
|
var f;
|
|
112
|
-
const
|
|
113
|
-
G(
|
|
112
|
+
const x = ((f = r.value.find((k) => k.id == m.value)) == null ? void 0 : f.name) || "";
|
|
113
|
+
G(x);
|
|
114
114
|
}) : console.error("获取地址失败", n);
|
|
115
115
|
});
|
|
116
116
|
});
|
|
@@ -174,7 +174,7 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
174
174
|
]),
|
|
175
175
|
i("div", {
|
|
176
176
|
class: "AMap__content-box",
|
|
177
|
-
style: oe({ height:
|
|
177
|
+
style: oe({ height: w.height })
|
|
178
178
|
}, [
|
|
179
179
|
i("div", {
|
|
180
180
|
id: S.value,
|
|
@@ -186,5 +186,5 @@ const ce = { class: "AMap" }, pe = { class: "flex h-32 lh-32 mb-20" }, me = { cl
|
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
export {
|
|
189
|
-
|
|
189
|
+
ke as default
|
|
190
190
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as p, createBlock as S, openBlock as k, unref as o, isRef as H, withCtx as l, createVNode as d, mergeProps as M, createTextVNode as m, toValue as x } from "vue";
|
|
2
2
|
import { useHuiDialog as B } from "../../hooks/useHuiDialog/useHuiDialog.js";
|
|
3
|
-
import { ElDialog as D, ElButton as
|
|
4
|
-
import "
|
|
5
|
-
/* empty css
|
|
6
|
-
import
|
|
7
|
-
const L = /* @__PURE__ */
|
|
3
|
+
import { ElDialog as D, ElButton as f } from "element-plus";
|
|
4
|
+
import "zjh-utils";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import R from "../HuiAMapSearchAddress/HuiAMapSearchAddress.vue.js";
|
|
7
|
+
const L = /* @__PURE__ */ C({
|
|
8
8
|
name: "HuiAMapSearchAddressDialog",
|
|
9
9
|
__name: "HuiAMapSearchAddressDialog",
|
|
10
10
|
props: {
|
|
@@ -18,57 +18,57 @@ const L = /* @__PURE__ */ V({
|
|
|
18
18
|
title: { default: "地图位置选择" }
|
|
19
19
|
},
|
|
20
20
|
emits: ["onSubmit"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
async function
|
|
24
|
-
|
|
21
|
+
setup(r, { expose: c, emit: y }) {
|
|
22
|
+
const h = y, a = p(null), { show: n, open: v, close: i, payload: w, confirmLoading: A } = B(), t = p(null);
|
|
23
|
+
async function b() {
|
|
24
|
+
a.value.loadMap(), t.value = x(w) || "";
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function g() {
|
|
27
27
|
t.value = "";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function V() {
|
|
30
|
+
a.value.submitInfo() && (h("onSubmit", t.value), i());
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
open:
|
|
34
|
-
close:
|
|
35
|
-
}), (
|
|
36
|
-
modelValue: o(
|
|
37
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
38
|
-
title:
|
|
39
|
-
width:
|
|
32
|
+
return c({
|
|
33
|
+
open: v,
|
|
34
|
+
close: i
|
|
35
|
+
}), (s, e) => (k(), S(o(D), {
|
|
36
|
+
modelValue: o(n),
|
|
37
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => H(n) ? n.value = u : null),
|
|
38
|
+
title: r.title,
|
|
39
|
+
width: r.width,
|
|
40
40
|
top: "5vh",
|
|
41
41
|
"modal-append-to-body": !1,
|
|
42
42
|
"append-to-body": "",
|
|
43
43
|
"destroy-on-close": "",
|
|
44
|
-
onOpen:
|
|
45
|
-
onClose:
|
|
44
|
+
onOpen: b,
|
|
45
|
+
onClose: g
|
|
46
46
|
}, {
|
|
47
|
-
footer:
|
|
48
|
-
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
-
])),
|
|
47
|
+
footer: l(() => [
|
|
48
|
+
d(o(f), { onClick: o(i) }, {
|
|
49
|
+
default: l(() => [...e[2] || (e[2] = [
|
|
50
|
+
m("取 消", -1)
|
|
51
|
+
])]),
|
|
52
52
|
_: 1
|
|
53
53
|
}, 8, ["onClick"]),
|
|
54
|
-
|
|
54
|
+
d(o(f), {
|
|
55
55
|
type: "primary",
|
|
56
56
|
class: "w-100",
|
|
57
|
-
loading: o(
|
|
58
|
-
onClick:
|
|
57
|
+
loading: o(A),
|
|
58
|
+
onClick: V
|
|
59
59
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
])),
|
|
60
|
+
default: l(() => [...e[3] || (e[3] = [
|
|
61
|
+
m("确定", -1)
|
|
62
|
+
])]),
|
|
63
63
|
_: 1
|
|
64
64
|
}, 8, ["loading"])
|
|
65
65
|
]),
|
|
66
|
-
default:
|
|
67
|
-
|
|
66
|
+
default: l(() => [
|
|
67
|
+
d(R, M(s.$props, {
|
|
68
68
|
ref_key: "HuiAMapSelectAddressRef",
|
|
69
|
-
ref:
|
|
69
|
+
ref: a,
|
|
70
70
|
modelValue: t.value,
|
|
71
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
71
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value = u),
|
|
72
72
|
class: "m-y-20",
|
|
73
73
|
"show-input": !0,
|
|
74
74
|
width: "100%"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HuiAMapSelectAddress.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b22c1e3b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, mergeModels as z, ref as s, useModel as L, watch as O, onMounted as U, createElementBlock as y, openBlock as f, normalizeStyle as v, createBlock as j, createCommentVNode as I, createElementVNode as h, unref as R, normalizeClass as D, nextTick as g } from "vue";
|
|
2
2
|
import { addAMap as G } from "../AMapConfig.js";
|
|
3
|
-
import { testUtils as
|
|
3
|
+
import { testUtils as _ } from "zjh-utils";
|
|
4
4
|
import { HuiTool as q } from "../../utils/hui-tool/index.js";
|
|
5
5
|
import { ElInput as F } from "element-plus";
|
|
6
|
-
const J = ["id"], $ = /* @__PURE__ */
|
|
6
|
+
const J = ["id"], $ = /* @__PURE__ */ K({
|
|
7
7
|
name: "HuiAMapSelectAddress",
|
|
8
8
|
__name: "HuiAMapSelectAddress",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ z({
|
|
10
10
|
disabled: { type: Boolean, default: !1 },
|
|
11
11
|
value: {},
|
|
12
12
|
width: { default: "40vw" },
|
|
@@ -19,16 +19,16 @@ const J = ["id"], $ = /* @__PURE__ */ z({
|
|
|
19
19
|
modelModifiers: {}
|
|
20
20
|
}),
|
|
21
21
|
emits: ["update:modelValue"],
|
|
22
|
-
setup(
|
|
23
|
-
const r =
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
setup(l, { expose: b }) {
|
|
23
|
+
const r = l, d = s(""), i = s(null), u = s(null), a = L(l, "modelValue");
|
|
24
|
+
O(a, (t) => {
|
|
25
|
+
d.value = t.formattedAddress;
|
|
26
26
|
}, { deep: !0 });
|
|
27
27
|
function w() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
(
|
|
28
|
+
g(() => {
|
|
29
|
+
T(() => {
|
|
30
|
+
var t, e, n;
|
|
31
|
+
(t = a.value) != null && t.longitude && ((e = a.value) != null && e.latitude) && (m(a.value.longitude, a.value.latitude), p(a.value.longitude, a.value.latitude)), (n = a.value) != null && n.location && (m(a.value.location.lng, a.value.location.lat), p(a.value.location.lng, a.value.location.lat));
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -37,88 +37,88 @@ const J = ["id"], $ = /* @__PURE__ */ z({
|
|
|
37
37
|
}
|
|
38
38
|
function C() {
|
|
39
39
|
if (!r.showInput) return;
|
|
40
|
-
const
|
|
40
|
+
const t = document.getElementById("map__result");
|
|
41
41
|
setTimeout(() => {
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const e = document.querySelector(".amap_lib_placeSearch");
|
|
43
|
+
t.innerHTML = e ? "" : '<h3 class="w-full text-center text-12">暂无搜索结果</h3>';
|
|
44
44
|
}, 200);
|
|
45
45
|
}
|
|
46
46
|
function S() {
|
|
47
|
-
return
|
|
47
|
+
return _.isNotEmpty(a.value) ? !0 : (q.err("请选择地址"), !1);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
M(),
|
|
51
|
-
position: [
|
|
52
|
-
map:
|
|
53
|
-
}),
|
|
49
|
+
function m(t, e) {
|
|
50
|
+
M(), i.value = new window.AMap.Marker({
|
|
51
|
+
position: [t, e],
|
|
52
|
+
map: u.value
|
|
53
|
+
}), i.value.setMap(u.value);
|
|
54
54
|
}
|
|
55
55
|
function M() {
|
|
56
|
-
|
|
56
|
+
i.value && (i.value.setMap(null), i.value = null);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (n.className = r.iconClass, n.src = r.iconPath,
|
|
58
|
+
function x(t) {
|
|
59
|
+
const e = document.createElement("div"), n = document.createElement("img");
|
|
60
|
+
if (n.className = r.iconClass, n.src = r.iconPath, e.appendChild(n), !t) return;
|
|
61
61
|
const o = document.createElement("span");
|
|
62
|
-
o.className = "AMap__marker", o.innerHTML =
|
|
62
|
+
o.className = "AMap__marker", o.innerHTML = t, e.appendChild(o), i.value.setContent(e);
|
|
63
63
|
}
|
|
64
|
-
function p(
|
|
64
|
+
function p(t, e) {
|
|
65
65
|
window.AMap.plugin("AMap.Geocoder", function() {
|
|
66
|
-
new window.AMap.Geocoder().getAddress([
|
|
67
|
-
if (o === "complete" &&
|
|
68
|
-
const
|
|
69
|
-
a.value = Object.assign(
|
|
70
|
-
longitude:
|
|
71
|
-
latitude:
|
|
72
|
-
}),
|
|
73
|
-
|
|
66
|
+
new window.AMap.Geocoder().getAddress([t, e], (o, c) => {
|
|
67
|
+
if (o === "complete" && c.info === "OK") {
|
|
68
|
+
const H = c.regeocode;
|
|
69
|
+
a.value = Object.assign(H, {
|
|
70
|
+
longitude: t,
|
|
71
|
+
latitude: e
|
|
72
|
+
}), g(() => {
|
|
73
|
+
x(a.value.formattedAddress);
|
|
74
74
|
});
|
|
75
75
|
} else
|
|
76
|
-
console.error("获取地址失败",
|
|
76
|
+
console.error("获取地址失败", c);
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
80
|
+
function E() {
|
|
81
|
+
u.value.on("click", (t) => {
|
|
82
|
+
const e = t.lnglat, n = e.KT || e.lat, o = e.KL || e.lng;
|
|
83
|
+
m(o, n), p(o, n);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
zoom:
|
|
86
|
+
function T(t) {
|
|
87
|
+
u.value = new window.AMap.Map(A.value, {
|
|
88
|
+
zoom: _.isNotEmpty(a.value) ? 23 : 13,
|
|
89
89
|
center: (() => {
|
|
90
|
-
var
|
|
91
|
-
if ((
|
|
90
|
+
var e, n, o;
|
|
91
|
+
if ((e = a.value) != null && e.longitude && ((n = a.value) != null && n.latitude))
|
|
92
92
|
return [a.value.longitude, a.value.latitude];
|
|
93
93
|
if ((o = a.value) != null && o.location)
|
|
94
94
|
return [a.value.location.lng, a.value.location.lat];
|
|
95
95
|
})()
|
|
96
|
-
}),
|
|
97
|
-
|
|
98
|
-
}),
|
|
96
|
+
}), u.value.setMapStyle('amap://styles/f695f9484e6fb466b6680b7806a5eae6")'), setTimeout(() => {
|
|
97
|
+
V();
|
|
98
|
+
}), E(), t();
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
r.showInput && window.AMapUI.loadUI(["misc/PoiPicker"], (
|
|
102
|
-
window.poiPicker = new
|
|
100
|
+
function V() {
|
|
101
|
+
r.showInput && window.AMapUI.loadUI(["misc/PoiPicker"], (t) => {
|
|
102
|
+
window.poiPicker = new t({
|
|
103
103
|
input: "map__input",
|
|
104
104
|
placeSearchOptions: {
|
|
105
|
-
map:
|
|
105
|
+
map: u.value,
|
|
106
106
|
pageSize: 10
|
|
107
107
|
},
|
|
108
108
|
searchResultsContainer: "map__result"
|
|
109
|
-
}), window.poiPicker.on("poiPicked",
|
|
109
|
+
}), window.poiPicker.on("poiPicked", B);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function B(t) {
|
|
113
113
|
M();
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
var o,
|
|
114
|
+
const e = t.source, n = t.item;
|
|
115
|
+
g(() => {
|
|
116
|
+
var o, c;
|
|
117
117
|
a.value = Object.assign(n, {
|
|
118
118
|
formattedAddress: n.name,
|
|
119
119
|
longitude: (o = n.location) == null ? void 0 : o.KL,
|
|
120
|
-
latitude: (
|
|
121
|
-
}),
|
|
120
|
+
latitude: (c = n.location) == null ? void 0 : c.kT
|
|
121
|
+
}), e !== "search" && window.poiPicker.searchByKeyword(n.name);
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
function k() {
|
|
@@ -126,49 +126,49 @@ const J = ["id"], $ = /* @__PURE__ */ z({
|
|
|
126
126
|
w();
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
U(() => {
|
|
130
130
|
k();
|
|
131
131
|
});
|
|
132
|
-
function
|
|
133
|
-
const
|
|
132
|
+
function N(t) {
|
|
133
|
+
const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
134
134
|
let n = "";
|
|
135
|
-
for (let o = 0; o <
|
|
136
|
-
n +=
|
|
135
|
+
for (let o = 0; o < t; o++)
|
|
136
|
+
n += e.charAt(Math.floor(Math.random() * e.length));
|
|
137
137
|
return "map__container" + n;
|
|
138
138
|
}
|
|
139
|
-
const A = s(
|
|
140
|
-
return b({ loadMap: k, setupMap: w, poi: a, submitInfo: S }), (
|
|
139
|
+
const A = s(N(2));
|
|
140
|
+
return b({ loadMap: k, setupMap: w, poi: a, submitInfo: S }), (t, e) => (f(), y("div", {
|
|
141
141
|
class: "AMap",
|
|
142
|
-
style:
|
|
142
|
+
style: v({ width: l.width, height: l.height })
|
|
143
143
|
}, [
|
|
144
|
-
|
|
144
|
+
l.showInput ? (f(), j(R(F), {
|
|
145
145
|
key: 0,
|
|
146
146
|
id: "map__input",
|
|
147
|
-
modelValue:
|
|
148
|
-
"onUpdate:modelValue":
|
|
147
|
+
modelValue: d.value,
|
|
148
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => d.value = n),
|
|
149
149
|
class: "AMap__content-input",
|
|
150
150
|
readonly: r.disabled,
|
|
151
151
|
clearable: "",
|
|
152
152
|
placeholder: "输入关键字选取地点",
|
|
153
153
|
onInput: P
|
|
154
|
-
}, null, 8, ["modelValue", "readonly"])) :
|
|
155
|
-
|
|
156
|
-
class: D(["AMap__content-box",
|
|
154
|
+
}, null, 8, ["modelValue", "readonly"])) : I("", !0),
|
|
155
|
+
h("div", {
|
|
156
|
+
class: D(["AMap__content-box", l.showInput ? "" : "noEvents"])
|
|
157
157
|
}, [
|
|
158
|
-
|
|
158
|
+
h("div", {
|
|
159
159
|
id: A.value,
|
|
160
|
-
style:
|
|
160
|
+
style: v({ height: l.height }),
|
|
161
161
|
class: "AMap__content-container",
|
|
162
162
|
tabindex: "0"
|
|
163
163
|
}, null, 12, J),
|
|
164
|
-
|
|
164
|
+
l.showInput ? (f(), y("div", {
|
|
165
165
|
key: 0,
|
|
166
166
|
id: "map__result",
|
|
167
|
-
style:
|
|
167
|
+
style: v({ height: l.height }),
|
|
168
168
|
class: "AMap__content-result"
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
]), 4)) :
|
|
169
|
+
}, [...e[1] || (e[1] = [
|
|
170
|
+
h("h3", { class: "w-full text-center text-12" }, "暂无搜索结果", -1)
|
|
171
|
+
])], 4)) : I("", !0)
|
|
172
172
|
], 2)
|
|
173
173
|
], 4));
|
|
174
174
|
}
|