cloud-web-corejs 1.1.0-dev.6 → 1.1.0-dev.8
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 +27 -26
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +110 -67
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/selectUserDialog.vue +122 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/xform/form-designer/designer.js +36 -52
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
- package/src/components/xform/form-designer/indexMixin.js +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
- package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +15 -2
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
- package/src/components/xform/form-render/indexMixin.js +23 -3
- package/src/components/xform/styles/h5.scss +775 -588
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +4 -0
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/router/index.js +48 -48
- package/src/utils/vab.js +1283 -1283
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/index.vue +103 -103
- package/src/views/user/notify_message/dialog.vue +139 -139
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list2.vue +871 -871
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="showContent">
|
|
3
|
-
<el-dialog
|
|
4
|
-
:title="$t2('导入', 'components.excelImport.title')"
|
|
5
|
-
:append-to-body="true"
|
|
6
|
-
:modal-append-to-body="falseValue"
|
|
7
|
-
:close-on-click-modal="falseValue"
|
|
8
|
-
:visible.sync="showImportDialog"
|
|
9
|
-
:modal="falseValue"
|
|
10
|
-
custom-class="dialog-style"
|
|
11
|
-
width="501px"
|
|
12
|
-
v-el-drag-dialog
|
|
13
|
-
@close="dialogClose1"
|
|
14
|
-
>
|
|
15
|
-
<div class="import-box">
|
|
16
|
-
<div class="tips">{{ $t2('请下载文件模板,填写信息后再上传文件', 'components.excelImport.tip') }}</div>
|
|
17
|
-
<el-button type="success" plain class="button-sty template-btn" @click="commonLocalDownload()">
|
|
18
|
-
{{ $t2('模板下载', 'components.excelImport.downloadBUtton') }}
|
|
19
|
-
</el-button>
|
|
20
|
-
<el-upload v-if="!fileRaw" ref="uploadBtn" action="" class="upload-file" :auto-upload="false"
|
|
21
|
-
:on-change="fileChange">
|
|
22
|
-
<div class="el-upload-dragger">
|
|
23
|
-
<i class="el-icon-upload"></i>
|
|
24
|
-
<div class="el-upload__text"><em>{{ $t2('点击上传', 'components.excelImport.uploadBUtton') }}</em></div>
|
|
25
|
-
</div>
|
|
26
|
-
</el-upload>
|
|
27
|
-
<div class="upload-finish" v-if="fileRaw">
|
|
28
|
-
<img :src="$assetUrl(require('@/resources' + '/images/ico-excel.svg'))" class="ico"/>
|
|
29
|
-
<p class="name">{{ fileRaw.name }}</p>
|
|
30
|
-
<!-- <p>2022-1-17</p> -->
|
|
31
|
-
<el-tooltip :enterable="false" class="item" effect="dark"
|
|
32
|
-
:content="$t2('关闭', 'components.excelImport.closeBUtton')" placement="bottom">
|
|
33
|
-
<i
|
|
34
|
-
class="el-icon-error js-close"
|
|
35
|
-
@click="
|
|
36
|
-
fileRaw = false;
|
|
37
|
-
$refs.uploadBtn.clearFiles();
|
|
38
|
-
"
|
|
39
|
-
></i>
|
|
40
|
-
</el-tooltip>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<span slot="footer" class="dialog-footer">
|
|
44
|
-
<span class="fl tips">{{ $t1('注:导入文件不允许超过{fileSize}MB', {fileSize: importFileLimitSize}) }}</span>
|
|
45
|
-
<el-button type="primary" plain class="button-sty" @click="dialogClose1">
|
|
46
|
-
<i class="el-icon-close el-icon"></i>
|
|
47
|
-
{{ $t2('取 消', 'system.button.cancel2') }}
|
|
48
|
-
</el-button>
|
|
49
|
-
<el-button type="primary" @click="dialogPrimary1" class="button-sty">
|
|
50
|
-
<i class="el-icon-check el-icon"></i>
|
|
51
|
-
{{ $t2('确 定', 'system.button.confirm2') }}
|
|
52
|
-
</el-button>
|
|
53
|
-
</span>
|
|
54
|
-
</el-dialog>
|
|
55
|
-
<el-dialog
|
|
56
|
-
ref="importDialog"
|
|
57
|
-
:title="$t2('导入', 'components.excelImport.title')"
|
|
58
|
-
:append-to-body="true"
|
|
59
|
-
:modal-append-to-body="falseValue"
|
|
60
|
-
:close-on-click-modal="falseValue"
|
|
61
|
-
:visible.sync="showImportDialog2"
|
|
62
|
-
:modal="falseValue"
|
|
63
|
-
custom-class="dialog-style"
|
|
64
|
-
width="501px"
|
|
65
|
-
height="250px"
|
|
66
|
-
:beforeClose="handleBeforeClose"
|
|
67
|
-
@close="handleClose2"
|
|
68
|
-
v-el-drag-dialog
|
|
69
|
-
>
|
|
70
|
-
<div>
|
|
71
|
-
<div v-show="importLoading" class="import-stepbox">
|
|
72
|
-
<ul>
|
|
73
|
-
<li :class="getLoadingClass(1,percent1)">
|
|
74
|
-
<i class="el-icon-circle-check"></i>
|
|
75
|
-
<i class="el-icon-loading"></i>
|
|
76
|
-
<span v-html="$t1('上传导入文件 {percent}', {percent: `<span class=nums>${percent1}%</span>`})"></span>
|
|
77
|
-
</li>
|
|
78
|
-
<li :class="getLoadingClass(2,percent2)">
|
|
79
|
-
<i class="el-icon-circle-check"></i>
|
|
80
|
-
<i class="el-icon-loading"></i>
|
|
81
|
-
<span
|
|
82
|
-
v-html="$t1('校验导入文件中的图片数据格式 {percent}', {percent: `<span class=nums>${percent2}%</span>`})"></span>
|
|
83
|
-
</li>
|
|
84
|
-
<li :class="getLoadingClass(3,percent3)">
|
|
85
|
-
<i class="el-icon-circle-check"></i>
|
|
86
|
-
<i class="el-icon-loading"></i>
|
|
87
|
-
<span
|
|
88
|
-
v-html="$t1('存储导入文件中的图片 {percent}', {percent: `<span class=nums>${percent3}%</span>`})"></span>
|
|
89
|
-
</li>
|
|
90
|
-
</ul>
|
|
91
|
-
</div>
|
|
92
|
-
<div v-show="!importLoading" class="import-box" style="margin-bottom: 30px;">
|
|
93
|
-
<div class="tips">
|
|
94
|
-
{{ $t2('导入中,请勿关闭当前窗口', 'components.excelImport.tip2') }}
|
|
95
|
-
<!-- <span class="fr">耗时:<em class="time-txt">0 时 0 分 0 秒 </em></span> -->
|
|
96
|
-
</div>
|
|
97
|
-
<el-progress :text-inside="true" :stroke-width="26" :percentage="percentageNum"
|
|
98
|
-
class="export-progress"></el-progress>
|
|
99
|
-
<div class="i-status">
|
|
100
|
-
<div class="item">
|
|
101
|
-
<i class="el-icon-success f-green"></i>
|
|
102
|
-
{{ $t2('成功', 'components.excelImport.success') }}:
|
|
103
|
-
<span class="successNum" @click="showSuccessResult">{{ totalSuccessNum }}</span>
|
|
104
|
-
</div>
|
|
105
|
-
<div class="item">
|
|
106
|
-
<i class="el-icon-error f-red"></i>
|
|
107
|
-
{{ $t2('失败', 'components.excelImport.fail') }}:
|
|
108
|
-
<span class="failNum" @click="showErrorResult">{{ totalErrorNum }}</span>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<div slot="footer" class="dialog-footer" center="true">
|
|
114
|
-
<div class="fl import-count" v-show="!importLoading">
|
|
115
|
-
<span class="f-red doneNum">0</span>
|
|
116
|
-
/
|
|
117
|
-
<span class="dataSize">0</span>
|
|
118
|
-
</div>
|
|
119
|
-
<el-button type="primary" plain class="button-sty" @click="dialogClose2" v-if="!param.importOption.hideCancelButton">
|
|
120
|
-
<i class="el-icon-close el-icon"></i>
|
|
121
|
-
{{ $t2('取 消', 'system.button.cancel2') }}
|
|
122
|
-
</el-button>
|
|
123
|
-
<el-button type="primary" class="button-sty" @click="dialogPrimary2">
|
|
124
|
-
<i class="el-icon-check el-icon"></i>
|
|
125
|
-
{{ $t2('确 定', 'system.button.confirm2') }}
|
|
126
|
-
</el-button>
|
|
127
|
-
</div>
|
|
128
|
-
</el-dialog>
|
|
129
|
-
<el-dialog
|
|
130
|
-
:title="$t2('结果', 'components.excelImport.resultTitle')"
|
|
131
|
-
:append-to-body="true"
|
|
132
|
-
:modal-append-to-body="true"
|
|
133
|
-
:close-on-click-modal="falseValue"
|
|
134
|
-
:visible.sync="showImportResult"
|
|
135
|
-
:modal="falseValue"
|
|
136
|
-
custom-class="dialog-style list-dialog"
|
|
137
|
-
width="1200px"
|
|
138
|
-
v-el-drag-dialog
|
|
139
|
-
>
|
|
140
|
-
<div>
|
|
141
|
-
<div class="box-style">
|
|
142
|
-
<div class="cont">
|
|
143
|
-
<div class="table-div">
|
|
144
|
-
<vxe-grid
|
|
145
|
-
id="resGrid"
|
|
146
|
-
ref="resGrid"
|
|
147
|
-
height="440px"
|
|
148
|
-
v-bind="resOption"
|
|
149
|
-
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
150
|
-
@custom="$vxeTableUtil.customHandle"
|
|
151
|
-
>
|
|
152
|
-
<template #form>
|
|
153
|
-
<div class="clearfix screen-btns">
|
|
154
|
-
<div class="fl">
|
|
155
|
-
<vxe-button status="primary" class="button-sty" icon="el-icon-upload2" @click="exportToExcel()">
|
|
156
|
-
{{ $t1('导出') }}
|
|
157
|
-
</vxe-button>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="fr"></div>
|
|
160
|
-
</div>
|
|
161
|
-
</template>
|
|
162
|
-
<template #attachment="{row,column}">
|
|
163
|
-
<base-attachment :option="{
|
|
164
|
-
title: column.title,
|
|
165
|
-
rows: row[column.field],
|
|
166
|
-
showViewButton: true,
|
|
167
|
-
edit:false
|
|
168
|
-
}"/>
|
|
169
|
-
</template>
|
|
170
|
-
</vxe-grid>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
</el-dialog>
|
|
176
|
-
</div>
|
|
177
|
-
</template>
|
|
178
|
-
|
|
179
|
-
<script>
|
|
180
|
-
import {mixins} from './importDialogMixin';
|
|
181
|
-
|
|
182
|
-
export default {
|
|
183
|
-
mixins: [mixins]
|
|
184
|
-
};
|
|
185
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="showContent">
|
|
3
|
+
<el-dialog
|
|
4
|
+
:title="$t2('导入', 'components.excelImport.title')"
|
|
5
|
+
:append-to-body="true"
|
|
6
|
+
:modal-append-to-body="falseValue"
|
|
7
|
+
:close-on-click-modal="falseValue"
|
|
8
|
+
:visible.sync="showImportDialog"
|
|
9
|
+
:modal="falseValue"
|
|
10
|
+
custom-class="dialog-style"
|
|
11
|
+
width="501px"
|
|
12
|
+
v-el-drag-dialog
|
|
13
|
+
@close="dialogClose1"
|
|
14
|
+
>
|
|
15
|
+
<div class="import-box">
|
|
16
|
+
<div class="tips">{{ $t2('请下载文件模板,填写信息后再上传文件', 'components.excelImport.tip') }}</div>
|
|
17
|
+
<el-button type="success" plain class="button-sty template-btn" @click="commonLocalDownload()">
|
|
18
|
+
{{ $t2('模板下载', 'components.excelImport.downloadBUtton') }}
|
|
19
|
+
</el-button>
|
|
20
|
+
<el-upload v-if="!fileRaw" ref="uploadBtn" action="" class="upload-file" :auto-upload="false"
|
|
21
|
+
:on-change="fileChange">
|
|
22
|
+
<div class="el-upload-dragger">
|
|
23
|
+
<i class="el-icon-upload"></i>
|
|
24
|
+
<div class="el-upload__text"><em>{{ $t2('点击上传', 'components.excelImport.uploadBUtton') }}</em></div>
|
|
25
|
+
</div>
|
|
26
|
+
</el-upload>
|
|
27
|
+
<div class="upload-finish" v-if="fileRaw">
|
|
28
|
+
<img :src="$assetUrl(require('@/resources' + '/images/ico-excel.svg'))" class="ico"/>
|
|
29
|
+
<p class="name">{{ fileRaw.name }}</p>
|
|
30
|
+
<!-- <p>2022-1-17</p> -->
|
|
31
|
+
<el-tooltip :enterable="false" class="item" effect="dark"
|
|
32
|
+
:content="$t2('关闭', 'components.excelImport.closeBUtton')" placement="bottom">
|
|
33
|
+
<i
|
|
34
|
+
class="el-icon-error js-close"
|
|
35
|
+
@click="
|
|
36
|
+
fileRaw = false;
|
|
37
|
+
$refs.uploadBtn.clearFiles();
|
|
38
|
+
"
|
|
39
|
+
></i>
|
|
40
|
+
</el-tooltip>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<span slot="footer" class="dialog-footer">
|
|
44
|
+
<span class="fl tips">{{ $t1('注:导入文件不允许超过{fileSize}MB', {fileSize: importFileLimitSize}) }}</span>
|
|
45
|
+
<el-button type="primary" plain class="button-sty" @click="dialogClose1">
|
|
46
|
+
<i class="el-icon-close el-icon"></i>
|
|
47
|
+
{{ $t2('取 消', 'system.button.cancel2') }}
|
|
48
|
+
</el-button>
|
|
49
|
+
<el-button type="primary" @click="dialogPrimary1" class="button-sty">
|
|
50
|
+
<i class="el-icon-check el-icon"></i>
|
|
51
|
+
{{ $t2('确 定', 'system.button.confirm2') }}
|
|
52
|
+
</el-button>
|
|
53
|
+
</span>
|
|
54
|
+
</el-dialog>
|
|
55
|
+
<el-dialog
|
|
56
|
+
ref="importDialog"
|
|
57
|
+
:title="$t2('导入', 'components.excelImport.title')"
|
|
58
|
+
:append-to-body="true"
|
|
59
|
+
:modal-append-to-body="falseValue"
|
|
60
|
+
:close-on-click-modal="falseValue"
|
|
61
|
+
:visible.sync="showImportDialog2"
|
|
62
|
+
:modal="falseValue"
|
|
63
|
+
custom-class="dialog-style"
|
|
64
|
+
width="501px"
|
|
65
|
+
height="250px"
|
|
66
|
+
:beforeClose="handleBeforeClose"
|
|
67
|
+
@close="handleClose2"
|
|
68
|
+
v-el-drag-dialog
|
|
69
|
+
>
|
|
70
|
+
<div>
|
|
71
|
+
<div v-show="importLoading" class="import-stepbox">
|
|
72
|
+
<ul>
|
|
73
|
+
<li :class="getLoadingClass(1,percent1)">
|
|
74
|
+
<i class="el-icon-circle-check"></i>
|
|
75
|
+
<i class="el-icon-loading"></i>
|
|
76
|
+
<span v-html="$t1('上传导入文件 {percent}', {percent: `<span class=nums>${percent1}%</span>`})"></span>
|
|
77
|
+
</li>
|
|
78
|
+
<li :class="getLoadingClass(2,percent2)">
|
|
79
|
+
<i class="el-icon-circle-check"></i>
|
|
80
|
+
<i class="el-icon-loading"></i>
|
|
81
|
+
<span
|
|
82
|
+
v-html="$t1('校验导入文件中的图片数据格式 {percent}', {percent: `<span class=nums>${percent2}%</span>`})"></span>
|
|
83
|
+
</li>
|
|
84
|
+
<li :class="getLoadingClass(3,percent3)">
|
|
85
|
+
<i class="el-icon-circle-check"></i>
|
|
86
|
+
<i class="el-icon-loading"></i>
|
|
87
|
+
<span
|
|
88
|
+
v-html="$t1('存储导入文件中的图片 {percent}', {percent: `<span class=nums>${percent3}%</span>`})"></span>
|
|
89
|
+
</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
<div v-show="!importLoading" class="import-box" style="margin-bottom: 30px;">
|
|
93
|
+
<div class="tips">
|
|
94
|
+
{{ $t2('导入中,请勿关闭当前窗口', 'components.excelImport.tip2') }}
|
|
95
|
+
<!-- <span class="fr">耗时:<em class="time-txt">0 时 0 分 0 秒 </em></span> -->
|
|
96
|
+
</div>
|
|
97
|
+
<el-progress :text-inside="true" :stroke-width="26" :percentage="percentageNum"
|
|
98
|
+
class="export-progress"></el-progress>
|
|
99
|
+
<div class="i-status">
|
|
100
|
+
<div class="item">
|
|
101
|
+
<i class="el-icon-success f-green"></i>
|
|
102
|
+
{{ $t2('成功', 'components.excelImport.success') }}:
|
|
103
|
+
<span class="successNum" @click="showSuccessResult">{{ totalSuccessNum }}</span>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="item">
|
|
106
|
+
<i class="el-icon-error f-red"></i>
|
|
107
|
+
{{ $t2('失败', 'components.excelImport.fail') }}:
|
|
108
|
+
<span class="failNum" @click="showErrorResult">{{ totalErrorNum }}</span>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div slot="footer" class="dialog-footer" center="true">
|
|
114
|
+
<div class="fl import-count" v-show="!importLoading">
|
|
115
|
+
<span class="f-red doneNum">0</span>
|
|
116
|
+
/
|
|
117
|
+
<span class="dataSize">0</span>
|
|
118
|
+
</div>
|
|
119
|
+
<el-button type="primary" plain class="button-sty" @click="dialogClose2" v-if="!param.importOption.hideCancelButton">
|
|
120
|
+
<i class="el-icon-close el-icon"></i>
|
|
121
|
+
{{ $t2('取 消', 'system.button.cancel2') }}
|
|
122
|
+
</el-button>
|
|
123
|
+
<el-button type="primary" class="button-sty" @click="dialogPrimary2">
|
|
124
|
+
<i class="el-icon-check el-icon"></i>
|
|
125
|
+
{{ $t2('确 定', 'system.button.confirm2') }}
|
|
126
|
+
</el-button>
|
|
127
|
+
</div>
|
|
128
|
+
</el-dialog>
|
|
129
|
+
<el-dialog
|
|
130
|
+
:title="$t2('结果', 'components.excelImport.resultTitle')"
|
|
131
|
+
:append-to-body="true"
|
|
132
|
+
:modal-append-to-body="true"
|
|
133
|
+
:close-on-click-modal="falseValue"
|
|
134
|
+
:visible.sync="showImportResult"
|
|
135
|
+
:modal="falseValue"
|
|
136
|
+
custom-class="dialog-style list-dialog"
|
|
137
|
+
width="1200px"
|
|
138
|
+
v-el-drag-dialog
|
|
139
|
+
>
|
|
140
|
+
<div>
|
|
141
|
+
<div class="box-style">
|
|
142
|
+
<div class="cont">
|
|
143
|
+
<div class="table-div">
|
|
144
|
+
<vxe-grid
|
|
145
|
+
id="resGrid"
|
|
146
|
+
ref="resGrid"
|
|
147
|
+
height="440px"
|
|
148
|
+
v-bind="resOption"
|
|
149
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
150
|
+
@custom="$vxeTableUtil.customHandle"
|
|
151
|
+
>
|
|
152
|
+
<template #form>
|
|
153
|
+
<div class="clearfix screen-btns">
|
|
154
|
+
<div class="fl">
|
|
155
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-upload2" @click="exportToExcel()">
|
|
156
|
+
{{ $t1('导出') }}
|
|
157
|
+
</vxe-button>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="fr"></div>
|
|
160
|
+
</div>
|
|
161
|
+
</template>
|
|
162
|
+
<template #attachment="{row,column}">
|
|
163
|
+
<base-attachment :option="{
|
|
164
|
+
title: column.title,
|
|
165
|
+
rows: row[column.field],
|
|
166
|
+
showViewButton: true,
|
|
167
|
+
edit:false
|
|
168
|
+
}"/>
|
|
169
|
+
</template>
|
|
170
|
+
</vxe-grid>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</el-dialog>
|
|
176
|
+
</div>
|
|
177
|
+
</template>
|
|
178
|
+
|
|
179
|
+
<script>
|
|
180
|
+
import {mixins} from './importDialogMixin';
|
|
181
|
+
|
|
182
|
+
export default {
|
|
183
|
+
mixins: [mixins]
|
|
184
|
+
};
|
|
185
|
+
</script>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:multi="field.options.limit!==1"
|
|
16
16
|
:limit="field.options.limit"
|
|
17
17
|
resultType="Array"
|
|
18
|
-
:edit="!field.options.disabled"
|
|
18
|
+
:edit="!field.options.disabled && !isReadMode"
|
|
19
19
|
@callback="submitFile"
|
|
20
20
|
:hideInfo="field.options.hideFileInfo"
|
|
21
21
|
:hideName="field.options.hideFileName"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
:limit="field.options.limit"
|
|
33
33
|
:fileTypes="field.options.fileTypes || []"
|
|
34
34
|
resultType="Array"
|
|
35
|
-
:edit="!field.options.disabled"
|
|
36
|
-
:remove="!field.options.hideRemoveButton"
|
|
35
|
+
:edit="!field.options.disabled && !isReadMode"
|
|
36
|
+
:remove="!field.options.hideRemoveButton && !isReadMode"
|
|
37
37
|
@callback="submitFile"
|
|
38
38
|
:hideInfo="field.options.hideFileInfo"
|
|
39
39
|
:hideName="field.options.hideFileName"
|
|
@@ -93,6 +93,8 @@ modules = {
|
|
|
93
93
|
readonly: Boolean,
|
|
94
94
|
columnFlag: Boolean,
|
|
95
95
|
sourceData: Object,
|
|
96
|
+
/* 进入设计器时的默认布局模式(临时模式:仅入口默认值,模板自带 layoutType 时不覆盖) */
|
|
97
|
+
defaultLayoutType: { type: String, default: "" },
|
|
96
98
|
},
|
|
97
99
|
data() {
|
|
98
100
|
return {
|
|
@@ -345,28 +347,51 @@ modules = {
|
|
|
345
347
|
baseRefUtil.changeLocale(langName);
|
|
346
348
|
},
|
|
347
349
|
|
|
350
|
+
/**
|
|
351
|
+
* 应用入口默认布局模式:模板 JSON 自带 layoutType 时以模板为准,不覆盖
|
|
352
|
+
*/
|
|
353
|
+
applyDefaultLayoutType(loadedFormJson) {
|
|
354
|
+
if (!this.defaultLayoutType) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (loadedFormJson && loadedFormJson.formConfig?.layoutType) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
this.designer.changeLayoutType(this.defaultLayoutType);
|
|
361
|
+
},
|
|
362
|
+
|
|
348
363
|
setFormJson(formJson) {
|
|
349
364
|
let modifiedFlag = false;
|
|
365
|
+
let loadedFormJson = null;
|
|
350
366
|
if (!!formJson) {
|
|
351
367
|
if (typeof formJson === "string") {
|
|
352
368
|
let newFormJson = JSON.parse(formJson);
|
|
353
369
|
this.upgradeFormJson(newFormJson);
|
|
370
|
+
loadedFormJson = newFormJson;
|
|
354
371
|
modifiedFlag = this.designer.loadFormJson(newFormJson);
|
|
355
372
|
} else if (formJson.constructor === Object) {
|
|
356
373
|
this.upgradeFormJson(formJson);
|
|
374
|
+
loadedFormJson = formJson;
|
|
357
375
|
modifiedFlag = this.designer.loadFormJson(formJson);
|
|
358
376
|
}
|
|
359
377
|
|
|
360
378
|
if (modifiedFlag) {
|
|
361
379
|
this.designer.emitHistoryChange();
|
|
362
380
|
}
|
|
381
|
+
|
|
382
|
+
this.applyDefaultLayoutType(loadedFormJson);
|
|
363
383
|
/* 模板 JSON 里的 layoutType 此刻才写入;左侧面板 mounted 时仍是默认 PC,
|
|
364
384
|
必须再筛一次,否则进入 H5 模板时仍展示 PC 容器(data-table/detail 等) */
|
|
365
385
|
this.$nextTick(() => {
|
|
366
386
|
this.loadWidgets();
|
|
367
387
|
});
|
|
368
388
|
} else {
|
|
389
|
+
/* 新建模板 formViewContent 为空会走这里,同样要落入口默认布局 */
|
|
369
390
|
this.clearDesigner();
|
|
391
|
+
this.applyDefaultLayoutType(null);
|
|
392
|
+
this.$nextTick(() => {
|
|
393
|
+
this.loadWidgets();
|
|
394
|
+
});
|
|
370
395
|
}
|
|
371
396
|
},
|
|
372
397
|
|