cloud-web-corejs 1.0.54-dev.290 → 1.0.54-dev.292
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/table/util/index.js +4 -1
- package/src/components/tempStorage/index.vue +5 -4
- package/src/components/tempStorage/tempStorageDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +25 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2413 -1
- package/src/components/xform/form-render/indexMixin.js +1 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
package/package.json
CHANGED
@@ -21,6 +21,9 @@ function destroyTempSoltConstructorInstance() {
|
|
21
21
|
|
22
22
|
export function getCellValue(obj) {
|
23
23
|
let {column, $table} = obj;
|
24
|
+
if(column.title=="备注"){
|
25
|
+
debugger
|
26
|
+
}
|
24
27
|
let params = createParams(obj);
|
25
28
|
let h = $table.$createElement;
|
26
29
|
let that = $table.$xegrid.originOption.vue;
|
@@ -314,7 +317,7 @@ function domRender(dom) {
|
|
314
317
|
});
|
315
318
|
return arr.join("");
|
316
319
|
} else {
|
317
|
-
if (item.nodeName == "INPUT") {
|
320
|
+
if (item.nodeName == "INPUT" || item.nodeName == "TEXTAREA") {
|
318
321
|
return item.value;
|
319
322
|
} else if (item.innerText != null && item.innerText != "") {
|
320
323
|
return item.innerText;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<span class="button-sty">
|
3
|
-
<el-button type="success" class="btn-connect" icon="iconfont icon-zancun" @click="openSubmitDialog" plain>暂存</el-button>
|
3
|
+
<el-button type="success" class="btn-connect" icon="iconfont icon-zancun" @click="openSubmitDialog" plain :disabled="disabled">暂存</el-button>
|
4
4
|
<el-tooltip class="item" effect="dark" content="查看暂存数据" placement="top">
|
5
|
-
<el-button class="btn-connect" @click="openTempStorageDialog" icon="iconfont icon-chakanshuju" type="success" ></el-button>
|
5
|
+
<el-button class="btn-connect" @click="openTempStorageDialog" icon="iconfont icon-chakanshuju" type="success" :disabled="disabled"></el-button>
|
6
6
|
</el-tooltip>
|
7
7
|
|
8
|
-
<tempStorageDialog v-if="showTempStorageDialog" :visiable.sync="showTempStorageDialog"
|
8
|
+
<tempStorageDialog v-if="showTempStorageDialog" :visiable.sync="showTempStorageDialog"
|
9
9
|
@confirm="confirmTempStorageDialog" :storageType="storageType" multi="false"/>
|
10
10
|
<el-dialog
|
11
11
|
v-if="showSubmitDialog"
|
@@ -54,7 +54,8 @@ import tempStorageDialog from "./tempStorageDialog.vue";
|
|
54
54
|
|
55
55
|
export default {
|
56
56
|
props: {
|
57
|
-
option: Object
|
57
|
+
option: Object,
|
58
|
+
disabled: Boolean,
|
58
59
|
},
|
59
60
|
components: {
|
60
61
|
tempStorageDialog
|
@@ -60,7 +60,7 @@
|
|
60
60
|
<el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
|
61
61
|
class="allDel icon-quanbushanchu" @click="clearChecked()"></a></el-tooltip>
|
62
62
|
<div class="list">
|
63
|
-
<div class="item" v-for="(checkRow, index) in checkRows">
|
63
|
+
<div class="item" v-for="(checkRow, index) in checkRows" :key="index">
|
64
64
|
<p>{{ checkRow.storageCode }}</p>
|
65
65
|
<a class="el-icon-close" @click="clearTable1Select(index)"></a>
|
66
66
|
</div>
|
package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue
CHANGED
@@ -76,7 +76,8 @@ export default {
|
|
76
76
|
return !!this.field.options.customClass ? this.field.options.customClass.join(' ') : ''
|
77
77
|
},
|
78
78
|
computedStyle() {
|
79
|
-
|
79
|
+
let displayStyle = !this.designState && this.field.options.hidden ? "none !important":this.displayStyle
|
80
|
+
return {display: displayStyle, height: this.heightStyle};
|
80
81
|
},
|
81
82
|
isShow() {
|
82
83
|
let result = !this.field.options.hidden || (this.designState === true);
|
@@ -0,0 +1,125 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper
|
3
|
+
:designer="designer"
|
4
|
+
:field="field"
|
5
|
+
:design-state="designState"
|
6
|
+
:display-style="field.options.displayStyle"
|
7
|
+
:parent-widget="parentWidget"
|
8
|
+
:parent-list="parentList"
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
10
|
+
:sub-form-row-index="subFormRowIndex"
|
11
|
+
:sub-form-col-index="subFormColIndex"
|
12
|
+
:sub-form-row-id="subFormRowId"
|
13
|
+
>
|
14
|
+
<span class="button-sty" v-if="designState">
|
15
|
+
<el-button type="success" class="btn-connect" icon="iconfont icon-zancun" @click="openSubmitDialog" plain >暂存</el-button>
|
16
|
+
<el-button class="btn-connect" @click="openTempStorageDialog" icon="iconfont icon-chakanshuju" type="success"></el-button>
|
17
|
+
</span>
|
18
|
+
<temp-storage-button
|
19
|
+
v-else
|
20
|
+
:option="tempStorageOption"
|
21
|
+
:disabled="!designState && field.options.disabled"
|
22
|
+
></temp-storage-button>
|
23
|
+
</static-content-wrapper>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
28
|
+
import emitter from "../../../../../components/xform/utils/emitter";
|
29
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
30
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
31
|
+
import tempStorageButton from "@base/components/tempStorage/index.vue";
|
32
|
+
|
33
|
+
export default {
|
34
|
+
name: "tempStorage-widget",
|
35
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
36
|
+
mixins: [emitter, fieldMixin, i18n],
|
37
|
+
props: {
|
38
|
+
field: Object,
|
39
|
+
parentWidget: Object,
|
40
|
+
parentList: Array,
|
41
|
+
indexOfParentList: Number,
|
42
|
+
designer: Object,
|
43
|
+
|
44
|
+
designState: {
|
45
|
+
type: Boolean,
|
46
|
+
default: false,
|
47
|
+
},
|
48
|
+
|
49
|
+
subFormRowIndex: {
|
50
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
51
|
+
default: -1,
|
52
|
+
},
|
53
|
+
subFormColIndex: {
|
54
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
55
|
+
default: -1,
|
56
|
+
},
|
57
|
+
subFormRowId: {
|
58
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
59
|
+
default: "",
|
60
|
+
},
|
61
|
+
},
|
62
|
+
components: {
|
63
|
+
StaticContentWrapper,
|
64
|
+
tempStorageButton,
|
65
|
+
},
|
66
|
+
computed: {},
|
67
|
+
beforeCreate() {
|
68
|
+
/* 这里不能访问方法和属性!! */
|
69
|
+
},
|
70
|
+
|
71
|
+
data() {
|
72
|
+
return {
|
73
|
+
tempStorageOption: {},
|
74
|
+
};
|
75
|
+
},
|
76
|
+
|
77
|
+
created() {
|
78
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
79
|
+
需要在父组件created中初始化!! */
|
80
|
+
this.registerToRefList();
|
81
|
+
this.initEventHandler();
|
82
|
+
|
83
|
+
this.handleOnCreated();
|
84
|
+
this.init();
|
85
|
+
},
|
86
|
+
|
87
|
+
mounted() {
|
88
|
+
this.handleOnMounted();
|
89
|
+
},
|
90
|
+
|
91
|
+
beforeDestroy() {
|
92
|
+
this.unregisterFromRefList();
|
93
|
+
},
|
94
|
+
|
95
|
+
methods: {
|
96
|
+
init() {
|
97
|
+
if (this.designer) return;
|
98
|
+
let dataId = this.getFormRef().dataId;
|
99
|
+
if (dataId) {
|
100
|
+
this.setHidden(true);
|
101
|
+
}
|
102
|
+
|
103
|
+
this.initConfig();
|
104
|
+
},
|
105
|
+
initConfig(){
|
106
|
+
let formCode = this.getFormRef()?.reportTemplate?.formCode;
|
107
|
+
let tempStorageCode = this.field.options.tempStorageCode || formCode;
|
108
|
+
this.tempStorageOption = {
|
109
|
+
storageType: tempStorageCode,
|
110
|
+
data: () => {
|
111
|
+
return this.formModel;
|
112
|
+
},
|
113
|
+
chooseConfirm: (tempStorageData) => {
|
114
|
+
this.getFormRef().setFormData(tempStorageData);
|
115
|
+
},
|
116
|
+
saveConfirm: () => {},
|
117
|
+
}
|
118
|
+
}
|
119
|
+
},
|
120
|
+
};
|
121
|
+
</script>
|
122
|
+
|
123
|
+
<style lang="scss" scoped>
|
124
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
125
|
+
</style>
|
package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('暂存唯一编码')">
|
3
|
+
<el-input type="text" v-model="optionModel.tempStorageCode" placeholder="默认表单模板编码"></el-input>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "tempStorage-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -81,6 +81,7 @@ const COMMON_PROPERTIES = {
|
|
81
81
|
'echarCategoryOption': 'echart-category-editor', //折线图
|
82
82
|
'vabSearchName': 'vabSearchName-editor',
|
83
83
|
'copyButton': 'copyButton-editor',
|
84
|
+
"tempStorageFlag": "tempStorage-editor",
|
84
85
|
|
85
86
|
//容器
|
86
87
|
'showBlankRow': 'showBlankRow-editor',
|
@@ -3601,6 +3601,31 @@ export const businessFields = [
|
|
3601
3601
|
...defaultWidgetShowRuleConfig,
|
3602
3602
|
hiddenByWf: true,
|
3603
3603
|
|
3604
|
+
showRuleFlag: 1,
|
3605
|
+
showRuleEnabled: 1,
|
3606
|
+
showRules: [],
|
3607
|
+
},
|
3608
|
+
},
|
3609
|
+
{
|
3610
|
+
type: "tempStorage",
|
3611
|
+
icon: "uploadbox",
|
3612
|
+
commonFlag: !0,
|
3613
|
+
columnFlag: true,
|
3614
|
+
formItemFlag: !0,
|
3615
|
+
options: {
|
3616
|
+
name: "",
|
3617
|
+
// label: "暂存",
|
3618
|
+
columnWidth: "200px",
|
3619
|
+
disabled: !1,
|
3620
|
+
hidden: !1,
|
3621
|
+
|
3622
|
+
tempStorageFlag:1,
|
3623
|
+
tempStorageCode:null,
|
3624
|
+
|
3625
|
+
customClass: "",
|
3626
|
+
onCreated: "",
|
3627
|
+
onMounted: "",
|
3628
|
+
|
3604
3629
|
showRuleFlag: 1,
|
3605
3630
|
showRuleEnabled: 1,
|
3606
3631
|
showRules: [],
|