hy-dispatch-ui-v3 0.2.59 → 0.2.61
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 +131 -6
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyMenu/menu.vue.mjs +38 -23
- package/es/components/hyMenu/style/menu.scss +3 -1
- package/es/components/hyOrgCascader/js/index.mjs +2 -2
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/hyVideoPlayer/js/index.mjs +0 -1
- package/es/components/index.mjs +1 -0
- package/es/hooks/useApi.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +1 -1
- package/es/index.mjs +4 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/handler.mjs +5 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/utils/tree.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyMenu/menu.vue.js +37 -22
- package/lib/components/hyMenu/style/menu.scss +3 -1
- package/lib/components/hyOrgCascader/js/index.js +2 -2
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/hyVideoPlayer/js/index.js +0 -1
- package/lib/components/index.js +14 -12
- package/lib/hooks/useApi.js +2 -2
- package/lib/index.js +61 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/handler.js +5 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/utils/tree.js +10 -0
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -142,6 +142,41 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
142
142
|
checkStrictly: {
|
|
143
143
|
type: Boolean,
|
|
144
144
|
default: false
|
|
145
|
+
},
|
|
146
|
+
// 单选时可以取消选中
|
|
147
|
+
cancelable: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: true
|
|
150
|
+
},
|
|
151
|
+
// 是否显示多选框或单选框
|
|
152
|
+
showSelectBox: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
default: true
|
|
155
|
+
},
|
|
156
|
+
// 是否在点击节点的时候展开或者收缩节点
|
|
157
|
+
expandOnClickNode: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: true
|
|
160
|
+
},
|
|
161
|
+
// 是否在点击节点的时候选中节点
|
|
162
|
+
checkOnClickNode: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: false
|
|
165
|
+
},
|
|
166
|
+
// 点击叶节点(最后一个子节点)时是否检查或取消节点
|
|
167
|
+
checkOnClickLeaf: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: true
|
|
170
|
+
},
|
|
171
|
+
// 双击父节点会触发选中功能
|
|
172
|
+
checkOnDblclickParentNode: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: true
|
|
175
|
+
},
|
|
176
|
+
// 初始化过滤数据
|
|
177
|
+
filterConfig: {
|
|
178
|
+
type: Array,
|
|
179
|
+
default: () => []
|
|
145
180
|
}
|
|
146
181
|
},
|
|
147
182
|
emits: [
|
|
@@ -306,7 +341,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
306
341
|
/* STABLE */
|
|
307
342
|
}, 8, ["content"])
|
|
308
343
|
])) : createCommentVNode("v-if", true),
|
|
309
|
-
renderSlot(_ctx.$slots, "input-bottom
|
|
344
|
+
renderSlot(_ctx.$slots, "input-bottom"),
|
|
310
345
|
withDirectives(createElementVNode(
|
|
311
346
|
"div",
|
|
312
347
|
{
|
package/es/components/index.mjs
CHANGED
|
@@ -24,6 +24,7 @@ export { HyBatchTableForm, HyTableForm } from './hyTableForm/index.mjs';
|
|
|
24
24
|
export { HyTableActionButton } from './hyTableActionButton/index.mjs';
|
|
25
25
|
export { HyBatchUploadDialog } from './hyBatchUploadDialog/index.mjs';
|
|
26
26
|
export { HyMap } from './hyMap/index.mjs';
|
|
27
|
+
export { HyRadioGroup } from './hyRadioGroup/index.mjs';
|
|
27
28
|
export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
|
|
28
29
|
export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
|
|
29
30
|
export { useAppTable } from './hyTable/js/useAppTable.mjs';
|
package/es/hooks/useApi.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Axios from 'axios';
|
|
2
2
|
import { ref, getCurrentInstance, inject, unref } from 'vue';
|
|
3
3
|
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
4
4
|
|
|
5
5
|
const localApiKey = /* @__PURE__ */ Symbol("localApiKey");
|
|
6
6
|
const defaultAxios = ref(
|
|
7
|
-
|
|
7
|
+
Axios.create({
|
|
8
8
|
baseURL: "/api/admin",
|
|
9
9
|
withCredentials: false,
|
|
10
10
|
timeout: 6e4
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getCurrentInstance, inject, ref, computed, unref, provide } 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';
|
package/es/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export { ElDatePicker, HyDatePicker } from './components/hyDatePicker/index.mjs'
|
|
|
3
3
|
export { ElInput, HyInput, HyInputSearch } from './components/hyInput/index.mjs';
|
|
4
4
|
export { ElTimePicker, HyTimePicker } from './components/hyTimePicker/index.mjs';
|
|
5
5
|
export { ElTooltip, HyTooltip } from './components/hyTooltip/index.mjs';
|
|
6
|
+
export { HyAddDepartmentType } from './bussiness/hyAddDepartmentType/index.mjs';
|
|
6
7
|
export { HyAudioPlayer } from './components/hyAudioPlayer/index.mjs';
|
|
7
8
|
export { HyBatchTableForm, HyTableForm } from './components/hyTableForm/index.mjs';
|
|
8
9
|
export { HyBatchUploadDialog } from './components/hyBatchUploadDialog/index.mjs';
|
|
@@ -19,6 +20,7 @@ export { HyMenu } from './components/hyMenu/index.mjs';
|
|
|
19
20
|
export { HyNoPermissions } from './components/hyNoPermissions/index.mjs';
|
|
20
21
|
export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
|
|
21
22
|
export { HyOrgCascader } from './components/hyOrgCascader/index.mjs';
|
|
23
|
+
export { HyRadioGroup } from './components/hyRadioGroup/index.mjs';
|
|
22
24
|
export { HySearch } from './components/hySearch/index.mjs';
|
|
23
25
|
export { HyTable } from './components/hyTable/index.mjs';
|
|
24
26
|
export { HyTableActionButton } from './components/hyTableActionButton/index.mjs';
|
|
@@ -31,7 +33,7 @@ export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/cryp
|
|
|
31
33
|
export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './utils/file.mjs';
|
|
32
34
|
export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
|
|
33
35
|
export { clearResizeObserver, useResizeObserver } from './hooks/useResizeObserver.mjs';
|
|
34
|
-
export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
|
|
36
|
+
export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
|
|
35
37
|
export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
|
|
36
38
|
export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
|
|
37
39
|
export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
|
|
@@ -47,6 +49,7 @@ export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './hooks/useVide
|
|
|
47
49
|
export { parseRem, pxTorem, remToPx, vwToPx } from './utils/adaptive.mjs';
|
|
48
50
|
export { resetAppFormValue, useAppForm } from './components/hyForm/js/useAppForm.mjs';
|
|
49
51
|
export { resetAppSearchValue, useAppSearch } from './components/hySearch/js/useAppSearch.mjs';
|
|
52
|
+
export { setGlobalTreeConfig } from 'hy-virtual-tree';
|
|
50
53
|
export { useAppTable } from './components/hyTable/js/useAppTable.mjs';
|
|
51
54
|
export { useAppTableForm } from './components/hyTableForm/js/useAppTableForm.mjs';
|
|
52
55
|
export { useMixins } from './hooks/useMixins.mjs';
|
package/es/locale/en.mjs
CHANGED
|
@@ -27,7 +27,8 @@ var en = {
|
|
|
27
27
|
wednesday: "Wednesday",
|
|
28
28
|
thursday: "Thursday",
|
|
29
29
|
friday: "Friday",
|
|
30
|
-
saturday: "Saturday"
|
|
30
|
+
saturday: "Saturday",
|
|
31
|
+
help: "Help"
|
|
31
32
|
},
|
|
32
33
|
form: {
|
|
33
34
|
department: "Department",
|
|
@@ -144,6 +145,21 @@ var en = {
|
|
|
144
145
|
endMonth: "End Month",
|
|
145
146
|
startYear: "Start Year",
|
|
146
147
|
endYear: "End Year"
|
|
148
|
+
},
|
|
149
|
+
departmentType: {
|
|
150
|
+
editDepartmentType: "Edit Department Type",
|
|
151
|
+
addDepartmentType: "Add Department Type",
|
|
152
|
+
departmentIcon: "Department Icon",
|
|
153
|
+
upload: "Upload",
|
|
154
|
+
pleaseUploadDepartmentTypeIcon: "Please Upload Department Type Icon",
|
|
155
|
+
iconSize44px: "Icon Size 44px",
|
|
156
|
+
ifNoIconUseTheDefaultIcon: "If No Icon, Use The Default Icon",
|
|
157
|
+
departmentTypeName: "Department Type Name",
|
|
158
|
+
pleaseEnterTheDepartmentTypeName: "Please Enter The Department Type Name",
|
|
159
|
+
imageUploadFailedLogoSizeWithin2M: "Image Upload Failed, Logo Size Within 2M",
|
|
160
|
+
editDeviceCover: "Edit Device Cover",
|
|
161
|
+
close: "Close",
|
|
162
|
+
save: "Save"
|
|
147
163
|
}
|
|
148
164
|
};
|
|
149
165
|
|
package/es/locale/zh_CN.mjs
CHANGED
|
@@ -27,7 +27,8 @@ var zh_CN = {
|
|
|
27
27
|
wednesday: "\u661F\u671F\u4E09",
|
|
28
28
|
thursday: "\u661F\u671F\u56DB",
|
|
29
29
|
friday: "\u661F\u671F\u4E94",
|
|
30
|
-
saturday: "\u661F\u671F\u516D"
|
|
30
|
+
saturday: "\u661F\u671F\u516D",
|
|
31
|
+
help: "\u5E2E\u52A9"
|
|
31
32
|
},
|
|
32
33
|
form: {
|
|
33
34
|
department: "\u6240\u5C5E\u90E8\u95E8",
|
|
@@ -140,6 +141,21 @@ var zh_CN = {
|
|
|
140
141
|
endMonth: "\u7ED3\u675F\u6708\u4EFD",
|
|
141
142
|
startYear: "\u5F00\u59CB\u5E74\u4EFD",
|
|
142
143
|
endYear: "\u7ED3\u675F\u5E74\u4EFD"
|
|
144
|
+
},
|
|
145
|
+
departmentType: {
|
|
146
|
+
editDepartmentType: "\u7F16\u8F91\u90E8\u95E8\u7C7B\u578B",
|
|
147
|
+
addDepartmentType: "\u6DFB\u52A0\u90E8\u95E8\u7C7B\u578B",
|
|
148
|
+
departmentIcon: "\u90E8\u95E8\u56FE\u6807",
|
|
149
|
+
upload: "\u4E0A \u4F20",
|
|
150
|
+
pleaseUploadDepartmentTypeIcon: "\u8BF7\u4E0A\u4F20\u90E8\u95E8\u7C7B\u578B\u56FE\u6807",
|
|
151
|
+
iconSize44px: "\u56FE\u6807\u5C3A\u5BF844px",
|
|
152
|
+
ifNoIconUseTheDefaultIcon: "\u82E5\u65E0\u56FE\u6807\u5219\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807",
|
|
153
|
+
departmentTypeName: "\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
|
|
154
|
+
pleaseEnterTheDepartmentTypeName: "\u8BF7\u8F93\u5165\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
|
|
155
|
+
imageUploadFailedLogoSizeWithin2M: "\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0Clogo\u5927\u5C0F2M\u4EE5\u5185\u3002",
|
|
156
|
+
editDeviceCover: "\u7F16\u8F91\u8BBE\u5907\u5C01\u9762",
|
|
157
|
+
close: "\u5173 \u95ED",
|
|
158
|
+
save: "\u4FDD \u5B58"
|
|
143
159
|
}
|
|
144
160
|
};
|
|
145
161
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'hy-icon-ops-linear-shouqi',
|
|
3
|
+
symbol: `<symbol id="hy-icon-ops-linear-shouqi" viewBox="0 0 16 16">
|
|
4
|
+
<g id="hy-icon-ops-linear-shouqi-导航/shouqi" stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
5
|
+
<path d="M1,2 C1.55228475,2 2,2.44771525 2,3 L2,13 C2,13.5522847 1.55228475,14 1,14 C0.44771525,14 0,13.5522847 0,13 L0,3 C0,2.44771525 0.44771525,2 1,2 Z M14.9962476,6.99721351 L7.22134415,6.99721351 L7.22134415,6.99721351 L10.3410325,3.80591026 C10.6688751,3.47054177 10.6627742,2.93290294 10.3274057,2.60506033 C10.3232766,2.6010239 10.3191065,2.59702968 10.3148959,2.59307831 C9.96535062,2.26505074 9.41645109,2.28110608 9.08667668,2.62900381 L4.65060824,7.30886388 C4.28556459,7.69396911 4.2848692,8.29714332 4.64902391,8.68308924 L9.01892515,13.3144877 C9.35293318,13.668483 9.91067004,13.6846858 10.2646653,13.3506778 C10.2790116,13.3371414 10.2928995,13.3231273 10.3063053,13.308659 C10.6624129,12.9243285 10.6464065,12.3259543 10.2702613,11.9612115 L7.22134415,9.00471827 L7.22134415,9.00471827 L14.9962476,9.00471827 C15.5506048,9.00471827 16,8.55532302 16,8.00096589 C16,7.44660876 15.5506048,6.99721351 14.9962476,6.99721351 Z" id="hy-icon-ops-linear-shouqi-收起" fill-rule="nonzero"></path>
|
|
6
|
+
</g>
|
|
7
|
+
</symbol>`,
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'hy-icon-ops-linear-zhankai',
|
|
3
|
+
symbol: `<symbol id="hy-icon-ops-linear-zhankai" viewBox="0 0 16 16">
|
|
4
|
+
<g id="hy-icon-ops-linear-zhankai-导航/zhankai" stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
5
|
+
<path d="M15,2 C15.5522847,2 16,2.44771525 16,3 L16,13 C16,13.5522847 15.5522847,14 15,14 C14.4477153,14 14,13.5522847 14,13 L14,3 C14,2.44771525 14.4477153,2 15,2 Z M1.00375238,6.99721351 L8.77865585,6.99721351 L8.77865585,6.99721351 L5.65896747,3.80591026 C5.33112486,3.47054177 5.33722579,2.93290294 5.67259429,2.60506033 C5.67672338,2.6010239 5.68089354,2.59702968 5.68510411,2.59307831 C6.03464938,2.26505074 6.58354891,2.28110608 6.91332332,2.62900381 L11.3493918,7.30886388 C11.7144354,7.69396911 11.7151308,8.29714332 11.3509761,8.68308924 L6.98107485,13.3144877 C6.64706682,13.668483 6.08932996,13.6846858 5.73533471,13.3506778 C5.72098837,13.3371414 5.70710053,13.3231273 5.69369467,13.308659 C5.33758707,12.9243285 5.35359349,12.3259543 5.72973868,11.9612115 L8.77865585,9.00471827 L8.77865585,9.00471827 L1.00375238,9.00471827 C0.449395248,9.00471827 0,8.55532302 0,8.00096589 C0,7.44660876 0.449395248,6.99721351 1.00375238,6.99721351 Z" id="hy-icon-ops-linear-zhankai-形状结合" fill-rule="nonzero"></path>
|
|
6
|
+
</g>
|
|
7
|
+
</symbol>`,
|
|
8
|
+
};
|
package/es/style/index.scss
CHANGED
|
@@ -90,3 +90,56 @@ video {
|
|
|
90
90
|
-ms-user-select: none; /*IE10*/
|
|
91
91
|
user-select: none;
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
.search_lightColor {
|
|
95
|
+
min-width: 254px;
|
|
96
|
+
line-height: 32px;
|
|
97
|
+
background: rgba(var(--hy-background), 1);
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
padding: 4px;
|
|
100
|
+
display: flex;
|
|
101
|
+
border: 1px solid rgba(var(--hy-border), 1);
|
|
102
|
+
transition: 0.3s;
|
|
103
|
+
position: relative;
|
|
104
|
+
z-index: 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.search_lightColor:focus,
|
|
108
|
+
.search_lightColor:hover {
|
|
109
|
+
border-color: rgba(var(--hy-theme), 1);
|
|
110
|
+
}
|
|
111
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper {
|
|
112
|
+
background: rgba(var(--hy-background), 1);
|
|
113
|
+
border-color: rgba(var(--hy-background), 1);
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
padding: 0 26px 0 10px;
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
color: rgba(var(--hy-main), 1);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
|
|
121
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
|
|
122
|
+
border-color: rgba(var(--hy-background), 1);
|
|
123
|
+
box-shadow: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.search_lightColor .searchBox:active {
|
|
127
|
+
opacity: 0.6;
|
|
128
|
+
}
|
|
129
|
+
.search_lightColor .searchBox {
|
|
130
|
+
width: 42px;
|
|
131
|
+
height: 32px;
|
|
132
|
+
background: rgba(var(--hy-background-3), 1);
|
|
133
|
+
border-radius: 8px;
|
|
134
|
+
line-height: 30px;
|
|
135
|
+
text-align: center;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
.search_lightColor .searchBox .svgBox {
|
|
142
|
+
width: 18px;
|
|
143
|
+
height: 18px;
|
|
144
|
+
vertical-align: middle;
|
|
145
|
+
}
|
package/es/style/theme.scss
CHANGED
|
@@ -20,59 +20,6 @@
|
|
|
20
20
|
--hy-border: 54, 93, 132;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.search_lightColor {
|
|
24
|
-
min-width: 254px;
|
|
25
|
-
line-height: 32px;
|
|
26
|
-
background: rgba(var(--hy-background), 1);
|
|
27
|
-
border-radius: 8px;
|
|
28
|
-
padding: 4px;
|
|
29
|
-
display: flex;
|
|
30
|
-
border: 1px solid rgba(var(--hy-border), 1);
|
|
31
|
-
transition: 0.3s;
|
|
32
|
-
position: relative;
|
|
33
|
-
z-index: 1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.search_lightColor:focus,
|
|
37
|
-
.search_lightColor:hover {
|
|
38
|
-
border-color: rgba(var(--hy-theme), 1);
|
|
39
|
-
}
|
|
40
|
-
.search_lightColor .hy-el-input .hy-el-input__wrapper {
|
|
41
|
-
background: rgba(var(--hy-background), 1);
|
|
42
|
-
border-color: rgba(var(--hy-background), 1);
|
|
43
|
-
box-shadow: none;
|
|
44
|
-
padding: 0 26px 0 10px;
|
|
45
|
-
font-size: 12px;
|
|
46
|
-
color: rgba(var(--hy-main), 1);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
|
|
50
|
-
.search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
|
|
51
|
-
border-color: rgba(var(--hy-background), 1);
|
|
52
|
-
box-shadow: none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.search_lightColor .searchBox:active {
|
|
56
|
-
opacity: 0.6;
|
|
57
|
-
}
|
|
58
|
-
.search_lightColor .searchBox {
|
|
59
|
-
width: 42px;
|
|
60
|
-
height: 32px;
|
|
61
|
-
background: rgba(var(--hy-background-3), 1);
|
|
62
|
-
border-radius: 8px;
|
|
63
|
-
line-height: 30px;
|
|
64
|
-
text-align: center;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
}
|
|
70
|
-
.search_lightColor .searchBox .svgBox {
|
|
71
|
-
width: 18px;
|
|
72
|
-
height: 18px;
|
|
73
|
-
vertical-align: middle;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
23
|
.deviceType-sos {
|
|
77
24
|
font-size: 14px;
|
|
78
25
|
font-weight: bold;
|
package/es/utils/form.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unref } from 'vue';
|
|
2
|
-
import { isString, isArray, isObject, isBoolean
|
|
2
|
+
import { isString, isArray, isEmpty, isFunction, isObject, isBoolean } from './is.mjs';
|
|
3
3
|
import { useLocale } from '../hooks/useLocale.mjs';
|
|
4
4
|
|
|
5
5
|
function getValueByProp(model, prop) {
|
|
@@ -50,9 +50,10 @@ function clearSpace(value, type = "between") {
|
|
|
50
50
|
}
|
|
51
51
|
return value;
|
|
52
52
|
}
|
|
53
|
-
const genRuleRequiredMsgHandler = (
|
|
53
|
+
const genRuleRequiredMsgHandler = (column, model) => {
|
|
54
54
|
const { t } = useLocale();
|
|
55
|
-
const { type, prop
|
|
55
|
+
const { type, prop } = column || {};
|
|
56
|
+
const label = columnLabelHandler(column, model);
|
|
56
57
|
if (!prop || !prop?.length) return "";
|
|
57
58
|
switch (type) {
|
|
58
59
|
case "input":
|
|
@@ -73,16 +74,64 @@ const requiredHandler = (column, model) => {
|
|
|
73
74
|
if (isFunction(required)) return required(column, model);
|
|
74
75
|
return false;
|
|
75
76
|
};
|
|
77
|
+
const ruleHandler = (column, model) => {
|
|
78
|
+
const rules = unref(column.rules);
|
|
79
|
+
if (isArray(rules)) return [...rules];
|
|
80
|
+
if (isObject(rules)) return [rules];
|
|
81
|
+
if (isFunction(rules)) {
|
|
82
|
+
return ruleHandler({ rules: rules(column, model) }, model);
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
};
|
|
76
86
|
const columnRuleHandler = (column, model) => {
|
|
77
|
-
|
|
78
|
-
rules = isArray(rules) ? [...rules] : isObject(rules) ? [rules] : [];
|
|
87
|
+
const rules = ruleHandler(column, model);
|
|
79
88
|
if (column.required) {
|
|
80
89
|
rules.unshift({
|
|
81
90
|
required: requiredHandler(column, model),
|
|
82
|
-
message: genRuleRequiredMsgHandler(column)
|
|
91
|
+
message: genRuleRequiredMsgHandler(column, model)
|
|
83
92
|
});
|
|
84
93
|
}
|
|
85
94
|
return rules;
|
|
86
95
|
};
|
|
96
|
+
const genColumnDefaultLabel = (column) => {
|
|
97
|
+
if (column.label) return unref(column.label);
|
|
98
|
+
const { t } = useLocale();
|
|
99
|
+
switch (column.type) {
|
|
100
|
+
// 部门级联选择框
|
|
101
|
+
case "org-cascader":
|
|
102
|
+
return t("form.department");
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const columnLabelHandler = (column, model) => {
|
|
106
|
+
const label = unref(column.label);
|
|
107
|
+
if (isEmpty(label)) return "";
|
|
108
|
+
if (isFunction(label)) {
|
|
109
|
+
return label(column, model);
|
|
110
|
+
}
|
|
111
|
+
return label;
|
|
112
|
+
};
|
|
113
|
+
function columnPlaceholderHandler(column, model) {
|
|
114
|
+
const { t } = useLocale();
|
|
115
|
+
const { type, attrs = {} } = column || {};
|
|
116
|
+
const label = columnLabelHandler(column, model);
|
|
117
|
+
let placeholder = attrs.placeholder;
|
|
118
|
+
switch (type) {
|
|
119
|
+
case "input":
|
|
120
|
+
case "input-number":
|
|
121
|
+
case "lat":
|
|
122
|
+
case "lon":
|
|
123
|
+
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
124
|
+
break;
|
|
125
|
+
case "select":
|
|
126
|
+
case "date-picker":
|
|
127
|
+
case "time-picker":
|
|
128
|
+
case "org-cascader":
|
|
129
|
+
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
placeholder = placeholder || label;
|
|
133
|
+
}
|
|
134
|
+
return placeholder;
|
|
135
|
+
}
|
|
87
136
|
|
|
88
|
-
export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp };
|
|
137
|
+
export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp };
|
package/es/utils/handler.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ElMessage } from 'element-plus';
|
|
1
2
|
import { isFunction, isVueProxy, isArray, isObject, isEmpty } from './is.mjs';
|
|
3
|
+
import { useLocale } from '../hooks/useLocale.mjs';
|
|
2
4
|
|
|
3
5
|
function funRunHandler(target, ...args) {
|
|
4
6
|
if (isFunction(target)) {
|
|
@@ -79,9 +81,11 @@ const withInstall = (comp, name) => {
|
|
|
79
81
|
return comp;
|
|
80
82
|
};
|
|
81
83
|
async function copyText(text) {
|
|
84
|
+
const { t } = useLocale();
|
|
82
85
|
if (navigator.clipboard) {
|
|
83
86
|
try {
|
|
84
87
|
await navigator.clipboard.writeText(text);
|
|
88
|
+
ElMessage.success(t("hy.copySuccessfully"));
|
|
85
89
|
return;
|
|
86
90
|
} catch {
|
|
87
91
|
}
|
|
@@ -93,6 +97,7 @@ async function copyText(text) {
|
|
|
93
97
|
input.select();
|
|
94
98
|
document.execCommand("copy");
|
|
95
99
|
document.body.removeChild(input);
|
|
100
|
+
ElMessage.success(t("hy.copySuccessfully"));
|
|
96
101
|
} catch (err) {
|
|
97
102
|
console.error(err);
|
|
98
103
|
return Promise.reject();
|
package/es/utils/index.mjs
CHANGED
|
@@ -4,7 +4,8 @@ export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isOb
|
|
|
4
4
|
export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './handler.mjs';
|
|
5
5
|
export { formatDuration, getDefaultValueFormatByType } from './date.mjs';
|
|
6
6
|
export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './file.mjs';
|
|
7
|
-
export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './form.mjs';
|
|
7
|
+
export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './form.mjs';
|
|
8
8
|
export { enterNumbersRrLetters, enterTheMumber, filterSpaces, formatNumber, formatTimeFn, getPublicFileSize, inputForbidden, keepTwoDecimalPlaces, onlyNumber } from './input.mjs';
|
|
9
9
|
export { PERMISSION } from './permission.mjs';
|
|
10
10
|
export { InitMap, setMapServer, setPoiServer } from './map/index.mjs';
|
|
11
|
+
export { setGlobalTreeConfig } from 'hy-virtual-tree';
|
|
@@ -264,6 +264,10 @@ class bigMap extends EventEmitter {
|
|
|
264
264
|
const center2 = target.getCenter();
|
|
265
265
|
return latAndLngCheckExport(center2);
|
|
266
266
|
},
|
|
267
|
+
// 自适应地图容器大小
|
|
268
|
+
invalidateSize: function(target) {
|
|
269
|
+
return target.invalidateSize();
|
|
270
|
+
},
|
|
267
271
|
// 四个角
|
|
268
272
|
getBounds: function(target) {
|
|
269
273
|
const bounds = target.getBounds();
|
|
@@ -166,6 +166,9 @@ class Google extends EventEmitter {
|
|
|
166
166
|
getCenter: function(target) {
|
|
167
167
|
return target.getCenter();
|
|
168
168
|
},
|
|
169
|
+
invalidateSize: function(target) {
|
|
170
|
+
return null;
|
|
171
|
+
},
|
|
169
172
|
fitBounds: function(target, params) {
|
|
170
173
|
if (!Array.isArray(params)) {
|
|
171
174
|
params = [params];
|
|
@@ -345,6 +345,10 @@ class Leafletjs extends EventEmitter {
|
|
|
345
345
|
const { lng: lng2, lat: lat2 } = latAndLngCheckExport(center2);
|
|
346
346
|
return L.latLng(lat2, lng2);
|
|
347
347
|
},
|
|
348
|
+
// 自适应地图容器大小
|
|
349
|
+
invalidateSize: function(target) {
|
|
350
|
+
return target.invalidateSize();
|
|
351
|
+
},
|
|
348
352
|
// 四个角
|
|
349
353
|
getBounds: function(target) {
|
|
350
354
|
const bounds = target.getBounds();
|
|
@@ -403,24 +407,20 @@ class Leafletjs extends EventEmitter {
|
|
|
403
407
|
return map;
|
|
404
408
|
}
|
|
405
409
|
// 设置地图瓦片地址
|
|
406
|
-
setLayersUrl(map) {
|
|
410
|
+
setLayersUrl(map, changeColorType = true) {
|
|
407
411
|
const layersUrlList = this.initParams.layersUrlList || [];
|
|
408
412
|
const layersIndex = this.initParams.layersIndex || 0;
|
|
409
|
-
const
|
|
410
|
-
if (!
|
|
413
|
+
const layersUrls = layersUrlList[layersIndex];
|
|
414
|
+
if (!layersUrls) {
|
|
411
415
|
return;
|
|
412
416
|
}
|
|
413
417
|
const { mapServerType } = this.initParams;
|
|
414
418
|
if (mapServerType === "WMTS" || mapServerType === "Dynamic") {
|
|
415
|
-
return this.createLayers(map,
|
|
419
|
+
return this.createLayers(map, layersUrls);
|
|
416
420
|
}
|
|
417
|
-
const { layersUrls = "", filter, key } = layersOption;
|
|
418
421
|
layersUrls.split(",").forEach((layersUrl) => {
|
|
419
|
-
if (
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
if (filter) {
|
|
423
|
-
this.createCustomLayers(map, layersUrl, { filter });
|
|
422
|
+
if (changeColorType) {
|
|
423
|
+
this.createCustomLayers(map, layersUrl);
|
|
424
424
|
} else {
|
|
425
425
|
this.createLayers(map, layersUrl);
|
|
426
426
|
}
|
package/es/utils/map/index.mjs
CHANGED
|
@@ -2,7 +2,8 @@ import Google from './hook/gaode.mjs';
|
|
|
2
2
|
import Leafletjs from './hook/leafletjs.mjs';
|
|
3
3
|
import bigMap from './hook/bigMap.mjs';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import hyCommon from 'hy-common';
|
|
5
|
+
import hyCommon, { Common } from 'hy-common';
|
|
6
|
+
import { useApi } from '../../hooks/useApi.mjs';
|
|
6
7
|
|
|
7
8
|
const scriptPromises = new globalThis.Map();
|
|
8
9
|
const mapServerPromises = new globalThis.Map();
|
|
@@ -51,17 +52,17 @@ function setMapServer(mapType, mapConfig = {}) {
|
|
|
51
52
|
if (mapType === "gaode" && window.AMap?.Map) {
|
|
52
53
|
return Promise.resolve();
|
|
53
54
|
}
|
|
54
|
-
if (mapType === "
|
|
55
|
+
if (mapType === "bigmap" && window.BM) {
|
|
55
56
|
return Promise.resolve();
|
|
56
57
|
}
|
|
57
|
-
if (mapType !== "gaode" && mapType !== "
|
|
58
|
+
if (mapType !== "gaode" && mapType !== "bigmap") {
|
|
58
59
|
return Promise.resolve();
|
|
59
60
|
}
|
|
60
61
|
if (mapServerPromises.has(mapType)) {
|
|
61
62
|
return mapServerPromises.get(mapType);
|
|
62
63
|
}
|
|
63
64
|
const promise = (async () => {
|
|
64
|
-
if (mapType === "
|
|
65
|
+
if (mapType === "bigmap") {
|
|
65
66
|
const staticBaseUrl = mapConfig.staticBaseUrl;
|
|
66
67
|
await loadScript(staticUrl("bigemap.js", staticBaseUrl));
|
|
67
68
|
await Promise.all([
|
|
@@ -106,6 +107,8 @@ function setPoiServer(mapConfig) {
|
|
|
106
107
|
projectCoordinate: data.projectPoiCoordinate,
|
|
107
108
|
mapSk: data.mapSk
|
|
108
109
|
};
|
|
110
|
+
const { api } = useApi();
|
|
111
|
+
Common.setAxios(api.value);
|
|
109
112
|
return new hyCommon.Map({
|
|
110
113
|
poiServer
|
|
111
114
|
});
|
|
@@ -163,6 +166,22 @@ class InitMap extends EventEmitter {
|
|
|
163
166
|
}
|
|
164
167
|
// 初始化地图
|
|
165
168
|
NewMap(params = {}) {
|
|
169
|
+
const leftletjsObj = {};
|
|
170
|
+
if (params.mapType === "leafletjs") {
|
|
171
|
+
const { layersServer, layersUrl, mapKey, mapServerType } = params;
|
|
172
|
+
if (layersUrl && mapServerType !== "WMTS") {
|
|
173
|
+
const layersUrlList = (layersUrl || "").split(",").filter(Boolean);
|
|
174
|
+
leftletjsObj.layersUrlList = layersUrlList.map((url) => {
|
|
175
|
+
const index = url.indexOf("{mapKey}");
|
|
176
|
+
if (index !== -1) {
|
|
177
|
+
return url.replace("{mapKey}", mapKey);
|
|
178
|
+
}
|
|
179
|
+
return url;
|
|
180
|
+
});
|
|
181
|
+
} else {
|
|
182
|
+
leftletjsObj.layersUrlList = params.mapServerList;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
166
185
|
params = {
|
|
167
186
|
mapType: "gaode",
|
|
168
187
|
// 地图类型
|
|
@@ -181,13 +200,14 @@ class InitMap extends EventEmitter {
|
|
|
181
200
|
// 地图瓦片地址
|
|
182
201
|
zoomOffset: params.zoomOffset || 0,
|
|
183
202
|
// 缩放偏移量
|
|
184
|
-
...params
|
|
203
|
+
...params,
|
|
204
|
+
...leftletjsObj
|
|
185
205
|
};
|
|
186
206
|
if (params.mapType === "gaode") {
|
|
187
207
|
this.map = new Google(params);
|
|
188
|
-
} else if (params.mapType === "
|
|
208
|
+
} else if (params.mapType === "leafletjs") {
|
|
189
209
|
this.map = new Leafletjs(params);
|
|
190
|
-
} else if (params.mapType === "
|
|
210
|
+
} else if (params.mapType === "bigmap") {
|
|
191
211
|
this.map = new bigMap(params);
|
|
192
212
|
}
|
|
193
213
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setGlobalTreeConfig } from 'hy-virtual-tree';
|
package/es/version.mjs
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _export_sfc = (sfc, props) => {
|
|
6
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
target[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.default = _export_sfc;
|