cloud-web-corejs 1.0.54-dev.16 → 1.0.54-dev.161
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 +22 -6
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/baseAttachment/index.vue +22 -13
- package/src/components/baseAttachment/mixins.js +248 -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 -1
- 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 +16 -4
- 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 +23 -7
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +31 -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 +138 -6
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.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 +86 -0
- package/src/components/xform/form-designer/indexMixin.js +784 -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 +125 -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 +643 -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/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- 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 +17 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- 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/field-vabUpload/field-vabUpload-editor.vue +30 -1
- 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/multipleLimit-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/precision-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 +170 -20
- 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 +233 -254
- 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 +2132 -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 +164 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/util.js +1631 -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 +832 -426
- package/src/views/bd/setting/table_model/mixins/edit.js +1098 -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 +4 -4
- 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
|
+
>
|
200
|
+
<template slot-scope="scope">
|
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>
|
204
|
+
</el-select>
|
205
|
+
</template>
|
206
|
+
</el-table-column>
|
207
|
+
|
208
|
+
<el-table-column
|
209
|
+
:label="i18nt('表尾统计行类型')"
|
210
|
+
width="200"
|
211
|
+
prop="formatS"
|
212
|
+
>
|
108
213
|
<template slot-scope="scope">
|
109
|
-
<el-select v-model="scope.row.
|
110
|
-
<el-option
|
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>
|
111
218
|
</el-select>
|
112
219
|
</template>
|
113
220
|
</el-table-column>
|
114
|
-
<el-table-column label="
|
221
|
+
<el-table-column label="表尾统计行配置" width="150" align="center">
|
115
222
|
<template slot-scope="scope">
|
116
|
-
<el-button
|
117
|
-
|
118
|
-
|
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>
|
119
237
|
</template>
|
120
238
|
</el-table-column>
|
121
|
-
|
239
|
+
|
240
|
+
<el-table-column
|
241
|
+
label="格式化配置"
|
242
|
+
width="90"
|
243
|
+
fixed="right"
|
244
|
+
align="center"
|
245
|
+
>
|
122
246
|
<template slot-scope="scope">
|
123
|
-
<el-button
|
124
|
-
|
125
|
-
|
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>
|
126
255
|
</template>
|
127
256
|
</el-table-column>
|
128
|
-
<el-table-column
|
257
|
+
<el-table-column
|
258
|
+
:label="i18nt('designer.setting.renderFunction')"
|
259
|
+
width="70"
|
260
|
+
fixed="right"
|
261
|
+
align="center"
|
262
|
+
>
|
129
263
|
<template slot-scope="scope">
|
130
|
-
<el-button
|
131
|
-
|
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,286 @@ 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: "checkbox",
|
557
|
+
label: "复选框",
|
320
558
|
},
|
321
559
|
{
|
322
|
-
value:
|
323
|
-
label:
|
560
|
+
value: "radio",
|
561
|
+
label: "单选框",
|
324
562
|
},
|
325
563
|
{
|
326
|
-
value:
|
327
|
-
label:
|
564
|
+
value: "editAttachment",
|
565
|
+
label: "附件",
|
328
566
|
},
|
329
567
|
{
|
330
|
-
value:
|
331
|
-
label:
|
568
|
+
value: "editSearch",
|
569
|
+
label: "搜索框",
|
332
570
|
},
|
333
571
|
{
|
334
|
-
value:
|
335
|
-
label:
|
572
|
+
value: "editStatus",
|
573
|
+
label: "状态",
|
336
574
|
},
|
337
575
|
{
|
338
|
-
value:
|
339
|
-
label:
|
576
|
+
value: "text",
|
577
|
+
label: "文本",
|
340
578
|
},
|
341
579
|
{
|
342
|
-
value:
|
343
|
-
label:
|
580
|
+
value: "editDelete",
|
581
|
+
label: "删除按钮",
|
344
582
|
},
|
345
583
|
{
|
346
|
-
value:
|
347
|
-
label:
|
584
|
+
value: "editButton",
|
585
|
+
label: "查看按钮",
|
348
586
|
},
|
349
587
|
{
|
350
|
-
value:
|
351
|
-
label:
|
352
|
-
}
|
353
|
-
|
588
|
+
value: "aText",
|
589
|
+
label: "超链接文本",
|
590
|
+
},
|
591
|
+
{
|
592
|
+
value: "aLink",
|
593
|
+
label: "超链接按钮",
|
594
|
+
},
|
595
|
+
{
|
596
|
+
value: "button",
|
597
|
+
label: "按钮",
|
598
|
+
},
|
599
|
+
{
|
600
|
+
value: "editTreeButtonGroup",
|
601
|
+
label: "编辑行按钮组",
|
602
|
+
},
|
603
|
+
{
|
604
|
+
value: "widgetRender",
|
605
|
+
label: "自定义组件",
|
606
|
+
},
|
607
|
+
],
|
354
608
|
},
|
355
609
|
{
|
356
|
-
label:
|
610
|
+
label: "树控件",
|
357
611
|
options: [
|
358
612
|
{
|
359
|
-
value:
|
360
|
-
label:
|
613
|
+
value: "addSiblingEditRow",
|
614
|
+
label: "新增兄弟节点",
|
361
615
|
},
|
362
616
|
{
|
363
|
-
value:
|
364
|
-
label:
|
617
|
+
value: "addChildTreeRow",
|
618
|
+
label: "新增子节点",
|
365
619
|
},
|
366
620
|
{
|
367
|
-
value:
|
368
|
-
label:
|
621
|
+
value: "moveUpRow",
|
622
|
+
label: "上移",
|
369
623
|
},
|
370
624
|
{
|
371
|
-
value:
|
372
|
-
label:
|
625
|
+
value: "moveDownRow",
|
626
|
+
label: "下移",
|
373
627
|
},
|
374
628
|
{
|
375
|
-
value:
|
376
|
-
label:
|
377
|
-
}
|
378
|
-
]
|
629
|
+
value: "removeTreeRow",
|
630
|
+
label: "删除树节点",
|
631
|
+
},
|
632
|
+
],
|
379
633
|
},
|
380
634
|
{
|
381
|
-
label:
|
635
|
+
label: "Date Format",
|
382
636
|
options: [
|
383
637
|
{
|
384
|
-
value:
|
385
|
-
label:
|
638
|
+
value: "d1",
|
639
|
+
label: "yyyy-MM-dd",
|
386
640
|
},
|
387
641
|
{
|
388
|
-
value:
|
389
|
-
label:
|
642
|
+
value: "d2",
|
643
|
+
label: "yyyy/MM/dd",
|
390
644
|
},
|
391
645
|
{
|
392
|
-
value:
|
393
|
-
label:
|
646
|
+
value: "d3",
|
647
|
+
label: "yyyy年MM月dd日",
|
394
648
|
},
|
395
649
|
{
|
396
|
-
value:
|
397
|
-
label:
|
650
|
+
value: "d4",
|
651
|
+
label: "yyyy-MM-dd HH:mm:ss",
|
398
652
|
},
|
399
653
|
{
|
400
|
-
value:
|
401
|
-
label:
|
402
|
-
}
|
403
|
-
]
|
654
|
+
value: "d5",
|
655
|
+
label: "yyyy-MM-dd hh:mm:ss",
|
656
|
+
},
|
657
|
+
],
|
404
658
|
},
|
405
659
|
{
|
406
|
-
label:
|
660
|
+
label: "Number Format",
|
407
661
|
options: [
|
408
662
|
{
|
409
|
-
value:
|
410
|
-
label:
|
663
|
+
value: "n1",
|
664
|
+
label: "###,###,###,##0.######",
|
411
665
|
},
|
412
666
|
{
|
413
|
-
value:
|
414
|
-
label:
|
667
|
+
value: "n2",
|
668
|
+
label: "###,###,###,##0.00####",
|
415
669
|
},
|
416
670
|
{
|
417
|
-
value:
|
418
|
-
label:
|
671
|
+
value: "n3",
|
672
|
+
label: "###,###,###,##0.000000",
|
419
673
|
},
|
420
674
|
{
|
421
|
-
value:
|
422
|
-
label:
|
675
|
+
value: "n4",
|
676
|
+
label: "###,###,###,##0.000",
|
423
677
|
},
|
424
678
|
{
|
425
|
-
value:
|
426
|
-
label:
|
679
|
+
value: "n5",
|
680
|
+
label: "###,###,###,##0.00",
|
427
681
|
},
|
428
682
|
{
|
429
|
-
value:
|
430
|
-
label:
|
683
|
+
value: "n6",
|
684
|
+
label: "###,###,###,##0",
|
431
685
|
},
|
432
686
|
{
|
433
|
-
value:
|
434
|
-
label:
|
435
|
-
}
|
436
|
-
]
|
437
|
-
}
|
687
|
+
value: "n7",
|
688
|
+
label: "###,##0.00##%",
|
689
|
+
},
|
690
|
+
],
|
691
|
+
},
|
438
692
|
],
|
439
693
|
editOp: [
|
440
694
|
{
|
441
|
-
value:
|
442
|
-
label:
|
695
|
+
value: "editInput",
|
696
|
+
label: "文本输入框",
|
443
697
|
},
|
444
698
|
{
|
445
|
-
value:
|
446
|
-
label:
|
699
|
+
value: "editNumber",
|
700
|
+
label: "数字输入框",
|
447
701
|
},
|
448
702
|
{
|
449
|
-
value:
|
450
|
-
label:
|
703
|
+
value: "editDate",
|
704
|
+
label: "日期输入框",
|
451
705
|
},
|
452
706
|
{
|
453
|
-
value:
|
454
|
-
label:
|
707
|
+
value: "editSelect",
|
708
|
+
label: "下拉框",
|
455
709
|
},
|
456
710
|
{
|
457
|
-
value:
|
458
|
-
label:
|
711
|
+
value: "editAttachment",
|
712
|
+
label: "附件",
|
459
713
|
},
|
460
714
|
{
|
461
|
-
value:
|
462
|
-
label:
|
463
|
-
}
|
715
|
+
value: "editSearch",
|
716
|
+
label: "搜索框",
|
717
|
+
},
|
464
718
|
],
|
465
719
|
showRenderDialogFlag: !1,
|
466
|
-
renderJson:
|
720
|
+
renderJson: "",
|
467
721
|
currentTableColumn: null,
|
468
722
|
|
469
723
|
hideAfter: 1500,
|
470
724
|
openDelay: 500,
|
471
|
-
tableData: []
|
725
|
+
tableData: [], //树形结构数据转的数组
|
472
726
|
tableDataArray: [],
|
473
727
|
dragSort: null,
|
474
728
|
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:
|
729
|
+
editInput: "input",
|
730
|
+
editNumber: "number",
|
731
|
+
editDate: "date",
|
732
|
+
editSelect: "select",
|
733
|
+
editSearch: "vabsearch",
|
734
|
+
editAttachment: "baseAttachment",
|
735
|
+
editStatus: "status",
|
736
|
+
aText: "a-text",
|
737
|
+
aLink: "a-link",
|
738
|
+
editDelete: "a-link",
|
739
|
+
editButton: "a-link",
|
740
|
+
button: "button",
|
741
|
+
addSiblingEditRow: "a-link",
|
742
|
+
addChildTreeRow: "a-link",
|
743
|
+
moveUpRow: "a-link",
|
744
|
+
moveDownRow: "a-link",
|
745
|
+
removeTreeRow: "a-link",
|
746
|
+
text: "text",
|
747
|
+
checkbox: "checkbox",
|
748
|
+
radio: "radio",
|
749
|
+
},
|
750
|
+
|
751
|
+
showFormEventDialogFlag: false,
|
752
|
+
formEventHandlerCode: "",
|
753
|
+
curEventName: "",
|
754
|
+
|
755
|
+
eventParamsMap: {
|
756
|
+
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
492
757
|
},
|
493
|
-
|
758
|
+
|
759
|
+
showColumnRenderDialog:false,
|
760
|
+
|
761
|
+
};
|
494
762
|
},
|
495
763
|
beforeDestroy() {
|
496
|
-
if (this.dragSort) this.dragSort.destroy()
|
497
|
-
},
|
498
|
-
created() {
|
499
|
-
|
764
|
+
if (this.dragSort) this.dragSort.destroy();
|
500
765
|
},
|
766
|
+
created() {},
|
501
767
|
mounted() {
|
502
768
|
this.init();
|
503
769
|
},
|
504
770
|
methods: {
|
771
|
+
editFormEventHandler(row, index, eventName) {
|
772
|
+
this.curEventName = eventName;
|
773
|
+
this.curEventIndex = index;
|
774
|
+
this.formEventHandlerCode = row[eventName];
|
775
|
+
this.showFormEventDialogFlag = true;
|
776
|
+
},
|
777
|
+
|
778
|
+
saveFormEventHandler() {
|
779
|
+
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
780
|
+
let syntaxErrorFlag = false;
|
781
|
+
if (!!codeHints && codeHints.length > 0) {
|
782
|
+
codeHints.forEach((chItem) => {
|
783
|
+
if (chItem.type === "error") {
|
784
|
+
syntaxErrorFlag = true;
|
785
|
+
}
|
786
|
+
});
|
787
|
+
|
788
|
+
if (syntaxErrorFlag) {
|
789
|
+
this.$message.error(
|
790
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
791
|
+
);
|
792
|
+
return;
|
793
|
+
}
|
794
|
+
}
|
795
|
+
this.tableData[this.curEventIndex][this.curEventName] =
|
796
|
+
this.formEventHandlerCode;
|
797
|
+
this.showFormEventDialogFlag = false;
|
798
|
+
},
|
505
799
|
init() {
|
506
|
-
this.tableData = this.$baseLodash.cloneDeep(
|
800
|
+
this.tableData = this.$baseLodash.cloneDeep(
|
801
|
+
this.optionModel.tableColumns
|
802
|
+
);
|
507
803
|
this.$nextTick(() => {
|
508
804
|
this.rowDrop();
|
509
805
|
});
|
@@ -513,33 +809,52 @@ export default {
|
|
513
809
|
this.optionModel.tableColumns = this.tableData;
|
514
810
|
this.closeHandle();
|
515
811
|
},
|
812
|
+
openWidgetRenderDialog(row){
|
813
|
+
this.currentTableColumn = row;
|
814
|
+
this.showColumnRenderDialog = true
|
815
|
+
},
|
816
|
+
confirmWidgetRenderDialog(widgetList){
|
817
|
+
this.currentTableColumn.widgetList = widgetList
|
818
|
+
this.showColumnRenderDialog = false
|
819
|
+
},
|
516
820
|
showRenderDialog: function (e) {
|
517
|
-
(
|
821
|
+
/*if(e.formatS == 'widgetRender'){
|
822
|
+
this.openWidgetRenderDialog(e);
|
823
|
+
return
|
824
|
+
}*/
|
825
|
+
|
826
|
+
(this.currentTableColumn = e),
|
827
|
+
(this.renderJson = e.render || ""),
|
828
|
+
(this.showRenderDialogFlag = !0);
|
518
829
|
},
|
519
830
|
saveColumnRender: function () {
|
520
|
-
this.$set(this.currentTableColumn,
|
831
|
+
this.$set(this.currentTableColumn, "render", this.renderJson),
|
832
|
+
(this.showRenderDialogFlag = !1);
|
521
833
|
},
|
522
834
|
closeHandle() {
|
523
|
-
this.$emit(
|
524
|
-
this.$emit(
|
835
|
+
this.$emit("update:visiable", false);
|
836
|
+
this.$emit("close");
|
525
837
|
},
|
526
838
|
// 添加同级节点
|
527
839
|
onAddSibling(row, index) {
|
528
|
-
console.log(
|
529
|
-
const parentId = row.parentId || null
|
840
|
+
console.log("onAddSibling", row, index);
|
841
|
+
const parentId = row.parentId || null;
|
530
842
|
// 先判断是不是根节点
|
531
843
|
if (!parentId) {
|
532
844
|
// 当前节点直接添加
|
533
845
|
// this.tableData.push(this.generateRow(parentId))
|
534
|
-
let addIndex =
|
535
|
-
|
846
|
+
let addIndex =
|
847
|
+
this.tableData
|
848
|
+
.filter((item) => !item.parentId)
|
849
|
+
.findIndex((item) => item.columnId == row.columnId) + 1;
|
850
|
+
this.tableData.splice(addIndex, 0, this.generateRow(parentId));
|
536
851
|
} else {
|
537
|
-
this.handleAddOneRow(row, index,
|
852
|
+
this.handleAddOneRow(row, index, "SIBLING");
|
538
853
|
}
|
539
854
|
},
|
540
855
|
// 添加子节点 todo
|
541
856
|
onAddChild(row, index) {
|
542
|
-
this.handleAddOneRow(row, index,
|
857
|
+
this.handleAddOneRow(row, index, "CHILD");
|
543
858
|
},
|
544
859
|
/**
|
545
860
|
* 处理添加一行数据
|
@@ -548,36 +863,36 @@ export default {
|
|
548
863
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
549
864
|
*/
|
550
865
|
handleAddOneRow(row, index, type) {
|
551
|
-
|
552
|
-
const
|
553
|
-
|
554
|
-
let curRow = {}
|
866
|
+
const { parentId, columnId } = row;
|
867
|
+
const curId = type === "SIBLING" ? parentId : columnId;
|
868
|
+
let curRow = {};
|
555
869
|
// 在 tableData 中,找到当前节点
|
556
870
|
const findRow = (data) => {
|
557
871
|
data.forEach((item) => {
|
558
872
|
if (item.columnId === curId) {
|
559
|
-
curRow = item
|
873
|
+
curRow = item;
|
560
874
|
}
|
561
875
|
if (item.children && item.children.length) {
|
562
|
-
findRow(item.children)
|
876
|
+
findRow(item.children);
|
563
877
|
}
|
564
|
-
})
|
565
|
-
}
|
878
|
+
});
|
879
|
+
};
|
566
880
|
|
567
|
-
findRow(this.tableData)
|
881
|
+
findRow(this.tableData);
|
568
882
|
|
569
|
-
const {columnId: generateParentId, children} = curRow
|
883
|
+
const { columnId: generateParentId, children } = curRow;
|
570
884
|
|
571
|
-
let newRow = this.generateRow(generateParentId)
|
885
|
+
let newRow = this.generateRow(generateParentId);
|
572
886
|
if (children) {
|
573
|
-
if (type ===
|
574
|
-
let addIndex =
|
575
|
-
|
887
|
+
if (type === "SIBLING") {
|
888
|
+
let addIndex =
|
889
|
+
children.findIndex((item) => item.columnId == row.columnId) + 1;
|
890
|
+
children.splice(addIndex, 0, newRow);
|
576
891
|
} else {
|
577
|
-
children.push(newRow)
|
892
|
+
children.push(newRow);
|
578
893
|
}
|
579
894
|
} else {
|
580
|
-
this.$set(curRow,
|
895
|
+
this.$set(curRow, "children", [newRow]);
|
581
896
|
}
|
582
897
|
},
|
583
898
|
getUuid() {
|
@@ -587,7 +902,7 @@ export default {
|
|
587
902
|
* 生成一行数据
|
588
903
|
*/
|
589
904
|
generateRow(parentId) {
|
590
|
-
let tmpId =
|
905
|
+
let tmpId = "column" + generateId();
|
591
906
|
let uuid = this.getUuid();
|
592
907
|
var row = {
|
593
908
|
columnId: uuid,
|
@@ -597,46 +912,52 @@ export default {
|
|
597
912
|
width: 150,
|
598
913
|
prop: tmpId,
|
599
914
|
label: tmpId,
|
600
|
-
align:
|
915
|
+
align: "left",
|
601
916
|
show: true,
|
602
917
|
sortable: true,
|
603
|
-
|
918
|
+
exportType: null,
|
919
|
+
footerDataType: null,
|
920
|
+
footerMethodConfg: null,
|
921
|
+
widgetList:[]
|
604
922
|
// treeNode: false,
|
605
|
-
|
606
923
|
};
|
607
924
|
return row;
|
608
925
|
},
|
609
926
|
// 添加根节点
|
610
927
|
onAddRoot() {
|
611
|
-
this.tableData.push(this.generateRow())
|
928
|
+
this.tableData.push(this.generateRow());
|
612
929
|
},
|
613
930
|
// 删除当前节点及对应子节点数据
|
614
931
|
onDelete(row) {
|
615
|
-
const {parentId, columnId} = row
|
932
|
+
const { parentId, columnId } = row;
|
616
933
|
// 根节点直接删除
|
617
934
|
if (!parentId) {
|
618
|
-
const delIndex = this.tableData.findIndex(
|
619
|
-
|
935
|
+
const delIndex = this.tableData.findIndex(
|
936
|
+
(item) => item.columnId === columnId
|
937
|
+
);
|
938
|
+
this.tableData.splice(delIndex, 1);
|
620
939
|
} else {
|
621
940
|
// 找到父节点,通过父节点删除
|
622
|
-
let parentRow = {}
|
941
|
+
let parentRow = {};
|
623
942
|
const findRow = (data) => {
|
624
943
|
data.forEach((item) => {
|
625
944
|
if (item.columnId === parentId) {
|
626
|
-
parentRow = {...item}
|
945
|
+
parentRow = { ...item };
|
627
946
|
}
|
628
947
|
if (item.children && item.children.length) {
|
629
|
-
findRow(item.children)
|
948
|
+
findRow(item.children);
|
630
949
|
}
|
631
|
-
})
|
632
|
-
}
|
633
|
-
findRow(this.tableData)
|
950
|
+
});
|
951
|
+
};
|
952
|
+
findRow(this.tableData);
|
634
953
|
|
635
|
-
const {children} = parentRow
|
954
|
+
const { children } = parentRow;
|
636
955
|
|
637
|
-
const delIndex = children.findIndex(
|
956
|
+
const delIndex = children.findIndex(
|
957
|
+
(item) => item.columnId === columnId
|
958
|
+
);
|
638
959
|
|
639
|
-
children.splice(delIndex, 1)
|
960
|
+
children.splice(delIndex, 1);
|
640
961
|
}
|
641
962
|
},
|
642
963
|
// 数据准备 生成 id 和 parentId
|
@@ -644,30 +965,32 @@ export default {
|
|
644
965
|
const tableFormat = (tableData, parentId) => {
|
645
966
|
tableData.forEach((item) => {
|
646
967
|
// item.parentId = parentId || null
|
647
|
-
if (!item.kid) item.kid = item.columnId
|
968
|
+
if (!item.kid) item.kid = item.columnId;
|
648
969
|
if (item.children && item.children.length > 0) {
|
649
|
-
tableFormat(item.children, item.columnId)
|
970
|
+
tableFormat(item.children, item.columnId);
|
650
971
|
}
|
651
|
-
})
|
652
|
-
}
|
972
|
+
});
|
973
|
+
};
|
653
974
|
|
654
|
-
tableFormat(data)
|
655
|
-
return data
|
975
|
+
tableFormat(data);
|
976
|
+
return data;
|
656
977
|
},
|
657
978
|
//drag begin
|
658
979
|
//行拖拽
|
659
980
|
rowDrop() {
|
660
|
-
if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
|
981
|
+
if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
|
661
982
|
// const tbody = document.querySelector('.drag .el-table__body-wrapper tbody');
|
662
|
-
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
983
|
+
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
984
|
+
".el-table__fixed-body-wrapper > table > tbody"
|
985
|
+
)[0];
|
663
986
|
const _this = this;
|
664
987
|
this.dragSort = Sortable.create(tbody, {
|
665
|
-
ghostClass:
|
988
|
+
ghostClass: "sortable-ghost",
|
666
989
|
setData: function (e) {
|
667
|
-
e.setData(
|
990
|
+
e.setData("Text", "");
|
668
991
|
},
|
669
|
-
onEnd({newIndex, oldIndex}) {
|
670
|
-
_this.rowDropEnd(newIndex, oldIndex)
|
992
|
+
onEnd({ newIndex, oldIndex }) {
|
993
|
+
_this.rowDropEnd(newIndex, oldIndex);
|
671
994
|
},
|
672
995
|
});
|
673
996
|
},
|
@@ -678,7 +1001,7 @@ export default {
|
|
678
1001
|
data.forEach((item) => {
|
679
1002
|
const loop = (data) => {
|
680
1003
|
result.push({
|
681
|
-
...data
|
1004
|
+
...data,
|
682
1005
|
});
|
683
1006
|
let child = data.children;
|
684
1007
|
if (child) {
|
@@ -694,7 +1017,9 @@ export default {
|
|
694
1017
|
//数组转树
|
695
1018
|
arrToTree(arr, parentId) {
|
696
1019
|
return arr
|
697
|
-
.filter((item) =>
|
1020
|
+
.filter((item) =>
|
1021
|
+
!parentId ? !item.parentId : item.parentId === parentId
|
1022
|
+
)
|
698
1023
|
.map((item) => {
|
699
1024
|
item.children = this.arrToTree(arr, item.columnId);
|
700
1025
|
return item;
|
@@ -732,13 +1057,7 @@ export default {
|
|
732
1057
|
let newRow = this.tableDataArray[newIndex];
|
733
1058
|
|
734
1059
|
//判断是否把该行 拖拽到 自己的底级中
|
735
|
-
if (
|
736
|
-
this.isTreeBottom(
|
737
|
-
this.tableData,
|
738
|
-
oldRow.columnId,
|
739
|
-
newRow.columnId
|
740
|
-
)
|
741
|
-
) {
|
1060
|
+
if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
|
742
1061
|
this.$message({
|
743
1062
|
type: "error",
|
744
1063
|
message: "不能放到子节点",
|
@@ -784,7 +1103,7 @@ export default {
|
|
784
1103
|
let isButtontCell = false;
|
785
1104
|
let widgetType = this.columnFormatMap[formatS];
|
786
1105
|
if (widgetType) {
|
787
|
-
isButtontCell = widgetType ===
|
1106
|
+
isButtontCell = widgetType === "a-link" || widgetType === "button";
|
788
1107
|
}
|
789
1108
|
return isButtontCell;
|
790
1109
|
},
|
@@ -792,20 +1111,20 @@ export default {
|
|
792
1111
|
changeFormatS(row) {
|
793
1112
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
794
1113
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
|
795
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1114
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
796
1115
|
if (columnSelectedWidget) {
|
797
1116
|
row.columnOption = columnSelectedWidget.options;
|
798
1117
|
} else {
|
799
|
-
row.columnOption = {}
|
1118
|
+
row.columnOption = {};
|
800
1119
|
}
|
801
1120
|
|
802
|
-
if (row.formatS ==
|
1121
|
+
if (row.formatS == "editTreeButtonGroup") {
|
803
1122
|
row.prop = null;
|
804
1123
|
row.label = null;
|
805
1124
|
row.sortable = false;
|
806
1125
|
row.width = 150;
|
807
1126
|
} else if (isButtontCell) {
|
808
|
-
if (row.formatS ==
|
1127
|
+
if (row.formatS == "aLink" || row.formatS == "button") {
|
809
1128
|
if (!row.width || row.width == 47) row.width = 150;
|
810
1129
|
} else {
|
811
1130
|
row.width = 47;
|
@@ -814,13 +1133,13 @@ export default {
|
|
814
1133
|
row.label = null;
|
815
1134
|
row.sortable = false;
|
816
1135
|
} else {
|
817
|
-
let tmpId =
|
1136
|
+
let tmpId = "column" + generateId();
|
818
1137
|
if (!row.width || row.width == 47) row.width = 150;
|
819
1138
|
if (!row.prop) row.prop = tmpId;
|
820
1139
|
if (!row.label) row.label = tmpId;
|
821
1140
|
row.sortable = true;
|
822
1141
|
|
823
|
-
if (row.formatS ==
|
1142
|
+
if (row.formatS == "editAttachment") {
|
824
1143
|
row.prop = this.designer.createAttachmentKeyName();
|
825
1144
|
} else {
|
826
1145
|
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
@@ -829,7 +1148,7 @@ export default {
|
|
829
1148
|
}
|
830
1149
|
},
|
831
1150
|
getColumnWidgetConfig(row, isChange, isEdit) {
|
832
|
-
let formatS = isEdit ? row.editFormatS : row.formatS
|
1151
|
+
let formatS = isEdit ? row.editFormatS : row.formatS;
|
833
1152
|
let columnSelectedWidget = null;
|
834
1153
|
let columnEditFields = null;
|
835
1154
|
|
@@ -845,7 +1164,9 @@ export default {
|
|
845
1164
|
|
846
1165
|
if (type) {
|
847
1166
|
// columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
|
848
|
-
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
1167
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
1168
|
+
this.designer.getFieldWidgetByType(type)
|
1169
|
+
);
|
849
1170
|
/*let tmpId = generateId();
|
850
1171
|
let idVal = row.prop ? row.prop : (type + tmpId);*/
|
851
1172
|
/*columnSelectedWidget.id = idVal;*/
|
@@ -859,61 +1180,70 @@ export default {
|
|
859
1180
|
if (!isChange && columnOption && Object.keys(columnOption).length) {
|
860
1181
|
columnOption.required = row.required || false;
|
861
1182
|
columnSelectedWidget.options = columnOption;
|
862
|
-
if (
|
863
|
-
columnSelectedWidget.options.hiddenByWf =
|
864
|
-
|
865
|
-
|
866
|
-
|
1183
|
+
if ("editDelete" == formatS) {
|
1184
|
+
columnSelectedWidget.options.hiddenByWf =
|
1185
|
+
columnSelectedWidget.options.hiddenByWf ?? true;
|
1186
|
+
columnSelectedWidget.options.prefixIcon =
|
1187
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
1188
|
+
} else if ("editButton" == formatS) {
|
1189
|
+
columnSelectedWidget.options.prefixIcon =
|
1190
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
867
1191
|
}
|
868
1192
|
} else {
|
869
1193
|
columnSelectedWidget.options.required = row.required || false;
|
870
1194
|
|
871
|
-
if (
|
1195
|
+
if ("editDelete" == formatS) {
|
872
1196
|
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
873
1197
|
columnSelectedWidget.options.label = "删除";
|
874
1198
|
columnSelectedWidget.options.labelHidden = true;
|
875
1199
|
columnSelectedWidget.options.hiddenByWf = true;
|
876
|
-
columnSelectedWidget.options.onClick =
|
877
|
-
|
1200
|
+
columnSelectedWidget.options.onClick =
|
1201
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
1202
|
+
} else if ("editButton" == formatS) {
|
878
1203
|
columnSelectedWidget.options.prefixIcon = "el-icon-edit";
|
879
1204
|
columnSelectedWidget.options.label = "查看";
|
880
1205
|
columnSelectedWidget.options.labelHidden = true;
|
881
|
-
columnSelectedWidget.options.onClick =
|
882
|
-
|
1206
|
+
columnSelectedWidget.options.onClick =
|
1207
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
1208
|
+
} else if ("addSiblingEditRow" == formatS) {
|
883
1209
|
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
884
1210
|
columnSelectedWidget.options.label = "新增兄弟节点";
|
885
1211
|
columnSelectedWidget.options.labelHidden = false;
|
886
|
-
columnSelectedWidget.options.onClick =
|
887
|
-
|
1212
|
+
columnSelectedWidget.options.onClick =
|
1213
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
1214
|
+
} else if ("addChildTreeRow" == formatS) {
|
888
1215
|
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
889
1216
|
columnSelectedWidget.options.label = "新增子节点";
|
890
1217
|
columnSelectedWidget.options.labelHidden = false;
|
891
|
-
columnSelectedWidget.options.onClick =
|
892
|
-
|
1218
|
+
columnSelectedWidget.options.onClick =
|
1219
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
1220
|
+
} else if ("moveUpRow" == formatS) {
|
893
1221
|
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
894
1222
|
columnSelectedWidget.options.label = "↑上移";
|
895
1223
|
columnSelectedWidget.options.labelHidden = false;
|
896
|
-
columnSelectedWidget.options.onClick =
|
897
|
-
|
1224
|
+
columnSelectedWidget.options.onClick =
|
1225
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
1226
|
+
} else if ("moveDownRow" == formatS) {
|
898
1227
|
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
899
1228
|
columnSelectedWidget.options.label = "↓下移";
|
900
1229
|
columnSelectedWidget.options.labelHidden = false;
|
901
|
-
columnSelectedWidget.options.onClick =
|
902
|
-
|
1230
|
+
columnSelectedWidget.options.onClick =
|
1231
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
1232
|
+
} else if ("removeTreeRow" == formatS) {
|
903
1233
|
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
904
1234
|
columnSelectedWidget.options.label = "删除";
|
905
1235
|
columnSelectedWidget.options.labelHidden = true;
|
906
|
-
columnSelectedWidget.options.onClick =
|
1236
|
+
columnSelectedWidget.options.onClick =
|
1237
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
907
1238
|
}
|
908
1239
|
|
909
1240
|
columnOption = columnSelectedWidget.options;
|
910
|
-
|
911
1241
|
}
|
912
1242
|
|
913
1243
|
// columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
|
914
1244
|
// columnSelectedWidget.options.name = type + row.columnId;
|
915
1245
|
// columnSelectedWidget.options.name = row.prop;
|
916
|
-
if (columnSelectedWidget.options.hasOwnProperty(
|
1246
|
+
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
917
1247
|
columnSelectedWidget.options.keyName = row.prop;
|
918
1248
|
columnSelectedWidget.options.keyNameEnabled = true;
|
919
1249
|
} else {
|
@@ -925,18 +1255,24 @@ export default {
|
|
925
1255
|
columnSelectedWidget.options.labelHidden = true;
|
926
1256
|
}
|
927
1257
|
}
|
928
|
-
return {columnSelectedWidget, columnEditFields};
|
1258
|
+
return { columnSelectedWidget, columnEditFields };
|
929
1259
|
},
|
930
1260
|
openFormatConfigDialog(row, index) {
|
1261
|
+
if(row.formatS == 'widgetRender'){
|
1262
|
+
this.openWidgetRenderDialog(row);
|
1263
|
+
return
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
|
931
1267
|
let option = row.columnOption;
|
932
1268
|
let selectedWidget;
|
933
1269
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
934
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1270
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
935
1271
|
if (columnSelectedWidget) {
|
936
1272
|
option = columnSelectedWidget.options;
|
937
1273
|
selectedWidget = columnSelectedWidget;
|
938
1274
|
} else {
|
939
|
-
option = {}
|
1275
|
+
option = {};
|
940
1276
|
selectedWidget = {};
|
941
1277
|
}
|
942
1278
|
|
@@ -950,20 +1286,16 @@ export default {
|
|
950
1286
|
index: index,
|
951
1287
|
columnEditFields: columnEditFields,
|
952
1288
|
callback: (columnOption) => {
|
953
|
-
this.confirmFormatConfigDialog(columnOption);
|
954
|
-
}
|
955
|
-
})
|
1289
|
+
this.confirmFormatConfigDialog(columnOption, row);
|
1290
|
+
},
|
1291
|
+
});
|
956
1292
|
},
|
957
1293
|
getFieldKeyNameByOptions(options) {
|
958
1294
|
let o = options.name;
|
959
|
-
return (
|
960
|
-
(options.keyNameEnabled
|
961
|
-
&& options.keyName)
|
962
|
-
|| o
|
963
|
-
);
|
1295
|
+
return (options.keyNameEnabled && options.keyName) || o;
|
964
1296
|
},
|
965
|
-
confirmFormatConfigDialog(columnOption) {
|
966
|
-
let row = this.tableData[this.operateIndex];
|
1297
|
+
confirmFormatConfigDialog(columnOption, row) {
|
1298
|
+
// let row = this.tableData[this.operateIndex];
|
967
1299
|
row.columnOption = columnOption;
|
968
1300
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
969
1301
|
if (!isButtontCell) {
|
@@ -976,12 +1308,12 @@ export default {
|
|
976
1308
|
let option = row.columnOption;
|
977
1309
|
let selectedWidget;
|
978
1310
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
|
979
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1311
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
980
1312
|
if (columnSelectedWidget) {
|
981
1313
|
option = columnSelectedWidget.options;
|
982
1314
|
selectedWidget = columnSelectedWidget;
|
983
1315
|
} else {
|
984
|
-
option = {}
|
1316
|
+
option = {};
|
985
1317
|
selectedWidget = {};
|
986
1318
|
}
|
987
1319
|
|
@@ -995,12 +1327,12 @@ export default {
|
|
995
1327
|
index: index,
|
996
1328
|
columnEditFields: columnEditFields,
|
997
1329
|
callback: (columnOption) => {
|
998
|
-
this.confirmEditFormatConfigDialog(columnOption);
|
999
|
-
}
|
1000
|
-
})
|
1330
|
+
this.confirmEditFormatConfigDialog(columnOption, row);
|
1331
|
+
},
|
1332
|
+
});
|
1001
1333
|
},
|
1002
|
-
confirmEditFormatConfigDialog(columnOption) {
|
1003
|
-
let row = this.tableData[this.operateIndex];
|
1334
|
+
confirmEditFormatConfigDialog(columnOption, row) {
|
1335
|
+
// let row = this.tableData[this.operateIndex];
|
1004
1336
|
row.editColumnOption = columnOption;
|
1005
1337
|
/*row.prop = columnOption.name;
|
1006
1338
|
row.label = columnOption.label;
|
@@ -1008,39 +1340,50 @@ export default {
|
|
1008
1340
|
},
|
1009
1341
|
openTableColumnConfigDialog(row, index) {
|
1010
1342
|
this.operateIndex = index;
|
1343
|
+
this.currentTableColumn = row;
|
1011
1344
|
let eventName = "tableColumnConfig";
|
1012
|
-
let eventParams = ["dataId", "formCode"]
|
1013
|
-
this.tableColumnConfigHeader = `${
|
1014
|
-
|
1345
|
+
let eventParams = ["dataId", "formCode"];
|
1346
|
+
this.tableColumnConfigHeader = `${
|
1347
|
+
this.optionModel.name
|
1348
|
+
}.${eventName}(${eventParams.join(", ")}) {`;
|
1349
|
+
this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
|
1350
|
+
row.tableColumnConfig || ""
|
1351
|
+
);
|
1015
1352
|
|
1016
1353
|
this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
|
1017
1354
|
this.showTableColumnConfigDialog = true;
|
1018
1355
|
},
|
1019
1356
|
saveTableColumnConfigDialog() {
|
1020
|
-
let row = this.tableData[this.operateIndex];
|
1357
|
+
// let row = this.tableData[this.operateIndex];
|
1358
|
+
let row = this.currentTableColumn;
|
1021
1359
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
1022
1360
|
let syntaxErrorFlag = false;
|
1023
1361
|
if (!!codeHints && codeHints.length > 0) {
|
1024
|
-
codeHints.forEach(chItem => {
|
1025
|
-
if (chItem.type ===
|
1362
|
+
codeHints.forEach((chItem) => {
|
1363
|
+
if (chItem.type === "error") {
|
1026
1364
|
syntaxErrorFlag = true;
|
1027
1365
|
}
|
1028
1366
|
});
|
1029
1367
|
|
1030
1368
|
if (syntaxErrorFlag) {
|
1031
|
-
this.$message.error(
|
1369
|
+
this.$message.error(
|
1370
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
1371
|
+
);
|
1032
1372
|
return;
|
1033
1373
|
}
|
1034
1374
|
}
|
1035
|
-
this.$set(
|
1375
|
+
this.$set(
|
1376
|
+
row,
|
1377
|
+
"tableColumnConfig",
|
1378
|
+
this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
|
1379
|
+
);
|
1036
1380
|
this.showTableColumnConfigDialog = false;
|
1037
|
-
|
1038
1381
|
},
|
1039
|
-
}
|
1040
|
-
}
|
1382
|
+
},
|
1383
|
+
};
|
1041
1384
|
</script>
|
1042
1385
|
<style scoped lang="scss">
|
1043
1386
|
.icon-drag:before {
|
1044
|
-
content:
|
1387
|
+
content: "\e61d";
|
1045
1388
|
}
|
1046
1389
|
</style>
|