cloud-web-corejs 1.0.54-dev.745 → 1.0.54-dev.747
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 +194 -192
- package/src/App.vue +73 -71
- package/src/components/baseArea/index.vue +1628 -1628
- package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
- package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -297
- package/src/components/fileLibrary/index.vue +1109 -1109
- package/src/components/fileLibrary/propertiesDialog.vue +190 -190
- package/src/components/fileLibrary/recycleBinDialog.vue +237 -237
- package/src/components/wf/mixins/setCandidateDialog.js +217 -217
- package/src/components/wf/mixins/setCandidateDialog2.js +252 -252
- package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -986
- package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +272 -272
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +216 -216
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +928 -928
- package/src/components/xform/form-designer/index.vue +195 -195
- package/src/components/xform/form-designer/indexMixin.js +848 -848
- package/src/components/xform/form-designer/setting-panel/index.vue +313 -313
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -124
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +369 -369
- package/src/components/xform/form-designer/widget-panel/index.vue +389 -389
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +343 -343
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4531 -4531
- package/src/components/xform/form-render/container-item/data-table-mixin.js +4748 -4576
- package/src/components/xform/form-render/container-item/tab-item.vue +125 -125
- package/src/components/xform/form-render/indexMixin.js +5061 -5078
- package/src/components/xform/lang/en-US.js +457 -457
- package/src/components/xform/lang/zh-CN.js +628 -628
- package/src/components/xform/utils/util.js +1585 -1554
- package/src/index.js +347 -230
- package/src/layout/components/AppMain.vue +122 -125
- package/src/layout/components/extractedCode/viewDialog.vue +207 -207
- package/src/layout/components/langTool.vue +128 -123
- package/src/layout/defaultLayout.vue +164 -158
- package/src/microRouter/index.js +389 -0
- package/src/permission.js +185 -135
- package/src/public-path.js +8 -0
- package/src/store/config/index.js +667 -669
- package/src/store/modules/micro.js +46 -0
- package/src/store/modules/permission.js +468 -373
- package/src/store/modules/user.js +419 -415
- package/src/utils/auth.js +27 -1
- package/src/utils/index.js +579 -6
- package/src/utils/keepAlive.js +4 -0
- package/src/utils/menuAdapter.js +183 -0
- package/src/utils/request.js +417 -28
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +483 -483
- package/src/views/bd/setting/form_script/form_list.vue +174 -174
- package/src/views/bd/setting/form_script/mixins/form_list.js +330 -330
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -171
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -253
- package/src/views/user/menuFallback/index.vue +123 -0
- package/src/views/user/wf/wfReport/index.vue +625 -625
|
@@ -1,389 +1,389 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
|
|
3
|
-
<div class="panel-container">
|
|
4
|
-
|
|
5
|
-
<el-tabs v-model="firstTab" class="no-bottom-margin indent-left-margin">
|
|
6
|
-
<el-tab-pane v-if="showComponentLib" name="componentLib">
|
|
7
|
-
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('designer.componentLib') }}</span>
|
|
8
|
-
|
|
9
|
-
<el-collapse v-model="activeNames" class="widget-collapse">
|
|
10
|
-
<el-collapse-item name="1" :title="i18nt('designer.containerTitle')">
|
|
11
|
-
<draggable tag="ul" :list="containers" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
12
|
-
:clone="handleContainerWidgetClone" ghost-class="ghost" :sort="false"
|
|
13
|
-
:move="checkContainerMove" @end="onContainerDragEnd">
|
|
14
|
-
<li v-for="(ctn, index) in containers" :key="index" class="container-widget-item"
|
|
15
|
-
:title="ctn.displayName"
|
|
16
|
-
@dblclick="addContainerByDbClick(ctn)">
|
|
17
|
-
<span><widget-icon :icon="ctn.icon"/>
|
|
18
|
-
<span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
|
|
19
|
-
</span>
|
|
20
|
-
</li>
|
|
21
|
-
</draggable>
|
|
22
|
-
</el-collapse-item>
|
|
23
|
-
|
|
24
|
-
<el-collapse-item name="2" :title="i18nt('designer.basicFieldTitle')">
|
|
25
|
-
<draggable tag="ul" :list="basicFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
26
|
-
:move="checkFieldMove"
|
|
27
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
28
|
-
<li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
29
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
30
|
-
<span><widget-icon :icon="fld.icon"/><span>{{
|
|
31
|
-
i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
|
|
32
|
-
}}</span></span>
|
|
33
|
-
</li>
|
|
34
|
-
</draggable>
|
|
35
|
-
</el-collapse-item>
|
|
36
|
-
|
|
37
|
-
<el-collapse-item name="3" :title="i18nt('designer.advancedFieldTitle')">
|
|
38
|
-
<draggable tag="ul" :list="advancedFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
39
|
-
:move="checkFieldMove"
|
|
40
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
41
|
-
<li v-for="(fld, index) in advancedFields" :key="index" class="field-widget-item"
|
|
42
|
-
:title="fld.displayName"
|
|
43
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
44
|
-
<span><widget-icon :icon="fld.icon"/>
|
|
45
|
-
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
46
|
-
</span>
|
|
47
|
-
</li>
|
|
48
|
-
</draggable>
|
|
49
|
-
</el-collapse-item>
|
|
50
|
-
|
|
51
|
-
<!-- -->
|
|
52
|
-
<el-collapse-item name="4" :title="i18nt('designer.customFieldTitle')">
|
|
53
|
-
<draggable tag="ul" :list="customFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
54
|
-
:move="checkFieldMove"
|
|
55
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
56
|
-
<li v-for="(fld, index) in customFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
57
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
58
|
-
<span>
|
|
59
|
-
<widget-icon :icon="fld.icon"/>
|
|
60
|
-
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
61
|
-
</span>
|
|
62
|
-
</li>
|
|
63
|
-
</draggable>
|
|
64
|
-
</el-collapse-item>
|
|
65
|
-
<!-- -->
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</el-collapse>
|
|
69
|
-
|
|
70
|
-
</el-tab-pane>
|
|
71
|
-
<el-tab-pane v-if="showMetadataLib" name="metadataLib">
|
|
72
|
-
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('designer.metadataLib') }}</span>
|
|
73
|
-
|
|
74
|
-
<el-collapse v-model="metadataActiveNames" class="widget-collapse">
|
|
75
|
-
<el-collapse-item name="0" :title="i18nt('designer.containerTitle')">
|
|
76
|
-
<draggable tag="ul" :list="commonContainers" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
77
|
-
:clone="handleContainerWidgetClone" ghost-class="ghost" :sort="false"
|
|
78
|
-
:move="checkContainerMove" @end="onContainerDragEnd">
|
|
79
|
-
<li v-for="(ctn, index) in commonContainers" :key="index" class="container-widget-item"
|
|
80
|
-
:title="ctn.displayName"
|
|
81
|
-
@dblclick="addContainerByDbClick(ctn)">
|
|
82
|
-
<span><widget-icon :icon="ctn.icon"/>
|
|
83
|
-
<span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
|
|
84
|
-
</span>
|
|
85
|
-
</li>
|
|
86
|
-
</draggable>
|
|
87
|
-
</el-collapse-item>
|
|
88
|
-
<el-collapse-item name="2" :title="i18nt('designer.basicFieldTitle')">
|
|
89
|
-
<draggable tag="ul" :list="basicFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
90
|
-
:move="checkFieldMove"
|
|
91
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
92
|
-
<li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
93
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
94
|
-
<span><widget-icon :icon="fld.icon"/><span>{{
|
|
95
|
-
i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
|
|
96
|
-
}}</span></span>
|
|
97
|
-
</li>
|
|
98
|
-
</draggable>
|
|
99
|
-
</el-collapse-item>
|
|
100
|
-
<el-collapse-item name="3" :title="i18nt('designer.advancedFieldTitle')">
|
|
101
|
-
<draggable tag="ul" :list="commonAdvancedFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
102
|
-
:move="checkFieldMove"
|
|
103
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
104
|
-
<li v-for="(fld, index) in commonAdvancedFields" :key="index" class="field-widget-item"
|
|
105
|
-
:title="fld.displayName"
|
|
106
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
107
|
-
<span><widget-icon :icon="fld.icon"/>
|
|
108
|
-
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
109
|
-
</span>
|
|
110
|
-
</li>
|
|
111
|
-
</draggable>
|
|
112
|
-
</el-collapse-item>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<el-collapse-item v-if="!!metaFields.main.entityName" name="1" :title="metaFields.main.entityLabel">
|
|
117
|
-
<draggable tag="ul" :list="metaFields.main.fieldList"
|
|
118
|
-
:group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
119
|
-
:move="checkFieldMove"
|
|
120
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
121
|
-
<li v-for="(fld, index) in metaFields.main.fieldList" :key="index" class="field-widget-item"
|
|
122
|
-
:title="fld.displayName"
|
|
123
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
124
|
-
<span><widget-icon :icon="fld.icon"/><span>{{ getMetaFieldLabel(fld) }}</span></span>
|
|
125
|
-
</li>
|
|
126
|
-
</draggable>
|
|
127
|
-
</el-collapse-item>
|
|
128
|
-
|
|
129
|
-
<template v-if="metaFields.detail && metaFields.detail.length >0">
|
|
130
|
-
<el-collapse-item v-for="(item,index0) in metaFields.detail" :key="index0" :name="index0+'2'"
|
|
131
|
-
:title="item.entityLabel">
|
|
132
|
-
<draggable tag="ul" :list="item.fieldList" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
133
|
-
:move="checkFieldMove"
|
|
134
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
135
|
-
<li v-for="(fld, index) in item.fieldList" :key="index" class="field-widget-item"
|
|
136
|
-
:title="fld.displayName"
|
|
137
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
138
|
-
<span><widget-icon :icon="fld.icon"/>
|
|
139
|
-
<span>{{ getMetaFieldLabel(fld) }}</span>
|
|
140
|
-
</span>
|
|
141
|
-
</li>
|
|
142
|
-
</draggable>
|
|
143
|
-
</el-collapse-item>
|
|
144
|
-
</template>
|
|
145
|
-
</el-collapse>
|
|
146
|
-
</el-tab-pane>
|
|
147
|
-
<el-tab-pane name="businessLib">
|
|
148
|
-
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('业务组件') }}</span>
|
|
149
|
-
<el-collapse v-model="businessActiveNames" class="widget-collapse">
|
|
150
|
-
<el-collapse-item name="0" :title="i18nt('业务组件')">
|
|
151
|
-
<draggable tag="ul" :list="businessFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
152
|
-
:move="checkFieldMove"
|
|
153
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
154
|
-
<li v-for="(fld, index) in businessFields" :key="index" class="field-widget-item"
|
|
155
|
-
:title="fld.displayName"
|
|
156
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
157
|
-
<span><widget-icon :icon="fld.icon"/>
|
|
158
|
-
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
159
|
-
</span>
|
|
160
|
-
</li>
|
|
161
|
-
</draggable>
|
|
162
|
-
</el-collapse-item>
|
|
163
|
-
<el-collapse-item name="compare" :title="i18nt('对比组件')">
|
|
164
|
-
<draggable tag="ul" :list="compareFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
165
|
-
:move="checkFieldMove"
|
|
166
|
-
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
167
|
-
<li v-for="(fld, index) in compareFields" :key="index" class="field-widget-item"
|
|
168
|
-
:title="fld.displayName"
|
|
169
|
-
@dblclick="addFieldByDbClick(fld)">
|
|
170
|
-
<span><widget-icon :icon="fld.icon"/>
|
|
171
|
-
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
172
|
-
</span>
|
|
173
|
-
</li>
|
|
174
|
-
</draggable>
|
|
175
|
-
</el-collapse-item>
|
|
176
|
-
</el-collapse>
|
|
177
|
-
</el-tab-pane>
|
|
178
|
-
<!-- <el-tab-pane v-if="showFormTemplates" name="formLib" style="padding: 8px">
|
|
179
|
-
<span slot="label"><i class="el-icon-c-scale-to-original"></i> {{i18nt('designer.formLib')}}</span>
|
|
180
|
-
|
|
181
|
-
<template v-for="(ft, idx) in formTemplates">
|
|
182
|
-
<el-card :key="idx" :bord-style="{ padding: '0' }" shadow="hover" class="ft-card">
|
|
183
|
-
<el-popover placement="right" trigger="hover">
|
|
184
|
-
<img slot="reference" :src="ft.imgUrl" style="width: 200px">
|
|
185
|
-
<img :src="ft.imgUrl" style="height: 600px;width: 720px">
|
|
186
|
-
</el-popover>
|
|
187
|
-
<div class="bottom clear-fix">
|
|
188
|
-
<span class="ft-title">#{{idx+1}} {{ft.title}}</span>
|
|
189
|
-
<el-button type="text" class="right-button" @click="loadFormTemplate(ft.jsonUrl)">
|
|
190
|
-
{{i18nt('designer.hint.loadFormTemplate')}}</el-button>
|
|
191
|
-
</div>
|
|
192
|
-
</el-card>
|
|
193
|
-
</template>
|
|
194
|
-
</el-tab-pane>-->
|
|
195
|
-
|
|
196
|
-
</el-tabs>
|
|
197
|
-
|
|
198
|
-
</div>
|
|
199
|
-
|
|
200
|
-
</template>
|
|
201
|
-
|
|
202
|
-
<script>
|
|
203
|
-
import Draggable from 'vuedraggable'
|
|
204
|
-
import indexMixin from './indexMixin.js';
|
|
205
|
-
import { compareFields } from './widgetsConfig';
|
|
206
|
-
|
|
207
|
-
export default {
|
|
208
|
-
name: "FieldPanel",
|
|
209
|
-
mixins: [indexMixin],
|
|
210
|
-
components: {
|
|
211
|
-
Draggable,
|
|
212
|
-
/* 面板组件图标:el-icon- 前缀渲染 element 字体图标,否则渲染 svg-icon */
|
|
213
|
-
WidgetIcon: {
|
|
214
|
-
name: "WidgetIcon",
|
|
215
|
-
functional: true,
|
|
216
|
-
props: { icon: String },
|
|
217
|
-
render(h, ctx) {
|
|
218
|
-
const icon = ctx.props.icon || "";
|
|
219
|
-
if (icon.indexOf("el-icon-") === 0) {
|
|
220
|
-
return h("i", { class: [icon, "color-svg-icon", "panel-el-icon"] });
|
|
221
|
-
}
|
|
222
|
-
return h("svg-icon", {
|
|
223
|
-
props: { iconClass: icon, className: "color-svg-icon" },
|
|
224
|
-
});
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
data() {
|
|
229
|
-
return {
|
|
230
|
-
compareFields,
|
|
231
|
-
};
|
|
232
|
-
},
|
|
233
|
-
created() {
|
|
234
|
-
// 让「对比组件」分组默认展开
|
|
235
|
-
if (Array.isArray(this.businessActiveNames)) {
|
|
236
|
-
if (this.businessActiveNames.indexOf("compare") === -1) {
|
|
237
|
-
this.businessActiveNames.push("compare");
|
|
238
|
-
}
|
|
239
|
-
} else if (this.businessActiveNames !== "compare") {
|
|
240
|
-
this.businessActiveNames = [this.businessActiveNames, "compare"];
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
</script>
|
|
245
|
-
|
|
246
|
-
<style lang="scss" scoped>
|
|
247
|
-
|
|
248
|
-
.color-svg-icon {
|
|
249
|
-
color: $--color-primary;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.side-scroll-bar {
|
|
253
|
-
::v-deep .el-scrollbar__wrap {
|
|
254
|
-
overflow-x: hidden;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// div.panel-container {
|
|
259
|
-
// padding-bottom: 10px;
|
|
260
|
-
// }
|
|
261
|
-
|
|
262
|
-
.no-bottom-margin ::v-deep .el-tabs__header {
|
|
263
|
-
margin-bottom: 0;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.indent-left-margin {
|
|
267
|
-
::v-deep .el-tabs__nav {
|
|
268
|
-
margin-left: 20px;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.el-collapse-item ::v-deep ul > li {
|
|
273
|
-
list-style: none;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.widget-collapse {
|
|
277
|
-
border-top-width: 0;
|
|
278
|
-
|
|
279
|
-
::v-deep .el-collapse-item__header {
|
|
280
|
-
margin-left: 8px;
|
|
281
|
-
font-weight: bold;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
::v-deep .el-collapse-item__content {
|
|
285
|
-
padding-bottom: 6px;
|
|
286
|
-
|
|
287
|
-
ul {
|
|
288
|
-
padding-left: 10px; /* 重置IE11默认样式 */
|
|
289
|
-
margin: 0; /* 重置IE11默认样式 */
|
|
290
|
-
margin-block-start: 0;
|
|
291
|
-
margin-block-end: 0.25em;
|
|
292
|
-
padding-inline-start: 10px;
|
|
293
|
-
|
|
294
|
-
&:after {
|
|
295
|
-
content: "";
|
|
296
|
-
display: block;
|
|
297
|
-
clear: both;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.container-widget-item, .field-widget-item {
|
|
301
|
-
display: inline-block;
|
|
302
|
-
height: 35px;
|
|
303
|
-
line-height: 35px;
|
|
304
|
-
width: calc(50% - 7px);
|
|
305
|
-
float: left;
|
|
306
|
-
margin: 2px 6px 3px 0;
|
|
307
|
-
cursor: move;
|
|
308
|
-
white-space: nowrap;
|
|
309
|
-
text-overflow: ellipsis;
|
|
310
|
-
overflow: hidden;
|
|
311
|
-
background: #f1f2f3;
|
|
312
|
-
font-size: 12px;
|
|
313
|
-
padding-left: 12px;
|
|
314
|
-
|
|
315
|
-
svg {
|
|
316
|
-
display: inline-block;
|
|
317
|
-
//margin: 10px auto 0;
|
|
318
|
-
width: 1.25em;
|
|
319
|
-
height: 1.25em;
|
|
320
|
-
vertical-align: middle;
|
|
321
|
-
margin-right: 5px;
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
i.panel-el-icon {
|
|
326
|
-
display: inline-block;
|
|
327
|
-
font-size: 1.25em;
|
|
328
|
-
vertical-align: middle;
|
|
329
|
-
margin-right: 5px;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
span > span {
|
|
333
|
-
vertical-align: middle;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.container-widget-item:hover, .field-widget-item:hover {
|
|
338
|
-
background: #EBEEF5;
|
|
339
|
-
outline: 1px solid $--color-primary;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.drag-handler {
|
|
343
|
-
position: absolute;
|
|
344
|
-
top: 0;
|
|
345
|
-
left: 160px;
|
|
346
|
-
background-color: #dddddd;
|
|
347
|
-
border-radius: 5px;
|
|
348
|
-
padding-right: 5px;
|
|
349
|
-
font-size: 11px;
|
|
350
|
-
color: #666666;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.el-card.ft-card {
|
|
357
|
-
border: 1px solid #8896B3;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.ft-card {
|
|
361
|
-
margin-bottom: 10px;
|
|
362
|
-
|
|
363
|
-
.bottom {
|
|
364
|
-
margin-top: 10px;
|
|
365
|
-
line-height: 12px;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.ft-title {
|
|
369
|
-
font-size: 13px;
|
|
370
|
-
font-weight: bold;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.right-button {
|
|
374
|
-
padding: 0;
|
|
375
|
-
float: right;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.clear-fix:before, .clear-fix:after {
|
|
379
|
-
display: table;
|
|
380
|
-
content: "";
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.clear-fix:after {
|
|
384
|
-
clear: both;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div class="panel-container">
|
|
4
|
+
|
|
5
|
+
<el-tabs v-model="firstTab" class="no-bottom-margin indent-left-margin">
|
|
6
|
+
<el-tab-pane v-if="showComponentLib" name="componentLib">
|
|
7
|
+
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('designer.componentLib') }}</span>
|
|
8
|
+
|
|
9
|
+
<el-collapse v-model="activeNames" class="widget-collapse">
|
|
10
|
+
<el-collapse-item name="1" :title="i18nt('designer.containerTitle')">
|
|
11
|
+
<draggable tag="ul" :list="containers" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
12
|
+
:clone="handleContainerWidgetClone" ghost-class="ghost" :sort="false"
|
|
13
|
+
:move="checkContainerMove" @end="onContainerDragEnd">
|
|
14
|
+
<li v-for="(ctn, index) in containers" :key="index" class="container-widget-item"
|
|
15
|
+
:title="ctn.displayName"
|
|
16
|
+
@dblclick="addContainerByDbClick(ctn)">
|
|
17
|
+
<span><widget-icon :icon="ctn.icon"/>
|
|
18
|
+
<span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
|
|
19
|
+
</span>
|
|
20
|
+
</li>
|
|
21
|
+
</draggable>
|
|
22
|
+
</el-collapse-item>
|
|
23
|
+
|
|
24
|
+
<el-collapse-item name="2" :title="i18nt('designer.basicFieldTitle')">
|
|
25
|
+
<draggable tag="ul" :list="basicFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
26
|
+
:move="checkFieldMove"
|
|
27
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
28
|
+
<li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
29
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
30
|
+
<span><widget-icon :icon="fld.icon"/><span>{{
|
|
31
|
+
i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
|
|
32
|
+
}}</span></span>
|
|
33
|
+
</li>
|
|
34
|
+
</draggable>
|
|
35
|
+
</el-collapse-item>
|
|
36
|
+
|
|
37
|
+
<el-collapse-item name="3" :title="i18nt('designer.advancedFieldTitle')">
|
|
38
|
+
<draggable tag="ul" :list="advancedFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
39
|
+
:move="checkFieldMove"
|
|
40
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
41
|
+
<li v-for="(fld, index) in advancedFields" :key="index" class="field-widget-item"
|
|
42
|
+
:title="fld.displayName"
|
|
43
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
44
|
+
<span><widget-icon :icon="fld.icon"/>
|
|
45
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
46
|
+
</span>
|
|
47
|
+
</li>
|
|
48
|
+
</draggable>
|
|
49
|
+
</el-collapse-item>
|
|
50
|
+
|
|
51
|
+
<!-- -->
|
|
52
|
+
<el-collapse-item name="4" :title="i18nt('designer.customFieldTitle')">
|
|
53
|
+
<draggable tag="ul" :list="customFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
54
|
+
:move="checkFieldMove"
|
|
55
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
56
|
+
<li v-for="(fld, index) in customFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
57
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
58
|
+
<span>
|
|
59
|
+
<widget-icon :icon="fld.icon"/>
|
|
60
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
61
|
+
</span>
|
|
62
|
+
</li>
|
|
63
|
+
</draggable>
|
|
64
|
+
</el-collapse-item>
|
|
65
|
+
<!-- -->
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</el-collapse>
|
|
69
|
+
|
|
70
|
+
</el-tab-pane>
|
|
71
|
+
<el-tab-pane v-if="showMetadataLib" name="metadataLib">
|
|
72
|
+
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('designer.metadataLib') }}</span>
|
|
73
|
+
|
|
74
|
+
<el-collapse v-model="metadataActiveNames" class="widget-collapse">
|
|
75
|
+
<el-collapse-item name="0" :title="i18nt('designer.containerTitle')">
|
|
76
|
+
<draggable tag="ul" :list="commonContainers" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
77
|
+
:clone="handleContainerWidgetClone" ghost-class="ghost" :sort="false"
|
|
78
|
+
:move="checkContainerMove" @end="onContainerDragEnd">
|
|
79
|
+
<li v-for="(ctn, index) in commonContainers" :key="index" class="container-widget-item"
|
|
80
|
+
:title="ctn.displayName"
|
|
81
|
+
@dblclick="addContainerByDbClick(ctn)">
|
|
82
|
+
<span><widget-icon :icon="ctn.icon"/>
|
|
83
|
+
<span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
|
|
84
|
+
</span>
|
|
85
|
+
</li>
|
|
86
|
+
</draggable>
|
|
87
|
+
</el-collapse-item>
|
|
88
|
+
<el-collapse-item name="2" :title="i18nt('designer.basicFieldTitle')">
|
|
89
|
+
<draggable tag="ul" :list="basicFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
90
|
+
:move="checkFieldMove"
|
|
91
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
92
|
+
<li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
|
|
93
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
94
|
+
<span><widget-icon :icon="fld.icon"/><span>{{
|
|
95
|
+
i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
|
|
96
|
+
}}</span></span>
|
|
97
|
+
</li>
|
|
98
|
+
</draggable>
|
|
99
|
+
</el-collapse-item>
|
|
100
|
+
<el-collapse-item name="3" :title="i18nt('designer.advancedFieldTitle')">
|
|
101
|
+
<draggable tag="ul" :list="commonAdvancedFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
102
|
+
:move="checkFieldMove"
|
|
103
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
104
|
+
<li v-for="(fld, index) in commonAdvancedFields" :key="index" class="field-widget-item"
|
|
105
|
+
:title="fld.displayName"
|
|
106
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
107
|
+
<span><widget-icon :icon="fld.icon"/>
|
|
108
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
109
|
+
</span>
|
|
110
|
+
</li>
|
|
111
|
+
</draggable>
|
|
112
|
+
</el-collapse-item>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<el-collapse-item v-if="!!metaFields.main.entityName" name="1" :title="metaFields.main.entityLabel">
|
|
117
|
+
<draggable tag="ul" :list="metaFields.main.fieldList"
|
|
118
|
+
:group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
119
|
+
:move="checkFieldMove"
|
|
120
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
121
|
+
<li v-for="(fld, index) in metaFields.main.fieldList" :key="index" class="field-widget-item"
|
|
122
|
+
:title="fld.displayName"
|
|
123
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
124
|
+
<span><widget-icon :icon="fld.icon"/><span>{{ getMetaFieldLabel(fld) }}</span></span>
|
|
125
|
+
</li>
|
|
126
|
+
</draggable>
|
|
127
|
+
</el-collapse-item>
|
|
128
|
+
|
|
129
|
+
<template v-if="metaFields.detail && metaFields.detail.length >0">
|
|
130
|
+
<el-collapse-item v-for="(item,index0) in metaFields.detail" :key="index0" :name="index0+'2'"
|
|
131
|
+
:title="item.entityLabel">
|
|
132
|
+
<draggable tag="ul" :list="item.fieldList" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
133
|
+
:move="checkFieldMove"
|
|
134
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
135
|
+
<li v-for="(fld, index) in item.fieldList" :key="index" class="field-widget-item"
|
|
136
|
+
:title="fld.displayName"
|
|
137
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
138
|
+
<span><widget-icon :icon="fld.icon"/>
|
|
139
|
+
<span>{{ getMetaFieldLabel(fld) }}</span>
|
|
140
|
+
</span>
|
|
141
|
+
</li>
|
|
142
|
+
</draggable>
|
|
143
|
+
</el-collapse-item>
|
|
144
|
+
</template>
|
|
145
|
+
</el-collapse>
|
|
146
|
+
</el-tab-pane>
|
|
147
|
+
<el-tab-pane name="businessLib">
|
|
148
|
+
<span slot="label"><i class="el-icon-set-up"></i> {{ i18nt('业务组件') }}</span>
|
|
149
|
+
<el-collapse v-model="businessActiveNames" class="widget-collapse">
|
|
150
|
+
<el-collapse-item name="0" :title="i18nt('业务组件')">
|
|
151
|
+
<draggable tag="ul" :list="businessFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
152
|
+
:move="checkFieldMove"
|
|
153
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
154
|
+
<li v-for="(fld, index) in businessFields" :key="index" class="field-widget-item"
|
|
155
|
+
:title="fld.displayName"
|
|
156
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
157
|
+
<span><widget-icon :icon="fld.icon"/>
|
|
158
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
159
|
+
</span>
|
|
160
|
+
</li>
|
|
161
|
+
</draggable>
|
|
162
|
+
</el-collapse-item>
|
|
163
|
+
<el-collapse-item name="compare" :title="i18nt('对比组件')">
|
|
164
|
+
<draggable tag="ul" :list="compareFields" :group="{name: 'dragGroup', pull: 'clone', put: false}"
|
|
165
|
+
:move="checkFieldMove"
|
|
166
|
+
:clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
|
|
167
|
+
<li v-for="(fld, index) in compareFields" :key="index" class="field-widget-item"
|
|
168
|
+
:title="fld.displayName"
|
|
169
|
+
@dblclick="addFieldByDbClick(fld)">
|
|
170
|
+
<span><widget-icon :icon="fld.icon"/>
|
|
171
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
|
172
|
+
</span>
|
|
173
|
+
</li>
|
|
174
|
+
</draggable>
|
|
175
|
+
</el-collapse-item>
|
|
176
|
+
</el-collapse>
|
|
177
|
+
</el-tab-pane>
|
|
178
|
+
<!-- <el-tab-pane v-if="showFormTemplates" name="formLib" style="padding: 8px">
|
|
179
|
+
<span slot="label"><i class="el-icon-c-scale-to-original"></i> {{i18nt('designer.formLib')}}</span>
|
|
180
|
+
|
|
181
|
+
<template v-for="(ft, idx) in formTemplates">
|
|
182
|
+
<el-card :key="idx" :bord-style="{ padding: '0' }" shadow="hover" class="ft-card">
|
|
183
|
+
<el-popover placement="right" trigger="hover">
|
|
184
|
+
<img slot="reference" :src="ft.imgUrl" style="width: 200px">
|
|
185
|
+
<img :src="ft.imgUrl" style="height: 600px;width: 720px">
|
|
186
|
+
</el-popover>
|
|
187
|
+
<div class="bottom clear-fix">
|
|
188
|
+
<span class="ft-title">#{{idx+1}} {{ft.title}}</span>
|
|
189
|
+
<el-button type="text" class="right-button" @click="loadFormTemplate(ft.jsonUrl)">
|
|
190
|
+
{{i18nt('designer.hint.loadFormTemplate')}}</el-button>
|
|
191
|
+
</div>
|
|
192
|
+
</el-card>
|
|
193
|
+
</template>
|
|
194
|
+
</el-tab-pane>-->
|
|
195
|
+
|
|
196
|
+
</el-tabs>
|
|
197
|
+
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<script>
|
|
203
|
+
import Draggable from 'vuedraggable'
|
|
204
|
+
import indexMixin from './indexMixin.js';
|
|
205
|
+
import { compareFields } from './widgetsConfig';
|
|
206
|
+
|
|
207
|
+
export default {
|
|
208
|
+
name: "FieldPanel",
|
|
209
|
+
mixins: [indexMixin],
|
|
210
|
+
components: {
|
|
211
|
+
Draggable,
|
|
212
|
+
/* 面板组件图标:el-icon- 前缀渲染 element 字体图标,否则渲染 svg-icon */
|
|
213
|
+
WidgetIcon: {
|
|
214
|
+
name: "WidgetIcon",
|
|
215
|
+
functional: true,
|
|
216
|
+
props: { icon: String },
|
|
217
|
+
render(h, ctx) {
|
|
218
|
+
const icon = ctx.props.icon || "";
|
|
219
|
+
if (icon.indexOf("el-icon-") === 0) {
|
|
220
|
+
return h("i", { class: [icon, "color-svg-icon", "panel-el-icon"] });
|
|
221
|
+
}
|
|
222
|
+
return h("svg-icon", {
|
|
223
|
+
props: { iconClass: icon, className: "color-svg-icon" },
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
data() {
|
|
229
|
+
return {
|
|
230
|
+
compareFields,
|
|
231
|
+
};
|
|
232
|
+
},
|
|
233
|
+
created() {
|
|
234
|
+
// 让「对比组件」分组默认展开
|
|
235
|
+
if (Array.isArray(this.businessActiveNames)) {
|
|
236
|
+
if (this.businessActiveNames.indexOf("compare") === -1) {
|
|
237
|
+
this.businessActiveNames.push("compare");
|
|
238
|
+
}
|
|
239
|
+
} else if (this.businessActiveNames !== "compare") {
|
|
240
|
+
this.businessActiveNames = [this.businessActiveNames, "compare"];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
</script>
|
|
245
|
+
|
|
246
|
+
<style lang="scss" scoped>
|
|
247
|
+
|
|
248
|
+
.color-svg-icon {
|
|
249
|
+
color: $--color-primary;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.side-scroll-bar {
|
|
253
|
+
::v-deep .el-scrollbar__wrap {
|
|
254
|
+
overflow-x: hidden;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// div.panel-container {
|
|
259
|
+
// padding-bottom: 10px;
|
|
260
|
+
// }
|
|
261
|
+
|
|
262
|
+
.no-bottom-margin ::v-deep .el-tabs__header {
|
|
263
|
+
margin-bottom: 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.indent-left-margin {
|
|
267
|
+
::v-deep .el-tabs__nav {
|
|
268
|
+
margin-left: 20px;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.el-collapse-item ::v-deep ul > li {
|
|
273
|
+
list-style: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.widget-collapse {
|
|
277
|
+
border-top-width: 0;
|
|
278
|
+
|
|
279
|
+
::v-deep .el-collapse-item__header {
|
|
280
|
+
margin-left: 8px;
|
|
281
|
+
font-weight: bold;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
::v-deep .el-collapse-item__content {
|
|
285
|
+
padding-bottom: 6px;
|
|
286
|
+
|
|
287
|
+
ul {
|
|
288
|
+
padding-left: 10px; /* 重置IE11默认样式 */
|
|
289
|
+
margin: 0; /* 重置IE11默认样式 */
|
|
290
|
+
margin-block-start: 0;
|
|
291
|
+
margin-block-end: 0.25em;
|
|
292
|
+
padding-inline-start: 10px;
|
|
293
|
+
|
|
294
|
+
&:after {
|
|
295
|
+
content: "";
|
|
296
|
+
display: block;
|
|
297
|
+
clear: both;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.container-widget-item, .field-widget-item {
|
|
301
|
+
display: inline-block;
|
|
302
|
+
height: 35px;
|
|
303
|
+
line-height: 35px;
|
|
304
|
+
width: calc(50% - 7px);
|
|
305
|
+
float: left;
|
|
306
|
+
margin: 2px 6px 3px 0;
|
|
307
|
+
cursor: move;
|
|
308
|
+
white-space: nowrap;
|
|
309
|
+
text-overflow: ellipsis;
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
background: #f1f2f3;
|
|
312
|
+
font-size: 12px;
|
|
313
|
+
padding-left: 12px;
|
|
314
|
+
|
|
315
|
+
svg {
|
|
316
|
+
display: inline-block;
|
|
317
|
+
//margin: 10px auto 0;
|
|
318
|
+
width: 1.25em;
|
|
319
|
+
height: 1.25em;
|
|
320
|
+
vertical-align: middle;
|
|
321
|
+
margin-right: 5px;
|
|
322
|
+
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
i.panel-el-icon {
|
|
326
|
+
display: inline-block;
|
|
327
|
+
font-size: 1.25em;
|
|
328
|
+
vertical-align: middle;
|
|
329
|
+
margin-right: 5px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
span > span {
|
|
333
|
+
vertical-align: middle;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.container-widget-item:hover, .field-widget-item:hover {
|
|
338
|
+
background: #EBEEF5;
|
|
339
|
+
outline: 1px solid $--color-primary;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.drag-handler {
|
|
343
|
+
position: absolute;
|
|
344
|
+
top: 0;
|
|
345
|
+
left: 160px;
|
|
346
|
+
background-color: #dddddd;
|
|
347
|
+
border-radius: 5px;
|
|
348
|
+
padding-right: 5px;
|
|
349
|
+
font-size: 11px;
|
|
350
|
+
color: #666666;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.el-card.ft-card {
|
|
357
|
+
border: 1px solid #8896B3;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.ft-card {
|
|
361
|
+
margin-bottom: 10px;
|
|
362
|
+
|
|
363
|
+
.bottom {
|
|
364
|
+
margin-top: 10px;
|
|
365
|
+
line-height: 12px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ft-title {
|
|
369
|
+
font-size: 13px;
|
|
370
|
+
font-weight: bold;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.right-button {
|
|
374
|
+
padding: 0;
|
|
375
|
+
float: right;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.clear-fix:before, .clear-fix:after {
|
|
379
|
+
display: table;
|
|
380
|
+
content: "";
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.clear-fix:after {
|
|
384
|
+
clear: both;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
</style>
|