hy-dispatch-ui-v3 0.2.61 → 0.2.63
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/dist/tailwind.css +70 -5
- package/es/api/device.mjs +19 -0
- package/es/api/index.mjs +2 -1
- package/es/api/sypct.mjs +19 -0
- package/es/api/task.mjs +19 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +6 -3
- package/es/bussiness/hyAddDepartmentType/index.mjs +1 -0
- package/es/bussiness/hyMapAearchPlace/index.mjs +7 -0
- package/es/bussiness/hyMapAearchPlace/js/index.mjs +650 -0
- package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +366 -0
- package/es/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.mjs +101 -0
- package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
- package/es/bussiness/index.mjs +1 -0
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +3 -0
- package/es/components/hyAudioPlayer/index.mjs +1 -0
- package/es/components/hyAudioPlayer/js/index.mjs +5 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +23 -3
- package/es/components/hyBatchUploadDialog/index.mjs +1 -0
- package/es/components/hyButton/button.vue.mjs +3 -2
- package/es/components/hyButton/index.mjs +1 -0
- package/es/components/hyButton/style/button.scss +10 -3
- package/es/components/hyConfigProvider/configProvider.vue.mjs +6 -1
- package/es/components/hyConfigProvider/index.mjs +1 -0
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +6 -2
- package/es/components/hyConfirmDialog/confirmMethod.mjs +5 -3
- package/es/components/hyConfirmDialog/index.mjs +1 -0
- package/es/components/hyCutter/cutter.vue.mjs +5 -2
- package/es/components/hyCutter/index.mjs +1 -0
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyDatePicker/index.mjs +1 -0
- package/es/components/hyDialog/dialog.vue.mjs +98 -14
- package/es/components/hyDialog/index.mjs +1 -0
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +16 -3
- package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +4 -1
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +6 -1
- package/es/components/hyForm/form.vue.mjs +3 -0
- package/es/components/hyForm/index.mjs +1 -0
- package/es/components/hyForm/js/index.mjs +3 -1
- package/es/components/hyForm/js/useAppForm.mjs +4 -2
- package/es/components/hyIcon/icon.vue.mjs +2 -1
- package/es/components/hyIcon/index.mjs +1 -0
- package/es/components/hyIconBox/iconBox.vue.mjs +1 -0
- package/es/components/hyIconBox/index.mjs +1 -0
- package/es/components/hyInput/index.mjs +1 -0
- package/es/components/hyInput/input.vue.mjs +3 -1
- package/es/components/hyInput/inputSearch.vue.mjs +2 -1
- package/es/components/hyLoading/index.mjs +41 -0
- package/es/components/hyMap/index.mjs +1 -0
- package/es/components/hyMap/js/index.mjs +82 -0
- package/es/components/hyMap/map.vue.mjs +11 -3
- package/es/components/hyMenu/index.mjs +1 -0
- package/es/components/hyMenu/menu.vue.mjs +4 -0
- package/es/components/hyNoPermissions/index.mjs +1 -0
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +4 -0
- package/es/components/hyNoPermissionsMap/index.mjs +1 -0
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +4 -0
- package/es/components/hyOrgCascader/index.mjs +1 -0
- package/es/components/hyOrgCascader/js/index.mjs +2 -0
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +2 -1
- package/es/components/hyRadioGroup/index.mjs +1 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +2 -2
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -2
- package/es/components/hySearch/index.mjs +1 -0
- package/es/components/hySearch/js/index.mjs +4 -2
- package/es/components/hySearch/js/useAppSearch.mjs +4 -2
- package/es/components/hySearch/search.vue.mjs +3 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +6 -3
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +3 -0
- package/es/components/hyTable/cpns/headerItem.vue.mjs +3 -0
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +7 -2
- package/es/components/hyTable/index.mjs +1 -0
- package/es/components/hyTable/js/index.mjs +10 -10
- package/es/components/hyTable/js/search.mjs +2 -0
- package/es/components/hyTable/js/useAppTable.mjs +5 -2
- package/es/components/hyTable/table.vue.mjs +11 -1
- package/es/components/hyTableActionButton/index.mjs +1 -0
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +5 -2
- package/es/components/hyTableForm/batchTableForm.vue.mjs +41 -61
- package/es/components/hyTableForm/index.mjs +1 -0
- package/es/components/hyTableForm/js/index.mjs +13 -27
- package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -0
- package/es/components/hyTableForm/tableForm.vue.mjs +12 -4
- package/es/components/hyTimePicker/index.mjs +1 -0
- package/es/components/hyTimePicker/timePicker.vue.mjs +3 -1
- package/es/components/hyTooltip/index.mjs +1 -0
- package/es/components/hyTooltip/tooltip.vue.mjs +4 -2
- package/es/components/hyTree/index.mjs +1 -0
- package/es/components/hyTree/js/index.mjs +15 -2
- package/es/components/hyTree/tree.vue.mjs +9 -4
- package/es/components/hyUserAvatar/index.mjs +1 -0
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +5 -1
- package/es/components/hyVideoPlayer/cpns/mediaLoading.vue.mjs +1 -0
- package/es/components/hyVideoPlayer/index.mjs +1 -0
- package/es/components/hyVideoPlayer/js/index.mjs +7 -2
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +3 -0
- package/es/components/index.mjs +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useGlobalConfig.mjs +6 -1
- package/es/hooks/useLocale.mjs +4 -2
- package/es/hooks/useMapConfig.mjs +18 -0
- package/es/hooks/useResizeHandler.mjs +1 -0
- package/es/hooks/useResizeObserver.mjs +1 -1
- package/es/index.mjs +8 -0
- package/es/locale/en.mjs +1 -2
- package/es/locale/zh_CN.mjs +1 -2
- package/es/make-installer.mjs +1 -0
- package/es/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
- package/es/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
- package/es/style/element/hy-element.scss +10 -1
- package/es/utils/file.mjs +1 -0
- package/es/utils/form.mjs +6 -1
- package/es/utils/handler.mjs +2 -0
- package/es/utils/index.mjs +2 -0
- package/es/utils/input.mjs +1 -0
- package/es/utils/is.mjs +1 -0
- package/es/utils/map/hook/bigMap.mjs +3 -2
- package/es/utils/map/hook/gaode.mjs +2 -2
- package/es/utils/map/hook/leafletjs.mjs +7 -1
- package/es/utils/map/index.mjs +12 -0
- package/es/utils/map/js/webgis.mjs +5 -2
- package/es/utils/sharedContent.mjs +12 -0
- package/es/version.mjs +1 -1
- package/lib/api/device.js +21 -0
- package/lib/api/index.js +2 -1
- package/lib/api/sypct.js +21 -0
- package/lib/api/task.js +21 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +15 -12
- package/lib/bussiness/hyAddDepartmentType/index.js +1 -0
- package/lib/bussiness/hyMapAearchPlace/index.js +12 -0
- package/lib/bussiness/hyMapAearchPlace/js/index.js +652 -0
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +370 -0
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.js +105 -0
- package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
- package/lib/bussiness/index.js +2 -0
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +3 -0
- package/lib/components/hyAudioPlayer/index.js +1 -0
- package/lib/components/hyAudioPlayer/js/index.js +5 -1
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +23 -3
- package/lib/components/hyBatchUploadDialog/index.js +1 -0
- package/lib/components/hyButton/button.vue.js +2 -1
- package/lib/components/hyButton/index.js +1 -0
- package/lib/components/hyButton/style/button.scss +10 -3
- package/lib/components/hyConfigProvider/configProvider.vue.js +5 -0
- package/lib/components/hyConfigProvider/index.js +1 -0
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +6 -2
- package/lib/components/hyConfirmDialog/confirmMethod.js +5 -3
- package/lib/components/hyConfirmDialog/index.js +1 -0
- package/lib/components/hyCutter/cutter.vue.js +3 -0
- package/lib/components/hyCutter/index.js +1 -0
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyDatePicker/index.js +1 -0
- package/lib/components/hyDialog/dialog.vue.js +96 -12
- package/lib/components/hyDialog/index.js +1 -0
- package/lib/components/hyForm/cpns/arrayItem.vue.js +16 -3
- package/lib/components/hyForm/cpns/extraItem.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +3 -0
- package/lib/components/hyForm/cpns/locationSelect.vue.js +6 -1
- package/lib/components/hyForm/form.vue.js +3 -0
- package/lib/components/hyForm/index.js +1 -0
- package/lib/components/hyForm/js/index.js +3 -1
- package/lib/components/hyForm/js/useAppForm.js +3 -1
- package/lib/components/hyIcon/icon.vue.js +1 -0
- package/lib/components/hyIcon/index.js +1 -0
- package/lib/components/hyIconBox/iconBox.vue.js +1 -0
- package/lib/components/hyIconBox/index.js +1 -0
- package/lib/components/hyInput/index.js +1 -0
- package/lib/components/hyInput/input.vue.js +2 -0
- package/lib/components/hyInput/inputSearch.vue.js +1 -0
- package/lib/components/hyLoading/index.js +47 -0
- package/lib/components/hyMap/index.js +1 -0
- package/lib/components/hyMap/js/index.js +82 -0
- package/lib/components/hyMap/map.vue.js +11 -3
- package/lib/components/hyMenu/index.js +1 -0
- package/lib/components/hyMenu/menu.vue.js +4 -0
- package/lib/components/hyNoPermissions/index.js +1 -0
- package/lib/components/hyNoPermissions/noPermissions.vue.js +4 -0
- package/lib/components/hyNoPermissionsMap/index.js +1 -0
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +4 -0
- package/lib/components/hyOrgCascader/index.js +1 -0
- package/lib/components/hyOrgCascader/js/index.js +2 -0
- package/lib/components/hyOrgCascader/orgCascader.vue.js +2 -1
- package/lib/components/hyRadioGroup/index.js +1 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +1 -1
- package/lib/components/hySearch/cpns/searchItem.vue.js +18 -0
- package/lib/components/hySearch/index.js +1 -0
- package/lib/components/hySearch/js/index.js +3 -1
- package/lib/components/hySearch/js/useAppSearch.js +4 -2
- package/lib/components/hySearch/search.vue.js +3 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +4 -1
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +3 -0
- package/lib/components/hyTable/cpns/headerItem.vue.js +3 -0
- package/lib/components/hyTable/cpns/virtualTable.vue.js +6 -1
- package/lib/components/hyTable/index.js +1 -0
- package/lib/components/hyTable/js/index.js +9 -9
- package/lib/components/hyTable/js/search.js +2 -0
- package/lib/components/hyTable/js/useAppTable.js +4 -1
- package/lib/components/hyTable/table.vue.js +11 -1
- package/lib/components/hyTableActionButton/index.js +1 -0
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -1
- package/lib/components/hyTableForm/batchTableForm.vue.js +42 -62
- package/lib/components/hyTableForm/index.js +1 -0
- package/lib/components/hyTableForm/js/index.js +12 -27
- package/lib/components/hyTableForm/js/useAppTableForm.js +2 -0
- package/lib/components/hyTableForm/tableForm.vue.js +19 -11
- package/lib/components/hyTimePicker/index.js +1 -0
- package/lib/components/hyTimePicker/timePicker.vue.js +2 -0
- package/lib/components/hyTooltip/index.js +1 -0
- package/lib/components/hyTooltip/tooltip.vue.js +2 -0
- package/lib/components/hyTree/index.js +1 -0
- package/lib/components/hyTree/js/index.js +14 -1
- package/lib/components/hyTree/tree.vue.js +9 -4
- package/lib/components/hyUserAvatar/index.js +1 -0
- package/lib/components/hyUserAvatar/userAvatar.vue.js +5 -1
- package/lib/components/hyVideoPlayer/cpns/mediaLoading.vue.js +1 -0
- package/lib/components/hyVideoPlayer/index.js +1 -0
- package/lib/components/hyVideoPlayer/js/index.js +7 -2
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +3 -0
- package/lib/components/index.js +56 -53
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useGlobalConfig.js +5 -0
- package/lib/hooks/useLocale.js +3 -1
- package/lib/hooks/useMapConfig.js +21 -0
- package/lib/hooks/useResizeHandler.js +1 -0
- package/lib/index.js +73 -59
- package/lib/locale/en.js +1 -2
- package/lib/locale/zh_CN.js +1 -2
- package/lib/make-installer.js +1 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
- package/lib/style/element/hy-element.scss +10 -1
- package/lib/utils/file.js +1 -0
- package/lib/utils/form.js +5 -0
- package/lib/utils/handler.js +2 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/input.js +1 -0
- package/lib/utils/is.js +1 -0
- package/lib/utils/map/hook/bigMap.js +3 -2
- package/lib/utils/map/hook/gaode.js +1 -1
- package/lib/utils/map/hook/leafletjs.js +7 -1
- package/lib/utils/map/index.js +12 -0
- package/lib/utils/map/js/webgis.js +5 -1
- package/lib/utils/sharedContent.js +14 -0
- package/lib/version.js +1 -1
- package/package.json +2 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, useModel, ref, nextTick, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, unref
|
|
2
|
-
import { ElUpload, ElIcon
|
|
1
|
+
import { defineComponent, useTemplateRef, useModel, ref, nextTick, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, unref, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot, vShow, createTextVNode, mergeProps, createSlots, normalizeProps, guardReactiveProps, normalizeStyle, mergeModels } from 'vue';
|
|
2
|
+
import { ElMessage, ElUpload, ElIcon } from 'element-plus';
|
|
3
3
|
import { Loading } from '@element-plus/icons-vue';
|
|
4
|
+
import '../../hooks/index.mjs';
|
|
5
|
+
import '../../utils/index.mjs';
|
|
6
|
+
import '../index.mjs';
|
|
4
7
|
import _sfc_main$1 from './tableForm.vue.mjs';
|
|
5
|
-
import {
|
|
8
|
+
import { doReadExcel } from './js/index.mjs';
|
|
6
9
|
import { useApi } from '../../hooks/useApi.mjs';
|
|
7
10
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
11
|
+
import { HyConfirmDialog } from '../hyConfirmDialog/index.mjs';
|
|
8
12
|
import { isArray } from '../../utils/is.mjs';
|
|
9
13
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
10
14
|
import { HyButton } from '../hyButton/index.mjs';
|
|
11
|
-
import { HyConfirmDialog } from '../hyConfirmDialog/index.mjs';
|
|
12
15
|
|
|
13
16
|
import "./style/batchTableForm.scss";
|
|
14
17
|
|
|
@@ -64,21 +67,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
64
67
|
onExpandRowChange: {
|
|
65
68
|
type: Function
|
|
66
69
|
},
|
|
67
|
-
|
|
68
|
-
type:
|
|
69
|
-
default: () => ({
|
|
70
|
-
title: "\u4E0B\u8F7D\u6A21\u677F",
|
|
71
|
-
url: "",
|
|
72
|
-
fileName: ""
|
|
73
|
-
})
|
|
74
|
-
},
|
|
75
|
-
url: {
|
|
76
|
-
type: String
|
|
70
|
+
submitHandler: {
|
|
71
|
+
type: Function
|
|
77
72
|
},
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
// 是否显示添加按钮
|
|
74
|
+
showAddBtn: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true
|
|
80
77
|
},
|
|
81
|
-
|
|
78
|
+
// 外部整体数据处理
|
|
79
|
+
beforeDataListHandle: {
|
|
82
80
|
type: Function
|
|
83
81
|
}
|
|
84
82
|
}, {
|
|
@@ -142,6 +140,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
142
140
|
return tableRef.value.validate();
|
|
143
141
|
}
|
|
144
142
|
async function onUploadChange(file) {
|
|
143
|
+
const { beforeDataListHandle } = props;
|
|
145
144
|
const type = file.raw.type;
|
|
146
145
|
if (file.raw.size > 1024 * 1024 * 10) {
|
|
147
146
|
ElMessage.error(`\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710M\uFF01`);
|
|
@@ -149,31 +148,32 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
149
148
|
} else {
|
|
150
149
|
if (type.indexOf("application") !== -1) {
|
|
151
150
|
const files = { 0: file.raw };
|
|
151
|
+
isUploading.value = true;
|
|
152
|
+
emits("uploading");
|
|
152
153
|
try {
|
|
153
|
-
isUploading.value = true;
|
|
154
|
-
emits("uploading");
|
|
155
154
|
const data = await doReadExcel(files, props);
|
|
156
155
|
if (!data) {
|
|
157
156
|
ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
|
|
158
|
-
|
|
159
|
-
return;
|
|
157
|
+
throw Error("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
|
|
160
158
|
}
|
|
161
159
|
if (!data.length) {
|
|
162
160
|
ElMessage.warning("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
|
|
163
|
-
|
|
164
|
-
return;
|
|
161
|
+
throw Error("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
|
|
165
162
|
}
|
|
166
163
|
active.value++;
|
|
167
|
-
isUploading.value = false;
|
|
168
|
-
emits("uploaded");
|
|
169
164
|
await nextTick();
|
|
170
|
-
|
|
165
|
+
if (beforeDataListHandle) {
|
|
166
|
+
const processData = await beforeDataListHandle(data);
|
|
167
|
+
setData(processData);
|
|
168
|
+
} else {
|
|
169
|
+
setData(data);
|
|
170
|
+
}
|
|
171
171
|
templateFileName.value = file.name;
|
|
172
172
|
} catch (err) {
|
|
173
|
-
isUploading.value = false;
|
|
174
173
|
console.error(err);
|
|
175
|
-
return;
|
|
176
174
|
}
|
|
175
|
+
isUploading.value = false;
|
|
176
|
+
emits("uploaded");
|
|
177
177
|
} else {
|
|
178
178
|
ElMessage.error("\u6587\u4EF6\u683C\u5F0F\u6709\u8BEF");
|
|
179
179
|
}
|
|
@@ -205,8 +205,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
205
205
|
uploadRef.value.click();
|
|
206
206
|
}
|
|
207
207
|
async function submitDataSource() {
|
|
208
|
-
if (!props.
|
|
209
|
-
ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\
|
|
208
|
+
if (!props.submitHandler) {
|
|
209
|
+
ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\u903B\u8F91");
|
|
210
210
|
return Promise.reject();
|
|
211
211
|
}
|
|
212
212
|
if (submitting.value) {
|
|
@@ -250,13 +250,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
250
250
|
if (errorMsg) {
|
|
251
251
|
continue;
|
|
252
252
|
}
|
|
253
|
-
let res2;
|
|
254
253
|
try {
|
|
255
|
-
|
|
256
|
-
res2 = await props.submitHandler(data);
|
|
257
|
-
} else {
|
|
258
|
-
res2 = await unref(api).post(props.url, props.submitParams);
|
|
259
|
-
}
|
|
254
|
+
const res2 = await props.submitHandler(data);
|
|
260
255
|
if (res2.code === 200) {
|
|
261
256
|
submitNumber.value++;
|
|
262
257
|
submitList.push(target);
|
|
@@ -342,7 +337,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
342
337
|
{ class: "max-h-full overflow-y-auto scroll-body" },
|
|
343
338
|
[
|
|
344
339
|
createElementVNode("div", { class: "hy-batch-table-form-upload-box" }, [
|
|
345
|
-
createVNode(unref
|
|
340
|
+
createVNode(unref(ElUpload), {
|
|
346
341
|
accept: ".xls,.xlsx",
|
|
347
342
|
drag: "",
|
|
348
343
|
multiple: false,
|
|
@@ -352,7 +347,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
352
347
|
"on-change": onUploadChange
|
|
353
348
|
}, {
|
|
354
349
|
default: withCtx(() => [
|
|
355
|
-
createVNode(unref
|
|
350
|
+
createVNode(unref(HyIcon), {
|
|
356
351
|
"svg-name": "ops-file-xls",
|
|
357
352
|
"class-name": "!w-[58px] !h-[66px] mb-4"
|
|
358
353
|
}),
|
|
@@ -361,9 +356,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
361
356
|
class: "flex items-center gap-2 text-auxiliary"
|
|
362
357
|
}, [
|
|
363
358
|
createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
|
|
364
|
-
createVNode(unref
|
|
359
|
+
createVNode(unref(ElIcon), { class: "is-loading" }, {
|
|
365
360
|
default: withCtx(() => [
|
|
366
|
-
createVNode(unref
|
|
361
|
+
createVNode(unref(Loading))
|
|
367
362
|
]),
|
|
368
363
|
_: 1
|
|
369
364
|
/* STABLE */
|
|
@@ -442,23 +437,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
442
437
|
innerHTML: item.description,
|
|
443
438
|
class: "text-auxiliary text-center mb-3 whitespace-nowrap"
|
|
444
439
|
}, null, 8, ["innerHTML"]),
|
|
445
|
-
index === 0 ? renderSlot(_ctx.$slots, "template-down", {},
|
|
446
|
-
createVNode(unref$1(HyButton), {
|
|
447
|
-
type: "primary",
|
|
448
|
-
link: "",
|
|
449
|
-
onClick: () => unref$1(downloadTemplateHandler)(props)
|
|
450
|
-
}, {
|
|
451
|
-
default: withCtx(() => [
|
|
452
|
-
createTextVNode(
|
|
453
|
-
toDisplayString(__props.templateConfig ? __props.templateConfig.title : "\u4E0B\u8F7D\u6A21\u677F"),
|
|
454
|
-
1
|
|
455
|
-
/* TEXT */
|
|
456
|
-
)
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
/* STABLE */
|
|
460
|
-
}, 8, ["onClick"])
|
|
461
|
-
], void 0, 1) : createCommentVNode("v-if", true)
|
|
440
|
+
index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, void 0, void 0, 1) : createCommentVNode("v-if", true)
|
|
462
441
|
]);
|
|
463
442
|
}),
|
|
464
443
|
64
|
|
@@ -478,7 +457,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
478
457
|
}, [
|
|
479
458
|
createElementVNode("div", { class: "hy-batch-table-form-template-box mb-4" }, [
|
|
480
459
|
createElementVNode("div", { class: "flex items-center gap-2" }, [
|
|
481
|
-
createVNode(unref
|
|
460
|
+
createVNode(unref(HyIcon), {
|
|
482
461
|
"svg-name": "ops-file-xls",
|
|
483
462
|
"class-name": "!w-[18px] !h-[22px]"
|
|
484
463
|
}),
|
|
@@ -502,7 +481,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
502
481
|
class: "text-auxiliary"
|
|
503
482
|
}, "\u6682\u672A\u5BFC\u5165\u6587\u4EF6"))
|
|
504
483
|
]),
|
|
505
|
-
createVNode(unref
|
|
484
|
+
createVNode(unref(HyButton), {
|
|
506
485
|
type: "primary",
|
|
507
486
|
link: "",
|
|
508
487
|
size: "small",
|
|
@@ -530,6 +509,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
530
509
|
rowClickExpand: __props.rowClickExpand,
|
|
531
510
|
columnNum: __props.columnNum,
|
|
532
511
|
size: __props.size,
|
|
512
|
+
showAddBtn: __props.showAddBtn,
|
|
533
513
|
class: "h-0 flex-1"
|
|
534
514
|
}), createSlots({
|
|
535
515
|
_: 2
|
|
@@ -543,7 +523,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
543
523
|
])
|
|
544
524
|
};
|
|
545
525
|
})
|
|
546
|
-
]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size"])
|
|
526
|
+
]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size", "showAddBtn"])
|
|
547
527
|
])) : createCommentVNode("v-if", true),
|
|
548
528
|
submitting.value ? (openBlock(), createElementBlock("div", {
|
|
549
529
|
key: 1,
|
|
@@ -551,7 +531,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
551
531
|
}, [
|
|
552
532
|
createElementVNode("div", { class: "w-full h-full absolute bg-[rgba(var(--hy-background-4),0.9)] backdrop-blur-sm" }),
|
|
553
533
|
createElementVNode("div", { class: "flex flex-col items-center text-theme text-xs relative" }, [
|
|
554
|
-
createVNode(unref
|
|
534
|
+
createVNode(unref(HyIcon), {
|
|
555
535
|
"svg-name": "ops-file-xls",
|
|
556
536
|
"class-name": "!w-[58px] !h-[66px] mb-[18px]"
|
|
557
537
|
}),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import XLSX from 'xlsx';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
-
import
|
|
3
|
+
import 'vue';
|
|
4
4
|
import AsyncValidator from 'async-validator';
|
|
5
5
|
import { ElMessage } from 'element-plus';
|
|
6
6
|
import { columnShowHandler } from '../../hyForm/js/index.mjs';
|
|
7
|
-
import
|
|
7
|
+
import '../../../utils/index.mjs';
|
|
8
|
+
import '../../../hooks/index.mjs';
|
|
8
9
|
import { columnRuleHandler, setValueByProp, getValueByProp } from '../../../utils/form.mjs';
|
|
9
10
|
import { isArray } from '../../../utils/is.mjs';
|
|
10
11
|
|
|
@@ -39,7 +40,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
|
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
42
|
const doReadExcel = (files, props) => {
|
|
42
|
-
return new Promise((
|
|
43
|
+
return new Promise((resolve, reject) => {
|
|
43
44
|
const { formColumns, beforeDataHandle } = props;
|
|
44
45
|
const fileReader = new FileReader();
|
|
45
46
|
fileReader.onload = (ev) => {
|
|
@@ -59,9 +60,13 @@ const doReadExcel = (files, props) => {
|
|
|
59
60
|
}, JSON.stringify(ws1));
|
|
60
61
|
let dataSource = JSON.parse(content);
|
|
61
62
|
if (beforeDataHandle) {
|
|
62
|
-
|
|
63
|
+
const handlePromises = dataSource.map(
|
|
64
|
+
(item) => Promise.resolve().then(() => beforeDataHandle(item)).catch(() => item)
|
|
65
|
+
);
|
|
66
|
+
Promise.all(handlePromises).then(resolve, reject);
|
|
67
|
+
return;
|
|
63
68
|
}
|
|
64
|
-
|
|
69
|
+
resolve(dataSource);
|
|
65
70
|
} catch (err) {
|
|
66
71
|
reject(err);
|
|
67
72
|
}
|
|
@@ -69,27 +74,8 @@ const doReadExcel = (files, props) => {
|
|
|
69
74
|
fileReader.readAsBinaryString(files[0]);
|
|
70
75
|
});
|
|
71
76
|
};
|
|
72
|
-
const downloadTemplateHandler = async (props) => {
|
|
73
|
-
const { templateConfig } = props;
|
|
74
|
-
const { url, fileName } = templateConfig;
|
|
75
|
-
if (!url) {
|
|
76
|
-
ElMessage.warning("\u8BF7\u914D\u7F6E\u4E0B\u8F7D\u6A21\u677F\u5730\u5740");
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const { api } = useApi();
|
|
80
|
-
try {
|
|
81
|
-
const blob = await unref(api).get(url, {
|
|
82
|
-
responseType: "blob"
|
|
83
|
-
});
|
|
84
|
-
blobDownloadFn(blob, fileName).then(() => {
|
|
85
|
-
resolve();
|
|
86
|
-
});
|
|
87
|
-
} catch (err) {
|
|
88
|
-
console.error(err);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
77
|
function blobDownloadFn(blob, name) {
|
|
92
|
-
return new Promise((
|
|
78
|
+
return new Promise((resolve, reject) => {
|
|
93
79
|
ElMessage.warning("\u5F00\u59CB\u4E0B\u8F7D");
|
|
94
80
|
const today = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
95
81
|
const reader = new FileReader();
|
|
@@ -110,7 +96,7 @@ function blobDownloadFn(blob, name) {
|
|
|
110
96
|
a.click();
|
|
111
97
|
a.remove();
|
|
112
98
|
}
|
|
113
|
-
|
|
99
|
+
resolve();
|
|
114
100
|
} catch (error) {
|
|
115
101
|
reject(error);
|
|
116
102
|
} finally {
|
|
@@ -120,4 +106,4 @@ function blobDownloadFn(blob, name) {
|
|
|
120
106
|
});
|
|
121
107
|
}
|
|
122
108
|
|
|
123
|
-
export { doReadExcel, doValidate
|
|
109
|
+
export { doReadExcel, doValidate };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode,
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, computed, nextTick, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import { ElIcon } from 'element-plus';
|
|
3
3
|
import { Warning } from '@element-plus/icons-vue';
|
|
4
|
+
import '../index.mjs';
|
|
5
|
+
import '../../utils/index.mjs';
|
|
4
6
|
import { doValidate } from './js/index.mjs';
|
|
5
7
|
import { useAppTable } from '../hyTable/js/useAppTable.mjs';
|
|
8
|
+
import { resetAppFormValue } from '../hyForm/js/useAppForm.mjs';
|
|
6
9
|
import { isArray, isObject } from '../../utils/is.mjs';
|
|
7
10
|
import { cloneDeep } from '../../utils/handler.mjs';
|
|
8
11
|
import { HyButton } from '../hyButton/index.mjs';
|
|
9
12
|
import { HyTable } from '../hyTable/index.mjs';
|
|
10
13
|
import { HyForm } from '../hyForm/index.mjs';
|
|
11
|
-
import { resetAppFormValue } from '../hyForm/js/useAppForm.mjs';
|
|
12
14
|
|
|
13
15
|
import "./style/tableForm.scss";
|
|
14
16
|
|
|
@@ -59,6 +61,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
59
61
|
type: String,
|
|
60
62
|
default: "default"
|
|
61
63
|
// 'large' | 'default' | 'small'
|
|
64
|
+
},
|
|
65
|
+
// 是否显示添加按钮
|
|
66
|
+
showAddBtn: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: true
|
|
62
69
|
}
|
|
63
70
|
},
|
|
64
71
|
emits: ["validate"],
|
|
@@ -330,7 +337,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
330
337
|
])) : createCommentVNode("v-if", true)
|
|
331
338
|
]),
|
|
332
339
|
createElementVNode("div", { class: "flex items-center gap-3" }, [
|
|
333
|
-
|
|
340
|
+
__props.showAddBtn ? (openBlock(), createBlock(unref(HyButton), {
|
|
341
|
+
key: 0,
|
|
334
342
|
type: "success",
|
|
335
343
|
size: "small",
|
|
336
344
|
"svg-name": "ops-button-add",
|
|
@@ -341,7 +349,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
341
349
|
]),
|
|
342
350
|
_: 1
|
|
343
351
|
/* STABLE */
|
|
344
|
-
}),
|
|
352
|
+
})) : createCommentVNode("v-if", true),
|
|
345
353
|
createElementVNode("div", { class: "hy-table-form-tabs" }, [
|
|
346
354
|
(openBlock(true), createElementBlock(
|
|
347
355
|
Fragment,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { useTemplateRef, useModel, computed, watch, unref, openBlock, createBlock, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, mergeModels
|
|
1
|
+
import { defineComponent, useTemplateRef, useModel, computed, watch, unref, openBlock, createBlock, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
import { ElTimePicker } from 'element-plus';
|
|
4
|
+
import '../../utils/index.mjs';
|
|
5
|
+
import '../../hooks/index.mjs';
|
|
4
6
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
5
7
|
import { isArray } from '../../utils/is.mjs';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ref, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, normalizeClass
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, normalizeClass } from 'vue';
|
|
2
2
|
import { ElTooltip } from 'element-plus';
|
|
3
|
-
import
|
|
3
|
+
import '../../utils/index.mjs';
|
|
4
|
+
import '../../hooks/index.mjs';
|
|
5
|
+
import { isNumber, isOverflowing, isBoolean } from '../../utils/is.mjs';
|
|
4
6
|
import { useTooltipConfig } from '../../hooks/useTooltipConfig.mjs';
|
|
5
7
|
|
|
6
8
|
import "./style/tooltip.scss";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElMessage } from 'element-plus';
|
|
2
|
-
import { getCurrentInstance, ref, watch,
|
|
2
|
+
import { getCurrentInstance, ref, watch, h, render, computed } from 'vue';
|
|
3
3
|
import { treeTypeConfig } from '../config/tree-config.mjs';
|
|
4
4
|
|
|
5
5
|
const deviceStatus = {
|
|
@@ -61,7 +61,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
61
61
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
62
62
|
business: props2.treeType,
|
|
63
63
|
// 自定义整体的插槽
|
|
64
|
-
renderItem: props2.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data) : setSlot("treeParentSlot"),
|
|
64
|
+
renderItem: props2.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
|
|
65
65
|
// // 自定义状态右侧插槽
|
|
66
66
|
renderRight: (data) => {
|
|
67
67
|
let renderRight = setSlot("renderRight");
|
|
@@ -152,6 +152,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
152
152
|
// 筛选方法
|
|
153
153
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
154
154
|
let isFilter = true;
|
|
155
|
+
if (props2.filterMethod) {
|
|
156
|
+
isFilter = props2.filterMethod(data, { filterValue: filterValue2 });
|
|
157
|
+
}
|
|
155
158
|
if (filterValue2) {
|
|
156
159
|
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
157
160
|
treeFilterParam: props2.treeFilterParam
|
|
@@ -356,6 +359,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
356
359
|
}
|
|
357
360
|
return true;
|
|
358
361
|
}
|
|
362
|
+
function setGroupRenderItem(data, node) {
|
|
363
|
+
const slot = setSlot("treeParentSlot");
|
|
364
|
+
if (slot) {
|
|
365
|
+
return slot(data, node);
|
|
366
|
+
}
|
|
367
|
+
return true;
|
|
368
|
+
}
|
|
359
369
|
function setSlot(slotName) {
|
|
360
370
|
if (!slotName || !slots[slotName]) return null;
|
|
361
371
|
return (data, node) => {
|
|
@@ -396,6 +406,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
396
406
|
function addDevice() {
|
|
397
407
|
emits("on-addDevice");
|
|
398
408
|
}
|
|
409
|
+
function setDeviceStatus(payload) {
|
|
410
|
+
virtualTree?.updateData([payload]);
|
|
411
|
+
}
|
|
399
412
|
function singleRemovalFn(row) {
|
|
400
413
|
if (props2.treeType === "device") {
|
|
401
414
|
virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useSlots, ref, onMounted, resolveDirective, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, createElementVNode, isRef, withKeys, Fragment, renderList, createBlock, createCommentVNode, renderSlot, withDirectives } from 'vue';
|
|
2
2
|
import { ElTooltip, ElInput, ElSelect, ElOption } from 'element-plus';
|
|
3
|
+
import '../index.mjs';
|
|
4
|
+
import '../../hooks/index.mjs';
|
|
3
5
|
import { VirtualTree } from 'hy-virtual-tree';
|
|
4
6
|
import { useAppTreeWrapper } from './js/index.mjs';
|
|
5
7
|
import { searchTypeConfig, treeTypeConfig } from './config/tree-config.mjs';
|
|
@@ -177,6 +179,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
177
179
|
filterConfig: {
|
|
178
180
|
type: Array,
|
|
179
181
|
default: () => []
|
|
182
|
+
},
|
|
183
|
+
// 外部自定义过滤函数
|
|
184
|
+
filterMethod: {
|
|
185
|
+
type: Function,
|
|
186
|
+
default: () => null
|
|
180
187
|
}
|
|
181
188
|
},
|
|
182
189
|
emits: [
|
|
@@ -223,7 +230,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
223
230
|
[useAppTreeWrapper]
|
|
224
231
|
);
|
|
225
232
|
onMounted(() => {
|
|
226
|
-
if (props.searchType === 2)
|
|
233
|
+
if (props.searchType === 2) {
|
|
234
|
+
}
|
|
227
235
|
setFilterListType();
|
|
228
236
|
});
|
|
229
237
|
__expose({
|
|
@@ -345,9 +353,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
345
353
|
withDirectives(createElementVNode(
|
|
346
354
|
"div",
|
|
347
355
|
{
|
|
348
|
-
"element-loading-text": "\u52A0\u8F7D\u4E2D...",
|
|
349
|
-
"element-loading-spinner": "el-icon-loading",
|
|
350
|
-
"element-loading-background": "rgba(0, 0, 0, 0.8)",
|
|
351
356
|
ref_key: "treeRef",
|
|
352
357
|
ref: treeRef,
|
|
353
358
|
style: { "width": "100%" },
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, unref, openBlock, createElementBlock, normalizeStyle, createBlock, normalizeClass, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../utils/index.mjs';
|
|
3
|
+
import '../../hooks/index.mjs';
|
|
4
|
+
import '../index.mjs';
|
|
2
5
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
3
6
|
import { useUserAvatarMap } from '../../hooks/useUserAvatarMap.mjs';
|
|
4
|
-
import { HyIcon } from '../hyIcon/index.mjs';
|
|
5
7
|
import { pxTorem } from '../../utils/adaptive.mjs';
|
|
8
|
+
import { HyIcon } from '../hyIcon/index.mjs';
|
|
6
9
|
|
|
7
10
|
import "./style/userAvatar.scss";
|
|
8
11
|
|
|
@@ -53,6 +56,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
53
56
|
emits: [],
|
|
54
57
|
setup(__props, { emit: __emit }) {
|
|
55
58
|
const props = __props;
|
|
59
|
+
const emits = __emit;
|
|
56
60
|
const { t } = useLocale();
|
|
57
61
|
const { userAvatarMap } = useUserAvatarMap();
|
|
58
62
|
const isGbDevice = computed(
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ref, computed, nextTick } from 'vue';
|
|
2
2
|
import { ElMessage } from 'element-plus';
|
|
3
|
+
import 'dayjs';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import '../../../utils/index.mjs';
|
|
6
|
+
import '../../index.mjs';
|
|
3
7
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
4
8
|
import { useVideoPlayerConfig } from '../../../hooks/useVideoPlayerConfig.mjs';
|
|
5
9
|
import { formatDuration } from '../../../utils/date.mjs';
|
|
10
|
+
import { isSupportH265 } from '../../../utils/is.mjs';
|
|
6
11
|
import { HyConfirmDialog } from '../../hyConfirmDialog/index.mjs';
|
|
7
12
|
import { copyText } from '../../../utils/handler.mjs';
|
|
8
|
-
import { isSupportH265 } from '../../../utils/is.mjs';
|
|
9
13
|
|
|
10
14
|
const useVideoPlayer = (hy) => {
|
|
11
15
|
const { props, emits, videoRef, videoWrapperRef } = hy;
|
|
@@ -277,7 +281,8 @@ const useVideoPlayer = (hy) => {
|
|
|
277
281
|
}
|
|
278
282
|
function fullscreenchangeHandler(e) {
|
|
279
283
|
videoWrapperRef.value.style.setProperty("transition", "none");
|
|
280
|
-
if (document.fullscreenElement)
|
|
284
|
+
if (document.fullscreenElement) {
|
|
285
|
+
} else {
|
|
281
286
|
isFullScreen.value = false;
|
|
282
287
|
}
|
|
283
288
|
setTimeout(() => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineComponent, useTemplateRef, computed, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createVNode, createElementVNode, toDisplayString, Fragment, createBlock, withCtx, createTextVNode, normalizeStyle, withDirectives, isRef, vModelText, renderList, renderSlot } from 'vue';
|
|
2
2
|
import { ElPopover, ElSlider } from 'element-plus';
|
|
3
|
+
import '../../hooks/index.mjs';
|
|
4
|
+
import '../../utils/index.mjs';
|
|
5
|
+
import '../index.mjs';
|
|
3
6
|
import _sfc_main$1 from './cpns/mediaLoading.vue.mjs';
|
|
4
7
|
import { useVideoPlayer, useVideoResize } from './js/index.mjs';
|
|
5
8
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
package/es/components/index.mjs
CHANGED
|
@@ -25,6 +25,7 @@ export { HyTableActionButton } from './hyTableActionButton/index.mjs';
|
|
|
25
25
|
export { HyBatchUploadDialog } from './hyBatchUploadDialog/index.mjs';
|
|
26
26
|
export { HyMap } from './hyMap/index.mjs';
|
|
27
27
|
export { HyRadioGroup } from './hyRadioGroup/index.mjs';
|
|
28
|
+
export { ElLoading, ElLoading as HyLoading } from './hyLoading/index.mjs';
|
|
28
29
|
export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
|
|
29
30
|
export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
|
|
30
31
|
export { useAppTable } from './hyTable/js/useAppTable.mjs';
|
package/es/hooks/index.mjs
CHANGED
|
@@ -11,3 +11,4 @@ export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './useVideoPlaye
|
|
|
11
11
|
export { localEnsureHyIconMapKey, useEnsureHyIcon } from './useEnsureHyIcon.mjs';
|
|
12
12
|
export { localTooltipConfigKey, useTooltipConfig } from './useTooltipConfig.mjs';
|
|
13
13
|
export { usePublish, useSubscribe } from './useSubscribe.mjs';
|
|
14
|
+
export { localMapConfigKey, useMapConfig } from './useMapConfig.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance, inject,
|
|
1
|
+
import { ref, getCurrentInstance, inject, computed, provide, unref } from 'vue';
|
|
2
2
|
import * as index from '../locale/index.mjs';
|
|
3
3
|
import { localeContextKey } from './useLocale.mjs';
|
|
4
4
|
import { localApiKey } from './useApi.mjs';
|
|
@@ -8,6 +8,7 @@ import { localAudioPlayerConfigKey } from './useAudioPlayerConfig.mjs';
|
|
|
8
8
|
import { localVideoPlayerConfigKey } from './useVideoPlayerConfig.mjs';
|
|
9
9
|
import { localEnsureHyIconMapKey } from './useEnsureHyIcon.mjs';
|
|
10
10
|
import { localTooltipConfigKey } from './useTooltipConfig.mjs';
|
|
11
|
+
import { localMapConfigKey } from './useMapConfig.mjs';
|
|
11
12
|
import zh_CN from '../locale/zh_CN.mjs';
|
|
12
13
|
|
|
13
14
|
const globalConfig = ref();
|
|
@@ -77,6 +78,10 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
77
78
|
localTooltipConfigKey,
|
|
78
79
|
computed(() => context.value.tooltip)
|
|
79
80
|
);
|
|
81
|
+
provideFn(
|
|
82
|
+
localMapConfigKey,
|
|
83
|
+
computed(() => context.value.mapConfig)
|
|
84
|
+
);
|
|
80
85
|
if (global || !globalConfig.value) {
|
|
81
86
|
globalConfig.value = context.value;
|
|
82
87
|
}
|
package/es/hooks/useLocale.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { unref, computed, isRef, ref, getCurrentInstance, inject } from 'vue';
|
|
2
2
|
import { get } from 'lodash-unified';
|
|
3
|
+
import './index.mjs';
|
|
4
|
+
import '../utils/index.mjs';
|
|
3
5
|
import * as index from '../locale/index.mjs';
|
|
4
|
-
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
5
6
|
import { isEmpty } from '../utils/is.mjs';
|
|
6
7
|
import zh_CN from '../locale/zh_CN.mjs';
|
|
8
|
+
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
7
9
|
|
|
8
10
|
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
9
11
|
const translate = (path, option, locale) => get(locale, path, path).replace(
|