@fecp/designer 5.5.120 → 5.6.1
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/assets/logo.png.mjs +1 -1
- package/es/designer/src/components/EventConfigButton.vue.mjs +2 -2
- package/es/designer/src/packages/dataSource/index.vue.mjs +3 -3
- package/es/designer/src/packages/dialog/index.vue2.mjs +15 -15
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +15 -16
- package/es/designer/src/packages/event/pageEvent.vue.mjs +1 -1
- package/es/designer/src/packages/form/index.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/contract.vue.mjs +15 -1
- package/es/designer/src/packages/form/property/pageFooterBtn.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/pageHeaderBtn.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/widgets.vue.mjs +4 -4
- package/es/designer/src/packages/table/property/customBtn.vue.mjs +2 -2
- package/es/designer/src/packages/table/property/optBtn.vue.mjs +2 -2
- package/es/designer/src/packages/table/property/widgets.vue.mjs +2 -2
- package/es/designer.css +611 -520
- package/es/logo.ico +0 -0
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/api/index.mjs +1 -1
- package/es/packages/mobile/src/assets/images/baseRate.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/home-bg.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/rentCalc.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/user.png.mjs +4 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +63 -44
- package/es/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.mjs +9 -5
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +134 -71
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.mjs +3 -3
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +36 -26
- package/es/packages/mobile/src/components/custom/customCode/CustomCode.vue.mjs +60 -0
- package/es/packages/mobile/src/components/custom/customCode/index.mjs +10 -0
- package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +3 -3
- package/es/packages/mobile/src/components/custom/userSelect/UserSelect.vue.mjs +3 -3
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +189 -8
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +109 -47
- package/es/packages/mobile/src/components/dataDisplay/mine/Mine.vue.mjs +33 -9
- package/es/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.mjs +39 -79
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +10 -2
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +167 -32
- package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +3 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +13 -15
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +10 -10
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +7 -23
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +14 -26
- package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +14 -15
- package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +6 -19
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +9 -25
- package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +8 -24
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +16 -7
- package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +13 -5
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +61 -26
- package/es/packages/mobile/src/index.vue.mjs +21 -4
- package/es/packages/mobile/src/page.vue.mjs +342 -138
- package/es/packages/mobile/src/utils/common.mjs +21 -0
- package/es/packages/mobile/src/utils/datasource.mjs +4 -4
- package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +35 -22
- package/es/packages/mobile/src/utils/formatterUtil.mjs +4 -24
- package/es/packages/mobile/src/utils/formulajs/calculate.mjs +11 -5
- package/es/packages/mobile/src/utils/optionUtil.mjs +4 -29
- package/es/packages/mobile/src/utils/pageHistory.mjs +16 -0
- package/es/packages/mobile/src/utils/validation.mjs +129 -0
- package/es/packages/vue/src/components/bus/contract/Contract.vue.mjs +12 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +5 -2
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +3 -2
- package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +20 -26
- package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +2 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +5 -2
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +10 -8
- package/es/packages/vue/src/directive/auth.mjs +2 -1
- package/es/packages/vue/src/utils/parseRouteParams.mjs +2 -2
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/assets/logo.png.js +1 -1
- package/lib/designer/src/components/EventConfigButton.vue.js +2 -2
- package/lib/designer/src/packages/dataSource/index.vue.js +3 -3
- package/lib/designer/src/packages/dialog/index.vue2.js +15 -15
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +15 -16
- package/lib/designer/src/packages/event/pageEvent.vue.js +1 -1
- package/lib/designer/src/packages/form/index.vue.js +2 -2
- package/lib/designer/src/packages/form/property/contract.vue.js +15 -1
- package/lib/designer.css +611 -520
- package/lib/logo.ico +0 -0
- package/lib/packages/mobile/index.js +4 -2
- package/lib/packages/mobile/src/api/index.js +1 -1
- package/lib/packages/mobile/src/assets/images/baseRate.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/home-bg.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/rentCalc.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/user.png.js +4 -0
- package/lib/packages/mobile/src/components/all.js +2 -0
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +62 -43
- package/lib/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.js +9 -5
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +137 -74
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.js +3 -3
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +36 -26
- package/lib/packages/mobile/src/components/custom/customCode/CustomCode.vue.js +60 -0
- package/lib/packages/mobile/src/components/custom/customCode/index.js +10 -0
- package/lib/packages/mobile/src/components/custom/document/Document.vue.js +3 -3
- package/lib/packages/mobile/src/components/custom/userSelect/UserSelect.vue.js +3 -3
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +189 -8
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +109 -47
- package/lib/packages/mobile/src/components/dataDisplay/mine/Mine.vue.js +38 -14
- package/lib/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.js +39 -79
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +10 -2
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +165 -30
- package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +3 -2
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +13 -15
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +9 -9
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +6 -22
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +13 -25
- package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +13 -14
- package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +6 -19
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +8 -24
- package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +7 -23
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +16 -7
- package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +2 -2
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +13 -5
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +64 -29
- package/lib/packages/mobile/src/index.vue.js +20 -3
- package/lib/packages/mobile/src/page.vue.js +341 -137
- package/lib/packages/mobile/src/utils/common.js +21 -0
- package/lib/packages/mobile/src/utils/datasource.js +4 -4
- package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +35 -22
- package/lib/packages/mobile/src/utils/formatterUtil.js +3 -23
- package/lib/packages/mobile/src/utils/formulajs/calculate.js +11 -5
- package/lib/packages/mobile/src/utils/optionUtil.js +3 -28
- package/lib/packages/mobile/src/utils/pageHistory.js +16 -0
- package/lib/packages/mobile/src/utils/validation.js +129 -0
- package/lib/packages/vue/src/components/bus/contract/Contract.vue.js +12 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +5 -2
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +3 -2
- package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +20 -26
- package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +2 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +5 -2
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +10 -8
- package/lib/packages/vue/src/directive/auth.js +2 -1
- package/lib/packages/vue/src/utils/parseRouteParams.js +2 -2
- package/package.json +1 -1
|
@@ -89,8 +89,8 @@ const _sfc_main = {
|
|
|
89
89
|
const errorRef = taskStatus == "0" ? todoError : taskStatus == "1" ? doneError : ccError;
|
|
90
90
|
errorRef.value = false;
|
|
91
91
|
const pageNo = taskStatus == "0" ? todoPageNo : taskStatus == "1" ? donePageNo : ccPageNo;
|
|
92
|
-
ctx.$http.
|
|
93
|
-
"/base
|
|
92
|
+
ctx.$http.postMobile(
|
|
93
|
+
"/" + window.$servers.base + "/flow/workbench/findTaskListByPage",
|
|
94
94
|
{
|
|
95
95
|
pageNo,
|
|
96
96
|
pageSize,
|
|
@@ -99,7 +99,7 @@ const _sfc_main = {
|
|
|
99
99
|
},
|
|
100
100
|
false
|
|
101
101
|
).then((data) => {
|
|
102
|
-
const list = data.list;
|
|
102
|
+
const list = data.list || data;
|
|
103
103
|
switch (taskStatus) {
|
|
104
104
|
case "0":
|
|
105
105
|
list.forEach((item) => {
|
|
@@ -114,14 +114,16 @@ const _sfc_main = {
|
|
|
114
114
|
break;
|
|
115
115
|
case "1":
|
|
116
116
|
list.forEach((item) => {
|
|
117
|
-
if (item
|
|
118
|
-
item.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
if ("isEnd" in item) {
|
|
118
|
+
if (item.isEnd) {
|
|
119
|
+
item.statusColor = "#52c41a";
|
|
120
|
+
item.statusIcon = "checked";
|
|
121
|
+
item.statusText = "已完成";
|
|
122
|
+
} else {
|
|
123
|
+
item.statusColor = "#fa8c16";
|
|
124
|
+
item.statusIcon = "more";
|
|
125
|
+
item.statusText = "进行中";
|
|
126
|
+
}
|
|
125
127
|
}
|
|
126
128
|
});
|
|
127
129
|
doneList.value.push(...list);
|
|
@@ -131,14 +133,16 @@ const _sfc_main = {
|
|
|
131
133
|
break;
|
|
132
134
|
case "2":
|
|
133
135
|
list.forEach((item) => {
|
|
134
|
-
if (item
|
|
135
|
-
item.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
if ("isEnd" in item) {
|
|
137
|
+
if (item.isEnd) {
|
|
138
|
+
item.statusColor = "#52c41a";
|
|
139
|
+
item.statusIcon = "checked";
|
|
140
|
+
item.statusText = "已完成";
|
|
141
|
+
} else {
|
|
142
|
+
item.statusColor = "#fa8c16";
|
|
143
|
+
item.statusIcon = "more";
|
|
144
|
+
item.statusText = "进行中";
|
|
145
|
+
}
|
|
142
146
|
}
|
|
143
147
|
});
|
|
144
148
|
ccList.value.push(...list);
|
|
@@ -149,6 +153,9 @@ const _sfc_main = {
|
|
|
149
153
|
}
|
|
150
154
|
}).catch((err) => {
|
|
151
155
|
errorRef.value = true;
|
|
156
|
+
if (taskStatus == "0") todoPageNo--;
|
|
157
|
+
else if (taskStatus == "1") donePageNo--;
|
|
158
|
+
else ccPageNo--;
|
|
152
159
|
}).finally(() => {
|
|
153
160
|
switch (taskStatus) {
|
|
154
161
|
case "0":
|
|
@@ -249,8 +256,8 @@ const _sfc_main = {
|
|
|
249
256
|
forbidClick: true,
|
|
250
257
|
duration: 0
|
|
251
258
|
});
|
|
252
|
-
ctx.$http.
|
|
253
|
-
"/base
|
|
259
|
+
ctx.$http.postFormMobile(
|
|
260
|
+
"/" + window.$servers.base + "/flow/flowApproveDetail/doAssign",
|
|
254
261
|
{
|
|
255
262
|
taskId: transferItem.value.taskId,
|
|
256
263
|
opNo: ((_a = store.getters.user) == null ? void 0 : _a.opNo) || "",
|
|
@@ -263,6 +270,7 @@ const _sfc_main = {
|
|
|
263
270
|
todoList.value = [];
|
|
264
271
|
todoFinished.value = false;
|
|
265
272
|
todoPageNo = 0;
|
|
273
|
+
emitter.emit("refreshFlowCutNum");
|
|
266
274
|
onTodoLoad();
|
|
267
275
|
});
|
|
268
276
|
}
|
|
@@ -280,12 +288,13 @@ const _sfc_main = {
|
|
|
280
288
|
forbidClick: true,
|
|
281
289
|
duration: 0
|
|
282
290
|
});
|
|
283
|
-
await ctx.$http.
|
|
284
|
-
"/base
|
|
291
|
+
await ctx.$http.postMobile(
|
|
292
|
+
"/" + window.$servers.base + "/flow/flowApproveDetail/undo",
|
|
285
293
|
data,
|
|
286
294
|
false
|
|
287
295
|
);
|
|
288
296
|
showSuccessToast("撤销成功");
|
|
297
|
+
emitter.emit("refreshFlowCutNum");
|
|
289
298
|
} else if (type == "recall") {
|
|
290
299
|
console.log("召回:", item, "原因:", reason);
|
|
291
300
|
showLoadingToast({
|
|
@@ -293,12 +302,13 @@ const _sfc_main = {
|
|
|
293
302
|
forbidClick: true,
|
|
294
303
|
duration: 0
|
|
295
304
|
});
|
|
296
|
-
await ctx.$http.
|
|
297
|
-
"/base
|
|
305
|
+
await ctx.$http.postMobile(
|
|
306
|
+
"/" + window.$servers.base + "/flow/flowApproveDetail/recall",
|
|
298
307
|
data,
|
|
299
308
|
false
|
|
300
309
|
);
|
|
301
310
|
showSuccessToast("召回成功");
|
|
311
|
+
emitter.emit("refreshFlowCutNum");
|
|
302
312
|
}
|
|
303
313
|
onSearch();
|
|
304
314
|
}
|
|
@@ -570,7 +580,7 @@ const _sfc_main = {
|
|
|
570
580
|
};
|
|
571
581
|
}
|
|
572
582
|
};
|
|
573
|
-
const _ApprovalList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
583
|
+
const _ApprovalList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67d02900"]]);
|
|
574
584
|
export {
|
|
575
585
|
_ApprovalList as default
|
|
576
586
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { inject, onMounted, createElementBlock, openBlock, normalizeClass, createVNode } from "vue";
|
|
2
|
+
import VueRender from "../../../utils/idea/VueRender.vue.mjs";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: "CustomCode",
|
|
7
|
+
props: {
|
|
8
|
+
params: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: {}
|
|
11
|
+
},
|
|
12
|
+
vueTemplate: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
autoHeight: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
vueTemplateFunctionMapping: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: []
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const handleEvent = inject("handleEvent");
|
|
28
|
+
inject("formData");
|
|
29
|
+
function eventHandler(funcName, rowData) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const func = props.vueTemplateFunctionMapping.find(
|
|
32
|
+
(item) => item.func == funcName
|
|
33
|
+
);
|
|
34
|
+
if (func && func.eventConfig) {
|
|
35
|
+
(_b = handleEvent.value) == null ? void 0 : _b.call(
|
|
36
|
+
handleEvent,
|
|
37
|
+
rowData,
|
|
38
|
+
func,
|
|
39
|
+
(_a = func.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
});
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createElementBlock("div", {
|
|
47
|
+
class: normalizeClass(["custom-code-wrapper", { isAutoHeight: props.autoHeight }])
|
|
48
|
+
}, [
|
|
49
|
+
createVNode(VueRender, {
|
|
50
|
+
code: __props.vueTemplate,
|
|
51
|
+
params: { data: __props.params, eventHandler }
|
|
52
|
+
}, null, 8, ["code", "params"])
|
|
53
|
+
], 2);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const _CustomCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9a884660"]]);
|
|
58
|
+
export {
|
|
59
|
+
_CustomCode as default
|
|
60
|
+
};
|
|
@@ -131,8 +131,8 @@ const _sfc_main = {
|
|
|
131
131
|
}
|
|
132
132
|
function fetchData() {
|
|
133
133
|
loading.value = true;
|
|
134
|
-
ctx.$http.
|
|
135
|
-
"/base
|
|
134
|
+
ctx.$http.postMobile(
|
|
135
|
+
"/" + window.$servers.base + "/docBusFiletype/getRootTree4Mobile",
|
|
136
136
|
{
|
|
137
137
|
isEdit: false,
|
|
138
138
|
paramList: [
|
|
@@ -361,7 +361,7 @@ const _sfc_main = {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
|
-
const _Document = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
364
|
+
const _Document = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f45752e0"]]);
|
|
365
365
|
export {
|
|
366
366
|
_Document as default
|
|
367
367
|
};
|
|
@@ -163,8 +163,8 @@ const _sfc_main = {
|
|
|
163
163
|
}
|
|
164
164
|
function fetchData(keyword = "") {
|
|
165
165
|
listLoading.value = true;
|
|
166
|
-
ctx.$http.
|
|
167
|
-
"/base
|
|
166
|
+
ctx.$http.postMobile(
|
|
167
|
+
"/" + window.$servers.base + "/mobileApi/findSysUserByPage",
|
|
168
168
|
{
|
|
169
169
|
pageNo: pageNum.value,
|
|
170
170
|
pageSize,
|
|
@@ -314,7 +314,7 @@ const _sfc_main = {
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
-
const _UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
317
|
+
const _UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f74f73d1"]]);
|
|
318
318
|
export {
|
|
319
319
|
_UserSelect as default
|
|
320
320
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { inject, getCurrentInstance, ref, onMounted, computed, resolveComponent, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, createVNode, unref, isRef, withCtx, renderList } from "vue";
|
|
5
5
|
import { createDataSource } from "../../../utils/datasource.mjs";
|
|
6
6
|
import VueRender from "../../../utils/idea/VueRender.vue.mjs";
|
|
7
|
+
import { selectFormatter, multipleFormatter, dateFormatter, textFormatter } from "../../../utils/formatterUtil.mjs";
|
|
7
8
|
/* empty css */
|
|
8
9
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
10
|
import { List } from "../../../../../../node_modules/vant/es/list/index.mjs";
|
|
@@ -16,6 +17,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
16
17
|
type: Object,
|
|
17
18
|
default: {}
|
|
18
19
|
},
|
|
20
|
+
columns: {
|
|
21
|
+
//格式化配置
|
|
22
|
+
type: Array,
|
|
23
|
+
default: []
|
|
24
|
+
},
|
|
19
25
|
fields: {
|
|
20
26
|
type: Array,
|
|
21
27
|
default: []
|
|
@@ -82,9 +88,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
82
88
|
vueTemplateFunctionMapping: {
|
|
83
89
|
type: Array,
|
|
84
90
|
default: []
|
|
91
|
+
},
|
|
92
|
+
dynamicInputFilter: {
|
|
93
|
+
type: Array,
|
|
94
|
+
default: []
|
|
85
95
|
}
|
|
86
96
|
},
|
|
87
|
-
setup(__props) {
|
|
97
|
+
setup(__props, { expose: __expose }) {
|
|
88
98
|
const props = __props;
|
|
89
99
|
const handleEvent = inject("handleEvent");
|
|
90
100
|
const formData = inject("formData");
|
|
@@ -92,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
92
102
|
const ctx = currentInstance.proxy;
|
|
93
103
|
const listRef = ref();
|
|
94
104
|
let isDesigner = false;
|
|
95
|
-
onMounted(() => {
|
|
105
|
+
onMounted(async () => {
|
|
96
106
|
var _a, _b;
|
|
97
107
|
const device = (_b = (_a = listRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.closest(".device-content");
|
|
98
108
|
if (device) {
|
|
@@ -115,8 +125,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
127
|
function dicHandler(dictionaryValue) {
|
|
118
|
-
return ctx.$http.
|
|
119
|
-
"/base
|
|
128
|
+
return ctx.$http.postFormMobile(
|
|
129
|
+
"/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
|
|
120
130
|
{
|
|
121
131
|
keyName: dictionaryValue
|
|
122
132
|
},
|
|
@@ -129,6 +139,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
129
139
|
const loading = ref(false);
|
|
130
140
|
let pageNo = 1;
|
|
131
141
|
const dataSourceManager = ref();
|
|
142
|
+
const formattedColumns = ref(null);
|
|
132
143
|
function initDataSourceManager() {
|
|
133
144
|
dataSourceManager.value = createDataSource({
|
|
134
145
|
http: ctx.$http,
|
|
@@ -169,14 +180,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
169
180
|
loading.value = false;
|
|
170
181
|
}
|
|
171
182
|
}
|
|
183
|
+
const searchData = ref({});
|
|
172
184
|
async function call() {
|
|
173
185
|
var _a;
|
|
186
|
+
if (!formattedColumns.value) {
|
|
187
|
+
await formattedTableData();
|
|
188
|
+
}
|
|
174
189
|
error.value = false;
|
|
175
190
|
try {
|
|
176
191
|
dataSourceManager.value.updatePagination(pageNo, props.pageSize);
|
|
177
|
-
await dataSourceManager.value.fetch();
|
|
192
|
+
await dataSourceManager.value.fetch(searchData.value);
|
|
178
193
|
const data = ((_a = dataSourceManager.value) == null ? void 0 : _a.getData().list) || [];
|
|
179
|
-
tableData.value.push(...data);
|
|
194
|
+
tableData.value.push(...parseTableData(data));
|
|
180
195
|
if (tableData.value.length == 0 && isDesigner) {
|
|
181
196
|
tableData.value = [{}];
|
|
182
197
|
}
|
|
@@ -187,12 +202,177 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
187
202
|
} catch (err) {
|
|
188
203
|
console.error(err);
|
|
189
204
|
error.value = true;
|
|
205
|
+
pageNo--;
|
|
190
206
|
loading.value = false;
|
|
191
207
|
}
|
|
192
208
|
}
|
|
193
209
|
const quickFilterConfig = computed(() => {
|
|
194
210
|
return props.quickFilter;
|
|
195
211
|
});
|
|
212
|
+
function onFilterChange(filter) {
|
|
213
|
+
const dynamicFilterFieldName = props.dynamicInputFilter.map((item) => item.fieldName).join(",");
|
|
214
|
+
searchData.value = {
|
|
215
|
+
filters: JSON.stringify({ ...filter, dynamicFilterFieldName })
|
|
216
|
+
};
|
|
217
|
+
tableData.value = [];
|
|
218
|
+
finished.value = false;
|
|
219
|
+
loading.value = true;
|
|
220
|
+
pageNo = 1;
|
|
221
|
+
call();
|
|
222
|
+
}
|
|
223
|
+
const dataSourceOptions = ref({});
|
|
224
|
+
const dictionaryOptions = ref({});
|
|
225
|
+
async function formattedTableData() {
|
|
226
|
+
var _a, _b;
|
|
227
|
+
const columns = [...props.columns];
|
|
228
|
+
const fieldDataSources = /* @__PURE__ */ new Set();
|
|
229
|
+
const dictionaryKeys = /* @__PURE__ */ new Set();
|
|
230
|
+
for (const col of columns) {
|
|
231
|
+
if (col.dataType == "select" || col.dataType == "multiple") {
|
|
232
|
+
const { optionSource, dataSourceValue, dictionaryValue } = col.optionConfig;
|
|
233
|
+
if (optionSource === "dataSource" && dataSourceValue) {
|
|
234
|
+
fieldDataSources.add(dataSourceValue);
|
|
235
|
+
} else if (optionSource === "dictionary" && dictionaryValue) {
|
|
236
|
+
dictionaryKeys.add(dictionaryValue);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
for (const dataSourceId of fieldDataSources) {
|
|
241
|
+
if (dataSourceOptions.value[dataSourceId]) continue;
|
|
242
|
+
try {
|
|
243
|
+
const dsManager = createDataSource({
|
|
244
|
+
http: ctx.$http,
|
|
245
|
+
dataSources: props.dataSources,
|
|
246
|
+
currentDataSourceId: dataSourceId,
|
|
247
|
+
pagination: false,
|
|
248
|
+
data: (formData == null ? void 0 : formData.value) || {},
|
|
249
|
+
fields: props.fields
|
|
250
|
+
});
|
|
251
|
+
const data = await dsManager.fetch();
|
|
252
|
+
let options = [];
|
|
253
|
+
if (Array.isArray(data)) {
|
|
254
|
+
options = data;
|
|
255
|
+
} else if (typeof data === "object") {
|
|
256
|
+
options = Array.isArray(data.data) ? data.data : ((_a = data.data) == null ? void 0 : _a.records) || ((_b = data.data) == null ? void 0 : _b.list) || [];
|
|
257
|
+
}
|
|
258
|
+
dataSourceOptions.value[dataSourceId] = options;
|
|
259
|
+
dsManager.destroy();
|
|
260
|
+
} catch (error2) {
|
|
261
|
+
console.error(`Failed to load data source ${dataSourceId}:`, error2);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if (dictionaryKeys.size > 0) {
|
|
265
|
+
try {
|
|
266
|
+
const keyName = Array.from(dictionaryKeys).join(",");
|
|
267
|
+
const response = await ctx.$http.postFormMobile(
|
|
268
|
+
"/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
|
|
269
|
+
{
|
|
270
|
+
keyName
|
|
271
|
+
},
|
|
272
|
+
false
|
|
273
|
+
);
|
|
274
|
+
const dictionaryData = response;
|
|
275
|
+
if (typeof dictionaryData === "object") {
|
|
276
|
+
Object.keys(dictionaryData).forEach((dictKey) => {
|
|
277
|
+
if (dictionaryKeys.has(dictKey)) {
|
|
278
|
+
const dictItems = dictionaryData[dictKey];
|
|
279
|
+
if (Array.isArray(dictItems)) {
|
|
280
|
+
dictionaryOptions.value[dictKey] = dictItems;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
} catch (error2) {
|
|
286
|
+
console.error("Failed to load dictionary data:", error2);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
columns.forEach((component) => {
|
|
290
|
+
if (!component.optionConfig) return;
|
|
291
|
+
const {
|
|
292
|
+
optionSource,
|
|
293
|
+
dataSourceValue,
|
|
294
|
+
dictionaryValue,
|
|
295
|
+
displayField,
|
|
296
|
+
valueField,
|
|
297
|
+
idField,
|
|
298
|
+
pidField
|
|
299
|
+
} = component.optionConfig;
|
|
300
|
+
if (optionSource === "dataSource" && dataSourceOptions.value[dataSourceValue]) {
|
|
301
|
+
const rawOptions = dataSourceOptions.value[dataSourceValue];
|
|
302
|
+
const labelField = displayField || "label";
|
|
303
|
+
const keyField = valueField || "value";
|
|
304
|
+
component.optionConfig.options = rawOptions.map((item) => ({
|
|
305
|
+
label: item[labelField],
|
|
306
|
+
value: item[keyField],
|
|
307
|
+
disabled: item.disabled || false,
|
|
308
|
+
...item
|
|
309
|
+
}));
|
|
310
|
+
} else if (optionSource === "dictionary" && dictionaryOptions.value[dictionaryValue]) {
|
|
311
|
+
const rawOptions = dictionaryOptions.value[dictionaryValue];
|
|
312
|
+
const labelField = "optName";
|
|
313
|
+
const keyField = "optCode";
|
|
314
|
+
component.optionConfig.options = rawOptions.map((item) => ({
|
|
315
|
+
label: item[labelField],
|
|
316
|
+
value: item[keyField],
|
|
317
|
+
disabled: item.disabled || false
|
|
318
|
+
}));
|
|
319
|
+
} else if (optionSource === "custom") {
|
|
320
|
+
component.optionConfig.options = component.optionConfig.options || [];
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
formattedColumns.value = columns;
|
|
324
|
+
}
|
|
325
|
+
function parseTableData(tableData2) {
|
|
326
|
+
const list = [...tableData2];
|
|
327
|
+
list.forEach((row) => {
|
|
328
|
+
formattedColumns.value.forEach((col) => {
|
|
329
|
+
let value = row[col.fieldName];
|
|
330
|
+
if (col.dataType == "select") {
|
|
331
|
+
if (isEmpty(value)) {
|
|
332
|
+
value = emptyHandler(col.emptyFormatter);
|
|
333
|
+
}
|
|
334
|
+
value = selectFormatter(value, col.optionConfig.options);
|
|
335
|
+
} else if (col.dataType == "multiple") {
|
|
336
|
+
if (isEmpty(value)) {
|
|
337
|
+
value = emptyHandler(col.emptyFormatter);
|
|
338
|
+
}
|
|
339
|
+
value = multipleFormatter(value, col.optionConfig.options);
|
|
340
|
+
} else if (col.dataType == "date") {
|
|
341
|
+
if (isEmpty(value)) {
|
|
342
|
+
value = emptyHandler(col.emptyFormatter);
|
|
343
|
+
}
|
|
344
|
+
value = dateFormatter(value, col.dateType, col.dateFormatter);
|
|
345
|
+
} else {
|
|
346
|
+
if (isEmpty(value)) {
|
|
347
|
+
value = emptyHandler(col.emptyFormatter);
|
|
348
|
+
}
|
|
349
|
+
value = textFormatter(value, col.dataFormatter);
|
|
350
|
+
}
|
|
351
|
+
row[col.fieldName] = value;
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
return list;
|
|
355
|
+
}
|
|
356
|
+
function isEmpty(cellValue) {
|
|
357
|
+
return !cellValue && cellValue !== 0;
|
|
358
|
+
}
|
|
359
|
+
function emptyHandler(emptyFormatter) {
|
|
360
|
+
if (isEmpty(emptyFormatter)) {
|
|
361
|
+
return "";
|
|
362
|
+
} else {
|
|
363
|
+
return emptyFormatter;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
__expose({
|
|
367
|
+
onSearch: function(filter) {
|
|
368
|
+
searchData.value = filter;
|
|
369
|
+
tableData.value = [];
|
|
370
|
+
finished.value = false;
|
|
371
|
+
loading.value = true;
|
|
372
|
+
pageNo = 1;
|
|
373
|
+
call();
|
|
374
|
+
}
|
|
375
|
+
});
|
|
196
376
|
return (_ctx, _cache) => {
|
|
197
377
|
const _component_fec_mobile_search = resolveComponent("fec-mobile-search");
|
|
198
378
|
const _component_fec_mobile_card = resolveComponent("fec-mobile-card");
|
|
@@ -203,7 +383,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
203
383
|
placeholder: __props.filterPlaceholder,
|
|
204
384
|
filterMode: __props.filterMode,
|
|
205
385
|
dataSources: __props.dataSources,
|
|
206
|
-
filterConfig: unref(quickFilterConfig)
|
|
386
|
+
filterConfig: unref(quickFilterConfig),
|
|
387
|
+
onFilterChange
|
|
207
388
|
}, null, 8, ["placeholder", "filterMode", "dataSources", "filterConfig"])) : createCommentVNode("", true),
|
|
208
389
|
createVNode(_component_van_list, {
|
|
209
390
|
ref_key: "listRef",
|
|
@@ -242,7 +423,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
242
423
|
};
|
|
243
424
|
}
|
|
244
425
|
});
|
|
245
|
-
const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
426
|
+
const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-13759ee7"]]);
|
|
246
427
|
export {
|
|
247
428
|
_CardList as default
|
|
248
429
|
};
|