cloud-web-corejs 1.0.281 → 1.1.0-dev.11
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 +6 -2
- package/src/components/VabUpload/image-viewer.vue +442 -442
- package/src/components/VabUpload/index.vue +45 -3
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +248 -209
- package/src/components/baseTabs/mixins.js +181 -181
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +705 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +23 -12
- package/src/components/excelExport/exportItemConfigUtil.js +30 -0
- package/src/components/excelExport/mixins.js +3 -3
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/jsonImport/index.vue +1 -1
- package/src/components/langImport/index.vue +1 -1
- package/src/components/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +1705 -1556
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/mobile/wf/selectUserDialog.vue +118 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/obsUpload/index.vue +1 -1
- package/src/components/table/config.js +78 -78
- package/src/components/table/index.js +1276 -1276
- package/src/components/table/plugins/cell-area/index.js +1055 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/table/tableForm.vue +330 -330
- package/src/components/table/tableFormMixin.js +318 -318
- package/src/components/table/vxeFilter/index.js +163 -163
- package/src/components/table/vxeFilter/mixin.js +316 -316
- package/src/components/wf/content.vue +1188 -1188
- package/src/components/wf/wf.js +40 -20
- package/src/components/wf/wfActionDropdown.vue +1 -1
- package/src/components/wf/wfActionItems.js +1 -1
- package/src/components/xform/form-designer/designer.js +51 -52
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
- package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
- package/src/components/xform/form-designer/indexMixin.js +35 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
- package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
- package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +35 -3
- package/src/components/xform/lang/en-US.js +14 -0
- package/src/components/xform/lang/zh-CN.js +17 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +2262 -0
- package/src/components/xform/utils/textMaskUtil.js +182 -179
- package/src/components/xform/utils/treeTableUtil.js +1292 -1265
- package/src/components/xform/utils/util.js +56 -11
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +13 -4
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +48 -27
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/assetUrl.js +19 -0
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- package/src/utils/vab.js +1283 -1279
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +31 -0
- package/src/views/bd/project/branch/form_template/list.vue +30 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +225 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +85 -0
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/bd/setting/table_model/edit.vue +1066 -1066
- package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/default2.vue +1 -1
- package/src/views/user/home/index.vue +103 -101
- package/src/views/user/notify_message/dialog.vue +139 -137
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/outLink/view.vue +3 -3
- package/src/views/user/role/edit.vue +632 -632
- package/src/views/user/role/list.vue +260 -260
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +871 -875
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
- package/src/utils/wf.js +0 -766
package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* author: vformAdmin
|
|
4
|
+
* email: vdpadmin@163.com
|
|
5
|
+
* website: https://www.vform666.com
|
|
6
|
+
* date: 2021.08.18
|
|
7
|
+
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
+
*/
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
13
|
+
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
14
|
+
<div class="detail-wrap grid-container" :key="widget.id"
|
|
15
|
+
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
16
|
+
|
|
17
|
+
<div class="detail-temp-box" :class="widget.options.styleTempClass" v-for="(paneWidget, index) in widget.panes" :key="paneWidget.id">
|
|
18
|
+
<div class="detail-temp-header">
|
|
19
|
+
<span class="detail-temp-label">{{ paneWidget.options.label || '模块' }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="detail-temp-body">
|
|
22
|
+
<draggable
|
|
23
|
+
class="detail-temp-body-list"
|
|
24
|
+
:list="paneWidget.widgetList"
|
|
25
|
+
v-bind="{ group: 'dragGroup', ghostClass: 'ghost', animation: 200 }"
|
|
26
|
+
handle=".drag-handler"
|
|
27
|
+
@add="evt => onContainerDragAdd(evt, paneWidget.widgetList)"
|
|
28
|
+
@update="onContainerDragUpdate"
|
|
29
|
+
:move="checkContainerMove"
|
|
30
|
+
>
|
|
31
|
+
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
32
|
+
<template v-for="(subWidget, swIdx) in paneWidget.widgetList">
|
|
33
|
+
<template v-if="subWidget.category === 'container'">
|
|
34
|
+
<component
|
|
35
|
+
:is="subWidget.type + '-widget'"
|
|
36
|
+
:widget="subWidget"
|
|
37
|
+
:designer="designer"
|
|
38
|
+
:key="subWidget.id"
|
|
39
|
+
:parent-list="paneWidget.widgetList"
|
|
40
|
+
:index-of-parent-list="swIdx"
|
|
41
|
+
:parent-widget="paneWidget"
|
|
42
|
+
></component>
|
|
43
|
+
</template>
|
|
44
|
+
<template v-else>
|
|
45
|
+
<component
|
|
46
|
+
:is="subWidget.type + '-widget'"
|
|
47
|
+
:field="subWidget"
|
|
48
|
+
:designer="designer"
|
|
49
|
+
:key="subWidget.id"
|
|
50
|
+
:parent-list="paneWidget.widgetList"
|
|
51
|
+
:index-of-parent-list="swIdx"
|
|
52
|
+
:parent-widget="paneWidget"
|
|
53
|
+
:design-state="true"
|
|
54
|
+
></component>
|
|
55
|
+
</template>
|
|
56
|
+
</template>
|
|
57
|
+
</transition-group>
|
|
58
|
+
</draggable>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
</div>
|
|
63
|
+
</container-wrapper>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script>
|
|
67
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
|
68
|
+
import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin"
|
|
69
|
+
import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper"
|
|
70
|
+
import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign"
|
|
71
|
+
import Draggable from 'vuedraggable'
|
|
72
|
+
import FieldComponents from "../../../../../components/xform/form-designer/form-widget/field-widget";
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
name: "detail-temp-widget",
|
|
76
|
+
componentName: 'ContainerWidget',
|
|
77
|
+
mixins: [i18n, containerMixin, refMixinDesign],
|
|
78
|
+
inject: ['refList'],
|
|
79
|
+
components: {
|
|
80
|
+
ContainerWrapper,
|
|
81
|
+
Draggable,
|
|
82
|
+
...FieldComponents,
|
|
83
|
+
},
|
|
84
|
+
props: {
|
|
85
|
+
widget: Object,
|
|
86
|
+
parentWidget: Object,
|
|
87
|
+
parentList: Array,
|
|
88
|
+
indexOfParentList: Number,
|
|
89
|
+
designer: Object,
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
selected() {
|
|
93
|
+
return this.widget.id === this.designer.selectedId
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
customClass() {
|
|
97
|
+
return this.widget.options.customClass || ''
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
},
|
|
101
|
+
watch: {
|
|
102
|
+
//
|
|
103
|
+
},
|
|
104
|
+
created() {
|
|
105
|
+
this.initRefList()
|
|
106
|
+
},
|
|
107
|
+
mounted() {
|
|
108
|
+
//
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
checkContainerMove(evt) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<style lang="scss" scoped>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
.grid-container {
|
|
122
|
+
min-height: 50px;
|
|
123
|
+
outline: 1px dashed #336699;
|
|
124
|
+
.form-widget-list {
|
|
125
|
+
height: 100%;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.grid-container.selected {
|
|
130
|
+
outline: 2px solid $--color-primary !important;
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
@@ -1,250 +1,250 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
/**
|
|
3
|
-
* author: vformAdmin
|
|
4
|
-
* email: vdpadmin@163.com
|
|
5
|
-
* website: https://www.vform666.com
|
|
6
|
-
* date: 2021.08.18
|
|
7
|
-
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
-
*/
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
13
|
-
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
14
|
-
<div class="detail-wrap grid-container" :key="widget.id"
|
|
15
|
-
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
16
|
-
<div class="d-header clearfix" style="height: auto;">
|
|
17
|
-
<div class="fl" style="width: 20%;overflow: hidden;height: 40px;">
|
|
18
|
-
<i class="el-icon-info"/>
|
|
19
|
-
{{ widget.options.label }}
|
|
20
|
-
</div>
|
|
21
|
-
<div class="fr" style="overflow: auto;">
|
|
22
|
-
<div class="grid-cell">
|
|
23
|
-
<draggable
|
|
24
|
-
:list="widget.widgetList"
|
|
25
|
-
v-bind="{ group: 'dragGroup', ghostClass: 'ghost', animation: 200 }"
|
|
26
|
-
handle=".drag-handler"
|
|
27
|
-
@add="evt => onContainerDragAdd(evt, widget.widgetList)"
|
|
28
|
-
@update="onContainerDragUpdate"
|
|
29
|
-
:move="checkContainerMove"
|
|
30
|
-
>
|
|
31
|
-
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
32
|
-
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
33
|
-
<template v-if="'container' === subWidget.category">
|
|
34
|
-
<component
|
|
35
|
-
:is="subWidget.type + '-widget'"
|
|
36
|
-
:widget="subWidget"
|
|
37
|
-
:designer="designer"
|
|
38
|
-
:key="subWidget.id"
|
|
39
|
-
:parent-list="widget.widgetList"
|
|
40
|
-
:index-of-parent-list="swIdx"
|
|
41
|
-
:parent-widget="widget"
|
|
42
|
-
></component>
|
|
43
|
-
</template>
|
|
44
|
-
<template v-else>
|
|
45
|
-
<component
|
|
46
|
-
:is="subWidget.type + '-widget'"
|
|
47
|
-
:field="subWidget"
|
|
48
|
-
:designer="designer"
|
|
49
|
-
:key="subWidget.id"
|
|
50
|
-
:parent-list="widget.widgetList"
|
|
51
|
-
:index-of-parent-list="swIdx"
|
|
52
|
-
:parent-widget="widget"
|
|
53
|
-
:design-state="true"
|
|
54
|
-
></component>
|
|
55
|
-
</template>
|
|
56
|
-
</template>
|
|
57
|
-
</transition-group>
|
|
58
|
-
</draggable>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<!-- <div class="fr">
|
|
63
|
-
<el-button type="primary" plain class="button-sty" icon="el-icon-refresh-right">重置
|
|
64
|
-
</el-button>
|
|
65
|
-
<el-button type="primary" class="button-sty" icon="el-icon-check">保存</el-button>
|
|
66
|
-
</div>-->
|
|
67
|
-
</div>
|
|
68
|
-
<!-- 正文区:通用容器列表。panes 里既可以直接挂 detail-pane(模块),也可以挂 tab 等
|
|
69
|
-
其它容器(标签承载)。设计期这里不套 baseTabs——draggable 会隔断 baseTabs.getTabs()
|
|
70
|
-
对 slot 子级的探测(见 baseTabs/mixins.js getTabs),导航拿不到 pane,索性不渲染,
|
|
71
|
-
左侧导航预览只在运行期有。 -->
|
|
72
|
-
<draggable
|
|
73
|
-
:list="widget.panes"
|
|
74
|
-
v-bind="{ group: 'dragGroup', ghostClass: 'ghost', animation: 200 }"
|
|
75
|
-
handle=".drag-handler"
|
|
76
|
-
@add="evt => onContainerDragAdd(evt, widget.panes)"
|
|
77
|
-
@update="onContainerDragUpdate"
|
|
78
|
-
:move="checkContainerMove"
|
|
79
|
-
>
|
|
80
|
-
<transition-group name="fade" tag="div" class="detail-pane-list">
|
|
81
|
-
<template v-for="(paneWidget, index) in widget.panes">
|
|
82
|
-
<!-- 模块:额外要 tabRef/tabPaneGrade,这两个 props 是 baseTabs 探测用的,只给 detail-pane -->
|
|
83
|
-
<detail-pane-widget
|
|
84
|
-
v-if="paneWidget.type === 'detail-pane'"
|
|
85
|
-
:key="paneWidget.id"
|
|
86
|
-
:widget="paneWidget"
|
|
87
|
-
:designer="designer"
|
|
88
|
-
:parent-list="widget.panes"
|
|
89
|
-
:index-of-parent-list="index"
|
|
90
|
-
:parent-widget="widget"
|
|
91
|
-
:col-height="widget.options.colHeight"
|
|
92
|
-
tabRef="baseTabRef"
|
|
93
|
-
:tabPaneGrade="2"
|
|
94
|
-
></detail-pane-widget>
|
|
95
|
-
<component
|
|
96
|
-
v-else-if="'container' === paneWidget.category"
|
|
97
|
-
:is="paneWidget.type + '-widget'"
|
|
98
|
-
:key="paneWidget.id"
|
|
99
|
-
:widget="paneWidget"
|
|
100
|
-
:designer="designer"
|
|
101
|
-
:parent-list="widget.panes"
|
|
102
|
-
:index-of-parent-list="index"
|
|
103
|
-
:parent-widget="widget"
|
|
104
|
-
></component>
|
|
105
|
-
<component
|
|
106
|
-
v-else
|
|
107
|
-
:is="paneWidget.type + '-widget'"
|
|
108
|
-
:key="paneWidget.id"
|
|
109
|
-
:field="paneWidget"
|
|
110
|
-
:designer="designer"
|
|
111
|
-
:parent-list="widget.panes"
|
|
112
|
-
:index-of-parent-list="index"
|
|
113
|
-
:parent-widget="widget"
|
|
114
|
-
:design-state="true"
|
|
115
|
-
></component>
|
|
116
|
-
</template>
|
|
117
|
-
</transition-group>
|
|
118
|
-
</draggable>
|
|
119
|
-
</div>
|
|
120
|
-
</container-wrapper>
|
|
121
|
-
</template>
|
|
122
|
-
|
|
123
|
-
<script>
|
|
124
|
-
import i18n from "../../../../../components/xform/utils/i18n"
|
|
125
|
-
import detailPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/detail-pane-widget"
|
|
126
|
-
import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin"
|
|
127
|
-
import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper"
|
|
128
|
-
import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign"
|
|
129
|
-
import Draggable from 'vuedraggable'
|
|
130
|
-
import FieldComponents from "../../../../../components/xform/form-designer/form-widget/field-widget";
|
|
131
|
-
|
|
132
|
-
export default {
|
|
133
|
-
name: "detail-widget",
|
|
134
|
-
componentName: 'ContainerWidget',
|
|
135
|
-
mixins: [i18n, containerMixin, refMixinDesign],
|
|
136
|
-
inject: ['refList'],
|
|
137
|
-
components: {
|
|
138
|
-
ContainerWrapper,
|
|
139
|
-
detailPaneWidget,
|
|
140
|
-
Draggable,
|
|
141
|
-
...FieldComponents,
|
|
142
|
-
},
|
|
143
|
-
props: {
|
|
144
|
-
widget: Object,
|
|
145
|
-
parentWidget: Object,
|
|
146
|
-
parentList: Array,
|
|
147
|
-
indexOfParentList: Number,
|
|
148
|
-
designer: Object,
|
|
149
|
-
},
|
|
150
|
-
computed: {
|
|
151
|
-
selected() {
|
|
152
|
-
return this.widget.id === this.designer.selectedId
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
customClass() {
|
|
156
|
-
return this.widget.options.customClass || ''
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
watch: {
|
|
161
|
-
//
|
|
162
|
-
},
|
|
163
|
-
created() {
|
|
164
|
-
this.initRefList()
|
|
165
|
-
},
|
|
166
|
-
mounted() {
|
|
167
|
-
//
|
|
168
|
-
},
|
|
169
|
-
methods: {
|
|
170
|
-
checkContainerMove(evt) {
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
</script>
|
|
176
|
-
|
|
177
|
-
<style lang="scss" scoped>
|
|
178
|
-
.grid-container {
|
|
179
|
-
min-height: 50px;
|
|
180
|
-
//line-height: 48px;
|
|
181
|
-
//padding: 6px;
|
|
182
|
-
outline: 1px dashed #336699;
|
|
183
|
-
> div{height:100%;}
|
|
184
|
-
.form-widget-list {
|
|
185
|
-
// min-height: 28px;
|
|
186
|
-
height: 100%;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/* 正文区(panes)的拖放区。不能复用上面的 .form-widget-list——那条是 height:100% 且
|
|
190
|
-
min-height 被注释掉的,空态会塌成一条线,没有地方往里拖组件。
|
|
191
|
-
这里给足高度,保证空态也是个看得见、拖得进的落区。 */
|
|
192
|
-
.detail-pane-list {
|
|
193
|
-
min-height: 150px;
|
|
194
|
-
height: auto;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.grid-container.selected, .grid-cell.selected {
|
|
200
|
-
outline: 2px solid $--color-primary !important;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.grid-cell {
|
|
204
|
-
min-height: 38px;
|
|
205
|
-
//margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
|
|
206
|
-
padding: 3px;
|
|
207
|
-
outline: 1px dashed #336699;
|
|
208
|
-
position: relative;
|
|
209
|
-
> div{height:100%;}
|
|
210
|
-
.form-widget-list {
|
|
211
|
-
min-height: 50px;
|
|
212
|
-
height:100%
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.grid-col-action{
|
|
216
|
-
position: absolute;
|
|
217
|
-
bottom: 0;
|
|
218
|
-
right: -2px;
|
|
219
|
-
height: 28px;
|
|
220
|
-
line-height: 28px;
|
|
221
|
-
background: $--color-primary;
|
|
222
|
-
z-index: 999;
|
|
223
|
-
|
|
224
|
-
i {
|
|
225
|
-
font-size: 14px;
|
|
226
|
-
color: #fff;
|
|
227
|
-
margin: 0 5px;
|
|
228
|
-
cursor: pointer;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.grid-col-handler {
|
|
233
|
-
position: absolute;
|
|
234
|
-
top: -2px;
|
|
235
|
-
left: -2px;
|
|
236
|
-
height: 22px;
|
|
237
|
-
line-height: 22px;
|
|
238
|
-
background: $--color-primary;
|
|
239
|
-
z-index: 9;
|
|
240
|
-
|
|
241
|
-
i {
|
|
242
|
-
font-size: 14px;
|
|
243
|
-
font-style: normal;
|
|
244
|
-
color: #fff;
|
|
245
|
-
margin: 4px;
|
|
246
|
-
cursor: default;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* author: vformAdmin
|
|
4
|
+
* email: vdpadmin@163.com
|
|
5
|
+
* website: https://www.vform666.com
|
|
6
|
+
* date: 2021.08.18
|
|
7
|
+
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
+
*/
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
13
|
+
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
14
|
+
<div class="detail-wrap grid-container" :key="widget.id"
|
|
15
|
+
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
16
|
+
<div class="d-header clearfix" style="height: auto;">
|
|
17
|
+
<div class="fl" style="width: 20%;overflow: hidden;height: 40px;">
|
|
18
|
+
<i class="el-icon-info"/>
|
|
19
|
+
{{ widget.options.label }}
|
|
20
|
+
</div>
|
|
21
|
+
<div class="fr" style="overflow: auto;">
|
|
22
|
+
<div class="grid-cell">
|
|
23
|
+
<draggable
|
|
24
|
+
:list="widget.widgetList"
|
|
25
|
+
v-bind="{ group: 'dragGroup', ghostClass: 'ghost', animation: 200 }"
|
|
26
|
+
handle=".drag-handler"
|
|
27
|
+
@add="evt => onContainerDragAdd(evt, widget.widgetList)"
|
|
28
|
+
@update="onContainerDragUpdate"
|
|
29
|
+
:move="checkContainerMove"
|
|
30
|
+
>
|
|
31
|
+
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
32
|
+
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
33
|
+
<template v-if="'container' === subWidget.category">
|
|
34
|
+
<component
|
|
35
|
+
:is="subWidget.type + '-widget'"
|
|
36
|
+
:widget="subWidget"
|
|
37
|
+
:designer="designer"
|
|
38
|
+
:key="subWidget.id"
|
|
39
|
+
:parent-list="widget.widgetList"
|
|
40
|
+
:index-of-parent-list="swIdx"
|
|
41
|
+
:parent-widget="widget"
|
|
42
|
+
></component>
|
|
43
|
+
</template>
|
|
44
|
+
<template v-else>
|
|
45
|
+
<component
|
|
46
|
+
:is="subWidget.type + '-widget'"
|
|
47
|
+
:field="subWidget"
|
|
48
|
+
:designer="designer"
|
|
49
|
+
:key="subWidget.id"
|
|
50
|
+
:parent-list="widget.widgetList"
|
|
51
|
+
:index-of-parent-list="swIdx"
|
|
52
|
+
:parent-widget="widget"
|
|
53
|
+
:design-state="true"
|
|
54
|
+
></component>
|
|
55
|
+
</template>
|
|
56
|
+
</template>
|
|
57
|
+
</transition-group>
|
|
58
|
+
</draggable>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<!-- <div class="fr">
|
|
63
|
+
<el-button type="primary" plain class="button-sty" icon="el-icon-refresh-right">重置
|
|
64
|
+
</el-button>
|
|
65
|
+
<el-button type="primary" class="button-sty" icon="el-icon-check">保存</el-button>
|
|
66
|
+
</div>-->
|
|
67
|
+
</div>
|
|
68
|
+
<!-- 正文区:通用容器列表。panes 里既可以直接挂 detail-pane(模块),也可以挂 tab 等
|
|
69
|
+
其它容器(标签承载)。设计期这里不套 baseTabs——draggable 会隔断 baseTabs.getTabs()
|
|
70
|
+
对 slot 子级的探测(见 baseTabs/mixins.js getTabs),导航拿不到 pane,索性不渲染,
|
|
71
|
+
左侧导航预览只在运行期有。 -->
|
|
72
|
+
<draggable
|
|
73
|
+
:list="widget.panes"
|
|
74
|
+
v-bind="{ group: 'dragGroup', ghostClass: 'ghost', animation: 200 }"
|
|
75
|
+
handle=".drag-handler"
|
|
76
|
+
@add="evt => onContainerDragAdd(evt, widget.panes)"
|
|
77
|
+
@update="onContainerDragUpdate"
|
|
78
|
+
:move="checkContainerMove"
|
|
79
|
+
>
|
|
80
|
+
<transition-group name="fade" tag="div" class="detail-pane-list">
|
|
81
|
+
<template v-for="(paneWidget, index) in widget.panes">
|
|
82
|
+
<!-- 模块:额外要 tabRef/tabPaneGrade,这两个 props 是 baseTabs 探测用的,只给 detail-pane -->
|
|
83
|
+
<detail-pane-widget
|
|
84
|
+
v-if="paneWidget.type === 'detail-pane'"
|
|
85
|
+
:key="paneWidget.id"
|
|
86
|
+
:widget="paneWidget"
|
|
87
|
+
:designer="designer"
|
|
88
|
+
:parent-list="widget.panes"
|
|
89
|
+
:index-of-parent-list="index"
|
|
90
|
+
:parent-widget="widget"
|
|
91
|
+
:col-height="widget.options.colHeight"
|
|
92
|
+
tabRef="baseTabRef"
|
|
93
|
+
:tabPaneGrade="2"
|
|
94
|
+
></detail-pane-widget>
|
|
95
|
+
<component
|
|
96
|
+
v-else-if="'container' === paneWidget.category"
|
|
97
|
+
:is="paneWidget.type + '-widget'"
|
|
98
|
+
:key="paneWidget.id"
|
|
99
|
+
:widget="paneWidget"
|
|
100
|
+
:designer="designer"
|
|
101
|
+
:parent-list="widget.panes"
|
|
102
|
+
:index-of-parent-list="index"
|
|
103
|
+
:parent-widget="widget"
|
|
104
|
+
></component>
|
|
105
|
+
<component
|
|
106
|
+
v-else
|
|
107
|
+
:is="paneWidget.type + '-widget'"
|
|
108
|
+
:key="paneWidget.id"
|
|
109
|
+
:field="paneWidget"
|
|
110
|
+
:designer="designer"
|
|
111
|
+
:parent-list="widget.panes"
|
|
112
|
+
:index-of-parent-list="index"
|
|
113
|
+
:parent-widget="widget"
|
|
114
|
+
:design-state="true"
|
|
115
|
+
></component>
|
|
116
|
+
</template>
|
|
117
|
+
</transition-group>
|
|
118
|
+
</draggable>
|
|
119
|
+
</div>
|
|
120
|
+
</container-wrapper>
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<script>
|
|
124
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
|
125
|
+
import detailPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/detail-pane-widget"
|
|
126
|
+
import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin"
|
|
127
|
+
import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper"
|
|
128
|
+
import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign"
|
|
129
|
+
import Draggable from 'vuedraggable'
|
|
130
|
+
import FieldComponents from "../../../../../components/xform/form-designer/form-widget/field-widget";
|
|
131
|
+
|
|
132
|
+
export default {
|
|
133
|
+
name: "detail-widget",
|
|
134
|
+
componentName: 'ContainerWidget',
|
|
135
|
+
mixins: [i18n, containerMixin, refMixinDesign],
|
|
136
|
+
inject: ['refList'],
|
|
137
|
+
components: {
|
|
138
|
+
ContainerWrapper,
|
|
139
|
+
detailPaneWidget,
|
|
140
|
+
Draggable,
|
|
141
|
+
...FieldComponents,
|
|
142
|
+
},
|
|
143
|
+
props: {
|
|
144
|
+
widget: Object,
|
|
145
|
+
parentWidget: Object,
|
|
146
|
+
parentList: Array,
|
|
147
|
+
indexOfParentList: Number,
|
|
148
|
+
designer: Object,
|
|
149
|
+
},
|
|
150
|
+
computed: {
|
|
151
|
+
selected() {
|
|
152
|
+
return this.widget.id === this.designer.selectedId
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
customClass() {
|
|
156
|
+
return this.widget.options.customClass || ''
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
},
|
|
160
|
+
watch: {
|
|
161
|
+
//
|
|
162
|
+
},
|
|
163
|
+
created() {
|
|
164
|
+
this.initRefList()
|
|
165
|
+
},
|
|
166
|
+
mounted() {
|
|
167
|
+
//
|
|
168
|
+
},
|
|
169
|
+
methods: {
|
|
170
|
+
checkContainerMove(evt) {
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
</script>
|
|
176
|
+
|
|
177
|
+
<style lang="scss" scoped>
|
|
178
|
+
.grid-container {
|
|
179
|
+
min-height: 50px;
|
|
180
|
+
//line-height: 48px;
|
|
181
|
+
//padding: 6px;
|
|
182
|
+
outline: 1px dashed #336699;
|
|
183
|
+
> div{height:100%;}
|
|
184
|
+
.form-widget-list {
|
|
185
|
+
// min-height: 28px;
|
|
186
|
+
height: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* 正文区(panes)的拖放区。不能复用上面的 .form-widget-list——那条是 height:100% 且
|
|
190
|
+
min-height 被注释掉的,空态会塌成一条线,没有地方往里拖组件。
|
|
191
|
+
这里给足高度,保证空态也是个看得见、拖得进的落区。 */
|
|
192
|
+
.detail-pane-list {
|
|
193
|
+
min-height: 150px;
|
|
194
|
+
height: auto;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.grid-container.selected, .grid-cell.selected {
|
|
200
|
+
outline: 2px solid $--color-primary !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.grid-cell {
|
|
204
|
+
min-height: 38px;
|
|
205
|
+
//margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
|
|
206
|
+
padding: 3px;
|
|
207
|
+
outline: 1px dashed #336699;
|
|
208
|
+
position: relative;
|
|
209
|
+
> div{height:100%;}
|
|
210
|
+
.form-widget-list {
|
|
211
|
+
min-height: 50px;
|
|
212
|
+
height:100%
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.grid-col-action{
|
|
216
|
+
position: absolute;
|
|
217
|
+
bottom: 0;
|
|
218
|
+
right: -2px;
|
|
219
|
+
height: 28px;
|
|
220
|
+
line-height: 28px;
|
|
221
|
+
background: $--color-primary;
|
|
222
|
+
z-index: 999;
|
|
223
|
+
|
|
224
|
+
i {
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
color: #fff;
|
|
227
|
+
margin: 0 5px;
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.grid-col-handler {
|
|
233
|
+
position: absolute;
|
|
234
|
+
top: -2px;
|
|
235
|
+
left: -2px;
|
|
236
|
+
height: 22px;
|
|
237
|
+
line-height: 22px;
|
|
238
|
+
background: $--color-primary;
|
|
239
|
+
z-index: 9;
|
|
240
|
+
|
|
241
|
+
i {
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
font-style: normal;
|
|
244
|
+
color: #fff;
|
|
245
|
+
margin: 4px;
|
|
246
|
+
cursor: default;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
</style>
|