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