@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.
Files changed (79) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
  3. package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
  4. package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
  5. package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
  6. package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
  7. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
  9. package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
  10. package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
  11. package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
  12. package/es/designer/src/packages/prod/index.vue.mjs +1 -1
  13. package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
  14. package/es/designer.css +554 -23
  15. package/es/packages/mobile/index.mjs +8 -0
  16. package/es/packages/mobile/src/api/index.mjs +8 -0
  17. package/es/packages/mobile/src/components/all.mjs +6 -0
  18. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +18 -4
  19. package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +14 -0
  20. package/es/packages/mobile/src/components/dataDisplay/dataStat/index.mjs +10 -0
  21. package/es/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.mjs +123 -0
  22. package/es/packages/mobile/src/components/dataDisplay/menuGrid/index.mjs +7 -0
  23. package/es/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.mjs +98 -16
  24. package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +19 -4
  25. package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +248 -0
  26. package/es/packages/mobile/src/components/feedback/quickFilter/index.mjs +10 -0
  27. package/es/packages/mobile/src/components/form/search/Search.vue.mjs +159 -15
  28. package/es/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.mjs +1 -1
  29. package/es/packages/mobile/src/components/navigation/navBar/NavBar.vue.mjs +13 -3
  30. package/es/packages/mobile/src/components/navigation/navBar/index.mjs +2 -2
  31. package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +8 -4
  32. package/es/packages/mobile/src/components/navigation/tabbar/index.mjs +2 -2
  33. package/es/packages/mobile/src/index.vue.mjs +138 -0
  34. package/es/packages/mobile/src/page.vue.mjs +117 -0
  35. package/es/packages/mobile/src/utils/eventBus.mjs +5 -0
  36. package/es/packages/mobile/src/utils/pageHistory.mjs +111 -0
  37. package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +3 -2
  38. package/es/packages/vue/src/components/forms/cascader/Cascader.vue.mjs +1 -1
  39. package/es/packages/vue/src/components/forms/form/validation.mjs +1 -1
  40. package/es/packages/vue/src/utils/parseFilterConfig.mjs +25 -0
  41. package/lib/designer/package.json.js +1 -1
  42. package/lib/designer/src/components/DocumentParam.vue.js +1 -1
  43. package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
  44. package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
  45. package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
  46. package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
  47. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  48. package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
  49. package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
  50. package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
  51. package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
  52. package/lib/designer/src/packages/prod/index.vue.js +1 -1
  53. package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
  54. package/lib/designer.css +554 -23
  55. package/lib/packages/mobile/index.js +94 -86
  56. package/lib/packages/mobile/src/api/index.js +8 -0
  57. package/lib/packages/mobile/src/components/all.js +92 -86
  58. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +17 -3
  59. package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +14 -0
  60. package/lib/packages/mobile/src/components/dataDisplay/dataStat/index.js +10 -0
  61. package/lib/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.js +123 -0
  62. package/lib/packages/mobile/src/components/dataDisplay/menuGrid/index.js +7 -0
  63. package/lib/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.js +97 -15
  64. package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +18 -3
  65. package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +248 -0
  66. package/lib/packages/mobile/src/components/feedback/quickFilter/index.js +10 -0
  67. package/lib/packages/mobile/src/components/form/search/Search.vue.js +158 -14
  68. package/lib/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.js +1 -1
  69. package/lib/packages/mobile/src/components/navigation/navBar/NavBar.vue.js +13 -3
  70. package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +8 -4
  71. package/lib/packages/mobile/src/index.vue.js +138 -0
  72. package/lib/packages/mobile/src/page.vue.js +117 -0
  73. package/lib/packages/mobile/src/utils/eventBus.js +5 -0
  74. package/lib/packages/mobile/src/utils/pageHistory.js +111 -0
  75. package/lib/packages/vue/src/components/details/footer/Footer.vue.js +3 -2
  76. package/lib/packages/vue/src/components/forms/cascader/Cascader.vue.js +1 -1
  77. package/lib/packages/vue/src/components/forms/form/validation.js +1 -1
  78. package/lib/packages/vue/src/utils/parseFilterConfig.js +25 -0
  79. package/package.json +1 -1
