super-page-runtime 2.1.57 → 2.1.62
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/api/page-expose-util.js +17 -14
- package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/event-util.js +4 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +105 -37
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.d.ts +1 -0
- package/dist/es/components/runtime/utils/table-utils.js +36 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +12 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -1
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +14 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +16 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +13 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +4 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +14 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +11 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +30 -10
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +9 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +13 -30
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +29 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +24 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +31 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +26 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +29 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +27 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +29 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +26 -4
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +31 -5
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -3
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +18 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +29 -4
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +25 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +29 -2
- package/dist/es/components/runtime/views/super-page.vue.js +3 -3
- package/dist/es/i18n/langs/cn.js +3 -1
- package/dist/es/i18n/langs/en.js +3 -1
- package/dist/es/style.css +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { getComponentRefByCode, getComponentRef } from "../global-refs.js";
|
|
|
3
3
|
import eventBus from "../eventBus.js";
|
|
4
4
|
import http from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { getAdditionalParamMap, refreshPage } from "../events/standard-event.js";
|
|
6
|
-
import { updateFormItemEditState,
|
|
6
|
+
import { updateFormItemEditState, disabledAllFields } from "../events/validator-util.js";
|
|
7
7
|
import { getBaseUrl, deepCopy } from "../common-util.js";
|
|
8
8
|
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
9
9
|
import { getFormModelFields, getModelFields } from "../page-init-util.js";
|
|
@@ -180,8 +180,8 @@ const functions = {
|
|
|
180
180
|
* 禁用所有字段
|
|
181
181
|
* @param pageContext 页面上下文
|
|
182
182
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
disabledAllFields(pageContext) {
|
|
184
|
+
disabledAllFields(pageContext);
|
|
185
185
|
},
|
|
186
186
|
/**
|
|
187
187
|
* 控制表格编辑权限
|
|
@@ -215,7 +215,7 @@ const functions = {
|
|
|
215
215
|
params.requestParams = getAdditionalParamMap(pageContext);
|
|
216
216
|
}
|
|
217
217
|
if (!params.taskParamMap) {
|
|
218
|
-
params.
|
|
218
|
+
params.taskParamMap = pageContext.entity.task;
|
|
219
219
|
}
|
|
220
220
|
let baseUrl = pageContext.backendUrl;
|
|
221
221
|
if (!baseUrl) {
|
|
@@ -227,8 +227,7 @@ const functions = {
|
|
|
227
227
|
eventBus.$emit(pageContext.code + "_open-dialog", {
|
|
228
228
|
pageContext,
|
|
229
229
|
eventParams: openParam.eventParams,
|
|
230
|
-
configureObj: { props: { linkPage: openParam } }
|
|
231
|
-
jumpPageSetting: openParam.jumpPageSetting
|
|
230
|
+
configureObj: { props: { linkPage: openParam } }
|
|
232
231
|
});
|
|
233
232
|
},
|
|
234
233
|
/**
|
|
@@ -317,9 +316,13 @@ const functions = {
|
|
|
317
316
|
isMobile() {
|
|
318
317
|
return isMobileBrowser();
|
|
319
318
|
},
|
|
320
|
-
//
|
|
319
|
+
// 根据获取组件引用对象
|
|
320
|
+
getComponentRefByProp(pageContext, prop) {
|
|
321
|
+
return getComponentRefByCode(pageContext, prop);
|
|
322
|
+
},
|
|
323
|
+
// 根据组件唯一编码获取组件引用对象
|
|
321
324
|
getComponentRefByCode(pageContext, code) {
|
|
322
|
-
return
|
|
325
|
+
return getComponentRef(pageContext, code);
|
|
323
326
|
},
|
|
324
327
|
// 获得表单数据查看信息,例如:下拉框选项名等
|
|
325
328
|
getFormViewData(pageContext) {
|
|
@@ -327,7 +330,7 @@ const functions = {
|
|
|
327
330
|
const entity = pageContext.entity ? pageContext.entity : {};
|
|
328
331
|
const viewEntity = deepCopy(entity);
|
|
329
332
|
const optionSourceMap = getOptionDatasSourceMap(pageContext);
|
|
330
|
-
for (
|
|
333
|
+
for (const uuid in optionSourceMap) {
|
|
331
334
|
const cacheOptions = getComponentOptionDatasFromPage(pageContext, uuid);
|
|
332
335
|
const componentRef = getComponentRef(pageContext, uuid);
|
|
333
336
|
if (componentRef) {
|
|
@@ -335,7 +338,7 @@ const functions = {
|
|
|
335
338
|
if (componentConfigure) {
|
|
336
339
|
if (((_b = (_a = componentConfigure.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && (((_d = (_c = componentConfigure.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) === "static" || ((_f = (_e = componentConfigure.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType) === "optionGroup")) {
|
|
337
340
|
if (componentConfigure.name && (componentConfigure.name === "select" && ((_h = (_g = componentConfigure.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || componentConfigure.name === "checkbox")) {
|
|
338
|
-
|
|
341
|
+
const dynamicFields = getFormModelFields(pageContext, componentConfigure);
|
|
339
342
|
const propValue = getVariableValue(viewEntity, dynamicFields);
|
|
340
343
|
if (propValue) {
|
|
341
344
|
const propValues = propValue.split(",");
|
|
@@ -343,7 +346,7 @@ const functions = {
|
|
|
343
346
|
setVariableValue(viewEntity, dynamicFields, label);
|
|
344
347
|
}
|
|
345
348
|
} else {
|
|
346
|
-
|
|
349
|
+
const dynamicFields = getFormModelFields(pageContext, componentConfigure);
|
|
347
350
|
const propValue = getVariableValue(viewEntity, dynamicFields);
|
|
348
351
|
const label = getSelectShowLable(propValue, cacheOptions);
|
|
349
352
|
setVariableValue(viewEntity, dynamicFields, label);
|
|
@@ -353,7 +356,7 @@ const functions = {
|
|
|
353
356
|
}
|
|
354
357
|
}
|
|
355
358
|
const listCodesMap = pageContext.listCodesMap;
|
|
356
|
-
for (
|
|
359
|
+
for (const listCode in listCodesMap) {
|
|
357
360
|
let tableUuid;
|
|
358
361
|
if (listCode.indexOf("__") > 0) {
|
|
359
362
|
tableUuid = listCode.substring(listCode.lastIndexOf("__") + "__".length);
|
|
@@ -363,7 +366,7 @@ const functions = {
|
|
|
363
366
|
if (componentRef) {
|
|
364
367
|
const componentConfigure = componentRef.getConfigure();
|
|
365
368
|
const prop = componentConfigure.code ? componentConfigure.code : listCode;
|
|
366
|
-
|
|
369
|
+
const dynamicFields = getModelFields(componentConfigure, prop);
|
|
367
370
|
const gridData = getVariableValue(viewEntity, dynamicFields);
|
|
368
371
|
const subTableOptions = componentRef.getTableSelectOptions(listCode);
|
|
369
372
|
packageSubTableShowLable(subTableOptions, gridData);
|
|
@@ -420,7 +423,7 @@ function getSingleSelectShowLable(propValue, propSelectOptions) {
|
|
|
420
423
|
for (let i = 0; i < propSelectOptions.length; i++) {
|
|
421
424
|
const optValue = propSelectOptions[i].value;
|
|
422
425
|
const optLabel = propSelectOptions[i].label ? propSelectOptions[i].label : propSelectOptions[i].name;
|
|
423
|
-
if (propValue + "" === optValue + "" &&
|
|
426
|
+
if (propValue + "" === optValue + "" && optLabel !== void 0 && optLabel !== null) {
|
|
424
427
|
showLabel = optLabel;
|
|
425
428
|
break;
|
|
426
429
|
}
|
|
@@ -25,6 +25,7 @@ export declare function appendDefaultMethods(func: any, pageContext: PageContext
|
|
|
25
25
|
export declare function removeCustomFuncFromWindow(pageDesign: PageDesign): void;
|
|
26
26
|
export declare function handleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
|
|
27
27
|
export declare function handleFormEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
|
|
28
|
+
export declare function handleAfterInitEvent($event: any, pageContext: PageContext, configure: Component, otherParams?: object): any;
|
|
28
29
|
export declare function getHandleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
|
|
29
30
|
export declare function getTableUuid(pageContext: PageContext, configure: Component): any;
|
|
30
31
|
export declare function handleEventByEventName(pageContext: PageContext, configure: Component, eventName: string, otherParams?: object): any;
|
|
@@ -109,6 +109,9 @@ function handleFormEvent($event, pageContext, configure, eventType, otherParams)
|
|
|
109
109
|
}
|
|
110
110
|
return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, true);
|
|
111
111
|
}
|
|
112
|
+
function handleAfterInitEvent($event, pageContext, configure, otherParams) {
|
|
113
|
+
return handleFormEvent($event, pageContext, configure, "afterInit", otherParams);
|
|
114
|
+
}
|
|
112
115
|
function getHandleEvent($event, pageContext, configure, eventType, otherParams) {
|
|
113
116
|
return handleEventUtil($event, pageContext, configure, eventType, false, otherParams, false);
|
|
114
117
|
}
|
|
@@ -712,6 +715,7 @@ export {
|
|
|
712
715
|
gridSelectAllRecords,
|
|
713
716
|
gridSelectRecord,
|
|
714
717
|
gridSelectionChange,
|
|
718
|
+
handleAfterInitEvent,
|
|
715
719
|
handleChartEvent,
|
|
716
720
|
handleEvent,
|
|
717
721
|
handleFormEvent,
|
|
@@ -9,7 +9,7 @@ import axios from "axios";
|
|
|
9
9
|
import { getTableUuid, handleEvent, doAfterClickEvent } from "./event-util.js";
|
|
10
10
|
import { setStoreInfo } from "../store-util.js";
|
|
11
11
|
import { getPermissionCodes, getDefaultValue, getModelFields } from "../page-init-util.js";
|
|
12
|
-
import { updateChartDatasources, getVariableValue, setVariableValue } from "../page-helper-util.js";
|
|
12
|
+
import { updateChartDatasources, caculateShowCondition, getVariableValue, setVariableValue } from "../page-helper-util.js";
|
|
13
13
|
import printLabelUtil from "./print-label.js";
|
|
14
14
|
import { getTableNameByTableUuid } from "../table-utils.js";
|
|
15
15
|
import { packageCustomRules, getWorkflowRules } from "./validator-util.js";
|
|
@@ -744,8 +744,17 @@ function dealAfterWithList(pageContext, configureObj, row, successTip) {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
function refreshFormOrListPage(pageContext, configureObj, isRefreshWhenClosePopup) {
|
|
747
|
-
|
|
748
|
-
|
|
747
|
+
var _a;
|
|
748
|
+
if (configureObj && !configureObj.props.base) {
|
|
749
|
+
configureObj.props.base = {};
|
|
750
|
+
}
|
|
751
|
+
let successOperation = isRefreshWhenClosePopup ? "refresh" : (_a = configureObj.props.base) == null ? void 0 : _a.successOperation;
|
|
752
|
+
console.log(
|
|
753
|
+
"refreshFormOrListPage22=====successOperation=",
|
|
754
|
+
successOperation,
|
|
755
|
+
"isRefreshWhenClosePopup=",
|
|
756
|
+
isRefreshWhenClosePopup
|
|
757
|
+
);
|
|
749
758
|
const buttonForPageType = getPageType(pageContext, configureObj);
|
|
750
759
|
console.log("refreshFormOrListPage22=====buttonForPageType=", buttonForPageType);
|
|
751
760
|
if (buttonForPageType && buttonForPageType === "list" && !successOperation) {
|
|
@@ -948,8 +957,8 @@ function downloadTemplateFunc(params) {
|
|
|
948
957
|
let templateUUID;
|
|
949
958
|
let templateShowPath;
|
|
950
959
|
if (templateFilesResult && templateFilesResult.length > 0) {
|
|
951
|
-
templateUUID = templateFilesResult[0].
|
|
952
|
-
templateShowPath = templateFilesResult[0].
|
|
960
|
+
templateUUID = templateFilesResult[0].templateUuid;
|
|
961
|
+
templateShowPath = templateFilesResult[0].templateName;
|
|
953
962
|
}
|
|
954
963
|
const systemCode = pageContext.systemCode;
|
|
955
964
|
const backendUrl = pageContext.backendUrl;
|
|
@@ -1255,7 +1264,7 @@ function getWorkflowSaveParams(params) {
|
|
|
1255
1264
|
param["isWorkflowEntity"] = true;
|
|
1256
1265
|
return param;
|
|
1257
1266
|
}
|
|
1258
|
-
function workflowSaveFunc(params) {
|
|
1267
|
+
async function workflowSaveFunc(params) {
|
|
1259
1268
|
return new Promise((resolve, reject) => {
|
|
1260
1269
|
const pageContext = params.pageContext;
|
|
1261
1270
|
const dataModel = pageContext.entity.data;
|
|
@@ -1385,44 +1394,103 @@ function submitProcessFunc(params) {
|
|
|
1385
1394
|
}
|
|
1386
1395
|
});
|
|
1387
1396
|
}
|
|
1388
|
-
function completeTaskFunc(params, operationResult) {
|
|
1397
|
+
async function completeTaskFunc(params, operationResult) {
|
|
1398
|
+
const validateOpinionResult = await validateOpinion(params);
|
|
1389
1399
|
return new Promise((resolve, reject) => {
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
+
var _a;
|
|
1401
|
+
if (validateOpinionResult) {
|
|
1402
|
+
const pageContext = params.pageContext;
|
|
1403
|
+
const systemCode = pageContext.systemCode;
|
|
1404
|
+
const backendUrl = pageContext.backendUrl;
|
|
1405
|
+
const opinion = validateOpinionResult === true ? (_a = pageContext.completeTaskParam) == null ? void 0 : _a.opinion : validateOpinionResult;
|
|
1406
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
|
|
1407
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1408
|
+
if (!path) {
|
|
1409
|
+
ElMessage({
|
|
1410
|
+
showClose: true,
|
|
1411
|
+
type: "warning",
|
|
1412
|
+
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1413
|
+
});
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
const param = getWorkflowSaveParams(params);
|
|
1417
|
+
param["completeTaskParam"] = {
|
|
1418
|
+
operationResult,
|
|
1419
|
+
taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
|
|
1420
|
+
opinion: opinion ? opinion : null
|
|
1421
|
+
};
|
|
1422
|
+
const request = http.post(path, param);
|
|
1423
|
+
request.then((commonEntity) => {
|
|
1424
|
+
let result = true;
|
|
1425
|
+
if (commonEntity) {
|
|
1426
|
+
result = dealCompleteTaskParam(
|
|
1427
|
+
commonEntity,
|
|
1428
|
+
false,
|
|
1429
|
+
pageContext,
|
|
1430
|
+
params,
|
|
1431
|
+
operationResult
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
if (result === true) {
|
|
1435
|
+
ElMessage({
|
|
1436
|
+
showClose: true,
|
|
1437
|
+
type: "success",
|
|
1438
|
+
message: getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
resolve(true);
|
|
1442
|
+
}).catch((error) => {
|
|
1443
|
+
reject(error);
|
|
1400
1444
|
});
|
|
1401
|
-
|
|
1445
|
+
} else {
|
|
1446
|
+
resolve(true);
|
|
1402
1447
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, operationResult);
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
function validateOpinion(params) {
|
|
1451
|
+
return new Promise((resolve, reject) => {
|
|
1452
|
+
var _a, _b, _c, _d;
|
|
1453
|
+
const configureObj = params.configureObj;
|
|
1454
|
+
if (configureObj) {
|
|
1455
|
+
let isOpinionRequired = false;
|
|
1456
|
+
if ((_b = (_a = configureObj.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isMustOpinion) {
|
|
1457
|
+
isOpinionRequired = true;
|
|
1414
1458
|
}
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1459
|
+
if (isOpinionRequired === true) {
|
|
1460
|
+
const pageContext = params.pageContext;
|
|
1461
|
+
const mustOpinionConditions = (_d = (_c = configureObj.props) == null ? void 0 : _c.base) == null ? void 0 : _d.mustOpinionConditions;
|
|
1462
|
+
isOpinionRequired = caculateShowCondition(pageContext, configureObj, mustOpinionConditions);
|
|
1463
|
+
}
|
|
1464
|
+
if (isOpinionRequired === true) {
|
|
1465
|
+
ElMessageBox.prompt(
|
|
1466
|
+
getI18n().t("superPageRuntimeMessage.pleaseInputOpinion"),
|
|
1467
|
+
getI18n().t("superPageRuntimeMessage.opinion"),
|
|
1468
|
+
{
|
|
1469
|
+
confirmButtonText: getI18n().t("superPageRuntimeMessage.sure"),
|
|
1470
|
+
cancelButtonText: getI18n().t("superPageRuntimeMessage.cancel"),
|
|
1471
|
+
// 输入框类型
|
|
1472
|
+
inputType: "textarea",
|
|
1473
|
+
inputValue: null,
|
|
1474
|
+
closeOnClickModal: false,
|
|
1475
|
+
inputValidator: (value) => {
|
|
1476
|
+
if (value && value.trim()) {
|
|
1477
|
+
return true;
|
|
1478
|
+
} else {
|
|
1479
|
+
return getI18n().t("superPageRuntimeMessage.pleaseInputOpinion");
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
).then(({ value }) => {
|
|
1484
|
+
resolve(value);
|
|
1485
|
+
}).catch(() => {
|
|
1486
|
+
resolve(false);
|
|
1420
1487
|
});
|
|
1488
|
+
} else {
|
|
1489
|
+
resolve(true);
|
|
1421
1490
|
}
|
|
1491
|
+
} else {
|
|
1422
1492
|
resolve(true);
|
|
1423
|
-
}
|
|
1424
|
-
reject(error);
|
|
1425
|
-
});
|
|
1493
|
+
}
|
|
1426
1494
|
});
|
|
1427
1495
|
}
|
|
1428
1496
|
function assignTask(params) {
|
|
@@ -14,6 +14,6 @@ export declare function i18nValidateRulesMessage(rules: any): {};
|
|
|
14
14
|
export declare function i18nValidatePropRulesMessage(propRules: any, isResetMessage: boolean): void;
|
|
15
15
|
export declare function getWorkflowRules(pageContext: any): any;
|
|
16
16
|
export declare function updateFormItemEditState(pageContext: PageContext, customRules: any[]): void;
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function disabledAllFields(pageContext: PageContext): void;
|
|
18
18
|
export declare function dynamicControlTableEdit(pageContext: PageContext, customRules: any[]): void;
|
|
19
19
|
export declare function updateComponentDisplayState(ref: any, item: any): void;
|
|
@@ -507,7 +507,7 @@ function updateFormItemEditState(pageContext, customRules) {
|
|
|
507
507
|
updateComponentDisplayState(ref, item);
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function disabledAllFields(pageContext) {
|
|
511
511
|
getAllComponentRefs(pageContext).forEach((ref) => {
|
|
512
512
|
updateComponentDisplayState(ref, { disabled: true });
|
|
513
513
|
});
|
|
@@ -530,7 +530,7 @@ function updateComponentDisplayState(ref, item) {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
export {
|
|
533
|
-
|
|
533
|
+
disabledAllFields,
|
|
534
534
|
getWorkflowRules,
|
|
535
535
|
i18nValidatePropRulesMessage,
|
|
536
536
|
i18nValidateRulesMessage,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function getDataTypeMapRequest(backendUrl: any, tableName: any, isTest?: boolean): any;
|
|
2
2
|
export declare function popupToPage(params: any): void;
|
|
3
3
|
export declare function getTableNameByTableUuid(pageContext: any, tableUuid: any): any;
|
|
4
|
+
export declare function getOperationButtons(pageContext: any, configure: any, operations: any, clickEventFunc?: Function): void;
|
|
@@ -2,13 +2,15 @@ import "agilebuilder-ui/src/utils/common-util";
|
|
|
2
2
|
import "agilebuilder-ui/src/utils/util";
|
|
3
3
|
import "agilebuilder-ui/src/utils/request";
|
|
4
4
|
import eventBus from "./eventBus.js";
|
|
5
|
+
import { getPermissionCodes } from "./page-init-util.js";
|
|
6
|
+
import { getEventFuncByType } from "./events/event-util.js";
|
|
5
7
|
function popupToPage(params) {
|
|
6
8
|
const pageCode = params.pageContext && params.pageContext.code;
|
|
7
9
|
console.log("弹框显示页面--popupToPage====params=", params);
|
|
8
10
|
eventBus.$emit(pageCode + "_open-dialog", params);
|
|
9
11
|
}
|
|
10
12
|
function getTableNameByTableUuid(pageContext, tableUuid) {
|
|
11
|
-
|
|
13
|
+
const tableName = pageContext.tableName;
|
|
12
14
|
if (!tableUuid && tableName) {
|
|
13
15
|
return tableName;
|
|
14
16
|
}
|
|
@@ -18,7 +20,40 @@ function getTableNameByTableUuid(pageContext, tableUuid) {
|
|
|
18
20
|
}
|
|
19
21
|
return tableConfigure && tableConfigure.props && tableConfigure.props.dataOrigin ? tableConfigure.props.dataOrigin.tableName : null;
|
|
20
22
|
}
|
|
23
|
+
function getOperationButtons(pageContext, configure, operations, clickEventFunc) {
|
|
24
|
+
const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
|
|
25
|
+
const operationButtonSettings = configure.btnList;
|
|
26
|
+
console.log("configure.btnList===", configure.btnList, "configure====", configure);
|
|
27
|
+
if (showOperation && operationButtonSettings) {
|
|
28
|
+
operationButtonSettings.forEach((buttonConfigure) => {
|
|
29
|
+
const myButtonSet = {};
|
|
30
|
+
const myButtonProps = Object.assign({}, buttonConfigure.props.base);
|
|
31
|
+
if (buttonConfigure.name === "custom") {
|
|
32
|
+
myButtonProps.customControl = myButtonProps.name;
|
|
33
|
+
} else {
|
|
34
|
+
myButtonProps.elementType = "el-button";
|
|
35
|
+
}
|
|
36
|
+
if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
|
|
37
|
+
const functionCodes = getPermissionCodes(buttonConfigure, pageContext);
|
|
38
|
+
if (functionCodes) {
|
|
39
|
+
myButtonProps.permission = functionCodes;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
myButtonProps.label = myButtonProps.title;
|
|
43
|
+
myButtonProps.sourceButton = { uuid: buttonConfigure.uuid };
|
|
44
|
+
myButtonSet["props"] = myButtonProps;
|
|
45
|
+
if (clickEventFunc !== void 0) {
|
|
46
|
+
myButtonSet["onClick"] = clickEventFunc(buttonConfigure);
|
|
47
|
+
} else {
|
|
48
|
+
const eventFunc = getEventFuncByType(pageContext, buttonConfigure.events, "click");
|
|
49
|
+
myButtonSet["onClick"] = eventFunc;
|
|
50
|
+
}
|
|
51
|
+
operations.push(myButtonSet);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
21
55
|
export {
|
|
56
|
+
getOperationButtons,
|
|
22
57
|
getTableNameByTableUuid,
|
|
23
58
|
popupToPage
|
|
24
59
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode, createBlock } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode, createBlock } from "vue";
|
|
2
2
|
import { SuperIcon } from "agilebuilder-ui";
|
|
3
|
-
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { $t } from "../../../../utils/i18n-util.js";
|
|
5
5
|
const _hoisted_1 = { class: "page-runtime-header-btn" };
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -21,12 +21,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
function isButtongLoading() {
|
|
22
22
|
return props.pageContext.canClick !== void 0 && props.pageContext.clickUuid !== void 0 ? !props.pageContext.canClick && props.pageContext.clickUuid === props.configure.uuid : false;
|
|
23
23
|
}
|
|
24
|
+
const componentRef = ref(null);
|
|
24
25
|
onMounted(() => {
|
|
26
|
+
nextTick(() => {
|
|
27
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
28
|
+
componentRef: componentRef.value,
|
|
29
|
+
entity: props.pageContext.entity.data,
|
|
30
|
+
pageData: props.pageContext.entity.page
|
|
31
|
+
});
|
|
32
|
+
});
|
|
25
33
|
});
|
|
26
34
|
return (_ctx, _cache) => {
|
|
27
35
|
const _component_el_button = resolveComponent("el-button");
|
|
28
36
|
return openBlock(), createElementBlock("span", _hoisted_1, [
|
|
29
37
|
createVNode(_component_el_button, {
|
|
38
|
+
ref_key: "componentRef",
|
|
39
|
+
ref: componentRef,
|
|
30
40
|
disabled: isDisable(),
|
|
31
41
|
class: normalizeClass(unref(runtimeClass)),
|
|
32
42
|
style: normalizeStyle(unref(runtimeStyle)),
|
package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, renderList } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, renderList } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../object-render.vue.js";
|
|
3
|
+
import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
3
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
5
|
__name: "buttongroup-runtime",
|
|
5
6
|
props: {
|
|
@@ -11,9 +12,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
12
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
12
13
|
const runtimeStyle = runtimeInfo.style;
|
|
13
14
|
const runtimeClass = runtimeInfo.class;
|
|
15
|
+
const componentRef = ref(null);
|
|
16
|
+
onMounted(() => {
|
|
17
|
+
nextTick(() => {
|
|
18
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
19
|
+
componentRef: componentRef.value,
|
|
20
|
+
entity: props.pageContext.entity.data,
|
|
21
|
+
pageData: props.pageContext.entity.page
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
14
25
|
return (_ctx, _cache) => {
|
|
15
26
|
const _component_el_button_group = resolveComponent("el-button-group");
|
|
16
27
|
return openBlock(), createBlock(_component_el_button_group, {
|
|
28
|
+
ref_key: "componentRef",
|
|
29
|
+
ref: componentRef,
|
|
17
30
|
class: normalizeClass(unref(runtimeClass)),
|
|
18
31
|
style: normalizeStyle(unref(runtimeStyle))
|
|
19
32
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ArrowDown } from "@element-plus/icons-vue";
|
|
3
3
|
import { formatVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { handleEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import { handleAfterInitEvent, handleEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
6
|
const _hoisted_1 = { key: 1 };
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -53,6 +53,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
53
|
handleFormEvent(isVisible, props.pageContext, props.configure, "menuHidden");
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
const componentRef = ref(null);
|
|
57
|
+
onMounted(() => {
|
|
58
|
+
nextTick(() => {
|
|
59
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
60
|
+
componentRef: componentRef.value,
|
|
61
|
+
entity: props.pageContext.entity.data,
|
|
62
|
+
pageData: props.pageContext.entity.page
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
56
66
|
return (_ctx, _cache) => {
|
|
57
67
|
const _component_el_button = resolveComponent("el-button");
|
|
58
68
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -61,6 +71,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
71
|
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
62
72
|
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
63
73
|
return openBlock(), createBlock(_component_el_dropdown, {
|
|
74
|
+
ref_key: "componentRef",
|
|
75
|
+
ref: componentRef,
|
|
64
76
|
class: normalizeClass(unref(runtimeClass)),
|
|
65
77
|
style: normalizeStyle(unref(runtimeStyle)),
|
|
66
78
|
placement: designProperty.value.placement,
|
package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
|
-
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import _sfc_main$1 from "../button/button-runtime.vue2.js";
|
|
5
5
|
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
6
|
const _hoisted_1 = { key: 1 };
|
|
@@ -20,6 +20,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
}
|
|
21
21
|
const runtimeStyle = runtimeInfo.style;
|
|
22
22
|
const runtimeClass = runtimeInfo.class;
|
|
23
|
+
const componentRef = ref(null);
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
nextTick(() => {
|
|
26
|
+
if (showDropdown.value) {
|
|
27
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
28
|
+
componentRef: componentRef.value,
|
|
29
|
+
entity: props.pageContext.entity.data,
|
|
30
|
+
pageData: props.pageContext.entity.page
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
23
35
|
return (_ctx, _cache) => {
|
|
24
36
|
const _component_el_button = resolveComponent("el-button");
|
|
25
37
|
const _component_ArrowDown = resolveComponent("ArrowDown");
|
|
@@ -34,6 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
46
|
pageContext: _ctx.pageContext
|
|
35
47
|
}, null, 8, ["configure", "pageContext"])) : (openBlock(), createBlock(_component_el_dropdown, {
|
|
36
48
|
key: 1,
|
|
49
|
+
ref_key: "componentRef",
|
|
50
|
+
ref: componentRef,
|
|
37
51
|
class: normalizeClass(unref(runtimeClass)),
|
|
38
52
|
style: normalizeStyle(unref(runtimeStyle)),
|
|
39
53
|
placement: designProperty.value.placement,
|
package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js
CHANGED
|
@@ -95,7 +95,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
95
|
if (!linkConfigure) {
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
const params = {
|
|
99
|
+
data: clickParams.data,
|
|
100
|
+
dataIndex: clickParams.dataIndex,
|
|
101
|
+
name: clickParams.name,
|
|
102
|
+
seriesId: clickParams.seriesId,
|
|
103
|
+
seriesIndex: clickParams.seriesIndex,
|
|
104
|
+
seriesName: clickParams.seriesName,
|
|
105
|
+
seriesType: clickParams.seriesType,
|
|
106
|
+
value: clickParams.value
|
|
107
|
+
};
|
|
108
|
+
doClickJumpPageEvent(props.pageContext, linkConfigure, params);
|
|
99
109
|
}
|
|
100
110
|
let hisGroupValue = headerInfo.groupValue;
|
|
101
111
|
watch(headerInfo, () => {
|
|
@@ -4,7 +4,7 @@ import eventBus from "../../../../utils/eventBus.js";
|
|
|
4
4
|
import { ExpressionEvaluator } from "./chart-table-util.js";
|
|
5
5
|
const _hoisted_1 = { key: 0 };
|
|
6
6
|
const _hoisted_2 = { key: 1 };
|
|
7
|
-
const _hoisted_3 = { key:
|
|
7
|
+
const _hoisted_3 = { key: 1 };
|
|
8
8
|
const _hoisted_4 = { key: 2 };
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "normal-column",
|
|
@@ -223,7 +223,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
223
223
|
class: normalizeClass(__props.column.props.format.icon)
|
|
224
224
|
}, null, 2)) : createCommentVNode("", true)
|
|
225
225
|
]))
|
|
226
|
-
], 64)) : (openBlock(), createElementBlock(
|
|
226
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
227
|
+
resloveLinkText.value && showLink(scope.row) ? (openBlock(), createBlock(_component_el_link, {
|
|
228
|
+
key: 0,
|
|
229
|
+
type: "primary",
|
|
230
|
+
onClick: ($event) => clickLink(scope.row)
|
|
231
|
+
}, {
|
|
232
|
+
default: withCtx(() => [
|
|
233
|
+
createTextVNode(toDisplayString(formatContent(scope.row, __props.column.props.format)), 1)
|
|
234
|
+
]),
|
|
235
|
+
_: 2
|
|
236
|
+
}, 1032, ["onClick"])) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(formatContent(scope.row, __props.column.props.format)), 1))
|
|
237
|
+
], 64))
|
|
227
238
|
], 64)) : resloveLinkText.value && showLink(scope.row) ? (openBlock(), createBlock(_component_el_link, {
|
|
228
239
|
key: 1,
|
|
229
240
|
type: "primary",
|
|
@@ -464,8 +464,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
464
464
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(tableColumnsConfig.value, (column, index) => {
|
|
465
465
|
return openBlock(), createBlock(_sfc_main$3, {
|
|
466
466
|
key: index,
|
|
467
|
-
column
|
|
468
|
-
|
|
467
|
+
column,
|
|
468
|
+
configure: __props.configure,
|
|
469
|
+
pageContext: __props.pageContext
|
|
470
|
+
}, null, 8, ["column", "configure", "pageContext"]);
|
|
469
471
|
}), 128))
|
|
470
472
|
]),
|
|
471
473
|
_: 1
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createBlock, unref, normalizeStyle, normalizeClass, createSlots, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, openBlock, createBlock, unref, normalizeStyle, normalizeClass, createSlots, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ElCard } from "element-plus";
|
|
3
3
|
import { SuperIcon } from "agilebuilder-ui";
|
|
4
4
|
import _sfc_main$1 from "../../object-render.vue.js";
|
|
5
5
|
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "card-runtime",
|
|
8
9
|
props: {
|
|
@@ -23,6 +24,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
function test() {
|
|
24
25
|
props.configure.props.title = "teee";
|
|
25
26
|
}
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
nextTick(() => {
|
|
29
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
30
|
+
componentRef: thisRef.value,
|
|
31
|
+
entity: props.pageContext.entity.data,
|
|
32
|
+
pageData: props.pageContext.entity.page
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
26
36
|
__expose({
|
|
27
37
|
test
|
|
28
38
|
});
|