hy-dispatch-ui-v3 0.2.67 → 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 +232 -20
- 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/hyButton/button.vue.mjs +2 -2
- package/es/components/hyButton/style/button.scss +48 -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 +65 -35
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +56 -24
- 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 +29 -4
- package/es/components/hyMap/map.vue.mjs +17 -3
- 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 +25 -11
- 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 +33 -20
- 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 +9 -16
- package/es/components/hySearch/style/search.scss +2 -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 +18 -28
- package/es/components/hyTable/js/index.mjs +56 -59
- 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 +35 -41
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
- package/es/components/hyTableForm/js/index.mjs +2 -8
- package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
- 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 +90 -46
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +13 -40
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +17 -16
- 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/tailwind.scss +7 -3
- 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/map/hook/bigMap.mjs +14 -53
- package/es/utils/map/hook/gaode.mjs +5 -20
- package/es/utils/map/hook/leafletjs.mjs +23 -79
- package/es/utils/map/index.mjs +2 -8
- 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/hyButton/button.vue.js +2 -2
- package/lib/components/hyButton/style/button.scss +48 -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 +66 -36
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +51 -19
- 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 +29 -4
- package/lib/components/hyMap/map.vue.js +17 -3
- 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 +23 -9
- 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 +33 -20
- 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 +9 -16
- package/lib/components/hySearch/style/search.scss +2 -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 +17 -27
- package/lib/components/hyTable/js/index.js +54 -57
- 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 +35 -41
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
- package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
- package/lib/components/hyTableForm/js/index.js +2 -8
- package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
- 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 +89 -45
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +13 -40
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +17 -16
- 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/tailwind.scss +7 -3
- 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/map/hook/bigMap.js +14 -53
- package/lib/utils/map/hook/gaode.js +5 -20
- package/lib/utils/map/hook/leafletjs.js +23 -79
- package/lib/utils/map/index.js +2 -8
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -33,17 +33,14 @@ function tableColumnsEditableleHandler(columns, columnsEditablele) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const sortList = Array.from(sortSet.values()).reduce((a, b) => a - b);
|
|
36
|
-
const columnsList = Object.keys(columnsEditableleObj).reduce(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
[]
|
|
46
|
-
);
|
|
36
|
+
const columnsList = Object.keys(columnsEditableleObj).reduce((columnsList2, key) => {
|
|
37
|
+
const list = columnsEditableleObj[key];
|
|
38
|
+
for (let i = 0; i < list.length; i++) {
|
|
39
|
+
const target = list[i];
|
|
40
|
+
columnsList2.push(target.column);
|
|
41
|
+
}
|
|
42
|
+
return columnsList2;
|
|
43
|
+
}, []);
|
|
47
44
|
return {
|
|
48
45
|
columnsList,
|
|
49
46
|
columnsEditablele
|
|
@@ -95,26 +92,21 @@ function operatorDisabledHandler(operator, scope) {
|
|
|
95
92
|
return false;
|
|
96
93
|
}
|
|
97
94
|
function operatorDisableTextdHandler(operator, scope) {
|
|
98
|
-
const { t } = useLocale.useLocale();
|
|
99
95
|
const { disabledText } = operator;
|
|
100
96
|
if (is.isString(disabledText)) return disabledText;
|
|
101
97
|
if (is.isFunction(disabledText)) return disabledText(scope);
|
|
102
|
-
return t("table.nonsupport");
|
|
98
|
+
return useLocale.$t("table.nonsupport");
|
|
103
99
|
}
|
|
104
100
|
function operatorFilterHandler(column, scope, type = "all") {
|
|
105
101
|
let { width } = column;
|
|
106
102
|
width = is.isString(width) ? Number(width.replace(/[a-zA-Z]+/g, "")) : width;
|
|
107
|
-
const operator = (column.operator || []).filter(
|
|
108
|
-
(item) => operatorShowHandler(item, scope)
|
|
109
|
-
);
|
|
103
|
+
const operator = (column.operator || []).filter((item) => operatorShowHandler(item, scope));
|
|
110
104
|
if (type === "all" || operator.length <= 1 && type === "default") {
|
|
111
105
|
return operator;
|
|
112
106
|
}
|
|
113
107
|
const btnWidth = 40;
|
|
114
108
|
const gapWidth = 12;
|
|
115
|
-
const operatorCount = Math.floor(
|
|
116
|
-
(width - 12 * 2 - btnWidth) / (btnWidth + gapWidth) + 1
|
|
117
|
-
);
|
|
109
|
+
const operatorCount = Math.floor((width - 12 * 2 - btnWidth) / (btnWidth + gapWidth) + 1);
|
|
118
110
|
if (operatorCount === operator.length) {
|
|
119
111
|
return type === "default" ? operator : [];
|
|
120
112
|
}
|
|
@@ -152,15 +144,7 @@ function renderContentHandler(column, scope) {
|
|
|
152
144
|
return row[column.prop];
|
|
153
145
|
}
|
|
154
146
|
const useAppTableWrapper = (hy) => {
|
|
155
|
-
const {
|
|
156
|
-
props,
|
|
157
|
-
emits,
|
|
158
|
-
containerRef,
|
|
159
|
-
tableRef,
|
|
160
|
-
tableDropdownRef,
|
|
161
|
-
operatorDropdownRef
|
|
162
|
-
} = hy;
|
|
163
|
-
const { t } = useLocale.useLocale();
|
|
147
|
+
const { props, emits, containerRef, tableRef, tableDropdownRef, operatorDropdownRef } = hy;
|
|
164
148
|
const CACHE_COLUMNS_KEY = props.controller || props.url || "CACHE_COLUMNS_KEY";
|
|
165
149
|
const tableDataSource = vue.ref([]);
|
|
166
150
|
const tableColumns = vue.ref([]);
|
|
@@ -169,15 +153,12 @@ const useAppTableWrapper = (hy) => {
|
|
|
169
153
|
return tableColumns.value.filter((column) => tableColumnShowHandler(column));
|
|
170
154
|
});
|
|
171
155
|
const searchPlaceholder = vue.computed(() => {
|
|
172
|
-
const searchLabelSet = tableColumnsList.value.reduce(
|
|
173
|
-
(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
/* @__PURE__ */ new Set()
|
|
180
|
-
);
|
|
156
|
+
const searchLabelSet = tableColumnsList.value.reduce((searchLabelSet2, column) => {
|
|
157
|
+
if (column.isSearch) {
|
|
158
|
+
searchLabelSet2.add(column.label);
|
|
159
|
+
}
|
|
160
|
+
return searchLabelSet2;
|
|
161
|
+
}, /* @__PURE__ */ new Set());
|
|
181
162
|
if (props.searchArr?.length > 0) {
|
|
182
163
|
props.searchArr.forEach((item) => {
|
|
183
164
|
searchLabelSet.add(item.label);
|
|
@@ -192,10 +173,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
192
173
|
return row.id;
|
|
193
174
|
}
|
|
194
175
|
function onTableColumnsSelectHandler(value) {
|
|
195
|
-
const { columnsList, searchText } = tableColumnsEditableleHandler(
|
|
196
|
-
props.tableColumns,
|
|
197
|
-
value
|
|
198
|
-
);
|
|
176
|
+
const { columnsList, searchText } = tableColumnsEditableleHandler(props.tableColumns, value);
|
|
199
177
|
tableColumns.value = columnsList;
|
|
200
178
|
tableColumnsEditablele.value = value;
|
|
201
179
|
sessionStorage.setItem(CACHE_COLUMNS_KEY, JSON.stringify(value));
|
|
@@ -254,9 +232,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
254
232
|
x: clientX,
|
|
255
233
|
y: clientY
|
|
256
234
|
});
|
|
257
|
-
const column = tableColumns.value.find(
|
|
258
|
-
(column2) => column2.type === "operator"
|
|
259
|
-
);
|
|
235
|
+
const column = tableColumns.value.find((column2) => column2.type === "operator");
|
|
260
236
|
const operator = operatorFilterHandler(column, { row });
|
|
261
237
|
if (!operator?.length) return;
|
|
262
238
|
tableTriggerRef.value.column = column;
|
|
@@ -280,15 +256,16 @@ const useAppTableWrapper = (hy) => {
|
|
|
280
256
|
if (props.type === "default") {
|
|
281
257
|
return tableColumnsList.value.some((column) => column.type === "expand");
|
|
282
258
|
} else if (props.type === "virtual") {
|
|
283
|
-
return tableColumnsList.value.some(
|
|
284
|
-
(column) => column.type === "expand" && column.expandType === "expand"
|
|
285
|
-
);
|
|
259
|
+
return tableColumnsList.value.some((column) => column.type === "expand" && column.expandType === "expand");
|
|
286
260
|
}
|
|
287
261
|
return false;
|
|
288
262
|
});
|
|
289
263
|
const isAccordionMode = vue.computed(() => {
|
|
290
264
|
return isExpandTable.value && props.expandMode === "accordion";
|
|
291
265
|
});
|
|
266
|
+
function getRowExpansion() {
|
|
267
|
+
return expandRowKeys.value;
|
|
268
|
+
}
|
|
292
269
|
function setRowExpansion(list = []) {
|
|
293
270
|
const keys = (list || []).map((item) => {
|
|
294
271
|
return is.isString(item) || is.isNumber(item) ? item : getRowKey(item);
|
|
@@ -296,7 +273,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
296
273
|
expandRowKeys.value = isAccordionMode.value ? [keys[0]] : keys;
|
|
297
274
|
}
|
|
298
275
|
function toggleRowExpansion(row, expanded) {
|
|
299
|
-
const key = is.isString(row) || is.isNumber(row) ? row : getRowKey(row);
|
|
276
|
+
const key = is.isString(row) || is.isNumber(row) || is.isSymbol(row) ? row : getRowKey(row);
|
|
300
277
|
const index = expandRowKeyMap.value.get(key);
|
|
301
278
|
const isExpanded = is.isBoolean(expanded) ? expanded : !is.isNumber(index);
|
|
302
279
|
if (isAccordionMode.value) {
|
|
@@ -312,7 +289,8 @@ const useAppTableWrapper = (hy) => {
|
|
|
312
289
|
expandRowKeys.value.splice(index, 1);
|
|
313
290
|
}
|
|
314
291
|
}
|
|
315
|
-
|
|
292
|
+
const data = tableDataSource.value.find((v) => getRowKey(v) === key);
|
|
293
|
+
emits("expand-change", data, isExpanded);
|
|
316
294
|
}
|
|
317
295
|
function onTableRowExpandChangeHandler(row, expandedRows) {
|
|
318
296
|
if (props.type === "virtual") {
|
|
@@ -395,9 +373,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
395
373
|
selectedList.value = list || [];
|
|
396
374
|
clearSelection();
|
|
397
375
|
list.forEach((row) => {
|
|
398
|
-
const item = tableDataSource.value.find(
|
|
399
|
-
(v) => getRowKey(row) === getRowKey(v)
|
|
400
|
-
);
|
|
376
|
+
const item = tableDataSource.value.find((v) => getRowKey(row) === getRowKey(v));
|
|
401
377
|
if (item) {
|
|
402
378
|
tableRef.value.toggleRowSelection(item, true);
|
|
403
379
|
} else {
|
|
@@ -416,11 +392,28 @@ const useAppTableWrapper = (hy) => {
|
|
|
416
392
|
}
|
|
417
393
|
return className.filter(Boolean).join(" ");
|
|
418
394
|
}
|
|
395
|
+
function scrollToTop(top) {
|
|
396
|
+
if (!is.isNumber(top) || isNaN(top)) return;
|
|
397
|
+
if (props.type === "virtual") {
|
|
398
|
+
tableRef.value.scrollToTop(top);
|
|
399
|
+
} else {
|
|
400
|
+
tableRef.value.setScrollTop(top);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function scrollToLeft(left) {
|
|
404
|
+
if (!is.isNumber(left) || isNaN(left)) return;
|
|
405
|
+
if (props.type === "virtual") {
|
|
406
|
+
tableRef.value.scrollToLeft(left);
|
|
407
|
+
} else {
|
|
408
|
+
tableRef.value.setScrollLeft(left);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function onScrollHandler(params) {
|
|
412
|
+
emits("scroll", params);
|
|
413
|
+
}
|
|
414
|
+
window.scrollToTop = scrollToTop;
|
|
419
415
|
vue.watchEffect(() => {
|
|
420
|
-
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(
|
|
421
|
-
props.tableColumns,
|
|
422
|
-
CACHE_COLUMNS_KEY
|
|
423
|
-
);
|
|
416
|
+
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(props.tableColumns, CACHE_COLUMNS_KEY);
|
|
424
417
|
tableColumns.value = columnsList;
|
|
425
418
|
tableColumnsEditablele.value = columnsEditablele;
|
|
426
419
|
});
|
|
@@ -442,6 +435,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
442
435
|
clearSelectedList,
|
|
443
436
|
expandRowKeys,
|
|
444
437
|
expandRowKeyMap,
|
|
438
|
+
getRowExpansion,
|
|
445
439
|
setRowExpansion,
|
|
446
440
|
toggleRowExpansion,
|
|
447
441
|
onTableRowExpandChangeHandler,
|
|
@@ -450,7 +444,10 @@ const useAppTableWrapper = (hy) => {
|
|
|
450
444
|
onTableRowClickHandler,
|
|
451
445
|
onTableColumnsSelectHandler,
|
|
452
446
|
showAppTableLoading,
|
|
453
|
-
closeAppTableLoading
|
|
447
|
+
closeAppTableLoading,
|
|
448
|
+
scrollToTop,
|
|
449
|
+
scrollToLeft,
|
|
450
|
+
onScrollHandler
|
|
454
451
|
};
|
|
455
452
|
};
|
|
456
453
|
|
|
@@ -9,7 +9,6 @@ var is = require('../../../utils/is.js');
|
|
|
9
9
|
var useAppSearch = require('../../hySearch/js/useAppSearch.js');
|
|
10
10
|
|
|
11
11
|
function getColumnDefaultConfig(column) {
|
|
12
|
-
const { t } = useLocale.useLocale();
|
|
13
12
|
switch (column.type) {
|
|
14
13
|
case "selection":
|
|
15
14
|
return {
|
|
@@ -19,7 +18,7 @@ function getColumnDefaultConfig(column) {
|
|
|
19
18
|
case "index":
|
|
20
19
|
return {
|
|
21
20
|
prop: `${column.type}_prop`,
|
|
22
|
-
label: t("table.index")
|
|
21
|
+
label: useLocale.$t("table.index")
|
|
23
22
|
};
|
|
24
23
|
case "expand":
|
|
25
24
|
return {
|
|
@@ -27,7 +26,7 @@ function getColumnDefaultConfig(column) {
|
|
|
27
26
|
};
|
|
28
27
|
case "operator":
|
|
29
28
|
return {
|
|
30
|
-
label: t("table.
|
|
29
|
+
label: useLocale.$t("table.operation"),
|
|
31
30
|
prop: `operator_prop`,
|
|
32
31
|
fixed: "right"
|
|
33
32
|
};
|
|
@@ -13,9 +13,9 @@ var search = require('./js/search.js');
|
|
|
13
13
|
var headerItem = require('./cpns/headerItem.vue.js');
|
|
14
14
|
var columnSelect = require('./cpns/columnSelect.vue.js');
|
|
15
15
|
var virtualTable = require('./cpns/virtualTable.vue.js');
|
|
16
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
17
16
|
var useMixins = require('../../hooks/useMixins.js');
|
|
18
17
|
var index$1 = require('../hyIcon/index.js');
|
|
18
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
19
19
|
var index$2 = require('../hyTooltip/index.js');
|
|
20
20
|
var index$3 = require('../hyInput/index.js');
|
|
21
21
|
var index$4 = require('../hyButton/index.js');
|
|
@@ -203,13 +203,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
203
203
|
"expand-change",
|
|
204
204
|
"on-select-checkbox",
|
|
205
205
|
"reqSuccess",
|
|
206
|
-
"search-data"
|
|
206
|
+
"search-data",
|
|
207
|
+
"scroll"
|
|
207
208
|
], ["update:loading"]),
|
|
208
209
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
209
210
|
const props = __props;
|
|
210
211
|
const emits = __emit;
|
|
211
212
|
const loading = vue.useModel(__props, "loading");
|
|
212
|
-
const { t } = useLocale.useLocale();
|
|
213
213
|
const containerRef = vue.useTemplateRef("containerRef");
|
|
214
214
|
const tableRef = vue.useTemplateRef("tableRef");
|
|
215
215
|
const appSearchRef = vue.useTemplateRef("appSearchRef");
|
|
@@ -233,12 +233,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
233
233
|
clearSelectedList,
|
|
234
234
|
expandRowKeys,
|
|
235
235
|
expandRowKeyMap,
|
|
236
|
+
getRowExpansion,
|
|
236
237
|
setRowExpansion,
|
|
237
238
|
toggleRowExpansion,
|
|
238
239
|
onTableRowClickHandler,
|
|
239
240
|
onTableRowContextmenuHandler,
|
|
240
241
|
onTableRowExpandChangeHandler,
|
|
241
242
|
onTableSelectHandler,
|
|
243
|
+
scrollToTop,
|
|
244
|
+
scrollToLeft,
|
|
245
|
+
onScrollHandler,
|
|
242
246
|
// useAppTableSearch
|
|
243
247
|
// 表单查询
|
|
244
248
|
totalElements,
|
|
@@ -286,6 +290,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
286
290
|
getTableDataSource,
|
|
287
291
|
clearSelection,
|
|
288
292
|
clearSelectedList,
|
|
293
|
+
getRowExpansion,
|
|
289
294
|
setRowExpansion,
|
|
290
295
|
toggleRowExpansion,
|
|
291
296
|
showAppTableLoading,
|
|
@@ -293,7 +298,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
293
298
|
getOptions,
|
|
294
299
|
getOptionsFields,
|
|
295
300
|
getOptionsError,
|
|
296
|
-
getOptionsByField
|
|
301
|
+
getOptionsByField,
|
|
302
|
+
scrollToTop,
|
|
303
|
+
scrollToLeft
|
|
297
304
|
});
|
|
298
305
|
return (_ctx, _cache) => {
|
|
299
306
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -319,7 +326,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
319
326
|
}, null, 8, ["columns", "columns-editable", "origin-columns", "onConfirm"])) : vue.createCommentVNode("v-if", true),
|
|
320
327
|
__props.filterColumns.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
321
328
|
key: 1,
|
|
322
|
-
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2",
|
|
329
|
+
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2 box-border",
|
|
323
330
|
onClick: vue.unref(switchShowFilter)
|
|
324
331
|
}, [
|
|
325
332
|
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
@@ -329,7 +336,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
329
336
|
vue.createElementVNode(
|
|
330
337
|
"span",
|
|
331
338
|
null,
|
|
332
|
-
vue.toDisplayString(vue.unref(showFilter) ? vue.unref(t)("table.hideFilter") : vue.unref(t)("table.displayFilter")),
|
|
339
|
+
vue.toDisplayString(vue.unref(showFilter) ? vue.unref(useLocale.$t)("table.hideFilter") : vue.unref(useLocale.$t)("table.displayFilter")),
|
|
333
340
|
1
|
|
334
341
|
/* TEXT */
|
|
335
342
|
)
|
|
@@ -342,14 +349,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
342
349
|
}, {
|
|
343
350
|
content: vue.withCtx(() => [
|
|
344
351
|
vue.createElementVNode("span", {
|
|
345
|
-
innerHTML: vue.unref(t)("table.searchByInput", [vue.unref(searchPlaceholder)])
|
|
352
|
+
innerHTML: vue.unref(useLocale.$t)("table.searchByInput", [vue.unref(searchPlaceholder)])
|
|
346
353
|
}, null, 8, ["innerHTML"])
|
|
347
354
|
]),
|
|
348
355
|
default: vue.withCtx(() => [
|
|
349
356
|
vue.createVNode(vue.unref(index$3.HyInputSearch), {
|
|
350
357
|
modelValue: __props.filterModel.query,
|
|
351
358
|
"onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
|
|
352
|
-
placeholder: vue.unref(t)("table.searchFor", [__props.controllerText || ""]),
|
|
359
|
+
placeholder: vue.unref(useLocale.$t)("table.searchFor", [__props.controllerText || ""]),
|
|
353
360
|
onSearch: vue.unref(onSearchQueryHandler)
|
|
354
361
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onSearch"])
|
|
355
362
|
]),
|
|
@@ -425,14 +432,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
425
432
|
onSelectAll: (list) => vue.unref(onTableSelectHandler)(list, null, true),
|
|
426
433
|
onRowClick: vue.unref(onTableRowClickHandler),
|
|
427
434
|
onRowContextmenu: vue.unref(onTableRowContextmenuHandler),
|
|
428
|
-
onExpandChange: vue.unref(onTableRowExpandChangeHandler)
|
|
435
|
+
onExpandChange: vue.unref(onTableRowExpandChangeHandler),
|
|
436
|
+
onScroll: vue.unref(onScrollHandler)
|
|
429
437
|
}), {
|
|
430
438
|
empty: vue.withCtx(() => [
|
|
431
439
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
432
440
|
vue.createElementVNode(
|
|
433
441
|
"span",
|
|
434
442
|
null,
|
|
435
|
-
vue.toDisplayString(__props.emptyText || vue.unref(t)("hy.noData")),
|
|
443
|
+
vue.toDisplayString(__props.emptyText || vue.unref(useLocale.$t)("hy.noData")),
|
|
436
444
|
1
|
|
437
445
|
/* TEXT */
|
|
438
446
|
)
|
|
@@ -485,11 +493,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
485
493
|
(vue.openBlock(true), vue.createElementBlock(
|
|
486
494
|
vue.Fragment,
|
|
487
495
|
null,
|
|
488
|
-
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
489
|
-
column,
|
|
490
|
-
scope,
|
|
491
|
-
"default"
|
|
492
|
-
), (citem, cindex) => {
|
|
496
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(column, scope, "default"), (citem, cindex) => {
|
|
493
497
|
return vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
494
498
|
key: cindex,
|
|
495
499
|
"is-always": "",
|
|
@@ -555,11 +559,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
555
559
|
(vue.openBlock(true), vue.createElementBlock(
|
|
556
560
|
vue.Fragment,
|
|
557
561
|
null,
|
|
558
|
-
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
559
|
-
column,
|
|
560
|
-
scope,
|
|
561
|
-
"more"
|
|
562
|
-
), (citem, cindex) => {
|
|
562
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(column, scope, "more"), (citem, cindex) => {
|
|
563
563
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
564
564
|
key: cindex,
|
|
565
565
|
command: cindex,
|
|
@@ -615,7 +615,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
615
615
|
vue.createVNode(vue.unref(index$2.HyTooltip), {
|
|
616
616
|
"is-always": "",
|
|
617
617
|
overLine: 1,
|
|
618
|
-
content: vue.unref(t)("table.moreOperations")
|
|
618
|
+
content: vue.unref(useLocale.$t)("table.moreOperations")
|
|
619
619
|
}, {
|
|
620
620
|
default: vue.withCtx(() => [
|
|
621
621
|
vue.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" }, [
|
|
@@ -632,7 +632,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
632
632
|
vue.createElementVNode(
|
|
633
633
|
"div",
|
|
634
634
|
{ class: "mt-0.5" },
|
|
635
|
-
vue.toDisplayString(vue.unref(t)("table.more")),
|
|
635
|
+
vue.toDisplayString(vue.unref(useLocale.$t)("table.more")),
|
|
636
636
|
1
|
|
637
637
|
/* TEXT */
|
|
638
638
|
)
|
|
@@ -696,7 +696,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
696
696
|
]),
|
|
697
697
|
_: 3
|
|
698
698
|
/* FORWARDED */
|
|
699
|
-
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "expand-row-keys", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange"])) : vue.createCommentVNode("v-if", true),
|
|
699
|
+
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "expand-row-keys", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange", "onScroll"])) : vue.createCommentVNode("v-if", true),
|
|
700
700
|
__props.type === "virtual" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElAutoResizer), { key: 1 }, {
|
|
701
701
|
default: vue.withCtx(({ height, width }) => [
|
|
702
702
|
vue.createVNode(virtualTable.default, vue.mergeProps({
|
|
@@ -725,7 +725,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
725
725
|
onSelectAll: vue.unref(onTableSelectHandler),
|
|
726
726
|
onRowClick: vue.unref(onTableRowClickHandler),
|
|
727
727
|
onRowContextmenu: vue.unref(onTableRowContextmenuHandler),
|
|
728
|
-
onExpandClick: vue.unref(onTableRowExpandChangeHandler)
|
|
728
|
+
onExpandClick: vue.unref(onTableRowExpandChangeHandler),
|
|
729
|
+
onScroll: vue.unref(onScrollHandler)
|
|
729
730
|
}), vue.createSlots({
|
|
730
731
|
empty: vue.withCtx(() => [
|
|
731
732
|
vue.createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
|
|
@@ -733,7 +734,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
733
734
|
vue.createElementVNode(
|
|
734
735
|
"span",
|
|
735
736
|
null,
|
|
736
|
-
vue.toDisplayString(__props.emptyText || vue.unref(t)("hy.noData")),
|
|
737
|
+
vue.toDisplayString(__props.emptyText || vue.unref(useLocale.$t)("hy.noData")),
|
|
737
738
|
1
|
|
738
739
|
/* TEXT */
|
|
739
740
|
)
|
|
@@ -751,7 +752,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
751
752
|
])
|
|
752
753
|
};
|
|
753
754
|
})
|
|
754
|
-
]), 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"])
|
|
755
|
+
]), 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"])
|
|
755
756
|
]),
|
|
756
757
|
_: 3
|
|
757
758
|
/* FORWARDED */
|
|
@@ -765,11 +766,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
765
766
|
vue.createElementVNode(
|
|
766
767
|
"div",
|
|
767
768
|
{ class: "absolute left-4 top-1/2 transform -translate-y-1/2 text-sm" },
|
|
768
|
-
vue.toDisplayString(vue.unref(t)("table.aTotalOfPiecesOfData", [vue.unref(totalElements)])),
|
|
769
|
+
vue.toDisplayString(vue.unref(useLocale.$t)("table.aTotalOfPiecesOfData", [vue.unref(totalElements)])),
|
|
769
770
|
1
|
|
770
771
|
/* TEXT */
|
|
771
772
|
),
|
|
772
|
-
vue.
|
|
773
|
+
vue.unref(totalElements) >= 10 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElPagination), {
|
|
774
|
+
key: 0,
|
|
773
775
|
"current-page": __props.filterModel.page,
|
|
774
776
|
"onUpdate:currentPage": ($event) => __props.filterModel.page = $event,
|
|
775
777
|
"page-size": __props.filterModel.size,
|
|
@@ -780,12 +782,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
780
782
|
layout: __props.layout,
|
|
781
783
|
size: "default",
|
|
782
784
|
background: "",
|
|
783
|
-
"hide-on-single-page": "",
|
|
784
785
|
onSizeChange: vue.unref(onSizeChangeHandler),
|
|
785
786
|
onCurrentChange: vue.unref(onCurrentChangeHandler)
|
|
786
|
-
}, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"]),
|
|
787
|
+
}, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"])) : vue.createCommentVNode("v-if", true),
|
|
787
788
|
vue.unref(selectedList) && vue.unref(selectedList).length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
788
|
-
key:
|
|
789
|
+
key: 1,
|
|
789
790
|
class: "absolute right-4 top-1/2 transform -translate-y-1/2"
|
|
790
791
|
}, [
|
|
791
792
|
vue.renderSlot(_ctx.$slots, "multiple-operator-slot")
|
|
@@ -804,12 +805,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
804
805
|
},
|
|
805
806
|
"virtual-triggering": "",
|
|
806
807
|
trigger: "contextmenu",
|
|
807
|
-
placement: "bottom",
|
|
808
|
-
onCommand: ($event) => vue.unref(index.operatorClickHandler)(
|
|
809
|
-
$event,
|
|
810
|
-
vue.unref(tableTriggerRef).column,
|
|
811
|
-
vue.unref(tableTriggerRef).scope
|
|
812
|
-
)
|
|
808
|
+
placement: "bottom-end",
|
|
809
|
+
onCommand: ($event) => vue.unref(index.operatorClickHandler)($event, vue.unref(tableTriggerRef).column, vue.unref(tableTriggerRef).scope)
|
|
813
810
|
}, {
|
|
814
811
|
dropdown: vue.withCtx(() => [
|
|
815
812
|
vue.createVNode(vue.unref(elementPlus.ElDropdownMenu), { class: "hy-table-dropdown-menu" }, {
|
|
@@ -817,10 +814,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
817
814
|
(vue.openBlock(true), vue.createElementBlock(
|
|
818
815
|
vue.Fragment,
|
|
819
816
|
null,
|
|
820
|
-
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
821
|
-
vue.unref(tableTriggerRef).column,
|
|
822
|
-
vue.unref(tableTriggerRef).scope
|
|
823
|
-
), (citem, cindex) => {
|
|
817
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(vue.unref(tableTriggerRef).column, vue.unref(tableTriggerRef).scope), (citem, cindex) => {
|
|
824
818
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
825
819
|
key: cindex,
|
|
826
820
|
command: cindex,
|
|
@@ -5,10 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
-
require('../../hooks/index.js');
|
|
9
8
|
require('../../utils/index.js');
|
|
10
9
|
require('../index.js');
|
|
11
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
12
10
|
var is = require('../../utils/is.js');
|
|
13
11
|
var index = require('../hyTooltip/index.js');
|
|
14
12
|
var index$1 = require('../hyButton/index.js');
|
|
@@ -74,7 +72,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
74
72
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
75
73
|
const props = __props;
|
|
76
74
|
const emits = __emit;
|
|
77
|
-
const { t } = useLocale.useLocale();
|
|
78
75
|
const visible = vue.ref(false);
|
|
79
76
|
const dataList = vue.ref([]);
|
|
80
77
|
const selectedData = vue.ref(null);
|
|
@@ -189,7 +186,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
189
186
|
}, {
|
|
190
187
|
content: vue.withCtx(() => [
|
|
191
188
|
vue.createElementVNode("div", { class: "h-full flex items-center justify-center pl-[14px]" }, [
|
|
192
|
-
vue.createVNode(vue.unref(index$2.HyIcon), {
|
|
189
|
+
vue.createVNode(vue.unref(index$2.HyIcon), {
|
|
190
|
+
"svg-name": __props.svgName,
|
|
191
|
+
class: "w-[14px] h-[14px]"
|
|
192
|
+
}, null, 8, ["svg-name"]),
|
|
193
193
|
vue.createElementVNode(
|
|
194
194
|
"span",
|
|
195
195
|
{ class: "ml-[6px]" },
|
|
@@ -11,7 +11,6 @@ require('../index.js');
|
|
|
11
11
|
var tableForm = require('./tableForm.vue.js');
|
|
12
12
|
var index = require('./js/index.js');
|
|
13
13
|
var useApi = require('../../hooks/useApi.js');
|
|
14
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
15
14
|
var index$1 = require('../hyConfirmDialog/index.js');
|
|
16
15
|
var is = require('../../utils/is.js');
|
|
17
16
|
var index$2 = require('../hyIcon/index.js');
|
|
@@ -100,7 +99,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
100
99
|
const props = __props;
|
|
101
100
|
const emits = __emit;
|
|
102
101
|
const { api } = useApi.useApi();
|
|
103
|
-
const { t } = useLocale.useLocale();
|
|
104
102
|
const containerRef = vue.useTemplateRef("containerRef");
|
|
105
103
|
const uploadRef = vue.useTemplateRef("uploadRef");
|
|
106
104
|
const tableRef = vue.useTemplateRef("tableRef");
|
|
@@ -301,9 +299,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
301
299
|
emits("submit", submitResult);
|
|
302
300
|
onResetUpload();
|
|
303
301
|
} else {
|
|
304
|
-
elementPlus.ElMessage.warning(
|
|
305
|
-
`${submitResult.success} \u6761\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF0C ${submitResult.failed} \u6761\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8C03\u6574`
|
|
306
|
-
);
|
|
302
|
+
elementPlus.ElMessage.warning(`${submitResult.success} \u6761\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF0C ${submitResult.failed} \u6761\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8C03\u6574`);
|
|
307
303
|
emits("submit", submitResult);
|
|
308
304
|
}
|
|
309
305
|
}
|
|
@@ -407,8 +403,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
407
403
|
vue.createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
|
|
408
404
|
vue.createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
|
|
409
405
|
vue.createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
|
|
410
|
-
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, "
|
|
411
|
-
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, "
|
|
406
|
+
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4 box-border" }, ".xls"),
|
|
407
|
+
vue.createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4 box-border" }, ".xlsx"),
|
|
412
408
|
vue.createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
|
|
413
409
|
])
|
|
414
410
|
])
|
|
@@ -24,10 +24,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
|
|
|
24
24
|
}, {});
|
|
25
25
|
Object.entries(ruleList || {}).forEach(([key, citem]) => {
|
|
26
26
|
if (columnMap[key]) {
|
|
27
|
-
rules[key] = [
|
|
28
|
-
...is.isArray(citem) ? citem : [citem],
|
|
29
|
-
...rules[key]
|
|
30
|
-
].filter(Boolean);
|
|
27
|
+
rules[key] = [...is.isArray(citem) ? citem : [citem], ...rules[key]].filter(Boolean);
|
|
31
28
|
}
|
|
32
29
|
});
|
|
33
30
|
const validator = new AsyncValidator(rules);
|
|
@@ -55,10 +52,7 @@ const doReadExcel = (files, props) => {
|
|
|
55
52
|
const ws1 = XLSX.utils.sheet_to_json(workbook.Sheets[wsname1]);
|
|
56
53
|
let content = formColumns.reduce((content2, column) => {
|
|
57
54
|
const title = column.import ? column.import.title : column.label;
|
|
58
|
-
return content2.replace(
|
|
59
|
-
new RegExp(`"${title}":`, "g"),
|
|
60
|
-
`"${column.prop}":`
|
|
61
|
-
);
|
|
55
|
+
return content2.replace(new RegExp(`"${title}":`, "g"), `"${column.prop}":`);
|
|
62
56
|
}, JSON.stringify(ws1));
|
|
63
57
|
let dataSource = JSON.parse(content);
|
|
64
58
|
if (beforeDataHandle) {
|
|
@@ -15,9 +15,7 @@ const useAppTableForm = (config = {}) => {
|
|
|
15
15
|
expandType: "expand",
|
|
16
16
|
width: 48
|
|
17
17
|
},
|
|
18
|
-
...columns.filter(
|
|
19
|
-
(column) => !["expand", "operator"].includes(column.type)
|
|
20
|
-
),
|
|
18
|
+
...columns.filter((column) => !["expand", "operator"].includes(column.type)),
|
|
21
19
|
{
|
|
22
20
|
label: "\u5BFC\u5165\u72B6\u6001",
|
|
23
21
|
prop: "validateStatus",
|
|
@@ -25,10 +23,7 @@ const useAppTableForm = (config = {}) => {
|
|
|
25
23
|
}
|
|
26
24
|
];
|
|
27
25
|
const { tableColumns } = useAppTable.useAppTable({ columns });
|
|
28
|
-
const { formModel, formColumns } = useAppForm.useAppForm(
|
|
29
|
-
config.formColumns,
|
|
30
|
-
config.formModel
|
|
31
|
-
);
|
|
26
|
+
const { formModel, formColumns } = useAppForm.useAppForm(config.formColumns, config.formModel);
|
|
32
27
|
formColumns.value.forEach((item) => {
|
|
33
28
|
if (is.isString(item.import)) {
|
|
34
29
|
item.import = {
|