cloud-web-corejs 1.0.54-dev.190 → 1.0.54-dev.192
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 +1 -1
- package/src/components/xform/form-designer/designer.js +1528 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +3 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +3 -2
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +8 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +16 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +47 -28
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +3 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +16 -0
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +12 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +203 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +6 -0
- package/src/components/xform/lang/zh-CN.js +8 -1
- package/src/components/xform/mixins/scriptHttp.js +162 -1
- package/src/mixins/tableTree/index.js +1 -192
- package/src/views/bd/setting/menu_kind/mixins/list.js +1 -197
@@ -157,6 +157,9 @@ export default {
|
|
157
157
|
|
158
158
|
this.selectMulti = this.option.multiple ?? true;
|
159
159
|
this.dataTableOption.config.checkboxConfig.showHeader = this.selectMulti;
|
160
|
+
if(this.option.queryParam){
|
161
|
+
this.dataTableOption.queryParam = this.option.queryParam;
|
162
|
+
}
|
160
163
|
this.getReportTemplate();
|
161
164
|
},
|
162
165
|
methods: {
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<template>
|
2
|
+
<span>{{ getI18nLabel(field.options.label) }}</span>
|
3
|
+
</template>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
7
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
8
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "dropdown-item-widget",
|
12
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
13
|
+
mixins: [emitter, fieldMixin, i18n],
|
14
|
+
props: {
|
15
|
+
field: Object,
|
16
|
+
parentWidget: Object,
|
17
|
+
parentList: Array,
|
18
|
+
indexOfParentList: Number,
|
19
|
+
designer: Object,
|
20
|
+
|
21
|
+
designState: {
|
22
|
+
type: Boolean,
|
23
|
+
default: false
|
24
|
+
},
|
25
|
+
|
26
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
27
|
+
type: Number,
|
28
|
+
default: -1
|
29
|
+
},
|
30
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
31
|
+
type: Number,
|
32
|
+
default: -1
|
33
|
+
},
|
34
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
35
|
+
type: String,
|
36
|
+
default: ''
|
37
|
+
},
|
38
|
+
|
39
|
+
},
|
40
|
+
components: {
|
41
|
+
|
42
|
+
},
|
43
|
+
computed: {
|
44
|
+
|
45
|
+
},
|
46
|
+
beforeCreate() {
|
47
|
+
/* 这里不能访问方法和属性!! */
|
48
|
+
},
|
49
|
+
|
50
|
+
created() {
|
51
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
52
|
+
需要在父组件created中初始化!! */
|
53
|
+
this.registerToRefList()
|
54
|
+
this.initEventHandler()
|
55
|
+
|
56
|
+
this.handleOnCreated()
|
57
|
+
},
|
58
|
+
|
59
|
+
mounted() {
|
60
|
+
this.handleOnMounted()
|
61
|
+
},
|
62
|
+
|
63
|
+
beforeDestroy() {
|
64
|
+
this.unregisterFromRefList()
|
65
|
+
},
|
66
|
+
|
67
|
+
methods: {
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
}
|
72
|
+
</script>
|
73
|
+
|
74
|
+
<style lang="scss" scoped>
|
75
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
76
|
+
|
77
|
+
</style>
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper :designer="designer" :field="field" :design-state="designState"
|
3
|
+
:display-style="field.options.displayStyle"
|
4
|
+
:parent-widget="parentWidget" :parent-list="parentList"
|
5
|
+
:index-of-parent-list="indexOfParentList"
|
6
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
7
|
+
:sub-form-row-id="subFormRowId">
|
8
|
+
<el-dropdown trigger="hover">
|
9
|
+
|
10
|
+
<el-button type="primary" class="button-sty" size="mini">
|
11
|
+
<span>{{ getI18nLabel(field.options.label) }}</span><span class="line"></span> <i
|
12
|
+
class="el-icon-arrow-down el-icon--right"></i>
|
13
|
+
</el-button>
|
14
|
+
<el-dropdown-menu slot="dropdown">
|
15
|
+
<template v-for="(subWidget,index) in field.widgetList">
|
16
|
+
<el-dropdown-item v-if="!subWidget.options.hidden" :key="index" :icon="subWidget.options.icon"
|
17
|
+
@click.native="handleSubButtonWidgetClick(index)">
|
18
|
+
<!-- {{ getI18nLabel(subWidget.options.label) }}-->
|
19
|
+
<dropdownItemWidget :field="subWidget" :parent-list="field.widgetList"
|
20
|
+
:index-of-parent-list="index" :parent-widget="field" :tableParam="tableParam"
|
21
|
+
:formItemProp="formItemProp" :ref="'item'+index">
|
22
|
+
</dropdownItemWidget>
|
23
|
+
</el-dropdown-item>
|
24
|
+
|
25
|
+
</template>
|
26
|
+
</el-dropdown-menu>
|
27
|
+
</el-dropdown>
|
28
|
+
</static-content-wrapper>
|
29
|
+
</template>
|
30
|
+
|
31
|
+
<script>
|
32
|
+
import StaticContentWrapper from './static-content-wrapper'
|
33
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
34
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
35
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
36
|
+
import dropdownItemWidget from '../../../../../components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue';
|
37
|
+
|
38
|
+
export default {
|
39
|
+
name: "dropdown-menu-widget",
|
40
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
41
|
+
mixins: [emitter, fieldMixin, i18n],
|
42
|
+
props: {
|
43
|
+
field: Object,
|
44
|
+
parentWidget: Object,
|
45
|
+
parentList: Array,
|
46
|
+
indexOfParentList: Number,
|
47
|
+
designer: Object,
|
48
|
+
|
49
|
+
designState: {
|
50
|
+
type: Boolean,
|
51
|
+
default: false
|
52
|
+
},
|
53
|
+
|
54
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
55
|
+
type: Number,
|
56
|
+
default: -1
|
57
|
+
},
|
58
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
59
|
+
type: Number,
|
60
|
+
default: -1
|
61
|
+
},
|
62
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
63
|
+
type: String,
|
64
|
+
default: ''
|
65
|
+
},
|
66
|
+
|
67
|
+
},
|
68
|
+
components: {
|
69
|
+
StaticContentWrapper,
|
70
|
+
dropdownItemWidget
|
71
|
+
},
|
72
|
+
computed: {},
|
73
|
+
beforeCreate() {
|
74
|
+
/* 这里不能访问方法和属性!! */
|
75
|
+
},
|
76
|
+
|
77
|
+
created() {
|
78
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
79
|
+
需要在父组件created中初始化!! */
|
80
|
+
this.registerToRefList()
|
81
|
+
this.initEventHandler()
|
82
|
+
|
83
|
+
this.handleOnCreated()
|
84
|
+
},
|
85
|
+
|
86
|
+
mounted() {
|
87
|
+
this.handleOnMounted()
|
88
|
+
},
|
89
|
+
|
90
|
+
beforeDestroy() {
|
91
|
+
this.unregisterFromRefList()
|
92
|
+
},
|
93
|
+
|
94
|
+
methods: {
|
95
|
+
handleSubButtonWidgetClick(index) {
|
96
|
+
this.$refs["item"+index].handleButtonWidgetClick()
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
}
|
101
|
+
</script>
|
102
|
+
|
103
|
+
<style lang="scss" scoped>
|
104
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
105
|
+
|
106
|
+
</style>
|
@@ -908,9 +908,15 @@ modules = {
|
|
908
908
|
}
|
909
909
|
}
|
910
910
|
|
911
|
+
// dialogQueryParam.
|
912
|
+
let queryParam = null;
|
913
|
+
if(searchDialogConfig.dialogQueryParam){
|
914
|
+
queryParam = this.handleCustomEvent(searchDialogConfig.dialogQueryParam)
|
915
|
+
}
|
911
916
|
this.getFormRef().openSearchDialog({
|
912
917
|
formCode: formCode,
|
913
918
|
rows,
|
919
|
+
queryParam,
|
914
920
|
multiple: searchDialogConfig.multipleChoices || false,
|
915
921
|
confirm: (rows) => {
|
916
922
|
this.handleConfirmSearchDialog(rows, false, flag);
|
@@ -12,7 +12,8 @@
|
|
12
12
|
import emitter from '../../../../../components/xform/utils/emitter'
|
13
13
|
import i18n from "../../../../../components/xform/utils/i18n";
|
14
14
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
15
|
-
import FormItemWrapper
|
15
|
+
import FormItemWrapper
|
16
|
+
from "../../../../../components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue";
|
16
17
|
|
17
18
|
export default {
|
18
19
|
name: "status-widget",
|
@@ -104,7 +105,7 @@ export default {
|
|
104
105
|
let value = null;
|
105
106
|
let statusParam = this.field.options.statusParam;
|
106
107
|
if (statusParam.length) {
|
107
|
-
value = statusParam[0].value ?? 0
|
108
|
+
value = this.field.options.defaultValue ?? (statusParam[0].value ?? 0)
|
108
109
|
} else {
|
109
110
|
value = 0;
|
110
111
|
}
|
@@ -8,9 +8,14 @@
|
|
8
8
|
</el-radio-group>
|
9
9
|
</el-form-item>
|
10
10
|
|
11
|
-
|
12
|
-
<el-
|
13
|
-
|
11
|
+
<el-form-item label="默认值">
|
12
|
+
<el-input v-model="optionModel.defaultValue" size="mini" style="width: 100px" v-if="!optionModel.optionItemValueType"></el-input>
|
13
|
+
<base-input-number v-model="optionModel.defaultValue" size="mini" style="width: 100px" v-if="optionModel.optionItemValueType==1" />
|
14
|
+
<el-select v-model="optionModel.defaultValue" style="width: 100px" v-if="optionModel.optionItemValueType===2" clearable @clear="optionModel.defaultValue=null">
|
15
|
+
<el-option :value="true" label="true"></el-option>
|
16
|
+
<el-option :value="false" label="false"></el-option>
|
17
|
+
</el-select>
|
18
|
+
</el-form-item>
|
14
19
|
<el-radio-group
|
15
20
|
v-if="selectedWidget.type === 'radio' || (selectedWidget.type === 'select' && !selectedWidget.options.multiple)"
|
16
21
|
v-model="optionModel.defaultValue"
|
@@ -501,6 +501,27 @@ import i18n from "../../../../../../components/xform/utils/i18n";
|
|
501
501
|
import Sortable from "sortablejs";
|
502
502
|
import {generateId} from "../../../../../../components/xform/utils/util";
|
503
503
|
import columnRenderDialog from "./columnRenderDialog.vue"
|
504
|
+
import {businessFields} from "@/components/xform/form-designer/widget-panel/widgetsConfig";
|
505
|
+
|
506
|
+
let businessOptions = [
|
507
|
+
{
|
508
|
+
value: "_createBy",
|
509
|
+
label: "创建人",
|
510
|
+
},
|
511
|
+
{
|
512
|
+
value: "_modifyBy",
|
513
|
+
label: "更新人",
|
514
|
+
},
|
515
|
+
{
|
516
|
+
value: "create_date",
|
517
|
+
label: "创建时间",
|
518
|
+
},
|
519
|
+
{
|
520
|
+
value: "modify_date",
|
521
|
+
label: "更新时间",
|
522
|
+
},
|
523
|
+
];
|
524
|
+
let userFields = ["_createBy","_modifyBy","create_date","modify_date"]
|
504
525
|
|
505
526
|
export default {
|
506
527
|
mixins: [i18n],
|
@@ -512,6 +533,7 @@ export default {
|
|
512
533
|
components: {columnRenderDialog},
|
513
534
|
inject: ["openWidgetPropertyDialog"],
|
514
535
|
data() {
|
536
|
+
|
515
537
|
return {
|
516
538
|
pictLoading: true,
|
517
539
|
tableColumnConfigTitle: null,
|
@@ -534,6 +556,8 @@ export default {
|
|
534
556
|
label: "right",
|
535
557
|
},
|
536
558
|
],
|
559
|
+
businessOptions,
|
560
|
+
userFields,
|
537
561
|
op: [
|
538
562
|
{
|
539
563
|
label: "edit Format",
|
@@ -633,6 +657,11 @@ export default {
|
|
633
657
|
},
|
634
658
|
],
|
635
659
|
},
|
660
|
+
|
661
|
+
{
|
662
|
+
label: "业务模块",
|
663
|
+
options: businessOptions
|
664
|
+
},
|
636
665
|
{
|
637
666
|
label: "Date Format",
|
638
667
|
options: [
|
@@ -1151,6 +1180,15 @@ export default {
|
|
1151
1180
|
if (!row.width || row.width == 47) row.width = 150;
|
1152
1181
|
if (!row.prop) row.prop = tmpId;
|
1153
1182
|
if (!row.label) row.label = tmpId;
|
1183
|
+
|
1184
|
+
if(this.userFields.includes(row.formatS)){
|
1185
|
+
let item = this.businessOptions.find(item=>item.value==row.formatS);
|
1186
|
+
if(item){
|
1187
|
+
row.prop = item.value;
|
1188
|
+
row.label = item.label;
|
1189
|
+
}
|
1190
|
+
}
|
1191
|
+
|
1154
1192
|
row.sortable = true;
|
1155
1193
|
|
1156
1194
|
if (row.formatS == "editAttachment") {
|
@@ -9,6 +9,13 @@
|
|
9
9
|
<el-form-item label="弹框表单编码">
|
10
10
|
<el-input type="text" v-model="eventConfig.formCode"></el-input>
|
11
11
|
</el-form-item>
|
12
|
+
<el-form-item label="弹框参数">
|
13
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
14
|
+
@click="editEventHandler('confirmCallback', ['dataId', 'formCode','rows'], option2)">
|
15
|
+
<span>{{ eventConfig.dialogQueryParam }}</span>
|
16
|
+
<i class="el-icon-edit"></i>
|
17
|
+
</a>
|
18
|
+
</el-form-item>
|
12
19
|
<template v-if="selectedWidget.type == 'vabsearch'">
|
13
20
|
<el-form-item label="关联来源字段">
|
14
21
|
<el-input type="text" v-model="eventConfig.valueSourceField"></el-input>
|
@@ -157,6 +164,15 @@ export default {
|
|
157
164
|
this.eventConfig.confirmCallback = code;
|
158
165
|
this.$forceUpdate()
|
159
166
|
}
|
167
|
+
},
|
168
|
+
option2:{
|
169
|
+
customCode:()=>{
|
170
|
+
return this.eventConfig.dialogQueryParam;
|
171
|
+
},
|
172
|
+
callback:(code)=>{
|
173
|
+
this.eventConfig.dialogQueryParam = code;
|
174
|
+
this.$forceUpdate()
|
175
|
+
}
|
160
176
|
}
|
161
177
|
}
|
162
178
|
},
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
<script>
|
7
|
+
import i18n from "@base/components/xform/utils/i18n";
|
8
|
+
|
9
|
+
export default {
|
10
|
+
name: "dropdown-menu-editor",
|
11
|
+
mixins: [i18n],
|
12
|
+
props: {
|
13
|
+
designer: Object,
|
14
|
+
selectedWidget: Object,
|
15
|
+
optionModel: Object,
|
16
|
+
},
|
17
|
+
}
|
18
|
+
</script>
|
19
|
+
<style scoped>
|
20
|
+
|
21
|
+
</style>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item :label="i18nt('designer.setting.tabPaneSetting')"></el-form-item>
|
4
|
+
<el-form-item label-width="0" class="panes-setting">
|
5
|
+
<draggable tag="ul" :list="selectedWidget.widgetList"
|
6
|
+
v-bind="{group:'panesGroup', ghostClass: 'ghost', handle: '.drag-option'}" class="draggable-box">
|
7
|
+
<li v-for="(tpItem, tpIdx) in selectedWidget.widgetList" :key="tpIdx" class="col-item">
|
8
|
+
<el-input type="text" v-model="tpItem.options.label" style="width:calc(100% - 65px) !important;"></el-input>
|
9
|
+
<i class="el-icon-s-operation drag-option"></i>
|
10
|
+
<el-button circle plain size="mini" type="danger" @click="deleteTabPane(selectedWidget, tpIdx)"
|
11
|
+
icon="el-icon-minus" class="col-delete-button"></el-button>
|
12
|
+
</li>
|
13
|
+
<div>
|
14
|
+
<el-button type="text" @click="addTabPane(selectedWidget)" icon="el-icon-circle-plus-outline" class="add-option">{{i18nt('designer.setting.addTabPane')}}</el-button>
|
15
|
+
</div>
|
16
|
+
</draggable>
|
17
|
+
</el-form-item>
|
18
|
+
</div>
|
19
|
+
</template>
|
20
|
+
<script>
|
21
|
+
import i18n from "@base/components/xform/utils/i18n";
|
22
|
+
import Draggable from 'vuedraggable'
|
23
|
+
import {deepClone} from "../../../../../../components/xform/utils/util";
|
24
|
+
|
25
|
+
export default {
|
26
|
+
name: "dropdown-menu-editor",
|
27
|
+
components: {Draggable},
|
28
|
+
mixins: [i18n],
|
29
|
+
props: {
|
30
|
+
designer: Object,
|
31
|
+
selectedWidget: Object,
|
32
|
+
optionModel: Object,
|
33
|
+
},
|
34
|
+
methods: {
|
35
|
+
onTabPaneActiveChange(evt, tpItem) {
|
36
|
+
//TODO: !!!
|
37
|
+
},
|
38
|
+
|
39
|
+
addTabPane(curTabs) {
|
40
|
+
this.designer.addDropdownItem(curTabs)
|
41
|
+
this.designer.emitHistoryChange()
|
42
|
+
},
|
43
|
+
|
44
|
+
deleteTabPane(curTabs, tpIdx) {
|
45
|
+
if (curTabs.widgetList.length === 1) {
|
46
|
+
this.$message.info(this.i18nt('designer.hint.lastPaneCannotBeDeleted'))
|
47
|
+
return
|
48
|
+
}
|
49
|
+
|
50
|
+
this.designer.deleteDropdownItem(curTabs, tpIdx)
|
51
|
+
this.designer.emitHistoryChange()
|
52
|
+
},
|
53
|
+
|
54
|
+
}
|
55
|
+
}
|
56
|
+
</script>
|
57
|
+
<style scoped>
|
58
|
+
|
59
|
+
</style>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div>
|
3
3
|
<el-form-item label="状态配置">
|
4
4
|
<a href="javascript:void(0);" class="a-link link-oneLind" @click="openDialog">
|
5
|
-
<span>{{ optionModel.statusParam.length?"已维护":"" }}</span>
|
5
|
+
<span>{{ optionModel.statusParam.length ? "已维护" : "" }}</span>
|
6
6
|
<i class="el-icon-edit"></i>
|
7
7
|
</a>
|
8
8
|
</el-form-item>
|
@@ -21,14 +21,24 @@
|
|
21
21
|
@closed="closeHandle"
|
22
22
|
>
|
23
23
|
<div class="cont">
|
24
|
-
<el-form-item label="选项值类型">
|
25
|
-
<!-- <el-switch v-model="optionItemValueType" @change="changeValueType"></el-switch>-->
|
24
|
+
<el-form-item label="选项值类型" style="width: 350px;">
|
25
|
+
<!-- <el-switch v-model="optionItemValueType" @change="changeValueType"></el-switch>-->
|
26
26
|
<el-radio-group v-model="optionItemValueType" @change="changeValueType">
|
27
27
|
<el-radio :label="0">文本</el-radio>
|
28
28
|
<el-radio :label="1">数值</el-radio>
|
29
29
|
<el-radio :label="2">布尔值</el-radio>
|
30
30
|
</el-radio-group>
|
31
31
|
</el-form-item>
|
32
|
+
<el-form-item label="默认值" style="width: 300px;">
|
33
|
+
<el-input v-model="defaultValue" v-if="!optionItemValueType"></el-input>
|
34
|
+
<base-input-number v-model="defaultValue" ref="defaultNumberInput"
|
35
|
+
v-if="optionItemValueType==1"/>
|
36
|
+
<el-select v-model="defaultValue" v-if="optionItemValueType===2" clearable
|
37
|
+
@clear="defaultValue=null">
|
38
|
+
<el-option :value="true" label="true"></el-option>
|
39
|
+
<el-option :value="false" label="false"></el-option>
|
40
|
+
</el-select>
|
41
|
+
</el-form-item>
|
32
42
|
<el-table
|
33
43
|
ref="singleTable"
|
34
44
|
width="100%"
|
@@ -55,8 +65,8 @@
|
|
55
65
|
<el-table-column label="字段值" width="150" prop="value">
|
56
66
|
<template slot-scope="scope">
|
57
67
|
<el-input v-model="scope.row.value" v-if="optionItemValueType===0"></el-input>
|
58
|
-
<base-input-number v-model="scope.row.value"
|
59
|
-
<template v-if="optionItemValueType===2">{{scope.row.value}}</template>
|
68
|
+
<base-input-number v-model="scope.row.value" v-if="optionItemValueType===1"></base-input-number>
|
69
|
+
<template v-if="optionItemValueType===2">{{ scope.row.value }}</template>
|
60
70
|
</template>
|
61
71
|
</el-table-column>
|
62
72
|
<el-table-column label="状态颜色" width="100" prop="type">
|
@@ -128,14 +138,15 @@ export default {
|
|
128
138
|
selectedWidget: Object,
|
129
139
|
optionModel: Object,
|
130
140
|
},
|
131
|
-
data(){
|
141
|
+
data() {
|
132
142
|
return {
|
133
|
-
showDialog:false,
|
134
|
-
tableData:[],
|
135
|
-
optionItemValueType:0
|
143
|
+
showDialog: false,
|
144
|
+
tableData: [],
|
145
|
+
optionItemValueType: 0,
|
146
|
+
defaultValue: null
|
136
147
|
}
|
137
148
|
},
|
138
|
-
methods:{
|
149
|
+
methods: {
|
139
150
|
dragSort: function () {
|
140
151
|
var e = this.$refs.singleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0],
|
141
152
|
t = this.tableData;
|
@@ -150,51 +161,59 @@ export default {
|
|
150
161
|
}
|
151
162
|
});
|
152
163
|
},
|
153
|
-
closeHandle(){
|
164
|
+
closeHandle() {
|
154
165
|
this.showDialog = false;
|
155
166
|
},
|
156
|
-
openDialog(){
|
167
|
+
openDialog() {
|
157
168
|
this.optionItemValueType = this.optionModel.optionItemValueType
|
169
|
+
this.defaultValue = this.optionModel.defaultValue == null ? undefined : null
|
158
170
|
this.tableData = this.$baseLodash.cloneDeep(this.optionModel.statusParam);
|
159
171
|
this.showDialog = true;
|
160
172
|
this.$nextTick(function () {
|
161
173
|
this.dragSort();
|
162
174
|
});
|
163
175
|
},
|
164
|
-
addItem(){
|
176
|
+
addItem() {
|
165
177
|
this.tableData.push({
|
166
|
-
value:null,
|
167
|
-
label:null,
|
168
|
-
type:null
|
178
|
+
value: null,
|
179
|
+
label: null,
|
180
|
+
type: null
|
169
181
|
})
|
170
182
|
},
|
171
|
-
confirmDialog(){
|
183
|
+
confirmDialog() {
|
172
184
|
this.optionModel.optionItemValueType = this.optionItemValueType;
|
185
|
+
this.optionModel.defaultValue = (this.defaultValue === "" || this.defaultValue === undefined) ? null : this.defaultValue;
|
173
186
|
this.optionModel.statusParam = this.$baseLodash.cloneDeep(this.tableData);
|
174
187
|
this.showDialog = false;
|
175
|
-
this.$nextTick(()=>{
|
188
|
+
this.$nextTick(() => {
|
176
189
|
let fieldWidget = this.designer.formWidget.getWidgetRef(this.optionModel.name);
|
177
190
|
fieldWidget.refreshWidget();
|
178
191
|
})
|
179
192
|
|
180
193
|
},
|
181
|
-
deleteItem(rowIndex){
|
182
|
-
this.tableData.splice(rowIndex,1);
|
194
|
+
deleteItem(rowIndex) {
|
195
|
+
this.tableData.splice(rowIndex, 1);
|
183
196
|
},
|
184
|
-
changeValueType(val){
|
197
|
+
changeValueType(val) {
|
185
198
|
this.tableData = [];
|
186
|
-
if(val==2){
|
199
|
+
if (val == 2) {
|
187
200
|
this.tableData.push({
|
188
|
-
label:"是",
|
189
|
-
value:true,
|
190
|
-
type:"success"
|
201
|
+
label: "是",
|
202
|
+
value: true,
|
203
|
+
type: "success"
|
191
204
|
});
|
192
205
|
this.tableData.push({
|
193
|
-
label:"否",
|
194
|
-
value:false,
|
195
|
-
type:"danger"
|
206
|
+
label: "否",
|
207
|
+
value: false,
|
208
|
+
type: "danger"
|
196
209
|
});
|
197
210
|
}
|
211
|
+
if (val == 1) {
|
212
|
+
this.defaultValue = undefined
|
213
|
+
} else {
|
214
|
+
this.defaultValue = null
|
215
|
+
}
|
216
|
+
|
198
217
|
}
|
199
218
|
}
|
200
219
|
}
|
@@ -111,6 +111,9 @@ const COMMON_PROPERTIES = {
|
|
111
111
|
'showRuleFlag': 'showRuleFlag-editor',
|
112
112
|
'widgetShowRuleFlag': 'widgetShowRuleFlag-editor',
|
113
113
|
|
114
|
+
'dropdownMenuFlag': 'dropdown-menu-editor',
|
115
|
+
'dropdownItemFlag': 'dropdown-item-editor',
|
116
|
+
|
114
117
|
//弹框
|
115
118
|
title: "title-editor",
|
116
119
|
width: "width-editor",
|
@@ -65,6 +65,8 @@
|
|
65
65
|
</el-collapse-item>
|
66
66
|
<!-- -->
|
67
67
|
|
68
|
+
|
69
|
+
|
68
70
|
</el-collapse>
|
69
71
|
|
70
72
|
</el-tab-pane>
|
@@ -112,6 +114,20 @@
|
|
112
114
|
</draggable>
|
113
115
|
</el-collapse-item>
|
114
116
|
|
117
|
+
<el-collapse-item name="5" :title="i18nt('业务组件')">
|
118
|
+
<draggable tag="ul" :list="businessFields" :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 businessFields" :key="index" class="field-widget-item"
|
122
|
+
:title="fld.displayName"
|
123
|
+
@dblclick="addFieldByDbClick(fld)">
|
124
|
+
<span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
|
125
|
+
<span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
|
126
|
+
</span>
|
127
|
+
</li>
|
128
|
+
</draggable>
|
129
|
+
</el-collapse-item>
|
130
|
+
|
115
131
|
<el-collapse-item v-if="!!metaFields.main.entityName" name="1" :title="metaFields.main.entityLabel">
|
116
132
|
<draggable tag="ul" :list="metaFields.main.fieldList"
|
117
133
|
:group="{name: 'dragGroup', pull: 'clone', put: false}"
|
@@ -4,7 +4,8 @@ import {
|
|
4
4
|
containers,
|
5
5
|
basicFields,
|
6
6
|
advancedFields,
|
7
|
-
customFields
|
7
|
+
customFields,
|
8
|
+
businessFields
|
8
9
|
} from "./widgetsConfig"
|
9
10
|
import {
|
10
11
|
formTemplates
|
@@ -43,6 +44,7 @@ modules = {
|
|
43
44
|
basicFields: baseRefUtil.basicFields,
|
44
45
|
advancedFields: baseRefUtil.advancedFields,
|
45
46
|
customFields: baseRefUtil.customFields,
|
47
|
+
businessFields:businessFields,
|
46
48
|
commonAdvancedFields: [],
|
47
49
|
chartContainers: [],
|
48
50
|
chartWidgets: [],
|
@@ -186,6 +188,15 @@ modules = {
|
|
186
188
|
return !this.isBanned(fld.type) && this.getIsShow(fld);
|
187
189
|
});
|
188
190
|
|
191
|
+
this.businessFields = this.businessFields.map(fld => {
|
192
|
+
return {
|
193
|
+
...fld,
|
194
|
+
displayName: this.i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
|
195
|
+
};
|
196
|
+
}).filter(fld => {
|
197
|
+
return !this.isBanned(fld.type) && this.getIsShow(fld);
|
198
|
+
});
|
199
|
+
|
189
200
|
this.commonAdvancedFields = advancedFields.map(fld => {
|
190
201
|
return {
|
191
202
|
...fld,
|