@fecp/designer 5.5.120 → 5.5.121
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/packages/dataSource/index.vue.mjs +3 -3
- package/es/designer/src/packages/dialog/index.vue2.mjs +15 -15
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +15 -16
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- 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/widgets.vue.mjs +2 -2
- package/es/designer.css +505 -415
- 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/base/card/Card.vue.mjs +2 -2
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +62 -44
- package/es/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.mjs +2 -2
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +128 -67
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +5 -5
- 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 +2 -2
- package/es/packages/mobile/src/components/custom/userSelect/UserSelect.vue.mjs +2 -2
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +187 -7
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +2 -2
- 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 +15 -6
- package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +9 -5
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +58 -25
- 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 +3 -3
- 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 +3 -28
- 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/forms/number/Number.vue.mjs +3 -2
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +12 -8
- package/lib/designer/package.json.js +1 -1
- 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/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +15 -16
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- 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/widgets.vue.js +2 -2
- package/lib/designer.css +505 -415
- 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/base/card/Card.vue.js +2 -2
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +61 -43
- package/lib/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.js +2 -2
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +131 -70
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +5 -5
- 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 +2 -2
- package/lib/packages/mobile/src/components/custom/userSelect/UserSelect.vue.js +2 -2
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +187 -7
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +2 -2
- 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 +15 -6
- package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +2 -2
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +9 -5
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +61 -28
- 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 +3 -3
- 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 +2 -27
- 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/forms/number/Number.vue.js +3 -2
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +12 -8
- package/package.json +1 -1
|
@@ -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,7 +131,7 @@ const _sfc_main = {
|
|
|
131
131
|
}
|
|
132
132
|
function fetchData() {
|
|
133
133
|
loading.value = true;
|
|
134
|
-
ctx.$http.
|
|
134
|
+
ctx.$http.postMobile(
|
|
135
135
|
"/base-server/docBusFiletype/getRootTree4Mobile",
|
|
136
136
|
{
|
|
137
137
|
isEdit: false,
|
|
@@ -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-c2db27bd"]]);
|
|
365
365
|
export {
|
|
366
366
|
_Document as default
|
|
367
367
|
};
|
|
@@ -163,7 +163,7 @@ const _sfc_main = {
|
|
|
163
163
|
}
|
|
164
164
|
function fetchData(keyword = "") {
|
|
165
165
|
listLoading.value = true;
|
|
166
|
-
ctx.$http.
|
|
166
|
+
ctx.$http.postMobile(
|
|
167
167
|
"/base-server/mobileApi/findSysUserByPage",
|
|
168
168
|
{
|
|
169
169
|
pageNo: pageNum.value,
|
|
@@ -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-4aaba0be"]]);
|
|
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,7 +125,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
127
|
function dicHandler(dictionaryValue) {
|
|
118
|
-
return ctx.$http.
|
|
128
|
+
return ctx.$http.postFormMobile(
|
|
119
129
|
"/base-server/parm/sysParmDic/getDicListByKey",
|
|
120
130
|
{
|
|
121
131
|
keyName: dictionaryValue
|
|
@@ -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
|
}
|
|
@@ -193,6 +208,170 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
193
208
|
const quickFilterConfig = computed(() => {
|
|
194
209
|
return props.quickFilter;
|
|
195
210
|
});
|
|
211
|
+
function onFilterChange(filter) {
|
|
212
|
+
const dynamicFilterFieldName = props.dynamicInputFilter.map((item) => item.fieldName).join(",");
|
|
213
|
+
searchData.value = {
|
|
214
|
+
filters: JSON.stringify({ ...filter, dynamicFilterFieldName })
|
|
215
|
+
};
|
|
216
|
+
tableData.value = [];
|
|
217
|
+
finished.value = false;
|
|
218
|
+
loading.value = true;
|
|
219
|
+
pageNo = 1;
|
|
220
|
+
call();
|
|
221
|
+
}
|
|
222
|
+
const dataSourceOptions = ref({});
|
|
223
|
+
const dictionaryOptions = ref({});
|
|
224
|
+
async function formattedTableData() {
|
|
225
|
+
var _a, _b;
|
|
226
|
+
const columns = [...props.columns];
|
|
227
|
+
const fieldDataSources = /* @__PURE__ */ new Set();
|
|
228
|
+
const dictionaryKeys = /* @__PURE__ */ new Set();
|
|
229
|
+
for (const col of columns) {
|
|
230
|
+
if (col.dataType == "select" || col.dataType == "multiple") {
|
|
231
|
+
const { optionSource, dataSourceValue, dictionaryValue } = col.optionConfig;
|
|
232
|
+
if (optionSource === "dataSource" && dataSourceValue) {
|
|
233
|
+
fieldDataSources.add(dataSourceValue);
|
|
234
|
+
} else if (optionSource === "dictionary" && dictionaryValue) {
|
|
235
|
+
dictionaryKeys.add(dictionaryValue);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
for (const dataSourceId of fieldDataSources) {
|
|
240
|
+
if (dataSourceOptions.value[dataSourceId]) continue;
|
|
241
|
+
try {
|
|
242
|
+
const dsManager = createDataSource({
|
|
243
|
+
http: ctx.$http,
|
|
244
|
+
dataSources: props.dataSources,
|
|
245
|
+
currentDataSourceId: dataSourceId,
|
|
246
|
+
pagination: false,
|
|
247
|
+
data: (formData == null ? void 0 : formData.value) || {},
|
|
248
|
+
fields: props.fields
|
|
249
|
+
});
|
|
250
|
+
const data = await dsManager.fetch();
|
|
251
|
+
let options = [];
|
|
252
|
+
if (Array.isArray(data)) {
|
|
253
|
+
options = data;
|
|
254
|
+
} else if (typeof data === "object") {
|
|
255
|
+
options = Array.isArray(data.data) ? data.data : ((_a = data.data) == null ? void 0 : _a.records) || ((_b = data.data) == null ? void 0 : _b.list) || [];
|
|
256
|
+
}
|
|
257
|
+
dataSourceOptions.value[dataSourceId] = options;
|
|
258
|
+
dsManager.destroy();
|
|
259
|
+
} catch (error2) {
|
|
260
|
+
console.error(`Failed to load data source ${dataSourceId}:`, error2);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (dictionaryKeys.size > 0) {
|
|
264
|
+
try {
|
|
265
|
+
const keyName = Array.from(dictionaryKeys).join(",");
|
|
266
|
+
const response = await ctx.$http.postFormMobile(
|
|
267
|
+
"/base-server/parm/sysParmDic/getDicListByKey",
|
|
268
|
+
{
|
|
269
|
+
keyName
|
|
270
|
+
},
|
|
271
|
+
false
|
|
272
|
+
);
|
|
273
|
+
const dictionaryData = response;
|
|
274
|
+
if (typeof dictionaryData === "object") {
|
|
275
|
+
Object.keys(dictionaryData).forEach((dictKey) => {
|
|
276
|
+
if (dictionaryKeys.has(dictKey)) {
|
|
277
|
+
const dictItems = dictionaryData[dictKey];
|
|
278
|
+
if (Array.isArray(dictItems)) {
|
|
279
|
+
dictionaryOptions.value[dictKey] = dictItems;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
} catch (error2) {
|
|
285
|
+
console.error("Failed to load dictionary data:", error2);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
columns.forEach((component) => {
|
|
289
|
+
if (!component.optionConfig) return;
|
|
290
|
+
const {
|
|
291
|
+
optionSource,
|
|
292
|
+
dataSourceValue,
|
|
293
|
+
dictionaryValue,
|
|
294
|
+
displayField,
|
|
295
|
+
valueField,
|
|
296
|
+
idField,
|
|
297
|
+
pidField
|
|
298
|
+
} = component.optionConfig;
|
|
299
|
+
if (optionSource === "dataSource" && dataSourceOptions.value[dataSourceValue]) {
|
|
300
|
+
const rawOptions = dataSourceOptions.value[dataSourceValue];
|
|
301
|
+
const labelField = displayField || "label";
|
|
302
|
+
const keyField = valueField || "value";
|
|
303
|
+
component.optionConfig.options = rawOptions.map((item) => ({
|
|
304
|
+
label: item[labelField],
|
|
305
|
+
value: item[keyField],
|
|
306
|
+
disabled: item.disabled || false,
|
|
307
|
+
...item
|
|
308
|
+
}));
|
|
309
|
+
} else if (optionSource === "dictionary" && dictionaryOptions.value[dictionaryValue]) {
|
|
310
|
+
const rawOptions = dictionaryOptions.value[dictionaryValue];
|
|
311
|
+
const labelField = "optName";
|
|
312
|
+
const keyField = "optCode";
|
|
313
|
+
component.optionConfig.options = rawOptions.map((item) => ({
|
|
314
|
+
label: item[labelField],
|
|
315
|
+
value: item[keyField],
|
|
316
|
+
disabled: item.disabled || false
|
|
317
|
+
}));
|
|
318
|
+
} else if (optionSource === "custom") {
|
|
319
|
+
component.optionConfig.options = component.optionConfig.options || [];
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
formattedColumns.value = columns;
|
|
323
|
+
}
|
|
324
|
+
function parseTableData(tableData2) {
|
|
325
|
+
const list = [...tableData2];
|
|
326
|
+
list.forEach((row) => {
|
|
327
|
+
formattedColumns.value.forEach((col) => {
|
|
328
|
+
let value = row[col.fieldName];
|
|
329
|
+
if (col.dataType == "select") {
|
|
330
|
+
if (isEmpty(value)) {
|
|
331
|
+
value = emptyHandler(col.emptyFormatter);
|
|
332
|
+
}
|
|
333
|
+
value = selectFormatter(value, col.optionConfig.options);
|
|
334
|
+
} else if (col.dataType == "multiple") {
|
|
335
|
+
if (isEmpty(value)) {
|
|
336
|
+
value = emptyHandler(col.emptyFormatter);
|
|
337
|
+
}
|
|
338
|
+
value = multipleFormatter(value, col.optionConfig.options);
|
|
339
|
+
} else if (col.dataType == "date") {
|
|
340
|
+
if (isEmpty(value)) {
|
|
341
|
+
value = emptyHandler(col.emptyFormatter);
|
|
342
|
+
}
|
|
343
|
+
value = dateFormatter(value, col.dateType, col.dateFormatter);
|
|
344
|
+
} else {
|
|
345
|
+
if (isEmpty(value)) {
|
|
346
|
+
value = emptyHandler(col.emptyFormatter);
|
|
347
|
+
}
|
|
348
|
+
value = textFormatter(value, col.dataFormatter);
|
|
349
|
+
}
|
|
350
|
+
row[col.fieldName] = value;
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
return list;
|
|
354
|
+
}
|
|
355
|
+
function isEmpty(cellValue) {
|
|
356
|
+
return !cellValue && cellValue !== 0;
|
|
357
|
+
}
|
|
358
|
+
function emptyHandler(emptyFormatter) {
|
|
359
|
+
if (isEmpty(emptyFormatter)) {
|
|
360
|
+
return "";
|
|
361
|
+
} else {
|
|
362
|
+
return emptyFormatter;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
__expose({
|
|
366
|
+
onSearch: function(filter) {
|
|
367
|
+
searchData.value = filter;
|
|
368
|
+
tableData.value = [];
|
|
369
|
+
finished.value = false;
|
|
370
|
+
loading.value = true;
|
|
371
|
+
pageNo = 1;
|
|
372
|
+
call();
|
|
373
|
+
}
|
|
374
|
+
});
|
|
196
375
|
return (_ctx, _cache) => {
|
|
197
376
|
const _component_fec_mobile_search = resolveComponent("fec-mobile-search");
|
|
198
377
|
const _component_fec_mobile_card = resolveComponent("fec-mobile-card");
|
|
@@ -203,7 +382,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
203
382
|
placeholder: __props.filterPlaceholder,
|
|
204
383
|
filterMode: __props.filterMode,
|
|
205
384
|
dataSources: __props.dataSources,
|
|
206
|
-
filterConfig: unref(quickFilterConfig)
|
|
385
|
+
filterConfig: unref(quickFilterConfig),
|
|
386
|
+
onFilterChange
|
|
207
387
|
}, null, 8, ["placeholder", "filterMode", "dataSources", "filterConfig"])) : createCommentVNode("", true),
|
|
208
388
|
createVNode(_component_van_list, {
|
|
209
389
|
ref_key: "listRef",
|
|
@@ -242,7 +422,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
242
422
|
};
|
|
243
423
|
}
|
|
244
424
|
});
|
|
245
|
-
const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
425
|
+
const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-68f16109"]]);
|
|
246
426
|
export {
|
|
247
427
|
_CardList as default
|
|
248
428
|
};
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
57
57
|
const ctx = currentInstance.proxy;
|
|
58
58
|
const loading = ref(true);
|
|
59
59
|
const dataList = ref([]);
|
|
60
|
-
ctx.$http.
|
|
60
|
+
ctx.$http.postFormMobile("/base-server/sysHome/getData4UpperLeft", {}, false).then((data) => {
|
|
61
61
|
dataList.value = [
|
|
62
62
|
{
|
|
63
63
|
label: "资产总额",
|
|
@@ -214,7 +214,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
|
-
const _DataStat = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
217
|
+
const _DataStat = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69ffb999"]]);
|
|
218
218
|
export {
|
|
219
219
|
_DataStat as default
|
|
220
220
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { computed, createElementBlock, openBlock, createElementVNode, toDisplayString, Fragment, renderList } from "vue";
|
|
1
|
+
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
+
import userImg from "../../../assets/images/user.png.mjs";
|
|
2
3
|
import { useStore } from "../../../../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
6
|
+
import { showConfirmDialog } from "../../../../../../node_modules/vant/es/dialog/function-call.mjs";
|
|
5
7
|
const _hoisted_1 = { class: "mine-page" };
|
|
6
8
|
const _hoisted_2 = { class: "profile-header" };
|
|
7
9
|
const _hoisted_3 = { class: "avatar-box" };
|
|
8
|
-
const _hoisted_4 =
|
|
10
|
+
const _hoisted_4 = ["src"];
|
|
9
11
|
const _hoisted_5 = { class: "name-text" };
|
|
10
12
|
const _hoisted_6 = { class: "info-list" };
|
|
11
13
|
const _hoisted_7 = { class: "info-label" };
|
|
@@ -18,15 +20,17 @@ const _hoisted_10 = {
|
|
|
18
20
|
key: 1,
|
|
19
21
|
class: "info-text"
|
|
20
22
|
};
|
|
23
|
+
const _hoisted_11 = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "logout-section"
|
|
26
|
+
};
|
|
21
27
|
const _sfc_main = {
|
|
22
28
|
__name: "Mine",
|
|
23
29
|
setup(__props) {
|
|
24
30
|
const store = useStore();
|
|
25
31
|
const user = computed(() => store.getters.user || {});
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
if (!name) return "";
|
|
29
|
-
return name.charAt(0);
|
|
32
|
+
const isMp = computed(() => {
|
|
33
|
+
return !!(window.wx && wx.miniProgram);
|
|
30
34
|
});
|
|
31
35
|
const infoItems = computed(() => [
|
|
32
36
|
{ label: "角色", value: user.value.roleName.split(" ") || [] },
|
|
@@ -34,11 +38,25 @@ const _sfc_main = {
|
|
|
34
38
|
{ label: "手机", value: user.value.phone || "" },
|
|
35
39
|
{ label: "邮箱", value: user.value.email || "" }
|
|
36
40
|
]);
|
|
41
|
+
function handleLogout() {
|
|
42
|
+
showConfirmDialog({
|
|
43
|
+
message: "确定要退出当前账号吗?"
|
|
44
|
+
}).then(() => {
|
|
45
|
+
wx.miniProgram.reLaunch({
|
|
46
|
+
url: "/pages/login/login"
|
|
47
|
+
});
|
|
48
|
+
store.commit("logout");
|
|
49
|
+
});
|
|
50
|
+
}
|
|
37
51
|
return (_ctx, _cache) => {
|
|
38
52
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
39
53
|
createElementVNode("div", _hoisted_2, [
|
|
40
54
|
createElementVNode("div", _hoisted_3, [
|
|
41
|
-
createElementVNode("
|
|
55
|
+
createElementVNode("img", {
|
|
56
|
+
class: "avatar-img",
|
|
57
|
+
src: unref(userImg),
|
|
58
|
+
alt: "头像"
|
|
59
|
+
}, null, 8, _hoisted_4)
|
|
42
60
|
]),
|
|
43
61
|
createElementVNode("div", _hoisted_5, toDisplayString(user.value.opName), 1)
|
|
44
62
|
]),
|
|
@@ -61,12 +79,18 @@ const _sfc_main = {
|
|
|
61
79
|
])
|
|
62
80
|
]);
|
|
63
81
|
}), 128))
|
|
64
|
-
])
|
|
82
|
+
]),
|
|
83
|
+
isMp.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
84
|
+
createElementVNode("div", {
|
|
85
|
+
class: "logout-btn",
|
|
86
|
+
onClick: handleLogout
|
|
87
|
+
}, "退出登录")
|
|
88
|
+
])) : createCommentVNode("", true)
|
|
65
89
|
]);
|
|
66
90
|
};
|
|
67
91
|
}
|
|
68
92
|
};
|
|
69
|
-
const _Mine = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
93
|
+
const _Mine = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-93397a65"]]);
|
|
70
94
|
export {
|
|
71
95
|
_Mine as default
|
|
72
96
|
};
|
|
@@ -7,16 +7,18 @@ const _hoisted_3 = { class: "card-body" };
|
|
|
7
7
|
const _hoisted_4 = { class: "rate-row rate-percents" };
|
|
8
8
|
const _hoisted_5 = { class: "rate-label" };
|
|
9
9
|
const _hoisted_6 = { class: "rate-value rate-pct" };
|
|
10
|
-
const _hoisted_7 = { class: "
|
|
11
|
-
const _hoisted_8 = { class: "
|
|
12
|
-
const _hoisted_9 =
|
|
13
|
-
const _hoisted_10 = { class: "
|
|
14
|
-
const _hoisted_11 =
|
|
15
|
-
const _hoisted_12 = { class: "
|
|
16
|
-
const _hoisted_13 = { class: "
|
|
17
|
-
const _hoisted_14 = { class: "
|
|
18
|
-
const _hoisted_15 = { class: "
|
|
19
|
-
const _hoisted_16 = { class: "amount-line
|
|
10
|
+
const _hoisted_7 = { class: "rate-row rate-amount" };
|
|
11
|
+
const _hoisted_8 = { class: "rate-value rate-amt" };
|
|
12
|
+
const _hoisted_9 = { class: "card card-plan" };
|
|
13
|
+
const _hoisted_10 = { class: "card-body plan-scroll" };
|
|
14
|
+
const _hoisted_11 = ["onClick"];
|
|
15
|
+
const _hoisted_12 = { class: "left" };
|
|
16
|
+
const _hoisted_13 = { class: "period" };
|
|
17
|
+
const _hoisted_14 = { class: "date" };
|
|
18
|
+
const _hoisted_15 = { class: "right" };
|
|
19
|
+
const _hoisted_16 = { class: "amount-line" };
|
|
20
|
+
const _hoisted_17 = { class: "value primary" };
|
|
21
|
+
const _hoisted_18 = { class: "amount-line sub" };
|
|
20
22
|
const _sfc_main = {
|
|
21
23
|
__name: "RentCalcResult",
|
|
22
24
|
props: {
|
|
@@ -27,61 +29,13 @@ const _sfc_main = {
|
|
|
27
29
|
eventHandler: Function
|
|
28
30
|
},
|
|
29
31
|
setup(__props) {
|
|
32
|
+
const props = __props;
|
|
30
33
|
const rateList = ref([
|
|
31
|
-
{ label: "IRR", value:
|
|
32
|
-
{ label: "XIRR", value:
|
|
33
|
-
{ label: "会计IRR", value:
|
|
34
|
-
]);
|
|
35
|
-
const planList = ref([
|
|
36
|
-
{
|
|
37
|
-
termNum: 1,
|
|
38
|
-
endDate: "20250815",
|
|
39
|
-
rent: 325e3,
|
|
40
|
-
prcp: 28e4,
|
|
41
|
-
normInt: 45e3,
|
|
42
|
-
afterBal: 672e4
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
termNum: 2,
|
|
46
|
-
endDate: "20260215",
|
|
47
|
-
rent: 325e3,
|
|
48
|
-
prcp: 282500,
|
|
49
|
-
normInt: 42500,
|
|
50
|
-
afterBal: 6437500
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
termNum: 3,
|
|
54
|
-
endDate: "20260815",
|
|
55
|
-
rent: 325e3,
|
|
56
|
-
prcp: 285e3,
|
|
57
|
-
normInt: 4e4,
|
|
58
|
-
afterBal: 6152500
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
termNum: 4,
|
|
62
|
-
endDate: "20270215",
|
|
63
|
-
rent: 325e3,
|
|
64
|
-
prcp: 287600,
|
|
65
|
-
normInt: 37400,
|
|
66
|
-
afterBal: 5864900
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
termNum: 5,
|
|
70
|
-
endDate: "20270815",
|
|
71
|
-
rent: 325e3,
|
|
72
|
-
prcp: 290200,
|
|
73
|
-
normInt: 34800,
|
|
74
|
-
afterBal: 5574700
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
termNum: 6,
|
|
78
|
-
endDate: "20280215",
|
|
79
|
-
rent: 325e3,
|
|
80
|
-
prcp: 292900,
|
|
81
|
-
normInt: 32100,
|
|
82
|
-
afterBal: 5281800
|
|
83
|
-
}
|
|
34
|
+
{ label: "IRR", value: props.params.irr, theme: "blue" },
|
|
35
|
+
{ label: "XIRR", value: props.params.xirr, theme: "green" },
|
|
36
|
+
{ label: "会计IRR", value: props.params.accIrr, theme: "orange" }
|
|
84
37
|
]);
|
|
38
|
+
const planList = ref(props.params.repayPlanList || []);
|
|
85
39
|
function formatAmount(val) {
|
|
86
40
|
if (val === void 0 || val === null || val === "") return "0.00";
|
|
87
41
|
const n = Number(val);
|
|
@@ -91,6 +45,12 @@ const _sfc_main = {
|
|
|
91
45
|
maximumFractionDigits: 2
|
|
92
46
|
});
|
|
93
47
|
}
|
|
48
|
+
function formatPercent(val) {
|
|
49
|
+
if (val === void 0 || val === null || val === "") return "0.00%";
|
|
50
|
+
const n = Number(val) * 100;
|
|
51
|
+
if (isNaN(n)) return val;
|
|
52
|
+
return n.toFixed(2) + "%";
|
|
53
|
+
}
|
|
94
54
|
function formatDate(val) {
|
|
95
55
|
if (val === void 0 || val === null || val === "") return "--";
|
|
96
56
|
const s = String(val);
|
|
@@ -116,41 +76,41 @@ const _sfc_main = {
|
|
|
116
76
|
key: item.label
|
|
117
77
|
}, [
|
|
118
78
|
createElementVNode("div", _hoisted_5, toDisplayString(item.label), 1),
|
|
119
|
-
createElementVNode("div", _hoisted_6, toDisplayString(item.value), 1)
|
|
79
|
+
createElementVNode("div", _hoisted_6, toDisplayString(formatPercent(item.value)), 1)
|
|
120
80
|
]);
|
|
121
81
|
}), 128))
|
|
122
82
|
]),
|
|
123
|
-
|
|
124
|
-
createElementVNode("div", { class: "rate-label" }, "预计收益"),
|
|
125
|
-
createElementVNode("div",
|
|
126
|
-
]
|
|
83
|
+
createElementVNode("div", _hoisted_7, [
|
|
84
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "rate-label" }, "预计收益", -1)),
|
|
85
|
+
createElementVNode("div", _hoisted_8, toDisplayString(formatAmount(__props.params.expectedRevenue)) + "元 ", 1)
|
|
86
|
+
])
|
|
127
87
|
])
|
|
128
88
|
]),
|
|
129
|
-
createElementVNode("div",
|
|
89
|
+
createElementVNode("div", _hoisted_9, [
|
|
130
90
|
_cache[3] || (_cache[3] = createElementVNode("div", { class: "card-title" }, "租金计划", -1)),
|
|
131
|
-
createElementVNode("div",
|
|
91
|
+
createElementVNode("div", _hoisted_10, [
|
|
132
92
|
(openBlock(true), createElementBlock(Fragment, null, renderList(planList.value, (row, idx) => {
|
|
133
93
|
return openBlock(), createElementBlock("div", {
|
|
134
94
|
class: "repay-row",
|
|
135
95
|
key: idx,
|
|
136
96
|
onClick: ($event) => clickHandler()
|
|
137
97
|
}, [
|
|
138
|
-
createElementVNode("div",
|
|
139
|
-
createElementVNode("div",
|
|
140
|
-
createElementVNode("div",
|
|
98
|
+
createElementVNode("div", _hoisted_12, [
|
|
99
|
+
createElementVNode("div", _hoisted_13, "第" + toDisplayString(idx) + "期", 1),
|
|
100
|
+
createElementVNode("div", _hoisted_14, "还款日:" + toDisplayString(formatDate(row.intstDate)), 1)
|
|
141
101
|
]),
|
|
142
|
-
createElementVNode("div",
|
|
143
|
-
createElementVNode("div",
|
|
102
|
+
createElementVNode("div", _hoisted_15, [
|
|
103
|
+
createElementVNode("div", _hoisted_16, [
|
|
144
104
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "label" }, "应还租金:", -1)),
|
|
145
|
-
createElementVNode("span",
|
|
105
|
+
createElementVNode("span", _hoisted_17, toDisplayString(formatAmount(row.rent)) + "元", 1)
|
|
146
106
|
]),
|
|
147
|
-
createElementVNode("div",
|
|
107
|
+
createElementVNode("div", _hoisted_18, [
|
|
148
108
|
createElementVNode("span", null, "本金:" + toDisplayString(formatAmount(row.prcp)) + "元", 1),
|
|
149
109
|
createElementVNode("span", null, "利息:" + toDisplayString(formatAmount(row.normInt)) + "元", 1),
|
|
150
110
|
createElementVNode("span", null, "期末:" + toDisplayString(formatAmount(row.afterBal)) + "元", 1)
|
|
151
111
|
])
|
|
152
112
|
])
|
|
153
|
-
], 8,
|
|
113
|
+
], 8, _hoisted_11);
|
|
154
114
|
}), 128))
|
|
155
115
|
])
|
|
156
116
|
])
|
|
@@ -158,7 +118,7 @@ const _sfc_main = {
|
|
|
158
118
|
};
|
|
159
119
|
}
|
|
160
120
|
};
|
|
161
|
-
const _RentCalcResult = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
121
|
+
const _RentCalcResult = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c57faf0"]]);
|
|
162
122
|
export {
|
|
163
123
|
_RentCalcResult as default
|
|
164
124
|
};
|