hy-dispatch-ui-v3 0.1.1 → 0.1.3
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 +56 -6
- package/es/components/appButton/appButton.vue.mjs +6 -6
- package/es/components/appButton/style/appButton.scss +4 -4
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +26 -10
- package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +42 -18
- package/es/components/appConfirmDialog/appConfirmMethod.mjs +15 -9
- package/es/components/appForm/appForm.vue.mjs +17 -3
- package/es/components/appForm/js/useAppForm.mjs +15 -1
- package/es/components/appIcon/index.mjs +1 -3
- package/es/components/appIcon/style/appIcon.scss +2 -2
- package/es/components/{appIcon → appIconBox}/appIconBox.vue.mjs +3 -3
- package/es/components/appIconBox/index.mjs +6 -0
- package/es/components/appNoPermissions/appNoPermissions.vue.mjs +48 -0
- package/es/components/appNoPermissions/index.mjs +6 -0
- package/es/components/appNoPermissions/style/appNoPermissions.scss +0 -0
- package/es/components/appNoPermissionsMap/appNoPermissionsMap.vue.mjs +50 -0
- package/es/components/appNoPermissionsMap/index.mjs +6 -0
- package/es/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +1 -1
- package/es/components/appSearch/appSearch.vue.mjs +22 -6
- package/es/components/appSearch/js/index.mjs +17 -8
- package/es/components/appSearch/js/useAppSearch.mjs +12 -1
- package/es/components/appTable/appTable.vue.mjs +27 -10
- package/es/components/appTable/js/index.mjs +21 -6
- package/es/components/appTable/js/search.mjs +0 -2
- package/es/components/appTable/js/useAppTable.mjs +17 -1
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +136 -0
- package/es/components/appUserAvatar/index.mjs +6 -0
- package/es/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/es/components/index.mjs +5 -1
- package/es/hooks/index.mjs +2 -0
- package/es/hooks/useApi.mjs +9 -0
- package/es/hooks/useGlobalConfig.mjs +5 -0
- package/es/{store/maintain.mjs → hooks/useResizeHandler.mjs} +29 -43
- package/es/hooks/useUserAvatarMap.mjs +9 -0
- package/es/index.mjs +7 -3
- package/es/locale/en.mjs +12 -0
- package/es/locale/zh_CN.mjs +13 -1
- package/es/make-installer.mjs +0 -5
- package/es/style/index.scss +0 -2
- package/es/version.mjs +1 -1
- package/lib/components/appButton/appButton.vue.js +6 -6
- package/lib/components/appButton/style/appButton.scss +4 -4
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +26 -10
- package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +41 -17
- package/lib/components/appConfirmDialog/appConfirmMethod.js +14 -8
- package/lib/components/appForm/appForm.vue.js +17 -3
- package/lib/components/appForm/js/useAppForm.js +15 -1
- package/lib/components/appIcon/index.js +0 -3
- package/lib/components/appIcon/style/appIcon.scss +2 -2
- package/lib/components/{appIcon → appIconBox}/appIconBox.vue.js +3 -3
- package/lib/components/appIconBox/index.js +11 -0
- package/lib/components/appNoPermissions/appNoPermissions.vue.js +52 -0
- package/lib/components/appNoPermissions/index.js +11 -0
- package/lib/components/appNoPermissions/style/appNoPermissions.scss +0 -0
- package/lib/components/appNoPermissionsMap/appNoPermissionsMap.vue.js +54 -0
- package/lib/components/appNoPermissionsMap/index.js +11 -0
- package/lib/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +1 -1
- package/lib/components/appSearch/appSearch.vue.js +23 -7
- package/lib/components/appSearch/js/index.js +17 -7
- package/lib/components/appSearch/js/useAppSearch.js +12 -1
- package/lib/components/appTable/appTable.vue.js +26 -9
- package/lib/components/appTable/js/index.js +21 -6
- package/lib/components/appTable/js/search.js +0 -2
- package/lib/components/appTable/js/useAppTable.js +17 -1
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +140 -0
- package/lib/components/appUserAvatar/index.js +11 -0
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/lib/components/index.js +16 -9
- package/lib/hooks/index.js +5 -0
- package/lib/hooks/useApi.js +9 -0
- package/lib/hooks/useGlobalConfig.js +5 -0
- package/lib/{store/maintain.js → hooks/useResizeHandler.js} +29 -43
- package/lib/hooks/useUserAvatarMap.js +12 -0
- package/lib/index.js +21 -13
- package/lib/locale/en.js +12 -0
- package/lib/locale/zh_CN.js +13 -1
- package/lib/make-installer.js +0 -5
- package/lib/style/index.scss +0 -2
- package/lib/version.js +1 -1
- package/package.json +21 -2
- package/es/store/index.mjs +0 -6
- package/lib/store/index.js +0 -9
- /package/es/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
- /package/lib/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var useApi = require('../../hooks/useApi.js');
|
|
6
7
|
var index = require('../appConfigProvider/index.js');
|
|
7
8
|
var appConfirmDialog = require('./appConfirmDialog.vue.js');
|
|
8
9
|
var useGlobalConfig = require('../../hooks/useGlobalConfig.js');
|
|
@@ -12,22 +13,25 @@ function appConfirmMethod(config) {
|
|
|
12
13
|
let container = document.createDocumentFragment();
|
|
13
14
|
const currentConfig = {
|
|
14
15
|
...config,
|
|
15
|
-
|
|
16
|
-
if (config.onClose) {
|
|
17
|
-
config.onClose();
|
|
18
|
-
}
|
|
16
|
+
onHide: () => {
|
|
19
17
|
destroy();
|
|
20
18
|
}
|
|
21
19
|
};
|
|
22
20
|
let confirmDialogInstance = null;
|
|
23
21
|
function render(props) {
|
|
24
22
|
const globalConfig = useGlobalConfig.useGlobalConfig();
|
|
23
|
+
const {
|
|
24
|
+
locale = "zhCn",
|
|
25
|
+
api = useApi.defaultAxios,
|
|
26
|
+
...args
|
|
27
|
+
} = vue.unref(globalConfig) || {};
|
|
25
28
|
const vm = vue.createVNode(appConfirmDialog.default, props);
|
|
26
29
|
const configProvider = vue.createVNode(
|
|
27
30
|
index.AppConfigProvider,
|
|
28
31
|
{
|
|
29
|
-
locale
|
|
30
|
-
api
|
|
32
|
+
locale,
|
|
33
|
+
api,
|
|
34
|
+
...args
|
|
31
35
|
},
|
|
32
36
|
() => [vm]
|
|
33
37
|
);
|
|
@@ -52,10 +56,10 @@ function appConfirmMethod(config) {
|
|
|
52
56
|
appConfirmDialog.default.tip = (props) => {
|
|
53
57
|
const { t } = useLocale.useLocale();
|
|
54
58
|
return appConfirmMethod({
|
|
55
|
-
showCancel: false,
|
|
56
59
|
dialogTitle: t("confirmDialog.prompt"),
|
|
57
60
|
title: t("confirmDialog.prompt"),
|
|
58
61
|
content: t("confirmDialog.content"),
|
|
62
|
+
showCancel: false,
|
|
59
63
|
...props
|
|
60
64
|
});
|
|
61
65
|
};
|
|
@@ -75,6 +79,7 @@ appConfirmDialog.default.warning = (props) => {
|
|
|
75
79
|
title: t("confirmDialog.prompt"),
|
|
76
80
|
titleClass: "text-warning",
|
|
77
81
|
content: t("confirmDialog.content"),
|
|
82
|
+
iconColor: "rgb(var(--hy-warning))",
|
|
78
83
|
...props
|
|
79
84
|
});
|
|
80
85
|
};
|
|
@@ -82,10 +87,11 @@ appConfirmDialog.default.danger = (props) => {
|
|
|
82
87
|
const { t } = useLocale.useLocale();
|
|
83
88
|
return appConfirmMethod({
|
|
84
89
|
dialogTitle: t("confirmDialog.dangerousOperation"),
|
|
85
|
-
titleClass: "text-danger
|
|
90
|
+
titleClass: "text-danger",
|
|
86
91
|
title: t("confirmDialog.prompt"),
|
|
87
92
|
content: t("confirmDialog.content"),
|
|
88
93
|
submitType: "danger",
|
|
94
|
+
iconColor: "rgb(var(--hy-danger))",
|
|
89
95
|
...props
|
|
90
96
|
});
|
|
91
97
|
};
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var index$1 = require('../appIcon/index.js');
|
|
8
|
-
var
|
|
8
|
+
var index$2 = require('../appDatePicker/index.js');
|
|
9
|
+
var index$3 = require('../appOrgCascader/index.js');
|
|
9
10
|
var index = require('./js/index.js');
|
|
10
11
|
var useAppForm = require('./js/useAppForm.js');
|
|
11
12
|
var useLocale = require('../../hooks/useLocale.js');
|
|
@@ -251,7 +252,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
251
252
|
"daterange",
|
|
252
253
|
"monthrange",
|
|
253
254
|
"yearrange"
|
|
254
|
-
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(
|
|
255
|
+
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.AppDatePicker), vue.mergeProps({
|
|
255
256
|
key: 0,
|
|
256
257
|
start: __props.model[column.field[0]],
|
|
257
258
|
"onUpdate:start": ($event) => __props.model[column.field[0]] = $event,
|
|
@@ -261,7 +262,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
261
262
|
style: { "width": "100%" }
|
|
262
263
|
}, { ref_for: true }, column.attrs, {
|
|
263
264
|
disabled: vue.unref(index.isDisabled)(props, column)
|
|
264
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(
|
|
265
|
+
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.AppDatePicker), vue.mergeProps({
|
|
265
266
|
key: 1,
|
|
266
267
|
modelValue: __props.model[column.field],
|
|
267
268
|
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
@@ -299,6 +300,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
299
300
|
],
|
|
300
301
|
2112
|
|
301
302
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
303
|
+
)) : column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
304
|
+
vue.Fragment,
|
|
305
|
+
{ key: 6 },
|
|
306
|
+
[
|
|
307
|
+
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
308
|
+
vue.createVNode(vue.unref(index$3.AppOrgCascader), vue.mergeProps({
|
|
309
|
+
modelValue: __props.model[column.field],
|
|
310
|
+
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
311
|
+
disabled: vue.unref(index.isDisabled)(props, column)
|
|
312
|
+
}, { ref_for: true }, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
313
|
+
],
|
|
314
|
+
2112
|
|
315
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
302
316
|
)) : vue.createCommentVNode("v-if", true)
|
|
303
317
|
],
|
|
304
318
|
64
|
|
@@ -6,6 +6,15 @@ var date = require('../../../utils/date.js');
|
|
|
6
6
|
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
7
|
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
|
+
const genDefaultLabel = (config) => {
|
|
10
|
+
if (config.label) return config.label;
|
|
11
|
+
const { t } = useLocale.useLocale();
|
|
12
|
+
switch (config.type) {
|
|
13
|
+
// 部门级联选择框
|
|
14
|
+
case "org-cascader":
|
|
15
|
+
return t("form.department");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
const genPlaceholderHandler = (config) => {
|
|
10
19
|
const { t } = useLocale.useLocale();
|
|
11
20
|
const { type, label, attrs = {} } = config || {};
|
|
@@ -13,8 +22,10 @@ const genPlaceholderHandler = (config) => {
|
|
|
13
22
|
switch (type) {
|
|
14
23
|
case "input":
|
|
15
24
|
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
25
|
+
break;
|
|
16
26
|
case "select":
|
|
17
27
|
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
28
|
+
break;
|
|
18
29
|
case "date-picker":
|
|
19
30
|
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
20
31
|
attrs == null ? void 0 : attrs.type
|
|
@@ -40,6 +51,7 @@ const genPlaceholderHandler = (config) => {
|
|
|
40
51
|
} else {
|
|
41
52
|
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
42
53
|
}
|
|
54
|
+
break;
|
|
43
55
|
default:
|
|
44
56
|
placeholder = placeholder || label;
|
|
45
57
|
}
|
|
@@ -74,13 +86,15 @@ const rulesHandler = (config) => {
|
|
|
74
86
|
return rules;
|
|
75
87
|
};
|
|
76
88
|
function appFormItemHandler(column = {}) {
|
|
77
|
-
const
|
|
89
|
+
const label = genDefaultLabel(column);
|
|
90
|
+
const { placeholder, startPlaceholder, endPlaceholder } = genPlaceholderHandler({ ...column, label });
|
|
78
91
|
const attrs = { ...column.attrs || {}, placeholder };
|
|
79
92
|
column = handler.mergeDeep(
|
|
80
93
|
{ ...column },
|
|
81
94
|
{
|
|
82
95
|
key: /* @__PURE__ */ Symbol("appFormItemKey"),
|
|
83
96
|
field: column.prop,
|
|
97
|
+
label,
|
|
84
98
|
readonly: column.readonly || false,
|
|
85
99
|
rules: rulesHandler(column)
|
|
86
100
|
}
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var appIcon = require('./appIcon.vue.js');
|
|
6
|
-
var appIconBox$1 = require('./appIconBox.vue.js');
|
|
7
6
|
var handler = require('../../utils/handler.js');
|
|
8
7
|
|
|
9
8
|
const AppIcon = handler.withInstall(appIcon.default);
|
|
10
|
-
const appIconBox = handler.withInstall(appIconBox$1.default);
|
|
11
9
|
|
|
12
10
|
exports.AppIcon = AppIcon;
|
|
13
|
-
exports.appIconBox = appIconBox;
|
|
14
11
|
exports.default = AppIcon;
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
|
-
var
|
|
7
|
+
var index = require('../appIcon/index.js');
|
|
8
8
|
|
|
9
9
|
import "./style/appIconBox.scss";
|
|
10
10
|
|
|
11
11
|
const __default__ = vue.defineComponent({
|
|
12
|
-
name: "
|
|
12
|
+
name: "AppIconBox"
|
|
13
13
|
});
|
|
14
14
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
15
|
props: {
|
|
@@ -73,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
73
73
|
style: vue.normalizeStyle(style.value)
|
|
74
74
|
},
|
|
75
75
|
[
|
|
76
|
-
vue.createVNode(
|
|
76
|
+
vue.createVNode(vue.unref(index.AppIcon), {
|
|
77
77
|
prefix: __props.prefix,
|
|
78
78
|
"svg-name": __props.svgName,
|
|
79
79
|
style: { width: "100%", height: "100%" }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appIconBox = require('./appIconBox.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppIconBox = handler.withInstall(appIconBox.default);
|
|
9
|
+
|
|
10
|
+
exports.AppIconBox = AppIconBox;
|
|
11
|
+
exports.default = AppIconBox;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index = require('../appIcon/index.js');
|
|
7
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
8
|
+
|
|
9
|
+
import "./style/appNoPermissions.scss";
|
|
10
|
+
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "AppNoPermissions"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
|
+
props: {
|
|
16
|
+
svgName: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "2-v3-base-no-data-noData"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: [],
|
|
22
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { t } = useLocale.useLocale();
|
|
24
|
+
__expose({});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
|
|
27
|
+
vue.createVNode(vue.unref(index.AppIcon), {
|
|
28
|
+
"svg-name": __props.svgName,
|
|
29
|
+
"class-name": "!w-[46px] !h-[46px]"
|
|
30
|
+
}, null, 8, ["svg-name"]),
|
|
31
|
+
vue.createElementVNode("div", { class: "text-center mt-[12px]" }, [
|
|
32
|
+
vue.createElementVNode(
|
|
33
|
+
"p",
|
|
34
|
+
null,
|
|
35
|
+
vue.toDisplayString(vue.unref(t)("permissino.youDoNotHaveSubordinatePermissionsForThisModule")),
|
|
36
|
+
1
|
|
37
|
+
/* TEXT */
|
|
38
|
+
),
|
|
39
|
+
vue.createElementVNode(
|
|
40
|
+
"p",
|
|
41
|
+
null,
|
|
42
|
+
vue.toDisplayString(vue.unref(t)("permissino.pleaseContactTheAdministrator")),
|
|
43
|
+
1
|
|
44
|
+
/* TEXT */
|
|
45
|
+
)
|
|
46
|
+
])
|
|
47
|
+
]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appNoPermissions = require('./appNoPermissions.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppNoPermissions = handler.withInstall(appNoPermissions.default);
|
|
9
|
+
|
|
10
|
+
exports.AppNoPermissions = AppNoPermissions;
|
|
11
|
+
exports.default = AppNoPermissions;
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index = require('../appIcon/index.js');
|
|
7
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
8
|
+
|
|
9
|
+
import "./style/appNoPermissionsMap.scss";
|
|
10
|
+
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "AppNoPermissionsMap"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
|
+
props: {
|
|
16
|
+
svgName: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "2-v3-base-no-data-noData"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: [],
|
|
22
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { t } = useLocale.useLocale();
|
|
24
|
+
__expose({});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
|
|
27
|
+
vue.createVNode(vue.unref(index.AppIcon), {
|
|
28
|
+
"svg-name": __props.svgName,
|
|
29
|
+
"class-name": "!w-[46px] !h-[46px]"
|
|
30
|
+
}, null, 8, ["svg-name"]),
|
|
31
|
+
vue.createElementVNode("div", { class: "text-center mt-[12px]" }, [
|
|
32
|
+
vue.createElementVNode(
|
|
33
|
+
"p",
|
|
34
|
+
null,
|
|
35
|
+
vue.toDisplayString(vue.unref(t)("permissino.youDoNotHaveAMapConfigurationForThisModule")),
|
|
36
|
+
1
|
|
37
|
+
/* TEXT */
|
|
38
|
+
),
|
|
39
|
+
vue.createElementVNode(
|
|
40
|
+
"p",
|
|
41
|
+
null,
|
|
42
|
+
vue.toDisplayString(vue.unref(t)(
|
|
43
|
+
"permissino.pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration"
|
|
44
|
+
)),
|
|
45
|
+
1
|
|
46
|
+
/* TEXT */
|
|
47
|
+
)
|
|
48
|
+
])
|
|
49
|
+
]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appNoPermissionsMap = require('./appNoPermissionsMap.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppNoPermissionsMap = handler.withInstall(appNoPermissionsMap.default);
|
|
9
|
+
|
|
10
|
+
exports.AppNoPermissionsMap = AppNoPermissionsMap;
|
|
11
|
+
exports.default = AppNoPermissionsMap;
|
|
File without changes
|
|
@@ -5,7 +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
|
-
var
|
|
8
|
+
var index$1 = require('../appDatePicker/index.js');
|
|
9
|
+
var index$2 = require('../appOrgCascader/index.js');
|
|
9
10
|
var index = require('./js/index.js');
|
|
10
11
|
var useAppSearch = require('./js/useAppSearch.js');
|
|
11
12
|
var useLocale = require('../../hooks/useLocale.js');
|
|
@@ -314,7 +315,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
314
315
|
"daterange",
|
|
315
316
|
"monthrange",
|
|
316
317
|
"yearrange"
|
|
317
|
-
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(
|
|
318
|
+
].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({
|
|
318
319
|
key: 0,
|
|
319
320
|
start: __props.model[column.field[0]],
|
|
320
321
|
"onUpdate:start": ($event) => __props.model[column.field[0]] = $event,
|
|
@@ -326,7 +327,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
326
327
|
disabled: vue.unref(index.isDisabled)(props, column),
|
|
327
328
|
timeRangeFill: column.timeRangeFill,
|
|
328
329
|
onChange: ($event) => onChangeHandler($event, column)
|
|
329
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled", "timeRangeFill", "onChange"])) : (vue.openBlock(), vue.createBlock(
|
|
330
|
+
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled", "timeRangeFill", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.AppDatePicker), vue.mergeProps({
|
|
330
331
|
key: 1,
|
|
331
332
|
modelValue: __props.model[column.field],
|
|
332
333
|
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
@@ -340,6 +341,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
340
341
|
],
|
|
341
342
|
64
|
|
342
343
|
/* STABLE_FRAGMENT */
|
|
344
|
+
)) : column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
345
|
+
vue.Fragment,
|
|
346
|
+
{ key: 4 },
|
|
347
|
+
[
|
|
348
|
+
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
349
|
+
vue.createVNode(vue.unref(index$2.AppOrgCascader), vue.mergeProps({
|
|
350
|
+
modelValue: __props.model[column.field],
|
|
351
|
+
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
352
|
+
disabled: vue.unref(index.isDisabled)(props, column)
|
|
353
|
+
}, { ref_for: true }, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
354
|
+
],
|
|
355
|
+
2112
|
|
356
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
343
357
|
)) : vue.createCommentVNode("v-if", true)
|
|
344
358
|
],
|
|
345
359
|
4
|
|
@@ -356,10 +370,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
356
370
|
(vue.openBlock(true), vue.createElementBlock(
|
|
357
371
|
vue.Fragment,
|
|
358
372
|
null,
|
|
359
|
-
vue.renderList(column.timeRangeOptions, (item, index) => {
|
|
373
|
+
vue.renderList(column.timeRangeOptions, (item, index$1) => {
|
|
360
374
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
361
|
-
key: index,
|
|
362
|
-
class: "border-l border-border px-[10px] cursor-pointer",
|
|
375
|
+
key: index$1,
|
|
376
|
+
class: vue.normalizeClass(["border-l border-border px-[10px] cursor-pointer", {
|
|
377
|
+
"bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": vue.unref(index.isSelectedTimeRange)(column, item, __props.model)
|
|
378
|
+
}]),
|
|
363
379
|
onClick: ($event) => onTimeRangeClickHandler(column, item)
|
|
364
380
|
}, [
|
|
365
381
|
vue.createElementVNode(
|
|
@@ -369,7 +385,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
369
385
|
1
|
|
370
386
|
/* TEXT */
|
|
371
387
|
)
|
|
372
|
-
],
|
|
388
|
+
], 10, ["onClick"]);
|
|
373
389
|
}),
|
|
374
390
|
128
|
|
375
391
|
/* KEYED_FRAGMENT */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var dayjs = require('dayjs');
|
|
4
4
|
var vue = require('vue');
|
|
5
|
-
var maintain = require('../../../store/maintain.js');
|
|
6
5
|
var is = require('../../../utils/is.js');
|
|
6
|
+
var useResizeHandler = require('../../../hooks/useResizeHandler.js');
|
|
7
7
|
|
|
8
8
|
function columnItemStyle(props, column) {
|
|
9
9
|
const { width } = column;
|
|
@@ -44,10 +44,10 @@ function isEmptyValue(e) {
|
|
|
44
44
|
return is.isEmpty(e) || is.isArray(e) && !e.length;
|
|
45
45
|
}
|
|
46
46
|
function useShrink(props, templateRef) {
|
|
47
|
+
const { addResize, removeResize } = useResizeHandler.useResizeHandler();
|
|
48
|
+
const resizeExpandKey = /* @__PURE__ */ Symbol("appSearchExpand");
|
|
47
49
|
const isExpand = vue.ref(false);
|
|
48
50
|
const containerHeight = vue.ref(getContainerPickUpHeight());
|
|
49
|
-
const maintainStore = maintain.useMaintainStore();
|
|
50
|
-
const resizeExpandKey = /* @__PURE__ */ Symbol("appSearchExpand");
|
|
51
51
|
function getContainerPickUpHeight() {
|
|
52
52
|
switch (props.size) {
|
|
53
53
|
case "large":
|
|
@@ -73,7 +73,7 @@ function useShrink(props, templateRef) {
|
|
|
73
73
|
() => {
|
|
74
74
|
vue.nextTick(() => {
|
|
75
75
|
shrinkResizeHandler();
|
|
76
|
-
|
|
76
|
+
addResize(resizeExpandKey, shrinkResizeHandler);
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
{ immediate: true, deep: true }
|
|
@@ -84,15 +84,16 @@ function useShrink(props, templateRef) {
|
|
|
84
84
|
switchShrink,
|
|
85
85
|
shrinkResizeHandler,
|
|
86
86
|
shrinkDestroy() {
|
|
87
|
-
|
|
87
|
+
removeResize(resizeExpandKey);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
function timeRangeHandler(column, options) {
|
|
92
92
|
const { value, unit } = options;
|
|
93
|
-
|
|
94
|
-
const format =
|
|
93
|
+
let { timeRangeFill, attrs } = column;
|
|
94
|
+
const format = "YYYY-MM-DD";
|
|
95
95
|
const date = dayjs(Date.now());
|
|
96
|
+
timeRangeFill = timeRangeFill || attrs.type === "datetimerange";
|
|
96
97
|
switch (unit) {
|
|
97
98
|
case "year":
|
|
98
99
|
case "month":
|
|
@@ -111,11 +112,20 @@ function timeRangeHandler(column, options) {
|
|
|
111
112
|
];
|
|
112
113
|
}
|
|
113
114
|
}
|
|
115
|
+
function isSelectedTimeRange(column, options, model = {}) {
|
|
116
|
+
const [start, end] = timeRangeHandler(column, options);
|
|
117
|
+
const { field } = column;
|
|
118
|
+
if (Array.isArray(field)) {
|
|
119
|
+
return start === model[field[0]] && end === model[field[1]];
|
|
120
|
+
}
|
|
121
|
+
return start === model[field][0] && end === model[field][1];
|
|
122
|
+
}
|
|
114
123
|
|
|
115
124
|
exports.columnItemInputStyle = columnItemInputStyle;
|
|
116
125
|
exports.columnItemStyle = columnItemStyle;
|
|
117
126
|
exports.columnShowHandler = columnShowHandler;
|
|
118
127
|
exports.isDisabled = isDisabled;
|
|
119
128
|
exports.isEmptyValue = isEmptyValue;
|
|
129
|
+
exports.isSelectedTimeRange = isSelectedTimeRange;
|
|
120
130
|
exports.timeRangeHandler = timeRangeHandler;
|
|
121
131
|
exports.useShrink = useShrink;
|
|
@@ -6,6 +6,15 @@ var date = require('../../../utils/date.js');
|
|
|
6
6
|
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
7
|
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
|
+
const genDefaultLabel = (config) => {
|
|
10
|
+
if (config.label) return config.label;
|
|
11
|
+
const { t } = useLocale.useLocale();
|
|
12
|
+
switch (config.type) {
|
|
13
|
+
// 部门级联选择框
|
|
14
|
+
case "org-cascader":
|
|
15
|
+
return t("form.department");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
const genPlaceholderHandler = (config) => {
|
|
10
19
|
const { t } = useLocale.useLocale();
|
|
11
20
|
const { type, label, attrs = {} } = config || {};
|
|
@@ -96,7 +105,8 @@ const timeRangeOptionsHandler = (config) => {
|
|
|
96
105
|
}, []);
|
|
97
106
|
};
|
|
98
107
|
function appSearchItemHandler(column = {}) {
|
|
99
|
-
const
|
|
108
|
+
const label = genDefaultLabel(column);
|
|
109
|
+
const { placeholder, startPlaceholder, endPlaceholder } = genPlaceholderHandler({ ...column, label });
|
|
100
110
|
const attrs = {
|
|
101
111
|
clearable: true,
|
|
102
112
|
...column.attrs || {},
|
|
@@ -108,6 +118,7 @@ function appSearchItemHandler(column = {}) {
|
|
|
108
118
|
{
|
|
109
119
|
key: /* @__PURE__ */ Symbol("appFormItemKey"),
|
|
110
120
|
field: column.prop,
|
|
121
|
+
label,
|
|
111
122
|
readonly: column.readonly || false,
|
|
112
123
|
width,
|
|
113
124
|
inputWidth,
|
|
@@ -12,7 +12,7 @@ var columnSelect = require('./cpns/columnSelect.vue.js');
|
|
|
12
12
|
var useMixins = require('../../hooks/useMixins.js');
|
|
13
13
|
var index = require('../appSearch/index.js');
|
|
14
14
|
var adaptive = require('../../utils/adaptive.js');
|
|
15
|
-
var index$2 = require('../
|
|
15
|
+
var index$2 = require('../appIconBox/index.js');
|
|
16
16
|
var useLocale = require('../../hooks/useLocale.js');
|
|
17
17
|
var is = require('../../utils/is.js');
|
|
18
18
|
|
|
@@ -174,9 +174,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
174
174
|
tableTriggerRef,
|
|
175
175
|
getSelectedList,
|
|
176
176
|
setTableRowClassName,
|
|
177
|
+
clearSelection,
|
|
178
|
+
clearSelectedList,
|
|
177
179
|
onTableRowClickHandler,
|
|
178
180
|
onTableRowContextmenuHandler,
|
|
179
|
-
|
|
181
|
+
onTableSelectHandler,
|
|
180
182
|
// useAppTableSearch
|
|
181
183
|
// 表单查询
|
|
182
184
|
formModel,
|
|
@@ -213,7 +215,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
213
215
|
resetFn,
|
|
214
216
|
getSelectedList,
|
|
215
217
|
getTotalElements,
|
|
216
|
-
getTableDataSource
|
|
218
|
+
getTableDataSource,
|
|
219
|
+
clearSelection,
|
|
220
|
+
clearSelectedList
|
|
217
221
|
});
|
|
218
222
|
return (_ctx, _cache) => {
|
|
219
223
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -258,7 +262,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
258
262
|
key: 2,
|
|
259
263
|
modelValue: vue.unref(formModel).query,
|
|
260
264
|
"onUpdate:modelValue": ($event) => vue.unref(formModel).query = $event,
|
|
261
|
-
class: "w-[
|
|
265
|
+
class: "w-[160px]",
|
|
262
266
|
placeholder: vue.unref(t)("table.searchFor", [vue.unref(searchPlaceholder)]),
|
|
263
267
|
onKeydown: vue.withKeys(vue.unref(onSearchQueryHandler), ["enter"])
|
|
264
268
|
}, {
|
|
@@ -289,7 +293,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
289
293
|
hidden: !vue.unref(showFilter),
|
|
290
294
|
class: vue.normalizeClass({ "mb-4": vue.unref(showFilter) }),
|
|
291
295
|
onSearch: ($event) => vue.unref(getData)(1)
|
|
292
|
-
},
|
|
296
|
+
}, vue.createSlots({
|
|
297
|
+
_: 2
|
|
298
|
+
/* DYNAMIC */
|
|
299
|
+
}, [
|
|
300
|
+
vue.renderList(_ctx.$slots, (_, slotName) => {
|
|
301
|
+
return {
|
|
302
|
+
name: slotName,
|
|
303
|
+
fn: vue.withCtx((scope) => [
|
|
304
|
+
vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
305
|
+
])
|
|
306
|
+
};
|
|
307
|
+
})
|
|
308
|
+
]), 1032, ["model", "columns", "hidden", "class", "onSearch"])) : vue.createCommentVNode("v-if", true),
|
|
293
309
|
vue.createCommentVNode(" \u4E3B\u5185\u5BB9 "),
|
|
294
310
|
vue.createElementVNode("div", { class: "h-0 flex-1 flex flex-col border border-border rounded pb-5 overflow-hidden" }, [
|
|
295
311
|
vue.renderSlot(_ctx.$slots, "table", { data: vue.unref(tableDataSource) }, () => [
|
|
@@ -305,7 +321,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
305
321
|
style: {
|
|
306
322
|
"font-size": `${vue.unref(adaptive.parseRem)(__props.fontSize)}rem`
|
|
307
323
|
},
|
|
308
|
-
|
|
324
|
+
onSelect: vue.unref(onTableSelectHandler),
|
|
325
|
+
onSelectAll: vue.unref(onTableSelectHandler),
|
|
309
326
|
onRowClick: vue.unref(onTableRowClickHandler),
|
|
310
327
|
onRowContextmenu: vue.unref(onTableRowContextmenuHandler)
|
|
311
328
|
}, _ctx.$attrs), {
|
|
@@ -369,7 +386,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
369
386
|
scope,
|
|
370
387
|
"default"
|
|
371
388
|
), (citem, cindex) => {
|
|
372
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$2.
|
|
389
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.AppIconBox), {
|
|
373
390
|
key: cindex,
|
|
374
391
|
"svg-name": citem.svgName,
|
|
375
392
|
altText: citem.label,
|
|
@@ -446,7 +463,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
446
463
|
)
|
|
447
464
|
]),
|
|
448
465
|
default: vue.withCtx(() => [
|
|
449
|
-
vue.createVNode(vue.unref(index$2.
|
|
466
|
+
vue.createVNode(vue.unref(index$2.AppIconBox), {
|
|
450
467
|
key: "more",
|
|
451
468
|
"svg-name": "system-burst_analysis_select_option",
|
|
452
469
|
altText: vue.unref(t)("table.moreOperations"),
|
|
@@ -495,7 +512,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
495
512
|
]),
|
|
496
513
|
_: 3
|
|
497
514
|
/* FORWARDED */
|
|
498
|
-
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelectAll", "onRowClick", "onRowContextmenu"])
|
|
515
|
+
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])
|
|
499
516
|
]),
|
|
500
517
|
vue.createCommentVNode(" \u5206\u9875 "),
|
|
501
518
|
__props.showPagination ? (vue.openBlock(), vue.createElementBlock("div", {
|