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
|
@@ -4,14 +4,14 @@ 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 { useAppTableWrapper, operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from './js/index.mjs';
|
|
7
|
+
import { useAppTableWrapper, operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from './js/index.mjs';
|
|
8
8
|
import { useAppTableSearch } from './js/search.mjs';
|
|
9
9
|
import _sfc_main$2 from './cpns/headerItem.vue.mjs';
|
|
10
10
|
import _sfc_main$1 from './cpns/columnSelect.vue.mjs';
|
|
11
11
|
import _sfc_main$3 from './cpns/virtualTable.vue.mjs';
|
|
12
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
13
12
|
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
14
13
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
14
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
15
15
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
16
16
|
import { HyInputSearch } from '../hyInput/index.mjs';
|
|
17
17
|
import { HyButton } from '../hyButton/index.mjs';
|
|
@@ -199,13 +199,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
199
199
|
"expand-change",
|
|
200
200
|
"on-select-checkbox",
|
|
201
201
|
"reqSuccess",
|
|
202
|
-
"search-data"
|
|
202
|
+
"search-data",
|
|
203
|
+
"scroll"
|
|
203
204
|
], ["update:loading"]),
|
|
204
205
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
205
206
|
const props = __props;
|
|
206
207
|
const emits = __emit;
|
|
207
208
|
const loading = useModel(__props, "loading");
|
|
208
|
-
const { t } = useLocale();
|
|
209
209
|
const containerRef = useTemplateRef("containerRef");
|
|
210
210
|
const tableRef = useTemplateRef("tableRef");
|
|
211
211
|
const appSearchRef = useTemplateRef("appSearchRef");
|
|
@@ -229,12 +229,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
229
229
|
clearSelectedList,
|
|
230
230
|
expandRowKeys,
|
|
231
231
|
expandRowKeyMap,
|
|
232
|
+
getRowExpansion,
|
|
232
233
|
setRowExpansion,
|
|
233
234
|
toggleRowExpansion,
|
|
234
235
|
onTableRowClickHandler,
|
|
235
236
|
onTableRowContextmenuHandler,
|
|
236
237
|
onTableRowExpandChangeHandler,
|
|
237
238
|
onTableSelectHandler,
|
|
239
|
+
scrollToTop,
|
|
240
|
+
scrollToLeft,
|
|
241
|
+
onScrollHandler,
|
|
238
242
|
// useAppTableSearch
|
|
239
243
|
// 表单查询
|
|
240
244
|
totalElements,
|
|
@@ -251,7 +255,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
251
255
|
onCurrentChangeHandler,
|
|
252
256
|
onSearchQueryHandler,
|
|
253
257
|
showAppTableLoading,
|
|
254
|
-
closeAppTableLoading
|
|
258
|
+
closeAppTableLoading,
|
|
259
|
+
getOptions,
|
|
260
|
+
getOptionsFields,
|
|
261
|
+
getOptionsError,
|
|
262
|
+
getOptionsByField
|
|
255
263
|
} = useMixins(
|
|
256
264
|
{
|
|
257
265
|
props,
|
|
@@ -278,10 +286,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
278
286
|
getTableDataSource,
|
|
279
287
|
clearSelection,
|
|
280
288
|
clearSelectedList,
|
|
289
|
+
getRowExpansion,
|
|
281
290
|
setRowExpansion,
|
|
282
291
|
toggleRowExpansion,
|
|
283
292
|
showAppTableLoading,
|
|
284
|
-
closeAppTableLoading
|
|
293
|
+
closeAppTableLoading,
|
|
294
|
+
getOptions,
|
|
295
|
+
getOptionsFields,
|
|
296
|
+
getOptionsError,
|
|
297
|
+
getOptionsByField,
|
|
298
|
+
scrollToTop,
|
|
299
|
+
scrollToLeft
|
|
285
300
|
});
|
|
286
301
|
return (_ctx, _cache) => {
|
|
287
302
|
return openBlock(), createElementBlock(
|
|
@@ -307,7 +322,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
307
322
|
}, null, 8, ["columns", "columns-editable", "origin-columns", "onConfirm"])) : createCommentVNode("v-if", true),
|
|
308
323
|
__props.filterColumns.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
309
324
|
key: 1,
|
|
310
|
-
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2",
|
|
325
|
+
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2 box-border",
|
|
311
326
|
onClick: unref(switchShowFilter)
|
|
312
327
|
}, [
|
|
313
328
|
createVNode(unref(HyIcon), {
|
|
@@ -317,7 +332,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
317
332
|
createElementVNode(
|
|
318
333
|
"span",
|
|
319
334
|
null,
|
|
320
|
-
toDisplayString(unref(showFilter) ? unref(t)("table.hideFilter") : unref(t)("table.displayFilter")),
|
|
335
|
+
toDisplayString(unref(showFilter) ? unref($t)("table.hideFilter") : unref($t)("table.displayFilter")),
|
|
321
336
|
1
|
|
322
337
|
/* TEXT */
|
|
323
338
|
)
|
|
@@ -330,14 +345,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
330
345
|
}, {
|
|
331
346
|
content: withCtx(() => [
|
|
332
347
|
createElementVNode("span", {
|
|
333
|
-
innerHTML: unref(t)("table.searchByInput", [unref(searchPlaceholder)])
|
|
348
|
+
innerHTML: unref($t)("table.searchByInput", [unref(searchPlaceholder)])
|
|
334
349
|
}, null, 8, ["innerHTML"])
|
|
335
350
|
]),
|
|
336
351
|
default: withCtx(() => [
|
|
337
352
|
createVNode(unref(HyInputSearch), {
|
|
338
353
|
modelValue: __props.filterModel.query,
|
|
339
354
|
"onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
|
|
340
|
-
placeholder: unref(t)("table.searchFor", [__props.controllerText || ""]),
|
|
355
|
+
placeholder: unref($t)("table.searchFor", [__props.controllerText || ""]),
|
|
341
356
|
onSearch: unref(onSearchQueryHandler)
|
|
342
357
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onSearch"])
|
|
343
358
|
]),
|
|
@@ -375,7 +390,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
375
390
|
columns: __props.filterColumns,
|
|
376
391
|
hidden: !unref(showFilter),
|
|
377
392
|
class: normalizeClass({ "mb-4": unref(showFilter) }),
|
|
378
|
-
onSearch: ($event) => unref(getData)(1)
|
|
393
|
+
onSearch: ($event) => unref(getData)(1),
|
|
394
|
+
onOptionsStatus: _ctx.$attrs.onOptionsStatus
|
|
379
395
|
}, createSlots({
|
|
380
396
|
_: 2
|
|
381
397
|
/* DYNAMIC */
|
|
@@ -388,7 +404,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
388
404
|
])
|
|
389
405
|
};
|
|
390
406
|
})
|
|
391
|
-
]), 1032, ["model", "columns", "hidden", "class", "onSearch"])) : createCommentVNode("v-if", true),
|
|
407
|
+
]), 1032, ["model", "columns", "hidden", "class", "onSearch", "onOptionsStatus"])) : createCommentVNode("v-if", true),
|
|
392
408
|
createCommentVNode(" \u4E3B\u5185\u5BB9 "),
|
|
393
409
|
createElementVNode("div", { class: "h-0 flex-1 flex flex-col border border-border rounded overflow-hidden" }, [
|
|
394
410
|
createCommentVNode(" \u8868\u683C "),
|
|
@@ -412,14 +428,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
412
428
|
onSelectAll: (list) => unref(onTableSelectHandler)(list, null, true),
|
|
413
429
|
onRowClick: unref(onTableRowClickHandler),
|
|
414
430
|
onRowContextmenu: unref(onTableRowContextmenuHandler),
|
|
415
|
-
onExpandChange: unref(onTableRowExpandChangeHandler)
|
|
431
|
+
onExpandChange: unref(onTableRowExpandChangeHandler),
|
|
432
|
+
onScroll: unref(onScrollHandler)
|
|
416
433
|
}), {
|
|
417
434
|
empty: withCtx(() => [
|
|
418
435
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
419
436
|
createElementVNode(
|
|
420
437
|
"span",
|
|
421
438
|
null,
|
|
422
|
-
toDisplayString(__props.emptyText || unref(t)("hy.noData")),
|
|
439
|
+
toDisplayString(__props.emptyText || unref($t)("hy.noData")),
|
|
423
440
|
1
|
|
424
441
|
/* TEXT */
|
|
425
442
|
)
|
|
@@ -472,11 +489,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
472
489
|
(openBlock(true), createElementBlock(
|
|
473
490
|
Fragment,
|
|
474
491
|
null,
|
|
475
|
-
renderList(unref(operatorFilterHandler)(
|
|
476
|
-
column,
|
|
477
|
-
scope,
|
|
478
|
-
"default"
|
|
479
|
-
), (citem, cindex) => {
|
|
492
|
+
renderList(unref(operatorFilterHandler)(column, scope, "default"), (citem, cindex) => {
|
|
480
493
|
return openBlock(), createBlock(unref(HyTooltip), {
|
|
481
494
|
key: cindex,
|
|
482
495
|
"is-always": "",
|
|
@@ -485,7 +498,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
485
498
|
}, {
|
|
486
499
|
default: withCtx(() => [
|
|
487
500
|
createElementVNode("div", {
|
|
488
|
-
class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center 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", [
|
|
501
|
+
class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded relative box-border", [
|
|
489
502
|
citem.className,
|
|
490
503
|
unref(operatorDisabledHandler)(citem, scope) ? "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)]"
|
|
491
504
|
]]),
|
|
@@ -509,7 +522,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
509
522
|
)) : (openBlock(), createElementBlock("div", {
|
|
510
523
|
key: 1,
|
|
511
524
|
class: "mt-1 whitespace-nowrap"
|
|
512
|
-
}, "\xA0"))
|
|
525
|
+
}, "\xA0")),
|
|
526
|
+
unref(operatorIsDotHandler)(citem, scope) ? (openBlock(), createElementBlock("div", {
|
|
527
|
+
key: 2,
|
|
528
|
+
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]"
|
|
529
|
+
})) : createCommentVNode("v-if", true)
|
|
513
530
|
], 42, ["onClick", "onContextmenu"])
|
|
514
531
|
]),
|
|
515
532
|
_: 2
|
|
@@ -538,21 +555,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
538
555
|
(openBlock(true), createElementBlock(
|
|
539
556
|
Fragment,
|
|
540
557
|
null,
|
|
541
|
-
renderList(unref(operatorFilterHandler)(
|
|
542
|
-
column,
|
|
543
|
-
scope,
|
|
544
|
-
"more"
|
|
545
|
-
), (citem, cindex) => {
|
|
558
|
+
renderList(unref(operatorFilterHandler)(column, scope, "more"), (citem, cindex) => {
|
|
546
559
|
return openBlock(), createBlock(unref(ElDropdownItem), {
|
|
547
560
|
key: cindex,
|
|
548
561
|
command: cindex,
|
|
549
562
|
disabled: unref(operatorDisabledHandler)(citem, scope)
|
|
550
563
|
}, {
|
|
551
564
|
default: withCtx(() => [
|
|
552
|
-
createElementVNode("span",
|
|
565
|
+
createElementVNode("span", { class: "relative" }, [
|
|
553
566
|
createElementVNode(
|
|
554
567
|
"span",
|
|
555
|
-
|
|
568
|
+
{ class: "pr-1" },
|
|
556
569
|
toDisplayString(citem.label),
|
|
557
570
|
1
|
|
558
571
|
/* TEXT */
|
|
@@ -566,7 +579,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
566
579
|
"\uFF08" + toDisplayString(unref(operatorDisableTextdHandler)(citem, scope)) + "\uFF09",
|
|
567
580
|
1
|
|
568
581
|
/* TEXT */
|
|
569
|
-
)) : createCommentVNode("v-if", true)
|
|
582
|
+
)) : createCommentVNode("v-if", true),
|
|
583
|
+
unref(operatorIsDotHandler)(citem, scope) ? (openBlock(), createElementBlock("div", {
|
|
584
|
+
key: 1,
|
|
585
|
+
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]"
|
|
586
|
+
})) : createCommentVNode("v-if", true)
|
|
570
587
|
])
|
|
571
588
|
]),
|
|
572
589
|
_: 2
|
|
@@ -594,7 +611,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
594
611
|
createVNode(unref(HyTooltip), {
|
|
595
612
|
"is-always": "",
|
|
596
613
|
overLine: 1,
|
|
597
|
-
content: unref(t)("table.moreOperations")
|
|
614
|
+
content: unref($t)("table.moreOperations")
|
|
598
615
|
}, {
|
|
599
616
|
default: withCtx(() => [
|
|
600
617
|
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" }, [
|
|
@@ -611,7 +628,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
611
628
|
createElementVNode(
|
|
612
629
|
"div",
|
|
613
630
|
{ class: "mt-0.5" },
|
|
614
|
-
toDisplayString(unref(t)("table.more")),
|
|
631
|
+
toDisplayString(unref($t)("table.more")),
|
|
615
632
|
1
|
|
616
633
|
/* TEXT */
|
|
617
634
|
)
|
|
@@ -675,7 +692,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
675
692
|
]),
|
|
676
693
|
_: 3
|
|
677
694
|
/* FORWARDED */
|
|
678
|
-
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "expand-row-keys", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange"])) : createCommentVNode("v-if", true),
|
|
695
|
+
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "expand-row-keys", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange", "onScroll"])) : createCommentVNode("v-if", true),
|
|
679
696
|
__props.type === "virtual" ? (openBlock(), createBlock(unref(ElAutoResizer), { key: 1 }, {
|
|
680
697
|
default: withCtx(({ height, width }) => [
|
|
681
698
|
createVNode(_sfc_main$3, mergeProps({
|
|
@@ -704,7 +721,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
704
721
|
onSelectAll: unref(onTableSelectHandler),
|
|
705
722
|
onRowClick: unref(onTableRowClickHandler),
|
|
706
723
|
onRowContextmenu: unref(onTableRowContextmenuHandler),
|
|
707
|
-
onExpandClick: unref(onTableRowExpandChangeHandler)
|
|
724
|
+
onExpandClick: unref(onTableRowExpandChangeHandler),
|
|
725
|
+
onScroll: unref(onScrollHandler)
|
|
708
726
|
}), createSlots({
|
|
709
727
|
empty: withCtx(() => [
|
|
710
728
|
createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
|
|
@@ -712,7 +730,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
712
730
|
createElementVNode(
|
|
713
731
|
"span",
|
|
714
732
|
null,
|
|
715
|
-
toDisplayString(__props.emptyText || unref(t)("hy.noData")),
|
|
733
|
+
toDisplayString(__props.emptyText || unref($t)("hy.noData")),
|
|
716
734
|
1
|
|
717
735
|
/* TEXT */
|
|
718
736
|
)
|
|
@@ -730,7 +748,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
730
748
|
])
|
|
731
749
|
};
|
|
732
750
|
})
|
|
733
|
-
]), 1040, ["expandedRowKeys", "onUpdate:expandedRowKeys", "expandRowKeyMap", "width", "height", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "row-key", "filter-model", "expandMode", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandClick"])
|
|
751
|
+
]), 1040, ["expandedRowKeys", "onUpdate:expandedRowKeys", "expandRowKeyMap", "width", "height", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "row-key", "filter-model", "expandMode", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandClick", "onScroll"])
|
|
734
752
|
]),
|
|
735
753
|
_: 3
|
|
736
754
|
/* FORWARDED */
|
|
@@ -744,11 +762,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
744
762
|
createElementVNode(
|
|
745
763
|
"div",
|
|
746
764
|
{ class: "absolute left-4 top-1/2 transform -translate-y-1/2 text-sm" },
|
|
747
|
-
toDisplayString(unref(t)("table.aTotalOfPiecesOfData", [unref(totalElements)])),
|
|
765
|
+
toDisplayString(unref($t)("table.aTotalOfPiecesOfData", [unref(totalElements)])),
|
|
748
766
|
1
|
|
749
767
|
/* TEXT */
|
|
750
768
|
),
|
|
751
|
-
|
|
769
|
+
unref(totalElements) >= 10 ? (openBlock(), createBlock(unref(ElPagination), {
|
|
770
|
+
key: 0,
|
|
752
771
|
"current-page": __props.filterModel.page,
|
|
753
772
|
"onUpdate:currentPage": ($event) => __props.filterModel.page = $event,
|
|
754
773
|
"page-size": __props.filterModel.size,
|
|
@@ -759,12 +778,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
759
778
|
layout: __props.layout,
|
|
760
779
|
size: "default",
|
|
761
780
|
background: "",
|
|
762
|
-
"hide-on-single-page": "",
|
|
763
781
|
onSizeChange: unref(onSizeChangeHandler),
|
|
764
782
|
onCurrentChange: unref(onCurrentChangeHandler)
|
|
765
|
-
}, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"]),
|
|
783
|
+
}, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"])) : createCommentVNode("v-if", true),
|
|
766
784
|
unref(selectedList) && unref(selectedList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
767
|
-
key:
|
|
785
|
+
key: 1,
|
|
768
786
|
class: "absolute right-4 top-1/2 transform -translate-y-1/2"
|
|
769
787
|
}, [
|
|
770
788
|
renderSlot(_ctx.$slots, "multiple-operator-slot")
|
|
@@ -783,12 +801,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
783
801
|
},
|
|
784
802
|
"virtual-triggering": "",
|
|
785
803
|
trigger: "contextmenu",
|
|
786
|
-
placement: "bottom",
|
|
787
|
-
onCommand: ($event) => unref(operatorClickHandler)(
|
|
788
|
-
$event,
|
|
789
|
-
unref(tableTriggerRef).column,
|
|
790
|
-
unref(tableTriggerRef).scope
|
|
791
|
-
)
|
|
804
|
+
placement: "bottom-end",
|
|
805
|
+
onCommand: ($event) => unref(operatorClickHandler)($event, unref(tableTriggerRef).column, unref(tableTriggerRef).scope)
|
|
792
806
|
}, {
|
|
793
807
|
dropdown: withCtx(() => [
|
|
794
808
|
createVNode(unref(ElDropdownMenu), { class: "hy-table-dropdown-menu" }, {
|
|
@@ -796,20 +810,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
796
810
|
(openBlock(true), createElementBlock(
|
|
797
811
|
Fragment,
|
|
798
812
|
null,
|
|
799
|
-
renderList(unref(operatorFilterHandler)(
|
|
800
|
-
unref(tableTriggerRef).column,
|
|
801
|
-
unref(tableTriggerRef).scope
|
|
802
|
-
), (citem, cindex) => {
|
|
813
|
+
renderList(unref(operatorFilterHandler)(unref(tableTriggerRef).column, unref(tableTriggerRef).scope), (citem, cindex) => {
|
|
803
814
|
return openBlock(), createBlock(unref(ElDropdownItem), {
|
|
804
815
|
key: cindex,
|
|
805
816
|
command: cindex,
|
|
806
817
|
disabled: unref(operatorDisabledHandler)(citem, unref(tableTriggerRef).scope)
|
|
807
818
|
}, {
|
|
808
819
|
default: withCtx(() => [
|
|
809
|
-
createElementVNode("span",
|
|
820
|
+
createElementVNode("span", { class: "relative" }, [
|
|
810
821
|
createElementVNode(
|
|
811
822
|
"span",
|
|
812
|
-
|
|
823
|
+
{ class: "pr-1" },
|
|
813
824
|
toDisplayString(citem.label),
|
|
814
825
|
1
|
|
815
826
|
/* TEXT */
|
|
@@ -823,7 +834,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
823
834
|
"\uFF08" + toDisplayString(unref(operatorDisableTextdHandler)(citem, unref(tableTriggerRef).scope)) + "\uFF09",
|
|
824
835
|
1
|
|
825
836
|
/* TEXT */
|
|
826
|
-
)) : createCommentVNode("v-if", true)
|
|
837
|
+
)) : createCommentVNode("v-if", true),
|
|
838
|
+
unref(operatorIsDotHandler)(citem, unref(tableTriggerRef).scope) ? (openBlock(), createElementBlock("div", {
|
|
839
|
+
key: 1,
|
|
840
|
+
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]"
|
|
841
|
+
})) : createCommentVNode("v-if", true)
|
|
827
842
|
])
|
|
828
843
|
]),
|
|
829
844
|
_: 2
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, unref, watch, openBlock, createElementBlock, createBlock, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createCommentVNode, normalizeStyle } from 'vue';
|
|
2
2
|
import { ElPopover, ElIcon } from 'element-plus';
|
|
3
3
|
import { ArrowDown } from '@element-plus/icons-vue';
|
|
4
|
-
import '../../hooks/index.mjs';
|
|
5
4
|
import '../../utils/index.mjs';
|
|
6
5
|
import '../index.mjs';
|
|
7
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
8
6
|
import { isPermission, isBoolean, isFunction } from '../../utils/is.mjs';
|
|
9
7
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
10
8
|
import { HyButton } from '../hyButton/index.mjs';
|
|
@@ -59,13 +57,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
59
57
|
default: () => {
|
|
60
58
|
return [];
|
|
61
59
|
}
|
|
60
|
+
},
|
|
61
|
+
isDot: {
|
|
62
|
+
// 是否显示小红点
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
62
65
|
}
|
|
63
66
|
},
|
|
64
67
|
emits: ["change"],
|
|
65
68
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
66
69
|
const props = __props;
|
|
67
70
|
const emits = __emit;
|
|
68
|
-
const { t } = useLocale();
|
|
69
71
|
const visible = ref(false);
|
|
70
72
|
const dataList = ref([]);
|
|
71
73
|
const selectedData = ref(null);
|
|
@@ -144,6 +146,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
144
146
|
disabled: __props.disabled,
|
|
145
147
|
class: normalizeClass(selectedData.value.buttonClass || __props.buttonClass),
|
|
146
148
|
svgName: selectedData.value.svgName || __props.svgName,
|
|
149
|
+
isDot: __props.isDot,
|
|
147
150
|
onClick: ($event) => buttonChange(selectedData.value)
|
|
148
151
|
}, {
|
|
149
152
|
default: withCtx(() => [
|
|
@@ -155,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
155
158
|
]),
|
|
156
159
|
_: 1
|
|
157
160
|
/* STABLE */
|
|
158
|
-
}, 8, ["type", "size", "disabled", "class", "svgName", "onClick"])
|
|
161
|
+
}, 8, ["type", "size", "disabled", "class", "svgName", "isDot", "onClick"])
|
|
159
162
|
]),
|
|
160
163
|
_: 1
|
|
161
164
|
/* STABLE */
|
|
@@ -174,11 +177,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
174
177
|
size: __props.size,
|
|
175
178
|
disabled: __props.disabled,
|
|
176
179
|
class: normalizeClass(__props.buttonClass),
|
|
180
|
+
isDot: __props.isDot,
|
|
177
181
|
onClick: ($event) => buttonChange(selectedData.value)
|
|
178
182
|
}, {
|
|
179
183
|
content: withCtx(() => [
|
|
180
184
|
createElementVNode("div", { class: "h-full flex items-center justify-center pl-[14px]" }, [
|
|
181
|
-
createVNode(unref(HyIcon), {
|
|
185
|
+
createVNode(unref(HyIcon), {
|
|
186
|
+
"svg-name": __props.svgName,
|
|
187
|
+
class: "w-[14px] h-[14px]"
|
|
188
|
+
}, null, 8, ["svg-name"]),
|
|
182
189
|
createElementVNode(
|
|
183
190
|
"span",
|
|
184
191
|
{ class: "ml-[6px]" },
|
|
@@ -219,7 +226,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
219
226
|
]),
|
|
220
227
|
_: 1
|
|
221
228
|
/* STABLE */
|
|
222
|
-
}, 8, ["type", "size", "disabled", "class", "onClick"])
|
|
229
|
+
}, 8, ["type", "size", "disabled", "class", "isDot", "onClick"])
|
|
223
230
|
]),
|
|
224
231
|
default: withCtx(() => [
|
|
225
232
|
createElementVNode("ul", { class: "max-h-[500px] overflow-x-auto box-border" }, [
|
|
@@ -7,7 +7,6 @@ import '../index.mjs';
|
|
|
7
7
|
import _sfc_main$1 from './tableForm.vue.mjs';
|
|
8
8
|
import { doReadExcel } from './js/index.mjs';
|
|
9
9
|
import { useApi } from '../../hooks/useApi.mjs';
|
|
10
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
11
10
|
import { HyConfirmDialog } from '../hyConfirmDialog/index.mjs';
|
|
12
11
|
import { isArray } from '../../utils/is.mjs';
|
|
13
12
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
@@ -96,7 +95,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
96
95
|
const props = __props;
|
|
97
96
|
const emits = __emit;
|
|
98
97
|
const { api } = useApi();
|
|
99
|
-
const { t } = useLocale();
|
|
100
98
|
const containerRef = useTemplateRef("containerRef");
|
|
101
99
|
const uploadRef = useTemplateRef("uploadRef");
|
|
102
100
|
const tableRef = useTemplateRef("tableRef");
|
|
@@ -297,9 +295,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
297
295
|
emits("submit", submitResult);
|
|
298
296
|
onResetUpload();
|
|
299
297
|
} else {
|
|
300
|
-
ElMessage.warning(
|
|
301
|
-
`${submitResult.success} \u6761\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF0C ${submitResult.failed} \u6761\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8C03\u6574`
|
|
302
|
-
);
|
|
298
|
+
ElMessage.warning(`${submitResult.success} \u6761\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF0C ${submitResult.failed} \u6761\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8C03\u6574`);
|
|
303
299
|
emits("submit", submitResult);
|
|
304
300
|
}
|
|
305
301
|
}
|
|
@@ -330,6 +326,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
330
326
|
active.value++;
|
|
331
327
|
}
|
|
332
328
|
return active.value;
|
|
329
|
+
},
|
|
330
|
+
async getOptions() {
|
|
331
|
+
if (tableRef.value) {
|
|
332
|
+
await tableRef.value.getOptions();
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
async getOptionsFields(keys) {
|
|
336
|
+
if (tableRef.value) {
|
|
337
|
+
await tableRef.value.getOptionsFields(keys);
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
async getOptionsError() {
|
|
341
|
+
if (tableRef.value) {
|
|
342
|
+
await tableRef.value.getOptionsError();
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
getOptionsByField(key) {
|
|
346
|
+
if (tableRef.value) {
|
|
347
|
+
return tableRef.value.getOptionsByField(key);
|
|
348
|
+
}
|
|
333
349
|
}
|
|
334
350
|
});
|
|
335
351
|
return (_ctx, _cache) => {
|
|
@@ -383,8 +399,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
383
399
|
createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
|
|
384
400
|
createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
|
|
385
401
|
createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
|
|
386
|
-
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, "
|
|
387
|
-
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, "
|
|
402
|
+
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4 box-border" }, ".xls"),
|
|
403
|
+
createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4 box-border" }, ".xlsx"),
|
|
388
404
|
createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
|
|
389
405
|
])
|
|
390
406
|
])
|
|
@@ -519,8 +535,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
519
535
|
columnNum: __props.columnNum,
|
|
520
536
|
size: __props.size,
|
|
521
537
|
showAddBtn: __props.showAddBtn,
|
|
538
|
+
class: "h-0 flex-1",
|
|
522
539
|
onTableDataChange: tableDataChange,
|
|
523
|
-
|
|
540
|
+
onOptionsStatus: _ctx.$attrs.onOptionsStatus
|
|
524
541
|
}), createSlots({
|
|
525
542
|
_: 2
|
|
526
543
|
/* DYNAMIC */
|
|
@@ -533,7 +550,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
533
550
|
])
|
|
534
551
|
};
|
|
535
552
|
})
|
|
536
|
-
]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size", "showAddBtn"])
|
|
553
|
+
]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size", "showAddBtn", "onOptionsStatus"])
|
|
537
554
|
])) : createCommentVNode("v-if", true),
|
|
538
555
|
submitting.value ? (openBlock(), createElementBlock("div", {
|
|
539
556
|
key: 1,
|
|
@@ -22,10 +22,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
|
|
|
22
22
|
}, {});
|
|
23
23
|
Object.entries(ruleList || {}).forEach(([key, citem]) => {
|
|
24
24
|
if (columnMap[key]) {
|
|
25
|
-
rules[key] = [
|
|
26
|
-
...isArray(citem) ? citem : [citem],
|
|
27
|
-
...rules[key]
|
|
28
|
-
].filter(Boolean);
|
|
25
|
+
rules[key] = [...isArray(citem) ? citem : [citem], ...rules[key]].filter(Boolean);
|
|
29
26
|
}
|
|
30
27
|
});
|
|
31
28
|
const validator = new AsyncValidator(rules);
|
|
@@ -53,10 +50,7 @@ const doReadExcel = (files, props) => {
|
|
|
53
50
|
const ws1 = XLSX.utils.sheet_to_json(workbook.Sheets[wsname1]);
|
|
54
51
|
let content = formColumns.reduce((content2, column) => {
|
|
55
52
|
const title = column.import ? column.import.title : column.label;
|
|
56
|
-
return content2.replace(
|
|
57
|
-
new RegExp(`"${title}":`, "g"),
|
|
58
|
-
`"${column.prop}":`
|
|
59
|
-
);
|
|
53
|
+
return content2.replace(new RegExp(`"${title}":`, "g"), `"${column.prop}":`);
|
|
60
54
|
}, JSON.stringify(ws1));
|
|
61
55
|
let dataSource = JSON.parse(content);
|
|
62
56
|
if (beforeDataHandle) {
|
|
@@ -9,13 +9,11 @@ const useAppTableForm = (config = {}) => {
|
|
|
9
9
|
columns = [
|
|
10
10
|
{
|
|
11
11
|
type: "expand",
|
|
12
|
-
slot: "
|
|
12
|
+
slot: "tableFormExpand",
|
|
13
13
|
expandType: "expand",
|
|
14
14
|
width: 48
|
|
15
15
|
},
|
|
16
|
-
...columns.filter(
|
|
17
|
-
(column) => !["expand", "operator"].includes(column.type)
|
|
18
|
-
),
|
|
16
|
+
...columns.filter((column) => !["expand", "operator"].includes(column.type)),
|
|
19
17
|
{
|
|
20
18
|
label: "\u5BFC\u5165\u72B6\u6001",
|
|
21
19
|
prop: "validateStatus",
|
|
@@ -23,10 +21,7 @@ const useAppTableForm = (config = {}) => {
|
|
|
23
21
|
}
|
|
24
22
|
];
|
|
25
23
|
const { tableColumns } = useAppTable({ columns });
|
|
26
|
-
const { formModel, formColumns } = useAppForm(
|
|
27
|
-
config.formColumns,
|
|
28
|
-
config.formModel
|
|
29
|
-
);
|
|
24
|
+
const { formModel, formColumns } = useAppForm(config.formColumns, config.formModel);
|
|
30
25
|
formColumns.value.forEach((item) => {
|
|
31
26
|
if (isString(item.import)) {
|
|
32
27
|
item.import = {
|