cloud-web-corejs 1.0.54-dev.15 → 1.0.54-dev.150
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 +9 -3
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/VabUpload/index.vue +2 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/view.vue +4 -3
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/baseAttachment/index.vue +20 -11
- package/src/components/baseAttachment/mixins.js +249 -1
- package/src/components/excelExport/exportFieldDialog.vue +16 -6
- package/src/components/excelExport/index.js +2 -1
- package/src/components/excelExport/index.vue +8 -6
- package/src/components/excelExport/mixins.js +1 -2
- package/src/components/excelImport/index.vue +1 -0
- package/src/components/excelImport/mixins.js +1 -735
- package/src/components/fileLibrary/fileObjAuthDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +7 -1
- package/src/components/fileLibrary/fileObjNotifyEdit.vue +90 -68
- package/src/components/fileLibrary/filterDialog.vue +383 -0
- package/src/components/fileLibrary/index.vue +23 -24
- package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +337 -207
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +33 -26
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +5 -5
- package/src/components/fileLibrary/mixins/indexMixins.js +77 -27
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +63 -3
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +1 -1
- package/src/components/fileLibrary/propertiesDialog.vue +18 -0
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/jsonImport/mixins.js +1 -1
- package/src/components/onlineTalk/index.vue +327 -5
- package/src/components/onlineTalk/mixins.js +1 -1
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/index.js +12 -10
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +1 -1
- package/src/components/table/vxeFilter/mixin.js +1 -1
- package/src/components/vb-tabs/x-tabs.vue +3 -2
- package/src/components/wf/wf.js +1 -1
- package/src/components/wf/wfStartDialog.vue +1 -1
- package/src/components/wf/wfUtil.js +1 -1
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +7 -3
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +35 -5
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +3 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +11 -2
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +32 -5
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +10 -5
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1245 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +4 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +67 -3
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +9 -4
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +8 -2
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +80 -0
- package/src/components/xform/form-designer/indexMixin.js +785 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +67 -36
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +322 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +127 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1051 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +628 -300
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +27 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +42 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +177 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +22 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +242 -27
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +5 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +4 -7
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +276 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +184 -148
- package/src/components/xform/form-render/container-item/containerItemMixin.js +330 -1
- package/src/components/xform/form-render/container-item/data-table-item.vue +33 -11
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2127 -18
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/indexMixin.js +1802 -1
- package/src/components/xform/lang/zh-CN.js +1 -1
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +129 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/util.js +1 -1
- package/src/layout/components/Sidebar/default.vue +50 -6
- package/src/layout/components/TagsView/index.vue +0 -1
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +96 -0
- package/src/layout/components/extractedCode/viewDialog.vue +192 -0
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/router/modules/customer.js +15 -0
- package/src/store/config/index.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/user.js +1 -1
- package/src/utils/index.js +4 -2
- package/src/utils/pddLog.js +103 -0
- package/src/utils/request.js +28 -28
- package/src/utils/vab.js +19 -27
- package/src/views/bd/setting/form_import_log/edit.vue +127 -0
- package/src/views/bd/setting/form_import_log/list.vue +205 -0
- package/src/views/bd/setting/form_script/edit1.vue +1 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +3 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +14 -14
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/edit.vue +9 -1
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +4 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +25 -22
- package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -0
- package/src/views/bd/setting/form_template/wf_list.vue +127 -0
- package/src/views/bd/setting/menu_kind/mixins/list.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +824 -426
- package/src/views/bd/setting/table_model/mixins/edit.js +1047 -13
- package/src/views/bd/setting/table_model/mixins/list.js +14 -14
- package/src/views/user/area/dialog.vue +21 -9
- package/src/views/user/bill_setting/edit.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/common_attribute/itemEdit.vue +2 -2
- package/src/views/user/common_attribute/list.vue +1 -1
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +164 -154
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +1 -0
- package/src/views/user/extend_datasource/edit.vue +3 -0
- package/src/views/user/extend_datasource/list.vue +2 -1
- package/src/views/user/file_type/edit.vue +30 -1
- package/src/views/user/file_type/list.vue +28 -0
- package/src/views/user/form/vform/designer.vue +772 -749
- package/src/views/user/form/view/list.vue +27 -9
- package/src/views/user/groups/edit.vue +2 -0
- package/src/views/user/groups/list.vue +1 -0
- package/src/views/user/home/default.vue +1007 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/login/default.vue +4 -2
- package/src/views/user/login/index2.vue +131 -0
- package/src/views/user/notify_message/dialog.vue +1 -1
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
- package/src/views/user/outLink/form_view.vue +39 -12
- package/src/views/user/outLink/index.vue +17 -0
- package/src/views/user/outLink/view.vue +39 -13
- package/src/views/user/position/list.vue +4 -4
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/role/dialog.vue +1 -1
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/user/dialog.vue +1 -1
- package/src/views/user/user/edit.vue +9 -9
- package/src/views/user/user/form_edit.vue +63 -2
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/form_list.vue +1 -0
- package/src/views/user/user/list.vue +3 -3
- package/src/views/user/wf/wf_manage/list.vue +1 -1
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list.vue +1 -13
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
@@ -31,24 +31,45 @@
|
|
31
31
|
<span>{{ scope.$index + 1 }}</span>
|
32
32
|
</template>
|
33
33
|
</el-table-column>
|
34
|
-
<el-table-column label="" width="35" fixed="left"
|
34
|
+
<el-table-column label="" width="35" fixed="left"
|
35
|
+
><i class="el-icon-s-operation drag-option"></i>
|
35
36
|
</el-table-column>
|
36
|
-
<el-table-column
|
37
|
+
<el-table-column
|
38
|
+
:label="i18nt('designer.setting.columnLabel')"
|
39
|
+
width="150"
|
40
|
+
prop="label"
|
41
|
+
fixed="left"
|
42
|
+
>
|
37
43
|
<template slot-scope="scope">
|
38
44
|
<el-input v-model="scope.row.label"></el-input>
|
39
45
|
</template>
|
40
46
|
</el-table-column>
|
41
|
-
<el-table-column
|
47
|
+
<el-table-column
|
48
|
+
:label="i18nt('designer.setting.columnName')"
|
49
|
+
width="150"
|
50
|
+
prop="prop"
|
51
|
+
>
|
42
52
|
<template slot-scope="scope">
|
43
|
-
<el-input
|
53
|
+
<el-input
|
54
|
+
v-model="scope.row.prop"
|
55
|
+
:disabled="'editAttachment' == scope.row.formatS"
|
56
|
+
></el-input>
|
44
57
|
</template>
|
45
58
|
</el-table-column>
|
46
|
-
<el-table-column
|
59
|
+
<el-table-column
|
60
|
+
:label="i18nt('designer.setting.columnWidth')"
|
61
|
+
width="100"
|
62
|
+
prop="width"
|
63
|
+
>
|
47
64
|
<template slot-scope="scope">
|
48
65
|
<el-input v-model="scope.row.width"></el-input>
|
49
66
|
</template>
|
50
67
|
</el-table-column>
|
51
|
-
<el-table-column
|
68
|
+
<el-table-column
|
69
|
+
:label="i18nt('designer.setting.visibleColumn')"
|
70
|
+
width="70"
|
71
|
+
prop="show"
|
72
|
+
>
|
52
73
|
<template slot-scope="scope">
|
53
74
|
<el-switch v-model="scope.row.show"></el-switch>
|
54
75
|
</template>
|
@@ -58,12 +79,25 @@
|
|
58
79
|
<el-switch v-model="scope.row.required"></el-switch>
|
59
80
|
</template>
|
60
81
|
</el-table-column>
|
61
|
-
<el-table-column
|
82
|
+
<el-table-column
|
83
|
+
:label="i18nt('designer.setting.sortableColumn')"
|
84
|
+
width="70"
|
85
|
+
prop="sortable"
|
86
|
+
>
|
62
87
|
<template slot-scope="scope">
|
63
88
|
<el-switch v-model="scope.row.sortable"></el-switch>
|
64
89
|
</template>
|
65
90
|
</el-table-column>
|
66
|
-
<el-table-column :label="i18nt('
|
91
|
+
<el-table-column :label="i18nt('明细行')" width="70" prop="sortable">
|
92
|
+
<template slot-scope="scope">
|
93
|
+
<el-switch v-model="scope.row.isItemLine"></el-switch>
|
94
|
+
</template>
|
95
|
+
</el-table-column>
|
96
|
+
<el-table-column
|
97
|
+
:label="i18nt('designer.setting.fixedColumn')"
|
98
|
+
width="100"
|
99
|
+
prop="fixed"
|
100
|
+
>
|
67
101
|
<template slot-scope="scope">
|
68
102
|
<el-select v-model="scope.row.fixed" clearable>
|
69
103
|
<el-option value="left">left</el-option>
|
@@ -78,57 +112,163 @@
|
|
78
112
|
</el-select>
|
79
113
|
</template>
|
80
114
|
</el-table-column>-->
|
81
|
-
<el-table-column
|
115
|
+
<el-table-column
|
116
|
+
:label="i18nt('designer.setting.formatOfColumn')"
|
117
|
+
width="200"
|
118
|
+
prop="formatS"
|
119
|
+
>
|
82
120
|
<template slot-scope="scope">
|
83
|
-
<el-select
|
84
|
-
|
121
|
+
<el-select
|
122
|
+
v-model="scope.row.formatS"
|
123
|
+
@change="changeFormatS(scope.row)"
|
124
|
+
clearable
|
125
|
+
>
|
126
|
+
<el-option-group
|
127
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
128
|
+
>
|
85
129
|
<el-option value="render" label="render"></el-option>
|
86
130
|
</el-option-group>
|
87
|
-
<el-option-group
|
88
|
-
|
131
|
+
<el-option-group
|
132
|
+
v-for="t in op"
|
133
|
+
:key="t.label"
|
134
|
+
:label="t.label"
|
135
|
+
>
|
136
|
+
<el-option
|
137
|
+
v-for="e in t.options"
|
138
|
+
:key="e.value"
|
139
|
+
:value="e.value"
|
140
|
+
:label="e.label"
|
141
|
+
></el-option>
|
89
142
|
</el-option-group>
|
90
143
|
</el-select>
|
91
144
|
</template>
|
92
145
|
</el-table-column>
|
93
146
|
<el-table-column :label="i18nt('自定义表格列配置')" width="150">
|
94
147
|
<template slot-scope="scope">
|
95
|
-
<a
|
96
|
-
|
148
|
+
<a
|
149
|
+
href="javascript:void(0);"
|
150
|
+
class="a-link link-oneLind"
|
151
|
+
@click="openTableColumnConfigDialog(scope.row, scope.$index)"
|
152
|
+
>
|
97
153
|
<span>{{ scope.row.tableColumnConfig }}</span>
|
98
154
|
<i class="el-icon-edit"></i>
|
99
155
|
</a>
|
100
156
|
</template>
|
101
157
|
</el-table-column>
|
102
|
-
<el-table-column :label="i18nt('
|
158
|
+
<el-table-column :label="i18nt('下拉列')" width="70" prop="sortable">
|
103
159
|
<template slot-scope="scope">
|
104
160
|
<el-switch v-model="scope.row.treeNode"></el-switch>
|
105
161
|
</template>
|
106
162
|
</el-table-column>
|
107
|
-
<el-table-column
|
163
|
+
<el-table-column
|
164
|
+
:label="i18nt('编辑插槽类型')"
|
165
|
+
width="200"
|
166
|
+
prop="editFormatS"
|
167
|
+
>
|
168
|
+
<template slot-scope="scope">
|
169
|
+
<el-select
|
170
|
+
v-model="scope.row.editFormatS"
|
171
|
+
@change="changeFormatS(scope.row)"
|
172
|
+
clearable
|
173
|
+
>
|
174
|
+
<el-option
|
175
|
+
v-for="e in editOp"
|
176
|
+
:key="e.value"
|
177
|
+
:value="e.value"
|
178
|
+
:label="e.label"
|
179
|
+
></el-option>
|
180
|
+
</el-select>
|
181
|
+
</template>
|
182
|
+
</el-table-column>
|
183
|
+
<el-table-column label="编辑插槽配置" width="150" align="center">
|
184
|
+
<template slot-scope="scope">
|
185
|
+
<el-button
|
186
|
+
size="mini"
|
187
|
+
plain=""
|
188
|
+
round=""
|
189
|
+
icon="el-icon-edit"
|
190
|
+
@click="openEditFormatConfigDialog(scope.row, scope.$index)"
|
191
|
+
:disabled="!scope.row.editFormatS"
|
192
|
+
></el-button>
|
193
|
+
</template>
|
194
|
+
</el-table-column>
|
195
|
+
<el-table-column
|
196
|
+
:label="i18nt('导出类型')"
|
197
|
+
width="200"
|
198
|
+
prop="formatS"
|
199
|
+
>
|
108
200
|
<template slot-scope="scope">
|
109
|
-
<el-select v-model="scope.row.
|
110
|
-
<el-option
|
201
|
+
<el-select v-model="scope.row.exportType" clearable>
|
202
|
+
<el-option value="Image2" label="图片"></el-option>
|
203
|
+
<el-option value="Number" label="数值"></el-option>
|
111
204
|
</el-select>
|
112
205
|
</template>
|
113
206
|
</el-table-column>
|
114
|
-
|
207
|
+
|
208
|
+
<el-table-column
|
209
|
+
:label="i18nt('表尾统计行类型')"
|
210
|
+
width="200"
|
211
|
+
prop="formatS"
|
212
|
+
>
|
115
213
|
<template slot-scope="scope">
|
116
|
-
<el-
|
117
|
-
|
118
|
-
|
214
|
+
<el-select v-model="scope.row.footerDataType" clearable>
|
215
|
+
<el-option value="1" label="合计"></el-option>
|
216
|
+
<el-option value="2" label="平均"></el-option>
|
217
|
+
<el-option value="3" label="自定义"></el-option>
|
218
|
+
</el-select>
|
119
219
|
</template>
|
120
220
|
</el-table-column>
|
121
|
-
<el-table-column label="
|
221
|
+
<el-table-column label="表尾统计行配置" width="150" align="center">
|
122
222
|
<template slot-scope="scope">
|
123
|
-
<el-button
|
124
|
-
|
125
|
-
|
223
|
+
<el-button
|
224
|
+
size="mini"
|
225
|
+
plain=""
|
226
|
+
round=""
|
227
|
+
icon="el-icon-edit"
|
228
|
+
@click="
|
229
|
+
editFormEventHandler(
|
230
|
+
scope.row,
|
231
|
+
scope.$index,
|
232
|
+
'footerMethodConfg'
|
233
|
+
)
|
234
|
+
"
|
235
|
+
:disabled="scope.row.footerDataType !== '3'"
|
236
|
+
></el-button>
|
126
237
|
</template>
|
127
238
|
</el-table-column>
|
128
|
-
|
239
|
+
|
240
|
+
<el-table-column
|
241
|
+
label="格式化配置"
|
242
|
+
width="90"
|
243
|
+
fixed="right"
|
244
|
+
align="center"
|
245
|
+
>
|
129
246
|
<template slot-scope="scope">
|
130
|
-
<el-button
|
131
|
-
|
247
|
+
<el-button
|
248
|
+
size="mini"
|
249
|
+
plain=""
|
250
|
+
round=""
|
251
|
+
icon="el-icon-edit"
|
252
|
+
@click="openFormatConfigDialog(scope.row, scope.$index)"
|
253
|
+
:disabled="!columnFormatMap[scope.row.formatS] && 'widgetRender'!== scope.row.formatS"
|
254
|
+
></el-button>
|
255
|
+
</template>
|
256
|
+
</el-table-column>
|
257
|
+
<el-table-column
|
258
|
+
:label="i18nt('designer.setting.renderFunction')"
|
259
|
+
width="70"
|
260
|
+
fixed="right"
|
261
|
+
align="center"
|
262
|
+
>
|
263
|
+
<template slot-scope="scope">
|
264
|
+
<el-button
|
265
|
+
:disabled="'render' !== scope.row.formatS"
|
266
|
+
size="mini"
|
267
|
+
plain=""
|
268
|
+
round=""
|
269
|
+
icon="el-icon-edit"
|
270
|
+
@click="showRenderDialog(scope.row)"
|
271
|
+
></el-button>
|
132
272
|
</template>
|
133
273
|
</el-table-column>
|
134
274
|
<el-table-column label="操作" width="150" fixed="right">
|
@@ -141,7 +281,9 @@
|
|
141
281
|
placement="top"
|
142
282
|
>
|
143
283
|
<el-button
|
144
|
-
size="mini"
|
284
|
+
size="mini"
|
285
|
+
type=""
|
286
|
+
circle=""
|
145
287
|
icon="el-icon-plus"
|
146
288
|
@click="onAddRoot"
|
147
289
|
/>
|
@@ -156,7 +298,9 @@
|
|
156
298
|
placement="top"
|
157
299
|
>
|
158
300
|
<el-button
|
159
|
-
size="mini"
|
301
|
+
size="mini"
|
302
|
+
type=""
|
303
|
+
circle=""
|
160
304
|
icon="el-icon-plus"
|
161
305
|
@click="onAddSibling(row, $index)"
|
162
306
|
/>
|
@@ -170,7 +314,9 @@
|
|
170
314
|
placement="top"
|
171
315
|
>
|
172
316
|
<el-button
|
173
|
-
size="mini"
|
317
|
+
size="mini"
|
318
|
+
type=""
|
319
|
+
circle=""
|
174
320
|
icon="el-icon-circle-plus-outline"
|
175
321
|
@click="onAddChild(row, $index)"
|
176
322
|
/>
|
@@ -183,7 +329,9 @@
|
|
183
329
|
placement="top"
|
184
330
|
>
|
185
331
|
<el-button
|
186
|
-
size="mini"
|
332
|
+
size="mini"
|
333
|
+
type=""
|
334
|
+
circle=""
|
187
335
|
icon="el-icon-delete"
|
188
336
|
@click="onDelete(row, $index)"
|
189
337
|
/>
|
@@ -191,15 +339,22 @@
|
|
191
339
|
</template>
|
192
340
|
</el-table-column>
|
193
341
|
</el-table>
|
342
|
+
<columnRenderDialog :column="currentTableColumn" v-if="showColumnRenderDialog" :visiable.sync="showColumnRenderDialog" @confirm="confirmWidgetRenderDialog"></columnRenderDialog>
|
194
343
|
</div>
|
195
344
|
<div class="dialog-footer" slot="footer">
|
196
345
|
<el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
|
197
|
-
{{ i18nt(
|
346
|
+
{{ i18nt("designer.hint.cancel") }}
|
198
347
|
</el-button>
|
199
|
-
<el-button
|
200
|
-
|
348
|
+
<el-button
|
349
|
+
type="primary"
|
350
|
+
@click="colSubmit"
|
351
|
+
class="button-sty"
|
352
|
+
icon="el-icon-check"
|
353
|
+
>
|
354
|
+
{{ i18nt("designer.hint.confirm") }}
|
201
355
|
</el-button>
|
202
356
|
</div>
|
357
|
+
|
203
358
|
</el-dialog>
|
204
359
|
<el-dialog
|
205
360
|
v-if="showRenderDialogFlag"
|
@@ -213,16 +368,35 @@
|
|
213
368
|
:destroy-on-close="!0"
|
214
369
|
v-dialog-drag
|
215
370
|
top="7vh"
|
371
|
+
:append-to-body="true"
|
216
372
|
>
|
217
|
-
<el-alert
|
218
|
-
|
219
|
-
|
373
|
+
<el-alert
|
374
|
+
type="info"
|
375
|
+
:closable="!1"
|
376
|
+
title="function customRender(params,h) {"
|
377
|
+
/>
|
378
|
+
<code-editor
|
379
|
+
ref="dsResultEditor"
|
380
|
+
mode="javascript"
|
381
|
+
:readonly="!1"
|
382
|
+
v-model="renderJson"
|
383
|
+
></code-editor>
|
384
|
+
<el-alert type="info" :closable="!1" title="}" />
|
220
385
|
<div class="dialog-footer" slot="footer">
|
221
|
-
<el-button
|
222
|
-
|
386
|
+
<el-button
|
387
|
+
@click="showRenderDialogFlag = !1"
|
388
|
+
class="button-sty"
|
389
|
+
icon="el-icon-close"
|
390
|
+
>
|
391
|
+
{{ i18nt("designer.hint.cancel") }}
|
223
392
|
</el-button>
|
224
|
-
<el-button
|
225
|
-
|
393
|
+
<el-button
|
394
|
+
type="primary"
|
395
|
+
@click="saveColumnRender"
|
396
|
+
class="button-sty"
|
397
|
+
icon="el-icon-check"
|
398
|
+
>
|
399
|
+
{{ i18nt("designer.hint.confirm") }}
|
226
400
|
</el-button>
|
227
401
|
</div>
|
228
402
|
</el-dialog>
|
@@ -241,37 +415,101 @@
|
|
241
415
|
top="5vh"
|
242
416
|
>
|
243
417
|
<div class="cont">
|
244
|
-
<el-alert
|
245
|
-
|
246
|
-
|
418
|
+
<el-alert
|
419
|
+
type="info"
|
420
|
+
:closable="false"
|
421
|
+
:title="tableColumnConfigHeader"
|
422
|
+
></el-alert>
|
423
|
+
<code-editor
|
424
|
+
:mode="'javascript'"
|
425
|
+
:readonly="false"
|
426
|
+
v-model="tableColumnConfigCode"
|
427
|
+
ref="ecEditor"
|
428
|
+
></code-editor>
|
247
429
|
<el-alert type="info" :closable="false" title="}"></el-alert>
|
248
430
|
</div>
|
249
431
|
<div slot="footer" class="dialog-footer">
|
250
|
-
<el-button
|
251
|
-
|
432
|
+
<el-button
|
433
|
+
@click="showTableColumnConfigDialog = false"
|
434
|
+
class="button-sty"
|
435
|
+
icon="el-icon-close"
|
436
|
+
>
|
437
|
+
{{ i18nt("designer.hint.cancel") }}
|
252
438
|
</el-button>
|
253
|
-
<el-button
|
254
|
-
|
439
|
+
<el-button
|
440
|
+
type="primary"
|
441
|
+
@click="saveTableColumnConfigDialog"
|
442
|
+
class="button-sty"
|
443
|
+
icon="el-icon-check"
|
444
|
+
>
|
445
|
+
{{ i18nt("designer.hint.confirm") }}
|
446
|
+
</el-button>
|
447
|
+
</div>
|
448
|
+
</el-dialog>
|
449
|
+
<el-dialog
|
450
|
+
:title="i18nt('designer.setting.editFormEventHandler')"
|
451
|
+
:visible.sync="showFormEventDialogFlag"
|
452
|
+
v-if="showFormEventDialogFlag"
|
453
|
+
:show-close="true"
|
454
|
+
custom-class="dialog-style list-dialog"
|
455
|
+
v-dialog-drag
|
456
|
+
:close-on-click-modal="false"
|
457
|
+
:close-on-press-escape="false"
|
458
|
+
:destroy-on-close="true"
|
459
|
+
:append-to-body="true"
|
460
|
+
:modal-append-to-body="true"
|
461
|
+
top="5vh"
|
462
|
+
>
|
463
|
+
<div class="cont">
|
464
|
+
<el-alert
|
465
|
+
type="info"
|
466
|
+
:closable="false"
|
467
|
+
:title="'form.' + eventParamsMap[curEventName]"
|
468
|
+
></el-alert>
|
469
|
+
<code-editor
|
470
|
+
:mode="'javascript'"
|
471
|
+
:readonly="false"
|
472
|
+
v-model="formEventHandlerCode"
|
473
|
+
ref="ecEditor"
|
474
|
+
></code-editor>
|
475
|
+
<el-alert type="info" :closable="false" title="}"></el-alert>
|
476
|
+
</div>
|
477
|
+
<div slot="footer" class="dialog-footer">
|
478
|
+
<el-button
|
479
|
+
@click="showFormEventDialogFlag = false"
|
480
|
+
class="button-sty"
|
481
|
+
icon="el-icon-close"
|
482
|
+
>
|
483
|
+
{{ i18nt("designer.hint.cancel") }}
|
484
|
+
</el-button>
|
485
|
+
<el-button
|
486
|
+
type="primary"
|
487
|
+
@click="saveFormEventHandler"
|
488
|
+
class="button-sty"
|
489
|
+
icon="el-icon-check"
|
490
|
+
>
|
491
|
+
{{ i18nt("designer.hint.confirm") }}
|
255
492
|
</el-button>
|
256
493
|
</div>
|
257
494
|
</el-dialog>
|
258
|
-
</div>
|
259
495
|
|
496
|
+
</div>
|
260
497
|
</template>
|
261
498
|
<script>
|
262
499
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
263
500
|
import Sortable from "sortablejs";
|
264
|
-
import {generateId} from "../../../../../../components/xform/utils/util";
|
501
|
+
import { generateId } from "../../../../../../components/xform/utils/util";
|
502
|
+
import columnRenderDialog from "./columnRenderDialog.vue"
|
265
503
|
|
266
504
|
export default {
|
267
505
|
mixins: [i18n],
|
268
506
|
props: {
|
269
507
|
designer: Object,
|
270
508
|
selectedWidget: Object,
|
271
|
-
optionModel: Object
|
509
|
+
optionModel: Object,
|
272
510
|
},
|
273
|
-
components: {},
|
274
|
-
inject: [
|
511
|
+
components: {columnRenderDialog},
|
512
|
+
inject: ["openWidgetPropertyDialog"],
|
275
513
|
data() {
|
276
514
|
return {
|
277
515
|
tableColumnConfigTitle: null,
|
@@ -282,228 +520,271 @@ export default {
|
|
282
520
|
dialogVisible: true,
|
283
521
|
alignOptions: [
|
284
522
|
{
|
285
|
-
value:
|
286
|
-
label:
|
523
|
+
value: "left",
|
524
|
+
label: "left",
|
287
525
|
},
|
288
526
|
{
|
289
|
-
value:
|
290
|
-
label:
|
527
|
+
value: "center",
|
528
|
+
label: "center",
|
291
529
|
},
|
292
530
|
{
|
293
|
-
value:
|
294
|
-
label:
|
295
|
-
}
|
531
|
+
value: "right",
|
532
|
+
label: "right",
|
533
|
+
},
|
296
534
|
],
|
297
535
|
op: [
|
298
536
|
{
|
299
|
-
label:
|
537
|
+
label: "edit Format",
|
300
538
|
options: [
|
301
539
|
{
|
302
|
-
value:
|
303
|
-
label:
|
540
|
+
value: "editInput",
|
541
|
+
label: "文本输入框",
|
304
542
|
},
|
305
543
|
{
|
306
|
-
value:
|
307
|
-
label:
|
544
|
+
value: "editNumber",
|
545
|
+
label: "数字输入框",
|
308
546
|
},
|
309
547
|
{
|
310
|
-
value:
|
311
|
-
label:
|
548
|
+
value: "editDate",
|
549
|
+
label: "日期输入框",
|
312
550
|
},
|
313
551
|
{
|
314
|
-
value:
|
315
|
-
label:
|
552
|
+
value: "editSelect",
|
553
|
+
label: "下拉框",
|
316
554
|
},
|
317
555
|
{
|
318
|
-
value:
|
319
|
-
label:
|
556
|
+
value: "editAttachment",
|
557
|
+
label: "附件",
|
320
558
|
},
|
321
559
|
{
|
322
|
-
value:
|
323
|
-
label:
|
560
|
+
value: "editSearch",
|
561
|
+
label: "搜索框",
|
324
562
|
},
|
325
563
|
{
|
326
|
-
value:
|
327
|
-
label:
|
564
|
+
value: "editStatus",
|
565
|
+
label: "状态",
|
328
566
|
},
|
329
567
|
{
|
330
|
-
value:
|
331
|
-
label:
|
568
|
+
value: "editDelete",
|
569
|
+
label: "删除按钮",
|
332
570
|
},
|
333
571
|
{
|
334
|
-
value:
|
335
|
-
label:
|
572
|
+
value: "editButton",
|
573
|
+
label: "查看按钮",
|
336
574
|
},
|
337
575
|
{
|
338
|
-
value:
|
339
|
-
label:
|
576
|
+
value: "aText",
|
577
|
+
label: "超链接文本",
|
340
578
|
},
|
341
579
|
{
|
342
|
-
value:
|
343
|
-
label:
|
580
|
+
value: "aLink",
|
581
|
+
label: "超链接按钮",
|
344
582
|
},
|
345
583
|
{
|
346
|
-
value:
|
347
|
-
label:
|
584
|
+
value: "button",
|
585
|
+
label: "按钮",
|
348
586
|
},
|
349
587
|
{
|
350
|
-
value:
|
351
|
-
label:
|
352
|
-
}
|
353
|
-
|
588
|
+
value: "editTreeButtonGroup",
|
589
|
+
label: "编辑行按钮组",
|
590
|
+
},
|
591
|
+
{
|
592
|
+
value: "widgetRender",
|
593
|
+
label: "自定义组件",
|
594
|
+
},
|
595
|
+
],
|
354
596
|
},
|
355
597
|
{
|
356
|
-
label:
|
598
|
+
label: "树控件",
|
357
599
|
options: [
|
358
600
|
{
|
359
|
-
value:
|
360
|
-
label:
|
601
|
+
value: "addSiblingEditRow",
|
602
|
+
label: "新增兄弟节点",
|
361
603
|
},
|
362
604
|
{
|
363
|
-
value:
|
364
|
-
label:
|
605
|
+
value: "addChildTreeRow",
|
606
|
+
label: "新增子节点",
|
365
607
|
},
|
366
608
|
{
|
367
|
-
value:
|
368
|
-
label:
|
609
|
+
value: "moveUpRow",
|
610
|
+
label: "上移",
|
369
611
|
},
|
370
612
|
{
|
371
|
-
value:
|
372
|
-
label:
|
613
|
+
value: "moveDownRow",
|
614
|
+
label: "下移",
|
373
615
|
},
|
374
616
|
{
|
375
|
-
value:
|
376
|
-
label:
|
377
|
-
}
|
378
|
-
]
|
617
|
+
value: "removeTreeRow",
|
618
|
+
label: "删除树节点",
|
619
|
+
},
|
620
|
+
],
|
379
621
|
},
|
380
622
|
{
|
381
|
-
label:
|
623
|
+
label: "Date Format",
|
382
624
|
options: [
|
383
625
|
{
|
384
|
-
value:
|
385
|
-
label:
|
626
|
+
value: "d1",
|
627
|
+
label: "yyyy-MM-dd",
|
386
628
|
},
|
387
629
|
{
|
388
|
-
value:
|
389
|
-
label:
|
630
|
+
value: "d2",
|
631
|
+
label: "yyyy/MM/dd",
|
390
632
|
},
|
391
633
|
{
|
392
|
-
value:
|
393
|
-
label:
|
634
|
+
value: "d3",
|
635
|
+
label: "yyyy年MM月dd日",
|
394
636
|
},
|
395
637
|
{
|
396
|
-
value:
|
397
|
-
label:
|
638
|
+
value: "d4",
|
639
|
+
label: "yyyy-MM-dd HH:mm:ss",
|
398
640
|
},
|
399
641
|
{
|
400
|
-
value:
|
401
|
-
label:
|
402
|
-
}
|
403
|
-
]
|
642
|
+
value: "d5",
|
643
|
+
label: "yyyy-MM-dd hh:mm:ss",
|
644
|
+
},
|
645
|
+
],
|
404
646
|
},
|
405
647
|
{
|
406
|
-
label:
|
648
|
+
label: "Number Format",
|
407
649
|
options: [
|
408
650
|
{
|
409
|
-
value:
|
410
|
-
label:
|
651
|
+
value: "n1",
|
652
|
+
label: "###,###,###,##0.######",
|
411
653
|
},
|
412
654
|
{
|
413
|
-
value:
|
414
|
-
label:
|
655
|
+
value: "n2",
|
656
|
+
label: "###,###,###,##0.00####",
|
415
657
|
},
|
416
658
|
{
|
417
|
-
value:
|
418
|
-
label:
|
659
|
+
value: "n3",
|
660
|
+
label: "###,###,###,##0.000000",
|
419
661
|
},
|
420
662
|
{
|
421
|
-
value:
|
422
|
-
label:
|
663
|
+
value: "n4",
|
664
|
+
label: "###,###,###,##0.000",
|
423
665
|
},
|
424
666
|
{
|
425
|
-
value:
|
426
|
-
label:
|
667
|
+
value: "n5",
|
668
|
+
label: "###,###,###,##0.00",
|
427
669
|
},
|
428
670
|
{
|
429
|
-
value:
|
430
|
-
label:
|
671
|
+
value: "n6",
|
672
|
+
label: "###,###,###,##0",
|
431
673
|
},
|
432
674
|
{
|
433
|
-
value:
|
434
|
-
label:
|
435
|
-
}
|
436
|
-
]
|
437
|
-
}
|
675
|
+
value: "n7",
|
676
|
+
label: "###,##0.00##%",
|
677
|
+
},
|
678
|
+
],
|
679
|
+
},
|
438
680
|
],
|
439
681
|
editOp: [
|
440
682
|
{
|
441
|
-
value:
|
442
|
-
label:
|
683
|
+
value: "editInput",
|
684
|
+
label: "文本输入框",
|
443
685
|
},
|
444
686
|
{
|
445
|
-
value:
|
446
|
-
label:
|
687
|
+
value: "editNumber",
|
688
|
+
label: "数字输入框",
|
447
689
|
},
|
448
690
|
{
|
449
|
-
value:
|
450
|
-
label:
|
691
|
+
value: "editDate",
|
692
|
+
label: "日期输入框",
|
451
693
|
},
|
452
694
|
{
|
453
|
-
value:
|
454
|
-
label:
|
695
|
+
value: "editSelect",
|
696
|
+
label: "下拉框",
|
455
697
|
},
|
456
698
|
{
|
457
|
-
value:
|
458
|
-
label:
|
699
|
+
value: "editAttachment",
|
700
|
+
label: "附件",
|
459
701
|
},
|
460
702
|
{
|
461
|
-
value:
|
462
|
-
label:
|
463
|
-
}
|
703
|
+
value: "editSearch",
|
704
|
+
label: "搜索框",
|
705
|
+
},
|
464
706
|
],
|
465
707
|
showRenderDialogFlag: !1,
|
466
|
-
renderJson:
|
708
|
+
renderJson: "",
|
467
709
|
currentTableColumn: null,
|
468
710
|
|
469
711
|
hideAfter: 1500,
|
470
712
|
openDelay: 500,
|
471
|
-
tableData: []
|
713
|
+
tableData: [], //树形结构数据转的数组
|
472
714
|
tableDataArray: [],
|
473
715
|
dragSort: null,
|
474
716
|
columnFormatMap: {
|
475
|
-
editInput:
|
476
|
-
editNumber:
|
477
|
-
editDate:
|
478
|
-
editSelect:
|
479
|
-
editSearch:
|
480
|
-
editAttachment:
|
481
|
-
editStatus:
|
482
|
-
aText:
|
483
|
-
aLink:
|
484
|
-
editDelete:
|
485
|
-
editButton:
|
486
|
-
button:
|
487
|
-
addSiblingEditRow:
|
488
|
-
addChildTreeRow:
|
489
|
-
moveUpRow:
|
490
|
-
moveDownRow:
|
491
|
-
removeTreeRow:
|
717
|
+
editInput: "input",
|
718
|
+
editNumber: "number",
|
719
|
+
editDate: "date",
|
720
|
+
editSelect: "select",
|
721
|
+
editSearch: "vabsearch",
|
722
|
+
editAttachment: "baseAttachment",
|
723
|
+
editStatus: "status",
|
724
|
+
aText: "a-text",
|
725
|
+
aLink: "a-link",
|
726
|
+
editDelete: "a-link",
|
727
|
+
editButton: "a-link",
|
728
|
+
button: "button",
|
729
|
+
addSiblingEditRow: "a-link",
|
730
|
+
addChildTreeRow: "a-link",
|
731
|
+
moveUpRow: "a-link",
|
732
|
+
moveDownRow: "a-link",
|
733
|
+
removeTreeRow: "a-link",
|
492
734
|
},
|
493
|
-
|
735
|
+
|
736
|
+
showFormEventDialogFlag: false,
|
737
|
+
formEventHandlerCode: "",
|
738
|
+
curEventName: "",
|
739
|
+
|
740
|
+
eventParamsMap: {
|
741
|
+
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
742
|
+
},
|
743
|
+
|
744
|
+
showColumnRenderDialog:false,
|
745
|
+
|
746
|
+
};
|
494
747
|
},
|
495
748
|
beforeDestroy() {
|
496
|
-
if (this.dragSort) this.dragSort.destroy()
|
497
|
-
},
|
498
|
-
created() {
|
499
|
-
|
749
|
+
if (this.dragSort) this.dragSort.destroy();
|
500
750
|
},
|
751
|
+
created() {},
|
501
752
|
mounted() {
|
502
753
|
this.init();
|
503
754
|
},
|
504
755
|
methods: {
|
756
|
+
editFormEventHandler(row, index, eventName) {
|
757
|
+
this.curEventName = eventName;
|
758
|
+
this.curEventIndex = index;
|
759
|
+
this.formEventHandlerCode = row[eventName];
|
760
|
+
this.showFormEventDialogFlag = true;
|
761
|
+
},
|
762
|
+
|
763
|
+
saveFormEventHandler() {
|
764
|
+
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
765
|
+
let syntaxErrorFlag = false;
|
766
|
+
if (!!codeHints && codeHints.length > 0) {
|
767
|
+
codeHints.forEach((chItem) => {
|
768
|
+
if (chItem.type === "error") {
|
769
|
+
syntaxErrorFlag = true;
|
770
|
+
}
|
771
|
+
});
|
772
|
+
|
773
|
+
if (syntaxErrorFlag) {
|
774
|
+
this.$message.error(
|
775
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
776
|
+
);
|
777
|
+
return;
|
778
|
+
}
|
779
|
+
}
|
780
|
+
this.tableData[this.curEventIndex][this.curEventName] =
|
781
|
+
this.formEventHandlerCode;
|
782
|
+
this.showFormEventDialogFlag = false;
|
783
|
+
},
|
505
784
|
init() {
|
506
|
-
this.tableData = this.$baseLodash.cloneDeep(
|
785
|
+
this.tableData = this.$baseLodash.cloneDeep(
|
786
|
+
this.optionModel.tableColumns
|
787
|
+
);
|
507
788
|
this.$nextTick(() => {
|
508
789
|
this.rowDrop();
|
509
790
|
});
|
@@ -513,33 +794,52 @@ export default {
|
|
513
794
|
this.optionModel.tableColumns = this.tableData;
|
514
795
|
this.closeHandle();
|
515
796
|
},
|
797
|
+
openWidgetRenderDialog(row){
|
798
|
+
this.currentTableColumn = row;
|
799
|
+
this.showColumnRenderDialog = true
|
800
|
+
},
|
801
|
+
confirmWidgetRenderDialog(widgetList){
|
802
|
+
this.currentTableColumn.widgetList = widgetList
|
803
|
+
this.showColumnRenderDialog = false
|
804
|
+
},
|
516
805
|
showRenderDialog: function (e) {
|
517
|
-
(
|
806
|
+
/*if(e.formatS == 'widgetRender'){
|
807
|
+
this.openWidgetRenderDialog(e);
|
808
|
+
return
|
809
|
+
}*/
|
810
|
+
|
811
|
+
(this.currentTableColumn = e),
|
812
|
+
(this.renderJson = e.render || ""),
|
813
|
+
(this.showRenderDialogFlag = !0);
|
518
814
|
},
|
519
815
|
saveColumnRender: function () {
|
520
|
-
this.$set(this.currentTableColumn,
|
816
|
+
this.$set(this.currentTableColumn, "render", this.renderJson),
|
817
|
+
(this.showRenderDialogFlag = !1);
|
521
818
|
},
|
522
819
|
closeHandle() {
|
523
|
-
this.$emit(
|
524
|
-
this.$emit(
|
820
|
+
this.$emit("update:visiable", false);
|
821
|
+
this.$emit("close");
|
525
822
|
},
|
526
823
|
// 添加同级节点
|
527
824
|
onAddSibling(row, index) {
|
528
|
-
console.log(
|
529
|
-
const parentId = row.parentId || null
|
825
|
+
console.log("onAddSibling", row, index);
|
826
|
+
const parentId = row.parentId || null;
|
530
827
|
// 先判断是不是根节点
|
531
828
|
if (!parentId) {
|
532
829
|
// 当前节点直接添加
|
533
830
|
// this.tableData.push(this.generateRow(parentId))
|
534
|
-
let addIndex =
|
535
|
-
|
831
|
+
let addIndex =
|
832
|
+
this.tableData
|
833
|
+
.filter((item) => !item.parentId)
|
834
|
+
.findIndex((item) => item.columnId == row.columnId) + 1;
|
835
|
+
this.tableData.splice(addIndex, 0, this.generateRow(parentId));
|
536
836
|
} else {
|
537
|
-
this.handleAddOneRow(row, index,
|
837
|
+
this.handleAddOneRow(row, index, "SIBLING");
|
538
838
|
}
|
539
839
|
},
|
540
840
|
// 添加子节点 todo
|
541
841
|
onAddChild(row, index) {
|
542
|
-
this.handleAddOneRow(row, index,
|
842
|
+
this.handleAddOneRow(row, index, "CHILD");
|
543
843
|
},
|
544
844
|
/**
|
545
845
|
* 处理添加一行数据
|
@@ -548,36 +848,36 @@ export default {
|
|
548
848
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
549
849
|
*/
|
550
850
|
handleAddOneRow(row, index, type) {
|
551
|
-
|
552
|
-
const
|
553
|
-
|
554
|
-
let curRow = {}
|
851
|
+
const { parentId, columnId } = row;
|
852
|
+
const curId = type === "SIBLING" ? parentId : columnId;
|
853
|
+
let curRow = {};
|
555
854
|
// 在 tableData 中,找到当前节点
|
556
855
|
const findRow = (data) => {
|
557
856
|
data.forEach((item) => {
|
558
857
|
if (item.columnId === curId) {
|
559
|
-
curRow = item
|
858
|
+
curRow = item;
|
560
859
|
}
|
561
860
|
if (item.children && item.children.length) {
|
562
|
-
findRow(item.children)
|
861
|
+
findRow(item.children);
|
563
862
|
}
|
564
|
-
})
|
565
|
-
}
|
863
|
+
});
|
864
|
+
};
|
566
865
|
|
567
|
-
findRow(this.tableData)
|
866
|
+
findRow(this.tableData);
|
568
867
|
|
569
|
-
const {columnId: generateParentId, children} = curRow
|
868
|
+
const { columnId: generateParentId, children } = curRow;
|
570
869
|
|
571
|
-
let newRow = this.generateRow(generateParentId)
|
870
|
+
let newRow = this.generateRow(generateParentId);
|
572
871
|
if (children) {
|
573
|
-
if (type ===
|
574
|
-
let addIndex =
|
575
|
-
|
872
|
+
if (type === "SIBLING") {
|
873
|
+
let addIndex =
|
874
|
+
children.findIndex((item) => item.columnId == row.columnId) + 1;
|
875
|
+
children.splice(addIndex, 0, newRow);
|
576
876
|
} else {
|
577
|
-
children.push(newRow)
|
877
|
+
children.push(newRow);
|
578
878
|
}
|
579
879
|
} else {
|
580
|
-
this.$set(curRow,
|
880
|
+
this.$set(curRow, "children", [newRow]);
|
581
881
|
}
|
582
882
|
},
|
583
883
|
getUuid() {
|
@@ -587,7 +887,7 @@ export default {
|
|
587
887
|
* 生成一行数据
|
588
888
|
*/
|
589
889
|
generateRow(parentId) {
|
590
|
-
let tmpId =
|
890
|
+
let tmpId = "column" + generateId();
|
591
891
|
let uuid = this.getUuid();
|
592
892
|
var row = {
|
593
893
|
columnId: uuid,
|
@@ -597,46 +897,52 @@ export default {
|
|
597
897
|
width: 150,
|
598
898
|
prop: tmpId,
|
599
899
|
label: tmpId,
|
600
|
-
align:
|
900
|
+
align: "left",
|
601
901
|
show: true,
|
602
902
|
sortable: true,
|
603
|
-
|
903
|
+
exportType: null,
|
904
|
+
footerDataType: null,
|
905
|
+
footerMethodConfg: null,
|
906
|
+
widgetList:[]
|
604
907
|
// treeNode: false,
|
605
|
-
|
606
908
|
};
|
607
909
|
return row;
|
608
910
|
},
|
609
911
|
// 添加根节点
|
610
912
|
onAddRoot() {
|
611
|
-
this.tableData.push(this.generateRow())
|
913
|
+
this.tableData.push(this.generateRow());
|
612
914
|
},
|
613
915
|
// 删除当前节点及对应子节点数据
|
614
916
|
onDelete(row) {
|
615
|
-
const {parentId, columnId} = row
|
917
|
+
const { parentId, columnId } = row;
|
616
918
|
// 根节点直接删除
|
617
919
|
if (!parentId) {
|
618
|
-
const delIndex = this.tableData.findIndex(
|
619
|
-
|
920
|
+
const delIndex = this.tableData.findIndex(
|
921
|
+
(item) => item.columnId === columnId
|
922
|
+
);
|
923
|
+
this.tableData.splice(delIndex, 1);
|
620
924
|
} else {
|
621
925
|
// 找到父节点,通过父节点删除
|
622
|
-
let parentRow = {}
|
926
|
+
let parentRow = {};
|
623
927
|
const findRow = (data) => {
|
624
928
|
data.forEach((item) => {
|
625
929
|
if (item.columnId === parentId) {
|
626
|
-
parentRow = {...item}
|
930
|
+
parentRow = { ...item };
|
627
931
|
}
|
628
932
|
if (item.children && item.children.length) {
|
629
|
-
findRow(item.children)
|
933
|
+
findRow(item.children);
|
630
934
|
}
|
631
|
-
})
|
632
|
-
}
|
633
|
-
findRow(this.tableData)
|
935
|
+
});
|
936
|
+
};
|
937
|
+
findRow(this.tableData);
|
634
938
|
|
635
|
-
const {children} = parentRow
|
939
|
+
const { children } = parentRow;
|
636
940
|
|
637
|
-
const delIndex = children.findIndex(
|
941
|
+
const delIndex = children.findIndex(
|
942
|
+
(item) => item.columnId === columnId
|
943
|
+
);
|
638
944
|
|
639
|
-
children.splice(delIndex, 1)
|
945
|
+
children.splice(delIndex, 1);
|
640
946
|
}
|
641
947
|
},
|
642
948
|
// 数据准备 生成 id 和 parentId
|
@@ -644,30 +950,32 @@ export default {
|
|
644
950
|
const tableFormat = (tableData, parentId) => {
|
645
951
|
tableData.forEach((item) => {
|
646
952
|
// item.parentId = parentId || null
|
647
|
-
if (!item.kid) item.kid = item.columnId
|
953
|
+
if (!item.kid) item.kid = item.columnId;
|
648
954
|
if (item.children && item.children.length > 0) {
|
649
|
-
tableFormat(item.children, item.columnId)
|
955
|
+
tableFormat(item.children, item.columnId);
|
650
956
|
}
|
651
|
-
})
|
652
|
-
}
|
957
|
+
});
|
958
|
+
};
|
653
959
|
|
654
|
-
tableFormat(data)
|
655
|
-
return data
|
960
|
+
tableFormat(data);
|
961
|
+
return data;
|
656
962
|
},
|
657
963
|
//drag begin
|
658
964
|
//行拖拽
|
659
965
|
rowDrop() {
|
660
|
-
if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
|
966
|
+
if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
|
661
967
|
// const tbody = document.querySelector('.drag .el-table__body-wrapper tbody');
|
662
|
-
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
968
|
+
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
969
|
+
".el-table__fixed-body-wrapper > table > tbody"
|
970
|
+
)[0];
|
663
971
|
const _this = this;
|
664
972
|
this.dragSort = Sortable.create(tbody, {
|
665
|
-
ghostClass:
|
973
|
+
ghostClass: "sortable-ghost",
|
666
974
|
setData: function (e) {
|
667
|
-
e.setData(
|
975
|
+
e.setData("Text", "");
|
668
976
|
},
|
669
|
-
onEnd({newIndex, oldIndex}) {
|
670
|
-
_this.rowDropEnd(newIndex, oldIndex)
|
977
|
+
onEnd({ newIndex, oldIndex }) {
|
978
|
+
_this.rowDropEnd(newIndex, oldIndex);
|
671
979
|
},
|
672
980
|
});
|
673
981
|
},
|
@@ -678,7 +986,7 @@ export default {
|
|
678
986
|
data.forEach((item) => {
|
679
987
|
const loop = (data) => {
|
680
988
|
result.push({
|
681
|
-
...data
|
989
|
+
...data,
|
682
990
|
});
|
683
991
|
let child = data.children;
|
684
992
|
if (child) {
|
@@ -694,7 +1002,9 @@ export default {
|
|
694
1002
|
//数组转树
|
695
1003
|
arrToTree(arr, parentId) {
|
696
1004
|
return arr
|
697
|
-
.filter((item) =>
|
1005
|
+
.filter((item) =>
|
1006
|
+
!parentId ? !item.parentId : item.parentId === parentId
|
1007
|
+
)
|
698
1008
|
.map((item) => {
|
699
1009
|
item.children = this.arrToTree(arr, item.columnId);
|
700
1010
|
return item;
|
@@ -732,13 +1042,7 @@ export default {
|
|
732
1042
|
let newRow = this.tableDataArray[newIndex];
|
733
1043
|
|
734
1044
|
//判断是否把该行 拖拽到 自己的底级中
|
735
|
-
if (
|
736
|
-
this.isTreeBottom(
|
737
|
-
this.tableData,
|
738
|
-
oldRow.columnId,
|
739
|
-
newRow.columnId
|
740
|
-
)
|
741
|
-
) {
|
1045
|
+
if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
|
742
1046
|
this.$message({
|
743
1047
|
type: "error",
|
744
1048
|
message: "不能放到子节点",
|
@@ -784,7 +1088,7 @@ export default {
|
|
784
1088
|
let isButtontCell = false;
|
785
1089
|
let widgetType = this.columnFormatMap[formatS];
|
786
1090
|
if (widgetType) {
|
787
|
-
isButtontCell = widgetType ===
|
1091
|
+
isButtontCell = widgetType === "a-link" || widgetType === "button";
|
788
1092
|
}
|
789
1093
|
return isButtontCell;
|
790
1094
|
},
|
@@ -792,20 +1096,20 @@ export default {
|
|
792
1096
|
changeFormatS(row) {
|
793
1097
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
794
1098
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
|
795
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1099
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
796
1100
|
if (columnSelectedWidget) {
|
797
1101
|
row.columnOption = columnSelectedWidget.options;
|
798
1102
|
} else {
|
799
|
-
row.columnOption = {}
|
1103
|
+
row.columnOption = {};
|
800
1104
|
}
|
801
1105
|
|
802
|
-
if (row.formatS ==
|
1106
|
+
if (row.formatS == "editTreeButtonGroup") {
|
803
1107
|
row.prop = null;
|
804
1108
|
row.label = null;
|
805
1109
|
row.sortable = false;
|
806
1110
|
row.width = 150;
|
807
1111
|
} else if (isButtontCell) {
|
808
|
-
if (row.formatS ==
|
1112
|
+
if (row.formatS == "aLink" || row.formatS == "button") {
|
809
1113
|
if (!row.width || row.width == 47) row.width = 150;
|
810
1114
|
} else {
|
811
1115
|
row.width = 47;
|
@@ -814,13 +1118,13 @@ export default {
|
|
814
1118
|
row.label = null;
|
815
1119
|
row.sortable = false;
|
816
1120
|
} else {
|
817
|
-
let tmpId =
|
1121
|
+
let tmpId = "column" + generateId();
|
818
1122
|
if (!row.width || row.width == 47) row.width = 150;
|
819
1123
|
if (!row.prop) row.prop = tmpId;
|
820
1124
|
if (!row.label) row.label = tmpId;
|
821
1125
|
row.sortable = true;
|
822
1126
|
|
823
|
-
if (row.formatS ==
|
1127
|
+
if (row.formatS == "editAttachment") {
|
824
1128
|
row.prop = this.designer.createAttachmentKeyName();
|
825
1129
|
} else {
|
826
1130
|
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
@@ -829,7 +1133,7 @@ export default {
|
|
829
1133
|
}
|
830
1134
|
},
|
831
1135
|
getColumnWidgetConfig(row, isChange, isEdit) {
|
832
|
-
let formatS = isEdit ? row.editFormatS : row.formatS
|
1136
|
+
let formatS = isEdit ? row.editFormatS : row.formatS;
|
833
1137
|
let columnSelectedWidget = null;
|
834
1138
|
let columnEditFields = null;
|
835
1139
|
|
@@ -845,7 +1149,9 @@ export default {
|
|
845
1149
|
|
846
1150
|
if (type) {
|
847
1151
|
// columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
|
848
|
-
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
1152
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
1153
|
+
this.designer.getFieldWidgetByType(type)
|
1154
|
+
);
|
849
1155
|
/*let tmpId = generateId();
|
850
1156
|
let idVal = row.prop ? row.prop : (type + tmpId);*/
|
851
1157
|
/*columnSelectedWidget.id = idVal;*/
|
@@ -859,61 +1165,70 @@ export default {
|
|
859
1165
|
if (!isChange && columnOption && Object.keys(columnOption).length) {
|
860
1166
|
columnOption.required = row.required || false;
|
861
1167
|
columnSelectedWidget.options = columnOption;
|
862
|
-
if (
|
863
|
-
columnSelectedWidget.options.hiddenByWf =
|
864
|
-
|
865
|
-
|
866
|
-
|
1168
|
+
if ("editDelete" == formatS) {
|
1169
|
+
columnSelectedWidget.options.hiddenByWf =
|
1170
|
+
columnSelectedWidget.options.hiddenByWf ?? true;
|
1171
|
+
columnSelectedWidget.options.prefixIcon =
|
1172
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
1173
|
+
} else if ("editButton" == formatS) {
|
1174
|
+
columnSelectedWidget.options.prefixIcon =
|
1175
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
867
1176
|
}
|
868
1177
|
} else {
|
869
1178
|
columnSelectedWidget.options.required = row.required || false;
|
870
1179
|
|
871
|
-
if (
|
1180
|
+
if ("editDelete" == formatS) {
|
872
1181
|
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
873
1182
|
columnSelectedWidget.options.label = "删除";
|
874
1183
|
columnSelectedWidget.options.labelHidden = true;
|
875
1184
|
columnSelectedWidget.options.hiddenByWf = true;
|
876
|
-
columnSelectedWidget.options.onClick =
|
877
|
-
|
1185
|
+
columnSelectedWidget.options.onClick =
|
1186
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
1187
|
+
} else if ("editButton" == formatS) {
|
878
1188
|
columnSelectedWidget.options.prefixIcon = "el-icon-edit";
|
879
1189
|
columnSelectedWidget.options.label = "查看";
|
880
1190
|
columnSelectedWidget.options.labelHidden = true;
|
881
|
-
columnSelectedWidget.options.onClick =
|
882
|
-
|
1191
|
+
columnSelectedWidget.options.onClick =
|
1192
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
1193
|
+
} else if ("addSiblingEditRow" == formatS) {
|
883
1194
|
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
884
1195
|
columnSelectedWidget.options.label = "新增兄弟节点";
|
885
1196
|
columnSelectedWidget.options.labelHidden = false;
|
886
|
-
columnSelectedWidget.options.onClick =
|
887
|
-
|
1197
|
+
columnSelectedWidget.options.onClick =
|
1198
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
1199
|
+
} else if ("addChildTreeRow" == formatS) {
|
888
1200
|
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
889
1201
|
columnSelectedWidget.options.label = "新增子节点";
|
890
1202
|
columnSelectedWidget.options.labelHidden = false;
|
891
|
-
columnSelectedWidget.options.onClick =
|
892
|
-
|
1203
|
+
columnSelectedWidget.options.onClick =
|
1204
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
1205
|
+
} else if ("moveUpRow" == formatS) {
|
893
1206
|
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
894
1207
|
columnSelectedWidget.options.label = "↑上移";
|
895
1208
|
columnSelectedWidget.options.labelHidden = false;
|
896
|
-
columnSelectedWidget.options.onClick =
|
897
|
-
|
1209
|
+
columnSelectedWidget.options.onClick =
|
1210
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
1211
|
+
} else if ("moveDownRow" == formatS) {
|
898
1212
|
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
899
1213
|
columnSelectedWidget.options.label = "↓下移";
|
900
1214
|
columnSelectedWidget.options.labelHidden = false;
|
901
|
-
columnSelectedWidget.options.onClick =
|
902
|
-
|
1215
|
+
columnSelectedWidget.options.onClick =
|
1216
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
1217
|
+
} else if ("removeTreeRow" == formatS) {
|
903
1218
|
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
904
1219
|
columnSelectedWidget.options.label = "删除";
|
905
1220
|
columnSelectedWidget.options.labelHidden = true;
|
906
|
-
columnSelectedWidget.options.onClick =
|
1221
|
+
columnSelectedWidget.options.onClick =
|
1222
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
907
1223
|
}
|
908
1224
|
|
909
1225
|
columnOption = columnSelectedWidget.options;
|
910
|
-
|
911
1226
|
}
|
912
1227
|
|
913
1228
|
// columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
|
914
1229
|
// columnSelectedWidget.options.name = type + row.columnId;
|
915
1230
|
// columnSelectedWidget.options.name = row.prop;
|
916
|
-
if (columnSelectedWidget.options.hasOwnProperty(
|
1231
|
+
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
917
1232
|
columnSelectedWidget.options.keyName = row.prop;
|
918
1233
|
columnSelectedWidget.options.keyNameEnabled = true;
|
919
1234
|
} else {
|
@@ -925,18 +1240,24 @@ export default {
|
|
925
1240
|
columnSelectedWidget.options.labelHidden = true;
|
926
1241
|
}
|
927
1242
|
}
|
928
|
-
return {columnSelectedWidget, columnEditFields};
|
1243
|
+
return { columnSelectedWidget, columnEditFields };
|
929
1244
|
},
|
930
1245
|
openFormatConfigDialog(row, index) {
|
1246
|
+
if(row.formatS == 'widgetRender'){
|
1247
|
+
this.openWidgetRenderDialog(row);
|
1248
|
+
return
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
|
931
1252
|
let option = row.columnOption;
|
932
1253
|
let selectedWidget;
|
933
1254
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
934
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1255
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
935
1256
|
if (columnSelectedWidget) {
|
936
1257
|
option = columnSelectedWidget.options;
|
937
1258
|
selectedWidget = columnSelectedWidget;
|
938
1259
|
} else {
|
939
|
-
option = {}
|
1260
|
+
option = {};
|
940
1261
|
selectedWidget = {};
|
941
1262
|
}
|
942
1263
|
|
@@ -950,20 +1271,16 @@ export default {
|
|
950
1271
|
index: index,
|
951
1272
|
columnEditFields: columnEditFields,
|
952
1273
|
callback: (columnOption) => {
|
953
|
-
this.confirmFormatConfigDialog(columnOption);
|
954
|
-
}
|
955
|
-
})
|
1274
|
+
this.confirmFormatConfigDialog(columnOption, row);
|
1275
|
+
},
|
1276
|
+
});
|
956
1277
|
},
|
957
1278
|
getFieldKeyNameByOptions(options) {
|
958
1279
|
let o = options.name;
|
959
|
-
return (
|
960
|
-
(options.keyNameEnabled
|
961
|
-
&& options.keyName)
|
962
|
-
|| o
|
963
|
-
);
|
1280
|
+
return (options.keyNameEnabled && options.keyName) || o;
|
964
1281
|
},
|
965
|
-
confirmFormatConfigDialog(columnOption) {
|
966
|
-
let row = this.tableData[this.operateIndex];
|
1282
|
+
confirmFormatConfigDialog(columnOption, row) {
|
1283
|
+
// let row = this.tableData[this.operateIndex];
|
967
1284
|
row.columnOption = columnOption;
|
968
1285
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
969
1286
|
if (!isButtontCell) {
|
@@ -976,12 +1293,12 @@ export default {
|
|
976
1293
|
let option = row.columnOption;
|
977
1294
|
let selectedWidget;
|
978
1295
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
|
979
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1296
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
980
1297
|
if (columnSelectedWidget) {
|
981
1298
|
option = columnSelectedWidget.options;
|
982
1299
|
selectedWidget = columnSelectedWidget;
|
983
1300
|
} else {
|
984
|
-
option = {}
|
1301
|
+
option = {};
|
985
1302
|
selectedWidget = {};
|
986
1303
|
}
|
987
1304
|
|
@@ -995,12 +1312,12 @@ export default {
|
|
995
1312
|
index: index,
|
996
1313
|
columnEditFields: columnEditFields,
|
997
1314
|
callback: (columnOption) => {
|
998
|
-
this.confirmEditFormatConfigDialog(columnOption);
|
999
|
-
}
|
1000
|
-
})
|
1315
|
+
this.confirmEditFormatConfigDialog(columnOption, row);
|
1316
|
+
},
|
1317
|
+
});
|
1001
1318
|
},
|
1002
|
-
confirmEditFormatConfigDialog(columnOption) {
|
1003
|
-
let row = this.tableData[this.operateIndex];
|
1319
|
+
confirmEditFormatConfigDialog(columnOption, row) {
|
1320
|
+
// let row = this.tableData[this.operateIndex];
|
1004
1321
|
row.editColumnOption = columnOption;
|
1005
1322
|
/*row.prop = columnOption.name;
|
1006
1323
|
row.label = columnOption.label;
|
@@ -1008,39 +1325,50 @@ export default {
|
|
1008
1325
|
},
|
1009
1326
|
openTableColumnConfigDialog(row, index) {
|
1010
1327
|
this.operateIndex = index;
|
1328
|
+
this.currentTableColumn = row;
|
1011
1329
|
let eventName = "tableColumnConfig";
|
1012
|
-
let eventParams = ["dataId", "formCode"]
|
1013
|
-
this.tableColumnConfigHeader = `${
|
1014
|
-
|
1330
|
+
let eventParams = ["dataId", "formCode"];
|
1331
|
+
this.tableColumnConfigHeader = `${
|
1332
|
+
this.optionModel.name
|
1333
|
+
}.${eventName}(${eventParams.join(", ")}) {`;
|
1334
|
+
this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
|
1335
|
+
row.tableColumnConfig || ""
|
1336
|
+
);
|
1015
1337
|
|
1016
1338
|
this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
|
1017
1339
|
this.showTableColumnConfigDialog = true;
|
1018
1340
|
},
|
1019
1341
|
saveTableColumnConfigDialog() {
|
1020
|
-
let row = this.tableData[this.operateIndex];
|
1342
|
+
// let row = this.tableData[this.operateIndex];
|
1343
|
+
let row = this.currentTableColumn;
|
1021
1344
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
1022
1345
|
let syntaxErrorFlag = false;
|
1023
1346
|
if (!!codeHints && codeHints.length > 0) {
|
1024
|
-
codeHints.forEach(chItem => {
|
1025
|
-
if (chItem.type ===
|
1347
|
+
codeHints.forEach((chItem) => {
|
1348
|
+
if (chItem.type === "error") {
|
1026
1349
|
syntaxErrorFlag = true;
|
1027
1350
|
}
|
1028
1351
|
});
|
1029
1352
|
|
1030
1353
|
if (syntaxErrorFlag) {
|
1031
|
-
this.$message.error(
|
1354
|
+
this.$message.error(
|
1355
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
1356
|
+
);
|
1032
1357
|
return;
|
1033
1358
|
}
|
1034
1359
|
}
|
1035
|
-
this.$set(
|
1360
|
+
this.$set(
|
1361
|
+
row,
|
1362
|
+
"tableColumnConfig",
|
1363
|
+
this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
|
1364
|
+
);
|
1036
1365
|
this.showTableColumnConfigDialog = false;
|
1037
|
-
|
1038
1366
|
},
|
1039
|
-
}
|
1040
|
-
}
|
1367
|
+
},
|
1368
|
+
};
|
1041
1369
|
</script>
|
1042
1370
|
<style scoped lang="scss">
|
1043
1371
|
.icon-drag:before {
|
1044
|
-
content:
|
1372
|
+
content: "\e61d";
|
1045
1373
|
}
|
1046
1374
|
</style>
|