@ctzy-web-client/plugin-component-vue 1.0.22 → 1.0.24
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/advance-select/advance-operation.mjs +51 -37
- package/es/advance-select/advance-option.mjs +167 -97
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
- package/es/advance-select/advance-select.mjs +368 -310
- package/es/advance-select/index.mjs +5 -5
- package/es/application-slot/breadcrumb-item.mjs +20 -17
- package/es/application-slot/header-tools-item.mjs +20 -17
- package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
- package/es/contextmenu/contextmenu-item.mjs +19 -15
- package/es/contextmenu/contextmenu.mjs +72 -56
- package/es/data-form/data-form-item.mjs +48 -30
- package/es/data-form/data-form.mjs +213 -166
- package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
- package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
- package/es/data-form/form-components/bwa-input-float.mjs +48 -37
- package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
- package/es/data-form/form-components/bwa-input.mjs +43 -32
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
- package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
- package/es/data-form/form-components/bwa-select.mjs +84 -70
- package/es/data-form/form-components/bwa-textarea.mjs +38 -27
- package/es/data-form/form-components/bwa-upload.mjs +172 -148
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
- package/es/data-form/form-components/bwa-user-select.mjs +86 -61
- package/es/data-table/data-column-view.mjs +146 -115
- package/es/data-table/data-table-card.mjs +48 -40
- package/es/data-table/data-table-column.mjs +58 -45
- package/es/data-table/data-table.mjs +402 -316
- package/es/datatable-settings/datatable-settings.mjs +329 -254
- package/es/date-range/date-picker.mjs +130 -116
- package/es/date-range/date-range.mjs +215 -168
- package/es/drag-list/drag-item.mjs +56 -42
- package/es/drag-list/drag-list.mjs +60 -47
- package/es/dragable/dragable-item.mjs +23 -18
- package/es/dragable/dragable-operation.mjs +32 -24
- package/es/dragable/dragable.mjs +32 -23
- package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
- package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
- package/es/filter-panel/conditions/input-condition.mjs +90 -76
- package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
- package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
- package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
- package/es/filter-panel/filter-panel-item.mjs +54 -39
- package/es/filter-panel/filter-panel.mjs +153 -135
- package/es/layout/layout.mjs +85 -78
- package/es/menu/menu-item.mjs +67 -52
- package/es/menu/menu.mjs +70 -53
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
- package/es/panel/panel.mjs +53 -40
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
- package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
- package/es/progress/progress-item.mjs +81 -61
- package/es/progress/progress.mjs +78 -64
- package/es/where-filter-panel/where-filter-panel.mjs +15 -12
- package/lib/advance-select/advance-operation.js +50 -36
- package/lib/advance-select/advance-option.js +166 -96
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
- package/lib/advance-select/advance-select.js +366 -308
- package/lib/application-slot/breadcrumb-item.js +19 -16
- package/lib/application-slot/header-tools-item.js +19 -16
- package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
- package/lib/contextmenu/contextmenu-item.js +18 -14
- package/lib/contextmenu/contextmenu.js +71 -55
- package/lib/data-form/data-form-item.js +47 -29
- package/lib/data-form/data-form.js +212 -165
- package/lib/data-form/form-components/bwa-date-picker.js +50 -38
- package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
- package/lib/data-form/form-components/bwa-input-float.js +47 -36
- package/lib/data-form/form-components/bwa-input-integer.js +67 -49
- package/lib/data-form/form-components/bwa-input.js +42 -31
- package/lib/data-form/form-components/bwa-multi-select.js +39 -28
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
- package/lib/data-form/form-components/bwa-rich-text.js +403 -315
- package/lib/data-form/form-components/bwa-select.js +83 -69
- package/lib/data-form/form-components/bwa-textarea.js +37 -26
- package/lib/data-form/form-components/bwa-upload.js +171 -147
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
- package/lib/data-form/form-components/bwa-user-select.js +85 -60
- package/lib/data-table/data-column-view.js +146 -115
- package/lib/data-table/data-table-card.js +48 -40
- package/lib/data-table/data-table-column.js +57 -44
- package/lib/data-table/data-table.js +401 -315
- package/lib/datatable-settings/datatable-settings.js +328 -253
- package/lib/date-range/date-picker.js +129 -115
- package/lib/date-range/date-range.js +213 -170
- package/lib/drag-list/drag-item.js +55 -41
- package/lib/drag-list/drag-list.js +59 -46
- package/lib/dragable/dragable-item.js +22 -17
- package/lib/dragable/dragable-operation.js +31 -23
- package/lib/dragable/dragable.js +31 -22
- package/lib/filter-panel/conditions/date-range-condition.js +49 -39
- package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
- package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
- package/lib/filter-panel/conditions/input-condition.js +89 -75
- package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
- package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
- package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
- package/lib/filter-panel/conditions/single-user-condition.js +66 -56
- package/lib/filter-panel/filter-panel-item.js +53 -38
- package/lib/filter-panel/filter-panel.js +152 -134
- package/lib/layout/layout.js +84 -77
- package/lib/menu/menu-item.js +66 -51
- package/lib/menu/menu.js +69 -52
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/lib/panel/panel.js +52 -39
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
- package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
- package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
- package/lib/progress/progress-item.js +80 -60
- package/lib/progress/progress.js +77 -63
- package/lib/where-filter-panel/where-filter-panel.js +14 -11
- package/package.json +2 -1
- package/src/advance-select/advance-option.vue +64 -13
- package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
- package/src/datatable-settings/datatable-settings.vue +33 -3
- package/src/date-range/date-picker.vue +1 -1
- package/src/date-range/date-range.vue +3 -3
- package/src/filter-panel/filter-panel.vue +2 -2
- package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
- package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
- package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
|
@@ -1,81 +1,108 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ref, unref, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
2
|
import SingleMenuCondition from '../single-menu-condition.mjs';
|
|
3
3
|
import DepartmentNode from './department-node.mjs';
|
|
4
4
|
import { useService } from '@ctzy-web-client/web-base-client-vue';
|
|
5
5
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
7
|
+
const _sfc_main = {
|
|
8
|
+
__name: 'department-condition',
|
|
11
9
|
props: {},
|
|
12
10
|
setup(__props) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
11
|
+
|
|
12
|
+
const props = __props;
|
|
13
|
+
|
|
14
|
+
defineOptions({
|
|
15
|
+
name: 'BwaDepartmentCondition',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const departmentService = useService('DepartmentService');
|
|
21
|
+
|
|
22
|
+
const data = ref([]);
|
|
23
|
+
|
|
24
|
+
const loading = ref(false);
|
|
25
|
+
|
|
26
|
+
const map = new Map();
|
|
27
|
+
|
|
28
|
+
const formatValue = (selected) => {
|
|
29
|
+
selected = Array.isArray(selected) ? selected : selected ? [selected] : [];
|
|
30
|
+
|
|
31
|
+
selected = selected.map((item) => map.get(item.value + '')).filter(Boolean);
|
|
32
|
+
|
|
33
|
+
if (!selected.length) {
|
|
34
|
+
return '全部';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return selected.map((item) => item.desc).join(',');
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleVisibleChange = async (isShow) => {
|
|
41
|
+
if (!isShow || !unref(departmentService)) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
loading.value = true;
|
|
47
|
+
|
|
48
|
+
const departmentsResult = await unref(departmentService).getDepartments();
|
|
49
|
+
|
|
50
|
+
if (departmentsResult.code != 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const departments = [];
|
|
55
|
+
for (let department of departmentsResult.data || []) {
|
|
56
|
+
department.children = [];
|
|
57
|
+
|
|
58
|
+
if (!department.pid) {
|
|
59
|
+
departments.push(department);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
map.set(department.id + '', department);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (const department of departmentsResult.data || []) {
|
|
66
|
+
if (!department.pid) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const parent = map.get(department.pid + '');
|
|
71
|
+
|
|
72
|
+
if (!parent) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
parent.children.push(department);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
data.value = departments;
|
|
80
|
+
} finally {
|
|
81
|
+
loading.value = false;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return (openBlock(), createBlock(SingleMenuCondition, {
|
|
87
|
+
multiple: true,
|
|
88
|
+
showSearch: false,
|
|
89
|
+
loading: loading.value,
|
|
90
|
+
onVisibleChange: handleVisibleChange
|
|
91
|
+
}, {
|
|
92
|
+
value: withCtx(({ selected }) => [
|
|
93
|
+
createTextVNode(toDisplayString(formatValue(selected)), 1 /* TEXT */)
|
|
94
|
+
]),
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(data.value, (item) => {
|
|
97
|
+
return (openBlock(), createBlock(DepartmentNode, { item: item }, null, 8 /* PROPS */, ["item"]))
|
|
98
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
99
|
+
]),
|
|
100
|
+
_: 1 /* STABLE */
|
|
101
|
+
}, 8 /* PROPS */, ["loading"]))
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
};
|
|
106
|
+
var DepartmentCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"department-condition.vue"]]);
|
|
80
107
|
|
|
81
108
|
export { DepartmentCondition as default };
|
|
@@ -1,74 +1,88 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ref, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, normalizeStyle, Fragment, renderList } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
|
|
3
3
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
},
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: 'department-node',
|
|
7
|
+
props: {
|
|
8
|
+
item: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
level: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 0,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
19
17
|
setup(__props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
|
|
19
|
+
const props = __props;
|
|
20
|
+
|
|
21
|
+
defineOptions({
|
|
22
|
+
name: 'BwaDepartmentNode',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const ns = useNamespace('department-node');
|
|
28
|
+
|
|
29
|
+
const isShowChildren = ref(false);
|
|
30
|
+
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
const _component_CaretBottom = resolveComponent("CaretBottom");
|
|
33
|
+
const _component_ElIcon = resolveComponent("ElIcon");
|
|
34
|
+
const _component_BwaAdvanceOption = resolveComponent("BwaAdvanceOption");
|
|
35
|
+
const _component_BwaDepartmentNode = resolveComponent("BwaDepartmentNode");
|
|
36
|
+
const _component_ElCollapseTransition = resolveComponent("ElCollapseTransition");
|
|
37
|
+
|
|
38
|
+
return (openBlock(), createElementBlock("div", {
|
|
39
|
+
class: normalizeClass(unref(ns).b())
|
|
40
|
+
}, [
|
|
41
|
+
createElementVNode("div", {
|
|
42
|
+
class: normalizeClass(unref(ns).e('content'))
|
|
43
|
+
}, [
|
|
44
|
+
createElementVNode("div", {
|
|
45
|
+
class: normalizeClass(unref(ns).e('arrow-wrapper')),
|
|
46
|
+
onClick: _cache[0] || (_cache[0] = $event => (isShowChildren.value = !isShowChildren.value))
|
|
31
47
|
}, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
createElementVNode("div", {
|
|
36
|
-
class: normalizeClass(unref(ns).e("arrow-wrapper")),
|
|
37
|
-
onClick: _cache[0] || (_cache[0] = ($event) => isShowChildren.value = !isShowChildren.value)
|
|
38
|
-
}, [
|
|
39
|
-
__props.item.children.length ? (openBlock(), createBlock(_component_ElIcon, {
|
|
48
|
+
(__props.item.children.length)
|
|
49
|
+
? (openBlock(), createBlock(_component_ElIcon, {
|
|
40
50
|
key: 0,
|
|
41
|
-
class: normalizeClass([unref(ns).e(
|
|
51
|
+
class: normalizeClass([unref(ns).e('arrow'), unref(ns).is('collpase', !isShowChildren.value)])
|
|
42
52
|
}, {
|
|
43
53
|
default: withCtx(() => [
|
|
44
54
|
createVNode(_component_CaretBottom)
|
|
45
55
|
]),
|
|
46
|
-
_: 1
|
|
47
|
-
}, 8
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
_: 1 /* STABLE */
|
|
57
|
+
}, 8 /* PROPS */, ["class"]))
|
|
58
|
+
: createCommentVNode("v-if", true)
|
|
59
|
+
], 2 /* CLASS */),
|
|
60
|
+
createVNode(_component_BwaAdvanceOption, {
|
|
61
|
+
value: __props.item.id,
|
|
62
|
+
label: __props.item.name
|
|
63
|
+
}, null, 8 /* PROPS */, ["value", "label"])
|
|
64
|
+
], 2 /* CLASS */),
|
|
65
|
+
createVNode(_component_ElCollapseTransition, null, {
|
|
66
|
+
default: withCtx(() => [
|
|
67
|
+
(isShowChildren.value)
|
|
68
|
+
? (openBlock(), createElementBlock("div", {
|
|
57
69
|
key: 0,
|
|
58
|
-
class: normalizeClass(unref(ns).e(
|
|
59
|
-
style: normalizeStyle({ paddingLeft: 22 + __props.level * 5 +
|
|
70
|
+
class: normalizeClass(unref(ns).e('children')),
|
|
71
|
+
style: normalizeStyle({ paddingLeft: 22 + __props.level * 5 + 'px' })
|
|
60
72
|
}, [
|
|
61
73
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.item.children, (child) => {
|
|
62
|
-
return openBlock(), createBlock(_component_BwaDepartmentNode, { item: child }, null, 8
|
|
63
|
-
}), 256))
|
|
64
|
-
], 6
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
74
|
+
return (openBlock(), createBlock(_component_BwaDepartmentNode, { item: child }, null, 8 /* PROPS */, ["item"]))
|
|
75
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
76
|
+
], 6 /* CLASS, STYLE */))
|
|
77
|
+
: createCommentVNode("v-if", true)
|
|
78
|
+
]),
|
|
79
|
+
_: 1 /* STABLE */
|
|
80
|
+
})
|
|
81
|
+
], 2 /* CLASS */))
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
};
|
|
86
|
+
var DepartmentNode = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"department-node.vue"]]);
|
|
73
87
|
|
|
74
88
|
export { DepartmentNode as default };
|
|
@@ -1,83 +1,97 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, inject, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, unref, createVNode, isRef, renderSlot, createElementBlock, toDisplayString, createCommentVNode } from 'vue';
|
|
2
2
|
import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: String
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue"],
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: 'input-condition',
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: String,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
emits: ['update:modelValue'],
|
|
17
13
|
setup(__props, { emit }) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
14
|
+
|
|
15
|
+
const props = __props;
|
|
16
|
+
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'BwaInputCondition',
|
|
19
|
+
__conditionTitle__: '输入框',
|
|
20
|
+
__conditionDefault__: '',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const ns = useNamespace('input-condition');
|
|
28
|
+
|
|
29
|
+
if (typeof props.modelValue !== 'string') {
|
|
30
|
+
emit('update:modelValue', '');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = computed({
|
|
34
|
+
get: () => props.modelValue || '',
|
|
35
|
+
set: emit.bind(null, 'update:modelValue'),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const filterPanelItem = inject(filterPanelItemKey, null);
|
|
39
|
+
const column = computed(() => filterPanelItem?.column ?? null);
|
|
40
|
+
|
|
41
|
+
const visible = ref(false);
|
|
42
|
+
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
const _component_ElInput = resolveComponent("ElInput");
|
|
45
|
+
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
46
|
+
|
|
47
|
+
return (openBlock(), createBlock(_component_ElTooltip, {
|
|
48
|
+
visible: visible.value,
|
|
49
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = $event => ((visible).value = $event)),
|
|
50
|
+
pure: "",
|
|
51
|
+
teleported: "",
|
|
52
|
+
effect: "light",
|
|
53
|
+
role: "dialog",
|
|
54
|
+
transition: `el-zoom-in-top`,
|
|
55
|
+
"fallback-placements": ['bottom', 'top', 'right', 'left'],
|
|
56
|
+
"gpu-acceleration": false,
|
|
57
|
+
"show-arrow": false,
|
|
58
|
+
"stop-popper-mouse-event": false,
|
|
59
|
+
"hide-after": 0,
|
|
60
|
+
persistent: "",
|
|
61
|
+
trigger: "click"
|
|
62
|
+
}, {
|
|
63
|
+
content: withCtx(() => [
|
|
64
|
+
createElementVNode("div", {
|
|
65
|
+
class: normalizeClass(unref(ns).e('content'))
|
|
66
|
+
}, [
|
|
67
|
+
createVNode(_component_ElInput, {
|
|
68
|
+
class: normalizeClass(unref(ns).e('input')),
|
|
69
|
+
modelValue: unref(value),
|
|
70
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(value) ? (value).value = $event : null)),
|
|
71
|
+
clearable: ""
|
|
72
|
+
}, null, 8 /* PROPS */, ["class", "modelValue"])
|
|
73
|
+
], 2 /* CLASS */)
|
|
74
|
+
]),
|
|
75
|
+
default: withCtx(() => [
|
|
76
|
+
createElementVNode("div", {
|
|
77
|
+
class: normalizeClass([unref(ns).b(), unref(ns).is('active', visible.value)])
|
|
78
|
+
}, [
|
|
79
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
80
|
+
(unref(column))
|
|
81
|
+
? (openBlock(), createElementBlock("span", {
|
|
70
82
|
key: 0,
|
|
71
|
-
class: normalizeClass(unref(ns).e(
|
|
72
|
-
}, toDisplayString(unref(column).title), 3
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
83
|
+
class: normalizeClass(unref(ns).e('label'))
|
|
84
|
+
}, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
|
|
85
|
+
: createCommentVNode("v-if", true)
|
|
86
|
+
])
|
|
87
|
+
], 2 /* CLASS */)
|
|
88
|
+
]),
|
|
89
|
+
_: 3 /* FORWARDED */
|
|
90
|
+
}, 8 /* PROPS */, ["visible"]))
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
};
|
|
95
|
+
var InputCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"input-condition.vue"]]);
|
|
82
96
|
|
|
83
97
|
export { InputCondition as default };
|
|
@@ -1,64 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAttrs, ref, unref, onMounted, openBlock, createBlock, mergeProps, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
2
|
import { useService } from '@ctzy-web-client/web-base-client-vue';
|
|
3
3
|
import { BwaAdvanceSelect, BwaAdvanceOption } from '../../advance-select/index.mjs';
|
|
4
4
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
__conditionTitle__: "\u591A\u9009\u7528\u6237",
|
|
9
|
-
__conditionDefault__: () => []
|
|
10
|
-
});
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: 'multi-user-condition',
|
|
12
8
|
setup(__props) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
9
|
+
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'BwaMultiUserCondition',
|
|
12
|
+
__conditionTitle__: '多选用户',
|
|
13
|
+
__conditionDefault__: () => [],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const attrs = useAttrs();
|
|
17
|
+
const userService = useService('UserService');
|
|
18
|
+
|
|
19
|
+
const userList = ref([]);
|
|
20
|
+
|
|
21
|
+
const loadUserList = async (name = '') => {
|
|
22
|
+
if (!unref(userService)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const userListResult = await unref(userService).getUserList({ name });
|
|
27
|
+
|
|
28
|
+
if (userListResult.code != 0) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
userList.value = userListResult.data || [];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
onMounted(loadUserList);
|
|
36
|
+
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return (openBlock(), createBlock(unref(BwaAdvanceSelect), mergeProps(unref(attrs), {
|
|
39
|
+
multiple: true,
|
|
40
|
+
onSearch: loadUserList
|
|
41
|
+
}), {
|
|
42
|
+
operation: withCtx(() => [
|
|
43
|
+
renderSlot(_ctx.$slots, "operation")
|
|
44
|
+
]),
|
|
45
|
+
empy: withCtx(() => [
|
|
46
|
+
renderSlot(_ctx.$slots, "empy")
|
|
47
|
+
]),
|
|
48
|
+
label: withCtx(({ selectedValue, column }) => [
|
|
49
|
+
renderSlot(_ctx.$slots, "label", {
|
|
50
|
+
selectedValue: selectedValue,
|
|
51
|
+
column: column
|
|
52
|
+
})
|
|
53
|
+
]),
|
|
54
|
+
value: withCtx(() => [
|
|
55
|
+
renderSlot(_ctx.$slots, "value")
|
|
56
|
+
]),
|
|
57
|
+
default: withCtx(() => [
|
|
58
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(userList.value, (item) => {
|
|
59
|
+
return (openBlock(), createBlock(unref(BwaAdvanceOption), {
|
|
60
|
+
key: item.value,
|
|
61
|
+
value: item.value,
|
|
62
|
+
label: item.label
|
|
63
|
+
}, null, 8 /* PROPS */, ["value", "label"]))
|
|
64
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
65
|
+
]),
|
|
66
|
+
_: 3 /* FORWARDED */
|
|
67
|
+
}, 16 /* FULL_PROPS */))
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
};
|
|
72
|
+
var MultiUserCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"multi-user-condition.vue"]]);
|
|
63
73
|
|
|
64
74
|
export { MultiUserCondition as default };
|