@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
|
@@ -8,159 +8,154 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
|
|
|
8
8
|
var index = require('../../hooks/use-data/index.js');
|
|
9
9
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => [],
|
|
21
|
-
},
|
|
22
|
-
labelProp: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: 'label',
|
|
25
|
-
},
|
|
26
|
-
valueProp: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: 'value',
|
|
29
|
-
},
|
|
30
|
-
multiple: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
filterable: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: true,
|
|
37
|
-
},
|
|
38
|
-
placeholder: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: '请选择',
|
|
41
|
-
},
|
|
42
|
-
remote: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: true,
|
|
45
|
-
},
|
|
46
|
-
size: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: 'small',
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
emits: ['update:modelValue', 'search', 'visible-change'],
|
|
52
|
-
setup(__props, { emit }) {
|
|
53
|
-
|
|
54
|
-
const props = __props;
|
|
55
|
-
|
|
56
|
-
const httpRequest = webBaseClientVue.useService(webBaseClientVue.HttpRequest);
|
|
57
|
-
defineOptions({
|
|
58
|
-
name: 'BwaPctMultipleMenuCondition',
|
|
59
|
-
__conditionTitle__: '多选菜单-PZ',
|
|
60
|
-
__conditionDefault__: () => [],
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const ns = webBaseClientVue.useNamespace('pctfilterpanel-item');
|
|
66
|
-
|
|
67
|
-
const attrs = vue.useAttrs();
|
|
68
|
-
const showTitle = vue.computed(() => attrs.showTitle);
|
|
69
|
-
|
|
70
|
-
const data = vue.ref([]);
|
|
71
|
-
const loading = vue.ref(false);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const filterPanelItem = vue.inject(webBaseClientVue.filterPanelItemKey, null);
|
|
75
|
-
const column = vue.computed(() => filterPanelItem?.column ?? null);
|
|
76
|
-
|
|
77
|
-
const placeholderStr = vue.computed(() => showTitle.value ? props.placeholder : column.value.title);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const getData = async (query) => {
|
|
81
|
-
loading.value = true;
|
|
82
|
-
const { itfInfo, searchAttr } = column.value.componentProps;
|
|
83
|
-
const {url, method, options, params } = {
|
|
84
|
-
url: vue.unref(itfInfo).url,
|
|
85
|
-
method: vue.unref(itfInfo).method || 'POST',
|
|
86
|
-
options: vue.unref(itfInfo).options || {},
|
|
87
|
-
params: { ...vue.unref(itfInfo).params, [searchAttr]: query || ''} || {},
|
|
88
|
-
};
|
|
89
|
-
data.value = (await vue.unref(httpRequest)[method.toLowerCase()](url, params, options))?.data;
|
|
90
|
-
loading.value = false;
|
|
91
|
-
};
|
|
92
|
-
if (column.value?.componentProps) {
|
|
93
|
-
|
|
94
|
-
} else {
|
|
95
|
-
data.value = props.options ?? [];
|
|
96
|
-
}
|
|
97
|
-
const visibleChange = (val) => {
|
|
98
|
-
if (!val || !column.value.componentProps) return
|
|
99
|
-
getData();
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const remoteMethod = (query) => {
|
|
103
|
-
if (column.value.componentProps) {
|
|
104
|
-
getData(query);
|
|
105
|
-
} else {
|
|
106
|
-
emit('search', query);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const modelValue = vue.computed({
|
|
111
|
-
get: () => {
|
|
112
|
-
if (props.multiple) {
|
|
113
|
-
return Array.isArray(props.modelValue)
|
|
114
|
-
? props.modelValue.map((item) => item + '')
|
|
115
|
-
: [];
|
|
116
|
-
} else {
|
|
117
|
-
return props.modelValue == null ? '' : props.modelValue + '';
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
set: (v) => emit('update:modelValue', v),
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
return (_ctx, _cache) => {
|
|
124
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
125
|
-
(vue.unref(showTitle))
|
|
126
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
127
|
-
key: 0,
|
|
128
|
-
class: vue.normalizeClass(vue.unref(ns).e('title'))
|
|
129
|
-
}, vue.toDisplayString(vue.unref(column).title), 3 /* TEXT, CLASS */))
|
|
130
|
-
: vue.createCommentVNode("v-if", true),
|
|
131
|
-
vue.createVNode(vue.unref(ElementPlus.ElSelect), {
|
|
132
|
-
modelValue: vue.unref(modelValue),
|
|
133
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(modelValue) ? (modelValue).value = $event : null)),
|
|
134
|
-
clearable: "",
|
|
135
|
-
multiple: __props.multiple,
|
|
136
|
-
filterable: __props.filterable,
|
|
137
|
-
placeholder: vue.unref(placeholderStr),
|
|
138
|
-
loading: loading.value,
|
|
139
|
-
onVisibleChange: visibleChange,
|
|
140
|
-
remote: __props.remote,
|
|
141
|
-
"remote-method": remoteMethod,
|
|
142
|
-
size: __props.size,
|
|
143
|
-
class: vue.normalizeClass(vue.unref(ns).e('multiple')),
|
|
144
|
-
"collapse-tags": "",
|
|
145
|
-
"collapse-tags-tooltip": "",
|
|
146
|
-
"no-data-text": "暂无数据"
|
|
147
|
-
}, {
|
|
148
|
-
default: vue.withCtx(() => [
|
|
149
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(data.value, (item, index) => {
|
|
150
|
-
return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOption), {
|
|
151
|
-
key: item[__props.valueProp] + index,
|
|
152
|
-
value: item[__props.valueProp] + '',
|
|
153
|
-
label: item[__props.labelProp]
|
|
154
|
-
}, null, 8 /* PROPS */, ["value", "label"]))
|
|
155
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
156
|
-
]),
|
|
157
|
-
_: 1 /* STABLE */
|
|
158
|
-
}, 8 /* PROPS */, ["modelValue", "multiple", "filterable", "placeholder", "loading", "remote", "size", "class"])
|
|
159
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
11
|
+
// Inject __name helper
|
|
12
|
+
if (typeof __name === 'undefined') {
|
|
13
|
+
function __name(obj, name) {
|
|
14
|
+
Object.defineProperty(obj, "name", {
|
|
15
|
+
value: name,
|
|
16
|
+
configurable: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
160
19
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
20
|
+
const __default__ = vue.defineComponent({
|
|
21
|
+
name: "BwaPctMultipleMenuCondition",
|
|
22
|
+
__conditionTitle__: "\u591A\u9009\u83DC\u5355-PZ",
|
|
23
|
+
__conditionDefault__: () => []
|
|
24
|
+
});
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
26
|
+
props: {
|
|
27
|
+
...index.dataProps,
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: null
|
|
30
|
+
},
|
|
31
|
+
options: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
labelProp: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "label"
|
|
38
|
+
},
|
|
39
|
+
valueProp: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "value"
|
|
42
|
+
},
|
|
43
|
+
multiple: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
filterable: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
placeholder: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "\u8BF7\u9009\u62E9"
|
|
54
|
+
},
|
|
55
|
+
remote: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
size: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "small"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
emits: ["update:modelValue", "search", "visible-change"],
|
|
65
|
+
setup(__props, { emit: __emit }) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
const httpRequest = webBaseClientVue.useService(webBaseClientVue.HttpRequest);
|
|
68
|
+
;
|
|
69
|
+
const props = __props;
|
|
70
|
+
const ns = webBaseClientVue.useNamespace("pctfilterpanel-item");
|
|
71
|
+
const attrs = vue.useAttrs();
|
|
72
|
+
const showTitle = vue.computed(() => attrs.showTitle);
|
|
73
|
+
const data = vue.ref([]);
|
|
74
|
+
const loading = vue.ref(false);
|
|
75
|
+
const emit = __emit;
|
|
76
|
+
const filterPanelItem = vue.inject(webBaseClientVue.filterPanelItemKey, null);
|
|
77
|
+
const column = vue.computed(() => {
|
|
78
|
+
var _a2;
|
|
79
|
+
return (_a2 = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a2 : null;
|
|
80
|
+
});
|
|
81
|
+
const placeholderStr = vue.computed(() => showTitle.value ? props.placeholder : column.value.title);
|
|
82
|
+
const getData = async (query) => {
|
|
83
|
+
var _a2;
|
|
84
|
+
loading.value = true;
|
|
85
|
+
const { itfInfo, searchAttr } = column.value.componentProps;
|
|
86
|
+
const { url, method, options, params } = {
|
|
87
|
+
url: vue.unref(itfInfo).url,
|
|
88
|
+
method: vue.unref(itfInfo).method || "POST",
|
|
89
|
+
options: vue.unref(itfInfo).options || {},
|
|
90
|
+
params: { ...vue.unref(itfInfo).params, [searchAttr]: query || "" }
|
|
91
|
+
};
|
|
92
|
+
data.value = (_a2 = await vue.unref(httpRequest)[method.toLowerCase()](url, params, options)) == null ? void 0 : _a2.data;
|
|
93
|
+
loading.value = false;
|
|
94
|
+
};
|
|
95
|
+
if ((_a = column.value) == null ? void 0 : _a.componentProps) {
|
|
96
|
+
} else {
|
|
97
|
+
data.value = (_b = props.options) != null ? _b : [];
|
|
98
|
+
}
|
|
99
|
+
const visibleChange = (val) => {
|
|
100
|
+
if (!val || !column.value.componentProps)
|
|
101
|
+
return;
|
|
102
|
+
getData();
|
|
103
|
+
};
|
|
104
|
+
const remoteMethod = (query) => {
|
|
105
|
+
if (column.value.componentProps) {
|
|
106
|
+
getData(query);
|
|
107
|
+
} else {
|
|
108
|
+
emit("search", query);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const modelValue = vue.computed({
|
|
112
|
+
get: () => {
|
|
113
|
+
if (props.multiple) {
|
|
114
|
+
return Array.isArray(props.modelValue) ? props.modelValue.map((item) => item + "") : [];
|
|
115
|
+
} else {
|
|
116
|
+
return props.modelValue == null ? "" : props.modelValue + "";
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
set: (v) => emit("update:modelValue", v)
|
|
120
|
+
});
|
|
121
|
+
return (_ctx, _cache) => {
|
|
122
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
123
|
+
showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
126
|
+
}, vue.toDisplayString(column.value.title), 3)) : vue.createCommentVNode("v-if", true),
|
|
127
|
+
vue.createVNode(vue.unref(ElementPlus.ElSelect), {
|
|
128
|
+
modelValue: modelValue.value,
|
|
129
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
130
|
+
clearable: "",
|
|
131
|
+
multiple: __props.multiple,
|
|
132
|
+
filterable: __props.filterable,
|
|
133
|
+
placeholder: placeholderStr.value,
|
|
134
|
+
loading: loading.value,
|
|
135
|
+
onVisibleChange: visibleChange,
|
|
136
|
+
remote: __props.remote,
|
|
137
|
+
"remote-method": remoteMethod,
|
|
138
|
+
size: __props.size,
|
|
139
|
+
class: vue.normalizeClass(vue.unref(ns).e("multiple")),
|
|
140
|
+
"collapse-tags": "",
|
|
141
|
+
"collapse-tags-tooltip": "",
|
|
142
|
+
"no-data-text": "\u6682\u65E0\u6570\u636E"
|
|
143
|
+
}, {
|
|
144
|
+
default: vue.withCtx(() => [
|
|
145
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(data.value, (item, index) => {
|
|
146
|
+
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOption), {
|
|
147
|
+
key: item[__props.valueProp] + index,
|
|
148
|
+
value: item[__props.valueProp] + "",
|
|
149
|
+
label: item[__props.labelProp]
|
|
150
|
+
}, null, 8, ["value", "label"]);
|
|
151
|
+
}), 128))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["modelValue", "multiple", "filterable", "placeholder", "loading", "remote", "size", "class"])
|
|
155
|
+
], 64);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
var pctMultipleMenuCondition2 = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["__file", "pct-multiple-menu-condition2.vue"]]);
|
|
165
160
|
|
|
166
161
|
exports["default"] = pctMultipleMenuCondition2;
|
|
@@ -7,61 +7,57 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
|
|
|
7
7
|
var useFilterPanelItem = require('./use-filter-panel-item.js');
|
|
8
8
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
default: false,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
emits: ['close'],
|
|
22
|
-
setup(__props, { emit }) {
|
|
23
|
-
|
|
24
|
-
const props = __props;
|
|
25
|
-
|
|
26
|
-
defineOptions({
|
|
27
|
-
name: 'BwaPctFilterPanelItem',
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const ns = webBaseClientVue.useNamespace('pctfilterpanel');
|
|
35
|
-
|
|
36
|
-
const { value, column, allowClose, closeHandle, showTitle, filterPanelLineNum } = useFilterPanelItem.useFilterPanelItem(props);
|
|
37
|
-
|
|
38
|
-
const data = vue.reactive({ value });
|
|
39
|
-
|
|
40
|
-
vue.provide(
|
|
41
|
-
webBaseClientVue.filterPanelItemKey,
|
|
42
|
-
vue.reactive({
|
|
43
|
-
column,
|
|
44
|
-
})
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
49
|
-
class: vue.normalizeClass(vue.unref(ns).b('item')),
|
|
50
|
-
style: vue.normalizeStyle({ 'width': vue.unref(filterPanelLineNum) ? (100 / vue.unref(filterPanelLineNum)).toFixed(2) + '%' : vue.unref(showTitle) ? '25%' : '20%', })
|
|
51
|
-
}, [
|
|
52
|
-
vue.renderSlot(_ctx.$slots, "default", { data: data }),
|
|
53
|
-
(vue.unref(allowClose))
|
|
54
|
-
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: vue.normalizeClass(['ptp-icon', 'ptp-close', vue.unref(ns).be('item', 'close')]),
|
|
57
|
-
onClick: _cache[0] || (_cache[0] = (...args) => (vue.unref(closeHandle) && vue.unref(closeHandle)(...args)))
|
|
58
|
-
}, null, 2 /* CLASS */))
|
|
59
|
-
: vue.createCommentVNode("v-if", true)
|
|
60
|
-
], 6 /* CLASS, STYLE */))
|
|
10
|
+
// Inject __name helper
|
|
11
|
+
if (typeof __name === 'undefined') {
|
|
12
|
+
function __name(obj, name) {
|
|
13
|
+
Object.defineProperty(obj, "name", {
|
|
14
|
+
value: name,
|
|
15
|
+
configurable: true
|
|
16
|
+
});
|
|
17
|
+
}
|
|
61
18
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
|
|
19
|
+
const __default__ = vue.defineComponent({
|
|
20
|
+
name: "BwaPctFilterPanelItem"
|
|
21
|
+
});
|
|
22
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
23
|
+
props: {
|
|
24
|
+
prop: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
close: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ["close"],
|
|
33
|
+
setup(__props, { emit: __emit }) {
|
|
34
|
+
;
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const ns = webBaseClientVue.useNamespace("pctfilterpanel");
|
|
38
|
+
const { value, column, allowClose, closeHandle, showTitle, filterPanelLineNum } = useFilterPanelItem.useFilterPanelItem(props);
|
|
39
|
+
const data = vue.reactive({ value });
|
|
40
|
+
vue.provide(
|
|
41
|
+
webBaseClientVue.filterPanelItemKey,
|
|
42
|
+
vue.reactive({
|
|
43
|
+
column
|
|
44
|
+
})
|
|
45
|
+
);
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
48
|
+
class: vue.normalizeClass(vue.unref(ns).b("item")),
|
|
49
|
+
style: vue.normalizeStyle({ "width": vue.unref(filterPanelLineNum) ? (100 / vue.unref(filterPanelLineNum)).toFixed(2) + "%" : vue.unref(showTitle) ? "25%" : "20%" })
|
|
50
|
+
}, [
|
|
51
|
+
vue.renderSlot(_ctx.$slots, "default", { data }),
|
|
52
|
+
vue.unref(allowClose) ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: vue.normalizeClass(["ptp-icon", "ptp-close", vue.unref(ns).be("item", "close")]),
|
|
55
|
+
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(closeHandle) && vue.unref(closeHandle)(...args))
|
|
56
|
+
}, null, 2)) : vue.createCommentVNode("v-if", true)
|
|
57
|
+
], 6);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var PctFilterPanelItem = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["__file", "pct-filter-panel-item.vue"]]);
|
|
66
62
|
|
|
67
63
|
exports["default"] = PctFilterPanelItem;
|