hy-dispatch-ui-v3 0.1.6 → 0.2.0
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/README.md +47 -0
- package/dist/tailwind.css +349 -4
- package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
- package/es/components/appAudioPlayer/index.mjs +6 -0
- package/es/components/appAudioPlayer/js/index.mjs +327 -0
- package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/es/components/appButton/style/appButton.scss +0 -1
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +22 -1
- package/es/components/appCutter/appCutter.vue.mjs +202 -129
- package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
- package/es/components/appForm/appForm.vue.mjs +132 -209
- package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
- package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
- package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
- package/es/components/appForm/js/index.mjs +46 -24
- package/es/components/appForm/js/useAppForm.mjs +30 -6
- package/es/components/appForm/style/appForm.scss +53 -0
- package/es/components/appIcon/appIcon.vue.mjs +2 -1
- package/es/components/appIconBox/style/appIconBox.scss +0 -1
- package/es/components/appInput/appInput.vue.mjs +99 -0
- package/es/components/appInput/index.mjs +6 -0
- package/es/components/appMenu/appMenu.vue.mjs +129 -0
- package/es/components/appMenu/index.mjs +6 -0
- package/es/components/appMenu/style/appMenu.scss +145 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
- package/es/components/appSearch/appSearch.vue.mjs +55 -211
- package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
- package/es/components/appSearch/js/index.mjs +20 -8
- package/es/components/appSearch/js/useAppSearch.mjs +10 -5
- package/es/components/appSearch/style/appSearch.scss +10 -0
- package/es/components/appTable/appTable.vue.mjs +312 -158
- package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
- package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
- package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
- package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
- package/es/components/appTable/js/index.mjs +46 -20
- package/es/components/appTable/js/search.mjs +1 -2
- package/es/components/appTable/js/useAppTable.mjs +58 -14
- package/es/components/appTable/style/appTable.scss +16 -0
- package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
- package/es/components/appTree/appTree.vue.mjs +304 -0
- package/es/components/appTree/index.mjs +6 -0
- package/es/components/appTree/js/index.mjs +531 -0
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
- package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +647 -0
- package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
- package/es/components/appVideoPlayer/index.mjs +6 -0
- package/es/components/appVideoPlayer/js/index.mjs +426 -0
- package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/es/components/index.mjs +5 -0
- package/es/hooks/index.mjs +3 -0
- package/es/hooks/useApi.mjs +4 -4
- package/es/hooks/useAudioPlayerConfig.mjs +12 -0
- package/es/hooks/useGlobalConfig.mjs +18 -7
- package/es/hooks/useLocale.mjs +3 -11
- package/es/hooks/useMixins.mjs +1 -1
- package/es/hooks/usePermissionMap.mjs +12 -0
- package/es/hooks/useUserAvatarMap.mjs +2 -3
- package/es/hooks/useVideoPlayerConfig.mjs +12 -0
- package/es/index.mjs +14 -4
- package/es/locale/en.mjs +52 -3
- package/es/locale/zh_CN.mjs +48 -3
- package/es/make-installer.mjs +2 -0
- package/es/static/hy-svg-icons.js +462 -0
- package/es/static/protocolcheck.js +247 -0
- package/es/style/element/element.scss +9 -0
- package/es/style/element/index.scss +6 -3
- package/es/style/index.scss +11 -0
- package/es/style/theme.scss +73 -0
- package/es/utils/date.mjs +25 -1
- package/es/utils/file.mjs +5 -4
- package/es/utils/form.mjs +52 -0
- package/es/utils/handler.mjs +22 -2
- package/es/utils/index.mjs +6 -4
- package/es/utils/is.mjs +23 -2
- package/es/utils/loadScript.mjs +33 -0
- package/es/version.mjs +1 -1
- package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
- package/lib/components/appAudioPlayer/index.js +11 -0
- package/lib/components/appAudioPlayer/js/index.js +329 -0
- package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/lib/components/appButton/style/appButton.scss +0 -1
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +22 -1
- package/lib/components/appCutter/appCutter.vue.js +201 -128
- package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
- package/lib/components/appForm/appForm.vue.js +129 -206
- package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
- package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
- package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
- package/lib/components/appForm/js/index.js +48 -23
- package/lib/components/appForm/js/useAppForm.js +30 -6
- package/lib/components/appForm/style/appForm.scss +53 -0
- package/lib/components/appIcon/appIcon.vue.js +2 -1
- package/lib/components/appIconBox/style/appIconBox.scss +0 -1
- package/lib/components/appInput/appInput.vue.js +103 -0
- package/lib/components/appInput/index.js +11 -0
- package/lib/components/appMenu/appMenu.vue.js +133 -0
- package/lib/components/appMenu/index.js +11 -0
- package/lib/components/appMenu/style/appMenu.scss +145 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
- package/lib/components/appSearch/appSearch.vue.js +51 -207
- package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
- package/lib/components/appSearch/js/index.js +20 -7
- package/lib/components/appSearch/js/useAppSearch.js +10 -5
- package/lib/components/appSearch/style/appSearch.scss +10 -0
- package/lib/components/appTable/appTable.vue.js +319 -165
- package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
- package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
- package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
- package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
- package/lib/components/appTable/js/index.js +47 -19
- package/lib/components/appTable/js/search.js +1 -2
- package/lib/components/appTable/js/useAppTable.js +57 -13
- package/lib/components/appTable/style/appTable.scss +16 -0
- package/lib/components/appTooltip/appTooltip.vue.js +23 -12
- package/lib/components/appTree/appTree.vue.js +308 -0
- package/lib/components/appTree/index.js +11 -0
- package/lib/components/appTree/js/index.js +533 -0
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +651 -0
- package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
- package/lib/components/appVideoPlayer/index.js +11 -0
- package/lib/components/appVideoPlayer/js/index.js +429 -0
- package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/lib/components/index.js +42 -32
- package/lib/hooks/index.js +9 -0
- package/lib/hooks/useApi.js +4 -4
- package/lib/hooks/useAudioPlayerConfig.js +15 -0
- package/lib/hooks/useGlobalConfig.js +18 -7
- package/lib/hooks/useLocale.js +3 -11
- package/lib/hooks/useMixins.js +1 -1
- package/lib/hooks/usePermissionMap.js +15 -0
- package/lib/hooks/useUserAvatarMap.js +1 -2
- package/lib/hooks/useVideoPlayerConfig.js +15 -0
- package/lib/index.js +62 -33
- package/lib/locale/en.js +52 -3
- package/lib/locale/zh_CN.js +48 -3
- package/lib/make-installer.js +2 -0
- package/lib/static/hy-svg-icons.js +459 -8
- package/lib/static/protocolcheck.js +249 -0
- package/lib/style/element/element.scss +9 -0
- package/lib/style/element/index.scss +6 -3
- package/lib/style/index.scss +11 -0
- package/lib/style/theme.scss +73 -0
- package/lib/utils/date.js +25 -0
- package/lib/utils/file.js +4 -4
- package/lib/utils/form.js +57 -0
- package/lib/utils/handler.js +22 -1
- package/lib/utils/index.js +11 -1
- package/lib/utils/is.js +23 -1
- package/lib/utils/loadScript.js +37 -0
- package/lib/version.js +1 -1
- package/package.json +12 -10
- package/es/config/index.mjs +0 -1
- package/es/static/hy-svg-icons.mjs +0 -11
- package/lib/config/index.js +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appMenu = require('./appMenu.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppMenu = handler.withInstall(appMenu.default);
|
|
9
|
+
|
|
10
|
+
exports.AppMenu = AppMenu;
|
|
11
|
+
exports.default = AppMenu;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* 二级导航栏 */
|
|
2
|
+
.operator-menu-box {
|
|
3
|
+
width: 57px;
|
|
4
|
+
height: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
color: rgba(var(--hy-main));
|
|
8
|
+
overflow: auto;
|
|
9
|
+
padding-top: 4px;
|
|
10
|
+
transition: all 0.3s linear;
|
|
11
|
+
background:
|
|
12
|
+
linear-gradient(180deg, rgba(33, 58, 84, 0.3) 0.08%, #213a54 100%),
|
|
13
|
+
radial-gradient(
|
|
14
|
+
21% 31% at 150% 40%,
|
|
15
|
+
rgba(61, 98, 134, 0.5) 0%,
|
|
16
|
+
rgba(61, 98, 134, 0) 100%
|
|
17
|
+
);
|
|
18
|
+
border-right: 1px solid rgba(var(--hy-border));
|
|
19
|
+
|
|
20
|
+
.operator-menu-list {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 0;
|
|
23
|
+
flex: 1;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.operator-menu-box-expand {
|
|
28
|
+
width: 240px;
|
|
29
|
+
|
|
30
|
+
.operator-menu-item {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 58px;
|
|
33
|
+
padding: 0 16px;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
position: relative;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
|
|
38
|
+
.operator-label {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.operator-menu-item-active {
|
|
47
|
+
&::after {
|
|
48
|
+
content: '';
|
|
49
|
+
display: block;
|
|
50
|
+
width: 2px;
|
|
51
|
+
height: 16px;
|
|
52
|
+
position: absolute;
|
|
53
|
+
left: 0;
|
|
54
|
+
top: 50%;
|
|
55
|
+
transform: translateY(-50%);
|
|
56
|
+
background-color: rgba(var(--hy-theme));
|
|
57
|
+
}
|
|
58
|
+
.operator-label {
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.operator-menu-item-active,
|
|
65
|
+
.operator-menu-item:hover {
|
|
66
|
+
&::before {
|
|
67
|
+
content: '';
|
|
68
|
+
display: block;
|
|
69
|
+
width: calc(100% - 4px);
|
|
70
|
+
height: calc(100% - 6px);
|
|
71
|
+
position: absolute;
|
|
72
|
+
left: 0;
|
|
73
|
+
top: 3px;
|
|
74
|
+
background: linear-gradient(
|
|
75
|
+
90deg,
|
|
76
|
+
rgba(var(--hy-theme), 0) 2%,
|
|
77
|
+
rgba(var(--hy-theme), 0.4) 100%
|
|
78
|
+
);
|
|
79
|
+
border-radius: 0px 4px 4px 0px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:not(.operator-menu-box-expand) {
|
|
85
|
+
.operator-menu-item {
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 68px;
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
position: relative;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
margin-top: 2px;
|
|
92
|
+
|
|
93
|
+
&:first-child {
|
|
94
|
+
margin-top: 0px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.operator-label {
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
grid: 4px;
|
|
105
|
+
color: rgb(var(--hy-main));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.operator-menu-item-active {
|
|
109
|
+
&::after {
|
|
110
|
+
content: '';
|
|
111
|
+
display: block;
|
|
112
|
+
width: 2px;
|
|
113
|
+
height: 100%;
|
|
114
|
+
position: absolute;
|
|
115
|
+
left: 0;
|
|
116
|
+
top: 50%;
|
|
117
|
+
transform: translateY(-50%);
|
|
118
|
+
background-color: rgba(var(--hy-theme));
|
|
119
|
+
}
|
|
120
|
+
.operator-label {
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.operator-menu-item-active,
|
|
127
|
+
.operator-menu-item:hover {
|
|
128
|
+
&::before {
|
|
129
|
+
content: '';
|
|
130
|
+
display: block;
|
|
131
|
+
width: 100%;
|
|
132
|
+
height: 100%;
|
|
133
|
+
position: absolute;
|
|
134
|
+
left: 0;
|
|
135
|
+
top: 0;
|
|
136
|
+
background: linear-gradient(
|
|
137
|
+
90deg,
|
|
138
|
+
rgba(var(--hy-theme), 0) 2%,
|
|
139
|
+
rgba(var(--hy-theme), 0.4) 100%
|
|
140
|
+
);
|
|
141
|
+
border-radius: 0px 4px 4px 0px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -27,7 +27,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
placeholder: {
|
|
30
|
-
type: String
|
|
30
|
+
type: String,
|
|
31
|
+
default: () => {
|
|
32
|
+
const { t } = useLocale.useLocale();
|
|
33
|
+
return t("cascader.pleaseSelectDepartment");
|
|
34
|
+
}
|
|
31
35
|
},
|
|
32
36
|
/*
|
|
33
37
|
* false 直接显示输入框
|
|
@@ -81,7 +85,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
81
85
|
setup(__props, { emit: __emit }) {
|
|
82
86
|
const props = __props;
|
|
83
87
|
const emits = __emit;
|
|
84
|
-
const { t } = useLocale.useLocale();
|
|
85
88
|
const { api } = useApi.useApi();
|
|
86
89
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
87
90
|
const cascaderRef = vue.useTemplateRef("cascaderRef");
|
|
@@ -91,7 +94,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
91
94
|
const cascaderValueMap = vue.ref(/* @__PURE__ */ new Map());
|
|
92
95
|
const currentCompanyName = vue.computed(() => {
|
|
93
96
|
const target = cascaderValueMap.value.get(modelValue.value);
|
|
94
|
-
return target
|
|
97
|
+
return target?.companyName;
|
|
95
98
|
});
|
|
96
99
|
function getCascaderData() {
|
|
97
100
|
vue.unref(api).post("organization/orgTreeSimple").then((res) => {
|
|
@@ -100,8 +103,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
100
103
|
}
|
|
101
104
|
function handlerData(data) {
|
|
102
105
|
const cascaderMap = /* @__PURE__ */ new Map();
|
|
103
|
-
const handler = (list, parentIdsList = []) => {
|
|
104
|
-
list.forEach((item) => {
|
|
106
|
+
const handler = (list = [], parentIdsList = []) => {
|
|
107
|
+
(list || []).forEach((item) => {
|
|
105
108
|
item.label = item.companyName;
|
|
106
109
|
item.value = item.id;
|
|
107
110
|
item.parentIdsList = [...parentIdsList, item.id];
|
|
@@ -131,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
131
134
|
function onChangeHanlder(value) {
|
|
132
135
|
cascaderRef.value.dropDownVisible = false;
|
|
133
136
|
onVisibleChangeHandler(false);
|
|
134
|
-
modelValue.value = value
|
|
137
|
+
modelValue.value = value?.[value.length - 1];
|
|
135
138
|
if (props.changeLastLayer) {
|
|
136
139
|
emits("change", modelValue.value);
|
|
137
140
|
} else {
|
|
@@ -147,8 +150,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
147
150
|
vue.watch(
|
|
148
151
|
() => props.options,
|
|
149
152
|
() => {
|
|
150
|
-
|
|
151
|
-
if ((_a = props.options) == null ? void 0 : _a.length) {
|
|
153
|
+
if (props.options?.length) {
|
|
152
154
|
handlerData(props.options);
|
|
153
155
|
}
|
|
154
156
|
},
|
|
@@ -188,9 +190,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
188
190
|
disabled: __props.disabled,
|
|
189
191
|
props: { checkStrictly: true },
|
|
190
192
|
clearable: __props.clearable,
|
|
191
|
-
placeholder: __props.placeholder
|
|
193
|
+
placeholder: __props.placeholder,
|
|
192
194
|
filterable: "",
|
|
193
195
|
"show-all-levels": false,
|
|
196
|
+
"virtual-scroll": "",
|
|
194
197
|
onChange: onChangeHanlder,
|
|
195
198
|
onVisibleChange: ($event) => onVisibleChangeHandler($event)
|
|
196
199
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "size", "options", "disabled", "clearable", "placeholder", "onVisibleChange"])
|
|
@@ -227,9 +230,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
227
230
|
props: { checkStrictly: true },
|
|
228
231
|
clearable: __props.clearable,
|
|
229
232
|
disabled: __props.disabled,
|
|
230
|
-
placeholder: __props.placeholder
|
|
233
|
+
placeholder: __props.placeholder,
|
|
231
234
|
filterable: "",
|
|
232
235
|
"show-all-levels": false,
|
|
236
|
+
"virtual-scroll": "",
|
|
233
237
|
onChange: onChangeHanlder
|
|
234
238
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "size", "options", "clearable", "disabled", "placeholder"]))
|
|
235
239
|
]);
|
|
@@ -5,8 +5,7 @@ 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
|
-
var
|
|
9
|
-
var index$2 = require('../appOrgCascader/index.js');
|
|
8
|
+
var appSearchItem = require('./cpns/appSearchItem.vue.js');
|
|
10
9
|
var index = require('./js/index.js');
|
|
11
10
|
var useAppSearch = require('./js/useAppSearch.js');
|
|
12
11
|
var useLocale = require('../../hooks/useLocale.js');
|
|
@@ -50,10 +49,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
50
49
|
const emits = __emit;
|
|
51
50
|
const { t } = useLocale.useLocale();
|
|
52
51
|
const formItemWrapper = vue.useTemplateRef("formItemWrapper");
|
|
53
|
-
const { isExpand, containerHeight, switchShrink, shrinkDestroy } = index.useShrink(
|
|
54
|
-
props,
|
|
55
|
-
formItemWrapper
|
|
56
|
-
);
|
|
52
|
+
const { showShrink, isExpand, containerHeight, switchShrink, shrinkDestroy } = index.useShrink(props, formItemWrapper);
|
|
57
53
|
const formColumnMap = vue.computed(() => {
|
|
58
54
|
return (props.columns || []).reduce((map, column) => {
|
|
59
55
|
if (is.isArray(column.field)) {
|
|
@@ -66,17 +62,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
66
62
|
});
|
|
67
63
|
const filterCount = vue.computed(() => {
|
|
68
64
|
const defaultValue = useAppSearch.resetAppSearchValue(props.columns);
|
|
69
|
-
|
|
70
|
-
if (!(keys == null ? void 0 : keys.length)) return 0;
|
|
71
|
-
const keySet = keys.reduce((keySet2, key) => {
|
|
72
|
-
if (index.isEmptyValue(defaultValue[key]) ? !index.isEmptyValue(props.model[key]) : defaultValue[key] !== props.model[key]) {
|
|
73
|
-
if (vue.unref(formColumnMap).has(key)) {
|
|
74
|
-
keySet2.add(vue.unref(formColumnMap).get(key).key);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return keySet2;
|
|
78
|
-
}, /* @__PURE__ */ new Set());
|
|
79
|
-
return keySet.size;
|
|
65
|
+
return getFilterCount(props.model, defaultValue);
|
|
80
66
|
});
|
|
81
67
|
const appClass = vue.computed(() => {
|
|
82
68
|
return [props.class, { "app-search-hidden": props.hidden }].filter(Boolean);
|
|
@@ -93,16 +79,37 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
93
79
|
vue.onUnmounted(() => {
|
|
94
80
|
shrinkDestroy();
|
|
95
81
|
});
|
|
96
|
-
function
|
|
97
|
-
|
|
82
|
+
function getFilterCount(model, defaultValue, prop) {
|
|
83
|
+
let count = 0;
|
|
84
|
+
const keys = Object.keys(defaultValue);
|
|
85
|
+
if (!keys?.length) return count;
|
|
86
|
+
const keySet = keys.reduce((keySet2, key) => {
|
|
87
|
+
const newVal = model[key];
|
|
88
|
+
const oldVal = defaultValue[key];
|
|
89
|
+
const targetProp = prop ? `${prop}.${key}` : key;
|
|
90
|
+
if (is.isObject(oldVal)) {
|
|
91
|
+
count += getFilterCount(newVal, oldVal, targetProp);
|
|
92
|
+
} else if (is.isArray(oldVal)) {
|
|
93
|
+
if (oldVal.length > 0 && !oldVal.every((t2, i) => t2 === newVal[i])) {
|
|
94
|
+
keySet2.add(vue.unref(formColumnMap).get(key).key);
|
|
95
|
+
}
|
|
96
|
+
} else if (index.isEmptyValue(oldVal) ? !index.isEmptyValue(newVal) : oldVal !== newVal) {
|
|
97
|
+
const column = vue.unref(formColumnMap).get(targetProp);
|
|
98
|
+
if (column) {
|
|
99
|
+
keySet2.add(column.key);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return keySet2;
|
|
103
|
+
}, /* @__PURE__ */ new Set());
|
|
104
|
+
return count + keySet.size;
|
|
98
105
|
}
|
|
99
|
-
function
|
|
106
|
+
function onSearchHandler() {
|
|
100
107
|
emits("search");
|
|
101
108
|
}
|
|
102
109
|
function resetFields(fields) {
|
|
103
110
|
let columns = props.columns || [];
|
|
104
|
-
if (fields &&
|
|
105
|
-
columns = fields.map((key) => formColumnMap.get(key)).filter(Boolean);
|
|
111
|
+
if (fields && fields?.length) {
|
|
112
|
+
columns = fields.map((key) => formColumnMap.value.get(key)).filter(Boolean);
|
|
106
113
|
}
|
|
107
114
|
useAppSearch.resetAppSearchValue(columns, props.model);
|
|
108
115
|
}
|
|
@@ -110,17 +117,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
110
117
|
resetFields();
|
|
111
118
|
emits("search");
|
|
112
119
|
}
|
|
113
|
-
function onTimeRangeClickHandler(column, options) {
|
|
114
|
-
const { field } = column;
|
|
115
|
-
const dateValue = index.timeRangeHandler(column, options);
|
|
116
|
-
if (is.isArray(field)) {
|
|
117
|
-
props.model[field[0]] = dateValue[0];
|
|
118
|
-
props.model[field[1]] = dateValue[1];
|
|
119
|
-
} else {
|
|
120
|
-
props.model[field] = dateValue;
|
|
121
|
-
}
|
|
122
|
-
emits("search");
|
|
123
|
-
}
|
|
124
120
|
__expose({
|
|
125
121
|
resetFields
|
|
126
122
|
});
|
|
@@ -178,7 +174,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
178
174
|
/* STABLE_FRAGMENT */
|
|
179
175
|
)) : vue.createCommentVNode("v-if", true)
|
|
180
176
|
]),
|
|
181
|
-
vue.createElementVNode("div", {
|
|
177
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
182
178
|
class: "ml-auto flex items-center gap-4 cursor-pointer select-none",
|
|
183
179
|
onClick: vue.unref(switchShrink)
|
|
184
180
|
}, [
|
|
@@ -200,7 +196,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
200
196
|
_: 1
|
|
201
197
|
/* STABLE */
|
|
202
198
|
}, 8, ["style"])
|
|
203
|
-
], 8, ["onClick"])
|
|
199
|
+
], 8, ["onClick"]), [
|
|
200
|
+
[vue.vShow, vue.unref(showShrink)]
|
|
201
|
+
])
|
|
204
202
|
],
|
|
205
203
|
2
|
|
206
204
|
/* CLASS */
|
|
@@ -225,178 +223,24 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
225
223
|
vue.Fragment,
|
|
226
224
|
null,
|
|
227
225
|
vue.renderList(__props.columns, (column) => {
|
|
228
|
-
return vue.openBlock(), vue.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
style: vue.normalizeStyle(vue.unref(index.columnItemStyle)(props, column))
|
|
247
|
-
},
|
|
248
|
-
[
|
|
249
|
-
vue.createCommentVNode(" \u8868\u5355label "),
|
|
250
|
-
vue.createElementVNode("div", { class: "flex items-center text-auxiliary text-xs px-3 whitespace-nowrap border-r border-border" }, [
|
|
251
|
-
column.labelSlot && _ctx.$slots[column.labelSlot] ? vue.renderSlot(_ctx.$slots, column.labelSlot, {
|
|
252
|
-
key: 0,
|
|
253
|
-
column
|
|
254
|
-
}) : (vue.openBlock(), vue.createElementBlock(
|
|
255
|
-
"span",
|
|
256
|
-
{ key: 1 },
|
|
257
|
-
vue.toDisplayString(column.label),
|
|
258
|
-
1
|
|
259
|
-
/* TEXT */
|
|
260
|
-
))
|
|
261
|
-
]),
|
|
262
|
-
vue.createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
|
|
263
|
-
vue.createElementVNode(
|
|
264
|
-
"div",
|
|
265
|
-
{
|
|
266
|
-
style: vue.normalizeStyle(vue.unref(index.columnItemInputStyle)(props, column))
|
|
267
|
-
},
|
|
268
|
-
[
|
|
269
|
-
vue.createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
|
|
270
|
-
column.slot ? vue.renderSlot(_ctx.$slots, column.slot, {
|
|
271
|
-
key: 0,
|
|
272
|
-
column
|
|
273
|
-
}) : column.type === "input" ? (vue.openBlock(), vue.createElementBlock(
|
|
274
|
-
vue.Fragment,
|
|
275
|
-
{ key: 1 },
|
|
276
|
-
[
|
|
277
|
-
vue.createCommentVNode(" \u8F93\u5165\u6846 "),
|
|
278
|
-
vue.createVNode(vue.unref(elementPlus.ElInput), vue.mergeProps({
|
|
279
|
-
modelValue: __props.model[column.field],
|
|
280
|
-
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event
|
|
281
|
-
}, { ref_for: true }, column.attrs, {
|
|
282
|
-
disabled: vue.unref(index.isDisabled)(props, column),
|
|
283
|
-
onKeydown: vue.withKeys(($event) => onKeydownEnterHander(), ["enter"]),
|
|
284
|
-
onChange: ($event) => onChangeHandler()
|
|
285
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
|
|
286
|
-
],
|
|
287
|
-
2112
|
|
288
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
289
|
-
)) : column.type === "select" ? (vue.openBlock(), vue.createElementBlock(
|
|
290
|
-
vue.Fragment,
|
|
291
|
-
{ key: 2 },
|
|
292
|
-
[
|
|
293
|
-
vue.createCommentVNode(" \u9009\u62E9\u6846 "),
|
|
294
|
-
vue.createVNode(vue.unref(elementPlus.ElSelect), vue.mergeProps({
|
|
295
|
-
modelValue: __props.model[column.field],
|
|
296
|
-
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event
|
|
297
|
-
}, { ref_for: true }, column.attrs, {
|
|
298
|
-
disabled: vue.unref(index.isDisabled)(props, column),
|
|
299
|
-
onChange: ($event) => onChangeHandler()
|
|
300
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
301
|
-
],
|
|
302
|
-
2112
|
|
303
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
304
|
-
)) : column.type === "date-picker" ? (vue.openBlock(), vue.createElementBlock(
|
|
305
|
-
vue.Fragment,
|
|
306
|
-
{ key: 3 },
|
|
307
|
-
[
|
|
308
|
-
vue.createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
|
|
309
|
-
[
|
|
310
|
-
"datetimerange",
|
|
311
|
-
"daterange",
|
|
312
|
-
"monthrange",
|
|
313
|
-
"yearrange"
|
|
314
|
-
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.AppDatePicker), vue.mergeProps({
|
|
315
|
-
key: 0,
|
|
316
|
-
start: __props.model[column.field[0]],
|
|
317
|
-
"onUpdate:start": ($event) => __props.model[column.field[0]] = $event,
|
|
318
|
-
end: __props.model[column.field[1]],
|
|
319
|
-
"onUpdate:end": ($event) => __props.model[column.field[1]] = $event,
|
|
320
|
-
"is-range": true,
|
|
321
|
-
style: { "width": "100%" }
|
|
322
|
-
}, { ref_for: true }, column.attrs, {
|
|
323
|
-
disabled: vue.unref(index.isDisabled)(props, column),
|
|
324
|
-
timeRangeFill: column.timeRangeFill,
|
|
325
|
-
onChange: ($event) => onChangeHandler()
|
|
326
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled", "timeRangeFill", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.AppDatePicker), vue.mergeProps({
|
|
327
|
-
key: 1,
|
|
328
|
-
modelValue: __props.model[column.field],
|
|
329
|
-
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
330
|
-
"is-range": false,
|
|
331
|
-
style: { "width": "100%" }
|
|
332
|
-
}, { ref_for: true }, column.attrs, {
|
|
333
|
-
disabled: vue.unref(index.isDisabled)(props, column),
|
|
334
|
-
timeRangeFill: column.timeRangeFill,
|
|
335
|
-
onChange: ($event) => onChangeHandler()
|
|
336
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "timeRangeFill", "onChange"]))
|
|
337
|
-
],
|
|
338
|
-
64
|
|
339
|
-
/* STABLE_FRAGMENT */
|
|
340
|
-
)) : column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
341
|
-
vue.Fragment,
|
|
342
|
-
{ key: 4 },
|
|
343
|
-
[
|
|
344
|
-
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
345
|
-
vue.createVNode(vue.unref(index$2.AppOrgCascader), vue.mergeProps({
|
|
346
|
-
modelValue: __props.model[column.field],
|
|
347
|
-
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
348
|
-
disabled: vue.unref(index.isDisabled)(props, column)
|
|
349
|
-
}, { ref_for: true }, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
350
|
-
],
|
|
351
|
-
2112
|
|
352
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
353
|
-
)) : vue.createCommentVNode("v-if", true)
|
|
354
|
-
],
|
|
355
|
-
4
|
|
356
|
-
/* STYLE */
|
|
357
|
-
)
|
|
358
|
-
],
|
|
359
|
-
4
|
|
360
|
-
/* STYLE */
|
|
361
|
-
),
|
|
362
|
-
column.type === "date-picker" && ["daterange", "datetimerange"].includes((_b = column.attrs) == null ? void 0 : _b.type) && ((_c = column.timeRangeOptions) == null ? void 0 : _c.length) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
363
|
-
key: 0,
|
|
364
|
-
class: "flex text-main"
|
|
365
|
-
}, [
|
|
366
|
-
(vue.openBlock(true), vue.createElementBlock(
|
|
367
|
-
vue.Fragment,
|
|
368
|
-
null,
|
|
369
|
-
vue.renderList(column.timeRangeOptions, (item, index$1) => {
|
|
370
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
371
|
-
key: index$1,
|
|
372
|
-
class: vue.normalizeClass(["border-l border-border px-[10px] cursor-pointer", {
|
|
373
|
-
"bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": vue.unref(index.isSelectedTimeRange)(column, item, __props.model)
|
|
374
|
-
}]),
|
|
375
|
-
onClick: ($event) => onTimeRangeClickHandler(column, item)
|
|
376
|
-
}, [
|
|
377
|
-
vue.createElementVNode(
|
|
378
|
-
"span",
|
|
379
|
-
null,
|
|
380
|
-
vue.toDisplayString(item.label),
|
|
381
|
-
1
|
|
382
|
-
/* TEXT */
|
|
383
|
-
)
|
|
384
|
-
], 10, ["onClick"]);
|
|
385
|
-
}),
|
|
386
|
-
128
|
|
387
|
-
/* KEYED_FRAGMENT */
|
|
388
|
-
))
|
|
389
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
390
|
-
])
|
|
391
|
-
];
|
|
392
|
-
}),
|
|
393
|
-
_: 2
|
|
394
|
-
/* DYNAMIC */
|
|
395
|
-
}, 1032, ["prop"])) : vue.createCommentVNode("v-if", true)
|
|
396
|
-
],
|
|
397
|
-
64
|
|
398
|
-
/* STABLE_FRAGMENT */
|
|
399
|
-
);
|
|
226
|
+
return vue.openBlock(), vue.createBlock(appSearchItem.default, {
|
|
227
|
+
key: column.key,
|
|
228
|
+
model: __props.model,
|
|
229
|
+
column,
|
|
230
|
+
onSearch: onSearchHandler
|
|
231
|
+
}, vue.createSlots({
|
|
232
|
+
_: 2
|
|
233
|
+
/* DYNAMIC */
|
|
234
|
+
}, [
|
|
235
|
+
vue.renderList(_ctx.$slots, (_, slotName) => {
|
|
236
|
+
return {
|
|
237
|
+
name: slotName,
|
|
238
|
+
fn: vue.withCtx((scope) => [
|
|
239
|
+
vue.renderSlot(_ctx.$slots, slotName, vue.mergeProps({ ref_for: true }, scope))
|
|
240
|
+
])
|
|
241
|
+
};
|
|
242
|
+
})
|
|
243
|
+
]), 1032, ["model", "column"]);
|
|
400
244
|
}),
|
|
401
245
|
128
|
|
402
246
|
/* KEYED_FRAGMENT */
|