@@ -4,22 +4,104 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
4
4
  ;/* empty css */
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
7
9
  const Vue = require("vue");
10
+ ;/* empty css */
8
11
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
9
12
  const index = require("../../../../node_modules/vant/es/notice-bar/index.js");
10
- const _sfc_main = {};
11
- function _sfc_render(_ctx, _cache) {
12
- const _component_van_notice_bar = index.NoticeBar;
13
- return Vue.openBlock(), Vue.createBlock(_component_van_notice_bar, Vue.normalizeProps(Vue.guardReactiveProps(_ctx.$attrs)), Vue.createSlots({ _: 2 }, [
14
- Vue.renderList(_ctx.$slots, (item, key) => {
15
- return {
16
- name: key,
17
- fn: Vue.withCtx(() => [
18
- Vue.renderSlot(_ctx.$slots, key)
19
- ])
20
- };
21
- })
22
- ]), 1040);
23
- }
24
- const _NoticeBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
13
+ const index$1 = require("../../../../node_modules/vant/es/swipe/index.js");
14
+ const index$2 = require("../../../../node_modules/vant/es/swipe-item/index.js");
15
+ const _hoisted_1 = { class: "notice-wrap" };
16
+ const _hoisted_2 = { class: "notice-label" };
17
+ const _hoisted_3 = ["src"];
18
+ const _hoisted_4 = {
19
+ key: 1,
20
+ class: "label-text"
21
+ };
22
+ const _hoisted_5 = { class: "notice-title" };
23
+ const _hoisted_6 = { class: "title-text" };
24
+ const _hoisted_7 = { class: "notice-time" };
25
+ const _sfc_main = {
26
+ __name: "NoticeBar",
27
+ props: {
28
+ labelImage: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ noticeList: {
33
+ type: Array,
34
+ default: () => [
35
+ {
36
+ title: "集团公告 客研体系和品牌升级项目定义会...",
37
+ time: "2020-09-02 11:31"
38
+ },
39
+ {
40
+ title: "关于中秋节放假安排的通知...",
41
+ time: "2020-09-01 09:00"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ setup(__props) {
47
+ return (_ctx, _cache) => {
48
+ const _component_van_swipe_item = index$2.SwipeItem;
49
+ const _component_van_swipe = index$1.Swipe;
50
+ const _component_van_notice_bar = index.NoticeBar;
51
+ return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
52
+ Vue.createVNode(_component_van_notice_bar, {
53
+ scrollable: false,
54
+ class: "notice-bar",
55
+ background: "#FFF"
56
+ }, {
57
+ "left-icon": Vue.withCtx(() => [
58
+ Vue.createElementVNode("div", _hoisted_2, [
59
+ Vue.renderSlot(_ctx.$slots, "label-image", {}, () => [
60
+ __props.labelImage ? (Vue.openBlock(), Vue.createElementBlock("img", {
61
+ key: 0,
62
+ src: __props.labelImage,
63
+ class: "label-img"
64
+ }, null, 8, _hoisted_3)) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_4, _cache[0] || (_cache[0] = [
65
+ Vue.createElementVNode("span", { class: "text-top" }, "公告", -1),
66
+ Vue.createElementVNode("span", { class: "text-bottom" }, "事项", -1)
67
+ ])))
68
+ ], true)
69
+ ]),
70
+ _cache[1] || (_cache[1] = Vue.createElementVNode("div", { class: "divider" }, null, -1))
71
+ ]),
72
+ default: Vue.withCtx(() => [
73
+ Vue.createVNode(_component_van_swipe, {
74
+ vertical: "",
75
+ class: "notice-swipe",
76
+ autoplay: 3e3,
77
+ touchable: false,
78
+ "show-indicators": false
79
+ }, {
80
+ default: Vue.withCtx(() => [
81
+ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.noticeList, (item, index2) => {
82
+ return Vue.openBlock(), Vue.createBlock(_component_van_swipe_item, {
83
+ key: index2,
84
+ class: "notice-item"
85
+ }, {
86
+ default: Vue.withCtx(() => [
87
+ Vue.createElementVNode("div", _hoisted_5, [
88
+ _cache[2] || (_cache[2] = Vue.createElementVNode("span", { class: "dot" }, null, -1)),
89
+ Vue.createElementVNode("span", _hoisted_6, Vue.toDisplayString(item.title), 1)
90
+ ]),
91
+ Vue.createElementVNode("div", _hoisted_7, Vue.toDisplayString(item.time), 1)
92
+ ]),
93
+ _: 2
94
+ }, 1024);
95
+ }), 128))
96
+ ]),
97
+ _: 1
98
+ })
99
+ ]),
100
+ _: 3
101
+ })
102
+ ]);
103
+ };
104
+ }
105
+ };
106
+ const _NoticeBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2b72b4f6"]]);
25
107
  exports.default = _NoticeBar;
