@fecp/designer 5.5.64 → 5.5.66
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/designer/package.json.mjs +1 -1
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer.css +554 -23
- package/es/packages/mobile/index.mjs +8 -0
- package/es/packages/mobile/src/api/index.mjs +8 -0
- package/es/packages/mobile/src/components/all.mjs +6 -0
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +18 -4
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +14 -0
- package/es/packages/mobile/src/components/dataDisplay/dataStat/index.mjs +10 -0
- package/es/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.mjs +123 -0
- package/es/packages/mobile/src/components/dataDisplay/menuGrid/index.mjs +7 -0
- package/es/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.mjs +98 -16
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +19 -4
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +248 -0
- package/es/packages/mobile/src/components/feedback/quickFilter/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +159 -15
- package/es/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.mjs +1 -1
- package/es/packages/mobile/src/components/navigation/navBar/NavBar.vue.mjs +13 -3
- package/es/packages/mobile/src/components/navigation/navBar/index.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +8 -4
- package/es/packages/mobile/src/components/navigation/tabbar/index.mjs +2 -2
- package/es/packages/mobile/src/index.vue.mjs +138 -0
- package/es/packages/mobile/src/page.vue.mjs +117 -0
- package/es/packages/mobile/src/utils/eventBus.mjs +5 -0
- package/es/packages/mobile/src/utils/pageHistory.mjs +111 -0
- package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +3 -2
- package/es/packages/vue/src/components/forms/cascader/Cascader.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/form/validation.mjs +1 -1
- package/es/packages/vue/src/utils/parseFilterConfig.mjs +25 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
- package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer.css +554 -23
- package/lib/packages/mobile/index.js +94 -86
- package/lib/packages/mobile/src/api/index.js +8 -0
- package/lib/packages/mobile/src/components/all.js +92 -86
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +17 -3
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +14 -0
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/index.js +10 -0
- package/lib/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.js +123 -0
- package/lib/packages/mobile/src/components/dataDisplay/menuGrid/index.js +7 -0
- package/lib/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.js +97 -15
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +18 -3
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +248 -0
- package/lib/packages/mobile/src/components/feedback/quickFilter/index.js +10 -0
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +158 -14
- package/lib/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.js +1 -1
- package/lib/packages/mobile/src/components/navigation/navBar/NavBar.vue.js +13 -3
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +8 -4
- package/lib/packages/mobile/src/index.vue.js +138 -0
- package/lib/packages/mobile/src/page.vue.js +117 -0
- package/lib/packages/mobile/src/utils/eventBus.js +5 -0
- package/lib/packages/mobile/src/utils/pageHistory.js +111 -0
- package/lib/packages/vue/src/components/details/footer/Footer.vue.js +3 -2
- package/lib/packages/vue/src/components/forms/cascader/Cascader.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/form/validation.js +1 -1
- package/lib/packages/vue/src/utils/parseFilterConfig.js +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { ref, createBlock, createCommentVNode, openBlock, withCtx, createElementBlock, Fragment, renderList, unref, createElementVNode, normalizeClass, toDisplayString, createVNode, createTextVNode } from "vue";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
14
|
+
import { DropdownMenu } from "../../../../node_modules/vant/es/dropdown-menu/index.mjs";
|
|
15
|
+
import { DropdownItem } from "../../../../node_modules/vant/es/dropdown-item/index.mjs";
|
|
16
|
+
import { Button } from "../../../../node_modules/vant/es/button/index.mjs";
|
|
17
|
+
const _hoisted_1 = { class: "dropdown-title" };
|
|
18
|
+
const _hoisted_2 = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "title-badge"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_3 = { class: "filter-container" };
|
|
23
|
+
const _hoisted_4 = { class: "tag-list" };
|
|
24
|
+
const _hoisted_5 = ["onClick"];
|
|
25
|
+
const _hoisted_6 = { class: "filter-footer" };
|
|
26
|
+
const _hoisted_7 = { class: "filter-container" };
|
|
27
|
+
const _hoisted_8 = { class: "group-title" };
|
|
28
|
+
const _hoisted_9 = { class: "tag-list" };
|
|
29
|
+
const _hoisted_10 = ["onClick"];
|
|
30
|
+
const _hoisted_11 = { class: "filter-footer" };
|
|
31
|
+
const _sfc_main = {
|
|
32
|
+
__name: "QuickFilter",
|
|
33
|
+
props: {
|
|
34
|
+
filterData: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: () => []
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["change"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const emit = __emit;
|
|
43
|
+
const activeSelections = ref({});
|
|
44
|
+
const confirmedSelections = ref({});
|
|
45
|
+
const itemRefs = ref({});
|
|
46
|
+
const isOptionSelected = (fieldName, value) => {
|
|
47
|
+
var _a;
|
|
48
|
+
return ((_a = activeSelections.value[fieldName]) == null ? void 0 : _a.includes(value)) || false;
|
|
49
|
+
};
|
|
50
|
+
const getConfirmedCount = (fieldName) => {
|
|
51
|
+
var _a;
|
|
52
|
+
return ((_a = confirmedSelections.value[fieldName]) == null ? void 0 : _a.length) || 0;
|
|
53
|
+
};
|
|
54
|
+
const toggleOption = (fieldName, value) => {
|
|
55
|
+
if (!activeSelections.value[fieldName]) {
|
|
56
|
+
activeSelections.value[fieldName] = [];
|
|
57
|
+
}
|
|
58
|
+
const filter = props.filterData.find((f) => f.fieldName === fieldName);
|
|
59
|
+
const isMultiple = (filter == null ? void 0 : filter.dataType) === "multiple";
|
|
60
|
+
if (isMultiple) {
|
|
61
|
+
const idx = activeSelections.value[fieldName].indexOf(value);
|
|
62
|
+
if (idx > -1) {
|
|
63
|
+
activeSelections.value[fieldName].splice(idx, 1);
|
|
64
|
+
} else {
|
|
65
|
+
activeSelections.value[fieldName].push(value);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
activeSelections.value[fieldName] = [value];
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const getSelectedLabel = (filter) => {
|
|
72
|
+
var _a;
|
|
73
|
+
const selected = (_a = confirmedSelections.value[filter.fieldName]) == null ? void 0 : _a[0];
|
|
74
|
+
if (selected) {
|
|
75
|
+
const option = filter.options.find((o) => o.value === selected);
|
|
76
|
+
return (option == null ? void 0 : option.label) || "";
|
|
77
|
+
}
|
|
78
|
+
return "";
|
|
79
|
+
};
|
|
80
|
+
const resetFilter = (fieldName) => {
|
|
81
|
+
activeSelections.value[fieldName] = [];
|
|
82
|
+
};
|
|
83
|
+
const confirmFilter = (fieldName) => {
|
|
84
|
+
var _a;
|
|
85
|
+
confirmedSelections.value[fieldName] = [
|
|
86
|
+
...activeSelections.value[fieldName] || []
|
|
87
|
+
];
|
|
88
|
+
(_a = itemRefs.value[fieldName]) == null ? void 0 : _a.toggle();
|
|
89
|
+
emitChange();
|
|
90
|
+
};
|
|
91
|
+
const allFilterRef = ref(null);
|
|
92
|
+
const resetAllFilters = () => {
|
|
93
|
+
props.filterData.forEach((filter) => {
|
|
94
|
+
activeSelections.value[filter.fieldName] = [];
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const confirmAllFilters = () => {
|
|
98
|
+
var _a;
|
|
99
|
+
props.filterData.forEach((filter) => {
|
|
100
|
+
confirmedSelections.value[filter.fieldName] = [
|
|
101
|
+
...activeSelections.value[filter.fieldName] || []
|
|
102
|
+
];
|
|
103
|
+
});
|
|
104
|
+
(_a = allFilterRef.value) == null ? void 0 : _a.toggle();
|
|
105
|
+
emitChange();
|
|
106
|
+
};
|
|
107
|
+
const dropdownItemOpen = (fieldName) => {
|
|
108
|
+
activeSelections.value[fieldName] = [
|
|
109
|
+
...confirmedSelections.value[fieldName] || []
|
|
110
|
+
];
|
|
111
|
+
};
|
|
112
|
+
const emitChange = () => {
|
|
113
|
+
const result = [];
|
|
114
|
+
props.filterData.forEach((filter) => {
|
|
115
|
+
const values = confirmedSelections.value[filter.fieldName] || [];
|
|
116
|
+
if (values.length > 0) {
|
|
117
|
+
result.push({
|
|
118
|
+
fieldName: filter.fieldName,
|
|
119
|
+
label: filter.label,
|
|
120
|
+
dataType: filter.dataType,
|
|
121
|
+
values
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
emit("change", result);
|
|
126
|
+
};
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
const _component_van_button = Button;
|
|
129
|
+
const _component_van_dropdown_item = DropdownItem;
|
|
130
|
+
const _component_van_dropdown_menu = DropdownMenu;
|
|
131
|
+
return __props.filterData.length > 0 ? (openBlock(), createBlock(_component_van_dropdown_menu, {
|
|
132
|
+
key: 0,
|
|
133
|
+
"auto-locate": "",
|
|
134
|
+
class: "fec-quick-filter"
|
|
135
|
+
}, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.filterData, (filter, index) => {
|
|
138
|
+
return openBlock(), createBlock(_component_van_dropdown_item, {
|
|
139
|
+
key: `${filter.label}-${index}`,
|
|
140
|
+
ref_for: true,
|
|
141
|
+
ref: (el) => unref(itemRefs)[filter.fieldName] = el,
|
|
142
|
+
onOpen: ($event) => dropdownItemOpen(filter.fieldName)
|
|
143
|
+
}, {
|
|
144
|
+
title: withCtx(() => [
|
|
145
|
+
createElementVNode("span", _hoisted_1, [
|
|
146
|
+
createTextVNode(toDisplayString(filter.dataType === "select" ? getSelectedLabel(filter) || filter.label : filter.label) + " ", 1),
|
|
147
|
+
filter.dataType === "multiple" && getConfirmedCount(filter.fieldName) > 0 ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(getConfirmedCount(filter.fieldName)), 1)) : createCommentVNode("", true)
|
|
148
|
+
])
|
|
149
|
+
]),
|
|
150
|
+
default: withCtx(() => [
|
|
151
|
+
createElementVNode("div", _hoisted_3, [
|
|
152
|
+
createElementVNode("div", _hoisted_4, [
|
|
153
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filter.options, (item) => {
|
|
154
|
+
return openBlock(), createElementBlock("div", {
|
|
155
|
+
key: item.id || item.value,
|
|
156
|
+
class: normalizeClass(["tag-item", { active: isOptionSelected(filter.fieldName, item.value) }]),
|
|
157
|
+
onClick: ($event) => toggleOption(filter.fieldName, item.value)
|
|
158
|
+
}, toDisplayString(item.label), 11, _hoisted_5);
|
|
159
|
+
}), 128))
|
|
160
|
+
]),
|
|
161
|
+
createElementVNode("div", _hoisted_6, [
|
|
162
|
+
createVNode(_component_van_button, {
|
|
163
|
+
size: "small",
|
|
164
|
+
onClick: ($event) => resetFilter(filter.fieldName)
|
|
165
|
+
}, {
|
|
166
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
167
|
+
createTextVNode("重置")
|
|
168
|
+
])),
|
|
169
|
+
_: 2
|
|
170
|
+
}, 1032, ["onClick"]),
|
|
171
|
+
createVNode(_component_van_button, {
|
|
172
|
+
type: "primary",
|
|
173
|
+
size: "small",
|
|
174
|
+
onClick: ($event) => confirmFilter(filter.fieldName)
|
|
175
|
+
}, {
|
|
176
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
177
|
+
createTextVNode("确定")
|
|
178
|
+
])),
|
|
179
|
+
_: 2
|
|
180
|
+
}, 1032, ["onClick"])
|
|
181
|
+
])
|
|
182
|
+
])
|
|
183
|
+
]),
|
|
184
|
+
_: 2
|
|
185
|
+
}, 1032, ["onOpen"]);
|
|
186
|
+
}), 128)),
|
|
187
|
+
__props.filterData.length > 0 ? (openBlock(), createBlock(_component_van_dropdown_item, {
|
|
188
|
+
key: 0,
|
|
189
|
+
ref_key: "allFilterRef",
|
|
190
|
+
ref: allFilterRef,
|
|
191
|
+
title: "全部筛选"
|
|
192
|
+
}, {
|
|
193
|
+
default: withCtx(() => [
|
|
194
|
+
createElementVNode("div", _hoisted_7, [
|
|
195
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.filterData, (filter, index) => {
|
|
196
|
+
return openBlock(), createElementBlock("div", {
|
|
197
|
+
key: `all-${filter.label}-${index}`,
|
|
198
|
+
class: "filter-group"
|
|
199
|
+
}, [
|
|
200
|
+
createElementVNode("h3", _hoisted_8, toDisplayString(filter.label), 1),
|
|
201
|
+
createElementVNode("div", _hoisted_9, [
|
|
202
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filter.options, (item, optIndex) => {
|
|
203
|
+
return openBlock(), createElementBlock("div", {
|
|
204
|
+
key: `${filter.label}-${item.value}-${optIndex}`,
|
|
205
|
+
class: normalizeClass(["tag-item", {
|
|
206
|
+
active: isOptionSelected(filter.fieldName, item.value)
|
|
207
|
+
}]),
|
|
208
|
+
onClick: ($event) => toggleOption(filter.fieldName, item.value)
|
|
209
|
+
}, toDisplayString(item.label), 11, _hoisted_10);
|
|
210
|
+
}), 128))
|
|
211
|
+
])
|
|
212
|
+
]);
|
|
213
|
+
}), 128)),
|
|
214
|
+
createElementVNode("div", _hoisted_11, [
|
|
215
|
+
createVNode(_component_van_button, {
|
|
216
|
+
size: "small",
|
|
217
|
+
onClick: resetAllFilters
|
|
218
|
+
}, {
|
|
219
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
220
|
+
createTextVNode("重置")
|
|
221
|
+
])),
|
|
222
|
+
_: 1
|
|
223
|
+
}),
|
|
224
|
+
createVNode(_component_van_button, {
|
|
225
|
+
type: "primary",
|
|
226
|
+
size: "small",
|
|
227
|
+
onClick: confirmAllFilters
|
|
228
|
+
}, {
|
|
229
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
230
|
+
createTextVNode("确定")
|
|
231
|
+
])),
|
|
232
|
+
_: 1
|
|
233
|
+
})
|
|
234
|
+
])
|
|
235
|
+
])
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 512)) : createCommentVNode("", true)
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
})) : createCommentVNode("", true);
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
const QuickFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e7ddf36"]]);
|
|
246
|
+
export {
|
|
247
|
+
QuickFilter as default
|
|
248
|
+
};
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { ref,
|
|
7
|
+
import { getCurrentInstance, ref, watch, createElementBlock, openBlock, Fragment, createVNode, withModifiers, unref, isRef, withCtx, createElementVNode } from "vue";
|
|
8
|
+
import { createDataSource } from "../../../utils/datasource.mjs";
|
|
9
|
+
import QuickFilter from "../../feedback/quickFilter/QuickFilter.vue.mjs";
|
|
8
10
|
import { Search } from "../../../../node_modules/vant/es/search/index.mjs";
|
|
9
11
|
const _sfc_main = {
|
|
10
12
|
__name: "Search",
|
|
@@ -12,29 +14,171 @@ const _sfc_main = {
|
|
|
12
14
|
placeholder: {
|
|
13
15
|
type: String,
|
|
14
16
|
default: ""
|
|
17
|
+
},
|
|
18
|
+
filterMode: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "input"
|
|
21
|
+
},
|
|
22
|
+
dataSources: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
filterConfig: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
15
29
|
}
|
|
16
30
|
},
|
|
17
|
-
|
|
18
|
-
|
|
31
|
+
emits: ["filterChange"],
|
|
32
|
+
setup(__props, { emit: __emit }) {
|
|
33
|
+
const props = __props;
|
|
34
|
+
const emit = __emit;
|
|
35
|
+
const currentInstance = getCurrentInstance();
|
|
36
|
+
const ctx = currentInstance.proxy;
|
|
37
|
+
const searchData = ref("");
|
|
19
38
|
function onClickFilter() {
|
|
20
|
-
|
|
39
|
+
}
|
|
40
|
+
function onClickButton() {
|
|
41
|
+
onSearch(searchData.value);
|
|
21
42
|
}
|
|
22
43
|
function onSearch(val) {
|
|
23
44
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
45
|
+
function onQuickFilterChange(result) {
|
|
46
|
+
console.log("筛选数据:", result);
|
|
47
|
+
emit("filterChange", result);
|
|
26
48
|
}
|
|
49
|
+
const filterData = ref([]);
|
|
50
|
+
const fieldDataSources = /* @__PURE__ */ new Set();
|
|
51
|
+
const dictionaryKeys = /* @__PURE__ */ new Set();
|
|
52
|
+
const dataSourceOptions = ref({});
|
|
53
|
+
const dictionaryOptions = ref({});
|
|
54
|
+
const loadFieldDataSources = async () => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
const optionsDatas = [];
|
|
57
|
+
const fields = props.filterConfig;
|
|
58
|
+
for (const component of fields) {
|
|
59
|
+
const { optionSource, dataSourceValue, dictionaryValue } = component.optionConfig;
|
|
60
|
+
if (optionSource === "dataSource" && dataSourceValue) {
|
|
61
|
+
fieldDataSources.add(dataSourceValue);
|
|
62
|
+
} else if (optionSource === "dictionary" && dictionaryValue) {
|
|
63
|
+
dictionaryKeys.add(dictionaryValue);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
for (const dataSourceId of fieldDataSources) {
|
|
67
|
+
if (dataSourceOptions.value[dataSourceId]) continue;
|
|
68
|
+
try {
|
|
69
|
+
const dsManager = createDataSource({
|
|
70
|
+
http: ctx.$http,
|
|
71
|
+
dataSources: props.dataSources,
|
|
72
|
+
currentDataSourceId: dataSourceId
|
|
73
|
+
});
|
|
74
|
+
const data = await dsManager.fetch();
|
|
75
|
+
let options = [];
|
|
76
|
+
if (Array.isArray(data)) {
|
|
77
|
+
options = data;
|
|
78
|
+
} else if (typeof data === "object") {
|
|
79
|
+
options = Array.isArray(data.data) ? data.data : ((_a = data.data) == null ? void 0 : _a.records) || ((_b = data.data) == null ? void 0 : _b.list) || [];
|
|
80
|
+
}
|
|
81
|
+
dataSourceOptions.value[dataSourceId] = options;
|
|
82
|
+
dsManager.destroy();
|
|
83
|
+
} catch (error) {
|
|
84
|
+
console.error(`Failed to load data source ${dataSourceId}:`, error);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (dictionaryKeys.size > 0) {
|
|
88
|
+
try {
|
|
89
|
+
const keyName = Array.from(dictionaryKeys).join(",");
|
|
90
|
+
const response = await ctx.$http.postForm(
|
|
91
|
+
"/base-server/parm/sysParmDic/getDicListByKey",
|
|
92
|
+
{
|
|
93
|
+
keyName
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
const dictionaryData = response;
|
|
97
|
+
if (typeof dictionaryData === "object") {
|
|
98
|
+
Object.keys(dictionaryData).forEach((dictKey) => {
|
|
99
|
+
if (dictionaryKeys.has(dictKey)) {
|
|
100
|
+
const dictItems = dictionaryData[dictKey];
|
|
101
|
+
if (Array.isArray(dictItems)) {
|
|
102
|
+
dictionaryOptions.value[dictKey] = dictItems;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
} catch (error) {
|
|
108
|
+
console.error("Failed to load dictionary data:", error);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
fields.forEach((component) => {
|
|
112
|
+
if (!component.optionConfig) return;
|
|
113
|
+
let options = [];
|
|
114
|
+
const {
|
|
115
|
+
optionSource,
|
|
116
|
+
dataSourceValue,
|
|
117
|
+
dictionaryValue,
|
|
118
|
+
displayField,
|
|
119
|
+
valueField,
|
|
120
|
+
idField,
|
|
121
|
+
pidField
|
|
122
|
+
} = component.optionConfig;
|
|
123
|
+
if (optionSource === "dataSource" && dataSourceOptions.value[dataSourceValue]) {
|
|
124
|
+
const rawOptions = dataSourceOptions.value[dataSourceValue];
|
|
125
|
+
const labelField = displayField || "label";
|
|
126
|
+
const keyField = valueField || "value";
|
|
127
|
+
options = rawOptions.map((item) => ({
|
|
128
|
+
label: item[labelField],
|
|
129
|
+
value: item[keyField],
|
|
130
|
+
...item
|
|
131
|
+
}));
|
|
132
|
+
optionsDatas.push({ ...component, options });
|
|
133
|
+
} else if (optionSource === "dictionary" && dictionaryOptions.value[dictionaryValue]) {
|
|
134
|
+
const rawOptions = dictionaryOptions.value[dictionaryValue];
|
|
135
|
+
const labelField = "optName";
|
|
136
|
+
const keyField = "optCode";
|
|
137
|
+
options = rawOptions.map((item) => ({
|
|
138
|
+
label: item[labelField],
|
|
139
|
+
value: item[keyField]
|
|
140
|
+
}));
|
|
141
|
+
optionsDatas.push({ ...component, options });
|
|
142
|
+
} else if (optionSource === "custom") {
|
|
143
|
+
optionsDatas.push({
|
|
144
|
+
...component,
|
|
145
|
+
options: component.optionConfig.options || []
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
filterData.value = [...optionsDatas];
|
|
150
|
+
};
|
|
151
|
+
watch(
|
|
152
|
+
() => props.filterConfig.map((item) => ({
|
|
153
|
+
label: item.label
|
|
154
|
+
})),
|
|
155
|
+
() => {
|
|
156
|
+
loadFieldDataSources();
|
|
157
|
+
},
|
|
158
|
+
{ deep: true, immediate: true }
|
|
159
|
+
);
|
|
27
160
|
return (_ctx, _cache) => {
|
|
28
161
|
const _component_van_search = Search;
|
|
29
|
-
return openBlock(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
162
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
163
|
+
createVNode(_component_van_search, {
|
|
164
|
+
modelValue: unref(searchData),
|
|
165
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchData) ? searchData.value = $event : null),
|
|
166
|
+
shape: "round",
|
|
167
|
+
placeholder: __props.placeholder,
|
|
168
|
+
"show-action": __props.filterMode == "input",
|
|
169
|
+
clearable: "",
|
|
170
|
+
onClickInput: _cache[1] || (_cache[1] = withModifiers(($event) => __props.filterMode == "router" && onClickFilter, ["stop"]))
|
|
171
|
+
}, {
|
|
172
|
+
action: withCtx(() => [
|
|
173
|
+
createElementVNode("div", { onClick: onClickButton }, "搜索")
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
}, 8, ["modelValue", "placeholder", "show-action"]),
|
|
177
|
+
createVNode(QuickFilter, {
|
|
178
|
+
"filter-data": unref(filterData),
|
|
179
|
+
onChange: onQuickFilterChange
|
|
180
|
+
}, null, 8, ["filter-data"])
|
|
181
|
+
], 64);
|
|
38
182
|
};
|
|
39
183
|
}
|
|
40
184
|
};
|
|
@@ -36,7 +36,7 @@ const _sfc_main = {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
const _ActionBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
39
|
+
const _ActionBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac26522e"]]);
|
|
40
40
|
export {
|
|
41
41
|
_ActionBar as default
|
|
42
42
|
};
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { createBlock, openBlock, mergeProps, createSlots, renderList, withCtx, renderSlot } from "vue";
|
|
6
|
+
import { pageHistory } from "../../../utils/pageHistory.mjs";
|
|
7
|
+
import emitter from "../../../utils/eventBus.mjs";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
6
10
|
import { NavBar } from "../../../../node_modules/vant/es/nav-bar/index.mjs";
|
|
7
11
|
const _sfc_main = {
|
|
8
12
|
__name: "NavBar",
|
|
@@ -25,7 +29,12 @@ const _sfc_main = {
|
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
setup(__props) {
|
|
28
|
-
const onClickLeft = () =>
|
|
32
|
+
const onClickLeft = () => {
|
|
33
|
+
const prevPage = pageHistory.back();
|
|
34
|
+
if (prevPage) {
|
|
35
|
+
emitter.emit("loadPage", prevPage.id);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
29
38
|
return (_ctx, _cache) => {
|
|
30
39
|
const _component_van_nav_bar = NavBar;
|
|
31
40
|
return openBlock(), createBlock(_component_van_nav_bar, mergeProps(_ctx.$attrs, {
|
|
@@ -41,7 +50,7 @@ const _sfc_main = {
|
|
|
41
50
|
return {
|
|
42
51
|
name: key,
|
|
43
52
|
fn: withCtx(() => [
|
|
44
|
-
renderSlot(_ctx.$slots, key)
|
|
53
|
+
renderSlot(_ctx.$slots, key, {}, void 0, true)
|
|
45
54
|
])
|
|
46
55
|
};
|
|
47
56
|
})
|
|
@@ -49,6 +58,7 @@ const _sfc_main = {
|
|
|
49
58
|
};
|
|
50
59
|
}
|
|
51
60
|
};
|
|
61
|
+
const _NavBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f6340561"]]);
|
|
52
62
|
export {
|
|
53
|
-
|
|
63
|
+
_NavBar as default
|
|
54
64
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _NavBar from "./NavBar.vue.mjs";
|
|
2
2
|
import install from "../../../utils/install.mjs";
|
|
3
|
-
const MobileNavBar = install.withInstall("MobileNavBar",
|
|
3
|
+
const MobileNavBar = install.withInstall("MobileNavBar", _NavBar);
|
|
4
4
|
export {
|
|
5
5
|
MobileNavBar,
|
|
6
6
|
MobileNavBar as default
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { computed, createBlock, openBlock, mergeProps, unref, isRef, withCtx, createElementBlock, renderSlot, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
9
|
import { Tabbar } from "../../../../node_modules/vant/es/tabbar/index.mjs";
|
|
8
10
|
import { TabbarItem } from "../../../../node_modules/vant/es/tabbar-item/index.mjs";
|
|
9
11
|
const _sfc_main = {
|
|
@@ -42,21 +44,23 @@ const _sfc_main = {
|
|
|
42
44
|
default: withCtx(() => [
|
|
43
45
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabbarOptions, (item) => {
|
|
44
46
|
return openBlock(), createBlock(_component_van_tabbar_item, {
|
|
45
|
-
icon: item.icon
|
|
47
|
+
icon: item.icon,
|
|
48
|
+
name: item.pageId
|
|
46
49
|
}, {
|
|
47
50
|
default: withCtx(() => [
|
|
48
51
|
createTextVNode(toDisplayString(item.title), 1)
|
|
49
52
|
]),
|
|
50
53
|
_: 2
|
|
51
|
-
}, 1032, ["icon"]);
|
|
54
|
+
}, 1032, ["icon", "name"]);
|
|
52
55
|
}), 256)),
|
|
53
|
-
renderSlot(_ctx.$slots, "default")
|
|
56
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
54
57
|
]),
|
|
55
58
|
_: 3
|
|
56
59
|
}, 16, ["modelValue"]);
|
|
57
60
|
};
|
|
58
61
|
}
|
|
59
62
|
};
|
|
63
|
+
const _Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04abcf62"]]);
|
|
60
64
|
export {
|
|
61
|
-
|
|
65
|
+
_Tabbar as default
|
|
62
66
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _Tabbar from "./Tabbar.vue.mjs";
|
|
2
2
|
import install from "../../../utils/install.mjs";
|
|
3
|
-
const MobileTabbar = install.withInstall("MobileTabbar",
|
|
3
|
+
const MobileTabbar = install.withInstall("MobileTabbar", _Tabbar);
|
|
4
4
|
export {
|
|
5
5
|
MobileTabbar,
|
|
6
6
|
MobileTabbar as default
|