cloud-web-corejs 1.0.79 → 1.0.81
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/baseAttachment/index.vue +22 -13
- package/src/components/baseAttachment/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +328 -203
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +27 -23
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/vxeFilter/mixin.js +1 -1
- package/src/components/vb-tabs/x-tabs.vue +3 -2
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +15 -3
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +2 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +17 -6
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +28 -3
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +5 -2
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +138 -6
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -7
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +80 -0
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +5 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +6 -0
- package/src/components/xform/form-designer/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +8 -0
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +415 -354
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +7 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +16 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +80 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +170 -20
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +0 -4
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +133 -108
- package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -1
- package/src/components/xform/form-render/container-item/data-table-item.vue +43 -21
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3 -3
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/indexMixin.js +1 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +3 -1
- package/src/components/xform/utils/util.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +835 -484
- package/src/views/bd/setting/table_model/mixins/edit.js +3 -3
- package/src/views/user/form/vform/designer.vue +772 -753
- package/src/views/user/form/view/list.vue +27 -9
@@ -9,10 +9,18 @@
|
|
9
9
|
-->
|
10
10
|
|
11
11
|
<template>
|
12
|
-
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}"
|
12
|
+
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}"
|
13
|
+
v-show="!field.options.hidden || (designState === true)">
|
13
14
|
<div>
|
14
15
|
<template v-if="formItemProp=='false'">
|
15
|
-
<
|
16
|
+
<template v-if="!field.options.hidden">
|
17
|
+
<template v-if="showType === 0">
|
18
|
+
<slot></slot>
|
19
|
+
</template>
|
20
|
+
<template v-else>
|
21
|
+
<span>{{ getShowValue() }}</span>
|
22
|
+
</template>
|
23
|
+
</template>
|
16
24
|
</template>
|
17
25
|
<template v-else>
|
18
26
|
<el-form-item v-if="!!field.formItemFlag && (!field.options.hidden || (designState === true))"
|
@@ -22,7 +30,8 @@
|
|
22
30
|
:class="[selected ? 'selected' : '', labelAlign, customClass, field.options.required ? 'required' : '']"
|
23
31
|
@click.native.stop="selectField(field)">
|
24
32
|
|
25
|
-
<span v-if="!!field.options.labelIconClass" slot="label" class="custom-label"
|
33
|
+
<span v-if="!!field.options.labelIconClass" slot="label" class="custom-label"
|
34
|
+
:style="{'color':field.options.labelColor}">
|
26
35
|
<template v-if="field.options.labelIconPosition === 'front'">
|
27
36
|
<template v-if="!!field.options.labelTooltip">
|
28
37
|
<el-tooltip :content="field.options.labelTooltip" effect="light">
|
@@ -38,10 +47,15 @@
|
|
38
47
|
{{ label }}<i :class="field.options.labelIconClass"></i></template>
|
39
48
|
</template>
|
40
49
|
</span>
|
41
|
-
<span v-if="!!field.options.labelColor" slot="label"
|
50
|
+
<span v-if="!!field.options.labelColor" slot="label" :style="{'color':field.options.labelColor}">
|
42
51
|
{{ label }}
|
43
52
|
</span>
|
44
|
-
<
|
53
|
+
<template v-if="showType === 0">
|
54
|
+
<slot></slot>
|
55
|
+
</template>
|
56
|
+
<template v-else>
|
57
|
+
<span>{{ getShowValue() }}</span>
|
58
|
+
</template>
|
45
59
|
</el-form-item>
|
46
60
|
</template>
|
47
61
|
</div>
|
@@ -160,8 +174,14 @@ export default {
|
|
160
174
|
},
|
161
175
|
|
162
176
|
},
|
177
|
+
data() {
|
178
|
+
return {
|
179
|
+
showType: 0
|
180
|
+
}
|
181
|
+
},
|
163
182
|
created() {
|
164
183
|
//
|
184
|
+
this.initShowType();
|
165
185
|
},
|
166
186
|
methods: {
|
167
187
|
isSubFormItem() {
|
@@ -252,7 +272,119 @@ export default {
|
|
252
272
|
},
|
253
273
|
getI18nLabel(label, path, param) {
|
254
274
|
return !this.designState && label ? this.$t2(label, path, param) : label;
|
255
|
-
}
|
275
|
+
},
|
276
|
+
initShowType() {
|
277
|
+
if (!!this.designer)return
|
278
|
+
let that = this.$parent
|
279
|
+
let formRef = that.getFormRef?that.getFormRef():that;
|
280
|
+
let bdService = formRef.bdService;
|
281
|
+
let companyCode = this.$store.getters.companyCode;
|
282
|
+
let loginAccount = this.$store.getters.loginAccount;
|
283
|
+
|
284
|
+
let userSaleOrgDTOs = formRef.userSaleOrgDTOs;
|
285
|
+
let userRoleDTOs = formRef.userRoleDTOs;
|
286
|
+
|
287
|
+
let saleOrgCodeList = userSaleOrgDTOs.map(item => item.sn);
|
288
|
+
let roleCodeList = userRoleDTOs.map(item => item.roleCode);
|
289
|
+
|
290
|
+
let optionModel = this.field.options;
|
291
|
+
|
292
|
+
let flag = 0;//0 原本组件,1明文文本,2密文文本
|
293
|
+
if (optionModel.showTextEnabled) {
|
294
|
+
flag = 1;
|
295
|
+
} else if (optionModel.showEncryptTextEnabled) {
|
296
|
+
flag = 2;
|
297
|
+
}
|
298
|
+
if (optionModel.userTextRuleEnabled) {
|
299
|
+
let userTextRuleConfig = optionModel.userTextRuleConfig || [];
|
300
|
+
userTextRuleConfig.forEach(item => {
|
301
|
+
let type = item.type ?? null;
|
302
|
+
if (type !== null && type !== "") {
|
303
|
+
let companyCodeStr = item.companyCodes;
|
304
|
+
let companyCodes = companyCodeStr ? companyCodeStr.split(",").filter(item => !!item) : [];
|
305
|
+
/*
|
306
|
+
|
307
|
+
let loginAccountStr = item.loginAccounts;
|
308
|
+
let loginAccounts = loginAccountStr ? loginAccountStr.split(",").filter(item => !!item) : [];
|
309
|
+
|
310
|
+
let saleOrgCodeStr = item.saleOrgCodes;
|
311
|
+
let saleOrgCodes = saleOrgCodeStr ? saleOrgCodeStr.split(",").filter(item => !!item) : [];
|
312
|
+
*/
|
313
|
+
|
314
|
+
let roleCodeStr = item.roleCodes;
|
315
|
+
let roleCodes = roleCodeStr ? roleCodeStr.split(",").filter(item => !!item) : [];
|
316
|
+
|
317
|
+
let flag1 = !item.serveName || item.serveName == bdService;
|
318
|
+
let flag2 = !companyCodes.length || companyCodes.includes(companyCode)
|
319
|
+
// let flag3 = !loginAccounts.length || loginAccounts.includes(loginAccount)
|
320
|
+
// let flag4 = this.compareToList(saleOrgCodes, saleOrgCodeList)
|
321
|
+
let flag5 = this.compareToList(roleCodes, roleCodeList)
|
322
|
+
let result = flag1 && flag2 && flag5 ;
|
323
|
+
if (result) {
|
324
|
+
flag = type;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
})
|
328
|
+
}
|
329
|
+
this.showType = flag;
|
330
|
+
},
|
331
|
+
compareToList(list1, list2) {
|
332
|
+
if (!list1.length) {
|
333
|
+
return true;
|
334
|
+
}
|
335
|
+
if (!list2.length) {
|
336
|
+
return false;
|
337
|
+
}
|
338
|
+
return list1.some(item => {
|
339
|
+
return list2.some(item2 => item == item2)
|
340
|
+
});
|
341
|
+
},
|
342
|
+
getShowValue() {
|
343
|
+
let fieldModel = this.$parent.fieldModel;
|
344
|
+
let showValue = fieldModel
|
345
|
+
if (this.showType == 2) {
|
346
|
+
let optionModel = this.field.options;
|
347
|
+
showValue = "*******";
|
348
|
+
if ((optionModel.textRule1 || optionModel.textRule2 || optionModel.textRule3)) {
|
349
|
+
if (fieldModel && !optionModel.textRule1) {
|
350
|
+
let size = fieldModel.length;
|
351
|
+
let optionModel = this.field.options;
|
352
|
+
|
353
|
+
let str1 = "";
|
354
|
+
let str2 = "";
|
355
|
+
let flag2 = optionModel.textRule2 && optionModel.textRule2Number;
|
356
|
+
let flag3 = optionModel.textRule3 && optionModel.textRule3Number;
|
357
|
+
if (flag2) {
|
358
|
+
if (size >= optionModel.textRule2Number) {
|
359
|
+
str1 = fieldModel.slice(0, optionModel.textRule2Number)
|
360
|
+
}
|
361
|
+
}
|
362
|
+
if (flag3) {
|
363
|
+
if (size >= optionModel.textRule3Number) {
|
364
|
+
str2 = fieldModel.slice(-optionModel.textRule3Number)
|
365
|
+
}
|
366
|
+
}
|
367
|
+
if (flag2 && flag3) {
|
368
|
+
if (size >= optionModel.textRule2Number + optionModel.textRule3Number) {
|
369
|
+
showValue = str1 + "*****" + str2;
|
370
|
+
}
|
371
|
+
} else if (flag2) {
|
372
|
+
if (str1) {
|
373
|
+
showValue = str1 + "*****"
|
374
|
+
}
|
375
|
+
} else if (flag3) {
|
376
|
+
if (str2) {
|
377
|
+
showValue = "*****" + str2
|
378
|
+
}
|
379
|
+
}
|
380
|
+
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
}
|
385
|
+
|
386
|
+
return showValue;
|
387
|
+
},
|
256
388
|
|
257
389
|
}
|
258
390
|
}
|
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
:parent-widget="parentWidget" :parent-list="parentList"
|
6
6
|
:index-of-parent-list="indexOfParentList">
|
7
7
|
<el-button type="primary" class="button-sty" size="mini" icon="el-icon-download" @click="importHandle"
|
8
|
-
:disabled="field.options.disabled">{{
|
8
|
+
:disabled="field.options.disabled">{{ getI18nLabel(field.options.label)}}
|
9
9
|
</el-button>
|
10
10
|
</static-content-wrapper>
|
11
11
|
|
@@ -61,14 +61,11 @@ export default {
|
|
61
61
|
|
62
62
|
methods: {
|
63
63
|
importHandle() {
|
64
|
-
let scriptCode = this.field.options.importScriptCode;
|
65
|
-
let entity = this.field.options.importEntity;
|
66
|
-
let importAttachCode = this.field.options.importAttachCode;
|
67
|
-
// let importCodes = this.field.options.importCodes;
|
68
64
|
this.getFormRef().openImportDialog({
|
69
65
|
importOption: this.field.options,
|
70
|
-
|
71
|
-
|
66
|
+
importFrontOnly: false,
|
67
|
+
callback: (resultData, file, done) => {
|
68
|
+
|
72
69
|
}
|
73
70
|
});
|
74
71
|
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper
|
3
|
+
:designer="designer" :field="field" :design-state="designState"
|
4
|
+
:display-style="field.options.displayStyle"
|
5
|
+
:parent-widget="parentWidget" :parent-list="parentList"
|
6
|
+
:index-of-parent-list="indexOfParentList">
|
7
|
+
<el-button type="primary" class="button-sty" size="mini" icon="el-icon-download" @click="importHandle"
|
8
|
+
:disabled="field.options.disabled">{{ getI18nLabel(field.options.label)}}
|
9
|
+
</el-button>
|
10
|
+
</static-content-wrapper>
|
11
|
+
|
12
|
+
</template>
|
13
|
+
<script>
|
14
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
15
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
16
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
17
|
+
import StaticContentWrapper
|
18
|
+
from "../../../../../components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue";
|
19
|
+
|
20
|
+
export default {
|
21
|
+
name: "import2-button-widget",
|
22
|
+
components: {StaticContentWrapper},
|
23
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
24
|
+
mixins: [emitter, fieldMixin, i18n],
|
25
|
+
props: {
|
26
|
+
field: Object,
|
27
|
+
parentWidget: Object,
|
28
|
+
parentList: Array,
|
29
|
+
indexOfParentList: Number,
|
30
|
+
designer: Object,
|
31
|
+
designState: {
|
32
|
+
type: Boolean,
|
33
|
+
default: false
|
34
|
+
}
|
35
|
+
},
|
36
|
+
data() {
|
37
|
+
return {
|
38
|
+
exportOption: {}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
beforeCreate() {
|
42
|
+
/* 这里不能访问方法和属性!! */
|
43
|
+
},
|
44
|
+
created() {
|
45
|
+
|
46
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
47
|
+
需要在父组件created中初始化!! */
|
48
|
+
this.registerToRefList()
|
49
|
+
this.initEventHandler()
|
50
|
+
|
51
|
+
this.handleOnCreated()
|
52
|
+
},
|
53
|
+
|
54
|
+
mounted() {
|
55
|
+
this.handleOnMounted()
|
56
|
+
},
|
57
|
+
|
58
|
+
beforeDestroy() {
|
59
|
+
this.unregisterFromRefList()
|
60
|
+
},
|
61
|
+
|
62
|
+
methods: {
|
63
|
+
importHandle() {
|
64
|
+
this.getFormRef().openImportDialog({
|
65
|
+
importOption: this.field.options,
|
66
|
+
importFrontOnly: true,
|
67
|
+
callback: (resultData, file, done) => {
|
68
|
+
|
69
|
+
}
|
70
|
+
});
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
}
|
75
|
+
</script>
|
76
|
+
|
77
|
+
<style lang="scss" scoped>
|
78
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
79
|
+
|
80
|
+
</style>
|
@@ -6,12 +6,12 @@
|
|
6
6
|
:disabled="field.options.disabled" :size="field.options.size"
|
7
7
|
@change="handleChangeEvent">
|
8
8
|
<template v-if="!!field.options.buttonStyle">
|
9
|
-
<el-radio-button v-for="(item, index) in
|
9
|
+
<el-radio-button v-for="(item, index) in optionItems" :key="index" :label="item.value"
|
10
10
|
:disabled="item.disabled" :border="field.options.border"
|
11
11
|
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item.label) }}</el-radio-button>
|
12
12
|
</template>
|
13
13
|
<template v-else>
|
14
|
-
<el-radio v-for="(item, index) in
|
14
|
+
<el-radio v-for="(item, index) in optionItems" :key="index" :label="item[valueField]"
|
15
15
|
:disabled="item.disabled" :border="field.options.border"
|
16
16
|
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item[labelField]) }}</el-radio>
|
17
17
|
</template>
|
@@ -73,6 +73,9 @@
|
|
73
73
|
valueField(){
|
74
74
|
return this.field.options.valueKey || "value";
|
75
75
|
},
|
76
|
+
optionItems(){
|
77
|
+
return this.getOptionItems();
|
78
|
+
}
|
76
79
|
},
|
77
80
|
beforeCreate() {
|
78
81
|
/* 这里不能访问方法和属性!! */
|
@@ -18,7 +18,7 @@
|
|
18
18
|
@change="handleChangeEvent"
|
19
19
|
:style="'width:'+field.options.widgetWidth+' !important;'"
|
20
20
|
:class="{'custom-width':field.options.widgetWidth!=null}">
|
21
|
-
<el-option v-for="item in
|
21
|
+
<el-option v-for="(item,index) in optionItems" :key="index" :label="getI18nLabel(item[labelField])"
|
22
22
|
:value="item[valueField]" :disabled="item.disabled">
|
23
23
|
</el-option>
|
24
24
|
</el-select>
|
@@ -87,6 +87,9 @@ export default {
|
|
87
87
|
let optionItems = this.field.options.optionItems;
|
88
88
|
let optionItem = optionItems.find(item => item.value === fieldModel)
|
89
89
|
return optionItem && optionItem.label ? optionItem.label : null;
|
90
|
+
},
|
91
|
+
optionItems(){
|
92
|
+
return this.getOptionItems();
|
90
93
|
}
|
91
94
|
|
92
95
|
},
|
@@ -1,20 +1,29 @@
|
|
1
1
|
<template>
|
2
|
-
<form-item-wrapper
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<form-item-wrapper
|
3
|
+
:designer="designer"
|
4
|
+
:field="field"
|
5
|
+
:rules="rules"
|
6
|
+
:design-state="designState"
|
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>{{ showVaule }}</span>
|
6
15
|
</form-item-wrapper>
|
7
16
|
</template>
|
8
17
|
|
9
18
|
<script>
|
10
|
-
import FormItemWrapper from
|
11
|
-
import emitter from
|
19
|
+
import FormItemWrapper from "./form-item-wrapper";
|
20
|
+
import emitter from "../../../../../components/xform/utils/emitter";
|
12
21
|
import i18n from "../../../../../components/xform/utils/i18n";
|
13
22
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
14
23
|
|
15
24
|
export default {
|
16
25
|
name: "text-widget",
|
17
|
-
componentName:
|
26
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
18
27
|
mixins: [emitter, fieldMixin, i18n],
|
19
28
|
props: {
|
20
29
|
field: Object,
|
@@ -25,37 +34,40 @@ export default {
|
|
25
34
|
|
26
35
|
designState: {
|
27
36
|
type: Boolean,
|
28
|
-
default: false
|
37
|
+
default: false,
|
29
38
|
},
|
30
39
|
|
31
|
-
subFormRowIndex: {
|
32
|
-
type: Number,
|
33
|
-
default: -1
|
40
|
+
subFormRowIndex: {
|
41
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
42
|
+
default: -1,
|
34
43
|
},
|
35
|
-
subFormColIndex: {
|
36
|
-
type: Number,
|
37
|
-
default: -1
|
44
|
+
subFormColIndex: {
|
45
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
46
|
+
default: -1,
|
38
47
|
},
|
39
|
-
subFormRowId: {
|
40
|
-
type: String,
|
41
|
-
default:
|
48
|
+
subFormRowId: {
|
49
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
50
|
+
default: "",
|
42
51
|
},
|
43
|
-
|
44
52
|
},
|
45
53
|
components: {
|
46
54
|
FormItemWrapper,
|
47
55
|
},
|
48
|
-
inject: [
|
56
|
+
inject: ["refList", "globalOptionData", "globalModel"],
|
49
57
|
data() {
|
50
58
|
return {
|
51
59
|
oldFieldValue: null, //field组件change之前的值
|
52
60
|
fieldModel: null,
|
53
61
|
rules: [],
|
54
|
-
}
|
62
|
+
};
|
55
63
|
},
|
56
64
|
computed: {
|
57
|
-
|
58
|
-
|
65
|
+
showVaule() {
|
66
|
+
let value = !this.field.options.autoValueEnabled
|
67
|
+
? this.fieldModel
|
68
|
+
: this.handleCustomEvent(this.field.options.autoValueHanlde);
|
69
|
+
return value;
|
70
|
+
},
|
59
71
|
},
|
60
72
|
beforeCreate() {
|
61
73
|
/* 这里不能访问方法和属性!! */
|
@@ -64,29 +76,29 @@ export default {
|
|
64
76
|
created() {
|
65
77
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
66
78
|
需要在父组件created中初始化!! */
|
67
|
-
this.initFieldModel()
|
68
|
-
this.registerToRefList()
|
69
|
-
this.initEventHandler()
|
70
|
-
this.buildFieldRules()
|
79
|
+
this.initFieldModel();
|
80
|
+
this.registerToRefList();
|
81
|
+
this.initEventHandler();
|
82
|
+
this.buildFieldRules();
|
71
83
|
|
72
|
-
this.handleOnCreated()
|
84
|
+
this.handleOnCreated();
|
73
85
|
},
|
74
86
|
|
75
87
|
mounted() {
|
76
|
-
this.handleOnMounted()
|
88
|
+
this.handleOnMounted();
|
77
89
|
},
|
78
90
|
|
79
91
|
beforeDestroy() {
|
80
|
-
this.unregisterFromRefList()
|
92
|
+
this.unregisterFromRefList();
|
81
93
|
},
|
82
94
|
|
83
|
-
methods: {
|
84
|
-
|
85
|
-
}
|
86
|
-
}
|
95
|
+
methods: {},
|
96
|
+
};
|
87
97
|
</script>
|
88
98
|
|
89
99
|
<style lang="scss" scoped>
|
90
100
|
@import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
91
|
-
::v-deep .el-form-item{
|
101
|
+
::v-deep .el-form-item {
|
102
|
+
min-height: 34px;
|
103
|
+
}
|
92
104
|
</style>
|
@@ -17,6 +17,12 @@
|
|
17
17
|
resultType="Array"
|
18
18
|
:edit="!field.options.disabled"
|
19
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"
|
20
26
|
v-else></baseUpload>
|
21
27
|
</form-item-wrapper>
|
22
28
|
</template>
|