@ctzy-web-client/plugin-component-vue 1.0.25 → 1.0.27
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/es/_virtual/_plugin-vue_export-helper.mjs +11 -0
- package/es/advance-select/advance-operation.mjs +48 -51
- package/es/advance-select/advance-option.mjs +128 -163
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +11 -5
- package/es/advance-select/advance-select.mjs +323 -370
- package/es/advance-select/events-helpers.mjs +9 -0
- package/es/advance-select/index.mjs +9 -0
- package/es/advance-select/use-advance-option.mjs +9 -0
- package/es/advance-select/use-advance-select.mjs +9 -0
- package/es/application-slot/application-slot.mjs +9 -0
- package/es/application-slot/breadcrumb-item.mjs +26 -20
- package/es/application-slot/header-tools-item.mjs +26 -20
- package/es/application-slot/index.mjs +9 -0
- package/es/breadcrumb-select/breadcrumb-select.mjs +123 -137
- package/es/breadcrumb-select/index.mjs +9 -0
- package/es/components.mjs +9 -0
- package/es/contextmenu/contextmenu-item.mjs +24 -19
- package/es/contextmenu/contextmenu.mjs +68 -73
- package/es/contextmenu/index.mjs +9 -0
- package/es/contextmenu/use-contextmenu.mjs +10 -1
- package/es/data-form/data-form-item.mjs +41 -49
- package/es/data-form/data-form.mjs +176 -213
- package/es/data-form/dynamic-component.mjs +9 -0
- package/es/data-form/form-components/Blots/AtBlot.mjs +9 -0
- package/es/data-form/form-components/bwa-date-picker.mjs +50 -51
- package/es/data-form/form-components/bwa-date-time-picker.mjs +55 -56
- package/es/data-form/form-components/bwa-input-float.mjs +48 -48
- package/es/data-form/form-components/bwa-input-integer.mjs +61 -68
- package/es/data-form/form-components/bwa-input.mjs +43 -43
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -40
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +230 -555
- package/es/data-form/form-components/bwa-rich-text.mjs +326 -404
- package/es/data-form/form-components/bwa-select.mjs +81 -84
- package/es/data-form/form-components/bwa-textarea.mjs +38 -38
- package/es/data-form/form-components/bwa-upload.mjs +160 -173
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -35
- package/es/data-form/form-components/bwa-user-select.mjs +72 -86
- package/es/data-form/index.mjs +9 -0
- package/es/data-table/data-column-view.mjs +124 -146
- package/es/data-table/data-table-card.mjs +49 -48
- package/es/data-table/data-table-column.mjs +55 -58
- package/es/data-table/data-table.mjs +328 -404
- package/es/data-table/dynamic-component.mjs +9 -0
- package/es/data-table/index.mjs +9 -0
- package/es/data-table/use-datatable-drag.mjs +9 -0
- package/es/datatable-settings/datatable-settings.mjs +286 -328
- package/es/datatable-settings/index.mjs +9 -0
- package/es/date-range/date-picker.mjs +125 -131
- package/es/date-range/date-range.mjs +173 -216
- package/es/date-range/index.mjs +9 -0
- package/es/drag-list/constants.mjs +10 -0
- package/es/drag-list/drag-item.mjs +51 -56
- package/es/drag-list/drag-list.mjs +58 -60
- package/es/drag-list/index.mjs +9 -0
- package/es/drag-list/use-drag-list.mjs +10 -1
- package/es/dragable/constants.mjs +10 -0
- package/es/dragable/dragable-item.mjs +27 -23
- package/es/dragable/dragable-operation.mjs +33 -32
- package/es/dragable/dragable.mjs +33 -32
- package/es/dragable/index.mjs +9 -0
- package/es/dragable/use-dragable.mjs +9 -0
- package/es/filter-panel/conditions/condition.mjs +9 -0
- package/es/filter-panel/conditions/date-range-condition.mjs +51 -50
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +82 -99
- package/es/filter-panel/conditions/department-condition/department-node.mjs +69 -73
- package/es/filter-panel/conditions/index.mjs +9 -0
- package/es/filter-panel/conditions/input-condition.mjs +88 -91
- package/es/filter-panel/conditions/multi-user-condition.mjs +66 -67
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +44 -54
- package/es/filter-panel/conditions/single-menu-condition.mjs +71 -65
- package/es/filter-panel/conditions/single-user-condition.mjs +66 -67
- package/es/filter-panel/filter-panel-item.mjs +51 -55
- package/es/filter-panel/filter-panel.mjs +147 -156
- package/es/filter-panel/index.mjs +9 -0
- package/es/filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/filter-panel/use-filter-panel.mjs +9 -0
- package/es/hooks/use-data/index.mjs +9 -0
- package/es/index.mjs +9 -0
- package/es/layout/index.mjs +9 -0
- package/es/layout/layout.mjs +87 -85
- package/es/make-installer.mjs +9 -0
- package/es/math/Rectangle.mjs +10 -0
- package/es/menu/index.mjs +9 -0
- package/es/menu/menu-item.mjs +65 -70
- package/es/menu/menu.mjs +64 -70
- package/es/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.mjs +680 -454
- package/es/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.mjs +108 -46
- package/es/panel/index.mjs +9 -0
- package/es/panel/panel.mjs +49 -53
- package/es/panel-tabs/index.mjs +9 -0
- package/es/panel-tabs/panel-tabs.mjs +9 -0
- package/es/pct-filter-panel/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +73 -75
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +77 -77
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +345 -374
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +149 -154
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +52 -56
- package/es/pct-filter-panel/pct-filter-panel.mjs +235 -248
- package/es/pct-filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/pct-filter-panel/use-filter-panel.mjs +9 -0
- package/es/plugins.mjs +9 -0
- package/es/progress/index.mjs +9 -0
- package/es/progress/progress-item.mjs +71 -81
- package/es/progress/progress.mjs +74 -78
- package/es/progress/use-progress.mjs +9 -0
- package/es/utils/db.mjs +9 -0
- package/es/utils.css +1 -0
- package/es/utils.mjs +9 -0
- package/es/where-filter-panel/index.mjs +9 -1
- package/es/where-filter-panel/use-where-filter-panel.mjs +9 -0
- package/es/where-filter-panel/where-filter-panel.mjs +21 -15
- package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
- package/lib/advance-select/advance-operation.js +47 -50
- package/lib/advance-select/advance-option.js +127 -162
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +11 -6
- package/lib/advance-select/advance-select.js +322 -369
- package/lib/advance-select/events-helpers.js +9 -0
- package/lib/advance-select/index.js +9 -0
- package/lib/advance-select/use-advance-option.js +9 -0
- package/lib/advance-select/use-advance-select.js +9 -0
- package/lib/application-slot/application-slot.js +9 -0
- package/lib/application-slot/breadcrumb-item.js +25 -19
- package/lib/application-slot/header-tools-item.js +25 -19
- package/lib/application-slot/index.js +9 -0
- package/lib/breadcrumb-select/breadcrumb-select.js +122 -136
- package/lib/breadcrumb-select/index.js +9 -0
- package/lib/components.js +9 -0
- package/lib/contextmenu/contextmenu-item.js +23 -18
- package/lib/contextmenu/contextmenu.js +67 -72
- package/lib/contextmenu/index.js +9 -0
- package/lib/contextmenu/use-contextmenu.js +10 -1
- package/lib/data-form/data-form-item.js +40 -48
- package/lib/data-form/data-form.js +175 -212
- package/lib/data-form/dynamic-component.js +9 -0
- package/lib/data-form/form-components/Blots/AtBlot.js +9 -0
- package/lib/data-form/form-components/bwa-date-picker.js +49 -50
- package/lib/data-form/form-components/bwa-date-time-picker.js +54 -55
- package/lib/data-form/form-components/bwa-input-float.js +47 -47
- package/lib/data-form/form-components/bwa-input-integer.js +60 -67
- package/lib/data-form/form-components/bwa-input.js +42 -42
- package/lib/data-form/form-components/bwa-multi-select.js +39 -39
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +229 -554
- package/lib/data-form/form-components/bwa-rich-text.js +325 -403
- package/lib/data-form/form-components/bwa-select.js +80 -83
- package/lib/data-form/form-components/bwa-textarea.js +37 -37
- package/lib/data-form/form-components/bwa-upload.js +159 -172
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -34
- package/lib/data-form/form-components/bwa-user-select.js +71 -85
- package/lib/data-form/index.js +9 -0
- package/lib/data-table/data-column-view.js +124 -146
- package/lib/data-table/data-table-card.js +49 -48
- package/lib/data-table/data-table-column.js +54 -57
- package/lib/data-table/data-table.js +327 -403
- package/lib/data-table/dynamic-component.js +9 -0
- package/lib/data-table/index.js +9 -0
- package/lib/data-table/use-datatable-drag.js +9 -0
- package/lib/datatable-settings/datatable-settings.js +285 -327
- package/lib/datatable-settings/index.js +9 -0
- package/lib/date-range/date-picker.js +124 -130
- package/lib/date-range/date-range.js +172 -215
- package/lib/date-range/index.js +9 -0
- package/lib/drag-list/constants.js +10 -0
- package/lib/drag-list/drag-item.js +50 -55
- package/lib/drag-list/drag-list.js +57 -59
- package/lib/drag-list/index.js +9 -0
- package/lib/drag-list/use-drag-list.js +10 -1
- package/lib/dragable/constants.js +10 -0
- package/lib/dragable/dragable-item.js +26 -22
- package/lib/dragable/dragable-operation.js +32 -31
- package/lib/dragable/dragable.js +32 -31
- package/lib/dragable/index.js +9 -0
- package/lib/dragable/use-dragable.js +9 -0
- package/lib/filter-panel/conditions/condition.js +9 -0
- package/lib/filter-panel/conditions/date-range-condition.js +50 -49
- package/lib/filter-panel/conditions/department-condition/department-condition.js +81 -98
- package/lib/filter-panel/conditions/department-condition/department-node.js +68 -72
- package/lib/filter-panel/conditions/index.js +9 -0
- package/lib/filter-panel/conditions/input-condition.js +87 -90
- package/lib/filter-panel/conditions/multi-user-condition.js +65 -66
- package/lib/filter-panel/conditions/multiple-menu-condition.js +43 -53
- package/lib/filter-panel/conditions/single-menu-condition.js +70 -64
- package/lib/filter-panel/conditions/single-user-condition.js +65 -66
- package/lib/filter-panel/filter-panel-item.js +50 -54
- package/lib/filter-panel/filter-panel.js +146 -155
- package/lib/filter-panel/index.js +9 -0
- package/lib/filter-panel/use-filter-panel-item.js +9 -0
- package/lib/filter-panel/use-filter-panel.js +9 -0
- package/lib/hooks/use-data/index.js +9 -0
- package/lib/index.js +9 -0
- package/lib/layout/index.js +9 -0
- package/lib/layout/layout.js +86 -84
- package/lib/make-installer.js +9 -0
- package/lib/math/Rectangle.js +10 -0
- package/lib/menu/index.js +9 -0
- package/lib/menu/menu-item.js +64 -69
- package/lib/menu/menu.js +63 -69
- package/lib/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.js +685 -451
- package/lib/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.js +109 -44
- package/lib/panel/index.js +9 -0
- package/lib/panel/panel.js +48 -52
- package/lib/panel-tabs/index.js +9 -0
- package/lib/panel-tabs/panel-tabs.js +9 -0
- package/lib/pct-filter-panel/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +72 -74
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +76 -76
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +344 -373
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +148 -153
- package/lib/pct-filter-panel/pct-filter-panel-item.js +51 -55
- package/lib/pct-filter-panel/pct-filter-panel.js +234 -247
- package/lib/pct-filter-panel/use-filter-panel-item.js +9 -0
- package/lib/pct-filter-panel/use-filter-panel.js +9 -0
- package/lib/plugins.js +9 -0
- package/lib/progress/index.js +9 -0
- package/lib/progress/progress-item.js +70 -80
- package/lib/progress/progress.js +73 -77
- package/lib/progress/use-progress.js +9 -0
- package/lib/utils/db.js +9 -0
- package/lib/utils.css +1 -0
- package/lib/utils.js +9 -0
- package/lib/where-filter-panel/index.js +9 -0
- package/lib/where-filter-panel/use-where-filter-panel.js +9 -0
- package/lib/where-filter-panel/where-filter-panel.js +20 -14
- package/package.json +1 -1
- package/style/index.css +1 -1
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -32
|
@@ -1,94 +1,80 @@
|
|
|
1
|
-
import { useAttrs, ref, computed, unref, openBlock, createBlock, mergeProps
|
|
1
|
+
import { defineComponent, useAttrs, ref, computed, unref, openBlock, createBlock, mergeProps } from 'vue';
|
|
2
2
|
import { useService } from '@ctzy-web-client/web-base-client-vue';
|
|
3
3
|
import Select from './bwa-select.mjs';
|
|
4
4
|
import { ElMessage } from 'element-plus';
|
|
5
5
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const props = __props;
|
|
16
|
-
|
|
17
|
-
defineOptions({
|
|
18
|
-
name: 'BwaUserSelect',
|
|
19
|
-
inheritAttrs: false,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const attrs = useAttrs();
|
|
27
|
-
|
|
28
|
-
const userService = useService('UserService');
|
|
29
|
-
|
|
30
|
-
const loading = ref(false);
|
|
31
|
-
|
|
32
|
-
const modelValue = computed({
|
|
33
|
-
get: () => props.modelValue,
|
|
34
|
-
set: (v) => {
|
|
35
|
-
emit('update:modelValue', v);
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const options = ref([]);
|
|
40
|
-
|
|
41
|
-
const loadOptions = async (query, userIds = []) => {
|
|
42
|
-
const _userService = unref(userService);
|
|
43
|
-
|
|
44
|
-
if (!_userService) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
loading.value = true;
|
|
50
|
-
const userListResult = await _userService.getUserList({
|
|
51
|
-
name: query,
|
|
52
|
-
userIds,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
if (userListResult.code != 0) {
|
|
56
|
-
ElMessage.error(userListResult.msg);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
options.value = userListResult.data;
|
|
61
|
-
} finally {
|
|
62
|
-
loading.value = false;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const handleRemote = loadOptions;
|
|
67
|
-
|
|
68
|
-
loadOptions(
|
|
69
|
-
'',
|
|
70
|
-
Array.isArray(unref(modelValue))
|
|
71
|
-
? unref(modelValue)
|
|
72
|
-
: unref(modelValue)
|
|
73
|
-
? [unref(modelValue)]
|
|
74
|
-
: []
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
return (_ctx, _cache) => {
|
|
78
|
-
return (openBlock(), createBlock(Select, mergeProps(unref(attrs), {
|
|
79
|
-
modelValue: unref(modelValue),
|
|
80
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null)),
|
|
81
|
-
loading: loading.value,
|
|
82
|
-
remote: "",
|
|
83
|
-
filterable: "",
|
|
84
|
-
clearable: "",
|
|
85
|
-
"remote-method": unref(handleRemote),
|
|
86
|
-
options: options.value
|
|
87
|
-
}), null, 16 /* FULL_PROPS */, ["modelValue", "loading", "remote-method", "options"]))
|
|
7
|
+
// Inject __name helper
|
|
8
|
+
if (typeof __name === 'undefined') {
|
|
9
|
+
function __name(obj, name) {
|
|
10
|
+
Object.defineProperty(obj, "name", {
|
|
11
|
+
value: name,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
}
|
|
88
15
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
16
|
+
const __default__ = defineComponent({
|
|
17
|
+
name: "BwaUserSelect",
|
|
18
|
+
inheritAttrs: false
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: null
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
;
|
|
27
|
+
const props = __props;
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const attrs = useAttrs();
|
|
30
|
+
const userService = useService("UserService");
|
|
31
|
+
const loading = ref(false);
|
|
32
|
+
const modelValue = computed({
|
|
33
|
+
get: () => props.modelValue,
|
|
34
|
+
set: (v) => {
|
|
35
|
+
emit("update:modelValue", v);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const options = ref([]);
|
|
39
|
+
const loadOptions = async (query, userIds = []) => {
|
|
40
|
+
const _userService = unref(userService);
|
|
41
|
+
if (!_userService) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
loading.value = true;
|
|
46
|
+
const userListResult = await _userService.getUserList({
|
|
47
|
+
name: query,
|
|
48
|
+
userIds
|
|
49
|
+
});
|
|
50
|
+
if (userListResult.code != 0) {
|
|
51
|
+
ElMessage.error(userListResult.msg);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
options.value = userListResult.data;
|
|
55
|
+
} finally {
|
|
56
|
+
loading.value = false;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const handleRemote = loadOptions;
|
|
60
|
+
loadOptions(
|
|
61
|
+
"",
|
|
62
|
+
Array.isArray(unref(modelValue)) ? unref(modelValue) : unref(modelValue) ? [unref(modelValue)] : []
|
|
63
|
+
);
|
|
64
|
+
return (_ctx, _cache) => {
|
|
65
|
+
return openBlock(), createBlock(Select, mergeProps(unref(attrs), {
|
|
66
|
+
modelValue: modelValue.value,
|
|
67
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
68
|
+
loading: loading.value,
|
|
69
|
+
remote: "",
|
|
70
|
+
filterable: "",
|
|
71
|
+
clearable: "",
|
|
72
|
+
"remote-method": unref(handleRemote),
|
|
73
|
+
options: options.value
|
|
74
|
+
}), null, 16, ["modelValue", "loading", "remote-method", "options"]);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-user-select.vue"]]);
|
|
93
79
|
|
|
94
80
|
export { UserSelect as default };
|
package/es/data-form/index.mjs
CHANGED
|
@@ -14,6 +14,15 @@ import UserMultiSelect from './form-components/bwa-user-multi-select.mjs';
|
|
|
14
14
|
import Upload from './form-components/bwa-upload.mjs';
|
|
15
15
|
import RichText from './form-components/bwa-rich-text.mjs';
|
|
16
16
|
|
|
17
|
+
// Inject __name helper
|
|
18
|
+
if (typeof __name === 'undefined') {
|
|
19
|
+
function __name(obj, name) {
|
|
20
|
+
Object.defineProperty(obj, "name", {
|
|
21
|
+
value: name,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
17
26
|
const BwaDataForm = withInstall(DataForm, {
|
|
18
27
|
DataFormItem,
|
|
19
28
|
DatePicker,
|
|
@@ -4,159 +4,137 @@ import { PictureFilled } from '@element-plus/icons';
|
|
|
4
4
|
import { ElMessage } from 'element-plus';
|
|
5
5
|
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type: String,
|
|
22
|
-
default:
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
type: String,
|
|
26
|
-
default:
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
type:
|
|
30
|
-
default:
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
type:
|
|
34
|
-
default:
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
type: String,
|
|
38
|
-
default:
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (type ===
|
|
60
|
-
isAppendChar = value.length > props.rule.replace(
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
value =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} else if (type ===
|
|
70
|
-
value = value
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
let input = document.createElement('input');
|
|
90
|
-
input.value = text;
|
|
91
|
-
document.body.appendChild(input);
|
|
92
|
-
input.select();
|
|
93
|
-
input.setSelectionRange(0, input.value.length),
|
|
94
|
-
document.execCommand('Copy');
|
|
95
|
-
document.body.removeChild(input);
|
|
96
|
-
ElMessage.info('复制成功!');
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
return { ns, viewType, viewValue, copyHandle };
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
|
|
7
|
+
// Inject __name helper
|
|
8
|
+
if (typeof __name === 'undefined') {
|
|
9
|
+
function __name(obj, name) {
|
|
10
|
+
Object.defineProperty(obj, "name", {
|
|
11
|
+
value: name,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const _sfc_main = {
|
|
17
|
+
name: "BwaDataColumnView",
|
|
18
|
+
props: {
|
|
19
|
+
value: [String, Boolean, Number, Object, Array],
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "string"
|
|
23
|
+
},
|
|
24
|
+
template: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
rule: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
align: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
nowrap: {
|
|
37
|
+
type: [Boolean, String],
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
copy: {
|
|
41
|
+
type: [Boolean, String],
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
defaultValue: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "-"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:modelValue"],
|
|
50
|
+
components: { PictureFilled },
|
|
51
|
+
setup(props) {
|
|
52
|
+
const ns = useNamespace("column-view");
|
|
53
|
+
const viewType = computed(() => props.type.toLocaleLowerCase());
|
|
54
|
+
const viewValue = computed(() => {
|
|
55
|
+
let value = props.value === 0 ? "0" : props.value ? props.value + "" : "";
|
|
56
|
+
let type = viewType.value;
|
|
57
|
+
if (["number", "string"].includes(type)) {
|
|
58
|
+
let isAppendChar = false;
|
|
59
|
+
if (type === "string" && props.rule && value) {
|
|
60
|
+
isAppendChar = value.length > props.rule.replace("s:", "") * 1;
|
|
61
|
+
}
|
|
62
|
+
value = props.rule ? str.formatByRule(value, props.rule) : value;
|
|
63
|
+
value = value || props.defaultValue;
|
|
64
|
+
if (isAppendChar) {
|
|
65
|
+
value += "...";
|
|
66
|
+
}
|
|
67
|
+
} else if (type === "date") {
|
|
68
|
+
value = value ? func.formatDate(new Date(value), props.rule || "yyyy-MM-dd") : props.defaultValue;
|
|
69
|
+
} else if (type === "html") {
|
|
70
|
+
value = value ? value.replace(/[\r\n|\r|\n]/g, "<br/>") : props.defaultValue;
|
|
71
|
+
}
|
|
72
|
+
if (props.template) {
|
|
73
|
+
value = props.template.replace("${value}", value);
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
});
|
|
77
|
+
const copyHandle = (text) => {
|
|
78
|
+
let input = document.createElement("input");
|
|
79
|
+
input.value = text;
|
|
80
|
+
document.body.appendChild(input);
|
|
81
|
+
input.select();
|
|
82
|
+
input.setSelectionRange(0, input.value.length), document.execCommand("Copy");
|
|
83
|
+
document.body.removeChild(input);
|
|
84
|
+
ElMessage.info("\u590D\u5236\u6210\u529F!");
|
|
85
|
+
};
|
|
86
|
+
return { ns, viewType, viewValue, copyHandle };
|
|
87
|
+
}
|
|
88
|
+
};
|
|
103
89
|
const _hoisted_1 = ["innerHTML"];
|
|
104
|
-
|
|
105
90
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
106
91
|
const _component_PictureFilled = resolveComponent("PictureFilled");
|
|
107
92
|
const _component_el_icon = resolveComponent("el-icon");
|
|
108
93
|
const _component_el_image = resolveComponent("el-image");
|
|
109
|
-
|
|
110
|
-
return (openBlock(), createElementBlock("span", {
|
|
94
|
+
return openBlock(), createElementBlock("span", {
|
|
111
95
|
class: normalizeClass([$setup.ns.b(), { nowrap: $props.nowrap }, $props.align])
|
|
112
96
|
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
(
|
|
152
|
-
|
|
153
|
-
key: 3,
|
|
154
|
-
class: "copy-btn",
|
|
155
|
-
onClick: _cache[0] || (_cache[0] = $event => ($setup.copyHandle($setup.viewValue)))
|
|
156
|
-
}, "复制"))
|
|
157
|
-
: createCommentVNode("v-if", true)
|
|
158
|
-
], 2 /* CLASS */))
|
|
97
|
+
$setup.viewType == "html" ? (openBlock(), createElementBlock("span", {
|
|
98
|
+
key: 0,
|
|
99
|
+
innerHTML: $setup.viewValue
|
|
100
|
+
}, null, 8, _hoisted_1)) : $setup.viewType == "image" ? (openBlock(), createBlock(_component_el_image, {
|
|
101
|
+
key: 1,
|
|
102
|
+
class: "image",
|
|
103
|
+
style: { width: "100%", minHeight: "50px" },
|
|
104
|
+
"z-index": 999,
|
|
105
|
+
"preview-teleported": true,
|
|
106
|
+
"preview-src-list": [$setup.viewValue],
|
|
107
|
+
fit: "cover",
|
|
108
|
+
src: $setup.viewValue,
|
|
109
|
+
"hide-on-click-modal": true
|
|
110
|
+
}, {
|
|
111
|
+
placeholder: withCtx(() => [
|
|
112
|
+
createVNode(_component_el_icon, { size: 50 }, {
|
|
113
|
+
default: withCtx(() => [
|
|
114
|
+
createVNode(_component_PictureFilled)
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
})
|
|
118
|
+
]),
|
|
119
|
+
error: withCtx(() => [
|
|
120
|
+
createVNode(_component_el_icon, { size: 50 }, {
|
|
121
|
+
default: withCtx(() => [
|
|
122
|
+
createVNode(_component_PictureFilled)
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
})
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["preview-src-list", "src"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
129
|
+
createTextVNode(toDisplayString($setup.viewValue), 1)
|
|
130
|
+
], 64)),
|
|
131
|
+
$props.copy ? (openBlock(), createElementBlock("div", {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: "copy-btn",
|
|
134
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyHandle($setup.viewValue))
|
|
135
|
+
}, "\u590D\u5236")) : createCommentVNode("v-if", true)
|
|
136
|
+
], 2);
|
|
159
137
|
}
|
|
160
|
-
var DataColumnView =
|
|
138
|
+
var DataColumnView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "data-column-view.vue"]]);
|
|
161
139
|
|
|
162
140
|
export { DataColumnView as default };
|
|
@@ -3,23 +3,27 @@ import { dataTableKey, useNamespace } from '@ctzy-web-client/web-base-client-vue
|
|
|
3
3
|
import DynamicComponent from './dynamic-component.mjs';
|
|
4
4
|
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
6
|
+
// Inject __name helper
|
|
7
|
+
if (typeof __name === 'undefined') {
|
|
8
|
+
function __name(obj, name) {
|
|
9
|
+
Object.defineProperty(obj, "name", {
|
|
10
|
+
value: name,
|
|
11
|
+
configurable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const _sfc_main = {
|
|
16
|
+
name: "BwaDataTableCard",
|
|
17
|
+
components: { DynamicComponent },
|
|
18
|
+
setup() {
|
|
19
|
+
const dataTable = inject(dataTableKey);
|
|
20
|
+
const ns = useNamespace("datatable");
|
|
21
|
+
return { dataTable, ns };
|
|
22
|
+
}
|
|
23
|
+
};
|
|
19
24
|
const _hoisted_1 = { class: "left" };
|
|
20
25
|
const _hoisted_2 = { class: "pagination-info" };
|
|
21
26
|
const _hoisted_3 = { class: "right" };
|
|
22
|
-
|
|
23
27
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
24
28
|
const _component_el_table_column = resolveComponent("el-table-column");
|
|
25
29
|
const _component_DynamicComponent = resolveComponent("DynamicComponent");
|
|
@@ -27,9 +31,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27
31
|
const _component_el_pagination = resolveComponent("el-pagination");
|
|
28
32
|
const _component_el_card = resolveComponent("el-card");
|
|
29
33
|
const _directive_loading = resolveDirective("loading");
|
|
30
|
-
|
|
31
34
|
return withDirectives((openBlock(), createBlock(_component_el_card, {
|
|
32
|
-
class: normalizeClass($setup.ns.b(
|
|
35
|
+
class: normalizeClass($setup.ns.b("card"))
|
|
33
36
|
}, createSlots({
|
|
34
37
|
default: withCtx(() => [
|
|
35
38
|
createVNode(_component_el_table, {
|
|
@@ -49,11 +52,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
49
52
|
type: "index",
|
|
50
53
|
width: "60",
|
|
51
54
|
align: "center",
|
|
52
|
-
label: "
|
|
55
|
+
label: "\u7F16\u53F7"
|
|
53
56
|
}),
|
|
54
57
|
renderSlot(_ctx.$slots, "table-columns", { dataTable: $setup.dataTable }, () => [
|
|
55
58
|
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.dataTable.getDisplayColumns(), (item) => {
|
|
56
|
-
return
|
|
59
|
+
return openBlock(), createBlock(_component_el_table_column, {
|
|
57
60
|
"column-key": item.attrName,
|
|
58
61
|
key: item.attrName,
|
|
59
62
|
label: item.title,
|
|
@@ -62,8 +65,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62
65
|
align: item.align
|
|
63
66
|
}, {
|
|
64
67
|
default: withCtx(({ row, $index }) => [
|
|
65
|
-
renderSlot(_ctx.$slots,
|
|
66
|
-
row
|
|
68
|
+
renderSlot(_ctx.$slots, "table-col-" + item.attrName, {
|
|
69
|
+
row,
|
|
67
70
|
index: $index,
|
|
68
71
|
column: item,
|
|
69
72
|
dataTable: $setup.dataTable
|
|
@@ -71,56 +74,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
71
74
|
createVNode(_component_DynamicComponent, {
|
|
72
75
|
column: item,
|
|
73
76
|
record: row
|
|
74
|
-
}, null, 8
|
|
77
|
+
}, null, 8, ["column", "record"])
|
|
75
78
|
])
|
|
76
79
|
]),
|
|
77
|
-
_: 2
|
|
78
|
-
}, 1032
|
|
79
|
-
}), 128
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1032, ["column-key", "label", "prop", "min-width", "align"]);
|
|
82
|
+
}), 128))
|
|
80
83
|
])
|
|
81
84
|
]),
|
|
82
|
-
_: 3
|
|
83
|
-
}, 8
|
|
85
|
+
_: 3
|
|
86
|
+
}, 8, ["data", "row-key"]),
|
|
84
87
|
createElementVNode("div", {
|
|
85
|
-
class: normalizeClass($setup.ns.be(
|
|
88
|
+
class: normalizeClass($setup.ns.be("card", "footer"))
|
|
86
89
|
}, [
|
|
87
90
|
createElementVNode("div", _hoisted_1, [
|
|
88
91
|
createElementVNode("div", _hoisted_2, [
|
|
89
|
-
createTextVNode("
|
|
90
|
-
createElementVNode("b", null, toDisplayString($setup.dataTable.totalRecCount), 1
|
|
91
|
-
createTextVNode("
|
|
92
|
-
createElementVNode("b", null, toDisplayString($setup.dataTable.pageNum), 1
|
|
93
|
-
createTextVNode("
|
|
92
|
+
_cache[1] || (_cache[1] = createTextVNode(" \u5171", -1)),
|
|
93
|
+
createElementVNode("b", null, toDisplayString($setup.dataTable.totalRecCount), 1),
|
|
94
|
+
_cache[2] || (_cache[2] = createTextVNode("\u6761\u8BB0\u5F55 | \u5F53\u524D\u7B2C", -1)),
|
|
95
|
+
createElementVNode("b", null, toDisplayString($setup.dataTable.pageNum), 1),
|
|
96
|
+
_cache[3] || (_cache[3] = createTextVNode("\u9875 ", -1))
|
|
94
97
|
])
|
|
95
98
|
]),
|
|
96
99
|
createElementVNode("div", _hoisted_3, [
|
|
97
100
|
createVNode(_component_el_pagination, {
|
|
98
101
|
"hide-on-single-page": true,
|
|
99
102
|
currentPage: $setup.dataTable.pageNum,
|
|
100
|
-
onCurrentChange: _cache[0] || (_cache[0] = $event =>
|
|
103
|
+
onCurrentChange: _cache[0] || (_cache[0] = ($event) => $setup.dataTable.pageTo($event)),
|
|
101
104
|
"page-size": $setup.dataTable.pageSize,
|
|
102
105
|
background: "",
|
|
103
106
|
layout: "prev, pager, next, jumper",
|
|
104
107
|
total: $setup.dataTable.totalRecCount
|
|
105
|
-
}, null, 8
|
|
108
|
+
}, null, 8, ["currentPage", "page-size", "total"])
|
|
106
109
|
])
|
|
107
|
-
], 2
|
|
110
|
+
], 2)
|
|
108
111
|
]),
|
|
109
|
-
_: 2
|
|
112
|
+
_: 2
|
|
110
113
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
: undefined
|
|
120
|
-
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"])), [
|
|
114
|
+
_ctx.$slots.header ? {
|
|
115
|
+
name: "header",
|
|
116
|
+
fn: withCtx(() => [
|
|
117
|
+
renderSlot(_ctx.$slots, "header", { dataTable: $setup.dataTable })
|
|
118
|
+
]),
|
|
119
|
+
key: "0"
|
|
120
|
+
} : void 0
|
|
121
|
+
]), 1032, ["class"])), [
|
|
121
122
|
[_directive_loading, !$setup.dataTable.ready]
|
|
122
|
-
])
|
|
123
|
+
]);
|
|
123
124
|
}
|
|
124
|
-
var dataTableCard =
|
|
125
|
+
var dataTableCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "data-table-card.vue"]]);
|
|
125
126
|
|
|
126
127
|
export { dataTableCard as default };
|