cloud-web-corejs 1.0.54-dev.275 → 1.0.54-dev.277
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/excelExport/mixins.js +1 -1
- package/src/components/xform/form-designer/designer.js +1538 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +90 -0
- package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +32 -2
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2406 -1
- package/src/components/xform/form-render/indexMixin.js +2498 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/mixins/scriptHttp.js +172 -1
- package/src/router/modules/customer.js +40 -23
- package/src/views/user/form/vform/render.vue +5 -1
- package/src/views/user/form/view/list.vue +24 -4
@@ -13,12 +13,12 @@
|
|
13
13
|
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
14
14
|
<div class="detail-wrap grid-container" :key="widget.id"
|
15
15
|
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
16
|
-
<div class="d-header clearfix">
|
17
|
-
<div class="fl">
|
16
|
+
<div class="d-header clearfix" style="height: auto;">
|
17
|
+
<div class="fl" style="width: 20%;overflow: hidden;height: 40px;">
|
18
18
|
<i class="el-icon-info"/>
|
19
19
|
{{ widget.options.label }}
|
20
20
|
</div>
|
21
|
-
<div class="fr">
|
21
|
+
<div class="fr" style="overflow: auto;">
|
22
22
|
<div class="grid-cell">
|
23
23
|
<draggable
|
24
24
|
:list="widget.widgetList"
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper :designer="designer" :field="field" :design-state="designState" :display-style="field.options.displayStyle"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
5
|
+
<el-button class="button-sty" @click="clickHandle" icon="el-icon-document-copy" :disabled="!designState &&field.options.disabled">
|
6
|
+
{{ getI18nLabel(field.options.label)}}
|
7
|
+
</el-button>
|
8
|
+
</static-content-wrapper>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
import StaticContentWrapper from './static-content-wrapper'
|
13
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
14
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
15
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
16
|
+
|
17
|
+
export default {
|
18
|
+
name: "copy_button-widget",
|
19
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
20
|
+
mixins: [emitter, fieldMixin, i18n],
|
21
|
+
props: {
|
22
|
+
field: Object,
|
23
|
+
parentWidget: Object,
|
24
|
+
parentList: Array,
|
25
|
+
indexOfParentList: Number,
|
26
|
+
designer: Object,
|
27
|
+
|
28
|
+
designState: {
|
29
|
+
type: Boolean,
|
30
|
+
default: false
|
31
|
+
},
|
32
|
+
|
33
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
34
|
+
type: Number,
|
35
|
+
default: -1
|
36
|
+
},
|
37
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
38
|
+
type: Number,
|
39
|
+
default: -1
|
40
|
+
},
|
41
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
42
|
+
type: String,
|
43
|
+
default: ''
|
44
|
+
},
|
45
|
+
|
46
|
+
},
|
47
|
+
components: {
|
48
|
+
StaticContentWrapper,
|
49
|
+
},
|
50
|
+
computed: {
|
51
|
+
|
52
|
+
},
|
53
|
+
beforeCreate() {
|
54
|
+
/* 这里不能访问方法和属性!! */
|
55
|
+
},
|
56
|
+
|
57
|
+
created() {
|
58
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
59
|
+
需要在父组件created中初始化!! */
|
60
|
+
this.registerToRefList()
|
61
|
+
this.initEventHandler()
|
62
|
+
|
63
|
+
this.handleOnCreated()
|
64
|
+
},
|
65
|
+
|
66
|
+
mounted() {
|
67
|
+
this.handleOnMounted()
|
68
|
+
},
|
69
|
+
|
70
|
+
beforeDestroy() {
|
71
|
+
this.unregisterFromRefList()
|
72
|
+
},
|
73
|
+
|
74
|
+
methods: {
|
75
|
+
clickHandle(){
|
76
|
+
if(this.designState || this.field.options.disabled)return
|
77
|
+
let copyData = this.$baseLodash.cloneDeep(this.formModel);
|
78
|
+
|
79
|
+
this.handleCustomEvent(this.field.options.copyDataHandle, ["copyData"], [copyData])
|
80
|
+
this.getFormRef().openCopyEditTab(copyData);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
}
|
85
|
+
</script>
|
86
|
+
|
87
|
+
<style lang="scss" scoped>
|
88
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
89
|
+
|
90
|
+
</style>
|
package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
7
7
|
:sub-form-row-id="subFormRowId">
|
8
8
|
<el-button class="button-sty" @click="handleButtonWidgetClick" icon="el-icon-search" :disabled="!designState &&field.options.disabled">
|
9
|
-
{{ field.options.label
|
9
|
+
{{ getI18nLabel(field.options.label)}}
|
10
10
|
</el-button>
|
11
11
|
</static-content-wrapper>
|
12
12
|
</template>
|
package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item label="复制数据处理" label-width="150px">
|
4
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
5
|
+
@click="editEventHandler('copyDataHandle', copyDataHandleParams)">
|
6
|
+
<span>{{ optionModel.copyDataHandle }}</span>
|
7
|
+
<i class="el-icon-edit"></i>
|
8
|
+
</a>
|
9
|
+
</el-form-item>
|
10
|
+
</div>
|
11
|
+
</template>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
15
|
+
import eventMixin
|
16
|
+
from "../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
17
|
+
|
18
|
+
export default {
|
19
|
+
name: "copyButton-editor",
|
20
|
+
mixins: [i18n,eventMixin],
|
21
|
+
props: {
|
22
|
+
designer: Object,
|
23
|
+
selectedWidget: Object,
|
24
|
+
optionModel: Object,
|
25
|
+
},
|
26
|
+
data(){
|
27
|
+
return {
|
28
|
+
copyDataHandleParams: ["dataId", "formCode", "copyData"]
|
29
|
+
}
|
30
|
+
},
|
31
|
+
}
|
32
|
+
</script>
|
33
|
+
|
34
|
+
<style scoped>
|
35
|
+
|
36
|
+
</style>
|
@@ -80,6 +80,7 @@ const COMMON_PROPERTIES = {
|
|
80
80
|
'echarBarOption': 'echart-bar-editor', //柱状图
|
81
81
|
'echarCategoryOption': 'echart-category-editor', //折线图
|
82
82
|
'vabSearchName': 'vabSearchName-editor',
|
83
|
+
'copyButton': 'copyButton-editor',
|
83
84
|
|
84
85
|
//容器
|
85
86
|
'showBlankRow': 'showBlankRow-editor',
|
@@ -920,7 +920,7 @@ export const hiddenWidgetTypesOfWf = [
|
|
920
920
|
"import2-button",
|
921
921
|
"print-button",
|
922
922
|
];
|
923
|
-
export const freeWidgetTypesOfWf = ["reset_button", "a-link", "a-text"];
|
923
|
+
export const freeWidgetTypesOfWf = ["reset_button","copy_button", "a-link", "a-text"];
|
924
924
|
|
925
925
|
export const basicFields = [
|
926
926
|
{
|
@@ -3331,7 +3331,7 @@ export const advancedFields = [
|
|
3331
3331
|
tableData: {},
|
3332
3332
|
},
|
3333
3333
|
},
|
3334
|
-
}
|
3334
|
+
}
|
3335
3335
|
];
|
3336
3336
|
|
3337
3337
|
export const businessFields = [
|
@@ -3575,6 +3575,36 @@ export const businessFields = [
|
|
3575
3575
|
tabDeleteEnabled: true,
|
3576
3576
|
},
|
3577
3577
|
},
|
3578
|
+
{
|
3579
|
+
type: "copy_button",
|
3580
|
+
icon: "button",
|
3581
|
+
commonFlag: !0,
|
3582
|
+
columnFlag: true,
|
3583
|
+
formItemFlag: !1,
|
3584
|
+
options: {
|
3585
|
+
name: "",
|
3586
|
+
label: "复制",
|
3587
|
+
columnWidth: "200px",
|
3588
|
+
size: "",
|
3589
|
+
// displayStyle: "block",
|
3590
|
+
disabled: !1,
|
3591
|
+
hidden: !1,
|
3592
|
+
type: "primary",
|
3593
|
+
|
3594
|
+
customClass: "",
|
3595
|
+
onCreated: "",
|
3596
|
+
onMounted: "",
|
3597
|
+
copyButton: true,
|
3598
|
+
copyDataHandle: "",
|
3599
|
+
...defaultWfConfig,
|
3600
|
+
...defaultWidgetShowRuleConfig,
|
3601
|
+
hiddenByWf: true,
|
3602
|
+
|
3603
|
+
showRuleFlag: 1,
|
3604
|
+
showRuleEnabled: 1,
|
3605
|
+
showRules: [],
|
3606
|
+
},
|
3607
|
+
},
|
3578
3608
|
];
|
3579
3609
|
|
3580
3610
|
export const keyNamePrefixMap = {
|