cloud-web-corejs 1.0.54-dev.626 → 1.0.54-dev.628
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/package.json +1 -1
- package/src/components/baseTabs/index.vue +16 -8
- package/src/components/table/index.js +116 -83
- package/src/components/xform/form-designer/designer.js +1993 -9
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +104 -62
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +102 -36
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +68 -24
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +3 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +213 -179
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- package/src/components/xform/form-render/container-item/table2-item.vue +24 -10
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/util.js +7 -1
- package/src/components/table/index - /345/211/257/346/234/254.js" +0 -1103
|
@@ -1,28 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<static-content-wrapper
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
<static-content-wrapper
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
6
|
+
:display-style="field.options.displayStyle"
|
|
7
|
+
:parent-widget="parentWidget"
|
|
8
|
+
:parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
|
10
|
+
:sub-form-row-index="subFormRowIndex"
|
|
11
|
+
:sub-form-col-index="subFormColIndex"
|
|
12
|
+
:sub-form-row-id="subFormRowId"
|
|
13
|
+
>
|
|
14
|
+
<el-dropdown
|
|
15
|
+
:trigger="field.options.dropdownTrigger"
|
|
16
|
+
:disabled="field.options.disabled"
|
|
17
|
+
>
|
|
18
|
+
<el-button
|
|
19
|
+
type="primary"
|
|
20
|
+
class="button-sty"
|
|
21
|
+
size="mini"
|
|
22
|
+
v-if="field.options.dropdownType === 'button'"
|
|
23
|
+
>
|
|
24
|
+
<span>{{ getI18nLabel(field.options.label) }}</span
|
|
25
|
+
><span class="line"></span>
|
|
26
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
13
27
|
</el-button>
|
|
28
|
+
<span class="el-dropdown-link" v-else>
|
|
29
|
+
<a class="a-link">
|
|
30
|
+
<span>
|
|
31
|
+
<span>{{ getI18nLabel(field.options.label) }}</span>
|
|
32
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
33
|
+
</span>
|
|
34
|
+
</a>
|
|
35
|
+
</span>
|
|
36
|
+
<!-- <span class="el-dropdown-link button-sty" v-else>
|
|
37
|
+
|
|
38
|
+
</span> -->
|
|
14
39
|
<el-dropdown-menu slot="dropdown">
|
|
15
|
-
<template v-for="(subWidget,index) in field.widgetList">
|
|
16
|
-
<el-dropdown-item
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
<template v-for="(subWidget, index) in field.widgetList">
|
|
41
|
+
<el-dropdown-item
|
|
42
|
+
v-show="!subWidget.options.hidden"
|
|
43
|
+
:key="index"
|
|
44
|
+
:icon="subWidget.options.icon"
|
|
45
|
+
@click.native="(e) => handleSubButtonWidgetClick(e, index)"
|
|
46
|
+
:disabled="subWidget.options.disabled"
|
|
47
|
+
>
|
|
48
|
+
<!-- {{ getI18nLabel(subWidget.options.label) }}-->
|
|
49
|
+
<dropdownItemWidget
|
|
50
|
+
:field="subWidget"
|
|
51
|
+
:parent-list="field.widgetList"
|
|
52
|
+
:index-of-parent-list="index"
|
|
53
|
+
:parent-widget="field"
|
|
54
|
+
:tableParam="tableParam"
|
|
55
|
+
:formItemProp="formItemProp"
|
|
56
|
+
:ref="'item' + index"
|
|
57
|
+
@hiddenChange="handleHidden"
|
|
58
|
+
@disabledChange="handleDisabled"
|
|
59
|
+
>
|
|
23
60
|
</dropdownItemWidget>
|
|
24
61
|
</el-dropdown-item>
|
|
25
|
-
|
|
26
62
|
</template>
|
|
27
63
|
</el-dropdown-menu>
|
|
28
64
|
</el-dropdown>
|
|
@@ -30,15 +66,15 @@
|
|
|
30
66
|
</template>
|
|
31
67
|
|
|
32
68
|
<script>
|
|
33
|
-
import StaticContentWrapper from
|
|
34
|
-
import emitter from
|
|
69
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
|
70
|
+
import emitter from "../../../utils/emitter";
|
|
35
71
|
import i18n from "../../../utils/i18n";
|
|
36
72
|
import fieldMixin from "./fieldMixin";
|
|
37
|
-
import dropdownItemWidget from
|
|
73
|
+
import dropdownItemWidget from "./dropdown-item-widget.vue";
|
|
38
74
|
|
|
39
75
|
export default {
|
|
40
76
|
name: "dropdown-widget",
|
|
41
|
-
componentName:
|
|
77
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
42
78
|
mixins: [emitter, fieldMixin, i18n],
|
|
43
79
|
props: {
|
|
44
80
|
field: Object,
|
|
@@ -49,30 +85,27 @@ export default {
|
|
|
49
85
|
|
|
50
86
|
designState: {
|
|
51
87
|
type: Boolean,
|
|
52
|
-
default: false
|
|
88
|
+
default: false,
|
|
53
89
|
},
|
|
54
90
|
|
|
55
|
-
subFormRowIndex: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: -1
|
|
91
|
+
subFormRowIndex: {
|
|
92
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
|
93
|
+
default: -1,
|
|
58
94
|
},
|
|
59
|
-
subFormColIndex: {
|
|
60
|
-
type: Number,
|
|
61
|
-
default: -1
|
|
95
|
+
subFormColIndex: {
|
|
96
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
|
97
|
+
default: -1,
|
|
62
98
|
},
|
|
63
|
-
subFormRowId: {
|
|
64
|
-
type: String,
|
|
65
|
-
default:
|
|
99
|
+
subFormRowId: {
|
|
100
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
|
101
|
+
default: "",
|
|
66
102
|
},
|
|
67
|
-
|
|
68
103
|
},
|
|
69
104
|
components: {
|
|
70
105
|
StaticContentWrapper,
|
|
71
|
-
dropdownItemWidget
|
|
72
|
-
},
|
|
73
|
-
computed: {
|
|
74
|
-
|
|
106
|
+
dropdownItemWidget,
|
|
75
107
|
},
|
|
108
|
+
computed: {},
|
|
76
109
|
beforeCreate() {
|
|
77
110
|
/* 这里不能访问方法和属性!! */
|
|
78
111
|
},
|
|
@@ -80,49 +113,58 @@ export default {
|
|
|
80
113
|
created() {
|
|
81
114
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
82
115
|
需要在父组件created中初始化!! */
|
|
83
|
-
this.registerToRefList()
|
|
84
|
-
this.initEventHandler()
|
|
85
|
-
this.init()
|
|
86
|
-
this.handleOnCreated()
|
|
116
|
+
this.registerToRefList();
|
|
117
|
+
this.initEventHandler();
|
|
118
|
+
this.init();
|
|
119
|
+
this.handleOnCreated();
|
|
87
120
|
},
|
|
88
121
|
|
|
89
122
|
mounted() {
|
|
90
|
-
this.handleOnMounted()
|
|
123
|
+
this.handleOnMounted();
|
|
91
124
|
},
|
|
92
125
|
|
|
93
126
|
beforeDestroy() {
|
|
94
|
-
this.unregisterFromRefList()
|
|
127
|
+
this.unregisterFromRefList();
|
|
95
128
|
},
|
|
96
129
|
|
|
97
130
|
methods: {
|
|
98
|
-
init(){
|
|
99
|
-
if(this.designState)return
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
init() {
|
|
132
|
+
if (this.designState) return;
|
|
133
|
+
if (!this.field.options.dropdownType)
|
|
134
|
+
this.field.options.dropdownType = "button";
|
|
135
|
+
if (!this.field.options.dropdownTrigger)
|
|
136
|
+
this.field.options.dropdownTrigger = "hover";
|
|
137
|
+
let isShow = this.field.widgetList.some((item) => !item.options.hidden);
|
|
138
|
+
if (!isShow) {
|
|
139
|
+
this.field.options.hidden = true;
|
|
103
140
|
}
|
|
104
|
-
let isEnabled = this.field.widgetList.some(
|
|
105
|
-
|
|
106
|
-
|
|
141
|
+
let isEnabled = this.field.widgetList.some(
|
|
142
|
+
(item) => !item.options.disabled
|
|
143
|
+
);
|
|
144
|
+
if (!isEnabled) {
|
|
145
|
+
this.field.options.disabled = true;
|
|
107
146
|
}
|
|
108
147
|
},
|
|
109
148
|
handleSubButtonWidgetClick(e, index) {
|
|
110
|
-
this.$refs["item"+index][0].handleButtonWidgetClick(e)
|
|
149
|
+
this.$refs["item" + index][0].handleButtonWidgetClick(e);
|
|
111
150
|
},
|
|
112
151
|
handleHidden() {
|
|
113
|
-
let isShow = this.field.widgetList.some((item) => !item.options.hidden)
|
|
114
|
-
this.setHidden(!isShow)
|
|
152
|
+
let isShow = this.field.widgetList.some((item) => !item.options.hidden);
|
|
153
|
+
this.setHidden(!isShow);
|
|
115
154
|
},
|
|
116
155
|
handleDisabled() {
|
|
117
|
-
let isEnabled = this.field.widgetList.some(
|
|
118
|
-
|
|
156
|
+
let isEnabled = this.field.widgetList.some(
|
|
157
|
+
(item) => !item.options.disabled
|
|
158
|
+
);
|
|
159
|
+
this.setDisabled(!isEnabled);
|
|
119
160
|
},
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}
|
|
161
|
+
},
|
|
162
|
+
};
|
|
123
163
|
</script>
|
|
124
164
|
|
|
125
165
|
<style lang="scss" scoped>
|
|
126
166
|
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
|
127
|
-
|
|
167
|
+
.el-dropdown-link[disabled] a.a-link {
|
|
168
|
+
cursor: not-allowed;
|
|
169
|
+
}
|
|
128
170
|
</style>
|
|
@@ -104,7 +104,9 @@
|
|
|
104
104
|
@change="changeFormatS(scope.row, false)"
|
|
105
105
|
clearable
|
|
106
106
|
>
|
|
107
|
-
<el-option-group
|
|
107
|
+
<el-option-group
|
|
108
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
|
109
|
+
>
|
|
108
110
|
<el-option value="render" label="render"></el-option>
|
|
109
111
|
</el-option-group>
|
|
110
112
|
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
|
@@ -172,7 +174,12 @@
|
|
|
172
174
|
<el-switch v-model="scope.row.filterable"></el-switch>
|
|
173
175
|
</template>
|
|
174
176
|
</el-table-column>
|
|
175
|
-
<el-table-column
|
|
177
|
+
<el-table-column
|
|
178
|
+
label="编辑更多属性"
|
|
179
|
+
width="100"
|
|
180
|
+
align="center"
|
|
181
|
+
fixed="right"
|
|
182
|
+
>
|
|
176
183
|
<template #default="scope">
|
|
177
184
|
<el-button
|
|
178
185
|
size="mini"
|
|
@@ -286,7 +293,11 @@
|
|
|
286
293
|
top="7vh"
|
|
287
294
|
:append-to-body="true"
|
|
288
295
|
>
|
|
289
|
-
<el-alert
|
|
296
|
+
<el-alert
|
|
297
|
+
type="info"
|
|
298
|
+
:closable="!1"
|
|
299
|
+
title="function customRender(params,h) {"
|
|
300
|
+
/>
|
|
290
301
|
<code-editor
|
|
291
302
|
ref="dsResultEditor"
|
|
292
303
|
mode="javascript"
|
|
@@ -455,7 +466,9 @@
|
|
|
455
466
|
@change="changeFormatS(rowData, false)"
|
|
456
467
|
clearable
|
|
457
468
|
>
|
|
458
|
-
<el-option-group
|
|
469
|
+
<el-option-group
|
|
470
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
|
471
|
+
>
|
|
459
472
|
<el-option value="render" label="render"></el-option>
|
|
460
473
|
</el-option-group>
|
|
461
474
|
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
|
@@ -476,7 +489,8 @@
|
|
|
476
489
|
icon="el-icon-edit"
|
|
477
490
|
@click="openFormatConfigDialog(rowData, rowDataIndex)"
|
|
478
491
|
:disabled="
|
|
479
|
-
!columnFormatMap[rowData.formatS] &&
|
|
492
|
+
!columnFormatMap[rowData.formatS] &&
|
|
493
|
+
'widgetRender' !== rowData.formatS
|
|
480
494
|
"
|
|
481
495
|
></el-button>
|
|
482
496
|
</el-form-item>
|
|
@@ -559,7 +573,9 @@
|
|
|
559
573
|
plain=""
|
|
560
574
|
round=""
|
|
561
575
|
icon="el-icon-edit"
|
|
562
|
-
@click="
|
|
576
|
+
@click="
|
|
577
|
+
editFormEventHandler(rowData, rowDataIndex, 'footerMethodConfg')
|
|
578
|
+
"
|
|
563
579
|
:disabled="rowData.footerDataType !== '3'"
|
|
564
580
|
></el-button>
|
|
565
581
|
</el-form-item>
|
|
@@ -575,7 +591,11 @@
|
|
|
575
591
|
</el-form>
|
|
576
592
|
</div>
|
|
577
593
|
<div class="dialog-footer" slot="footer">
|
|
578
|
-
<el-button
|
|
594
|
+
<el-button
|
|
595
|
+
@click="closeRowEditDialog"
|
|
596
|
+
class="button-sty"
|
|
597
|
+
icon="el-icon-close"
|
|
598
|
+
>
|
|
579
599
|
{{ i18nt("designer.hint.cancel") }}
|
|
580
600
|
</el-button>
|
|
581
601
|
<el-button
|
|
@@ -671,6 +691,10 @@ export default {
|
|
|
671
691
|
value: "editDate",
|
|
672
692
|
label: "日期输入框",
|
|
673
693
|
},
|
|
694
|
+
{
|
|
695
|
+
value: "textarea",
|
|
696
|
+
label: "多行文本输入框",
|
|
697
|
+
},
|
|
674
698
|
{
|
|
675
699
|
value: "editSelect",
|
|
676
700
|
label: "下拉框",
|
|
@@ -699,6 +723,23 @@ export default {
|
|
|
699
723
|
value: "text",
|
|
700
724
|
label: "文本",
|
|
701
725
|
},
|
|
726
|
+
{
|
|
727
|
+
value: "aText",
|
|
728
|
+
label: "超链接文本",
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
value: "widgetRender",
|
|
732
|
+
label: "自定义组件",
|
|
733
|
+
},
|
|
734
|
+
],
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
label: "按钮控件",
|
|
738
|
+
options: [
|
|
739
|
+
{
|
|
740
|
+
value: "dropdown",
|
|
741
|
+
label: "下拉按钮",
|
|
742
|
+
},
|
|
702
743
|
{
|
|
703
744
|
value: "editDelete",
|
|
704
745
|
label: "删除按钮",
|
|
@@ -707,10 +748,6 @@ export default {
|
|
|
707
748
|
value: "editButton",
|
|
708
749
|
label: "查看按钮",
|
|
709
750
|
},
|
|
710
|
-
{
|
|
711
|
-
value: "aText",
|
|
712
|
-
label: "超链接文本",
|
|
713
|
-
},
|
|
714
751
|
{
|
|
715
752
|
value: "aLink",
|
|
716
753
|
label: "超链接按钮",
|
|
@@ -723,10 +760,6 @@ export default {
|
|
|
723
760
|
value: "editTreeButtonGroup",
|
|
724
761
|
label: "编辑行按钮组",
|
|
725
762
|
},
|
|
726
|
-
{
|
|
727
|
-
value: "widgetRender",
|
|
728
|
-
label: "自定义组件",
|
|
729
|
-
},
|
|
730
763
|
],
|
|
731
764
|
},
|
|
732
765
|
{
|
|
@@ -760,7 +793,7 @@ export default {
|
|
|
760
793
|
options: businessOptions,
|
|
761
794
|
},
|
|
762
795
|
{
|
|
763
|
-
label: "
|
|
796
|
+
label: "日期格式化",
|
|
764
797
|
options: [
|
|
765
798
|
{
|
|
766
799
|
value: "d1",
|
|
@@ -785,7 +818,7 @@ export default {
|
|
|
785
818
|
],
|
|
786
819
|
},
|
|
787
820
|
{
|
|
788
|
-
label: "
|
|
821
|
+
label: "数字格式化",
|
|
789
822
|
options: [
|
|
790
823
|
{
|
|
791
824
|
value: "n1",
|
|
@@ -900,7 +933,9 @@ export default {
|
|
|
900
933
|
});
|
|
901
934
|
|
|
902
935
|
if (syntaxErrorFlag) {
|
|
903
|
-
this.$message.error(
|
|
936
|
+
this.$message.error(
|
|
937
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
938
|
+
);
|
|
904
939
|
return;
|
|
905
940
|
}
|
|
906
941
|
}
|
|
@@ -909,7 +944,9 @@ export default {
|
|
|
909
944
|
},
|
|
910
945
|
init() {
|
|
911
946
|
setTimeout(() => {
|
|
912
|
-
this.tableData = this.$baseLodash.cloneDeep(
|
|
947
|
+
this.tableData = this.$baseLodash.cloneDeep(
|
|
948
|
+
this.optionModel.tableColumns
|
|
949
|
+
);
|
|
913
950
|
this.$nextTick(() => {
|
|
914
951
|
this.rowDrop();
|
|
915
952
|
setTimeout(() => {
|
|
@@ -1009,7 +1046,8 @@ export default {
|
|
|
1009
1046
|
let newRow = this.generateRow(generateParentId);
|
|
1010
1047
|
if (children) {
|
|
1011
1048
|
if (type === "SIBLING") {
|
|
1012
|
-
let addIndex =
|
|
1049
|
+
let addIndex =
|
|
1050
|
+
children.findIndex((item) => item.columnId == row.columnId) + 1;
|
|
1013
1051
|
children.splice(addIndex, 0, newRow);
|
|
1014
1052
|
} else {
|
|
1015
1053
|
children.push(newRow);
|
|
@@ -1057,7 +1095,9 @@ export default {
|
|
|
1057
1095
|
const { parentId, columnId } = row;
|
|
1058
1096
|
// 根节点直接删除
|
|
1059
1097
|
if (!parentId) {
|
|
1060
|
-
const delIndex = this.tableData.findIndex(
|
|
1098
|
+
const delIndex = this.tableData.findIndex(
|
|
1099
|
+
(item) => item.columnId === columnId
|
|
1100
|
+
);
|
|
1061
1101
|
this.tableData.splice(delIndex, 1);
|
|
1062
1102
|
} else {
|
|
1063
1103
|
// 找到父节点,通过父节点删除
|
|
@@ -1076,7 +1116,9 @@ export default {
|
|
|
1076
1116
|
|
|
1077
1117
|
const { children } = parentRow;
|
|
1078
1118
|
|
|
1079
|
-
const delIndex = children.findIndex(
|
|
1119
|
+
const delIndex = children.findIndex(
|
|
1120
|
+
(item) => item.columnId === columnId
|
|
1121
|
+
);
|
|
1080
1122
|
|
|
1081
1123
|
children.splice(delIndex, 1);
|
|
1082
1124
|
}
|
|
@@ -1140,7 +1182,9 @@ export default {
|
|
|
1140
1182
|
//数组转树
|
|
1141
1183
|
arrToTree(arr, parentId) {
|
|
1142
1184
|
return arr
|
|
1143
|
-
.filter((item) =>
|
|
1185
|
+
.filter((item) =>
|
|
1186
|
+
!parentId ? !item.parentId : item.parentId === parentId
|
|
1187
|
+
)
|
|
1144
1188
|
.map((item) => {
|
|
1145
1189
|
item.children = this.arrToTree(arr, item.columnId);
|
|
1146
1190
|
return item;
|
|
@@ -1224,7 +1268,10 @@ export default {
|
|
|
1224
1268
|
let isButtontCell = false;
|
|
1225
1269
|
let widgetType = this.columnFormatMap[formatS];
|
|
1226
1270
|
if (widgetType) {
|
|
1227
|
-
isButtontCell =
|
|
1271
|
+
isButtontCell =
|
|
1272
|
+
widgetType === "a-link" ||
|
|
1273
|
+
widgetType === "button" ||
|
|
1274
|
+
widgetType === "dropdown";
|
|
1228
1275
|
}
|
|
1229
1276
|
return isButtontCell;
|
|
1230
1277
|
},
|
|
@@ -1268,7 +1315,9 @@ export default {
|
|
|
1268
1315
|
row.sortable = false;
|
|
1269
1316
|
row.width = 150;
|
|
1270
1317
|
} else if (isButtontCell) {
|
|
1271
|
-
if (row.formatS == "
|
|
1318
|
+
if (row.formatS == "dropdown") {
|
|
1319
|
+
row.width = 100;
|
|
1320
|
+
} else if (row.formatS == "aLink" || row.formatS == "button") {
|
|
1272
1321
|
if (!row.width || row.width == 47) row.width = 150;
|
|
1273
1322
|
} else {
|
|
1274
1323
|
row.width = 47;
|
|
@@ -1283,7 +1332,9 @@ export default {
|
|
|
1283
1332
|
if (!row.label) row.label = tmpId;
|
|
1284
1333
|
|
|
1285
1334
|
if (this.userFields.includes(row.formatS)) {
|
|
1286
|
-
let item = this.businessOptions.find(
|
|
1335
|
+
let item = this.businessOptions.find(
|
|
1336
|
+
(item) => item.value == row.formatS
|
|
1337
|
+
);
|
|
1287
1338
|
if (item) {
|
|
1288
1339
|
row.prop = item.value;
|
|
1289
1340
|
row.label = item.label;
|
|
@@ -1413,15 +1464,18 @@ export default {
|
|
|
1413
1464
|
findColumnByColumnId(columnList, columnId) {
|
|
1414
1465
|
let result = null;
|
|
1415
1466
|
if (columnList) {
|
|
1416
|
-
|
|
1467
|
+
let column = columnList.find((item) => item.columnId == columnId);
|
|
1417
1468
|
if (!column) {
|
|
1418
|
-
}
|
|
1469
|
+
}
|
|
1419
1470
|
for (let column of columnList) {
|
|
1420
1471
|
if (column.columnId == columnId) {
|
|
1421
1472
|
result = column;
|
|
1422
1473
|
break;
|
|
1423
1474
|
} else if (column.children && column.children.length) {
|
|
1424
|
-
let subColumn = this.findColumnByColumnId(
|
|
1475
|
+
let subColumn = this.findColumnByColumnId(
|
|
1476
|
+
column.children,
|
|
1477
|
+
children
|
|
1478
|
+
);
|
|
1425
1479
|
if (subColumn) {
|
|
1426
1480
|
result = subColumn;
|
|
1427
1481
|
break;
|
|
@@ -1452,7 +1506,10 @@ export default {
|
|
|
1452
1506
|
loopHandleWidget(formWidgetList, (item) => {
|
|
1453
1507
|
if (item.options.name == dataTableName) {
|
|
1454
1508
|
item.options.tableColumns = tableData;
|
|
1455
|
-
targetColumn = this.findColumnByColumnId(
|
|
1509
|
+
targetColumn = this.findColumnByColumnId(
|
|
1510
|
+
item.options.tableColumns,
|
|
1511
|
+
columnId
|
|
1512
|
+
);
|
|
1456
1513
|
}
|
|
1457
1514
|
});
|
|
1458
1515
|
let getWidgetList = (subWidgetList = []) => {
|
|
@@ -1587,7 +1644,9 @@ export default {
|
|
|
1587
1644
|
});
|
|
1588
1645
|
|
|
1589
1646
|
if (syntaxErrorFlag) {
|
|
1590
|
-
this.$message.error(
|
|
1647
|
+
this.$message.error(
|
|
1648
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1649
|
+
);
|
|
1591
1650
|
return;
|
|
1592
1651
|
}
|
|
1593
1652
|
}
|
|
@@ -1611,19 +1670,25 @@ export default {
|
|
|
1611
1670
|
let type1 = this.columnFormatMap[row.formatS];
|
|
1612
1671
|
let type2 = this.columnFormatMap[row.editFormatS];
|
|
1613
1672
|
let newWidget = type1
|
|
1614
|
-
? this.designer.copyNewFieldWidget(
|
|
1673
|
+
? this.designer.copyNewFieldWidget(
|
|
1674
|
+
this.designer.getFieldWidgetByType(type1)
|
|
1675
|
+
)
|
|
1615
1676
|
: null;
|
|
1616
1677
|
|
|
1617
1678
|
let newEditWidget = type2
|
|
1618
|
-
? this.designer.copyNewFieldWidget(
|
|
1679
|
+
? this.designer.copyNewFieldWidget(
|
|
1680
|
+
this.designer.getFieldWidgetByType(type2)
|
|
1681
|
+
)
|
|
1619
1682
|
: null;
|
|
1620
1683
|
|
|
1621
1684
|
if (newWidget.formItemFlag) {
|
|
1622
1685
|
if (row.widget) {
|
|
1623
|
-
if (row.widget.options[key] !== undefined)
|
|
1686
|
+
if (row.widget.options[key] !== undefined)
|
|
1687
|
+
row.widget.options[key] = value;
|
|
1624
1688
|
}
|
|
1625
1689
|
if (row.columnOption) {
|
|
1626
|
-
if (row.columnOption[key] !== undefined)
|
|
1690
|
+
if (row.columnOption[key] !== undefined)
|
|
1691
|
+
row.columnOption[key] = value;
|
|
1627
1692
|
}
|
|
1628
1693
|
}
|
|
1629
1694
|
|
|
@@ -1633,7 +1698,8 @@ export default {
|
|
|
1633
1698
|
row.editWidget.options[key] = value;
|
|
1634
1699
|
}
|
|
1635
1700
|
if (row.editColumnOption) {
|
|
1636
|
-
if (row.editColumnOption[key] !== undefined)
|
|
1701
|
+
if (row.editColumnOption[key] !== undefined)
|
|
1702
|
+
row.editColumnOption[key] = value;
|
|
1637
1703
|
}
|
|
1638
1704
|
}
|
|
1639
1705
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<!-- <el-form-item :label="i18nt('启用流程')">
|
|
4
|
-
<el-switch v-model="optionModel.wfEnabled"></el-switch>
|
|
5
|
-
</el-form-item>-->
|
|
6
3
|
<el-form-item label-width="0">
|
|
7
4
|
<el-divider class="custom-divider">{{ i18nt('designer.setting.columnSetting') }}</el-divider>
|
|
8
5
|
</el-form-item>
|
|
6
|
+
<el-form-item :label="i18nt('隐藏导航')">
|
|
7
|
+
<el-switch v-model="optionModel.hideNav"></el-switch>
|
|
8
|
+
</el-form-item>
|
|
9
9
|
<el-form-item :label="i18nt('designer.setting.colsOfGrid')"></el-form-item>
|
|
10
10
|
<el-form-item label-width="0">
|
|
11
11
|
<draggable tag="ul" class="draggable-box" :list="selectedWidget.panes"
|