hy-dispatch-ui-v3 0.2.77 → 0.2.78
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 +91 -8
- package/es/api/common.mjs +28 -0
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.mjs +5 -8
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.mjs +108 -125
- package/es/bussiness/hyDepartmentTypeOperation/locale/en_US.mjs +7 -7
- package/es/bussiness/hyDepartmentTypeOperation/locale/zh_CN.mjs +6 -6
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.mjs +5 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.mjs +6 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.mjs +182 -0
- package/es/bussiness/hyDisplayQueryAddress/index.mjs +8 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/en_US.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/index.mjs +2 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/zh_CN.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.vue.mjs +247 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.vue.mjs +206 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.vue.mjs +238 -0
- package/es/bussiness/hyFilePlayback/filePlayback.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.vue.mjs +166 -0
- package/es/bussiness/hyFilePlayback/index.mjs +8 -0
- package/es/bussiness/hyFilePlayback/locale/en_US.mjs +22 -0
- package/es/bussiness/hyFilePlayback/locale/index.mjs +2 -0
- package/es/bussiness/hyFilePlayback/locale/zh_CN.mjs +22 -0
- package/es/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyCutter/cutter.vue.mjs +2 -2
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +2 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +3 -2
- package/es/components/hyForm/js/index.mjs +2 -8
- package/es/components/hySearch/cpns/searchItem.vue.mjs +57 -67
- package/es/components/hySearch/js/index.mjs +1 -35
- package/es/components/hySearch/js/useAppSearch.mjs +3 -3
- package/es/components/hySearch/style/search.scss +1 -0
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +5 -5
- package/es/components/hyTable/js/index.mjs +44 -4
- package/es/components/hyTable/js/search.mjs +0 -6
- package/es/components/hyTable/table.vue.mjs +47 -30
- package/es/components/hyTooltip/tooltip.vue.mjs +14 -6
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +1 -1
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +3 -3
- package/es/components-map.mjs +2 -0
- package/es/hooks/useBaseMainStore.mjs +16 -5
- package/es/hooks/useCurrentBus.mjs +5 -4
- package/es/hooks/useDialog.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +19 -18
- package/es/index.mjs +5 -2
- package/es/locale/en_US.mjs +1 -0
- package/es/locale/zh_CN.mjs +1 -0
- package/es/style/index.scss +2 -2
- package/es/utils/file.mjs +1 -2
- package/es/utils/form.mjs +59 -5
- package/es/utils/index.mjs +3 -2
- package/es/utils/map/hook/leafletjs.mjs +4 -0
- package/es/utils/map/index.mjs +4 -0
- package/es/utils/timeUtils.mjs +95 -0
- package/es/version.mjs +1 -1
- package/lib/api/common.js +33 -0
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.js +3 -6
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.js +107 -124
- package/lib/bussiness/hyDepartmentTypeOperation/locale/en_US.js +7 -7
- package/lib/bussiness/hyDepartmentTypeOperation/locale/zh_CN.js +6 -6
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.js +186 -0
- package/lib/bussiness/hyDisplayQueryAddress/index.js +13 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/en_US.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/index.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/zh_CN.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.vue.js +251 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.vue.js +210 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.vue.js +242 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.vue.js +170 -0
- package/lib/bussiness/hyFilePlayback/index.js +13 -0
- package/lib/bussiness/hyFilePlayback/locale/en_US.js +26 -0
- package/lib/bussiness/hyFilePlayback/locale/index.js +9 -0
- package/lib/bussiness/hyFilePlayback/locale/zh_CN.js +26 -0
- package/lib/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/lib/bussiness/index.js +18 -14
- package/lib/components/hyCutter/cutter.vue.js +2 -2
- package/lib/components/hyForm/cpns/arrayItem.vue.js +2 -2
- package/lib/components/hyForm/cpns/formItem.vue.js +3 -2
- package/lib/components/hyForm/js/index.js +0 -7
- package/lib/components/hySearch/cpns/searchItem.vue.js +64 -74
- package/lib/components/hySearch/js/index.js +0 -36
- package/lib/components/hySearch/js/useAppSearch.js +3 -3
- package/lib/components/hySearch/style/search.scss +1 -0
- package/lib/components/hyTable/cpns/virtualTable.vue.js +4 -4
- package/lib/components/hyTable/js/index.js +45 -3
- package/lib/components/hyTable/js/search.js +0 -6
- package/lib/components/hyTable/table.vue.js +46 -29
- package/lib/components/hyTooltip/tooltip.vue.js +13 -5
- package/lib/components/hyUserAvatar/userAvatar.vue.js +1 -1
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +3 -3
- package/lib/components-map.js +2 -0
- package/lib/hooks/useBaseMainStore.js +15 -4
- package/lib/hooks/useCurrentBus.js +4 -3
- package/lib/hooks/useDialog.js +2 -2
- package/lib/hooks/useGlobalConfig.js +18 -17
- package/lib/index.js +70 -55
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh_CN.js +1 -0
- package/lib/style/index.scss +2 -2
- package/lib/utils/file.js +1 -2
- package/lib/utils/form.js +61 -4
- package/lib/utils/index.js +12 -1
- package/lib/utils/map/hook/leafletjs.js +4 -0
- package/lib/utils/map/index.js +4 -0
- package/lib/utils/timeUtils.js +105 -0
- package/lib/version.js +1 -1
- package/package.json +14 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('./filePlayback.vue.js');
|
|
6
|
+
require('../../utils/index.js');
|
|
7
|
+
var handler = require('../../utils/handler.js');
|
|
8
|
+
var filePlayback_vue_vue_type_script_setup_true_lang = require('./filePlayback2.vue.js');
|
|
9
|
+
|
|
10
|
+
const HyFilePlayback = handler.withInstall(filePlayback_vue_vue_type_script_setup_true_lang.default);
|
|
11
|
+
|
|
12
|
+
exports.HyFilePlayback = HyFilePlayback;
|
|
13
|
+
exports.default = HyFilePlayback;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var en_US = {
|
|
6
|
+
"fileNumber": "File Number",
|
|
7
|
+
"videoDuration": "Video Duration",
|
|
8
|
+
"fileName": "File Name",
|
|
9
|
+
"resolution": "Resolution",
|
|
10
|
+
"creationTime": "Creation Time",
|
|
11
|
+
"fileSize": "File Size",
|
|
12
|
+
"collectionTime": "Collection Time",
|
|
13
|
+
"deviceNumber": "Device Number",
|
|
14
|
+
"deviceName": "Device Name",
|
|
15
|
+
"workNumber": "Work Number",
|
|
16
|
+
"collectionStationIP": "Collection Station IP",
|
|
17
|
+
"userName-0": "User Name",
|
|
18
|
+
"deviceCode": "Device Code",
|
|
19
|
+
"detectionIsCorrect": "Detection Is Correct",
|
|
20
|
+
"audioDuration": "Audio Duration",
|
|
21
|
+
"equipmentNumber": "Device Number:",
|
|
22
|
+
"shootingTime": "Shooting Time",
|
|
23
|
+
"clickTheImageToDisplayInFullScreen": "Click The Image To Display In Full Screen"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.default = en_US;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var zh_CN = {
|
|
6
|
+
"fileNumber": "\u6587\u4EF6\u7F16\u53F7",
|
|
7
|
+
"videoDuration": "\u89C6\u9891\u65F6\u957F",
|
|
8
|
+
"fileName": "\u6587\u4EF6\u540D\u79F0",
|
|
9
|
+
"resolution": "\u5206\u8FA8\u7387",
|
|
10
|
+
"creationTime": "\u521B\u5EFA\u65F6\u95F4",
|
|
11
|
+
"fileSize": "\u6587\u4EF6\u5927\u5C0F",
|
|
12
|
+
"collectionTime": "\u91C7\u96C6\u65F6\u95F4",
|
|
13
|
+
"deviceNumber": "\u8BBE\u5907\u7F16\u53F7",
|
|
14
|
+
"deviceName": "\u8BBE\u5907\u540D\u79F0",
|
|
15
|
+
"workNumber": "\u5DE5\u53F7",
|
|
16
|
+
"collectionStationIP": "\u91C7\u96C6\u7AD9IP",
|
|
17
|
+
"userName-0": "\u7528\u6237\u540D\u79F0",
|
|
18
|
+
"deviceCode": "\u8BBE\u5907\u7F16\u7801",
|
|
19
|
+
"detectionIsCorrect": "\u68C0\u6D4B\u6B63\u786E",
|
|
20
|
+
"audioDuration": "\u97F3\u9891\u65F6\u957F",
|
|
21
|
+
"equipmentNumber": "\u8BBE\u5907\u7F16\u53F7\uFF1A",
|
|
22
|
+
"shootingTime": "\u62CD\u6444\u65F6\u95F4",
|
|
23
|
+
"clickTheImageToDisplayInFullScreen": "\u70B9\u51FB\u56FE\u7247\uFF0C\u5373\u53EF\u5168\u5C4F\u5C55\u793A"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.default = zh_CN;
|
package/lib/bussiness/index.js
CHANGED
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index$2 = require('./hyDepartmentTypeOperation/index.js');
|
|
4
|
-
var index$
|
|
5
|
-
var index$
|
|
4
|
+
var index$6 = require('./hyMapAearchPlace/index.js');
|
|
5
|
+
var index$a = require('./hyUserTree/index.js');
|
|
6
6
|
var index$3 = require('./hyDeviceTree/index.js');
|
|
7
|
-
var index$
|
|
8
|
-
var index$
|
|
7
|
+
var index$7 = require('./hyOrgGroupTree/index.js');
|
|
8
|
+
var index$8 = require('./hyPlanGroupDeviceTree/index.js');
|
|
9
9
|
var index = require('./hyAcquisitionStationTree/index.js');
|
|
10
10
|
var index$1 = require('./hyElectronicFence/index.js');
|
|
11
|
-
var index$
|
|
11
|
+
var index$9 = require('./hyRuleSetting/index.js');
|
|
12
|
+
var index$4 = require('./hyDisplayQueryAddress/index.js');
|
|
13
|
+
var index$5 = require('./hyFilePlayback/index.js');
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
exports.HyDepartmentTypeOperation = index$2.HyDepartmentTypeOperation;
|
|
16
18
|
exports.HyDepartmentTypeOperationTiantong = index$2.HyDepartmentTypeOperationTiantong;
|
|
17
|
-
exports.HyMapAearchPlace = index$
|
|
18
|
-
exports.HyUserTree = index$
|
|
19
|
+
exports.HyMapAearchPlace = index$6.HyMapAearchPlace;
|
|
20
|
+
exports.HyUserTree = index$a.HyUserTree;
|
|
19
21
|
exports.HyDeviceTree = index$3.HyDeviceTree;
|
|
20
|
-
exports.HyOrgGroupTree = index$
|
|
21
|
-
exports.HyPlanGroupDeviceTree = index$
|
|
22
|
+
exports.HyOrgGroupTree = index$7.HyOrgGroupTree;
|
|
23
|
+
exports.HyPlanGroupDeviceTree = index$8.HyPlanGroupDeviceTree;
|
|
22
24
|
exports.HyAcquisitionStationTree = index.HyAcquisitionStationTree;
|
|
23
25
|
exports.HyAddElectronicFenceDialog = index$1.HyAddElectronicFenceDialog;
|
|
24
26
|
exports.HyBatchSetElectronicFenceUserDialog = index$1.HyBatchSetElectronicFenceUserDialog;
|
|
25
27
|
exports.HyElectronicFence = index$1.HyElectronicFence;
|
|
26
28
|
exports.HyElectronicFenceAssociatedUsersDialog = index$1.HyElectronicFenceAssociatedUsersDialog;
|
|
27
|
-
exports.HyRuleAssignDialog = index$
|
|
28
|
-
exports.HyRuleFenceDialog = index$
|
|
29
|
-
exports.HyRuleSetting = index$
|
|
30
|
-
exports.HyRuleSettingDialog = index$
|
|
31
|
-
exports.HySetRuleAggregationAlarmDialog = index$
|
|
29
|
+
exports.HyRuleAssignDialog = index$9.HyRuleAssignDialog;
|
|
30
|
+
exports.HyRuleFenceDialog = index$9.HyRuleFenceDialog;
|
|
31
|
+
exports.HyRuleSetting = index$9.HyRuleSetting;
|
|
32
|
+
exports.HyRuleSettingDialog = index$9.HyRuleSettingDialog;
|
|
33
|
+
exports.HySetRuleAggregationAlarmDialog = index$9.HySetRuleAggregationAlarmDialog;
|
|
34
|
+
exports.HyDisplayQueryAddress = index$4.HyDisplayQueryAddress;
|
|
35
|
+
exports.HyFilePlayback = index$5.HyFilePlayback;
|
|
@@ -199,9 +199,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
199
199
|
}
|
|
200
200
|
function setDragLevelIndex() {
|
|
201
201
|
const { baseMainStore } = useBaseMainStore.useBaseMainStore();
|
|
202
|
-
const dragLevel = baseMainStore.getters.dragLevel;
|
|
202
|
+
const dragLevel = baseMainStore.value.getters.dragLevel;
|
|
203
203
|
HyDialogRef.value.setDragLevelIndex(dragLevel);
|
|
204
|
-
baseMainStore.commit("setDragLevel");
|
|
204
|
+
baseMainStore.value.commit("setDragLevel");
|
|
205
205
|
}
|
|
206
206
|
__expose({
|
|
207
207
|
open: async (params) => {
|
|
@@ -104,11 +104,11 @@ const _sfc_main = {
|
|
|
104
104
|
/* TEXT */
|
|
105
105
|
)
|
|
106
106
|
]),
|
|
107
|
-
vue.unref(
|
|
107
|
+
vue.unref(form.columnHelpHandler)(props, __props.column) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
|
|
108
108
|
key: 0,
|
|
109
109
|
"is-always": "",
|
|
110
110
|
overLine: 1,
|
|
111
|
-
content: vue.unref(
|
|
111
|
+
content: vue.unref(form.columnHelpHandler)(props, __props.column)
|
|
112
112
|
}, {
|
|
113
113
|
default: vue.withCtx(() => [
|
|
114
114
|
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
@@ -126,6 +126,7 @@ const _sfc_main = {
|
|
|
126
126
|
...config,
|
|
127
127
|
...attrs,
|
|
128
128
|
label: form.columnLabelHandler(props.column, props.model),
|
|
129
|
+
noDataText: form.columnnoDataTextHandler(props.column, props.model),
|
|
129
130
|
placeholder: form.columnPlaceholderHandler(props.column, props.model)
|
|
130
131
|
};
|
|
131
132
|
});
|
|
@@ -283,7 +284,7 @@ const _sfc_main = {
|
|
|
283
284
|
key: 0,
|
|
284
285
|
class: "label-required"
|
|
285
286
|
})) : vue.createCommentVNode("v-if", true),
|
|
286
|
-
vue.unref(
|
|
287
|
+
vue.unref(form.columnHelpHandler)(props, __props.column) || __props.column.tooltipContentSlot ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
|
|
287
288
|
key: 1,
|
|
288
289
|
"is-always": "",
|
|
289
290
|
overLine: 1
|
|
@@ -292,7 +293,7 @@ const _sfc_main = {
|
|
|
292
293
|
!__props.column.tooltipContentSlot ? (vue.openBlock(), vue.createElementBlock(
|
|
293
294
|
"span",
|
|
294
295
|
{ key: 0 },
|
|
295
|
-
vue.toDisplayString(vue.unref(
|
|
296
|
+
vue.toDisplayString(vue.unref(form.columnHelpHandler)(props, __props.column)),
|
|
296
297
|
1
|
|
297
298
|
/* TEXT */
|
|
298
299
|
)) : vue.createCommentVNode("v-if", true),
|
|
@@ -39,12 +39,6 @@ function columnVisibleHandler(props, column) {
|
|
|
39
39
|
if (is.isFunction(visible)) return visible(column, props.model);
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
|
-
function columnHelpHandler(props, column) {
|
|
43
|
-
const help = vue.unref(column.help);
|
|
44
|
-
if (is.isString(help)) return help;
|
|
45
|
-
if (is.isFunction(help)) return help(column, props.model);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
42
|
function isReadonly(props, column) {
|
|
49
43
|
if (props.readonly) return props.readonly;
|
|
50
44
|
const readonly = vue.unref(column.readonly);
|
|
@@ -118,7 +112,6 @@ function optionsHandler(props, column) {
|
|
|
118
112
|
return [];
|
|
119
113
|
}
|
|
120
114
|
|
|
121
|
-
exports.columnHelpHandler = columnHelpHandler;
|
|
122
115
|
exports.columnItemStyle = columnItemStyle;
|
|
123
116
|
exports.columnShowHandler = columnShowHandler;
|
|
124
117
|
exports.columnVisibleHandler = columnVisibleHandler;
|
|
@@ -10,10 +10,12 @@ require('../../index.js');
|
|
|
10
10
|
var index = require('../js/index.js');
|
|
11
11
|
var is = require('../../../utils/is.js');
|
|
12
12
|
var form = require('../../../utils/form.js');
|
|
13
|
-
var index$1 = require('../../
|
|
14
|
-
var index$2 = require('../../
|
|
15
|
-
var index$3 = require('../../
|
|
16
|
-
var index$4 = require('../../
|
|
13
|
+
var index$1 = require('../../hyTooltip/index.js');
|
|
14
|
+
var index$2 = require('../../hyIcon/index.js');
|
|
15
|
+
var index$3 = require('../../hyInput/index.js');
|
|
16
|
+
var index$4 = require('../../hyDatePicker/index.js');
|
|
17
|
+
var index$5 = require('../../hyTimePicker/index.js');
|
|
18
|
+
var index$6 = require('../../hyOrgCascader/index.js');
|
|
17
19
|
|
|
18
20
|
const _sfc_main = {
|
|
19
21
|
__name: "searchItem",
|
|
@@ -79,9 +81,15 @@ const _sfc_main = {
|
|
|
79
81
|
return {
|
|
80
82
|
...props.column.attrs,
|
|
81
83
|
label: form.columnLabelHandler(props.column, props.model),
|
|
82
|
-
|
|
84
|
+
noDataText: form.columnnoDataTextHandler(props.column, props.model),
|
|
85
|
+
placeholder: props.column.optionsError === "error" ? "\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D" : form.columnPlaceholderHandler(props.column, props.model),
|
|
86
|
+
shortcuts: form.genColumnShortcuts(props.column)
|
|
83
87
|
};
|
|
84
88
|
});
|
|
89
|
+
const helpVisible = vue.ref(false);
|
|
90
|
+
function helpVisibleHandler(visible) {
|
|
91
|
+
helpVisible.value = visible;
|
|
92
|
+
}
|
|
85
93
|
function obtainOptions(isMountedLoad = false) {
|
|
86
94
|
return new Promise(async (resolve, reject) => {
|
|
87
95
|
if (props.column.optionsFn) {
|
|
@@ -159,21 +167,6 @@ const _sfc_main = {
|
|
|
159
167
|
function onKeydownEnterHander(e) {
|
|
160
168
|
emits("search");
|
|
161
169
|
}
|
|
162
|
-
function onTimeRangeClickHandler(column, options) {
|
|
163
|
-
const { field } = column;
|
|
164
|
-
const dateValue = index.timeRangeHandler(column, options);
|
|
165
|
-
const flag = dateValue.length && dateValue.every((value, index) => {
|
|
166
|
-
return is.isArray(field) ? value === props.model[field[index]] : props.model[field][index];
|
|
167
|
-
});
|
|
168
|
-
if (flag) return;
|
|
169
|
-
if (is.isArray(field)) {
|
|
170
|
-
props.model[field[0]] = dateValue[0];
|
|
171
|
-
props.model[field[1]] = dateValue[1];
|
|
172
|
-
} else {
|
|
173
|
-
props.model[field] = dateValue;
|
|
174
|
-
}
|
|
175
|
-
emits("search");
|
|
176
|
-
}
|
|
177
170
|
const context = vue.reactive({
|
|
178
171
|
...vue.toRefs(props),
|
|
179
172
|
columnProp,
|
|
@@ -232,25 +225,50 @@ const _sfc_main = {
|
|
|
232
225
|
},
|
|
233
226
|
[
|
|
234
227
|
vue.createCommentVNode(" \u8868\u5355label "),
|
|
235
|
-
vue.createElementVNode(
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
[
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
228
|
+
vue.createElementVNode("div", {
|
|
229
|
+
class: vue.normalizeClass(["flex items-center text-auxiliary text-sm whitespace-nowrap box-border cursor-default", {
|
|
230
|
+
"border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || vue.unref(form.columnLabelHandler)(__props.column, props.model)
|
|
231
|
+
}]),
|
|
232
|
+
onMouseenter: ($event) => helpVisibleHandler(true),
|
|
233
|
+
onMouseleave: ($event) => helpVisibleHandler(false)
|
|
234
|
+
}, [
|
|
235
|
+
__props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? vue.renderSlot(_ctx.$slots, __props.column.labelSlot, { column: columnConfig.value }, void 0, void 0, 0) : (vue.openBlock(), vue.createElementBlock(
|
|
236
|
+
"span",
|
|
237
|
+
{ key: 1 },
|
|
238
|
+
vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model)),
|
|
239
|
+
1
|
|
240
|
+
/* TEXT */
|
|
241
|
+
)),
|
|
242
|
+
vue.unref(form.columnHelpHandler)(props, __props.column) || __props.column.tooltipContentSlot ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyTooltip), {
|
|
243
|
+
key: 2,
|
|
244
|
+
"is-always": "",
|
|
245
|
+
visible: helpVisible.value
|
|
246
|
+
}, {
|
|
247
|
+
content: vue.withCtx(() => [
|
|
248
|
+
!__props.column.tooltipContentSlot ? (vue.openBlock(), vue.createElementBlock(
|
|
249
|
+
"span",
|
|
250
|
+
{ key: 0 },
|
|
251
|
+
vue.toDisplayString(vue.unref(form.columnHelpHandler)(props, __props.column)),
|
|
252
|
+
1
|
|
253
|
+
/* TEXT */
|
|
254
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
255
|
+
vue.renderSlot(_ctx.$slots, __props.column.tooltipContentSlot, {
|
|
256
|
+
column: columnConfig.value,
|
|
257
|
+
model: __props.model
|
|
258
|
+
})
|
|
259
|
+
]),
|
|
260
|
+
default: vue.withCtx(() => [
|
|
261
|
+
vue.createElementVNode("span", { class: "text-xs text-theme ml-1" }, [
|
|
262
|
+
vue.createVNode(vue.unref(index$2.HyIcon), {
|
|
263
|
+
"svg-name": "dispatch-share-v3-base-help",
|
|
264
|
+
class: "!w-3 !h-3"
|
|
265
|
+
})
|
|
266
|
+
])
|
|
267
|
+
]),
|
|
268
|
+
_: 3
|
|
269
|
+
/* FORWARDED */
|
|
270
|
+
}, 8, ["visible"])) : vue.createCommentVNode("v-if", true)
|
|
271
|
+
], 42, ["onMouseenter", "onMouseleave"]),
|
|
254
272
|
vue.createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
|
|
255
273
|
vue.createElementVNode(
|
|
256
274
|
"div",
|
|
@@ -265,7 +283,7 @@ const _sfc_main = {
|
|
|
265
283
|
{ key: 1 },
|
|
266
284
|
[
|
|
267
285
|
vue.createCommentVNode(" \u8F93\u5165\u6846 "),
|
|
268
|
-
vue.createVNode(vue.unref(index$
|
|
286
|
+
vue.createVNode(vue.unref(index$3.HyInput), vue.mergeProps({
|
|
269
287
|
ref_key: "componentRef",
|
|
270
288
|
ref: componentRef,
|
|
271
289
|
modelValue: bindValue.value,
|
|
@@ -367,7 +385,7 @@ const _sfc_main = {
|
|
|
367
385
|
{ key: 4 },
|
|
368
386
|
[
|
|
369
387
|
vue.createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
|
|
370
|
-
["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
388
|
+
["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyDatePicker), vue.mergeProps({
|
|
371
389
|
key: 0,
|
|
372
390
|
ref_key: "componentRef",
|
|
373
391
|
ref: componentRef,
|
|
@@ -382,7 +400,7 @@ const _sfc_main = {
|
|
|
382
400
|
}, columnAttrs.value, {
|
|
383
401
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
384
402
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
385
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
403
|
+
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyDatePicker), vue.mergeProps({
|
|
386
404
|
key: 1,
|
|
387
405
|
ref_key: "componentRef",
|
|
388
406
|
ref: componentRef,
|
|
@@ -404,7 +422,7 @@ const _sfc_main = {
|
|
|
404
422
|
{ key: 5 },
|
|
405
423
|
[
|
|
406
424
|
vue.createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
|
|
407
|
-
columnAttrs.value.isRange ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
425
|
+
columnAttrs.value.isRange ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.HyTimePicker), vue.mergeProps({
|
|
408
426
|
key: 0,
|
|
409
427
|
ref_key: "componentRef",
|
|
410
428
|
ref: componentRef,
|
|
@@ -418,7 +436,7 @@ const _sfc_main = {
|
|
|
418
436
|
}, columnAttrs.value, {
|
|
419
437
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
420
438
|
onChange: onChangeHandler
|
|
421
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
439
|
+
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$5.HyTimePicker), vue.mergeProps({
|
|
422
440
|
key: 1,
|
|
423
441
|
ref_key: "componentRef",
|
|
424
442
|
ref: componentRef,
|
|
@@ -439,7 +457,7 @@ const _sfc_main = {
|
|
|
439
457
|
{ key: 6 },
|
|
440
458
|
[
|
|
441
459
|
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
442
|
-
vue.createVNode(vue.unref(index$
|
|
460
|
+
vue.createVNode(vue.unref(index$6.HyOrgCascader), vue.mergeProps({
|
|
443
461
|
ref_key: "componentRef",
|
|
444
462
|
ref: componentRef,
|
|
445
463
|
modelValue: bindValue.value,
|
|
@@ -507,35 +525,7 @@ const _sfc_main = {
|
|
|
507
525
|
],
|
|
508
526
|
4
|
|
509
527
|
/* STYLE */
|
|
510
|
-
)
|
|
511
|
-
__props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
512
|
-
key: 0,
|
|
513
|
-
class: "flex text-main select-none"
|
|
514
|
-
}, [
|
|
515
|
-
(vue.openBlock(true), vue.createElementBlock(
|
|
516
|
-
vue.Fragment,
|
|
517
|
-
null,
|
|
518
|
-
vue.renderList(__props.column.timeRangeOptions, (item, index$1) => {
|
|
519
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
520
|
-
key: index$1,
|
|
521
|
-
class: vue.normalizeClass(["border-l border-border px-[10px] cursor-pointer box-border", {
|
|
522
|
-
"bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": vue.unref(index.isSelectedTimeRange)(__props.column, item, __props.model)
|
|
523
|
-
}]),
|
|
524
|
-
onClick: ($event) => onTimeRangeClickHandler(__props.column, item)
|
|
525
|
-
}, [
|
|
526
|
-
vue.createElementVNode(
|
|
527
|
-
"span",
|
|
528
|
-
null,
|
|
529
|
-
vue.toDisplayString(item.label),
|
|
530
|
-
1
|
|
531
|
-
/* TEXT */
|
|
532
|
-
)
|
|
533
|
-
], 10, ["onClick"]);
|
|
534
|
-
}),
|
|
535
|
-
128
|
|
536
|
-
/* KEYED_FRAGMENT */
|
|
537
|
-
))
|
|
538
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
528
|
+
)
|
|
539
529
|
],
|
|
540
530
|
2
|
|
541
531
|
/* CLASS */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dayjs = require('dayjs');
|
|
4
3
|
var vue = require('vue');
|
|
5
4
|
require('../../../utils/index.js');
|
|
6
5
|
require('../../../hooks/index.js');
|
|
@@ -98,39 +97,6 @@ function useShrink(props, formItemWrapper) {
|
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
99
|
}
|
|
101
|
-
function timeRangeHandler(column, options) {
|
|
102
|
-
const { value, unit } = options;
|
|
103
|
-
const { attrs } = column;
|
|
104
|
-
let { timeRangeFill } = attrs;
|
|
105
|
-
const format = "YYYY-MM-DD";
|
|
106
|
-
const date = dayjs(Date.now());
|
|
107
|
-
timeRangeFill = timeRangeFill || attrs.type === "datetimerange";
|
|
108
|
-
switch (unit) {
|
|
109
|
-
case "year":
|
|
110
|
-
case "month":
|
|
111
|
-
return [
|
|
112
|
-
date.subtract(value, unit).format(`${format}${timeRangeFill ? " 00:00:00" : ""}`),
|
|
113
|
-
date.format(`${format}${timeRangeFill ? " 23:59:59" : ""}`)
|
|
114
|
-
];
|
|
115
|
-
case "day":
|
|
116
|
-
default:
|
|
117
|
-
return value === 1 ? [
|
|
118
|
-
date.format(`${format}${timeRangeFill ? " 00:00:00" : ""}`),
|
|
119
|
-
date.format(`${format}${timeRangeFill ? " 23:59:59" : ""}`)
|
|
120
|
-
] : [
|
|
121
|
-
date.subtract(value, unit).format(`${format}${timeRangeFill ? " 00:00:00" : ""}`),
|
|
122
|
-
date.format(`${format}${timeRangeFill ? " 23:59:59" : ""}`)
|
|
123
|
-
];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function isSelectedTimeRange(column, options, model = {}) {
|
|
127
|
-
const [start, end] = timeRangeHandler(column, options);
|
|
128
|
-
const { field } = column;
|
|
129
|
-
if (Array.isArray(field)) {
|
|
130
|
-
return start === model[field[0]] && end === model[field[1]];
|
|
131
|
-
}
|
|
132
|
-
return start === model[field][0] && end === model[field][1];
|
|
133
|
-
}
|
|
134
100
|
function optionsHandler(props, column) {
|
|
135
101
|
const options = vue.unref(column.attrs.options);
|
|
136
102
|
if (is.isArray(options)) return options;
|
|
@@ -144,7 +110,5 @@ exports.columnShowHandler = columnShowHandler;
|
|
|
144
110
|
exports.formContextKey = formContextKey;
|
|
145
111
|
exports.isDisabled = isDisabled;
|
|
146
112
|
exports.isEmptyValue = isEmptyValue;
|
|
147
|
-
exports.isSelectedTimeRange = isSelectedTimeRange;
|
|
148
113
|
exports.optionsHandler = optionsHandler;
|
|
149
|
-
exports.timeRangeHandler = timeRangeHandler;
|
|
150
114
|
exports.useShrink = useShrink;
|
|
@@ -43,15 +43,15 @@ const timeRangeOptionsHandler = (config) => {
|
|
|
43
43
|
if (!label) {
|
|
44
44
|
switch (unit) {
|
|
45
45
|
case "year":
|
|
46
|
-
label =
|
|
46
|
+
label = useLocale.$t("hy.lastDate", [value + useLocale.$t(isPlural ? "hy.years" : "hy.year")]);
|
|
47
47
|
break;
|
|
48
48
|
case "month":
|
|
49
|
-
label =
|
|
49
|
+
label = useLocale.$t("hy.lastDate", [value + useLocale.$t(isPlural ? "hy.months" : "hy.month")]);
|
|
50
50
|
break;
|
|
51
51
|
case "day":
|
|
52
52
|
default:
|
|
53
53
|
unit = "day";
|
|
54
|
-
label = value === 1 ? useLocale.$t("hy.today") :
|
|
54
|
+
label = value === 1 ? useLocale.$t("hy.today") : useLocale.$t("hy.lastDate", [value + useLocale.$t(isPlural ? "hy.days" : "hy.day")]);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
list.push({ ...item, label, unit });
|
|
@@ -439,7 +439,7 @@ const _sfc_main = {
|
|
|
439
439
|
key: cindex,
|
|
440
440
|
"is-always": "",
|
|
441
441
|
overLine: 1,
|
|
442
|
-
content: citem
|
|
442
|
+
content: vue.unref(index$1.operatorDescHandler)(citem, { column, row, $index, cellIndex })
|
|
443
443
|
}, {
|
|
444
444
|
default: vue.withCtx(() => [
|
|
445
445
|
vue.createElementVNode("div", {
|
|
@@ -458,13 +458,13 @@ const _sfc_main = {
|
|
|
458
458
|
"svg-name": citem.svgName,
|
|
459
459
|
"class-name": "!w-4 !h-4"
|
|
460
460
|
}, null, 8, ["svg-name"]),
|
|
461
|
-
citem
|
|
461
|
+
vue.unref(index$1.operatorLabelHandler)(citem, { column, row, $index, cellIndex }) ? (vue.openBlock(), vue.createElementBlock(
|
|
462
462
|
"div",
|
|
463
463
|
{
|
|
464
464
|
key: 0,
|
|
465
465
|
class: "mt-1 whitespace-nowrap"
|
|
466
466
|
},
|
|
467
|
-
vue.toDisplayString(
|
|
467
|
+
vue.toDisplayString(vue.unref(index$1.operatorLabelHandler)(citem, { column, row, $index, cellIndex })),
|
|
468
468
|
1
|
|
469
469
|
/* TEXT */
|
|
470
470
|
)) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -527,7 +527,7 @@ const _sfc_main = {
|
|
|
527
527
|
vue.createElementVNode(
|
|
528
528
|
"span",
|
|
529
529
|
{ class: "pr-1" },
|
|
530
|
-
vue.toDisplayString(
|
|
530
|
+
vue.toDisplayString(vue.unref(index$1.operatorLabelHandler)(citem, { column, row, $index, cellIndex })),
|
|
531
531
|
1
|
|
532
532
|
/* TEXT */
|
|
533
533
|
),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var lodashEs = require('lodash-es');
|
|
3
4
|
var vue = require('vue');
|
|
4
5
|
require('../../../hooks/index.js');
|
|
5
6
|
require('../../../utils/index.js');
|
|
@@ -85,6 +86,16 @@ function operatorShowHandler(operator, scope) {
|
|
|
85
86
|
if (is.isFunction(show)) return show(scope);
|
|
86
87
|
return true;
|
|
87
88
|
}
|
|
89
|
+
function operatorLabelHandler(operator, scope) {
|
|
90
|
+
const label = vue.unref(operator.label);
|
|
91
|
+
if (is.isFunction(label)) return label(scope);
|
|
92
|
+
return label || "";
|
|
93
|
+
}
|
|
94
|
+
function operatorDescHandler(operator, scope) {
|
|
95
|
+
const desc = vue.unref(operator.desc);
|
|
96
|
+
if (is.isFunction(desc)) return desc(scope);
|
|
97
|
+
return desc || "";
|
|
98
|
+
}
|
|
88
99
|
function operatorDisabledHandler(operator, scope) {
|
|
89
100
|
const { disabled } = operator;
|
|
90
101
|
if (is.isBoolean(disabled)) return disabled;
|
|
@@ -150,7 +161,23 @@ const useAppTableWrapper = (hy) => {
|
|
|
150
161
|
const tableColumns = vue.ref([]);
|
|
151
162
|
const tableColumnsEditablele = vue.ref({});
|
|
152
163
|
const tableColumnsList = vue.computed(() => {
|
|
153
|
-
|
|
164
|
+
let columnContentLength = 0;
|
|
165
|
+
const columns = tableColumns.value.filter((column) => {
|
|
166
|
+
const flag = tableColumnShowHandler(column);
|
|
167
|
+
if (flag && column.type === "default" && tableColumnsEditablele.value[column.prop]?.checked) {
|
|
168
|
+
columnContentLength++;
|
|
169
|
+
}
|
|
170
|
+
return flag;
|
|
171
|
+
});
|
|
172
|
+
if (columnContentLength <= 1) {
|
|
173
|
+
return columns.map(({ width, ...column }) => {
|
|
174
|
+
return {
|
|
175
|
+
...column,
|
|
176
|
+
width: column.type === "default" && tableColumnsEditablele.value[column.prop]?.checked ? void 0 : width
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return columns;
|
|
154
181
|
});
|
|
155
182
|
const searchPlaceholder = vue.computed(() => {
|
|
156
183
|
const searchLabelSet = tableColumnsList.value.reduce((searchLabelSet2, column) => {
|
|
@@ -412,9 +439,22 @@ const useAppTableWrapper = (hy) => {
|
|
|
412
439
|
tableRef.value.setScrollLeft(left);
|
|
413
440
|
}
|
|
414
441
|
}
|
|
415
|
-
|
|
442
|
+
const onScrollHandler = lodashEs.debounce((params) => {
|
|
443
|
+
const { scrollTop } = params || {};
|
|
444
|
+
let clientHeight, scrollHeight;
|
|
445
|
+
if (props.type === "virtual") {
|
|
446
|
+
const wrapperEl = tableRef.value?.$el.querySelector(".hy-el-vl__wrapper");
|
|
447
|
+
clientHeight = wrapperEl?.clientHeight;
|
|
448
|
+
scrollHeight = wrapperEl?.firstChild.firstChild.scrollHeight;
|
|
449
|
+
} else {
|
|
450
|
+
clientHeight = tableRef.value?.$refs.bodyWrapper.clientHeight;
|
|
451
|
+
scrollHeight = tableRef.value?.$refs.tableBody.scrollHeight;
|
|
452
|
+
}
|
|
416
453
|
emits("scroll", params);
|
|
417
|
-
|
|
454
|
+
if (clientHeight && scrollHeight && scrollTop && clientHeight + Math.round(scrollTop) + 1 >= scrollHeight) {
|
|
455
|
+
emits("scrollBottom", params);
|
|
456
|
+
}
|
|
457
|
+
}, 250);
|
|
418
458
|
window.scrollToTop = scrollToTop;
|
|
419
459
|
vue.watchEffect(() => {
|
|
420
460
|
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(props.tableColumns, CACHE_COLUMNS_KEY);
|
|
@@ -457,10 +497,12 @@ const useAppTableWrapper = (hy) => {
|
|
|
457
497
|
};
|
|
458
498
|
|
|
459
499
|
exports.operatorClickHandler = operatorClickHandler;
|
|
500
|
+
exports.operatorDescHandler = operatorDescHandler;
|
|
460
501
|
exports.operatorDisableTextdHandler = operatorDisableTextdHandler;
|
|
461
502
|
exports.operatorDisabledHandler = operatorDisabledHandler;
|
|
462
503
|
exports.operatorFilterHandler = operatorFilterHandler;
|
|
463
504
|
exports.operatorIsDotHandler = operatorIsDotHandler;
|
|
505
|
+
exports.operatorLabelHandler = operatorLabelHandler;
|
|
464
506
|
exports.renderContentHandler = renderContentHandler;
|
|
465
507
|
exports.renderHeaderHandler = renderHeaderHandler;
|
|
466
508
|
exports.tableColumnHandler = tableColumnHandler;
|