hy-dispatch-ui-v3 0.2.66 → 0.2.68
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 +257 -21
- package/es/api/device.mjs +2 -3
- package/es/api/exportExcel.mjs +57 -0
- package/es/api/index.mjs +27 -16
- package/es/api/mapRail.mjs +31 -0
- package/es/api/organization.mjs +17 -9
- package/es/api/rule.mjs +30 -0
- package/es/api/sypct.mjs +2 -3
- package/es/api/task.mjs +2 -3
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
- package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +169 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +318 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +123 -0
- package/es/bussiness/hyElectronicFence/electronicFence.vue.mjs +358 -0
- package/es/bussiness/hyElectronicFence/index.mjs +13 -0
- package/es/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
- package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
- package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
- package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
- package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
- package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
- package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
- package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/index.mjs +15 -0
- package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
- package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
- package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
- package/es/components/hyAudioPlayer/js/index.mjs +9 -14
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
- package/es/components/hyButton/button.vue.mjs +18 -5
- package/es/components/hyButton/style/button.scss +50 -74
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
- package/es/components/hyCheckboxGroup/index.mjs +7 -0
- package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
- package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
- package/es/components/hyCutter/cutter.vue.mjs +9 -23
- package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
- package/es/components/hyDialog/dialog.vue.mjs +5 -9
- package/es/components/hyDialog/style/dialog.scss +12 -13
- package/es/components/hyDrawer/drawer.vue.mjs +100 -0
- package/es/components/hyDrawer/index.mjs +7 -0
- package/es/components/hyDrawer/style/drawer.scss +0 -0
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
- package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
- package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
- package/es/components/hyForm/cpns/formItem.vue.mjs +149 -69
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +74 -28
- package/es/components/hyForm/js/index.mjs +4 -8
- package/es/components/hyForm/js/useAppForm.mjs +4 -9
- package/es/components/hyForm/style/form.scss +4 -13
- package/es/components/hyIcon/icon.vue.mjs +3 -3
- package/es/components/hyIconBox/style/iconBox.scss +2 -6
- package/es/components/hyInput/inputSearch.vue.mjs +8 -11
- package/es/components/hyInput/style/inputSearch.scss +3 -0
- package/es/components/hyLoading/index.mjs +3 -5
- package/es/components/hyMap/js/index.mjs +35 -10
- package/es/components/hyMap/map.vue.mjs +30 -6
- package/es/components/hyMenu/style/menu.scss +5 -15
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
- package/es/components/hyOrgCascader/js/index.mjs +1 -5
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +31 -12
- package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
- package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +409 -324
- package/es/components/hySearch/js/index.mjs +1 -4
- package/es/components/hySearch/js/useAppSearch.mjs +5 -10
- package/es/components/hySearch/search.vue.mjs +23 -20
- package/es/components/hySearch/style/search.scss +9 -0
- package/es/components/hyStatus/index.mjs +7 -0
- package/es/components/hyStatus/status.vue.mjs +110 -0
- package/es/components/hyStatus/style/status.scss +0 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
- package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +43 -34
- package/es/components/hyTable/js/index.mjs +67 -64
- package/es/components/hyTable/js/search.mjs +25 -1
- package/es/components/hyTable/js/useAppTable.mjs +3 -4
- package/es/components/hyTable/style/table.scss +8 -0
- package/es/components/hyTable/table.vue.mjs +68 -53
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +13 -6
- package/es/components/hyTableForm/batchTableForm.vue.mjs +26 -9
- package/es/components/hyTableForm/js/index.mjs +2 -8
- package/es/components/hyTableForm/js/useAppTableForm.mjs +3 -8
- package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/es/components/hyTableForm/style/tableForm.scss +3 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +160 -70
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +113 -72
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +21 -18
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
- package/es/components/hyVideoPlayer/js/index.mjs +14 -23
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
- package/es/components/index.mjs +3 -0
- package/es/hooks/index.mjs +6 -2
- package/es/hooks/useAudioPlayerConfig.mjs +1 -3
- package/es/hooks/useBaseMainStore.mjs +29 -0
- package/es/hooks/useCurrentBus.mjs +20 -0
- package/es/hooks/useDialog.mjs +327 -0
- package/es/hooks/useExportFile.mjs +133 -0
- package/es/hooks/useGlobalConfig.mjs +10 -6
- package/es/hooks/useLocale.mjs +22 -12
- package/es/hooks/usePermissionMap.mjs +1 -3
- package/es/hooks/useResizeHandler.mjs +1 -4
- package/es/hooks/useResizeObserver.mjs +3 -1
- package/es/hooks/useSubscribe.mjs +2 -2
- package/es/hooks/useUserAvatarMap.mjs +1 -3
- package/es/hooks/useVideoPlayerConfig.mjs +1 -3
- package/es/index.mjs +11 -2
- package/es/locale/{en.mjs → en_US.mjs} +79 -4
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +79 -2
- package/es/style/index.scss +0 -1
- package/es/style/tailwind.scss +7 -4
- package/es/utils/adaptive.mjs +1 -3
- package/es/utils/form.mjs +7 -10
- package/es/utils/handler.mjs +4 -8
- package/es/utils/input.mjs +8 -9
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +16 -53
- package/es/utils/map/hook/gaode.mjs +53 -33
- package/es/utils/map/hook/leafletjs.mjs +38 -82
- package/es/utils/map/index.mjs +3 -9
- package/es/utils/map/js/webgis.mjs +12 -12
- package/es/version.mjs +1 -1
- package/lib/api/device.js +2 -3
- package/lib/api/exportExcel.js +62 -0
- package/lib/api/index.js +27 -16
- package/lib/api/mapRail.js +34 -0
- package/lib/api/organization.js +17 -8
- package/lib/api/rule.js +33 -0
- package/lib/api/sypct.js +2 -3
- package/lib/api/task.js +2 -3
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
- package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +173 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +322 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +127 -0
- package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
- package/lib/bussiness/hyElectronicFence/index.js +21 -0
- package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
- package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
- package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
- package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
- package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
- package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/index.js +24 -0
- package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
- package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
- package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/lib/bussiness/index.js +21 -10
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
- package/lib/components/hyAudioPlayer/js/index.js +9 -14
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
- package/lib/components/hyButton/button.vue.js +17 -4
- package/lib/components/hyButton/style/button.scss +50 -74
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
- package/lib/components/hyCheckboxGroup/index.js +12 -0
- package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
- package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
- package/lib/components/hyCutter/cutter.vue.js +8 -22
- package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
- package/lib/components/hyDialog/dialog.vue.js +5 -9
- package/lib/components/hyDialog/style/dialog.scss +12 -13
- package/lib/components/hyDrawer/drawer.vue.js +104 -0
- package/lib/components/hyDrawer/index.js +12 -0
- package/lib/components/hyDrawer/style/drawer.scss +0 -0
- package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
- package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
- package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
- package/lib/components/hyForm/cpns/formItem.vue.js +148 -68
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +69 -23
- package/lib/components/hyForm/js/index.js +3 -7
- package/lib/components/hyForm/js/useAppForm.js +4 -9
- package/lib/components/hyForm/style/form.scss +4 -13
- package/lib/components/hyIcon/icon.vue.js +3 -3
- package/lib/components/hyIconBox/style/iconBox.scss +2 -6
- package/lib/components/hyInput/inputSearch.vue.js +7 -10
- package/lib/components/hyInput/style/inputSearch.scss +3 -0
- package/lib/components/hyLoading/index.js +2 -4
- package/lib/components/hyMap/js/index.js +34 -9
- package/lib/components/hyMap/map.vue.js +29 -5
- package/lib/components/hyMenu/style/menu.scss +5 -15
- package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
- package/lib/components/hyOrgCascader/js/index.js +1 -5
- package/lib/components/hyOrgCascader/orgCascader.vue.js +29 -10
- package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
- package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +407 -322
- package/lib/components/hySearch/js/index.js +1 -4
- package/lib/components/hySearch/js/useAppSearch.js +5 -10
- package/lib/components/hySearch/search.vue.js +23 -20
- package/lib/components/hySearch/style/search.scss +9 -0
- package/lib/components/hyStatus/index.js +12 -0
- package/lib/components/hyStatus/status.vue.js +114 -0
- package/lib/components/hyStatus/style/status.scss +0 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
- package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
- package/lib/components/hyTable/cpns/virtualTable.vue.js +41 -32
- package/lib/components/hyTable/js/index.js +65 -61
- package/lib/components/hyTable/js/search.js +25 -1
- package/lib/components/hyTable/js/useAppTable.js +2 -3
- package/lib/components/hyTable/style/table.scss +8 -0
- package/lib/components/hyTable/table.vue.js +67 -52
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +13 -6
- package/lib/components/hyTableForm/batchTableForm.vue.js +26 -9
- package/lib/components/hyTableForm/js/index.js +2 -8
- package/lib/components/hyTableForm/js/useAppTableForm.js +3 -8
- package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/lib/components/hyTableForm/style/tableForm.scss +3 -2
- package/lib/components/hyTableForm/tableForm.vue.js +159 -69
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +113 -72
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +21 -18
- package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
- package/lib/components/hyVideoPlayer/js/index.js +14 -23
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
- package/lib/components/index.js +46 -40
- package/lib/hooks/index.js +17 -0
- package/lib/hooks/useAudioPlayerConfig.js +1 -3
- package/lib/hooks/useBaseMainStore.js +32 -0
- package/lib/hooks/useCurrentBus.js +23 -0
- package/lib/hooks/useDialog.js +331 -0
- package/lib/hooks/useExportFile.js +135 -0
- package/lib/hooks/useGlobalConfig.js +10 -6
- package/lib/hooks/useLocale.js +25 -11
- package/lib/hooks/usePermissionMap.js +1 -3
- package/lib/hooks/useResizeHandler.js +1 -4
- package/lib/hooks/useResizeObserver.js +3 -1
- package/lib/hooks/useSubscribe.js +2 -1
- package/lib/hooks/useUserAvatarMap.js +1 -3
- package/lib/hooks/useVideoPlayerConfig.js +1 -3
- package/lib/index.js +107 -73
- package/lib/locale/{en.js → en_US.js} +79 -4
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +79 -2
- package/lib/style/index.scss +0 -1
- package/lib/style/tailwind.scss +7 -4
- package/lib/utils/adaptive.js +1 -3
- package/lib/utils/form.js +6 -9
- package/lib/utils/handler.js +3 -7
- package/lib/utils/input.js +7 -8
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +16 -53
- package/lib/utils/map/hook/gaode.js +53 -33
- package/lib/utils/map/hook/leafletjs.js +38 -82
- package/lib/utils/map/index.js +3 -9
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useModel, computed, ref, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, renderList, normalizeStyle, withModifiers, normalizeClass, createVNode, mergeProps, createTextVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
1
|
+
import { useModel, useTemplateRef, computed, ref, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, renderList, normalizeStyle, withModifiers, normalizeClass, createVNode, mergeProps, createTextVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
2
2
|
import { ElTableV2, ElCheckbox, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem } from 'element-plus';
|
|
3
3
|
import { MoreFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import '../../index.mjs';
|
|
5
5
|
import '../../../hooks/index.mjs';
|
|
6
6
|
import '../../../utils/index.mjs';
|
|
7
|
-
import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from '../js/index.mjs';
|
|
7
|
+
import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from '../js/index.mjs';
|
|
8
8
|
import _sfc_main$1 from './headerItem.vue.mjs';
|
|
9
|
-
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
10
9
|
import { isNumber, isString, isFunction, isArray, isBoolean, isEmpty } from '../../../utils/is.mjs';
|
|
11
10
|
import { HyIcon } from '../../hyIcon/index.mjs';
|
|
12
11
|
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
12
|
+
import { $t } from '../../../hooks/useLocale.mjs';
|
|
13
13
|
|
|
14
14
|
const _sfc_main = {
|
|
15
15
|
__name: "virtualTable",
|
|
@@ -79,7 +79,7 @@ const _sfc_main = {
|
|
|
79
79
|
const props = __props;
|
|
80
80
|
const emits = __emit;
|
|
81
81
|
const expandedRowKeys = useModel(__props, "expandedRowKeys");
|
|
82
|
-
const
|
|
82
|
+
const tableRef = useTemplateRef("tableRef");
|
|
83
83
|
const avgWidth = computed(() => {
|
|
84
84
|
const { total, totalWidth } = props.columns.reduce(
|
|
85
85
|
({ total: total2, totalWidth: totalWidth2 }, column) => {
|
|
@@ -277,12 +277,21 @@ const _sfc_main = {
|
|
|
277
277
|
isAllChecked.value = false;
|
|
278
278
|
selectedMap.value.clear();
|
|
279
279
|
indeterminateKeys.value.clear();
|
|
280
|
+
},
|
|
281
|
+
scrollToTop(top) {
|
|
282
|
+
tableRef.value.scrollToTop(top);
|
|
283
|
+
},
|
|
284
|
+
scrollToLeft(left) {
|
|
285
|
+
tableRef.value.scrollToLeft(left);
|
|
280
286
|
}
|
|
281
287
|
});
|
|
282
288
|
return (_ctx, _cache) => {
|
|
283
289
|
return openBlock(), createBlock(unref(ElTableV2), {
|
|
290
|
+
ref_key: "tableRef",
|
|
291
|
+
ref: tableRef,
|
|
284
292
|
"expanded-row-keys": expandedRowKeys.value,
|
|
285
293
|
"onUpdate:expandedRowKeys": ($event) => expandedRowKeys.value = $event,
|
|
294
|
+
cache: 0,
|
|
286
295
|
"row-key": __props.rowKey,
|
|
287
296
|
data: dataSource.value,
|
|
288
297
|
columns: tableColumns.value,
|
|
@@ -421,11 +430,7 @@ const _sfc_main = {
|
|
|
421
430
|
(openBlock(true), createElementBlock(
|
|
422
431
|
Fragment,
|
|
423
432
|
null,
|
|
424
|
-
renderList(unref(operatorFilterHandler)(
|
|
425
|
-
column,
|
|
426
|
-
{ column, row, $index, cellIndex },
|
|
427
|
-
"default"
|
|
428
|
-
), (citem, cindex) => {
|
|
433
|
+
renderList(unref(operatorFilterHandler)(column, { column, row, $index, cellIndex }, "default"), (citem, cindex) => {
|
|
429
434
|
return openBlock(), createBlock(unref(HyTooltip), {
|
|
430
435
|
key: cindex,
|
|
431
436
|
"is-always": "",
|
|
@@ -434,7 +439,7 @@ const _sfc_main = {
|
|
|
434
439
|
}, {
|
|
435
440
|
default: withCtx(() => [
|
|
436
441
|
createElementVNode("div", {
|
|
437
|
-
class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border", [
|
|
442
|
+
class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border relative", [
|
|
438
443
|
citem.className,
|
|
439
444
|
unref(operatorDisabledHandler)(citem, {
|
|
440
445
|
column,
|
|
@@ -443,12 +448,7 @@ const _sfc_main = {
|
|
|
443
448
|
cellIndex
|
|
444
449
|
}) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
|
|
445
450
|
]]),
|
|
446
|
-
onClick: ($event) => unref(operatorClickHandler)(
|
|
447
|
-
cindex,
|
|
448
|
-
column,
|
|
449
|
-
{ column, row, $index, cellIndex },
|
|
450
|
-
"default"
|
|
451
|
-
)
|
|
451
|
+
onClick: ($event) => unref(operatorClickHandler)(cindex, column, { column, row, $index, cellIndex }, "default")
|
|
452
452
|
}, [
|
|
453
453
|
createVNode(unref(HyIcon), {
|
|
454
454
|
"svg-name": citem.svgName,
|
|
@@ -466,7 +466,16 @@ const _sfc_main = {
|
|
|
466
466
|
)) : (openBlock(), createElementBlock("div", {
|
|
467
467
|
key: 1,
|
|
468
468
|
class: "mt-1 whitespace-nowrap"
|
|
469
|
-
}, "\xA0"))
|
|
469
|
+
}, "\xA0")),
|
|
470
|
+
unref(operatorIsDotHandler)(citem, {
|
|
471
|
+
column,
|
|
472
|
+
row,
|
|
473
|
+
$index,
|
|
474
|
+
cellIndex
|
|
475
|
+
}) ? (openBlock(), createElementBlock("div", {
|
|
476
|
+
key: 2,
|
|
477
|
+
class: "w-2 h-2 absolute right-0 top-0 transform translate-x-1/2 -translate-y-1/2 rounded-full bg-danger-2 z-[2]"
|
|
478
|
+
})) : createCommentVNode("v-if", true)
|
|
470
479
|
], 10, ["onClick"])
|
|
471
480
|
]),
|
|
472
481
|
_: 2
|
|
@@ -476,23 +485,14 @@ const _sfc_main = {
|
|
|
476
485
|
128
|
|
477
486
|
/* KEYED_FRAGMENT */
|
|
478
487
|
)),
|
|
479
|
-
unref(operatorFilterHandler)(
|
|
480
|
-
column,
|
|
481
|
-
{ column, row, $index, cellIndex },
|
|
482
|
-
"more"
|
|
483
|
-
)?.length ? (openBlock(), createBlock(unref(ElDropdown), {
|
|
488
|
+
unref(operatorFilterHandler)(column, { column, row, $index, cellIndex }, "more")?.length ? (openBlock(), createBlock(unref(ElDropdown), {
|
|
484
489
|
key: 0,
|
|
485
490
|
ref_for: true,
|
|
486
491
|
ref: "operatorDropdownRef",
|
|
487
492
|
trigger: "click",
|
|
488
493
|
"popper-style": "min-width: 150px",
|
|
489
|
-
placement: "bottom",
|
|
490
|
-
onCommand: ($event) => unref(operatorClickHandler)(
|
|
491
|
-
$event,
|
|
492
|
-
column,
|
|
493
|
-
{ column, row, $index, cellIndex },
|
|
494
|
-
"more"
|
|
495
|
-
)
|
|
494
|
+
placement: "bottom-end",
|
|
495
|
+
onCommand: ($event) => unref(operatorClickHandler)($event, column, { column, row, $index, cellIndex }, "more")
|
|
496
496
|
}, {
|
|
497
497
|
dropdown: withCtx(() => [
|
|
498
498
|
createVNode(
|
|
@@ -519,10 +519,10 @@ const _sfc_main = {
|
|
|
519
519
|
})
|
|
520
520
|
}, {
|
|
521
521
|
default: withCtx(() => [
|
|
522
|
-
createElementVNode("span",
|
|
522
|
+
createElementVNode("span", { class: "relative" }, [
|
|
523
523
|
createElementVNode(
|
|
524
524
|
"span",
|
|
525
|
-
|
|
525
|
+
{ class: "pr-1" },
|
|
526
526
|
toDisplayString(citem.label),
|
|
527
527
|
1
|
|
528
528
|
/* TEXT */
|
|
@@ -546,7 +546,16 @@ const _sfc_main = {
|
|
|
546
546
|
})) + "\uFF09",
|
|
547
547
|
1
|
|
548
548
|
/* TEXT */
|
|
549
|
-
)) : createCommentVNode("v-if", true)
|
|
549
|
+
)) : createCommentVNode("v-if", true),
|
|
550
|
+
unref(operatorIsDotHandler)(citem, {
|
|
551
|
+
column,
|
|
552
|
+
row,
|
|
553
|
+
$index,
|
|
554
|
+
cellIndex
|
|
555
|
+
}) ? (openBlock(), createElementBlock("div", {
|
|
556
|
+
key: 1,
|
|
557
|
+
class: "w-2 h-2 absolute right-0 top-0 transform translate-x-1/2 -translate-y-1/2 rounded-full bg-danger-2 z-[2]"
|
|
558
|
+
})) : createCommentVNode("v-if", true)
|
|
550
559
|
])
|
|
551
560
|
]),
|
|
552
561
|
_: 2
|
|
@@ -569,7 +578,7 @@ const _sfc_main = {
|
|
|
569
578
|
createVNode(unref(HyTooltip), {
|
|
570
579
|
"is-always": "",
|
|
571
580
|
overLine: 1,
|
|
572
|
-
content: unref(t)("table.moreOperations")
|
|
581
|
+
content: unref($t)("table.moreOperations")
|
|
573
582
|
}, {
|
|
574
583
|
default: withCtx(() => [
|
|
575
584
|
createElementVNode("div", { class: "w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-main text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer" }, [
|
|
@@ -588,7 +597,7 @@ const _sfc_main = {
|
|
|
588
597
|
createElementVNode(
|
|
589
598
|
"div",
|
|
590
599
|
{ class: "mt-1" },
|
|
591
|
-
toDisplayString(unref(t)("table.more")),
|
|
600
|
+
toDisplayString(unref($t)("table.more")),
|
|
592
601
|
1
|
|
593
602
|
/* TEXT */
|
|
594
603
|
)
|
|
@@ -2,8 +2,8 @@ import { unref, ref, computed, watch, nextTick, watchEffect } from 'vue';
|
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import '../../index.mjs';
|
|
5
|
-
import { isPermission, isBoolean, isFunction, isNumber, isString, isArray } from '../../../utils/is.mjs';
|
|
6
|
-
import {
|
|
5
|
+
import { isPermission, isBoolean, isFunction, isNumber, isString, isArray, isSymbol } from '../../../utils/is.mjs';
|
|
6
|
+
import { $t } from '../../../hooks/useLocale.mjs';
|
|
7
7
|
import { ElLoading as HyLoading } from '../../hyLoading/index.mjs';
|
|
8
8
|
|
|
9
9
|
function tableColumnShowHandler(column) {
|
|
@@ -31,17 +31,14 @@ function tableColumnsEditableleHandler(columns, columnsEditablele) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
const sortList = Array.from(sortSet.values()).reduce((a, b) => a - b);
|
|
34
|
-
const columnsList = Object.keys(columnsEditableleObj).reduce(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
[]
|
|
44
|
-
);
|
|
34
|
+
const columnsList = Object.keys(columnsEditableleObj).reduce((columnsList2, key) => {
|
|
35
|
+
const list = columnsEditableleObj[key];
|
|
36
|
+
for (let i = 0; i < list.length; i++) {
|
|
37
|
+
const target = list[i];
|
|
38
|
+
columnsList2.push(target.column);
|
|
39
|
+
}
|
|
40
|
+
return columnsList2;
|
|
41
|
+
}, []);
|
|
45
42
|
return {
|
|
46
43
|
columnsList,
|
|
47
44
|
columnsEditablele
|
|
@@ -86,33 +83,28 @@ function operatorShowHandler(operator, scope) {
|
|
|
86
83
|
if (isFunction(show)) return show(scope);
|
|
87
84
|
return true;
|
|
88
85
|
}
|
|
89
|
-
function operatorDisabledHandler(
|
|
90
|
-
const { disabled } =
|
|
86
|
+
function operatorDisabledHandler(operator, scope) {
|
|
87
|
+
const { disabled } = operator;
|
|
91
88
|
if (isBoolean(disabled)) return disabled;
|
|
92
89
|
if (isFunction(disabled)) return disabled(scope);
|
|
93
90
|
return false;
|
|
94
91
|
}
|
|
95
|
-
function operatorDisableTextdHandler(
|
|
96
|
-
const {
|
|
97
|
-
const { disabledText } = column;
|
|
92
|
+
function operatorDisableTextdHandler(operator, scope) {
|
|
93
|
+
const { disabledText } = operator;
|
|
98
94
|
if (isString(disabledText)) return disabledText;
|
|
99
95
|
if (isFunction(disabledText)) return disabledText(scope);
|
|
100
|
-
return t("table.nonsupport");
|
|
96
|
+
return $t("table.nonsupport");
|
|
101
97
|
}
|
|
102
98
|
function operatorFilterHandler(column, scope, type = "all") {
|
|
103
99
|
let { width } = column;
|
|
104
100
|
width = isString(width) ? Number(width.replace(/[a-zA-Z]+/g, "")) : width;
|
|
105
|
-
const operator = (column.operator || []).filter(
|
|
106
|
-
(item) => operatorShowHandler(item, scope)
|
|
107
|
-
);
|
|
101
|
+
const operator = (column.operator || []).filter((item) => operatorShowHandler(item, scope));
|
|
108
102
|
if (type === "all" || operator.length <= 1 && type === "default") {
|
|
109
103
|
return operator;
|
|
110
104
|
}
|
|
111
105
|
const btnWidth = 40;
|
|
112
106
|
const gapWidth = 12;
|
|
113
|
-
const operatorCount = Math.floor(
|
|
114
|
-
(width - 12 * 2 - btnWidth) / (btnWidth + gapWidth) + 1
|
|
115
|
-
);
|
|
107
|
+
const operatorCount = Math.floor((width - 12 * 2 - btnWidth) / (btnWidth + gapWidth) + 1);
|
|
116
108
|
if (operatorCount === operator.length) {
|
|
117
109
|
return type === "default" ? operator : [];
|
|
118
110
|
}
|
|
@@ -128,6 +120,12 @@ function operatorClickHandler(command, column, scope, type = "all") {
|
|
|
128
120
|
if (operatorDisabledHandler(target, scope)) return;
|
|
129
121
|
target?.handler && target.handler(scope);
|
|
130
122
|
}
|
|
123
|
+
function operatorIsDotHandler(operator, scope) {
|
|
124
|
+
const { isDot } = operator;
|
|
125
|
+
if (isFunction(isDot)) return isDot(scope);
|
|
126
|
+
if (isBoolean(isDot)) return isDot;
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
131
129
|
function renderHeaderHandler(column, scope) {
|
|
132
130
|
if (!column) return;
|
|
133
131
|
if (isFunction(column.renderHeader)) {
|
|
@@ -144,15 +142,7 @@ function renderContentHandler(column, scope) {
|
|
|
144
142
|
return row[column.prop];
|
|
145
143
|
}
|
|
146
144
|
const useAppTableWrapper = (hy) => {
|
|
147
|
-
const {
|
|
148
|
-
props,
|
|
149
|
-
emits,
|
|
150
|
-
containerRef,
|
|
151
|
-
tableRef,
|
|
152
|
-
tableDropdownRef,
|
|
153
|
-
operatorDropdownRef
|
|
154
|
-
} = hy;
|
|
155
|
-
const { t } = useLocale();
|
|
145
|
+
const { props, emits, containerRef, tableRef, tableDropdownRef, operatorDropdownRef } = hy;
|
|
156
146
|
const CACHE_COLUMNS_KEY = props.controller || props.url || "CACHE_COLUMNS_KEY";
|
|
157
147
|
const tableDataSource = ref([]);
|
|
158
148
|
const tableColumns = ref([]);
|
|
@@ -161,15 +151,12 @@ const useAppTableWrapper = (hy) => {
|
|
|
161
151
|
return tableColumns.value.filter((column) => tableColumnShowHandler(column));
|
|
162
152
|
});
|
|
163
153
|
const searchPlaceholder = computed(() => {
|
|
164
|
-
const searchLabelSet = tableColumnsList.value.reduce(
|
|
165
|
-
(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
/* @__PURE__ */ new Set()
|
|
172
|
-
);
|
|
154
|
+
const searchLabelSet = tableColumnsList.value.reduce((searchLabelSet2, column) => {
|
|
155
|
+
if (column.isSearch) {
|
|
156
|
+
searchLabelSet2.add(column.label);
|
|
157
|
+
}
|
|
158
|
+
return searchLabelSet2;
|
|
159
|
+
}, /* @__PURE__ */ new Set());
|
|
173
160
|
if (props.searchArr?.length > 0) {
|
|
174
161
|
props.searchArr.forEach((item) => {
|
|
175
162
|
searchLabelSet.add(item.label);
|
|
@@ -184,10 +171,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
184
171
|
return row.id;
|
|
185
172
|
}
|
|
186
173
|
function onTableColumnsSelectHandler(value) {
|
|
187
|
-
const { columnsList, searchText } = tableColumnsEditableleHandler(
|
|
188
|
-
props.tableColumns,
|
|
189
|
-
value
|
|
190
|
-
);
|
|
174
|
+
const { columnsList, searchText } = tableColumnsEditableleHandler(props.tableColumns, value);
|
|
191
175
|
tableColumns.value = columnsList;
|
|
192
176
|
tableColumnsEditablele.value = value;
|
|
193
177
|
sessionStorage.setItem(CACHE_COLUMNS_KEY, JSON.stringify(value));
|
|
@@ -246,9 +230,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
246
230
|
x: clientX,
|
|
247
231
|
y: clientY
|
|
248
232
|
});
|
|
249
|
-
const column = tableColumns.value.find(
|
|
250
|
-
(column2) => column2.type === "operator"
|
|
251
|
-
);
|
|
233
|
+
const column = tableColumns.value.find((column2) => column2.type === "operator");
|
|
252
234
|
const operator = operatorFilterHandler(column, { row });
|
|
253
235
|
if (!operator?.length) return;
|
|
254
236
|
tableTriggerRef.value.column = column;
|
|
@@ -272,15 +254,16 @@ const useAppTableWrapper = (hy) => {
|
|
|
272
254
|
if (props.type === "default") {
|
|
273
255
|
return tableColumnsList.value.some((column) => column.type === "expand");
|
|
274
256
|
} else if (props.type === "virtual") {
|
|
275
|
-
return tableColumnsList.value.some(
|
|
276
|
-
(column) => column.type === "expand" && column.expandType === "expand"
|
|
277
|
-
);
|
|
257
|
+
return tableColumnsList.value.some((column) => column.type === "expand" && column.expandType === "expand");
|
|
278
258
|
}
|
|
279
259
|
return false;
|
|
280
260
|
});
|
|
281
261
|
const isAccordionMode = computed(() => {
|
|
282
262
|
return isExpandTable.value && props.expandMode === "accordion";
|
|
283
263
|
});
|
|
264
|
+
function getRowExpansion() {
|
|
265
|
+
return expandRowKeys.value;
|
|
266
|
+
}
|
|
284
267
|
function setRowExpansion(list = []) {
|
|
285
268
|
const keys = (list || []).map((item) => {
|
|
286
269
|
return isString(item) || isNumber(item) ? item : getRowKey(item);
|
|
@@ -288,7 +271,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
288
271
|
expandRowKeys.value = isAccordionMode.value ? [keys[0]] : keys;
|
|
289
272
|
}
|
|
290
273
|
function toggleRowExpansion(row, expanded) {
|
|
291
|
-
const key = isString(row) || isNumber(row) ? row : getRowKey(row);
|
|
274
|
+
const key = isString(row) || isNumber(row) || isSymbol(row) ? row : getRowKey(row);
|
|
292
275
|
const index = expandRowKeyMap.value.get(key);
|
|
293
276
|
const isExpanded = isBoolean(expanded) ? expanded : !isNumber(index);
|
|
294
277
|
if (isAccordionMode.value) {
|
|
@@ -304,7 +287,8 @@ const useAppTableWrapper = (hy) => {
|
|
|
304
287
|
expandRowKeys.value.splice(index, 1);
|
|
305
288
|
}
|
|
306
289
|
}
|
|
307
|
-
|
|
290
|
+
const data = tableDataSource.value.find((v) => getRowKey(v) === key);
|
|
291
|
+
emits("expand-change", data, isExpanded);
|
|
308
292
|
}
|
|
309
293
|
function onTableRowExpandChangeHandler(row, expandedRows) {
|
|
310
294
|
if (props.type === "virtual") {
|
|
@@ -387,9 +371,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
387
371
|
selectedList.value = list || [];
|
|
388
372
|
clearSelection();
|
|
389
373
|
list.forEach((row) => {
|
|
390
|
-
const item = tableDataSource.value.find(
|
|
391
|
-
(v) => getRowKey(row) === getRowKey(v)
|
|
392
|
-
);
|
|
374
|
+
const item = tableDataSource.value.find((v) => getRowKey(row) === getRowKey(v));
|
|
393
375
|
if (item) {
|
|
394
376
|
tableRef.value.toggleRowSelection(item, true);
|
|
395
377
|
} else {
|
|
@@ -408,11 +390,28 @@ const useAppTableWrapper = (hy) => {
|
|
|
408
390
|
}
|
|
409
391
|
return className.filter(Boolean).join(" ");
|
|
410
392
|
}
|
|
393
|
+
function scrollToTop(top) {
|
|
394
|
+
if (!isNumber(top) || isNaN(top)) return;
|
|
395
|
+
if (props.type === "virtual") {
|
|
396
|
+
tableRef.value.scrollToTop(top);
|
|
397
|
+
} else {
|
|
398
|
+
tableRef.value.setScrollTop(top);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
function scrollToLeft(left) {
|
|
402
|
+
if (!isNumber(left) || isNaN(left)) return;
|
|
403
|
+
if (props.type === "virtual") {
|
|
404
|
+
tableRef.value.scrollToLeft(left);
|
|
405
|
+
} else {
|
|
406
|
+
tableRef.value.setScrollLeft(left);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function onScrollHandler(params) {
|
|
410
|
+
emits("scroll", params);
|
|
411
|
+
}
|
|
412
|
+
window.scrollToTop = scrollToTop;
|
|
411
413
|
watchEffect(() => {
|
|
412
|
-
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(
|
|
413
|
-
props.tableColumns,
|
|
414
|
-
CACHE_COLUMNS_KEY
|
|
415
|
-
);
|
|
414
|
+
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(props.tableColumns, CACHE_COLUMNS_KEY);
|
|
416
415
|
tableColumns.value = columnsList;
|
|
417
416
|
tableColumnsEditablele.value = columnsEditablele;
|
|
418
417
|
});
|
|
@@ -434,6 +433,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
434
433
|
clearSelectedList,
|
|
435
434
|
expandRowKeys,
|
|
436
435
|
expandRowKeyMap,
|
|
436
|
+
getRowExpansion,
|
|
437
437
|
setRowExpansion,
|
|
438
438
|
toggleRowExpansion,
|
|
439
439
|
onTableRowExpandChangeHandler,
|
|
@@ -442,8 +442,11 @@ const useAppTableWrapper = (hy) => {
|
|
|
442
442
|
onTableRowClickHandler,
|
|
443
443
|
onTableColumnsSelectHandler,
|
|
444
444
|
showAppTableLoading,
|
|
445
|
-
closeAppTableLoading
|
|
445
|
+
closeAppTableLoading,
|
|
446
|
+
scrollToTop,
|
|
447
|
+
scrollToLeft,
|
|
448
|
+
onScrollHandler
|
|
446
449
|
};
|
|
447
450
|
};
|
|
448
451
|
|
|
449
|
-
export { operatorClickHandler, operatorDisableTextdHandler, operatorDisabledHandler, operatorFilterHandler, renderContentHandler, renderHeaderHandler, tableColumnHandler, tableColumnShowHandler, useAppTableWrapper };
|
|
452
|
+
export { operatorClickHandler, operatorDisableTextdHandler, operatorDisabledHandler, operatorFilterHandler, operatorIsDotHandler, renderContentHandler, renderHeaderHandler, tableColumnHandler, tableColumnShowHandler, useAppTableWrapper };
|
|
@@ -101,6 +101,26 @@ function useAppTableSearch(hy) {
|
|
|
101
101
|
const isReset = !(isEmpty(oldQueryValue) && isEmpty(props.filterModel.query) || oldQueryValue === props.filterModel.query);
|
|
102
102
|
getData(isReset ? 1 : null);
|
|
103
103
|
}
|
|
104
|
+
async function getOptions() {
|
|
105
|
+
if (appSearchRef.value) {
|
|
106
|
+
await appSearchRef.value.getOptions();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async function getOptionsFields(keys) {
|
|
110
|
+
if (appSearchRef.value) {
|
|
111
|
+
await appSearchRef.value.getOptionsFields(keys);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async function getOptionsError() {
|
|
115
|
+
if (appSearchRef.value) {
|
|
116
|
+
await appSearchRef.value.getOptionsError();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function getOptionsByField() {
|
|
120
|
+
if (appSearchRef.value) {
|
|
121
|
+
return appSearchRef.value.getOptionsByField();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
104
124
|
return {
|
|
105
125
|
totalElements,
|
|
106
126
|
showFilter,
|
|
@@ -113,7 +133,11 @@ function useAppTableSearch(hy) {
|
|
|
113
133
|
getTableDataSource,
|
|
114
134
|
onSizeChangeHandler,
|
|
115
135
|
onCurrentChangeHandler,
|
|
116
|
-
onSearchQueryHandler
|
|
136
|
+
onSearchQueryHandler,
|
|
137
|
+
getOptions,
|
|
138
|
+
getOptionsFields,
|
|
139
|
+
getOptionsError,
|
|
140
|
+
getOptionsByField
|
|
117
141
|
};
|
|
118
142
|
}
|
|
119
143
|
|
|
@@ -2,12 +2,11 @@ import { toRef } from 'vue';
|
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import '../../index.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { $t } from '../../../hooks/useLocale.mjs';
|
|
6
6
|
import { isPermission, isBoolean, isString, isObject, isEmpty } from '../../../utils/is.mjs';
|
|
7
7
|
import { useAppSearch } from '../../hySearch/js/useAppSearch.mjs';
|
|
8
8
|
|
|
9
9
|
function getColumnDefaultConfig(column) {
|
|
10
|
-
const { t } = useLocale();
|
|
11
10
|
switch (column.type) {
|
|
12
11
|
case "selection":
|
|
13
12
|
return {
|
|
@@ -17,7 +16,7 @@ function getColumnDefaultConfig(column) {
|
|
|
17
16
|
case "index":
|
|
18
17
|
return {
|
|
19
18
|
prop: `${column.type}_prop`,
|
|
20
|
-
label: t("table.index")
|
|
19
|
+
label: $t("table.index")
|
|
21
20
|
};
|
|
22
21
|
case "expand":
|
|
23
22
|
return {
|
|
@@ -25,7 +24,7 @@ function getColumnDefaultConfig(column) {
|
|
|
25
24
|
};
|
|
26
25
|
case "operator":
|
|
27
26
|
return {
|
|
28
|
-
label: t("table.
|
|
27
|
+
label: $t("table.operation"),
|
|
29
28
|
prop: `operator_prop`,
|
|
30
29
|
fixed: "right"
|
|
31
30
|
};
|