@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
|
@@ -68,7 +68,7 @@ class DataSourceManager {
|
|
|
68
68
|
if (this.sortRules && this.sortRules.length > 0) {
|
|
69
69
|
params.sortRules = JSON.stringify(this.sortRules);
|
|
70
70
|
}
|
|
71
|
-
return { ...this.initSearchData, ...params, ...extraParams };
|
|
71
|
+
return { ...this.initSearchData, ...params, ...extraParams, isMobile: true };
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* 根据内容类型处理请求数据
|
|
@@ -99,7 +99,7 @@ class DataSourceManager {
|
|
|
99
99
|
const currentDs = this.getCurrentDataSource();
|
|
100
100
|
if (!currentDs) return {};
|
|
101
101
|
const config = {
|
|
102
|
-
url: `/${currentDs.serverName}${currentDs.url}`,
|
|
102
|
+
url: `/${window.$servers[currentDs.serverName]}${currentDs.url}`,
|
|
103
103
|
method: currentDs.method
|
|
104
104
|
};
|
|
105
105
|
if (currentDs.contentType === "formData") {
|
|
@@ -155,13 +155,13 @@ class DataSourceManager {
|
|
|
155
155
|
break;
|
|
156
156
|
case "post":
|
|
157
157
|
if (currentDs.contentType === "formData") {
|
|
158
|
-
response = await this.http.
|
|
158
|
+
response = await this.http.postFormMobile(url, params, false, false);
|
|
159
159
|
} else if (currentDs.contentType === "download") {
|
|
160
160
|
await this.http.download(url, params, false);
|
|
161
161
|
} else if (currentDs.contentType === "upload") {
|
|
162
162
|
response = await this.http.upload(url, params, false);
|
|
163
163
|
} else {
|
|
164
|
-
response = await this.http.
|
|
164
|
+
response = await this.http.postMobile(url, params, false);
|
|
165
165
|
}
|
|
166
166
|
break;
|
|
167
167
|
case "put":
|
|
@@ -10,9 +10,17 @@ import "../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { ElMessageBox } from "../../../../../node_modules/element-plus/es/components/message-box/index.mjs";
|
|
13
|
+
import { showToast, showFailToast, showSuccessToast } from "../../../../../node_modules/vant/es/toast/function-call.mjs";
|
|
14
|
+
import "../../../../../node_modules/vant/es/toast/index.mjs";
|
|
15
|
+
import { showConfirmDialog, showDialog } from "../../../../../node_modules/vant/es/dialog/function-call.mjs";
|
|
16
|
+
import "../../../../../node_modules/vant/es/dialog/index.mjs";
|
|
13
17
|
async function handlePageJump(node, data, fields, context) {
|
|
18
|
+
var _a, _b, _c;
|
|
14
19
|
const basic = node.basic || {};
|
|
15
|
-
const
|
|
20
|
+
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
21
|
+
const getFormDataMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.getFormData;
|
|
22
|
+
let formData = getFormDataMethod();
|
|
23
|
+
const params = parseRouteParams(basic.routeParams, { ...formData, ...data }, fields);
|
|
16
24
|
if (basic.pageId) {
|
|
17
25
|
if (basic.canNotGoBack === true) {
|
|
18
26
|
emitter.emit("replaceLoadPage", { pageId: basic.pageId, params });
|
|
@@ -116,26 +124,19 @@ async function handleApiCall(node, data, fields, context, params) {
|
|
|
116
124
|
}
|
|
117
125
|
async function handleConfirm(node, data, fields, context) {
|
|
118
126
|
const basic = node.basic || {};
|
|
119
|
-
const config = {
|
|
120
|
-
messageType: basic.messageType || "warning",
|
|
121
|
-
title: basic.title || "确认操作",
|
|
122
|
-
message: basic.message || "确定要执行此操作吗?",
|
|
123
|
-
confirmText: basic.confirmText || "确定",
|
|
124
|
-
cancelText: basic.cancelText || "取消",
|
|
125
|
-
showCancel: basic.showCancel !== false,
|
|
126
|
-
confirmAction: basic.confirmAction || "continue",
|
|
127
|
-
cancelAction: basic.cancelAction || "stop"
|
|
128
|
-
};
|
|
129
127
|
try {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
if (basic.showCancel) {
|
|
129
|
+
await showConfirmDialog({
|
|
130
|
+
title: basic.title,
|
|
131
|
+
message: basic.message
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
await showDialog({
|
|
135
|
+
title: basic.title,
|
|
136
|
+
message: basic.message
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (basic.confirmAction === "stop") {
|
|
139
140
|
return {
|
|
140
141
|
success: false,
|
|
141
142
|
message: "用户确认后停止执行",
|
|
@@ -170,8 +171,20 @@ async function handleMessage(node, data, fields, context) {
|
|
|
170
171
|
};
|
|
171
172
|
}
|
|
172
173
|
if (node.basic) {
|
|
173
|
-
node.basic.messageType || "info";
|
|
174
|
-
node.basic.message || "操作成功";
|
|
174
|
+
const messageType = node.basic.messageType || "info";
|
|
175
|
+
const message = node.basic.message || "操作成功";
|
|
176
|
+
switch (messageType) {
|
|
177
|
+
case "success":
|
|
178
|
+
showSuccessToast(message);
|
|
179
|
+
break;
|
|
180
|
+
case "error":
|
|
181
|
+
showFailToast(message);
|
|
182
|
+
break;
|
|
183
|
+
case "info":
|
|
184
|
+
default:
|
|
185
|
+
showToast(message);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
175
188
|
}
|
|
176
189
|
return {
|
|
177
190
|
success: true,
|
|
@@ -45,7 +45,6 @@ const dateFormatter = (value, dateType, formatterType) => {
|
|
|
45
45
|
return dateValue.format(textFormat);
|
|
46
46
|
};
|
|
47
47
|
const textFormatter = (value, dataFormatter) => {
|
|
48
|
-
console.log("🚀 ~ textFormatter ~ dataFormatter:", dataFormatter);
|
|
49
48
|
switch (dataFormatter) {
|
|
50
49
|
case "money(yuan)":
|
|
51
50
|
case "money(wanyuan)":
|
|
@@ -72,6 +71,9 @@ const textFormatter = (value, dataFormatter) => {
|
|
|
72
71
|
}
|
|
73
72
|
};
|
|
74
73
|
const moneyFormatter = (value, dataFormatter) => {
|
|
74
|
+
if (!value) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
75
77
|
let moneyValue;
|
|
76
78
|
switch (dataFormatter) {
|
|
77
79
|
case "money(yuan)":
|
|
@@ -89,27 +91,6 @@ const moneyFormatter = (value, dataFormatter) => {
|
|
|
89
91
|
}
|
|
90
92
|
return XEUtils.commafy(moneyValue, { digits: 2 });
|
|
91
93
|
};
|
|
92
|
-
const textFormatter4Input = (value, dataFormatter) => {
|
|
93
|
-
if (!value) {
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
switch (dataFormatter) {
|
|
97
|
-
case "money(yuan)":
|
|
98
|
-
case "money(wanyuan)":
|
|
99
|
-
case "money(yi)":
|
|
100
|
-
return XEUtils.toNumberString(XEUtils.toNumber(value)).replace(
|
|
101
|
-
/\B(?=(\d{3})+(?!\d))/g,
|
|
102
|
-
","
|
|
103
|
-
);
|
|
104
|
-
case "bankCard":
|
|
105
|
-
return XEUtils.toValueString(value.replace(/\s+/g, "")).replace(
|
|
106
|
-
/\B(?=(\d{4})+(?!\d))/g,
|
|
107
|
-
" "
|
|
108
|
-
);
|
|
109
|
-
default:
|
|
110
|
-
return value;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
94
|
const reverseTextFormatter = (value, dataFormatter) => {
|
|
114
95
|
if (!value) {
|
|
115
96
|
return value;
|
|
@@ -180,6 +161,5 @@ export {
|
|
|
180
161
|
reverseMoneyFormatter,
|
|
181
162
|
reverseTextFormatter,
|
|
182
163
|
selectFormatter,
|
|
183
|
-
textFormatter
|
|
184
|
-
textFormatter4Input
|
|
164
|
+
textFormatter
|
|
185
165
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import functionCore from "./functionCore.mjs";
|
|
2
|
+
import XEUtils from "xe-utils";
|
|
2
3
|
import "vue";
|
|
3
4
|
function calculate(params) {
|
|
4
5
|
const { text, value = {}, fieldsList = [] } = params;
|
|
@@ -26,11 +27,16 @@ function calculate(params) {
|
|
|
26
27
|
const fieldItem = fieldsList.find((item) => item.fieldName == enCode);
|
|
27
28
|
if (fieldItem) {
|
|
28
29
|
switch (fieldItem.fieldType) {
|
|
29
|
-
case "
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
case "text":
|
|
31
|
+
switch (fieldItem.dataFormatter) {
|
|
32
|
+
case "money(yuan)":
|
|
33
|
+
case "money(wanyuan)":
|
|
34
|
+
case "money(yi)":
|
|
35
|
+
case "percent":
|
|
36
|
+
case "thousand":
|
|
37
|
+
case "tenThousand":
|
|
38
|
+
data = XEUtils.toNumber(data);
|
|
39
|
+
break;
|
|
34
40
|
}
|
|
35
41
|
break;
|
|
36
42
|
case "switch":
|
|
@@ -25,8 +25,8 @@ const getOptions = ({
|
|
|
25
25
|
resolve([]);
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
|
-
const response = await ctx.$http.
|
|
29
|
-
"/base
|
|
28
|
+
const response = await ctx.$http.postFormMobile(
|
|
29
|
+
"/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
|
|
30
30
|
{
|
|
31
31
|
keyName: dictionaryValue
|
|
32
32
|
},
|
|
@@ -76,33 +76,9 @@ const getOptions = ({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
const getTreeOptions = ({
|
|
80
|
-
optionType,
|
|
81
|
-
dataSource,
|
|
82
|
-
dataSourceParams,
|
|
83
|
-
staticOptions,
|
|
84
|
-
optionsFieldNames
|
|
85
|
-
}) => {
|
|
86
|
-
return new Promise((resolve, reject) => {
|
|
87
|
-
switch (optionType) {
|
|
88
|
-
case "static":
|
|
89
|
-
resolve(staticOptions);
|
|
90
|
-
case "library":
|
|
91
|
-
const dataSourceRef = useDataSource(dataSource);
|
|
92
|
-
dataSourceRef == null ? void 0 : dataSourceRef.load(dataSourceParams || {}).then((res) => {
|
|
93
|
-
var _a;
|
|
94
|
-
const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.records) || (res == null ? void 0 : res.data) || res || [];
|
|
95
|
-
resolve(data);
|
|
96
|
-
}).catch((err) => {
|
|
97
|
-
console.error(err);
|
|
98
|
-
});
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
79
|
const getParmDicMapByKeys = async (dicKeys) => {
|
|
104
80
|
const http = useHttp();
|
|
105
|
-
const res = await http.
|
|
81
|
+
const res = await http.postFormMobile(
|
|
106
82
|
`${baseUrl}/parm/sysParmDic/getDicListByKey`,
|
|
107
83
|
{
|
|
108
84
|
keyName: dicKeys
|
|
@@ -112,6 +88,5 @@ const getParmDicMapByKeys = async (dicKeys) => {
|
|
|
112
88
|
};
|
|
113
89
|
export {
|
|
114
90
|
getOptions,
|
|
115
|
-
getParmDicMapByKeys
|
|
116
|
-
getTreeOptions
|
|
91
|
+
getParmDicMapByKeys
|
|
117
92
|
};
|
|
@@ -39,6 +39,7 @@ class PageHistory {
|
|
|
39
39
|
if (this.history.length > 0 && this.history[this.history.length - 1].id == page.id) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
+
this.setWmpTitle(page.name);
|
|
42
43
|
this.history.push({
|
|
43
44
|
id: page.id,
|
|
44
45
|
name: page.name || "",
|
|
@@ -59,6 +60,7 @@ class PageHistory {
|
|
|
59
60
|
this.push(page);
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
63
|
+
this.setWmpTitle(page.name);
|
|
62
64
|
this.history[this.history.length - 1] = {
|
|
63
65
|
id: page.id,
|
|
64
66
|
name: page.name || "",
|
|
@@ -81,6 +83,7 @@ class PageHistory {
|
|
|
81
83
|
const pageId = prevPage ? prevPage.id : null;
|
|
82
84
|
const params = prevPage ? prevPage.params : null;
|
|
83
85
|
if (pageId) {
|
|
86
|
+
this.setWmpTitle(prevPage.name);
|
|
84
87
|
emitter.emit("loadPage", { pageId, params });
|
|
85
88
|
}
|
|
86
89
|
}
|
|
@@ -115,6 +118,19 @@ class PageHistory {
|
|
|
115
118
|
this.history = [];
|
|
116
119
|
this.saveHistory();
|
|
117
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* 设置微信小程序标题
|
|
123
|
+
*/
|
|
124
|
+
setWmpTitle(title) {
|
|
125
|
+
if (window.wx && wx.miniProgram) {
|
|
126
|
+
wx.miniProgram.postMessage({
|
|
127
|
+
data: {
|
|
128
|
+
type: "setTitle",
|
|
129
|
+
title
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
118
134
|
}
|
|
119
135
|
const pageHistory = new PageHistory();
|
|
120
136
|
export {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { checkFilterMatch } from "./parseFilterConfig.mjs";
|
|
2
|
+
const VALIDATION_RULES = {
|
|
3
|
+
// 身份证
|
|
4
|
+
idCard: {
|
|
5
|
+
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
6
|
+
message: "请输入正确的身份证号码"
|
|
7
|
+
},
|
|
8
|
+
// 统一社会信用代码
|
|
9
|
+
creditCode: {
|
|
10
|
+
pattern: /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,
|
|
11
|
+
message: "请输入正确的统一社会信用代码"
|
|
12
|
+
},
|
|
13
|
+
// 邮编
|
|
14
|
+
zipCode: {
|
|
15
|
+
pattern: /^[1-9]\d{5}$/,
|
|
16
|
+
message: "请输入正确的邮政编码"
|
|
17
|
+
},
|
|
18
|
+
// 传真
|
|
19
|
+
fax: {
|
|
20
|
+
pattern: /^\d{3,4}-?\d{7,8}$/,
|
|
21
|
+
message: "请输入正确的传真号码"
|
|
22
|
+
},
|
|
23
|
+
// 银行卡号
|
|
24
|
+
bankCard: {
|
|
25
|
+
pattern: /^[1-9]\d{15,18}$/,
|
|
26
|
+
message: "请输入正确的银行卡号"
|
|
27
|
+
},
|
|
28
|
+
// 邮箱
|
|
29
|
+
email: {
|
|
30
|
+
pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
|
|
31
|
+
message: "请输入正确的邮箱地址"
|
|
32
|
+
},
|
|
33
|
+
// 手机
|
|
34
|
+
mobile: {
|
|
35
|
+
pattern: /^1[3-9]\d{9}$/,
|
|
36
|
+
message: "请输入正确的手机号码"
|
|
37
|
+
},
|
|
38
|
+
// 座机
|
|
39
|
+
phone: {
|
|
40
|
+
pattern: /^0\d{2,3}-?\d{7,8}$/,
|
|
41
|
+
message: "请输入正确的座机号码"
|
|
42
|
+
},
|
|
43
|
+
// 手机+座机
|
|
44
|
+
mobilePhone: {
|
|
45
|
+
pattern: /^(1[3-9]\d{9})|(0\d{2,3}-?\d{7,8})$/,
|
|
46
|
+
message: "请输入正确的联系电话"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function generateFieldRules(component, formData, fields) {
|
|
50
|
+
const rules = [];
|
|
51
|
+
if (!component.fieldName) {
|
|
52
|
+
return rules;
|
|
53
|
+
}
|
|
54
|
+
if (component.required) {
|
|
55
|
+
rules.push({
|
|
56
|
+
required: true,
|
|
57
|
+
message: component.requiredMessage || `请录入${component.label}`,
|
|
58
|
+
trigger: "blur"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (component.validationType && component.validationType !== "none") {
|
|
62
|
+
if (component.validationType === "regex" && component.validationPattern) {
|
|
63
|
+
try {
|
|
64
|
+
const validator = (_rule, _value, callback) => {
|
|
65
|
+
try {
|
|
66
|
+
const isMatch = checkFilterMatch(component.validationPattern, formData.value, fields);
|
|
67
|
+
if (!isMatch) {
|
|
68
|
+
callback(new Error(component.validationMessage || "校验失败"));
|
|
69
|
+
} else {
|
|
70
|
+
callback();
|
|
71
|
+
}
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error("Validation function error:", error);
|
|
74
|
+
callback(new Error(component.validationMessage || "校验函数执行出错"));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
rules.push({
|
|
78
|
+
validator,
|
|
79
|
+
trigger: "change"
|
|
80
|
+
});
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error("Invalid validation pattern:", component.validationPattern, e);
|
|
83
|
+
}
|
|
84
|
+
} else if (component.validationType === "custom" && component.customValidator) {
|
|
85
|
+
try {
|
|
86
|
+
const validator = createCustomValidator(component.customValidator);
|
|
87
|
+
if (validator) {
|
|
88
|
+
rules.push({
|
|
89
|
+
validator,
|
|
90
|
+
trigger: "blur"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
} catch (e) {
|
|
94
|
+
console.error("Invalid custom validator:", e);
|
|
95
|
+
}
|
|
96
|
+
} else if (VALIDATION_RULES[component.validationType]) {
|
|
97
|
+
const rule = VALIDATION_RULES[component.validationType];
|
|
98
|
+
rules.push({
|
|
99
|
+
pattern: rule.pattern,
|
|
100
|
+
message: component.validationMessage || rule.message,
|
|
101
|
+
trigger: "blur"
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return rules;
|
|
106
|
+
}
|
|
107
|
+
function createCustomValidator(validatorStr) {
|
|
108
|
+
if (!validatorStr || typeof validatorStr !== "string") {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const validator = new Function("return " + validatorStr)();
|
|
113
|
+
if (typeof validator === "function") {
|
|
114
|
+
return (rule, value, callback) => {
|
|
115
|
+
try {
|
|
116
|
+
validator(rule, value, callback);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
callback(new Error("校验函数执行出错: " + error.message));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
} catch (e) {
|
|
123
|
+
console.error("Failed to create validator from string:", e);
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
generateFieldRules
|
|
129
|
+
};
|
|
@@ -29,10 +29,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
29
29
|
const ctx = getCurrentVueInstance();
|
|
30
30
|
ref("");
|
|
31
31
|
const formData = inject("formData");
|
|
32
|
+
const getFormData = inject("getFormData");
|
|
32
33
|
inject("rowHeight");
|
|
33
34
|
inject("gridLayout");
|
|
34
35
|
inject("gridLayoutFieldsData");
|
|
35
36
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
37
|
+
const handleEvent = inject("handleEvent");
|
|
36
38
|
const fieldsData = props.localConfig.fieldsData.map((item) => {
|
|
37
39
|
return item.component;
|
|
38
40
|
});
|
|
@@ -74,6 +76,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
74
76
|
visibleData
|
|
75
77
|
});
|
|
76
78
|
}
|
|
79
|
+
function savaFuncCallback() {
|
|
80
|
+
var _a;
|
|
81
|
+
handleEvent.value(
|
|
82
|
+
getFormData(),
|
|
83
|
+
config,
|
|
84
|
+
(_a = config.callbackEventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
85
|
+
);
|
|
86
|
+
}
|
|
77
87
|
return (_ctx, _cache) => {
|
|
78
88
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
79
89
|
(openBlock(), createBlock(resolveDynamicComponent(unref(currentComponent)), {
|
|
@@ -84,7 +94,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
84
94
|
modeNo: __props.config.busSubject,
|
|
85
95
|
genType: __props.config.genType,
|
|
86
96
|
parmList: unref(parsedParams),
|
|
87
|
-
onLoaded: loaded
|
|
97
|
+
onLoaded: loaded,
|
|
98
|
+
savaData: savaFuncCallback
|
|
88
99
|
}, null, 40, ["id", "mode", "busNo", "contNo", "modeNo", "genType", "parmList"]))
|
|
89
100
|
]);
|
|
90
101
|
};
|
|
@@ -47,6 +47,7 @@ import RightAnchorNav from "./RightAnchorNav.vue.mjs";
|
|
|
47
47
|
import { checkFilterMatch, checkFieldInFilterConfig, checkFieldInResultConfig } from "../../../utils/parseFilterConfig.mjs";
|
|
48
48
|
import hooks from "../../../../../../node_modules/moment/dist/moment.mjs";
|
|
49
49
|
import emitter from "../../../utils/eventBus.mjs";
|
|
50
|
+
import { useStore } from "../../../../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
50
51
|
/* empty css */
|
|
51
52
|
import { useLocale } from "../../../../../../node_modules/element-plus/es/hooks/use-locale/index.mjs";
|
|
52
53
|
import { ElMessage } from "../../../../../../node_modules/element-plus/es/components/message/index.mjs";
|
|
@@ -112,6 +113,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
112
113
|
"layoutUpdated"
|
|
113
114
|
],
|
|
114
115
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
116
|
+
const store = useStore();
|
|
117
|
+
window.$user = store.getters.user;
|
|
115
118
|
const props = __props;
|
|
116
119
|
useLocale();
|
|
117
120
|
const emit = __emit;
|
|
@@ -320,7 +323,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
320
323
|
try {
|
|
321
324
|
const keyName = Array.from(dictionaryKeys).join(",");
|
|
322
325
|
const response = await ctx.$http.postForm(
|
|
323
|
-
"/base
|
|
326
|
+
"/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
|
|
324
327
|
{
|
|
325
328
|
keyName
|
|
326
329
|
}
|
|
@@ -1287,7 +1290,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1287
1290
|
};
|
|
1288
1291
|
}
|
|
1289
1292
|
});
|
|
1290
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1293
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3ee0473d"]]);
|
|
1291
1294
|
export {
|
|
1292
1295
|
_Form as default
|
|
1293
1296
|
};
|
|
@@ -195,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
195
195
|
if (showThousandsSeparator.value) {
|
|
196
196
|
value = formatNumberWithComma(value);
|
|
197
197
|
}
|
|
198
|
-
return value;
|
|
198
|
+
return (value == null ? void 0 : value.toString()) || "";
|
|
199
199
|
};
|
|
200
200
|
const showThousandsSeparator = computed(() => {
|
|
201
201
|
return props.format == "yuan" || props.format == "wan" || props.format == "million";
|
|
@@ -449,6 +449,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
449
449
|
disabled: __props.disabled,
|
|
450
450
|
readonly: __props.readonly,
|
|
451
451
|
formatter,
|
|
452
|
+
maxlength: 15,
|
|
452
453
|
parser,
|
|
453
454
|
onBlur: handleBlur,
|
|
454
455
|
onInput: handleInput
|
|
@@ -504,7 +505,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
504
505
|
};
|
|
505
506
|
}
|
|
506
507
|
});
|
|
507
|
-
const _Number = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
508
|
+
const _Number = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-93ac5b02"]]);
|
|
508
509
|
export {
|
|
509
510
|
_Number as default
|
|
510
511
|
};
|
|
@@ -68,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
68
68
|
customTableConfig.dataSources.push({
|
|
69
69
|
id: "roleSelectDataSourceId",
|
|
70
70
|
name: "角色选择数据源",
|
|
71
|
-
serverName:
|
|
71
|
+
serverName: window.$servers.base,
|
|
72
72
|
url: "/sysRole/findByPageV5",
|
|
73
73
|
method: "post",
|
|
74
74
|
contentType: "json",
|
|
@@ -124,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
const _RoleSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
127
|
+
const _RoleSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aacdc4d9"]]);
|
|
128
128
|
export {
|
|
129
129
|
_RoleSelect as default
|
|
130
130
|
};
|
|
@@ -153,19 +153,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
153
153
|
}, createSlots({
|
|
154
154
|
default: withCtx(() => [
|
|
155
155
|
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(rightButtons), (btn) => {
|
|
156
|
-
return openBlock(),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
_: 2
|
|
167
|
-
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
168
|
-
], 64);
|
|
156
|
+
return openBlock(), createBlock(_component_el_button, {
|
|
157
|
+
link: "",
|
|
158
|
+
type: "primary",
|
|
159
|
+
onClick: ($event) => handleClick(btn, $event)
|
|
160
|
+
}, {
|
|
161
|
+
default: withCtx(() => [
|
|
162
|
+
createTextVNode(toDisplayString(btn.label), 1)
|
|
163
|
+
]),
|
|
164
|
+
_: 2
|
|
165
|
+
}, 1032, ["onClick"]);
|
|
169
166
|
}), 256)) : createCommentVNode("", true)
|
|
170
167
|
]),
|
|
171
168
|
_: 2
|
|
@@ -174,19 +171,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
174
171
|
name: "left",
|
|
175
172
|
fn: withCtx(() => [
|
|
176
173
|
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(leftButtons), (btn) => {
|
|
177
|
-
return openBlock(),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
_: 2
|
|
188
|
-
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
189
|
-
], 64);
|
|
174
|
+
return openBlock(), createBlock(_component_el_button, {
|
|
175
|
+
link: "",
|
|
176
|
+
type: "primary",
|
|
177
|
+
onClick: ($event) => handleClick(btn, $event)
|
|
178
|
+
}, {
|
|
179
|
+
default: withCtx(() => [
|
|
180
|
+
createTextVNode(toDisplayString(btn.label), 1)
|
|
181
|
+
]),
|
|
182
|
+
_: 2
|
|
183
|
+
}, 1032, ["onClick"]);
|
|
190
184
|
}), 256)) : createCommentVNode("", true)
|
|
191
185
|
]),
|
|
192
186
|
key: "0"
|
|
@@ -68,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
68
68
|
customTableConfig.dataSources.push({
|
|
69
69
|
id: "userSelectDataSourceId",
|
|
70
70
|
name: "用户选择数据源",
|
|
71
|
-
serverName:
|
|
71
|
+
serverName: window.$servers.base,
|
|
72
72
|
url: "/user/sysUser/findByPageV5",
|
|
73
73
|
method: "post",
|
|
74
74
|
contentType: "json",
|
|
@@ -124,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
const _UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
127
|
+
const _UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-06dfa7f6"]]);
|
|
128
128
|
export {
|
|
129
129
|
_UserSelect as default
|
|
130
130
|
};
|
|
@@ -42,6 +42,7 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
42
42
|
import getJsonAsyncUtil from "../../utils/getJsonAsyncUtil.mjs";
|
|
43
43
|
import emitter from "../../utils/eventBus.mjs";
|
|
44
44
|
import { Decimal } from "../../../../../node_modules/decimal.js/decimal.mjs";
|
|
45
|
+
import { useStore } from "../../../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
45
46
|
/* empty css */
|
|
46
47
|
import { ElContainer } from "../../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
47
48
|
import { ElMessage } from "../../../../../node_modules/element-plus/es/components/message/index.mjs";
|
|
@@ -139,6 +140,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
139
140
|
"height-loaded"
|
|
140
141
|
],
|
|
141
142
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
143
|
+
const store = useStore();
|
|
144
|
+
window.$user = store.getters.user;
|
|
142
145
|
const props = __props;
|
|
143
146
|
const emit = __emit;
|
|
144
147
|
const fecTableContainerRef = ref(null);
|
|
@@ -435,7 +438,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
435
438
|
try {
|
|
436
439
|
const keyName = Array.from(dictionaryKeys).join(",");
|
|
437
440
|
const response = await ctx.$http.postForm(
|
|
438
|
-
"/base
|
|
441
|
+
"/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
|
|
439
442
|
{
|
|
440
443
|
keyName
|
|
441
444
|
}
|
|
@@ -1109,7 +1112,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1109
1112
|
};
|
|
1110
1113
|
}
|
|
1111
1114
|
});
|
|
1112
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1115
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7f4898b0"]]);
|
|
1113
1116
|
export {
|
|
1114
1117
|
_Table as default
|
|
1115
1118
|
};
|