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