cnhis-design-vue 3.1.14-beta.11.2 → 3.1.14-beta.14
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/es/_virtual/plugin-vue_export-helper.js +9 -0
- package/es/packages/big-table/index.js +1 -2
- package/es/packages/big-table/src/BigTable.js +5 -3
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +8 -11
- package/es/packages/big-table/src/components/NoData.js +73 -3
- package/es/packages/big-table/src/components/edit-form/edit-separate.js +89 -3
- package/es/packages/big-table/src/components/input-button.js +34 -3
- package/es/packages/big-table/src/components/separate.js +29 -3
- package/es/packages/big-table/src/hooks/useEdit.js +2 -3
- package/es/packages/big-table/style/index.css +133 -0
- package/es/packages/bpmn-workflow/index.js +1 -2
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.js +253 -3
- package/es/packages/button-print/index.js +1 -2
- package/es/packages/button-print/src/ButtonPrint.js +5 -3
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +6 -7
- package/es/packages/button-print/src/components/IdentityVerification.js +129 -3
- package/es/packages/chunk-upload/index.js +1 -1
- package/es/packages/chunk-upload/src/chunk-upload-new.js +474 -3
- package/es/packages/chunk-upload/src/vod-chunk-upload/index.js +2 -3
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.js +328 -3
- package/es/packages/chunk-upload/src/vod-upload-modal.js +3 -4
- package/es/packages/drag-layout/index.js +1 -2
- package/es/packages/drag-layout/src/DragFormLeftItem.js +123 -3
- package/es/packages/drag-layout/src/DragFormRightItem.js +268 -3
- package/es/packages/drag-layout/src/DragLayout.js +658 -3
- package/es/packages/fabric-chart/index.js +1 -2
- package/es/packages/fabric-chart/src/FabricChart.js +315 -3
- package/es/packages/fabric-chart/src/components/PopupTip.js +33 -3
- package/es/packages/fabric-chart/src/hooks/useLeft.js +15 -4
- package/es/packages/field-set/index.js +1 -2
- package/es/packages/field-set/src/FieldSet.js +346 -3
- package/es/packages/form-render/index.d.ts +0 -1
- package/es/packages/form-render/index.js +2 -3
- package/es/packages/form-render/src/FormRender.js +188 -3
- package/es/packages/form-render/src/FormRender.vue.d.ts +0 -1
- package/es/packages/form-render/src/components/renderer/combination.js +2 -3
- package/es/packages/form-table/index.js +1 -2
- package/es/packages/form-table/src/FormTable.js +475 -3
- package/es/packages/form-table/src/components/index.js +28 -42
- package/es/packages/form-table/src/components/table-age.js +232 -3
- package/es/packages/form-table/src/components/table-date-picker.js +176 -3
- package/es/packages/form-table/src/components/table-digital.js +138 -3
- package/es/packages/form-table/src/components/table-input-password.js +138 -3
- package/es/packages/form-table/src/components/table-input.js +124 -3
- package/es/packages/form-table/src/components/table-month-picker.js +100 -3
- package/es/packages/form-table/src/components/table-search-more.js +5 -3
- package/es/packages/form-table/src/components/table-search-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/form-table/src/components/table-search.js +5 -3
- package/es/packages/form-table/src/components/table-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/form-table/src/components/table-select-multiple.js +161 -3
- package/es/packages/form-table/src/components/table-select.js +156 -3
- package/es/packages/form-table/src/components/table-textarea.js +154 -3
- package/es/packages/form-table/src/components/table-time-picker.js +146 -3
- package/es/packages/form-table/src/components/table-tree-select.js +282 -3
- package/es/packages/form-table/src/components/text-over-tooltip.js +63 -3
- package/es/packages/index.css +133 -0
- package/es/packages/info-header/index.js +1 -2
- package/es/packages/info-header/src/HiddenContent.js +65 -3
- package/es/packages/info-header/src/InfoEllipsis.js +42 -3
- package/es/packages/info-header/src/InfoHeader.js +229 -3
- package/es/packages/map/index.js +1 -2
- package/es/packages/map/src/Map.js +337 -3
- package/es/packages/scale-view/index.js +1 -2
- package/es/packages/scale-view/src/ScaleView.js +418 -3
- package/es/packages/scale-view/src/components/AnswerParse.js +79 -3
- package/es/packages/scale-view/src/components/EvaluateCountdown.js +108 -3
- package/es/packages/scale-view/src/components/EvaluatePage.js +140 -3
- package/es/packages/scale-view/src/components/LoadingCom.js +17 -5
- package/es/packages/scale-view/src/components/NoData.js +73 -3
- package/es/packages/scale-view/src/components/formitem/r-cascader.js +3 -3
- package/es/packages/scale-view/src/components/formitem/r-select.js +3 -3
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.js +78 -3
- package/es/packages/select-label/index.js +3 -5
- package/es/packages/select-label/src/LabelFormContent.js +441 -3
- package/es/packages/select-label/src/SelectLabel.js +5 -3
- package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.js +5 -21
- package/es/packages/select-label/src/components/label-classify.js +128 -3
- package/es/packages/select-person/index.js +1 -2
- package/es/packages/select-person/src/SearchTree.js +5 -3
- package/es/packages/select-person/src/SearchTree.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/select-person/src/SelectPerson.js +5 -3
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +4 -5
- package/es/packages/shortcut-provider/index.js +1 -2
- package/es/packages/shortcut-provider/src/ShortcutProvider.js +33 -3
- package/es/packages/shortcut-setter/index.js +1 -2
- package/es/packages/shortcut-setter/src/ShortcutSetter.js +38 -3
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +126 -3
- package/es/packages/steps-wheel/index.js +1 -2
- package/es/packages/steps-wheel/src/StepsWheel.js +264 -3
- package/es/packages/time-line/index.js +1 -2
- package/es/packages/time-line/src/TimeLine.js +69 -3
- package/es/src/components/SelectPage/SelectPage.js +62 -3
- package/es/src/components/SelectPage/index.js +2 -3
- package/es/src/components/SvgIcon/SvgIcon.js +35 -3
- package/es/src/components/SvgIcon/index.js +2 -3
- package/es/src/components/TextOverTooltip/TextOverTooltip.js +75 -3
- package/es/src/components/TextOverTooltip/index.js +2 -3
- package/es/src/components/player-vod/index.js +13 -3
- package/global.d.ts +8 -8
- package/package.json +153 -153
- package/es/packages/big-table/src/components/NoData.vue_vue_type_script_setup_true_lang.js +0 -72
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue_vue_type_script_setup_true_lang.js +0 -89
- package/es/packages/big-table/src/components/input-button.vue_vue_type_script_setup_true_lang.js +0 -33
- package/es/packages/big-table/src/components/separate.vue_vue_type_script_setup_true_lang.js +0 -28
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.vue_vue_type_script_setup_true_lang.js +0 -252
- package/es/packages/button-print/src/components/IdentityVerification.vue_vue_type_script_setup_true_lang.js +0 -128
- package/es/packages/chunk-upload/src/chunk-upload-new.vue_vue_type_script_setup_true_lang.js +0 -473
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue_vue_type_script_setup_true_lang.js +0 -327
- package/es/packages/drag-layout/src/DragFormLeftItem.vue_vue_type_script_setup_true_lang.js +0 -122
- package/es/packages/drag-layout/src/DragFormRightItem.vue_vue_type_script_setup_true_lang.js +0 -267
- package/es/packages/drag-layout/src/DragLayout.vue_vue_type_script_setup_true_lang.js +0 -659
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +0 -316
- package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js +0 -32
- package/es/packages/field-set/src/FieldSet.vue_vue_type_script_setup_true_lang.js +0 -345
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.js +0 -187
- package/es/packages/form-table/src/FormTable.vue_vue_type_script_setup_true_lang.js +0 -474
- package/es/packages/form-table/src/components/table-age.vue_vue_type_script_setup_true_lang.js +0 -232
- package/es/packages/form-table/src/components/table-date-picker.vue_vue_type_script_setup_true_lang.js +0 -175
- package/es/packages/form-table/src/components/table-digital.vue_vue_type_script_setup_true_lang.js +0 -138
- package/es/packages/form-table/src/components/table-input-password.vue_vue_type_script_setup_true_lang.js +0 -138
- package/es/packages/form-table/src/components/table-input.vue_vue_type_script_setup_true_lang.js +0 -124
- package/es/packages/form-table/src/components/table-month-picker.vue_vue_type_script_setup_true_lang.js +0 -99
- package/es/packages/form-table/src/components/table-select-multiple.vue_vue_type_script_setup_true_lang.js +0 -160
- package/es/packages/form-table/src/components/table-select.vue_vue_type_script_setup_true_lang.js +0 -155
- package/es/packages/form-table/src/components/table-textarea.vue_vue_type_script_setup_true_lang.js +0 -153
- package/es/packages/form-table/src/components/table-time-picker.vue_vue_type_script_setup_true_lang.js +0 -145
- package/es/packages/form-table/src/components/table-tree-select.vue_vue_type_script_setup_true_lang.js +0 -281
- package/es/packages/form-table/src/components/text-over-tooltip.vue_vue_type_script_setup_true_lang.js +0 -62
- package/es/packages/info-header/src/HiddenContent.vue_vue_type_script_setup_true_lang.js +0 -65
- package/es/packages/info-header/src/InfoEllipsis.vue_vue_type_script_setup_true_lang.js +0 -41
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.js +0 -230
- package/es/packages/map/src/Map.vue_vue_type_script_setup_true_lang.js +0 -336
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.js +0 -422
- package/es/packages/scale-view/src/components/AnswerParse.vue_vue_type_script_setup_true_lang.js +0 -78
- package/es/packages/scale-view/src/components/EvaluateCountdown.vue_vue_type_script_setup_true_lang.js +0 -107
- package/es/packages/scale-view/src/components/EvaluatePage.vue_vue_type_script_setup_true_lang.js +0 -139
- package/es/packages/scale-view/src/components/LoadingCom.vue_vue_type_template_id_413329b0_lang.js +0 -16
- package/es/packages/scale-view/src/components/NoData.vue_vue_type_script_setup_true_lang.js +0 -72
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.js +0 -77
- package/es/packages/select-label/src/LabelFormContent.vue_vue_type_script_setup_true_lang.js +0 -441
- package/es/packages/select-label/src/components/label-classify.vue_vue_type_script_setup_true_lang.js +0 -127
- package/es/packages/shortcut-provider/src/ShortcutProvider.vue_vue_type_script_setup_true_lang.js +0 -32
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue_vue_type_script_setup_true_lang.js +0 -38
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue_vue_type_script_setup_true_lang.js +0 -125
- package/es/packages/steps-wheel/src/StepsWheel.vue_vue_type_script_setup_true_lang.js +0 -263
- package/es/packages/time-line/src/TimeLine.vue_vue_type_script_setup_true_lang.js +0 -68
- package/es/src/components/SelectPage/SelectPage.vue_vue_type_script_setup_true_lang.js +0 -61
- package/es/src/components/SvgIcon/SvgIcon.vue_vue_type_script_setup_true_lang.js +0 -34
- package/es/src/components/TextOverTooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.js +0 -74
- package/es/src/components/player-vod/index.vue_vue_type_script_setup_true_lang.js +0 -12
|
@@ -1,4 +1,338 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { defineComponent, reactive, computed, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from 'vue';
|
|
2
|
+
import { useMessage, NInput, NButton } from 'naive-ui';
|
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const _hoisted_1 = { class: "c-map" };
|
|
6
|
+
const _hoisted_2 = { class: "search-container" };
|
|
7
|
+
const _hoisted_3 = { class: "map-input-search" };
|
|
8
|
+
const _hoisted_4 = { class: "input-addon" };
|
|
9
|
+
const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u68C0\u7D22");
|
|
10
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { id: "map-core" }, null, -1);
|
|
11
|
+
const _hoisted_7 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "address-list"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_8 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
16
|
+
const _hoisted_9 = ["onClick"];
|
|
17
|
+
const _hoisted_10 = { class: "title" };
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "Map",
|
|
20
|
+
props: {
|
|
21
|
+
locationProp: { type: String, default: "" },
|
|
22
|
+
ak: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emits: ["selectLocation"],
|
|
28
|
+
setup(__props, { emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const state = reactive({
|
|
31
|
+
qq: null,
|
|
32
|
+
searchKey: "",
|
|
33
|
+
centrePoint: {},
|
|
34
|
+
location: { lng: "", lat: "" },
|
|
35
|
+
localObj: {},
|
|
36
|
+
map: null,
|
|
37
|
+
ac: null,
|
|
38
|
+
addressList: [],
|
|
39
|
+
markers: [],
|
|
40
|
+
timeout: null,
|
|
41
|
+
searchService: null,
|
|
42
|
+
geocoder: {}
|
|
43
|
+
});
|
|
44
|
+
const defAdress = computed(() => {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
return (_b = (_a = state.addressList) == null ? void 0 : _a[0]) == null ? void 0 : _b.name;
|
|
47
|
+
});
|
|
48
|
+
const calculateLocationProp = computed(() => {
|
|
49
|
+
return props.locationProp && JSON.parse(props.locationProp) || null;
|
|
50
|
+
});
|
|
51
|
+
const message = useMessage();
|
|
52
|
+
const showPosition = (r) => {
|
|
53
|
+
if (r && r.module == "geolocation") {
|
|
54
|
+
state.location.lng = r.lng;
|
|
55
|
+
state.location.lat = r.lat;
|
|
56
|
+
let qq = state.qq;
|
|
57
|
+
const new_opint = new qq.maps.LatLng(r.lat, r.lng);
|
|
58
|
+
handleGeocoder({ latLng: new_opint });
|
|
59
|
+
hdnelSetMapcenter({ lat: r.lat, lng: r.lng });
|
|
60
|
+
} else {
|
|
61
|
+
console.log("\u7528\u6237\u4E0D\u5141\u8BB8\u83B7\u53D6\u5730\u7406\u4F4D\u7F6E");
|
|
62
|
+
state.location.lng = 113.275;
|
|
63
|
+
state.location.lat = 23.117;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const getLocation = () => {
|
|
67
|
+
const qq = state.qq;
|
|
68
|
+
const geolocation = new qq.maps.Geolocation(props.ak, "qqmap");
|
|
69
|
+
const options = { timeout: 9e3 };
|
|
70
|
+
const showErr = function(err) {
|
|
71
|
+
console.log(err);
|
|
72
|
+
};
|
|
73
|
+
geolocation.getLocation(showPosition, showErr, options);
|
|
74
|
+
};
|
|
75
|
+
const hdnelSetMapcenter = (location) => {
|
|
76
|
+
const qq = state.qq;
|
|
77
|
+
var new_opint = new qq.maps.LatLng(location.lat, location.lng);
|
|
78
|
+
state.centrePoint = new_opint;
|
|
79
|
+
state.map.panTo(new_opint);
|
|
80
|
+
const mk = new qq.maps.Marker({
|
|
81
|
+
position: new_opint,
|
|
82
|
+
map: state.map
|
|
83
|
+
});
|
|
84
|
+
state.markers.push(mk);
|
|
85
|
+
};
|
|
86
|
+
const initSearch = () => {
|
|
87
|
+
const qq = state.qq;
|
|
88
|
+
state.searchService = new qq.maps.SearchService({
|
|
89
|
+
complete: function(results) {
|
|
90
|
+
var pois = results.detail.pois || [];
|
|
91
|
+
var latlngBounds = new qq.maps.LatLngBounds();
|
|
92
|
+
if (results.type === "CITY_LIST") {
|
|
93
|
+
state.searchService.setLocation(results.detail.cities[0].cityName);
|
|
94
|
+
state.searchService.search(state.searchKey);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
state.addressList = pois || [];
|
|
98
|
+
handleClearOverLays();
|
|
99
|
+
if (results.type === "POI_LIST") {
|
|
100
|
+
for (var i = 0, l = pois.length; i < l; i++) {
|
|
101
|
+
var poi = pois[i];
|
|
102
|
+
latlngBounds.extend(poi.latLng);
|
|
103
|
+
(function(n) {
|
|
104
|
+
var marker = new qq.maps.Marker({
|
|
105
|
+
map: state.map
|
|
106
|
+
});
|
|
107
|
+
marker.setPosition(pois[n].latLng);
|
|
108
|
+
marker.setTitle(i + 1);
|
|
109
|
+
state.markers.push(marker);
|
|
110
|
+
})(i);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
state.map.fitBounds(latlngBounds);
|
|
114
|
+
},
|
|
115
|
+
error: function(e) {
|
|
116
|
+
console.log(e);
|
|
117
|
+
if (e === "NO_RESULTS") {
|
|
118
|
+
message.warning("\u67E5\u65E0\u7ED3\u679C\uFF01");
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
message.warning("\u5730\u5740\u68C0\u7D22\u5148\u8F93\u5165\u57CE\u5E02\u540D\u79F0");
|
|
122
|
+
},
|
|
123
|
+
autoExtend: true
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const clearOverlays = (overlays) => {
|
|
127
|
+
var overlay;
|
|
128
|
+
while (overlay = overlays.pop()) {
|
|
129
|
+
overlay.setMap(null);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const handleClearOverLays = () => {
|
|
133
|
+
if (state.markers && state.markers.length) {
|
|
134
|
+
clearOverlays(state.markers);
|
|
135
|
+
}
|
|
136
|
+
state.markers = [];
|
|
137
|
+
};
|
|
138
|
+
const handleGeocoder = (config = {}) => {
|
|
139
|
+
const qq = state.qq;
|
|
140
|
+
const latLng = config.latLng;
|
|
141
|
+
const geocoder = new qq.maps.Geocoder();
|
|
142
|
+
geocoder.setComplete((result) => {
|
|
143
|
+
if (result.type === "GEO_INFO") {
|
|
144
|
+
var latlngBounds = new qq.maps.LatLngBounds();
|
|
145
|
+
var nearPois = result.detail.nearPois || [];
|
|
146
|
+
handleClearOverLays();
|
|
147
|
+
state.addressList = nearPois || [];
|
|
148
|
+
for (let index = 0; index < nearPois.length; index++) {
|
|
149
|
+
const pois = nearPois[index];
|
|
150
|
+
var marker = new qq.maps.Marker({
|
|
151
|
+
map: state.map
|
|
152
|
+
});
|
|
153
|
+
marker.setPosition(pois.latLng);
|
|
154
|
+
marker.setTitle(index + 1);
|
|
155
|
+
state.markers.push(marker);
|
|
156
|
+
latlngBounds.extend(pois.latLng);
|
|
157
|
+
}
|
|
158
|
+
state.map.fitBounds(latlngBounds);
|
|
159
|
+
}
|
|
160
|
+
var location = result.detail.location || {};
|
|
161
|
+
hdnelSetMapcenter(location);
|
|
162
|
+
});
|
|
163
|
+
geocoder.setError(function() {
|
|
164
|
+
alert("\u51FA\u9519\u4E86\uFF0C\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7ECF\u7EAC\u5EA6\uFF01\uFF01\uFF01");
|
|
165
|
+
});
|
|
166
|
+
geocoder.getAddress(latLng);
|
|
167
|
+
};
|
|
168
|
+
const init = () => {
|
|
169
|
+
const qq = state.qq;
|
|
170
|
+
qq.maps.event.addDomListener(state.map, "click", function(event) {
|
|
171
|
+
handleGeocoder({ latLng: event.latLng });
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
const searchKeyword = () => {
|
|
175
|
+
let value = state.searchKey;
|
|
176
|
+
if (!value)
|
|
177
|
+
return;
|
|
178
|
+
if (state.markers && state.markers.length) {
|
|
179
|
+
clearOverlays(state.markers);
|
|
180
|
+
}
|
|
181
|
+
state.searchService.setLocation("");
|
|
182
|
+
state.searchService.setPageCapacity(50);
|
|
183
|
+
state.searchService.search(value);
|
|
184
|
+
};
|
|
185
|
+
const selectLocation = (item, tag) => {
|
|
186
|
+
const qq = state.qq;
|
|
187
|
+
const { name, address, latLng } = item;
|
|
188
|
+
const { lat, lng } = latLng;
|
|
189
|
+
const geocoder = new qq.maps.Geocoder();
|
|
190
|
+
geocoder.setComplete(function(result) {
|
|
191
|
+
if (result.type === "GEO_INFO") {
|
|
192
|
+
const {
|
|
193
|
+
addressComponents: { province, city, district, country }
|
|
194
|
+
} = result.detail;
|
|
195
|
+
const emitData = JSON.stringify({
|
|
196
|
+
name,
|
|
197
|
+
address,
|
|
198
|
+
province,
|
|
199
|
+
city,
|
|
200
|
+
district,
|
|
201
|
+
country,
|
|
202
|
+
lat,
|
|
203
|
+
lng
|
|
204
|
+
});
|
|
205
|
+
emit("selectLocation", {
|
|
206
|
+
locationProp: emitData,
|
|
207
|
+
isInit: false
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
geocoder.setError(function() {
|
|
212
|
+
alert("\u51FA\u9519\u4E86\uFF0C\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7ECF\u7EAC\u5EA6\uFF01\uFF01\uFF01");
|
|
213
|
+
});
|
|
214
|
+
geocoder.getAddress(latLng);
|
|
215
|
+
};
|
|
216
|
+
const setMap = (qq) => {
|
|
217
|
+
var myLatlng = new qq.maps.LatLng(39.916527, 116.397128);
|
|
218
|
+
var myOptions = {
|
|
219
|
+
zoom: 12,
|
|
220
|
+
center: myLatlng,
|
|
221
|
+
mapTypeId: qq.maps.MapTypeId.ROADMAP
|
|
222
|
+
};
|
|
223
|
+
state.map = new qq.maps.Map(document.getElementById("map-core"), myOptions);
|
|
224
|
+
const { lat, lng, address } = calculateLocationProp.value || {};
|
|
225
|
+
if (lat && lng) {
|
|
226
|
+
const new_opint = new qq.maps.LatLng(lat, lng);
|
|
227
|
+
handleGeocoder({ latLng: new_opint });
|
|
228
|
+
} else if (address) {
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
searchKeyword();
|
|
231
|
+
}, 300);
|
|
232
|
+
} else {
|
|
233
|
+
getLocation();
|
|
234
|
+
}
|
|
235
|
+
init();
|
|
236
|
+
};
|
|
237
|
+
const initMap = (qq) => {
|
|
238
|
+
state.qq = qq;
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
setMap(qq);
|
|
241
|
+
initSearch();
|
|
242
|
+
}, 0);
|
|
243
|
+
};
|
|
244
|
+
const getMapScript = () => {
|
|
245
|
+
var _a, _b;
|
|
246
|
+
let _win = window;
|
|
247
|
+
if (!_win.qq) {
|
|
248
|
+
const ak = props.ak || ((_b = (_a = _win._qq) == null ? void 0 : _a.call(_win)) == null ? void 0 : _b.ak);
|
|
249
|
+
_win.qq = {};
|
|
250
|
+
_win.qq._preloader = new Promise((resolve) => {
|
|
251
|
+
_win._initBaiduMap = function() {
|
|
252
|
+
resolve(_win.qq);
|
|
253
|
+
_win.document.body.removeChild($script);
|
|
254
|
+
_win.qq._preloader = null;
|
|
255
|
+
_win._initBaiduMap = null;
|
|
256
|
+
};
|
|
257
|
+
const $script = document.createElement("script");
|
|
258
|
+
window.document.body.appendChild($script);
|
|
259
|
+
$script.src = `https://map.qq.com/api/js?v=2.exp&key=${ak}&callback=_initBaiduMap`;
|
|
260
|
+
const $script1 = document.createElement("script");
|
|
261
|
+
window.document.body.appendChild($script1);
|
|
262
|
+
$script1.src = `https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js`;
|
|
263
|
+
});
|
|
264
|
+
return _win.qq._preloader;
|
|
265
|
+
} else if (!_win.qq._preloader) {
|
|
266
|
+
return Promise.resolve(_win.qq);
|
|
267
|
+
} else {
|
|
268
|
+
return _win.qq._preloader;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
const reset = () => {
|
|
272
|
+
getMapScript().then(initMap);
|
|
273
|
+
};
|
|
274
|
+
onMounted(() => {
|
|
275
|
+
setTimeout(() => {
|
|
276
|
+
reset();
|
|
277
|
+
}, 200);
|
|
278
|
+
});
|
|
279
|
+
return (_ctx, _cache) => {
|
|
280
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
281
|
+
createElementVNode("div", _hoisted_2, [
|
|
282
|
+
createElementVNode("div", _hoisted_3, [
|
|
283
|
+
createVNode(unref(NInput), {
|
|
284
|
+
value: state.searchKey,
|
|
285
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => state.searchKey = $event),
|
|
286
|
+
placeholder: "\u8BF7\u8F93\u5165\u5730\u5740",
|
|
287
|
+
"enter-button": "\u68C0\u7D22"
|
|
288
|
+
}, null, 8, ["value"]),
|
|
289
|
+
createElementVNode("span", _hoisted_4, [
|
|
290
|
+
createVNode(unref(NButton), {
|
|
291
|
+
type: "primary",
|
|
292
|
+
size: "small",
|
|
293
|
+
onClick: searchKeyword
|
|
294
|
+
}, {
|
|
295
|
+
default: withCtx(() => [
|
|
296
|
+
_hoisted_5
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
})
|
|
300
|
+
])
|
|
301
|
+
])
|
|
302
|
+
]),
|
|
303
|
+
_hoisted_6,
|
|
304
|
+
state.addressList && state.addressList.length ? (openBlock(), createElementBlock("ul", _hoisted_7, [
|
|
305
|
+
createElementVNode("li", null, [
|
|
306
|
+
createTextVNode(" \u5730\u5740:" + toDisplayString(unref(defAdress)) + " ", 1),
|
|
307
|
+
createVNode(unref(NButton), {
|
|
308
|
+
type: "primary",
|
|
309
|
+
size: "small",
|
|
310
|
+
onClick: _cache[1] || (_cache[1] = ($event) => selectLocation(state.addressList[0]))
|
|
311
|
+
}, {
|
|
312
|
+
default: withCtx(() => [
|
|
313
|
+
_hoisted_8
|
|
314
|
+
]),
|
|
315
|
+
_: 1
|
|
316
|
+
})
|
|
317
|
+
]),
|
|
318
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(state.addressList, (item, index) => {
|
|
319
|
+
return openBlock(), createElementBlock("li", {
|
|
320
|
+
class: "address-item",
|
|
321
|
+
key: index
|
|
322
|
+
}, [
|
|
323
|
+
createElementVNode("div", {
|
|
324
|
+
onClick: ($event) => selectLocation(item)
|
|
325
|
+
}, [
|
|
326
|
+
createElementVNode("div", _hoisted_10, toDisplayString(item.name), 1),
|
|
327
|
+
createElementVNode("span", null, toDisplayString(item.address), 1)
|
|
328
|
+
], 8, _hoisted_9)
|
|
329
|
+
]);
|
|
330
|
+
}), 128))
|
|
331
|
+
])) : createCommentVNode("v-if", true)
|
|
332
|
+
]);
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "Map.vue"]]);
|
|
337
|
+
|
|
338
|
+
export { script as default };
|
|
@@ -2,12 +2,11 @@ import { COMPONENT_NAMESPACE } from '../../src/global/variable';
|
|
|
2
2
|
import { safeComponentRegister } from '../../src/utils';
|
|
3
3
|
import { loadViewer } from '../../src/utils/loadViewer';
|
|
4
4
|
import { expandXEUtils } from '../../src/utils/utilExpand';
|
|
5
|
-
import './src/ScaleView.js';
|
|
5
|
+
import script from './src/ScaleView.js';
|
|
6
6
|
import scriptRadio from './src/components/formitem/r-radio.js';
|
|
7
7
|
import scriptCheckbox from './src/components/formitem/r-checkbox.js';
|
|
8
8
|
import scriptSelect from './src/components/formitem/r-select.js';
|
|
9
9
|
import scriptDatetime from './src/components/formitem/r-datetime.js';
|
|
10
|
-
import script from './src/ScaleView.vue_vue_type_script_setup_true_lang.js';
|
|
11
10
|
|
|
12
11
|
const CScaleView = script;
|
|
13
12
|
const CRadio = scriptRadio;
|