super-page-designer 2.0.78 → 2.0.82
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/design/utils/assemblys-config.js +23 -23
- package/dist/es/components/design/utils/form-design-util.d.ts +2 -1
- package/dist/es/components/design/utils/form-design-util.js +76 -4
- package/dist/es/components/design/utils/interfaces/page-design-types.d.ts +1 -0
- package/dist/es/components/design/utils/page-design-util.d.ts +1 -0
- package/dist/es/components/design/utils/page-design-util.js +27 -0
- package/dist/es/components/design/utils/page-table-util.js +19 -3
- package/dist/es/components/design/views/assemblys/button/button-group/buttongroup-design.vue2.js +3 -18
- package/dist/es/components/design/views/assemblys/button/component/combination.vue.js +10 -9
- package/dist/es/components/design/views/assemblys/button/component/set-dialog.vue.js +13 -6
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +2 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind-option.js +4 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.d.ts +1 -1
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue2.js +9 -6
- package/dist/es/components/design/views/assemblys/container/card/card-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/container/collapse/collapse-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/container/container/container-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/container/flex/flex-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/container/form/form-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-design.vue2.js +4 -20
- package/dist/es/components/design/views/assemblys/container/tools/tools-design.vue2.js +3 -20
- package/dist/es/components/design/views/assemblys/data/component/column-config.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +1 -2
- package/dist/es/components/design/views/assemblys/data/component/dynamic-column.vue.js +3 -5
- package/dist/es/components/design/views/assemblys/data/table/table-attr.vue2.js +16 -16
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue2.js +5 -3
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +5 -1560
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue2.js +1860 -1
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue3.js +1 -0
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr-base.vue.js +9 -12
- package/dist/es/components/design/views/assemblys/form/common/condition.vue.js +11 -7
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +36 -92
- package/dist/es/components/design/views/assemblys/form/common/suffixmodule.vue.js +2 -1
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +13 -14
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js +5 -0
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr-base.vue.js +9 -12
- package/dist/es/components/design/views/assemblys/form/divider/divider-attr-base.vue.js +2 -1
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr-base.vue.js +5 -10
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/placeholder/placeholder-attr-base.vue.js +5 -10
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr-base.vue.js +7 -11
- package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.d.ts +9 -0
- package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.js +21 -10
- package/dist/es/components/design/views/assemblys/page/page-attr-advanced.vue.js +8 -3
- package/dist/es/components/design/views/assemblys/workflow/component/combination.vue.js +9 -7
- package/dist/es/components/design/views/design/page-design.vue.js +4 -0
- package/dist/es/components/design/views/design/page-event/config.vue.js +1 -7
- package/dist/es/components/design/views/design/page-event/config.vue2.js +7 -1
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +33 -4
- package/dist/es/components/design/views/design/view/attr-container.vue.js +1 -1
- package/dist/es/components/design/views/design/view/page-switch.vue.js +1 -1
- package/dist/es/components/design/views/design/view/page-switch.vue2.js +1 -3
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +4 -21
- package/dist/es/stores/table-store.js +2 -3
- package/dist/es/style.css +73 -68
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { deepCopy, getUuidv4 } from "./common-util.js";
|
|
3
3
|
import groupContainer from "../../../assets/images/group-container.png.js";
|
|
4
4
|
import containerForm from "../../../assets/images/container/container-form.png.js";
|
|
5
5
|
import containerFLex from "../../../assets/images/container/container-flex.png.js";
|
|
@@ -46,7 +46,7 @@ import formCustom from "../../../assets/images/form/form-custom.png.js";
|
|
|
46
46
|
import barcode from "../../../assets/images/data/barcode.png.js";
|
|
47
47
|
import workflowHistoryImg from "../../../assets/images/workflow/workflow-history-img.png.js";
|
|
48
48
|
const tableOperateColumnConf = {
|
|
49
|
-
uuid:
|
|
49
|
+
uuid: "",
|
|
50
50
|
name: "",
|
|
51
51
|
props: {
|
|
52
52
|
base: {
|
|
@@ -104,7 +104,7 @@ const tableOperateColumnConf = {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
const tableIndexColumnConf = {
|
|
107
|
-
uuid:
|
|
107
|
+
uuid: "",
|
|
108
108
|
name: "",
|
|
109
109
|
props: {
|
|
110
110
|
base: {
|
|
@@ -161,7 +161,7 @@ const tableIndexColumnConf = {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
const tableSelectionColumnConf = {
|
|
164
|
-
uuid:
|
|
164
|
+
uuid: "",
|
|
165
165
|
name: "",
|
|
166
166
|
props: {
|
|
167
167
|
base: {
|
|
@@ -216,9 +216,14 @@ const tableSelectionColumnConf = {
|
|
|
216
216
|
tittleClass: ""
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
+
function getCopyColumn(columnConf) {
|
|
220
|
+
let copyColumn = deepCopy(columnConf);
|
|
221
|
+
copyColumn.uuid = getUuidv4();
|
|
222
|
+
return copyColumn;
|
|
223
|
+
}
|
|
219
224
|
function getTableColumnConf(fieldInfo) {
|
|
220
|
-
|
|
221
|
-
uuid:
|
|
225
|
+
const columnConf = {
|
|
226
|
+
uuid: "",
|
|
222
227
|
isTable: true,
|
|
223
228
|
// 是否是表格组件
|
|
224
229
|
name: "",
|
|
@@ -274,6 +279,7 @@ function getTableColumnConf(fieldInfo) {
|
|
|
274
279
|
tittleClass: ""
|
|
275
280
|
}
|
|
276
281
|
};
|
|
282
|
+
return getCopyColumn(columnConf);
|
|
277
283
|
}
|
|
278
284
|
const assemblyGroups = [{
|
|
279
285
|
name: "container",
|
|
@@ -1236,9 +1242,9 @@ const assemblyGroups = [{
|
|
|
1236
1242
|
}
|
|
1237
1243
|
],
|
|
1238
1244
|
items: [
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1245
|
+
getTableSelectionConf(),
|
|
1246
|
+
getTableIndexConf(),
|
|
1247
|
+
getTableOperateConf()
|
|
1242
1248
|
],
|
|
1243
1249
|
modelFields: [],
|
|
1244
1250
|
props: {
|
|
@@ -2479,19 +2485,13 @@ function getPageConf() {
|
|
|
2479
2485
|
return tempConf;
|
|
2480
2486
|
}
|
|
2481
2487
|
function getTableOperateConf() {
|
|
2482
|
-
|
|
2483
|
-
conf.uuid = getUuidv4();
|
|
2484
|
-
return conf;
|
|
2488
|
+
return getCopyColumn(tableOperateColumnConf);
|
|
2485
2489
|
}
|
|
2486
2490
|
function getTableIndexConf() {
|
|
2487
|
-
|
|
2488
|
-
conf.uuid = getUuidv4();
|
|
2489
|
-
return conf;
|
|
2491
|
+
return getCopyColumn(tableIndexColumnConf);
|
|
2490
2492
|
}
|
|
2491
2493
|
function getTableSelectionConf() {
|
|
2492
|
-
|
|
2493
|
-
conf.uuid = getUuidv4();
|
|
2494
|
-
return conf;
|
|
2494
|
+
return getCopyColumn(tableSelectionColumnConf);
|
|
2495
2495
|
}
|
|
2496
2496
|
const standardButtonOperations = [
|
|
2497
2497
|
{
|
|
@@ -2678,9 +2678,9 @@ function getInitialInformationByName(name) {
|
|
|
2678
2678
|
for (let j = 0; j < items.length; j++) {
|
|
2679
2679
|
let item = items[j];
|
|
2680
2680
|
if (item.name == name) {
|
|
2681
|
-
initUse.props = item.props;
|
|
2682
|
-
initUse.style = item.style;
|
|
2683
|
-
initUse.events = item.events;
|
|
2681
|
+
initUse.props = deepCopy(item.props);
|
|
2682
|
+
initUse.style = deepCopy(item.style);
|
|
2683
|
+
initUse.events = deepCopy(item.events);
|
|
2684
2684
|
initUse.label = item.label;
|
|
2685
2685
|
return initUse;
|
|
2686
2686
|
}
|
|
@@ -2695,8 +2695,8 @@ function getDesignEvents(name) {
|
|
|
2695
2695
|
let items = assemblyGroups[i].items;
|
|
2696
2696
|
for (let j = 0; j < items.length; j++) {
|
|
2697
2697
|
let item = items[j];
|
|
2698
|
-
if (item.name == name) {
|
|
2699
|
-
return item.events;
|
|
2698
|
+
if (item.name == name && item.events) {
|
|
2699
|
+
return deepCopy(item.events);
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
2702
2702
|
}
|
|
@@ -182,4 +182,5 @@ export declare function deleteRule(pageDesign: any, configure: any): void;
|
|
|
182
182
|
* @param {*}
|
|
183
183
|
* @return {*}
|
|
184
184
|
*/
|
|
185
|
-
export declare function resetConfigIndo(configure:
|
|
185
|
+
export declare function resetConfigIndo(configure: any, val: string): boolean;
|
|
186
|
+
export declare function componentNameChange(configure: Component, componentName: any, emit: any): void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { usePageContextStore } from "../../../stores/page-store.js";
|
|
2
2
|
import { getComponentOptionConfigs } from "super-page-runtime";
|
|
3
3
|
import { getInitialInformationByName } from "./assemblys-config.js";
|
|
4
|
+
import { deepCopy } from "./common-util.js";
|
|
5
|
+
import { ElMessage } from "element-plus";
|
|
6
|
+
import { tableResetConfigIndo } from "./page-table-util.js";
|
|
4
7
|
function caculateDetailComponentStyle(configure, designStyle, designClass, designHeaderStyle) {
|
|
5
8
|
const tempStyle = {};
|
|
6
9
|
const tempHeaderStyle = {};
|
|
@@ -464,16 +467,85 @@ function packageStringRuleByDataType(fieldInfo, type, rule) {
|
|
|
464
467
|
}
|
|
465
468
|
function resetConfigIndo(configure, val) {
|
|
466
469
|
let moduleInfo = getInitialInformationByName(val);
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
470
|
+
if (moduleInfo) {
|
|
471
|
+
const eventMap = changeEventToMap(moduleInfo.events);
|
|
472
|
+
let newEvents = {};
|
|
473
|
+
let isCanRest = true;
|
|
474
|
+
const bindEvents = configure.events.filter((event) => {
|
|
475
|
+
return !event.isStandard && event.jsContent || event.isStandard && event.eventName;
|
|
476
|
+
});
|
|
477
|
+
if (bindEvents) {
|
|
478
|
+
for (let i = 0; i < bindEvents.length; i++) {
|
|
479
|
+
const item = bindEvents[i];
|
|
480
|
+
const event = eventMap[item.name];
|
|
481
|
+
if (event) {
|
|
482
|
+
newEvents[item.name] = deepCopy(item);
|
|
483
|
+
} else {
|
|
484
|
+
isCanRest = false;
|
|
485
|
+
ElMessage({
|
|
486
|
+
showClose: true,
|
|
487
|
+
message: "事件:[" + item.name + "]已绑定事件,请先备份事件内容,并清除绑定的事件,再切换组件类型",
|
|
488
|
+
type: "warning",
|
|
489
|
+
duration: 5e3
|
|
490
|
+
});
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (isCanRest) {
|
|
496
|
+
let newEventsArr = [];
|
|
497
|
+
moduleInfo.events.forEach((item) => {
|
|
498
|
+
const eventName = item.name;
|
|
499
|
+
if (newEvents[eventName]) {
|
|
500
|
+
newEvents[eventName].componentUuid = configure.uuid;
|
|
501
|
+
newEvents[eventName].componentLabel = val;
|
|
502
|
+
newEvents[eventName].title = configure.props.base.title;
|
|
503
|
+
newEventsArr.push(newEvents[item.name]);
|
|
504
|
+
} else {
|
|
505
|
+
newEventsArr.push(item);
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
configure.name = val;
|
|
509
|
+
configure.events = newEventsArr;
|
|
510
|
+
Object.assign(moduleInfo.props, deepCopy(configure.props));
|
|
511
|
+
configure.props = moduleInfo.props;
|
|
512
|
+
Object.assign(moduleInfo.style, deepCopy(configure.style));
|
|
513
|
+
configure.style = moduleInfo.style;
|
|
514
|
+
configure.label = moduleInfo.label;
|
|
515
|
+
return true;
|
|
516
|
+
} else {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
} else {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function changeEventToMap(events) {
|
|
524
|
+
let eventMap = {};
|
|
525
|
+
if (events) {
|
|
526
|
+
events.forEach((item) => {
|
|
527
|
+
eventMap[item.name] = item;
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
return eventMap;
|
|
531
|
+
}
|
|
532
|
+
function componentNameChange(configure, componentName, emit) {
|
|
533
|
+
let isCanReset = true;
|
|
534
|
+
if (configure.isTable) {
|
|
535
|
+
tableResetConfigIndo(configure, componentName);
|
|
536
|
+
} else {
|
|
537
|
+
isCanReset = resetConfigIndo(configure, componentName);
|
|
538
|
+
}
|
|
539
|
+
if (isCanReset) {
|
|
540
|
+
emit("changeAssembly", configure);
|
|
541
|
+
}
|
|
471
542
|
}
|
|
472
543
|
export {
|
|
473
544
|
caculateComponentProps,
|
|
474
545
|
caculateDetailComponentStyle,
|
|
475
546
|
columnCustomTittleClass,
|
|
476
547
|
columnTittleStyle,
|
|
548
|
+
componentNameChange,
|
|
477
549
|
removComponentOptionConfigs,
|
|
478
550
|
resetConfigIndo,
|
|
479
551
|
watchMaxOrMinValidate,
|
|
@@ -2,3 +2,4 @@ export declare function queryWorkflowsRequest(tableName: any, systemCode: any, p
|
|
|
2
2
|
export declare function createWorkflowRequest(tableName: any, pageName: any, systemCode: any, publishVersion: any): any;
|
|
3
3
|
export declare function getHighestVersionDefinition(wfDefinitionCode: any, defVersion: any, publishVersion: any): any;
|
|
4
4
|
export declare function getPublishVersionsByCode(systemCode: any): any;
|
|
5
|
+
export declare function deleteDesignItem(items: any, sourceItem: any, isShowChildrenTip: any, isDeleteSourceItem: boolean): void;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import http from "agilebuilder-ui/src/utils/request";
|
|
2
|
+
import { ElMessageBox } from "element-plus";
|
|
3
|
+
import eventBus from "./eventBus.js";
|
|
2
4
|
function queryWorkflowsRequest(tableName, systemCode, publishVersion) {
|
|
3
5
|
const params = {
|
|
4
6
|
appCode: systemCode,
|
|
@@ -32,8 +34,33 @@ function getHighestVersionDefinition(wfDefinitionCode, defVersion, publishVersio
|
|
|
32
34
|
params
|
|
33
35
|
);
|
|
34
36
|
}
|
|
37
|
+
function deleteDesignItem(items, sourceItem, isShowChildrenTip, isDeleteSourceItem) {
|
|
38
|
+
if (isShowChildrenTip) {
|
|
39
|
+
ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
|
|
40
|
+
confirmButtonText: "确认",
|
|
41
|
+
cancelButtonText: "取消",
|
|
42
|
+
type: "warning"
|
|
43
|
+
}).then(() => {
|
|
44
|
+
_deleteItem(items, sourceItem);
|
|
45
|
+
}).catch((err) => {
|
|
46
|
+
console.log(err);
|
|
47
|
+
});
|
|
48
|
+
} else if (isDeleteSourceItem) {
|
|
49
|
+
_deleteItem(items, sourceItem);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function _deleteItem(items, sourceItem) {
|
|
53
|
+
if (sourceItem && sourceItem.name === "table") {
|
|
54
|
+
eventBus.$off("reloadTable-" + sourceItem.uuid);
|
|
55
|
+
}
|
|
56
|
+
const index = items.indexOf(sourceItem);
|
|
57
|
+
if (index > -1) {
|
|
58
|
+
items.splice(index, 1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
35
61
|
export {
|
|
36
62
|
createWorkflowRequest,
|
|
63
|
+
deleteDesignItem,
|
|
37
64
|
getHighestVersionDefinition,
|
|
38
65
|
queryWorkflowsRequest
|
|
39
66
|
};
|
|
@@ -35,10 +35,8 @@ function setTableRuntimesFromConfigure(tableConfigure, pageDesign) {
|
|
|
35
35
|
}
|
|
36
36
|
pageDesign.tableRuntimes[configureCopy.uuid] = getListView(configureCopy, pageDesign, tableConfigureStr);
|
|
37
37
|
delete tableConfigure.btnList;
|
|
38
|
-
delete tableConfigure.events;
|
|
39
38
|
delete tableConfigure.items;
|
|
40
39
|
delete tableConfigure.modelFields;
|
|
41
|
-
delete tableConfigure.props;
|
|
42
40
|
delete tableConfigure.runtime;
|
|
43
41
|
}
|
|
44
42
|
function getListView(configureCopy, pageDesign, tableConfigureStr) {
|
|
@@ -158,7 +156,7 @@ function getListColumns(configure, pageDesign) {
|
|
|
158
156
|
// 控件属性配置
|
|
159
157
|
controlConfig: getControlConfig(item),
|
|
160
158
|
//事件类型,json格式,格式为:{input:funName1,blur:funName2,focus:funName3,...},funName1、funName2等方法名,通过列表的options.eventCallBack传入
|
|
161
|
-
|
|
159
|
+
eventType: getListColumnEvent(item),
|
|
162
160
|
/**
|
|
163
161
|
* 显示顺序,多层级关系,可能值有重复
|
|
164
162
|
* 如有第一层级的顺序1,有第二层级的顺序1
|
|
@@ -429,6 +427,23 @@ function getNameFromProp(prop) {
|
|
|
429
427
|
function formatDynamicColumnData(item, temp) {
|
|
430
428
|
temp.dynamicColumnJson = JSON.stringify(item.props.dataOrigin.dynamicColumnJson);
|
|
431
429
|
}
|
|
430
|
+
function getListColumnEvent(item, pageDesign) {
|
|
431
|
+
let result = null;
|
|
432
|
+
if (item.events) {
|
|
433
|
+
item.events.forEach((event) => {
|
|
434
|
+
if (event.jsContent && event.jsContent.trim()) {
|
|
435
|
+
if (!result) {
|
|
436
|
+
result = {};
|
|
437
|
+
}
|
|
438
|
+
result[event.name] = event.componentUuid;
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
if (result) {
|
|
442
|
+
return JSON.stringify(result);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return result;
|
|
446
|
+
}
|
|
432
447
|
function tableResetConfigIndo(configure, moduleValue) {
|
|
433
448
|
let newColumnInfo = {
|
|
434
449
|
uuid: configure.uuid,
|
|
@@ -450,6 +465,7 @@ function tableResetConfigIndo(configure, moduleValue) {
|
|
|
450
465
|
configure.props.verification = newColumnInfo.verification;
|
|
451
466
|
configure.props.definition = newColumnInfo.definition;
|
|
452
467
|
configure.events = getDesignEvents(moduleValue);
|
|
468
|
+
configure.name = "table";
|
|
453
469
|
}
|
|
454
470
|
export {
|
|
455
471
|
querySublist,
|
package/dist/es/components/design/views/assemblys/button/button-group/buttongroup-design.vue2.js
CHANGED
|
@@ -2,7 +2,8 @@ import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock,
|
|
|
2
2
|
import _sfc_main$1 from "../../object-design.vue.js";
|
|
3
3
|
import { caculateDetailComponentStyle, caculateComponentProps } from "../../../../utils/form-design-util.js";
|
|
4
4
|
import { useDraggable } from "vue-draggable-plus";
|
|
5
|
-
import
|
|
5
|
+
import "element-plus";
|
|
6
|
+
import { deleteDesignItem } from "../../../../utils/page-design-util.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "buttongroup-design",
|
|
8
9
|
props: {
|
|
@@ -68,23 +69,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
69
|
items.splice(index, 0, copyObj);
|
|
69
70
|
}
|
|
70
71
|
function deleteItem(sourceItem) {
|
|
71
|
-
|
|
72
|
-
ElMessageBox.confirm(
|
|
73
|
-
"还有子元素,确定要删除吗?",
|
|
74
|
-
"删除",
|
|
75
|
-
{
|
|
76
|
-
confirmButtonText: "确认",
|
|
77
|
-
cancelButtonText: "取消",
|
|
78
|
-
type: "warning"
|
|
79
|
-
}
|
|
80
|
-
).then(() => {
|
|
81
|
-
const index = items.indexOf(sourceItem);
|
|
82
|
-
if (index > -1) {
|
|
83
|
-
items.splice(index, 1);
|
|
84
|
-
}
|
|
85
|
-
}).catch((err) => {
|
|
86
|
-
console.log(err);
|
|
87
|
-
});
|
|
72
|
+
deleteDesignItem(btnItems, sourceItem, true, false);
|
|
88
73
|
}
|
|
89
74
|
return (_ctx, _cache) => {
|
|
90
75
|
const _component_el_button_group = resolveComponent("el-button-group");
|
|
@@ -38,8 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
onMounted(() => {
|
|
39
39
|
if (props.conditionList) {
|
|
40
40
|
tableData.value = JSON.parse(props.conditionList);
|
|
41
|
-
}
|
|
42
|
-
if (props.list) {
|
|
41
|
+
} else if (props.list) {
|
|
43
42
|
tableData.value = props.list;
|
|
44
43
|
}
|
|
45
44
|
});
|
|
@@ -60,10 +59,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
59
|
operationArr.value.push([]);
|
|
61
60
|
}
|
|
62
61
|
function afterBindDefaultValue(modelValue, row) {
|
|
63
|
-
row.
|
|
62
|
+
row.propValue = modelValue;
|
|
64
63
|
}
|
|
65
|
-
function changeFieldName(index,
|
|
66
|
-
const item = props.fieldMap[
|
|
64
|
+
function changeFieldName(index, row, propDbName) {
|
|
65
|
+
const item = props.fieldMap[propDbName];
|
|
66
|
+
row["dataType"] = item.dataType;
|
|
67
|
+
row["propName"] = item.name;
|
|
67
68
|
operationArr.value[index] = getOperators(item);
|
|
68
69
|
}
|
|
69
70
|
function savebuttonSetting() {
|
|
@@ -180,11 +181,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
181
|
}, {
|
|
181
182
|
default: withCtx((scope) => [
|
|
182
183
|
createVNode(_component_el_select, {
|
|
183
|
-
modelValue: scope.row.
|
|
184
|
-
"onUpdate:modelValue": ($event) => scope.row.
|
|
184
|
+
modelValue: scope.row.propDbName,
|
|
185
|
+
"onUpdate:modelValue": ($event) => scope.row.propDbName = $event,
|
|
185
186
|
clearable: "",
|
|
186
187
|
size: "default",
|
|
187
|
-
onChange: ($event) => changeFieldName(scope.$index, scope.row.
|
|
188
|
+
onChange: ($event) => changeFieldName(scope.$index, scope.row, scope.row.propDbName)
|
|
188
189
|
}, {
|
|
189
190
|
default: withCtx(() => [
|
|
190
191
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.fieldNameList, (item) => {
|
|
@@ -212,7 +213,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
212
213
|
size: "default"
|
|
213
214
|
}, {
|
|
214
215
|
default: withCtx(() => [
|
|
215
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
216
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOperators)(scope.row), (option) => {
|
|
216
217
|
return openBlock(), createBlock(_component_el_option, {
|
|
217
218
|
key: option.name,
|
|
218
219
|
label: option.label,
|
|
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
combinationVisible.value = true;
|
|
48
48
|
}
|
|
49
49
|
function afterBindDefaultValue(modelValue, row) {
|
|
50
|
-
row.
|
|
50
|
+
row.autoValue = modelValue;
|
|
51
51
|
}
|
|
52
52
|
function selectRow(row) {
|
|
53
53
|
tableRef.value.setCurrentRow(row);
|
|
@@ -61,6 +61,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
function add() {
|
|
62
62
|
tableData.value.push({});
|
|
63
63
|
}
|
|
64
|
+
function changeField(row, propDbName) {
|
|
65
|
+
console.log("changeField----props.pageDesign.modelFieldsMap=", props.pageDesign.modelFieldsMap, "propDbName=", propDbName);
|
|
66
|
+
const item = props.pageDesign.modelFieldsMap[propDbName];
|
|
67
|
+
row.field = item.name;
|
|
68
|
+
row.dataType = item.dataType;
|
|
69
|
+
}
|
|
64
70
|
return (_ctx, _cache) => {
|
|
65
71
|
const _component_el_button = resolveComponent("el-button");
|
|
66
72
|
const _component_el_row = resolveComponent("el-row");
|
|
@@ -197,11 +203,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
197
203
|
}, {
|
|
198
204
|
default: withCtx((scope) => [
|
|
199
205
|
createVNode(_component_el_select, {
|
|
200
|
-
modelValue: scope.row.
|
|
201
|
-
"onUpdate:modelValue": ($event) => scope.row.
|
|
206
|
+
modelValue: scope.row.propDbName,
|
|
207
|
+
"onUpdate:modelValue": ($event) => scope.row.propDbName = $event,
|
|
202
208
|
clearable: "",
|
|
203
209
|
size: "default",
|
|
204
|
-
onFocus: ($event) => selectRow(scope.row)
|
|
210
|
+
onFocus: ($event) => selectRow(scope.row),
|
|
211
|
+
onChange: ($event) => changeField(scope.row, scope.row.propDbName)
|
|
205
212
|
}, {
|
|
206
213
|
default: withCtx(() => [
|
|
207
214
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pageDesign.modelFields, (item) => {
|
|
@@ -213,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
213
220
|
}), 128))
|
|
214
221
|
]),
|
|
215
222
|
_: 2
|
|
216
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "onFocus"])
|
|
223
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onFocus", "onChange"])
|
|
217
224
|
]),
|
|
218
225
|
_: 1
|
|
219
226
|
}),
|
|
@@ -225,7 +232,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
225
232
|
default: withCtx((scope) => [
|
|
226
233
|
createVNode(BindVariable, {
|
|
227
234
|
onFocus: ($event) => selectRow(scope.row),
|
|
228
|
-
modelValue: scope.row.
|
|
235
|
+
modelValue: scope.row.autoValue,
|
|
229
236
|
"onUpdate:modelValue": (data) => afterBindDefaultValue(data, scope.row)
|
|
230
237
|
}, null, 8, ["onFocus", "modelValue", "onUpdate:modelValue"])
|
|
231
238
|
]),
|
package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js
CHANGED
|
@@ -11,6 +11,8 @@ import { LineChart, BarChart } from "echarts/charts";
|
|
|
11
11
|
import { GridComponent, LegendComponent, TitleComponent, TooltipComponent, ToolboxComponent, DataZoomComponent } from "echarts/components";
|
|
12
12
|
import VChart from "vue-echarts";
|
|
13
13
|
import "element-plus";
|
|
14
|
+
import "agilebuilder-ui/src/utils/request";
|
|
15
|
+
import "../../../../utils/eventBus.js";
|
|
14
16
|
const _hoisted_1 = { style: { "position": "absolute", "top": "0px", "right": "60px", "text-align": "center" } };
|
|
15
17
|
const _hoisted_2 = ["onClick"];
|
|
16
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -89,10 +89,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
89
89
|
}, {
|
|
90
90
|
size: string;
|
|
91
91
|
modelValue: string;
|
|
92
|
+
isTable: boolean;
|
|
92
93
|
paramTypes: string[];
|
|
93
94
|
showLabel: boolean;
|
|
94
95
|
needParams: boolean;
|
|
95
96
|
isRange: boolean;
|
|
96
|
-
isTable: boolean;
|
|
97
97
|
}, {}>;
|
|
98
98
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./common-variable-bind.vue2.js";
|
|
2
2
|
import "./common-variable-bind.vue3.js";
|
|
3
3
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const BindVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const BindVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-468275d2"]]);
|
|
5
5
|
export {
|
|
6
6
|
BindVariable as default
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import { deepCopy, getUuidv4 } from "../../../utils/common-util.js";
|
|
|
5
5
|
import { getTypeOptions, taskVarOptions, contextVarOptions } from "./common-variable-bind-option.js";
|
|
6
6
|
import { usePageContextStore } from "../../../../../stores/page-store.js";
|
|
7
7
|
import { tableField } from "../../../../../stores/table-store.js";
|
|
8
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
8
|
+
const _withScopeId = (n) => (pushScopeId("data-v-468275d2"), n = n(), popScopeId(), n);
|
|
9
9
|
const _hoisted_1 = { key: 0 };
|
|
10
10
|
const _hoisted_2 = { style: { "margin-top": "10px", "font-size": "10px", "display": "flex", "align-items": "center", "justify-self": "center" } };
|
|
11
11
|
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "margin-left": "5px" } }, "输入变量名后点击加号按钮添加", -1));
|
|
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
const selectOptions = ref({});
|
|
75
75
|
const searchValue = ref("");
|
|
76
76
|
const popoverRef = ref(null);
|
|
77
|
-
const selectInputType = ["context", "system", "task", "data", "page"];
|
|
77
|
+
const selectInputType = ["context", "system", "task", "data", "page", "obj"];
|
|
78
78
|
const tableFieldStore = tableField();
|
|
79
79
|
onMounted(() => {
|
|
80
80
|
window.addEventListener("click", handleClickOutside);
|
|
@@ -308,6 +308,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
308
308
|
valueOptions.value = taskVarOptions;
|
|
309
309
|
} else if (value === "data") {
|
|
310
310
|
valueOptions.value = selectOptions.value.dataModelOptions || [];
|
|
311
|
+
} else if (value === "obj") {
|
|
312
|
+
valueOptions.value = selectOptions.value.dataModelOptions || [];
|
|
313
|
+
console.log("%c描述-172007", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", valueOptions.value);
|
|
311
314
|
} else if (value === "params") {
|
|
312
315
|
valueOptions.value = selectOptions.value.paramsVarOptions || [];
|
|
313
316
|
} else if (value === "page") {
|
|
@@ -335,7 +338,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
335
338
|
paramValue.value = row.value;
|
|
336
339
|
}
|
|
337
340
|
} else {
|
|
338
|
-
paramValue.value = row.
|
|
341
|
+
paramValue.value = row.value;
|
|
339
342
|
}
|
|
340
343
|
defalutValue.value = "${" + paramType.value + "." + paramValue.value + "}";
|
|
341
344
|
emits("update:modelValue", defalutValue.value, row.alias);
|
|
@@ -671,10 +674,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
671
674
|
_: 2
|
|
672
675
|
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
673
676
|
])) : createCommentVNode("", true),
|
|
674
|
-
paramType.value == "data" ? (openBlock(), createElementBlock("span", {
|
|
677
|
+
paramType.value == "data" || paramType.value == "obj" ? (openBlock(), createElementBlock("span", {
|
|
675
678
|
key: 1,
|
|
676
|
-
title: scope.row.label + " " + scope.row.
|
|
677
|
-
}, toDisplayString(scope.row.label + " " + scope.row.
|
|
679
|
+
title: scope.row.label + " " + scope.row.value
|
|
680
|
+
}, toDisplayString(scope.row.label + " " + scope.row.value), 9, _hoisted_8)) : (openBlock(), createElementBlock("span", {
|
|
678
681
|
key: 2,
|
|
679
682
|
title: scope.row.label
|
|
680
683
|
}, toDisplayString(scope.row.label), 9, _hoisted_9))
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, createSlots, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString, reactive } from "vue";
|
|
2
|
-
import { ElCard
|
|
2
|
+
import { ElCard } from "element-plus";
|
|
3
3
|
import { useDraggable } from "vue-draggable-plus";
|
|
4
4
|
import _sfc_main$1 from "../../object-design.vue.js";
|
|
5
5
|
import { deepCopy, getUuidv4 } from "../../../../utils/common-util.js";
|
|
6
6
|
import { caculateComponentStyle } from "../../../../utils/container-design-util.js";
|
|
7
|
+
import { deleteDesignItem } from "../../../../utils/page-design-util.js";
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
9
|
__name: "card-design",
|
|
9
10
|
props: {
|
|
@@ -85,26 +86,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
function deleteItem(sourceItem) {
|
|
88
|
-
if (sourceItem.items && sourceItem.items.length > 0) {
|
|
89
|
-
ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
|
|
90
|
-
confirmButtonText: "确认",
|
|
91
|
-
cancelButtonText: "取消",
|
|
92
|
-
type: "warning"
|
|
93
|
-
}).then(() => {
|
|
94
|
-
_deleteItem(sourceItem);
|
|
95
|
-
}).catch((err) => {
|
|
96
|
-
console.log(err);
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
_deleteItem(sourceItem);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function _deleteItem(sourceItem) {
|
|
103
89
|
let items = props.configure.items;
|
|
104
|
-
|
|
105
|
-
if (index > -1) {
|
|
106
|
-
items.splice(index, 1);
|
|
107
|
-
}
|
|
90
|
+
deleteDesignItem(items, sourceItem, sourceItem.items && sourceItem.items.length > 0, true);
|
|
108
91
|
}
|
|
109
92
|
return (_ctx, _cache) => {
|
|
110
93
|
const _component_SuperIcon = resolveComponent("SuperIcon");
|
package/dist/es/components/design/views/assemblys/container/collapse/collapse-design.vue2.js
CHANGED
|
@@ -4,7 +4,8 @@ import _sfc_main$1 from "../../object-design.vue.js";
|
|
|
4
4
|
import { SuperIcon } from "agilebuilder-ui";
|
|
5
5
|
import { deepCopy, getUuidv4 } from "../../../../utils/common-util.js";
|
|
6
6
|
import { caculateComponentStyle } from "../../../../utils/container-design-util.js";
|
|
7
|
-
import
|
|
7
|
+
import "element-plus";
|
|
8
|
+
import { deleteDesignItem } from "../../../../utils/page-design-util.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "collapse-design",
|
|
10
11
|
props: {
|
|
@@ -73,26 +74,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
function deleteItem(parentItem, sourceItem) {
|
|
76
|
-
if (sourceItem.items && sourceItem.items.length > 0) {
|
|
77
|
-
ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
|
|
78
|
-
confirmButtonText: "确认",
|
|
79
|
-
cancelButtonText: "取消",
|
|
80
|
-
type: "warning"
|
|
81
|
-
}).then(() => {
|
|
82
|
-
_deleteItem(parentItem, sourceItem);
|
|
83
|
-
}).catch((err) => {
|
|
84
|
-
console.log(err);
|
|
85
|
-
});
|
|
86
|
-
} else {
|
|
87
|
-
_deleteItem(parentItem, sourceItem);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function _deleteItem(parentItem, sourceItem) {
|
|
91
77
|
let items = parentItem.items;
|
|
92
|
-
|
|
93
|
-
if (index > -1) {
|
|
94
|
-
items.splice(index, 1);
|
|
95
|
-
}
|
|
78
|
+
deleteDesignItem(items, sourceItem, sourceItem.items && sourceItem.items.length > 0, true);
|
|
96
79
|
}
|
|
97
80
|
return (_ctx, _cache) => {
|
|
98
81
|
const _component_el_collapse_item = resolveComponent("el-collapse-item");
|