cloud-web-corejs 1.0.128 → 1.0.130
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/VabUpload/view.vue +138 -55
- package/src/components/baseInputExport/mixins.js +1 -1
- package/src/components/errorMsg/mixins.js +1 -2
- package/src/components/excelImport/mixins.js +2 -1
- package/src/components/jsonImport/mixins.js +2 -1
- package/src/components/langImport/mixins.js +17 -16
- package/src/components/wf/content.vue +772 -411
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
- package/src/components/wf/wf.js +1 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
- package/src/components/xform/form-designer/designer.js +3 -2
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -9
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +3 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +17 -4
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -0
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +185 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +108 -0
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +13 -4
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +725 -0
- package/src/components/xform/form-designer/indexMixin.js +3 -2
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +376 -366
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +0 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +372 -253
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +9 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +7 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +8 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +91 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +37 -30
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +62 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +19 -14
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +5 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -19
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +132 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +13 -10
- package/src/components/xform/form-render/container-item/data-table-mixin.js +5 -4
- package/src/components/xform/form-render/indexMixin.js +3 -2
- package/src/components/xform/lang/zh-CN.js +3 -0
- package/src/components/xform/utils/util.js +1 -1451
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +1 -1
- package/src/views/user/notify_message/dialog.vue +24 -19
- package/src/views/user/outLink/form_view.vue +211 -211
- package/src/views/user/wf/wfReport/index.vue +448 -0
- package/src/views/user/wf/wf_manage/list.vue +344 -251
- package/src/views/user/wf/wf_transfer_setting/edit.vue +229 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +308 -0
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}"
|
13
13
|
v-show="!field.options.hidden || (designState === true)">
|
14
14
|
<div>
|
15
|
-
<template v-if="formItemProp
|
15
|
+
<template v-if="formItemProp==='false'">
|
16
16
|
<template v-if="!field.options.hidden">
|
17
17
|
<template v-if="isShowWidget()">
|
18
18
|
<slot></slot>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<el-form-item v-if="!!field.formItemFlag && (!field.options.hidden || (designState === true))"
|
40
40
|
:label="label" :label-width="labelWidth"
|
41
41
|
:title="field.options.labelTooltip"
|
42
|
-
:rules="
|
42
|
+
:rules="getRules()" :prop="getPropName()"
|
43
43
|
:class="[selected ? 'selected' : '', labelAlign, customClass, field.options.required ? 'required' : '']"
|
44
44
|
@click.native.stop="selectField(field)">
|
45
45
|
|
@@ -277,13 +277,24 @@ export default {
|
|
277
277
|
})
|
278
278
|
}
|
279
279
|
},
|
280
|
-
|
280
|
+
getIsFormItemUnabled(){
|
281
|
+
return this.field.type == "vabUpload" || this.field.type == "baseAttachment"
|
282
|
+
},
|
283
|
+
getRules(){
|
284
|
+
if(this.getIsFormItemUnabled()){
|
285
|
+
return null
|
286
|
+
}
|
287
|
+
return this.rules;
|
288
|
+
},
|
281
289
|
getPropName() {
|
290
|
+
if(this.getIsFormItemUnabled()){
|
291
|
+
return null
|
292
|
+
}
|
282
293
|
if (this.formItemProp) {
|
283
294
|
return this.formItemProp;
|
284
295
|
}
|
285
296
|
let o = this.field.options.name;
|
286
|
-
|
297
|
+
let propName = (
|
287
298
|
(o
|
288
299
|
= (this.field.options.keyNameEnabled
|
289
300
|
&& this.field.options.keyName)
|
@@ -298,6 +309,8 @@ export default {
|
|
298
309
|
? this.getObjectName() + "." + o
|
299
310
|
: o
|
300
311
|
);
|
312
|
+
|
313
|
+
return propName
|
301
314
|
},
|
302
315
|
getI18nLabel(label, path, param) {
|
303
316
|
return !this.designState && label ? this.$t2(label, path, param) : label;
|
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
@@ -61,10 +61,14 @@ export default {
|
|
61
61
|
|
62
62
|
methods: {
|
63
63
|
importHandle() {
|
64
|
+
let multi = this.field.options.importMultiple || false;
|
65
|
+
let multiSize = this.field.options.importMultiSize || 1;
|
64
66
|
this.getFormRef().openImportDialog({
|
65
67
|
target: this,
|
66
68
|
importOption: this.field.options,
|
67
69
|
importFrontOnly: false,
|
70
|
+
multi,
|
71
|
+
multiSize,
|
68
72
|
callback: (resultData, file, done) => {
|
69
73
|
|
70
74
|
}
|
@@ -0,0 +1,185 @@
|
|
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
|
+
<vxe-grid
|
15
|
+
ref="table-m1"
|
16
|
+
:data="oplogDTOs"
|
17
|
+
v-bind="m1Option"
|
18
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
19
|
+
@custom="$vxeTableUtil.customHandle"
|
20
|
+
></vxe-grid>
|
21
|
+
</static-content-wrapper>
|
22
|
+
</template>
|
23
|
+
|
24
|
+
<script>
|
25
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
26
|
+
import emitter from "../../../utils/emitter";
|
27
|
+
import i18n from "../../../utils/i18n";
|
28
|
+
import fieldMixin from "./fieldMixin";
|
29
|
+
|
30
|
+
export default {
|
31
|
+
name: "oplog-widget",
|
32
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
33
|
+
mixins: [emitter, fieldMixin, i18n],
|
34
|
+
props: {
|
35
|
+
field: Object,
|
36
|
+
parentWidget: Object,
|
37
|
+
parentList: Array,
|
38
|
+
indexOfParentList: Number,
|
39
|
+
designer: Object,
|
40
|
+
|
41
|
+
designState: {
|
42
|
+
type: Boolean,
|
43
|
+
default: false,
|
44
|
+
},
|
45
|
+
|
46
|
+
subFormRowIndex: {
|
47
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
48
|
+
default: -1,
|
49
|
+
},
|
50
|
+
subFormColIndex: {
|
51
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
52
|
+
default: -1,
|
53
|
+
},
|
54
|
+
subFormRowId: {
|
55
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
56
|
+
default: "",
|
57
|
+
},
|
58
|
+
},
|
59
|
+
components: {
|
60
|
+
StaticContentWrapper,
|
61
|
+
},
|
62
|
+
computed: {
|
63
|
+
showLabel() {
|
64
|
+
return this.field.options.labelHidden ? null : this.label;
|
65
|
+
},
|
66
|
+
label() {
|
67
|
+
return this.field.options.isFormLabel
|
68
|
+
? this.currentValue
|
69
|
+
: this.getI18nLabel(this.field.options.label);
|
70
|
+
},
|
71
|
+
widgetClass() {
|
72
|
+
let list = [];
|
73
|
+
let optionModel = this.field.options;
|
74
|
+
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
75
|
+
if (optionModel.underline) list.push("underLine");
|
76
|
+
if (optionModel.disabled) list.push("is-disabled");
|
77
|
+
return list;
|
78
|
+
},
|
79
|
+
},
|
80
|
+
beforeCreate() {
|
81
|
+
/* 这里不能访问方法和属性!! */
|
82
|
+
},
|
83
|
+
data() {
|
84
|
+
return {
|
85
|
+
m1Option: {},
|
86
|
+
oplogDTOs: [],
|
87
|
+
};
|
88
|
+
},
|
89
|
+
|
90
|
+
created() {
|
91
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
92
|
+
需要在父组件created中初始化!! */
|
93
|
+
this.registerToRefList();
|
94
|
+
this.initEventHandler();
|
95
|
+
|
96
|
+
this.handleOnCreated();
|
97
|
+
},
|
98
|
+
|
99
|
+
mounted() {
|
100
|
+
this.handleOnMounted();
|
101
|
+
this.initOplogDTOs();
|
102
|
+
},
|
103
|
+
|
104
|
+
beforeDestroy() {
|
105
|
+
this.unregisterFromRefList();
|
106
|
+
},
|
107
|
+
|
108
|
+
methods: {
|
109
|
+
initOplogDTOs() {
|
110
|
+
const tableOption = {
|
111
|
+
vue: this,
|
112
|
+
tableRef: "table-m1",
|
113
|
+
tableName: "xform-oplog-oplogList-m1Grid",
|
114
|
+
columns: [
|
115
|
+
{
|
116
|
+
type: "checkbox",
|
117
|
+
fixed: "left",
|
118
|
+
width: 48,
|
119
|
+
resizable: false,
|
120
|
+
},
|
121
|
+
{
|
122
|
+
title: this.$t2("操作时间", "components.oplogTable.createDate"),
|
123
|
+
field: "create_date",
|
124
|
+
width: 150,
|
125
|
+
},
|
126
|
+
{
|
127
|
+
title: this.$t2("操作人员", "components.oplogTable.createBy"),
|
128
|
+
field: "_createBy",
|
129
|
+
width: 150,
|
130
|
+
},
|
131
|
+
{
|
132
|
+
title: this.$t2("操作日志", "components.oplogTable.content"),
|
133
|
+
field: "content",
|
134
|
+
width: 250,
|
135
|
+
},
|
136
|
+
{
|
137
|
+
width: 47,
|
138
|
+
fixed: "right",
|
139
|
+
title: "",
|
140
|
+
sortable: false,
|
141
|
+
},
|
142
|
+
],
|
143
|
+
};
|
144
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
145
|
+
this.m1Option = opts;
|
146
|
+
});
|
147
|
+
this.initData();
|
148
|
+
},
|
149
|
+
initData(option) {
|
150
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
151
|
+
let formCode = reportTemplate.formCode;
|
152
|
+
let scriptCode = this.field.options.formScriptCode;
|
153
|
+
let oplogTypeCode = this.field.options.oplogTypeCode || formCode;
|
154
|
+
let oplogBusinessKey = this.field.options.oplogBusinessKey || "id";
|
155
|
+
if (!scriptCode) return;
|
156
|
+
let business_code = this.formModel[oplogBusinessKey];
|
157
|
+
if (!business_code) return;
|
158
|
+
this.formHttp({
|
159
|
+
scriptCode: scriptCode,
|
160
|
+
data: {
|
161
|
+
formCode: formCode,
|
162
|
+
formVersion: reportTemplate.formVersion,
|
163
|
+
data: {
|
164
|
+
log_type: oplogTypeCode,
|
165
|
+
business_code: business_code,
|
166
|
+
},
|
167
|
+
},
|
168
|
+
addCreateInfo: true,
|
169
|
+
queryCreateInfo: true,
|
170
|
+
callback: (res) => {
|
171
|
+
let rows = res.objx || [];
|
172
|
+
this.oplogDTOs = rows;
|
173
|
+
},
|
174
|
+
});
|
175
|
+
},
|
176
|
+
},
|
177
|
+
};
|
178
|
+
</script>
|
179
|
+
|
180
|
+
<style lang="scss" scoped>
|
181
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
182
|
+
a.is-disabled {
|
183
|
+
cursor: not-allowed;
|
184
|
+
}
|
185
|
+
</style>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<span>{{ $t1('导出/打印') }}</span><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
|
10
10
|
</el-button>
|
11
11
|
</el-dropdown>
|
12
|
-
<base-input-export :option="exportOption" :parent-target="
|
12
|
+
<base-input-export :option="exportOption" :parent-target="getFormRef()" :disabled="field.options.disabled" v-else/>
|
13
13
|
</static-content-wrapper>
|
14
14
|
|
15
15
|
</template>
|
package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue
ADDED
@@ -0,0 +1,108 @@
|
|
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
|
+
>
|
11
|
+
<el-dropdown
|
12
|
+
trigger="hover"
|
13
|
+
v-if="designState"
|
14
|
+
:disabled="field.options.disabled"
|
15
|
+
>
|
16
|
+
<el-button type="primary" class="button-sty" size="mini">
|
17
|
+
<span>{{ $t1("导出/打印") }}</span
|
18
|
+
><span class="line"></span>
|
19
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
20
|
+
</el-button>
|
21
|
+
</el-dropdown>
|
22
|
+
<base-input-export
|
23
|
+
:option="exportOption"
|
24
|
+
:parent-target="getFormRef()"
|
25
|
+
:disabled="field.options.disabled"
|
26
|
+
v-else
|
27
|
+
/>
|
28
|
+
</static-content-wrapper>
|
29
|
+
</template>
|
30
|
+
<script>
|
31
|
+
import emitter from "../../../../../components/xform/utils/emitter";
|
32
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
33
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
34
|
+
import StaticContentWrapper from "../../../../../components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue";
|
35
|
+
|
36
|
+
export default {
|
37
|
+
name: "print-detail-button-widget",
|
38
|
+
components: { StaticContentWrapper },
|
39
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
40
|
+
mixins: [emitter, fieldMixin, i18n],
|
41
|
+
props: {
|
42
|
+
field: Object,
|
43
|
+
parentWidget: Object,
|
44
|
+
parentList: Array,
|
45
|
+
indexOfParentList: Number,
|
46
|
+
designer: Object,
|
47
|
+
designState: {
|
48
|
+
type: Boolean,
|
49
|
+
default: false,
|
50
|
+
},
|
51
|
+
},
|
52
|
+
data() {
|
53
|
+
return {
|
54
|
+
exportOption: {},
|
55
|
+
};
|
56
|
+
},
|
57
|
+
beforeCreate() {
|
58
|
+
/* 这里不能访问方法和属性!! */
|
59
|
+
},
|
60
|
+
created() {
|
61
|
+
this.init();
|
62
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
63
|
+
需要在父组件created中初始化!! */
|
64
|
+
this.registerToRefList();
|
65
|
+
this.initEventHandler();
|
66
|
+
|
67
|
+
this.handleOnCreated();
|
68
|
+
},
|
69
|
+
|
70
|
+
mounted() {
|
71
|
+
this.handleOnMounted();
|
72
|
+
},
|
73
|
+
|
74
|
+
beforeDestroy() {
|
75
|
+
this.unregisterFromRefList();
|
76
|
+
},
|
77
|
+
|
78
|
+
methods: {
|
79
|
+
init() {
|
80
|
+
if (this.designState) return;
|
81
|
+
let prefix = "/" + this.getFormRef().reportTemplate.serviceName;
|
82
|
+
// let printOption = this.handleCustomEvent(this.field.options.printOption);
|
83
|
+
let codes = this.field.options.printItems
|
84
|
+
.filter((item) => !!item.code)
|
85
|
+
.map((item) => item.code);
|
86
|
+
let option = {
|
87
|
+
prefix: prefix,
|
88
|
+
codes,
|
89
|
+
customCondition:(exportTemplate)=>{
|
90
|
+
let param = {
|
91
|
+
formData: this.formModel
|
92
|
+
};
|
93
|
+
if (this.field.options.printCustomCondition) {
|
94
|
+
let param1 = this.handleCustomEvent(this.field.options.printCustomCondition,['exportTemplate'],[exportTemplate]);
|
95
|
+
if(param1)param = param1;
|
96
|
+
}
|
97
|
+
return param;
|
98
|
+
}
|
99
|
+
};
|
100
|
+
this.exportOption = option;
|
101
|
+
},
|
102
|
+
},
|
103
|
+
};
|
104
|
+
</script>
|
105
|
+
|
106
|
+
<style lang="scss" scoped>
|
107
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
108
|
+
</style>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<template>
|
2
|
+
<form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
5
|
+
:sub-form-row-id="subFormRowId">
|
6
|
+
<div id="uploadImage" class="upload-img" v-if="designState">
|
7
|
+
<div class="el-upload el-upload--picture" style="vertical-align: middle;display: inline-block;float:left">
|
8
|
+
<button type="button" class=" avatar-uploader">
|
9
|
+
<i class="el-icon-plus avatar-uploader-icon"></i>
|
10
|
+
</button>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<baseUpload accept="file" :file.sync="fieldModel" :hidePasteArea.sync="isH5"
|
14
|
+
:uploadDialogCustomClass="isH5?'dialog-upload-h5':null" :pickPrivateProfile="false"
|
15
|
+
:multi="field.options.limit!==1"
|
16
|
+
:limit="field.options.limit"
|
17
|
+
resultType="Array"
|
18
|
+
:edit="!field.options.disabled"
|
19
|
+
@callback="submitFile"
|
20
|
+
:hideInfo="field.options.hideFileInfo"
|
21
|
+
:hideName="field.options.hideFileName"
|
22
|
+
:showSize="!!field.options.showFileSize"
|
23
|
+
:createBy="!!field.options.showFileCreateBy"
|
24
|
+
:createDate="!!field.options.showFileCreateDate"
|
25
|
+
:widgetSize="field.options.fileShowImageSize"
|
26
|
+
v-else></baseUpload>
|
27
|
+
</form-item-wrapper>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
import FormItemWrapper from './form-item-wrapper'
|
32
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
33
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
34
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
35
|
+
|
36
|
+
export default {
|
37
|
+
name: "singleUpload-widget",
|
38
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
39
|
+
mixins: [emitter, fieldMixin, i18n],
|
40
|
+
props: {
|
41
|
+
field: Object,
|
42
|
+
parentWidget: Object,
|
43
|
+
parentList: Array,
|
44
|
+
indexOfParentList: Number,
|
45
|
+
designer: Object,
|
46
|
+
|
47
|
+
designState: {
|
48
|
+
type: Boolean,
|
49
|
+
default: false
|
50
|
+
},
|
51
|
+
|
52
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
53
|
+
type: Number,
|
54
|
+
default: -1
|
55
|
+
},
|
56
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
57
|
+
type: Number,
|
58
|
+
default: -1
|
59
|
+
},
|
60
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
61
|
+
type: String,
|
62
|
+
default: ''
|
63
|
+
}
|
64
|
+
},
|
65
|
+
components: {
|
66
|
+
FormItemWrapper,
|
67
|
+
},
|
68
|
+
inject: ['refList', 'globalOptionData', 'globalModel', 'getFormConfig'],
|
69
|
+
data() {
|
70
|
+
return {
|
71
|
+
oldFieldValue: [], //field组件change之前的值
|
72
|
+
fieldModel: [],
|
73
|
+
rules: [],
|
74
|
+
isH5: false
|
75
|
+
}
|
76
|
+
},
|
77
|
+
watch: {
|
78
|
+
fieldModel(val) {
|
79
|
+
this.handleChangeEvent(val);
|
80
|
+
}
|
81
|
+
},
|
82
|
+
computed: {
|
83
|
+
formDataId() {
|
84
|
+
let formRef = this.getFormRef();
|
85
|
+
return formRef.dataId;
|
86
|
+
}
|
87
|
+
},
|
88
|
+
beforeCreate() {
|
89
|
+
/* 这里不能访问方法和属性!! */
|
90
|
+
},
|
91
|
+
|
92
|
+
created() {
|
93
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
94
|
+
需要在父组件created中初始化!! */
|
95
|
+
|
96
|
+
this.isH5 = this.getFormConfig().layoutType === 'H5';
|
97
|
+
|
98
|
+
this.initFieldModel()
|
99
|
+
this.registerToRefList()
|
100
|
+
this.initEventHandler()
|
101
|
+
this.buildFieldRules()
|
102
|
+
|
103
|
+
this.handleOnCreated()
|
104
|
+
},
|
105
|
+
|
106
|
+
mounted() {
|
107
|
+
this.handleOnMounted()
|
108
|
+
},
|
109
|
+
|
110
|
+
beforeDestroy() {
|
111
|
+
this.unregisterFromRefList()
|
112
|
+
},
|
113
|
+
methods: {
|
114
|
+
submitFile(rows, fileInfos) {
|
115
|
+
// this.handlLineCode(fileInfos);
|
116
|
+
let eventParamNames = ['attachments', 'fileInfos'];
|
117
|
+
let eventParamValues = [rows, fileInfos];
|
118
|
+
this.handleCustomEvent(this.field.options.onAfterConfirmFile, eventParamNames, eventParamValues)
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
</script>
|
123
|
+
|
124
|
+
<style lang="scss" scoped>
|
125
|
+
@import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
126
|
+
|
127
|
+
.full-width-input {
|
128
|
+
width: 100% !important;
|
129
|
+
}
|
130
|
+
|
131
|
+
.hideUploadDiv {
|
132
|
+
::v-deep div.el-upload--picture-card { /* 隐藏最后的图片上传按钮 */
|
133
|
+
display: none;
|
134
|
+
}
|
135
|
+
|
136
|
+
::v-deep div.el-upload--text { /* 隐藏最后的文件上传按钮 */
|
137
|
+
display: none;
|
138
|
+
}
|
139
|
+
|
140
|
+
::v-deep div.el-upload__tip { /* 隐藏最后的文件上传按钮提示 */
|
141
|
+
display: none;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
</style>
|
@@ -4,10 +4,10 @@
|
|
4
4
|
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
5
5
|
:sub-form-row-id="subFormRowId">
|
6
6
|
<template v-for="(item,index) in field.options.statusParam">
|
7
|
-
<
|
8
|
-
v-if="
|
9
|
-
:key="index" class="list-tag"
|
10
|
-
|
7
|
+
<template v-if="fieldModel===item[valueField]">
|
8
|
+
<span v-if="field.options.formScriptEnabled || field.options.commonAttributeEnabled" :key="index" >{{ getI18nLabel(item[labelField]) }}</span>
|
9
|
+
<span v-else :key="index" class="list-tag" :class="item.type">{{ getI18nLabel(item[labelField]) }}</span>
|
10
|
+
</template>
|
11
11
|
</template>
|
12
12
|
</form-item-wrapper>
|
13
13
|
</template>
|
@@ -64,6 +64,14 @@ export default {
|
|
64
64
|
statusParam: [],
|
65
65
|
}
|
66
66
|
},
|
67
|
+
computed: {
|
68
|
+
labelField(){
|
69
|
+
return this.getOptionItemLabelKey();
|
70
|
+
},
|
71
|
+
valueField(){
|
72
|
+
return this.getOptionItemValueKey();
|
73
|
+
}
|
74
|
+
},
|
67
75
|
watch: {
|
68
76
|
fieldModel(val) {
|
69
77
|
this.handleChangeEvent(val);
|
@@ -85,6 +93,7 @@ export default {
|
|
85
93
|
this.buildFieldRules()
|
86
94
|
|
87
95
|
this.handleOnCreated()
|
96
|
+
this.initOptionItemsHandle()
|
88
97
|
// this.initStatusParam();
|
89
98
|
},
|
90
99
|
|