@@ -129,6 +129,14 @@ const _sfc_main = {
129
129
  filterPlaceholder: {
130
130
  type: String,
131
131
  default: ""
132
+ },
133
+ filterMode: {
134
+ type: String,
135
+ default: ""
136
+ },
137
+ quickFilter: {
138
+ type: Array,
139
+ default: []
132
140
  }
133
141
  },
134
142
  emits: [
@@ -429,6 +437,10 @@ const _sfc_main = {
429
437
  call();
430
438
  }
431
439
  }
440
+ const quickFilterConfig = Vue.computed(() => {
441
+ const list = props.quickFilter.map((fieldName) => props.columns.find((col) => col.fieldName == fieldName)).filter(Boolean);
442
+ return list;
443
+ });
432
444
  return (_ctx, _cache) => {
433
445
  const _component_fec_mobile_search = Vue.resolveComponent("fec-mobile-search");
434
446
  const _component_van_list = index$3.List;
@@ -436,8 +448,11 @@ const _sfc_main = {
436
448
  return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
437
449
  __props.enableFilter ? (Vue.openBlock(), Vue.createBlock(_component_fec_mobile_search, {
438
450
  key: 0,
439
- placeholder: __props.filterPlaceholder
440
- }, null, 8, ["placeholder"])) : Vue.createCommentVNode("", true),
451
+ placeholder: __props.filterPlaceholder,
452
+ filterMode: __props.filterMode,
453
+ dataSources: __props.dataSources,
454
+ filterConfig: Vue.unref(quickFilterConfig)
455
+ }, null, 8, ["placeholder", "filterMode", "dataSources", "filterConfig"])) : Vue.createCommentVNode("", true),
441
456
  Vue.createVNode(_component_van_cell_group, {
442
457
  class: Vue.normalizeClass(["mTableContent", {
443
458
  notAutoHeight: !__props.autoHeight,
@@ -561,5 +576,5 @@ const _sfc_main = {
561
576
  };
562
577
  }
563
578
  };
564
- const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f2f747af"]]);
579
+ const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ee91bb34"]]);
565
580
  exports.default = _Table;
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
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
+ ;/* empty css */
12
+ ;/* empty css */
13
+ const Vue = require("vue");
14
+ ;/* empty css */
15
+ const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
16
+ const index = require("../../../../node_modules/vant/es/dropdown-menu/index.js");
17
+ const index$1 = require("../../../../node_modules/vant/es/dropdown-item/index.js");
18
+ const index$2 = require("../../../../node_modules/vant/es/button/index.js");
19
+ const _hoisted_1 = { class: "dropdown-title" };
20
+ const _hoisted_2 = {
21
+ key: 0,
22
+ class: "title-badge"
23
+ };
24
+ const _hoisted_3 = { class: "filter-container" };
25
+ const _hoisted_4 = { class: "tag-list" };
26
+ const _hoisted_5 = ["onClick"];
27
+ const _hoisted_6 = { class: "filter-footer" };
28
+ const _hoisted_7 = { class: "filter-container" };
29
+ const _hoisted_8 = { class: "group-title" };
30
+ const _hoisted_9 = { class: "tag-list" };
31
+ const _hoisted_10 = ["onClick"];
32
+ const _hoisted_11 = { class: "filter-footer" };
33
+ const _sfc_main = {
34
+ __name: "QuickFilter",
35
+ props: {
36
+ filterData: {
37
+ type: Array,
38
+ default: () => []
39
+ }
40
+ },
41
+ emits: ["change"],
42
+ setup(__props, { emit: __emit }) {
43
+ const props = __props;
44
+ const emit = __emit;
45
+ const activeSelections = Vue.ref({});
46
+ const confirmedSelections = Vue.ref({});
47
+ const itemRefs = Vue.ref({});
48
+ const isOptionSelected = (fieldName, value) => {
49
+ var _a;
50
+ return ((_a = activeSelections.value[fieldName]) == null ? void 0 : _a.includes(value)) || false;
51
+ };
52
+ const getConfirmedCount = (fieldName) => {
53
+ var _a;
54
+ return ((_a = confirmedSelections.value[fieldName]) == null ? void 0 : _a.length) || 0;
55
+ };
56
+ const toggleOption = (fieldName, value) => {
57
+ if (!activeSelections.value[fieldName]) {
58
+ activeSelections.value[fieldName] = [];
59
+ }
60
+ const filter = props.filterData.find((f) => f.fieldName === fieldName);
61
+ const isMultiple = (filter == null ? void 0 : filter.dataType) === "multiple";
62
+ if (isMultiple) {
63
+ const idx = activeSelections.value[fieldName].indexOf(value);
64
+ if (idx > -1) {
65
+ activeSelections.value[fieldName].splice(idx, 1);
66
+ } else {
67
+ activeSelections.value[fieldName].push(value);
68
+ }
69
+ } else {
70
+ activeSelections.value[fieldName] = [value];
71
+ }
72
+ };
73
+ const getSelectedLabel = (filter) => {
74
+ var _a;
75
+ const selected = (_a = confirmedSelections.value[filter.fieldName]) == null ? void 0 : _a[0];
76
+ if (selected) {
77
+ const option = filter.options.find((o) => o.value === selected);
78
+ return (option == null ? void 0 : option.label) || "";
79
+ }
80
+ return "";
81
+ };
82
+ const resetFilter = (fieldName) => {
83
+ activeSelections.value[fieldName] = [];
84
+ };
85
+ const confirmFilter = (fieldName) => {
86
+ var _a;
87
+ confirmedSelections.value[fieldName] = [
88
+ ...activeSelections.value[fieldName] || []
89
+ ];
90
+ (_a = itemRefs.value[fieldName]) == null ? void 0 : _a.toggle();
91
+ emitChange();
92
+ };
93
+ const allFilterRef = Vue.ref(null);
94
+ const resetAllFilters = () => {
95
+ props.filterData.forEach((filter) => {
96
+ activeSelections.value[filter.fieldName] = [];
97
+ });
98
+ };
99
+ const confirmAllFilters = () => {
100
+ var _a;
101
+ props.filterData.forEach((filter) => {
102
+ confirmedSelections.value[filter.fieldName] = [
103
+ ...activeSelections.value[filter.fieldName] || []
104
+ ];
105
+ });
106
+ (_a = allFilterRef.value) == null ? void 0 : _a.toggle();
107
+ emitChange();
108
+ };
109
+ const dropdownItemOpen = (fieldName) => {
110
+ activeSelections.value[fieldName] = [
111
+ ...confirmedSelections.value[fieldName] || []
112
+ ];
113
+ };
114
+ const emitChange = () => {
115
+ const result = [];
116
+ props.filterData.forEach((filter) => {
117
+ const values = confirmedSelections.value[filter.fieldName] || [];
118
+ if (values.length > 0) {
119
+ result.push({
120
+ fieldName: filter.fieldName,
121
+ label: filter.label,
122
+ dataType: filter.dataType,
123
+ values
124
+ });
125
+ }
126
+ });
127
+ emit("change", result);
128
+ };
129
+ return (_ctx, _cache) => {
130
+ const _component_van_button = index$2.Button;
131
+ const _component_van_dropdown_item = index$1.DropdownItem;
132
+ const _component_van_dropdown_menu = index.DropdownMenu;
133
+ return __props.filterData.length > 0 ? (Vue.openBlock(), Vue.createBlock(_component_van_dropdown_menu, {
134
+ key: 0,
135
+ "auto-locate": "",
136
+ class: "fec-quick-filter"
137
+ }, {
138
+ default: Vue.withCtx(() => [
139
+ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.filterData, (filter, index2) => {
140
+ return Vue.openBlock(), Vue.createBlock(_component_van_dropdown_item, {
141
+ key: `${filter.label}-${index2}`,
142
+ ref_for: true,
143
+ ref: (el) => Vue.unref(itemRefs)[filter.fieldName] = el,
144
+ onOpen: ($event) => dropdownItemOpen(filter.fieldName)
145
+ }, {
146
+ title: Vue.withCtx(() => [
147
+ Vue.createElementVNode("span", _hoisted_1, [
148
+ Vue.createTextVNode(Vue.toDisplayString(filter.dataType === "select" ? getSelectedLabel(filter) || filter.label : filter.label) + " ", 1),
149
+ filter.dataType === "multiple" && getConfirmedCount(filter.fieldName) > 0 ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_2, Vue.toDisplayString(getConfirmedCount(filter.fieldName)), 1)) : Vue.createCommentVNode("", true)
150
+ ])
151
+ ]),
152
+ default: Vue.withCtx(() => [
153
+ Vue.createElementVNode("div", _hoisted_3, [
154
+ Vue.createElementVNode("div", _hoisted_4, [
155
+ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(filter.options, (item) => {
156
+ return Vue.openBlock(), Vue.createElementBlock("div", {
157
+ key: item.id || item.value,
158
+ class: Vue.normalizeClass(["tag-item", { active: isOptionSelected(filter.fieldName, item.value) }]),
159
+ onClick: ($event) => toggleOption(filter.fieldName, item.value)
160
+ }, Vue.toDisplayString(item.label), 11, _hoisted_5);
161
+ }), 128))
162
+ ]),
163
+ Vue.createElementVNode("div", _hoisted_6, [
164
+ Vue.createVNode(_component_van_button, {
165
+ size: "small",
166
+ onClick: ($event) => resetFilter(filter.fieldName)
167
+ }, {
168
+ default: Vue.withCtx(() => _cache[0] || (_cache[0] = [
169
+ Vue.createTextVNode("重置")
170
+ ])),
171
+ _: 2
172
+ }, 1032, ["onClick"]),
173
+ Vue.createVNode(_component_van_button, {
174
+ type: "primary",
175
+ size: "small",
176
+ onClick: ($event) => confirmFilter(filter.fieldName)
177
+ }, {
178
+ default: Vue.withCtx(() => _cache[1] || (_cache[1] = [
179
+ Vue.createTextVNode("确定")
180
+ ])),
181
+ _: 2
182
+ }, 1032, ["onClick"])
183
+ ])
184
+ ])
185
+ ]),
186
+ _: 2
187
+ }, 1032, ["onOpen"]);
188
+ }), 128)),
189
+ __props.filterData.length > 0 ? (Vue.openBlock(), Vue.createBlock(_component_van_dropdown_item, {
190
+ key: 0,
191
+ ref_key: "allFilterRef",
192
+ ref: allFilterRef,
193
+ title: "全部筛选"
194
+ }, {
195
+ default: Vue.withCtx(() => [
196
+ Vue.createElementVNode("div", _hoisted_7, [
197
+ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.filterData, (filter, index2) => {
198
+ return Vue.openBlock(), Vue.createElementBlock("div", {
199
+ key: `all-${filter.label}-${index2}`,
200
+ class: "filter-group"
201
+ }, [
202
+ Vue.createElementVNode("h3", _hoisted_8, Vue.toDisplayString(filter.label), 1),
203
+ Vue.createElementVNode("div", _hoisted_9, [
204
+ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(filter.options, (item, optIndex) => {
205
+ return Vue.openBlock(), Vue.createElementBlock("div", {
206
+ key: `${filter.label}-${item.value}-${optIndex}`,
207
+ class: Vue.normalizeClass(["tag-item", {
208
+ active: isOptionSelected(filter.fieldName, item.value)
209
+ }]),
210
+ onClick: ($event) => toggleOption(filter.fieldName, item.value)
211
+ }, Vue.toDisplayString(item.label), 11, _hoisted_10);
212
+ }), 128))
213
+ ])
214
+ ]);
215
+ }), 128)),
216
+ Vue.createElementVNode("div", _hoisted_11, [
217
+ Vue.createVNode(_component_van_button, {
218
+ size: "small",
219
+ onClick: resetAllFilters
220
+ }, {
221
+ default: Vue.withCtx(() => _cache[2] || (_cache[2] = [
222
+ Vue.createTextVNode("重置")
223
+ ])),
224
+ _: 1
225
+ }),
226
+ Vue.createVNode(_component_van_button, {
227
+ type: "primary",
228
+ size: "small",
229
+ onClick: confirmAllFilters
230
+ }, {
231
+ default: Vue.withCtx(() => _cache[3] || (_cache[3] = [
232
+ Vue.createTextVNode("确定")
233
+ ])),
234
+ _: 1
235
+ })
236
+ ])
237
+ ])
238
+ ]),
239
+ _: 1
240
+ }, 512)) : Vue.createCommentVNode("", true)
241
+ ]),
242
+ _: 1
243
+ })) : Vue.createCommentVNode("", true);
244
+ };
245
+ }
246
+ };
247
+ const QuickFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3e7ddf36"]]);
248
+ exports.default = QuickFilter;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const QuickFilter = require("./QuickFilter.vue.js");
4
+ const install = require("../../../utils/install.js");
5
+ const MobileQuickFilter = install.default.withInstall(
6
+ "MobileQuickFilter",
7
+ QuickFilter.default
8
+ );
9
+ exports.MobileQuickFilter = MobileQuickFilter;
10
+ exports.default = MobileQuickFilter;
@@ -7,6 +7,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
7
7
  ;/* empty css */
