cloud-web-corejs 1.0.281 → 1.1.0-dev.4
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 +6 -2
- package/src/components/VabUpload/image-viewer.vue +442 -442
- package/src/components/VabUpload/index.vue +44 -2
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +247 -209
- package/src/components/baseTabs/mixins.js +181 -181
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +705 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +23 -12
- package/src/components/excelExport/exportItemConfigUtil.js +30 -0
- package/src/components/excelExport/mixins.js +3 -3
- package/src/components/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/content.vue +1662 -1556
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/table/config.js +78 -78
- package/src/components/table/index.js +1276 -1276
- package/src/components/table/plugins/cell-area/index.js +1055 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/table/tableForm.vue +330 -330
- package/src/components/table/tableFormMixin.js +318 -318
- package/src/components/table/vxeFilter/index.js +163 -163
- package/src/components/table/vxeFilter/mixin.js +316 -316
- package/src/components/wf/content.vue +1188 -1188
- package/src/components/wf/wf.js +40 -20
- package/src/components/wf/wfActionDropdown.vue +1 -1
- package/src/components/wf/wfActionItems.js +1 -1
- package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
- package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
- package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
- package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
- package/src/components/xform/form-designer/designer.js +15 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
- package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
- package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
- package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +12 -0
- package/src/components/xform/lang/en-US.js +10 -0
- package/src/components/xform/lang/zh-CN.js +12 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +1992 -0
- package/src/components/xform/utils/textMaskUtil.js +182 -179
- package/src/components/xform/utils/treeTableUtil.js +1292 -1265
- package/src/components/xform/utils/util.js +56 -11
- package/src/index.js +9 -4
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +21 -0
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +31 -0
- package/src/views/bd/project/branch/form_template/list.vue +30 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +225 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +85 -0
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/table_model/edit.vue +1066 -1066
- package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
- package/src/views/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/file_view_ins/list.vue +3 -3
- package/src/views/user/home/index.vue +8 -6
- package/src/views/user/home/wjl/content.vue +1569 -0
- package/src/views/user/notify_message/dialog.vue +7 -5
- package/src/views/user/outLink/cc_form_view.vue +188 -0
- package/src/views/user/outLink/form_view.vue +2 -2
- package/src/views/user/outLink/index.vue +4 -4
- package/src/views/user/outLink/view.vue +3 -3
- package/src/views/user/role/edit.vue +632 -632
- package/src/views/user/role/list.vue +260 -260
- package/src/views/user/wf/iframe/index.vue +3 -3
- package/src/views/user/wf/iframe/index2.vue +3 -3
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +9 -13
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
- package/src/utils/wf.js +0 -766
|
@@ -1,154 +1,154 @@
|
|
|
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
|
-
<el-date-picker ref="fieldEditor" :type="field.options.type" v-model="fieldModel" v-show="!isReadMode" class="full-width-input"
|
|
7
|
-
:readonly="field.options.readonly" :disabled="field.options.disabled"
|
|
8
|
-
:size="field.options.size"
|
|
9
|
-
:clearable="field.options.clearable" :editable="field.options.editable"
|
|
10
|
-
:format="field.options.format" :value-format="field.options.valueFormat"
|
|
11
|
-
:placeholder="getI18nLabel(field.options.placeholder || '选择日期')"
|
|
12
|
-
@focus="handleDateFocusEvent" @blur="handleBlurCustomEvent"
|
|
13
|
-
@change="handleDateChangeEvent"
|
|
14
|
-
:picker-options="pickerOptions"
|
|
15
|
-
>
|
|
16
|
-
</el-date-picker>
|
|
17
|
-
<template v-if="isReadMode">
|
|
18
|
-
<span class="readonly-mode-field">{{contentForReadMode}}</span>
|
|
19
|
-
</template>
|
|
20
|
-
</form-item-wrapper>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
import FormItemWrapper from './form-item-wrapper'
|
|
25
|
-
import emitter from '../../../../../components/xform/utils/emitter'
|
|
26
|
-
import i18n from "../../../../../components/xform/utils/i18n";
|
|
27
|
-
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
28
|
-
import dateLimitMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin";
|
|
29
|
-
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
30
|
-
import relativeDefaultMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin";
|
|
31
|
-
|
|
32
|
-
export default {
|
|
33
|
-
name: "date-widget",
|
|
34
|
-
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
35
|
-
mixins: [emitter, fieldMixin, i18n, dateLimitMixin, utcTransformMixin, relativeDefaultMixin],
|
|
36
|
-
props: {
|
|
37
|
-
field: Object,
|
|
38
|
-
parentWidget: Object,
|
|
39
|
-
parentList: Array,
|
|
40
|
-
indexOfParentList: Number,
|
|
41
|
-
designer: Object,
|
|
42
|
-
|
|
43
|
-
designState: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
|
49
|
-
type: Number,
|
|
50
|
-
default: -1
|
|
51
|
-
},
|
|
52
|
-
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
|
53
|
-
type: Number,
|
|
54
|
-
default: -1
|
|
55
|
-
},
|
|
56
|
-
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
|
57
|
-
type: String,
|
|
58
|
-
default: ''
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
components: {
|
|
63
|
-
FormItemWrapper,
|
|
64
|
-
},
|
|
65
|
-
inject: ['refList', 'globalOptionData', 'globalModel'],
|
|
66
|
-
data() {
|
|
67
|
-
return {
|
|
68
|
-
oldFieldValue: null, //field组件change之前的值
|
|
69
|
-
fieldModel: null,
|
|
70
|
-
rules: [],
|
|
71
|
-
pickerOptions: {}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
computed: {
|
|
75
|
-
contentForReadMode() {
|
|
76
|
-
if (!this.fieldModel) {
|
|
77
|
-
return '';
|
|
78
|
-
}
|
|
79
|
-
return this.fieldModel;
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
watch: {
|
|
83
|
-
"field.options.limitStartField"() {
|
|
84
|
-
this.initDateLimitPickerOptions();
|
|
85
|
-
},
|
|
86
|
-
"field.options.limitEndField"() {
|
|
87
|
-
this.initDateLimitPickerOptions();
|
|
88
|
-
},
|
|
89
|
-
"field.options.minDate"() {
|
|
90
|
-
this.initDateLimitPickerOptions();
|
|
91
|
-
},
|
|
92
|
-
"field.options.maxDate"() {
|
|
93
|
-
this.initDateLimitPickerOptions();
|
|
94
|
-
},
|
|
95
|
-
"field.options.minDateType"() {
|
|
96
|
-
this.initDateLimitPickerOptions();
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
beforeCreate() {
|
|
100
|
-
/* 这里不能访问方法和属性!! */
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
created() {
|
|
104
|
-
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
105
|
-
需要在父组件created中初始化!! */
|
|
106
|
-
this.initRelativeFieldModel()
|
|
107
|
-
this.registerToRefList()
|
|
108
|
-
this.initEventHandler()
|
|
109
|
-
this.buildFieldRules()
|
|
110
|
-
|
|
111
|
-
this.handleOnCreated()
|
|
112
|
-
this.initDateLimitPickerOptions()
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
mounted() {
|
|
116
|
-
this.handleOnMounted()
|
|
117
|
-
this.initDateLimitWatch()
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
beforeDestroy() {
|
|
121
|
-
this.unregisterFromRefList()
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
methods: {
|
|
125
|
-
handleDateFocusEvent(event) {
|
|
126
|
-
/* 最小日期为「当前时间」时,每次展开面板都需按当前时刻重新计算 */
|
|
127
|
-
if (this.isNowDateValueType(this.field.options.minDateType)) {
|
|
128
|
-
this.initDateLimitPickerOptions();
|
|
129
|
-
}
|
|
130
|
-
this.handleFocusCustomEvent(event);
|
|
131
|
-
},
|
|
132
|
-
handleDateChangeEvent(value) {
|
|
133
|
-
if (this.isDateLimitViolated(value)) {
|
|
134
|
-
this.$message.warning(this.getDateLimitViolationMessage());
|
|
135
|
-
this.fieldModel = this.oldFieldValue;
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
this.handleChangeEvent(value);
|
|
139
|
-
},
|
|
140
|
-
setNow() {
|
|
141
|
-
this.$refs.fieldEditor.panel.changeToNow()
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
</script>
|
|
146
|
-
|
|
147
|
-
<style lang="scss" scoped>
|
|
148
|
-
@import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
|
149
|
-
|
|
150
|
-
.full-width-input {
|
|
151
|
-
width: 100% !important;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
</style>
|
|
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
|
+
<el-date-picker ref="fieldEditor" :type="field.options.type" v-model="fieldModel" v-show="!isReadMode" class="full-width-input"
|
|
7
|
+
:readonly="field.options.readonly" :disabled="field.options.disabled"
|
|
8
|
+
:size="field.options.size"
|
|
9
|
+
:clearable="field.options.clearable" :editable="field.options.editable"
|
|
10
|
+
:format="field.options.format" :value-format="field.options.valueFormat"
|
|
11
|
+
:placeholder="getI18nLabel(field.options.placeholder || '选择日期')"
|
|
12
|
+
@focus="handleDateFocusEvent" @blur="handleBlurCustomEvent"
|
|
13
|
+
@change="handleDateChangeEvent"
|
|
14
|
+
:picker-options="pickerOptions"
|
|
15
|
+
>
|
|
16
|
+
</el-date-picker>
|
|
17
|
+
<template v-if="isReadMode">
|
|
18
|
+
<span class="readonly-mode-field">{{contentForReadMode}}</span>
|
|
19
|
+
</template>
|
|
20
|
+
</form-item-wrapper>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import FormItemWrapper from './form-item-wrapper'
|
|
25
|
+
import emitter from '../../../../../components/xform/utils/emitter'
|
|
26
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
27
|
+
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
28
|
+
import dateLimitMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin";
|
|
29
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
30
|
+
import relativeDefaultMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: "date-widget",
|
|
34
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
35
|
+
mixins: [emitter, fieldMixin, i18n, dateLimitMixin, utcTransformMixin, relativeDefaultMixin],
|
|
36
|
+
props: {
|
|
37
|
+
field: Object,
|
|
38
|
+
parentWidget: Object,
|
|
39
|
+
parentList: Array,
|
|
40
|
+
indexOfParentList: Number,
|
|
41
|
+
designer: Object,
|
|
42
|
+
|
|
43
|
+
designState: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
|
49
|
+
type: Number,
|
|
50
|
+
default: -1
|
|
51
|
+
},
|
|
52
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
|
53
|
+
type: Number,
|
|
54
|
+
default: -1
|
|
55
|
+
},
|
|
56
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
|
57
|
+
type: String,
|
|
58
|
+
default: ''
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
FormItemWrapper,
|
|
64
|
+
},
|
|
65
|
+
inject: ['refList', 'globalOptionData', 'globalModel'],
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
oldFieldValue: null, //field组件change之前的值
|
|
69
|
+
fieldModel: null,
|
|
70
|
+
rules: [],
|
|
71
|
+
pickerOptions: {}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
computed: {
|
|
75
|
+
contentForReadMode() {
|
|
76
|
+
if (!this.fieldModel) {
|
|
77
|
+
return '';
|
|
78
|
+
}
|
|
79
|
+
return this.fieldModel;
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
watch: {
|
|
83
|
+
"field.options.limitStartField"() {
|
|
84
|
+
this.initDateLimitPickerOptions();
|
|
85
|
+
},
|
|
86
|
+
"field.options.limitEndField"() {
|
|
87
|
+
this.initDateLimitPickerOptions();
|
|
88
|
+
},
|
|
89
|
+
"field.options.minDate"() {
|
|
90
|
+
this.initDateLimitPickerOptions();
|
|
91
|
+
},
|
|
92
|
+
"field.options.maxDate"() {
|
|
93
|
+
this.initDateLimitPickerOptions();
|
|
94
|
+
},
|
|
95
|
+
"field.options.minDateType"() {
|
|
96
|
+
this.initDateLimitPickerOptions();
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
beforeCreate() {
|
|
100
|
+
/* 这里不能访问方法和属性!! */
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
created() {
|
|
104
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
105
|
+
需要在父组件created中初始化!! */
|
|
106
|
+
this.initRelativeFieldModel()
|
|
107
|
+
this.registerToRefList()
|
|
108
|
+
this.initEventHandler()
|
|
109
|
+
this.buildFieldRules()
|
|
110
|
+
|
|
111
|
+
this.handleOnCreated()
|
|
112
|
+
this.initDateLimitPickerOptions()
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
mounted() {
|
|
116
|
+
this.handleOnMounted()
|
|
117
|
+
this.initDateLimitWatch()
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
beforeDestroy() {
|
|
121
|
+
this.unregisterFromRefList()
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
methods: {
|
|
125
|
+
handleDateFocusEvent(event) {
|
|
126
|
+
/* 最小日期为「当前时间」时,每次展开面板都需按当前时刻重新计算 */
|
|
127
|
+
if (this.isNowDateValueType(this.field.options.minDateType)) {
|
|
128
|
+
this.initDateLimitPickerOptions();
|
|
129
|
+
}
|
|
130
|
+
this.handleFocusCustomEvent(event);
|
|
131
|
+
},
|
|
132
|
+
handleDateChangeEvent(value) {
|
|
133
|
+
if (this.isDateLimitViolated(value)) {
|
|
134
|
+
this.$message.warning(this.getDateLimitViolationMessage());
|
|
135
|
+
this.fieldModel = this.oldFieldValue;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this.handleChangeEvent(value);
|
|
139
|
+
},
|
|
140
|
+
setNow() {
|
|
141
|
+
this.$refs.fieldEditor.panel.changeToNow()
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style lang="scss" scoped>
|
|
148
|
+
@import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
|
149
|
+
|
|
150
|
+
.full-width-input {
|
|
151
|
+
width: 100% !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
</style>
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
<template>
|
|
12
12
|
<div
|
|
13
13
|
class="field-wrapper"
|
|
14
|
-
:class="
|
|
14
|
+
:class="[
|
|
15
|
+
{ 'design-time-bottom-margin': !!this.designer },
|
|
16
|
+
isH5Field ? 'h5-field' : '',
|
|
17
|
+
field.options.h5Span === 'half' ? 'h5-half' : '',
|
|
18
|
+
isH5BlockField ? 'h5-block' : '',
|
|
19
|
+
]"
|
|
15
20
|
v-show="!field.options.hidden || designState === true"
|
|
16
21
|
>
|
|
17
22
|
<div>
|
|
@@ -258,6 +263,18 @@ import {
|
|
|
258
263
|
resolveTextMaskFlag,
|
|
259
264
|
} from "../../../../../components/xform/utils/textMaskUtil";
|
|
260
265
|
|
|
266
|
+
/* H5 版式下独占整行、左对齐的「宽内容」字段(见 isH5BlockField) */
|
|
267
|
+
const H5_BLOCK_FIELD_TYPES = [
|
|
268
|
+
"vabUpload",
|
|
269
|
+
"vabUpload2",
|
|
270
|
+
"baseAttachment",
|
|
271
|
+
"singleUpload",
|
|
272
|
+
"picture-upload",
|
|
273
|
+
"file-upload",
|
|
274
|
+
"rich-editor",
|
|
275
|
+
"html-text",
|
|
276
|
+
];
|
|
277
|
+
|
|
261
278
|
export default {
|
|
262
279
|
name: "form-item-wrapper",
|
|
263
280
|
mixins: [i18n],
|
|
@@ -362,6 +379,35 @@ export default {
|
|
|
362
379
|
: "";
|
|
363
380
|
},
|
|
364
381
|
|
|
382
|
+
/**
|
|
383
|
+
* H5 版式下的「宽内容」字段:附件、图片、富文本这类,
|
|
384
|
+
* 内容本身是一片区域而不是一行值。
|
|
385
|
+
*
|
|
386
|
+
* H5 的紧凑行版式(标签定宽 80px + 内容右对齐,见 styles/h5.scss 块 C/D)
|
|
387
|
+
* 是给单行输入设计的,套到这些字段上会把附件列表挤到右边贴着边框、
|
|
388
|
+
* 文件名压线。打上 h5-block 后由样式让它们独占整行、左对齐。
|
|
389
|
+
*/
|
|
390
|
+
isH5BlockField() {
|
|
391
|
+
return H5_BLOCK_FIELD_TYPES.indexOf(this.field.type) > -1;
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* H5 版式的字段行锚点。整套 H5 行版式(styles/h5.scss 块 C/C1/C2/C3/D/E)都挂在
|
|
396
|
+
* .field-wrapper.h5-field 上,与容器解耦。
|
|
397
|
+
*
|
|
398
|
+
* 原先锚在 `.h5-detail-wrap .h5-item .h5-form-box`,而 `.h5-item` 只有
|
|
399
|
+
* h5-card-pane 会吐(h5-card-pane-item.vue),h5-card 吐的是 `.grid-cell`,
|
|
400
|
+
* 字段/表格直挂 detail-h5.panes 时(设计器的 draggable 是单一 dragGroup,
|
|
401
|
+
* 任何容器都能拖进去)连 `.h5-form-box` 都没有 —— 这些摆法下整套行版式会
|
|
402
|
+
* 静默落空,表现为「标签右对齐、值左对齐」(element 默认),与卡片内的
|
|
403
|
+
* 「标签左、值右」对不上。
|
|
404
|
+
*
|
|
405
|
+
* PC 版式不打这个类,故 PC 表单零影响。
|
|
406
|
+
*/
|
|
407
|
+
isH5Field() {
|
|
408
|
+
return this.formConfig?.layoutType === "H5";
|
|
409
|
+
},
|
|
410
|
+
|
|
365
411
|
subFormName() {
|
|
366
412
|
return !!this.parentWidget ? this.parentWidget.options.name : "";
|
|
367
413
|
},
|