cloud-web-corejs 1.0.54-dev.276 → 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/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +4 -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 +1 -0
- package/src/components/xform/form-render/indexMixin.js +21 -17
package/package.json
CHANGED
@@ -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"
|
@@ -74,7 +74,10 @@
|
|
74
74
|
methods: {
|
75
75
|
clickHandle(){
|
76
76
|
if(this.designState || this.field.options.disabled)return
|
77
|
-
this.
|
77
|
+
let copyData = this.$baseLodash.cloneDeep(this.formModel);
|
78
|
+
|
79
|
+
this.handleCustomEvent(this.field.options.copyDataHandle, ["copyData"], [copyData])
|
80
|
+
this.getFormRef().openCopyEditTab(copyData);
|
78
81
|
}
|
79
82
|
}
|
80
83
|
|
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',
|
@@ -2495,6 +2495,9 @@ modules = {
|
|
2495
2495
|
getFormRef(){
|
2496
2496
|
return this;
|
2497
2497
|
},
|
2498
|
+
isObject(value) {
|
2499
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
2500
|
+
},
|
2498
2501
|
openCopyEditTab(copyData){
|
2499
2502
|
let formData = this.$baseLodash.cloneDeep(copyData || this.formDataModel);
|
2500
2503
|
|
@@ -2505,24 +2508,25 @@ modules = {
|
|
2505
2508
|
handleData(item)
|
2506
2509
|
})
|
2507
2510
|
return
|
2511
|
+
}else if(this.isObject(data)){
|
2512
|
+
data.id = null;
|
2513
|
+
data.create_by = null;
|
2514
|
+
data.create_date = null;
|
2515
|
+
data.modify_by = null;
|
2516
|
+
data.modify_date = null;
|
2517
|
+
delete data.head_table_id;
|
2518
|
+
delete data.objectForeignId
|
2519
|
+
if(data.createBy)data.createBy
|
2520
|
+
if(data.createDate)data.createDate
|
2521
|
+
if(data.modifyBy)data.modifyBy
|
2522
|
+
if(data.modifyDate)data.modifyDate
|
2523
|
+
Object.keys(data).forEach((key)=>{
|
2524
|
+
let value = data[key]
|
2525
|
+
if(value && Array.isArray(value)){
|
2526
|
+
handleData(value);
|
2527
|
+
}
|
2528
|
+
})
|
2508
2529
|
}
|
2509
|
-
data.id = null;
|
2510
|
-
data.create_by = null;
|
2511
|
-
data.create_date = null;
|
2512
|
-
data.modify_by = null;
|
2513
|
-
data.modify_date = null;
|
2514
|
-
delete data.head_table_id;
|
2515
|
-
delete data.objectForeignId
|
2516
|
-
if(data.createBy)data.createBy
|
2517
|
-
if(data.createDate)data.createDate
|
2518
|
-
if(data.modifyBy)data.modifyBy
|
2519
|
-
if(data.modifyDate)data.modifyDate
|
2520
|
-
Object.keys(data).forEach((key)=>{
|
2521
|
-
let value = data[key]
|
2522
|
-
if(value && Array.isArray(value)){
|
2523
|
-
handleData(value);
|
2524
|
-
}
|
2525
|
-
})
|
2526
2530
|
}
|
2527
2531
|
if(formData){
|
2528
2532
|
handleData(formData)
|