8
8
  ;/* empty css */
9
9
  const Vue = require("vue");
10
+ const datasource = require("../../../utils/datasource.js");
11
+ const QuickFilter = require("../../feedback/quickFilter/QuickFilter.vue.js");
10
12
  const index = require("../../../../node_modules/vant/es/search/index.js");
11
13
  const _sfc_main = {
12
14
  __name: "Search",
@@ -14,29 +16,171 @@ const _sfc_main = {
14
16
  placeholder: {
15
17
  type: String,
16
18
  default: ""
19
+ },
20
+ filterMode: {
21
+ type: String,
22
+ default: "input"
23
+ },
24
+ dataSources: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ filterConfig: {
29
+ type: Array,
30
+ default: () => []
17
31
  }
18
32
  },
19
- setup(__props) {
20
- const showAction = Vue.ref(false);
33
+ emits: ["filterChange"],
34
+ setup(__props, { emit: __emit }) {
35
+ const props = __props;
36
+ const emit = __emit;
37
+ const currentInstance = Vue.getCurrentInstance();
38
+ const ctx = currentInstance.proxy;
39
+ const searchData = Vue.ref("");
21
40
  function onClickFilter() {
22
- showAction.value = true;
41
+ }
42
+ function onClickButton() {
43
+ onSearch(searchData.value);
23
44
  }
24
45
  function onSearch(val) {
25
46
  }
26
- function onCancel() {
27
- showAction.value = false;
47
+ function onQuickFilterChange(result) {
48
+ console.log("筛选数据:", result);
49
+ emit("filterChange", result);
28
50
  }
51
+ const filterData = Vue.ref([]);
52
+ const fieldDataSources = /* @__PURE__ */ new Set();
53
+ const dictionaryKeys = /* @__PURE__ */ new Set();
54
+ const dataSourceOptions = Vue.ref({});
55
+ const dictionaryOptions = Vue.ref({});
56
+ const loadFieldDataSources = async () => {
57
+ var _a, _b;
58
+ const optionsDatas = [];
59
+ const fields = props.filterConfig;
60
+ for (const component of fields) {
61
+ const { optionSource, dataSourceValue, dictionaryValue } = component.optionConfig;
62
+ if (optionSource === "dataSource" && dataSourceValue) {
63
+ fieldDataSources.add(dataSourceValue);
64
+ } else if (optionSource === "dictionary" && dictionaryValue) {
65
+ dictionaryKeys.add(dictionaryValue);
66
+ }
67
+ }
68
+ for (const dataSourceId of fieldDataSources) {
69
+ if (dataSourceOptions.value[dataSourceId]) continue;
70
+ try {
71
+ const dsManager = datasource.createDataSource({
72
+ http: ctx.$http,
73
+ dataSources: props.dataSources,
74
+ currentDataSourceId: dataSourceId
75
+ });
76
+ const data = await dsManager.fetch();
77
+ let options = [];
78
+ if (Array.isArray(data)) {
79
+ options = data;
80
+ } else if (typeof data === "object") {
81
+ options = Array.isArray(data.data) ? data.data : ((_a = data.data) == null ? void 0 : _a.records) || ((_b = data.data) == null ? void 0 : _b.list) || [];
82
+ }
83
+ dataSourceOptions.value[dataSourceId] = options;
84
+ dsManager.destroy();
85
+ } catch (error) {
86
+ console.error(`Failed to load data source ${dataSourceId}:`, error);
87
+ }
88
+ }
89
+ if (dictionaryKeys.size > 0) {
90
+ try {
91
+ const keyName = Array.from(dictionaryKeys).join(",");
92
+ const response = await ctx.$http.postForm(
93
+ "/base-server/parm/sysParmDic/getDicListByKey",
94
+ {
95
+ keyName
96
+ }
97
+ );
98
+ const dictionaryData = response;
99
+ if (typeof dictionaryData === "object") {
100
+ Object.keys(dictionaryData).forEach((dictKey) => {
101
+ if (dictionaryKeys.has(dictKey)) {
102
+ const dictItems = dictionaryData[dictKey];
103
+ if (Array.isArray(dictItems)) {
104
+ dictionaryOptions.value[dictKey] = dictItems;
105
+ }
106
+ }
107
+ });
108
+ }
109
+ } catch (error) {
110
+ console.error("Failed to load dictionary data:", error);
111
+ }
112
+ }
113
+ fields.forEach((component) => {
114
+ if (!component.optionConfig) return;
115
+ let options = [];
116
+ const {
117
+ optionSource,
118
+ dataSourceValue,
119
+ dictionaryValue,
120
+ displayField,
121
+ valueField,
122
+ idField,
123
+ pidField
124
+ } = component.optionConfig;
125
+ if (optionSource === "dataSource" && dataSourceOptions.value[dataSourceValue]) {
126
+ const rawOptions = dataSourceOptions.value[dataSourceValue];
127
+ const labelField = displayField || "label";
128
+ const keyField = valueField || "value";
129
+ options = rawOptions.map((item) => ({
130
+ label: item[labelField],
131
+ value: item[keyField],
132
+ ...item
133
+ }));
134
+ optionsDatas.push({ ...component, options });
135
+ } else if (optionSource === "dictionary" && dictionaryOptions.value[dictionaryValue]) {
136
+ const rawOptions = dictionaryOptions.value[dictionaryValue];
137
+ const labelField = "optName";
138
+ const keyField = "optCode";
139
+ options = rawOptions.map((item) => ({
140
+ label: item[labelField],
141
+ value: item[keyField]
142
+ }));
143
+ optionsDatas.push({ ...component, options });
144
+ } else if (optionSource === "custom") {
145
+ optionsDatas.push({
146
+ ...component,
147
+ options: component.optionConfig.options || []
148
+ });
149
+ }
150
+ });
151
+ filterData.value = [...optionsDatas];
152
+ };
153
+ Vue.watch(
154
+ () => props.filterConfig.map((item) => ({
155
+ label: item.label
156
+ })),
157
+ () => {
158
+ loadFieldDataSources();
159
+ },
160
+ { deep: true, immediate: true }
161
+ );
29
162
  return (_ctx, _cache) => {
30
163
  const _component_van_search = index.Search;
31
- return Vue.openBlock(), Vue.createBlock(_component_van_search, {
32
- shape: "round",
33
- placeholder: __props.placeholder,
34
- "show-action": Vue.unref(showAction),
35
- clearable: "",
36
- onSearch,
37
- onCancel,
38
- onClickInput: onClickFilter
39
- }, null, 8, ["placeholder", "show-action"]);
164
+ return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
165
+ Vue.createVNode(_component_van_search, {
166
+ modelValue: Vue.unref(searchData),
167
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(searchData) ? searchData.value = $event : null),
168
+ shape: "round",
169
+ placeholder: __props.placeholder,
170
+ "show-action": __props.filterMode == "input",
171
+ clearable: "",
172
+ onClickInput: _cache[1] || (_cache[1] = Vue.withModifiers(($event) => __props.filterMode == "router" && onClickFilter, ["stop"]))
173
+ }, {
174
+ action: Vue.withCtx(() => [
175
+ Vue.createElementVNode("div", { onClick: onClickButton }, "搜索")
176
+ ]),
177
+ _: 1
178
+ }, 8, ["modelValue", "placeholder", "show-action"]),
179
+ Vue.createVNode(QuickFilter.default, {
180
+ "filter-data": Vue.unref(filterData),
181
+ onChange: onQuickFilterChange
182
+ }, null, 8, ["filter-data"])
183
+ ], 64);
40
184
  };
41
185
  }
