super-page-runtime 2.0.40 → 2.0.43-beta1
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/dist/es/components/runtime/utils/events/standard-event.js +2 -34
- package/dist/es/components/runtime/utils/events/validator-util.js +9 -39
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -2
- package/dist/es/components/runtime/utils/page-init-util.js +1 -2
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +13 -9
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +38 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +45 -26
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +11 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +11 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +28 -18
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +11 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +11 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +23 -9
- package/dist/es/components/runtime/views/super-page.vue.js +37 -42
- package/package.json +1 -1
|
@@ -275,9 +275,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
275
275
|
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
276
276
|
param["additionalParamMap"] = additionalParamMap;
|
|
277
277
|
let exportResult;
|
|
278
|
-
|
|
279
|
-
exportResult = exportFormPdf(fileName, backendUrl, param);
|
|
280
|
-
} else {
|
|
278
|
+
{
|
|
281
279
|
exportResult = exportFormReportSuccess(fileName, backendUrl, param);
|
|
282
280
|
}
|
|
283
281
|
if (exportResult) {
|
|
@@ -318,34 +316,6 @@ function exportFormReportSuccess(fileName, backendUrl, param) {
|
|
|
318
316
|
});
|
|
319
317
|
});
|
|
320
318
|
}
|
|
321
|
-
function exportFormPdf(fileName, backendUrl, param) {
|
|
322
|
-
return new Promise((resolve, reject) => {
|
|
323
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
324
|
-
const path = baseUrl + "/dsc/commons/export-pdf";
|
|
325
|
-
axios.defaults.headers.common.Authorization = getToken();
|
|
326
|
-
const request = axios.post(path, param, {
|
|
327
|
-
headers: {
|
|
328
|
-
"content-type": "application/x-www-form-urlencoded"
|
|
329
|
-
},
|
|
330
|
-
responseType: "blob"
|
|
331
|
-
});
|
|
332
|
-
request.then((response) => {
|
|
333
|
-
const blob = new Blob([response.data]);
|
|
334
|
-
const elink = document.createElement("a");
|
|
335
|
-
elink.download = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf";
|
|
336
|
-
elink.style.display = "none";
|
|
337
|
-
elink.target = "_blank";
|
|
338
|
-
elink.href = URL.createObjectURL(blob);
|
|
339
|
-
document.body.appendChild(elink);
|
|
340
|
-
elink.click();
|
|
341
|
-
URL.revokeObjectURL(elink.href);
|
|
342
|
-
document.body.removeChild(elink);
|
|
343
|
-
resolve(true);
|
|
344
|
-
}).catch((error) => {
|
|
345
|
-
reject(error);
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
319
|
function saveFunc(params, isListButton) {
|
|
350
320
|
return new Promise((resolve, reject) => {
|
|
351
321
|
const pageContext = params.pageContext;
|
|
@@ -512,7 +482,6 @@ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
|
|
|
512
482
|
if (commonEntity.formNo) {
|
|
513
483
|
pageContext.initFormNo = commonEntity.formNo;
|
|
514
484
|
}
|
|
515
|
-
debugger;
|
|
516
485
|
const totalModel = { ...dataModel, ...pageContext.entity.page };
|
|
517
486
|
afterSuccessOperateInForm(pageContext, configureObj, totalModel);
|
|
518
487
|
}
|
|
@@ -577,7 +546,6 @@ function updateValuesWhenCloseDialog(parentPageContext, parentConfigureObj, sour
|
|
|
577
546
|
});
|
|
578
547
|
}
|
|
579
548
|
function updateWithPageValue(sourceModel, valueMappings, parentPageContext) {
|
|
580
|
-
debugger;
|
|
581
549
|
const entity = parentPageContext.entity.data;
|
|
582
550
|
if (sourceModel && sourceModel !== null && entity && entity !== null && valueMappings) {
|
|
583
551
|
let sourceEntity = sourceModel;
|
|
@@ -1609,7 +1577,7 @@ function printLabel(params) {
|
|
|
1609
1577
|
printLabelUtil.printLabel(params, templateUuid);
|
|
1610
1578
|
}
|
|
1611
1579
|
function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
|
|
1612
|
-
let isVisible =
|
|
1580
|
+
let isVisible = false;
|
|
1613
1581
|
if (standardEventName && buttonInfo) {
|
|
1614
1582
|
if (standardEventName === "workflowSave") {
|
|
1615
1583
|
isVisible = isVisibleWorkflowSave(buttonInfo);
|
|
@@ -74,25 +74,10 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
74
74
|
}
|
|
75
75
|
function getValidator(columns) {
|
|
76
76
|
const rules = {};
|
|
77
|
-
if (columns) {
|
|
78
|
-
columns.forEach((editField) => {
|
|
79
|
-
const prop = editField.model;
|
|
80
|
-
if (prop && editField.validations) {
|
|
81
|
-
const validations = editField.validations;
|
|
82
|
-
if (prop.indexOf(".") > 0) {
|
|
83
|
-
setObjectPropRule(editField.prop, rules, validations);
|
|
84
|
-
} else {
|
|
85
|
-
if (validations && validations.length > 0) {
|
|
86
|
-
rules[prop] = [...validations];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
77
|
return rules;
|
|
93
78
|
}
|
|
94
79
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
95
|
-
return validatorEntity(entity, rules, columns, rowIndex, true
|
|
80
|
+
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
96
81
|
}
|
|
97
82
|
function sublistVerify(rules) {
|
|
98
83
|
if (!rules) {
|
|
@@ -118,7 +103,7 @@ function sublistVerify(rules) {
|
|
|
118
103
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
119
104
|
let validateRules = sublistVerify(rules);
|
|
120
105
|
if ((!rules || rules === null) && columns) {
|
|
121
|
-
validateRules = getValidator(
|
|
106
|
+
validateRules = getValidator();
|
|
122
107
|
}
|
|
123
108
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
124
109
|
entity["validateErrorField"] = "";
|
|
@@ -136,11 +121,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
136
121
|
if (errors) {
|
|
137
122
|
result = errors[0].message;
|
|
138
123
|
fieldName = errors[0]["field"];
|
|
139
|
-
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
140
|
-
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
141
|
-
row: rowIndex + 1
|
|
142
|
-
}) + "," + result;
|
|
143
|
-
}
|
|
144
124
|
ElMessage({
|
|
145
125
|
message: result,
|
|
146
126
|
showClose: true,
|
|
@@ -153,11 +133,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
153
133
|
}
|
|
154
134
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
155
135
|
const reg1 = /[A-Z]+/;
|
|
156
|
-
if (
|
|
136
|
+
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
157
137
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
158
138
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
159
139
|
delete copyEntity[fieldName.toLowerCase()];
|
|
160
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false
|
|
140
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
161
141
|
}
|
|
162
142
|
}
|
|
163
143
|
}
|
|
@@ -169,26 +149,16 @@ function validateDataModelFunc(pageContext, configureObj, isEnableRequired) {
|
|
|
169
149
|
const pageModel = pageContext.entity.page;
|
|
170
150
|
const data = { ...pageModel, ...dataModel };
|
|
171
151
|
const rules = pageContext.rules;
|
|
172
|
-
if (isEnableRequired === void 0 || isEnableRequired === null) {
|
|
173
|
-
isEnableRequired = configureObj.props.verification ? configureObj.props.verification.required : false;
|
|
174
|
-
if (typeof isEnableRequired === "undefined") {
|
|
175
|
-
isEnableRequired = false;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
152
|
return validateDataModel(isEnableRequired, data, rules, pageContext);
|
|
179
153
|
}
|
|
180
154
|
function validateDataModel(isEnableRequired, dataModel, rules, pageContext) {
|
|
181
|
-
|
|
155
|
+
{
|
|
182
156
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
183
157
|
if (isWorkflow) {
|
|
184
158
|
return validateWorkflowFormDataModel(dataModel, pageContext);
|
|
185
159
|
} else {
|
|
186
160
|
return validateCommonFormDataModel(dataModel, pageContext, rules);
|
|
187
161
|
}
|
|
188
|
-
} else {
|
|
189
|
-
return new Promise((resolve, reject) => {
|
|
190
|
-
resolve(true);
|
|
191
|
-
});
|
|
192
162
|
}
|
|
193
163
|
}
|
|
194
164
|
function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
@@ -201,10 +171,10 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
201
171
|
let result = false;
|
|
202
172
|
const handleModels = JSON.parse(JSON.stringify(dataModel));
|
|
203
173
|
const rules = pageContext.rules;
|
|
204
|
-
if (!rules) {
|
|
174
|
+
if (!rules || Object.keys(rules).length === 0) {
|
|
205
175
|
result = true;
|
|
206
176
|
} else {
|
|
207
|
-
result = validator(handleModels, rules, null, null
|
|
177
|
+
result = validator(handleModels, rules, null, null);
|
|
208
178
|
}
|
|
209
179
|
if (result === true) {
|
|
210
180
|
const workflowFieldPermissionRules = pageContext.workflowRules;
|
|
@@ -265,10 +235,10 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
265
235
|
function validateCommonFormDataModel(dataModel, pageContext, rules) {
|
|
266
236
|
return new Promise((resolve, reject) => {
|
|
267
237
|
const handleModels = JSON.parse(JSON.stringify(dataModel));
|
|
268
|
-
if (!rules) {
|
|
238
|
+
if (!rules || Object.keys(rules).length === 0) {
|
|
269
239
|
resolve(handleModels);
|
|
270
240
|
} else {
|
|
271
|
-
const validateEntityResult = validator(handleModels, rules, null, null
|
|
241
|
+
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
272
242
|
if (validateEntityResult === true) {
|
|
273
243
|
const validateResult = validateSubTables(pageContext);
|
|
274
244
|
if (validateResult === true) {
|
|
@@ -109,8 +109,7 @@ function getRequestObject(pageRequest) {
|
|
|
109
109
|
Object.assign(requestObj, route.query);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
if (requestObj["_t_"])
|
|
113
|
-
;
|
|
112
|
+
if (requestObj["_t_"]) ;
|
|
114
113
|
return requestObj;
|
|
115
114
|
}
|
|
116
115
|
function getModelFields(pageContext, formItemConfigure, prop) {
|
|
@@ -16,10 +16,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
setup(__props, { expose: __expose }) {
|
|
17
17
|
const props = __props;
|
|
18
18
|
const pageContext = props.pageContext;
|
|
19
|
-
|
|
20
|
-
const runtimeInfo =
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
let configure = props.configure;
|
|
20
|
+
const runtimeInfo = ref({});
|
|
21
|
+
if (pageContext.isTest) {
|
|
22
|
+
runtimeInfo.value = props.configure.runtime ? props.configure.runtime : {};
|
|
23
|
+
} else {
|
|
24
|
+
if (pageContext.tableRuntimes && pageContext.tableRuntimes[configure.uuid]) {
|
|
25
|
+
configure = JSON.parse(pageContext.tableRuntimes[configure.uuid].configure);
|
|
26
|
+
runtimeInfo.value = configure.runtime ? configure.runtime : {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const runtimeStyle = runtimeInfo.value.style;
|
|
30
|
+
const runtimeClass = runtimeInfo.value.class;
|
|
23
31
|
const systemCode = pageContext.systemCode;
|
|
24
32
|
const backendUrl = pageContext.backendUrl;
|
|
25
33
|
const tableName = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.tableName;
|
|
@@ -285,11 +293,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
285
293
|
}
|
|
286
294
|
return onClick;
|
|
287
295
|
}
|
|
288
|
-
function beforeSaveRow({
|
|
289
|
-
row,
|
|
290
|
-
columns,
|
|
291
|
-
additionalParamMap
|
|
292
|
-
}) {
|
|
296
|
+
function beforeSaveRow({ row, columns, additionalParamMap }) {
|
|
293
297
|
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
294
298
|
const tableConfigure = configure;
|
|
295
299
|
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
@@ -28,14 +28,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
setVariableValue(entity, fields, defaultValue);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
const prefixType = props.property.prefixType;
|
|
32
|
+
let prefixValue = props.property.prefixValue;
|
|
33
|
+
prefixValue = prefixValue == void 0 || prefixValue == null ? "" : prefixValue;
|
|
31
34
|
let dynamicModelMethod = null;
|
|
32
35
|
if (fields.length > 0) {
|
|
33
36
|
dynamicModelMethod = computed({
|
|
34
37
|
get() {
|
|
35
|
-
|
|
38
|
+
const value = getVariableValue(entity, fields);
|
|
39
|
+
if (prefixType === "checkbox") {
|
|
40
|
+
if (value === null || value === void 0) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (Array.isArray(value)) {
|
|
44
|
+
return value.includes(prefixValue);
|
|
45
|
+
} else {
|
|
46
|
+
return value === prefixValue;
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
36
51
|
},
|
|
37
52
|
set(value) {
|
|
38
|
-
|
|
53
|
+
if (prefixType === "checkbox") {
|
|
54
|
+
let newValues = getVariableValue(entity, fields);
|
|
55
|
+
if (!newValues) {
|
|
56
|
+
newValues = [];
|
|
57
|
+
}
|
|
58
|
+
if (!Array.isArray(newValues)) {
|
|
59
|
+
newValues = [newValues];
|
|
60
|
+
}
|
|
61
|
+
const index = newValues.indexOf(prefixValue);
|
|
62
|
+
if (value) {
|
|
63
|
+
if (index == -1) {
|
|
64
|
+
newValues.push(prefixValue);
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
if (index > -1) {
|
|
68
|
+
newValues.splice(index, 1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
setVariableValue(entity, fields, newValues);
|
|
72
|
+
} else {
|
|
73
|
+
setVariableValue(entity, fields, value);
|
|
74
|
+
}
|
|
39
75
|
}
|
|
40
76
|
});
|
|
41
77
|
}
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getDateShortCuts } from "../../../../utils/form/date-shortcuts.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getValueFromVariable, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { getCustomFunc, handleEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "datepicker-runtime",
|
|
8
9
|
props: {
|
|
@@ -12,41 +13,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
13
|
setup(__props) {
|
|
13
14
|
const props = __props;
|
|
14
15
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
15
|
-
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
16
|
-
const dynamicModelMethod = computed({
|
|
17
|
-
get() {
|
|
18
|
-
return getVariableValue(entity, dynamicFields);
|
|
19
|
-
},
|
|
20
|
-
set(value) {
|
|
21
|
-
setVariableValue(entity, dynamicFields, value);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
16
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
25
17
|
const runtimeStyle = runtimeInfo.style;
|
|
26
18
|
const runtimeClass = runtimeInfo.class;
|
|
27
19
|
const headerStyle = runtimeInfo.headerStyle;
|
|
28
20
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
21
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
22
|
+
let dynamicFields2 = null;
|
|
23
|
+
let isRange = false;
|
|
29
24
|
if (designProperty.value.dateType && designProperty.value.dateType.includes("range")) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
isRange = true;
|
|
26
|
+
let propName = designProperty.value.prop2;
|
|
27
|
+
if (!propName || !propName.startsWith("${")) {
|
|
28
|
+
propName = "${page." + props.configure.uuid + "-2}";
|
|
33
29
|
}
|
|
30
|
+
propName = propName.substring(2, propName.length - 1);
|
|
31
|
+
dynamicFields2 = propName.split(".");
|
|
34
32
|
if (!entity.data || !entity.data.id && !entity.data.ID) {
|
|
35
33
|
if (designProperty.value.defaultValue2) {
|
|
36
34
|
const defaultValue2 = getValueFromVariable(entity, designProperty.value.defaultValue2);
|
|
37
|
-
|
|
38
|
-
if (hisValue.length == 0) {
|
|
39
|
-
hisValue.push(void 0);
|
|
40
|
-
}
|
|
41
|
-
if (hisValue.length > 1) {
|
|
42
|
-
hisValue[1] = defaultValue2;
|
|
43
|
-
} else {
|
|
44
|
-
hisValue.push(defaultValue2);
|
|
45
|
-
}
|
|
35
|
+
setVariableValue(entity, dynamicFields2, defaultValue2);
|
|
46
36
|
}
|
|
47
37
|
}
|
|
48
|
-
setVariableValue(entity, dynamicFields, hisValue);
|
|
49
38
|
}
|
|
39
|
+
const dynamicModelMethod = computed({
|
|
40
|
+
get() {
|
|
41
|
+
if (isRange) {
|
|
42
|
+
const values = [];
|
|
43
|
+
values.push(getVariableValue(entity, dynamicFields));
|
|
44
|
+
values.push(getVariableValue(entity, dynamicFields2));
|
|
45
|
+
return values;
|
|
46
|
+
} else {
|
|
47
|
+
return getVariableValue(entity, dynamicFields);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
set(value) {
|
|
51
|
+
if (isRange) {
|
|
52
|
+
if (Array.isArray(value)) {
|
|
53
|
+
setVariableValue(entity, dynamicFields, value[0]);
|
|
54
|
+
setVariableValue(entity, dynamicFields2, value[1]);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
setVariableValue(entity, dynamicFields, value);
|
|
58
|
+
}
|
|
59
|
+
console.log("entity", entity);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
50
62
|
const shortcuts = ref(
|
|
51
63
|
getDateShortCuts(
|
|
52
64
|
designProperty.value.dateScopeDetails,
|
|
@@ -76,7 +88,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
88
|
}
|
|
77
89
|
}
|
|
78
90
|
}
|
|
79
|
-
console.log("shortcuts", shortcuts.value);
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
return (_ctx, _cache) => {
|
|
@@ -93,7 +104,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
104
|
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
94
105
|
key: 0,
|
|
95
106
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
96
|
-
},
|
|
107
|
+
}, [
|
|
108
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
109
|
+
key: 0,
|
|
110
|
+
pageContext: _ctx.pageContext,
|
|
111
|
+
property: designProperty.value
|
|
112
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
113
|
+
createTextVNode(toDisplayString(designProperty.value.title), 1)
|
|
114
|
+
], 64))
|
|
115
|
+
], 4)) : createCommentVNode("", true)
|
|
97
116
|
]),
|
|
98
117
|
default: withCtx(() => [
|
|
99
118
|
designProperty.value.dateType == "time" || designProperty.value.dateType == "timerange" ? (openBlock(), createBlock(_component_el_time_picker, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import "agilebuilder-ui/src/utils/request";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
6
6
|
import "../../../../utils/global-refs.js";
|
|
7
7
|
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
8
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "depttree-runtime",
|
|
10
11
|
props: {
|
|
@@ -45,7 +46,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
46
47
|
key: 0,
|
|
47
48
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
48
|
-
},
|
|
49
|
+
}, [
|
|
50
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
51
|
+
key: 0,
|
|
52
|
+
pageContext: _ctx.pageContext,
|
|
53
|
+
property: designProperty.value
|
|
54
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
55
|
+
createTextVNode(toDisplayString(designProperty.value.title), 1)
|
|
56
|
+
], 64))
|
|
57
|
+
], 4)) : createCommentVNode("", true)
|
|
49
58
|
]),
|
|
50
59
|
default: withCtx(() => [
|
|
51
60
|
createVNode(_component_OrganizationInput, {
|
package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "input-number-runtime",
|
|
7
8
|
props: {
|
|
@@ -38,7 +39,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
39
|
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
39
40
|
key: 0,
|
|
40
41
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
41
|
-
},
|
|
42
|
+
}, [
|
|
43
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
44
|
+
key: 0,
|
|
45
|
+
pageContext: _ctx.pageContext,
|
|
46
|
+
property: designProperty.value
|
|
47
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
48
|
+
createTextVNode(toDisplayString(designProperty.value.title), 1)
|
|
49
|
+
], 64))
|
|
50
|
+
], 4)) : createCommentVNode("", true)
|
|
42
51
|
]),
|
|
43
52
|
default: withCtx(() => [
|
|
44
53
|
createVNode(_component_el_input_number, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import Quill from "quill";
|
|
@@ -44,6 +44,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
"32px",
|
|
45
45
|
"36px"
|
|
46
46
|
];
|
|
47
|
+
let hisState = designProperty.value.state;
|
|
48
|
+
function checkReadonly(state) {
|
|
49
|
+
return state == "readonly" || state == "disabled";
|
|
50
|
+
}
|
|
51
|
+
const initReadonly = checkReadonly(hisState);
|
|
47
52
|
const option = ref({
|
|
48
53
|
modules: {
|
|
49
54
|
toolbar: [
|
|
@@ -76,21 +81,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
81
|
]
|
|
77
82
|
},
|
|
78
83
|
theme: "snow",
|
|
79
|
-
placeholder: designProperty.value.placeholder,
|
|
80
|
-
readOnly:
|
|
84
|
+
placeholder: initReadonly ? "" : designProperty.value.placeholder,
|
|
85
|
+
readOnly: initReadonly
|
|
86
|
+
});
|
|
87
|
+
watch(designProperty.value, () => {
|
|
88
|
+
const newState = designProperty.value.state;
|
|
89
|
+
if (newState != void 0 && newState !== hisState) {
|
|
90
|
+
hisState = newState;
|
|
91
|
+
const isReadonly = checkReadonly(hisState);
|
|
92
|
+
if (quill.value) {
|
|
93
|
+
quill.value.enable(!isReadonly);
|
|
94
|
+
quill.value.root.dataset.placeholder = isReadonly ? "" : designProperty.value.placeholder;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
81
97
|
});
|
|
82
98
|
function updateEditorHeight() {
|
|
83
|
-
if (quill.value && quill.value) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
newHeight = 100;
|
|
91
|
-
}
|
|
92
|
-
quill.value.container.style.height = newHeight + "px";
|
|
99
|
+
if (quill.value && quill.value.container) {
|
|
100
|
+
const parentNode = quill.value.container.parentNode;
|
|
101
|
+
const parentRect = parentNode.getBoundingClientRect();
|
|
102
|
+
const thisRect = quill.value.container.getBoundingClientRect();
|
|
103
|
+
let newHeight = parentRect.height - (thisRect.top - parentRect.top);
|
|
104
|
+
if (newHeight < 100) {
|
|
105
|
+
newHeight = 100;
|
|
93
106
|
}
|
|
107
|
+
quill.value.container.style.height = newHeight + "px";
|
|
94
108
|
}
|
|
95
109
|
}
|
|
96
110
|
const handleUpload = (e) => {
|
|
@@ -164,11 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
178
|
if (!baseUrl) {
|
|
165
179
|
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
166
180
|
}
|
|
167
|
-
return http.post(
|
|
168
|
-
baseUrl + "/common/fs-upload/rich-editor-image",
|
|
169
|
-
params,
|
|
170
|
-
config
|
|
171
|
-
);
|
|
181
|
+
return http.post(baseUrl + "/common/fs-upload/rich-editor-image", params, config);
|
|
172
182
|
}
|
|
173
183
|
function dataURLtoFile(dataurl, filename) {
|
|
174
184
|
let arr = dataurl.split(",");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode,
|
|
1
|
+
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
5
6
|
const _hoisted_1 = { style: { "float": "left" } };
|
|
6
7
|
const _hoisted_2 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -153,7 +154,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
154
|
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
154
155
|
key: 0,
|
|
155
156
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
156
|
-
},
|
|
157
|
+
}, [
|
|
158
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
159
|
+
key: 0,
|
|
160
|
+
pageContext: _ctx.pageContext,
|
|
161
|
+
property: designProperty.value
|
|
162
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
163
|
+
createTextVNode(toDisplayString(designProperty.value.title), 1)
|
|
164
|
+
], 64))
|
|
165
|
+
], 4)) : createCommentVNode("", true)
|
|
157
166
|
]),
|
|
158
167
|
default: withCtx(() => [
|
|
159
168
|
createVNode(_component_el_select, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, toDisplayString, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "textarea-runtime",
|
|
7
8
|
props: {
|
|
@@ -39,7 +40,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
40
|
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
40
41
|
key: 0,
|
|
41
42
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
42
|
-
},
|
|
43
|
+
}, [
|
|
44
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
45
|
+
key: 0,
|
|
46
|
+
pageContext: _ctx.pageContext,
|
|
47
|
+
property: designProperty.value
|
|
48
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
49
|
+
createTextVNode(toDisplayString(designProperty.value.title), 1)
|
|
50
|
+
], 64))
|
|
51
|
+
], 4)) : createCommentVNode("", true)
|
|
43
52
|
]),
|
|
44
53
|
default: withCtx(() => [
|
|
45
54
|
createVNode(_component_el_input, {
|
|
@@ -23,15 +23,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
packageFormRules(props.pageContext, props.configure);
|
|
24
24
|
let handleShowFlag = ref(true);
|
|
25
25
|
let showFlag = ref(true);
|
|
26
|
-
if (props.configure && props.configure.props
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
if (props.configure && props.configure.props) {
|
|
27
|
+
if (props.configure.props.showConditions) {
|
|
28
|
+
const showConditions = props.configure.props.showConditions;
|
|
29
|
+
if (showConditions.length > 0) {
|
|
30
|
+
showFlag = computed(() => {
|
|
31
|
+
if (!handleShowFlag.value) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return caculateShowCondition(props.pageContext, props.configure, showConditions);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (props.configure.props.editConditions) {
|
|
39
|
+
const editConditions = props.configure.props.editConditions;
|
|
40
|
+
if (editConditions.length > 0) {
|
|
41
|
+
const runtime = props.configure.runtime ? props.configure.runtime : {};
|
|
42
|
+
const property = runtime.props ? runtime.props : {};
|
|
43
|
+
property.rawSate = property.state;
|
|
44
|
+
property.state = computed(() => {
|
|
45
|
+
const canEdit = caculateShowCondition(props.pageContext, props.configure, editConditions);
|
|
46
|
+
return canEdit ? "" : "disabled";
|
|
47
|
+
});
|
|
48
|
+
}
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
const dynamicComponent = ref({});
|
|
@@ -224,16 +224,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
224
224
|
}
|
|
225
225
|
onMounted(() => {
|
|
226
226
|
initPage();
|
|
227
|
-
if (thisRef.value) {
|
|
228
|
-
setTimeout(() => {
|
|
229
|
-
const parentNode = thisRef.value.parentNode ? thisRef.value.parentNode : thisRef.value;
|
|
230
|
-
const rect = parentNode.getBoundingClientRect();
|
|
231
|
-
const contentHeight = window.innerHeight - rect.y - 40;
|
|
232
|
-
parentNode.style.height = contentHeight + "px";
|
|
233
|
-
parentNode.style["overflow-y"] = "auto";
|
|
234
|
-
}, 10);
|
|
235
|
-
}
|
|
236
227
|
});
|
|
228
|
+
function setContextStyle() {
|
|
229
|
+
nextTick(() => {
|
|
230
|
+
const parentNode = thisRef.value.parentNode ? thisRef.value.parentNode : thisRef.value;
|
|
231
|
+
const rect = parentNode.getBoundingClientRect();
|
|
232
|
+
const contentHeight = window.innerHeight - rect.y - 40;
|
|
233
|
+
parentNode.style.height = contentHeight + "px";
|
|
234
|
+
parentNode.style["overflow-y"] = "auto";
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
237
|
function initPage() {
|
|
238
238
|
if (props.pageDesign != null) {
|
|
239
239
|
pageDesignResult.value = props.pageDesign;
|
|
@@ -242,12 +242,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
242
|
if (props.pageDesign.tableRuntimes && Object.keys(props.pageDesign.tableRuntimes).length > 0) {
|
|
243
243
|
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((superGridItems) => {
|
|
244
244
|
pageContext.value.superGridItems = superGridItems;
|
|
245
|
+
}).catch((error) => {
|
|
246
|
+
console.log("queryPageSuperGrids error", error);
|
|
247
|
+
}).finally(() => {
|
|
245
248
|
isShowPage.value = true;
|
|
246
|
-
|
|
247
|
-
isShowPage.value = true;
|
|
249
|
+
setContextStyle();
|
|
248
250
|
});
|
|
249
251
|
} else {
|
|
250
252
|
isShowPage.value = true;
|
|
253
|
+
setContextStyle();
|
|
251
254
|
}
|
|
252
255
|
sessionCacheDataId();
|
|
253
256
|
});
|
|
@@ -303,12 +306,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
303
306
|
buttonParams.value = null;
|
|
304
307
|
}
|
|
305
308
|
function doExportFormReport(templateFile) {
|
|
306
|
-
const isPdf = false;
|
|
307
309
|
exportFormReport(
|
|
308
310
|
buttonParams.value.pageContext,
|
|
309
311
|
buttonParams.value.configureObj,
|
|
310
|
-
templateFile
|
|
311
|
-
isPdf
|
|
312
|
+
templateFile
|
|
312
313
|
);
|
|
313
314
|
}
|
|
314
315
|
const _selectFile_ = ref(null);
|
|
@@ -320,8 +321,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
321
|
if (!_selectFile_.value) {
|
|
321
322
|
return;
|
|
322
323
|
}
|
|
323
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
324
|
-
return;
|
|
324
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
325
325
|
const fileObj = _selectFile_.value.files[0];
|
|
326
326
|
if (fileObj) {
|
|
327
327
|
_selectFile_.value.value = null;
|
|
@@ -391,34 +391,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
391
391
|
}
|
|
392
392
|
const router = useRouter();
|
|
393
393
|
function openDialog(configureObj, eventParams, myJumpPageSetting) {
|
|
394
|
-
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then(
|
|
395
|
-
(openPageParams)
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
router.push({
|
|
413
|
-
path: "/dsc/page",
|
|
414
|
-
query: popPageSetting
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
} else {
|
|
418
|
-
console.error("页面配置信息不存在");
|
|
394
|
+
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
|
|
395
|
+
if (openPageParams) {
|
|
396
|
+
const jumpMode = openPageParams.jumpMode;
|
|
397
|
+
const popPageSetting = openPageParams;
|
|
398
|
+
popPageSetting.parentPageCode = parentPageContext.value.code;
|
|
399
|
+
popPageSetting.parentPageVersion = parentPageContext.value.version;
|
|
400
|
+
popPageSetting.isNewPage = true;
|
|
401
|
+
if (jumpMode === "popup") {
|
|
402
|
+
eventBus.$on(eventPageInfo.value + "close-dialog", (params) => {
|
|
403
|
+
closeFunc(params);
|
|
404
|
+
});
|
|
405
|
+
jumpPageSetting.value = popPageSetting;
|
|
406
|
+
isShowDialog.value = true;
|
|
407
|
+
} else if (jumpMode === "refresh") {
|
|
408
|
+
router.push({
|
|
409
|
+
path: "/dsc/page",
|
|
410
|
+
query: popPageSetting
|
|
411
|
+
});
|
|
419
412
|
}
|
|
413
|
+
} else {
|
|
414
|
+
console.error("页面配置信息不存在");
|
|
420
415
|
}
|
|
421
|
-
);
|
|
416
|
+
});
|
|
422
417
|
}
|
|
423
418
|
function closeFunc(params) {
|
|
424
419
|
const jumpMode = params.jumpMode;
|