42
186
  };
@@ -38,5 +38,5 @@ const _sfc_main = {
38
38
  };
39
39
  }
40
40
  };
41
- const _ActionBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-44eb199a"]]);
41
+ const _ActionBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ac26522e"]]);
42
42
  exports.default = _ActionBar;
@@ -5,6 +5,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
7
  const Vue = require("vue");
8
+ const pageHistory = require("../../../utils/pageHistory.js");
9
+ const eventBus = require("../../../utils/eventBus.js");
10
+ ;/* empty css */
11
+ const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
8
12
  const index = require("../../../../node_modules/vant/es/nav-bar/index.js");
9
13
  const _sfc_main = {
10
14
  __name: "NavBar",
@@ -27,7 +31,12 @@ const _sfc_main = {
27
31
  }
28
32
  },
29
33
  setup(__props) {
30
- const onClickLeft = () => history.back();
34
+ const onClickLeft = () => {
35
+ const prevPage = pageHistory.pageHistory.back();
36
+ if (prevPage) {
37
+ eventBus.default.emit("loadPage", prevPage.id);
38
+ }
39
+ };
31
40
  return (_ctx, _cache) => {
32
41
  const _component_van_nav_bar = index.NavBar;
33
42
  return Vue.openBlock(), Vue.createBlock(_component_van_nav_bar, Vue.mergeProps(_ctx.$attrs, {
@@ -43,7 +52,7 @@ const _sfc_main = {
43
52
  return {
44
53
  name: key,
45
54
  fn: Vue.withCtx(() => [
46
- Vue.renderSlot(_ctx.$slots, key)
55
+ Vue.renderSlot(_ctx.$slots, key, {}, void 0, true)
47
56
  ])
48
57
  };
49
58
  })
@@ -51,4 +60,5 @@ const _sfc_main = {
51
60
  };
52
61
  }
53
62
  };
54
- exports.default = _sfc_main;
63
+ const _NavBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f6340561"]]);
64
+ exports.default = _NavBar;