cloud-web-corejs 1.0.54-dev.284 → 1.0.54-dev.287
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 +135 -135
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +40 -5
- package/src/components/xform/form-render/indexMixin.js +428 -1
- package/src/components/xform/mixins/defaultHandle.js +330 -1
- package/src/utils/pdfUtil.js +71 -0
- package/src/views/user/form/view/list.vue +12 -1
package/package.json
CHANGED
@@ -1,135 +1,135 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<div id="uploadImage" :class="classList">
|
4
|
-
<div class="upload-list" model="singer" v-for="(attachment, index) in attachments" :key="index"
|
5
|
-
style="display: inline-block;vertical-align: middle;float: left;">
|
6
|
-
<template v-if="$attrs.hideInfo !== true && $attrs.hideInfo !== 'true'">
|
7
|
-
<div class="upload-box">
|
8
|
-
<ul class="el-upload-list el-upload-list--picture">
|
9
|
-
<li tabindex="0" class="el-upload-list__item">
|
10
|
-
<div>
|
11
|
-
<div class="el-upload-list__item-thumbnail">
|
12
|
-
<div class="show-video" v-if="hasPreview(attachment)" @click="openPreview(attachment,index)"><i
|
13
|
-
class="icon-chakan"></i></div>
|
14
|
-
<p>
|
15
|
-
<el-image
|
16
|
-
:src="getShowUrl(attachment)"
|
17
|
-
@click="openPreview(attachment,index)"
|
18
|
-
:z-index="999999"
|
19
|
-
/>
|
20
|
-
</p>
|
21
|
-
</div>
|
22
|
-
<div class="el-upload-list__item-name">
|
23
|
-
<el-tooltip :enterable="false" class="item" effect="dark" :content="getAttachmentName(attachment)"
|
24
|
-
placement="top">
|
25
|
-
<p v-if="$attrs.hideName !== true">{{ getAttachmentName(attachment) }}</p>
|
26
|
-
</el-tooltip>
|
27
|
-
<p v-if="$attrs.showSize === true || $attrs.showSize === 'true'">
|
28
|
-
{{ formatFileSize(attachment.fileSize) }}</p>
|
29
|
-
<!-- <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createBy !== false">
|
30
|
-
{{ attachment.createBy }}</p>-->
|
31
|
-
<p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createDate !== false">
|
32
|
-
{{ attachment.createDate }}</p>
|
33
|
-
</div>
|
34
|
-
<div class="el-upload-input" v-if="$attrs.showSortInput">
|
35
|
-
<base-input-number v-model="attachment.orders" class="button-sty"
|
36
|
-
:placeholder="$t2('序号', 'components.VabUpload.orders')" :scale="0"/>
|
37
|
-
</div>
|
38
|
-
<div class="el-upload-input" v-if="$attrs.showNameInput">
|
39
|
-
<el-input v-model="attachment.name" class="button-sty"
|
40
|
-
:placeholder="$t2('请输入名称', 'components.VabUpload.name')" :scale="0"/>
|
41
|
-
</div>
|
42
|
-
<div class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check"></i>
|
43
|
-
</div>
|
44
|
-
<div class="el-icon-close" @click="deleteFile(index)"
|
45
|
-
v-if="$attrs.edit !== false && $attrs.edit !== 'false' && attachment.h5!==1">
|
46
|
-
<i class="el-tooltip iconfont iconshanchu" aria-describedby="el-tooltip-6144" tabindex="0"></i>
|
47
|
-
</div>
|
48
|
-
<div class="el-icon-tagEdit" v-if="attachment.h5!==1">
|
49
|
-
<el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.download')"
|
50
|
-
placement="top">
|
51
|
-
<i class="el-icon-download"
|
52
|
-
@click="downloadFile(attachment)"></i>
|
53
|
-
</el-tooltip>
|
54
|
-
<el-tooltip class="item" effect="dark" :content="$t2('详情', 'components.VabUpload.detail')"
|
55
|
-
placement="top"
|
56
|
-
v-if="attachment && attachment.id && $attrs.showProperties!==false && !dataType">
|
57
|
-
<i class="iconfont icon-shuxing" @click="openPropertiesDialog(attachment)"></i>
|
58
|
-
</el-tooltip>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
</li>
|
62
|
-
</ul>
|
63
|
-
</div>
|
64
|
-
</template>
|
65
|
-
<template v-else>
|
66
|
-
<a>
|
67
|
-
<el-image
|
68
|
-
:src="getShowUrl(attachment)"
|
69
|
-
@click="openPreview(attachment,index)"
|
70
|
-
:z-index="999999"
|
71
|
-
/>
|
72
|
-
</a>
|
73
|
-
<a href="javascript:void(0);" class="del" @click="deleteFile(index)"
|
74
|
-
v-if="$attrs.edit !== false && $attrs.edit !== 'false'"><i class="el-icon-error"></i></a>
|
75
|
-
</template>
|
76
|
-
</div>
|
77
|
-
<div class="el-upload el-upload--picture" style="vertical-align: middle;display: inline-block;float:left"
|
78
|
-
v-if="$attrs.edit !== false && $attrs.edit !== 'false'">
|
79
|
-
<button
|
80
|
-
type="button"
|
81
|
-
class=" avatar-uploader"
|
82
|
-
v-if="showUploadBtn"
|
83
|
-
@keyup.prevent
|
84
|
-
@keydown.enter.prevent
|
85
|
-
@click="
|
86
|
-
$baseUpload.open({
|
87
|
-
..._props,
|
88
|
-
...$attrs,
|
89
|
-
limit: limit,
|
90
|
-
multi:multi,
|
91
|
-
accept: accept ? accept : 'file',
|
92
|
-
auto: auto,
|
93
|
-
size: fileMaxSize,
|
94
|
-
chunkSize: chunkSize,
|
95
|
-
callback: fileConfirm,
|
96
|
-
pickPrivateProfile:pickPrivateProfile,
|
97
|
-
confirmUpload:confirmUpload,
|
98
|
-
otherParams:$attrs
|
99
|
-
})
|
100
|
-
"
|
101
|
-
>
|
102
|
-
<i class="el-icon-plus avatar-uploader-icon"></i>
|
103
|
-
</button>
|
104
|
-
</div>
|
105
|
-
</div>
|
106
|
-
<propertiesDialog v-if="showPropertiesDialog" :visiable.sync="showPropertiesDialog"
|
107
|
-
:editAttachment.sync="editAttachment" :edit.sync="$attrs.edit"></propertiesDialog>
|
108
|
-
<el-image-viewer v-if="showViewer" :on-close="closeViewer" :initial-index.sync="chooseIndex"
|
109
|
-
:url-list="pictureDtoList"/>
|
110
|
-
</div>
|
111
|
-
</template>
|
112
|
-
|
113
|
-
<script>
|
114
|
-
import {viewMixins} from './mixins';
|
115
|
-
|
116
|
-
export default {
|
117
|
-
mixins: [viewMixins],
|
118
|
-
components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')},
|
119
|
-
computed:{
|
120
|
-
classList(){
|
121
|
-
// 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
|
122
|
-
let arr = [];
|
123
|
-
if(this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')){
|
124
|
-
arr.push('upload-img')
|
125
|
-
}
|
126
|
-
let widgetSize = this.$attrs.widgetSize || 2
|
127
|
-
if(widgetSize){
|
128
|
-
let str1 = "widgetSize-" + widgetSize
|
129
|
-
arr.push(str1)
|
130
|
-
}
|
131
|
-
return arr
|
132
|
-
},
|
133
|
-
}
|
134
|
-
};
|
135
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<div id="uploadImage" :class="classList">
|
4
|
+
<div class="upload-list" model="singer" v-for="(attachment, index) in attachments" :key="index"
|
5
|
+
style="display: inline-block;vertical-align: middle;float: left;">
|
6
|
+
<template v-if="$attrs.hideInfo !== true && $attrs.hideInfo !== 'true'">
|
7
|
+
<div class="upload-box">
|
8
|
+
<ul class="el-upload-list el-upload-list--picture">
|
9
|
+
<li tabindex="0" class="el-upload-list__item">
|
10
|
+
<div>
|
11
|
+
<div class="el-upload-list__item-thumbnail">
|
12
|
+
<div class="show-video" v-if="hasPreview(attachment)" @click="openPreview(attachment,index)"><i
|
13
|
+
class="icon-chakan"></i></div>
|
14
|
+
<p>
|
15
|
+
<el-image
|
16
|
+
:src="getShowUrl(attachment)"
|
17
|
+
@click="openPreview(attachment,index)"
|
18
|
+
:z-index="999999"
|
19
|
+
/>
|
20
|
+
</p>
|
21
|
+
</div>
|
22
|
+
<div class="el-upload-list__item-name">
|
23
|
+
<el-tooltip :enterable="false" class="item" effect="dark" :content="getAttachmentName(attachment)"
|
24
|
+
placement="top">
|
25
|
+
<p v-if="$attrs.hideName !== true">{{ getAttachmentName(attachment) }}</p>
|
26
|
+
</el-tooltip>
|
27
|
+
<p v-if="$attrs.showSize === true || $attrs.showSize === 'true'">
|
28
|
+
{{ formatFileSize(attachment.fileSize) }}</p>
|
29
|
+
<!-- <p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createBy !== false">
|
30
|
+
{{ attachment.createBy }}</p>-->
|
31
|
+
<p v-if="$attrs.showSortInput !== true && !dataType && $attrs.createDate !== false">
|
32
|
+
{{ attachment.createDate }}</p>
|
33
|
+
</div>
|
34
|
+
<div class="el-upload-input" v-if="$attrs.showSortInput">
|
35
|
+
<base-input-number v-model="attachment.orders" class="button-sty"
|
36
|
+
:placeholder="$t2('序号', 'components.VabUpload.orders')" :scale="0"/>
|
37
|
+
</div>
|
38
|
+
<div class="el-upload-input" v-if="$attrs.showNameInput">
|
39
|
+
<el-input v-model="attachment.name" class="button-sty"
|
40
|
+
:placeholder="$t2('请输入名称', 'components.VabUpload.name')" :scale="0"/>
|
41
|
+
</div>
|
42
|
+
<div class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check"></i>
|
43
|
+
</div>
|
44
|
+
<div class="el-icon-close" @click="deleteFile(index)"
|
45
|
+
v-if="$attrs.edit !== false && $attrs.edit !== 'false' && attachment.h5!==1">
|
46
|
+
<i class="el-tooltip iconfont iconshanchu" aria-describedby="el-tooltip-6144" tabindex="0"></i>
|
47
|
+
</div>
|
48
|
+
<div class="el-icon-tagEdit" v-if="attachment.h5!==1">
|
49
|
+
<el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.download')"
|
50
|
+
placement="top">
|
51
|
+
<i class="el-icon-download"
|
52
|
+
@click="downloadFile(attachment)"></i>
|
53
|
+
</el-tooltip>
|
54
|
+
<el-tooltip class="item" effect="dark" :content="$t2('详情', 'components.VabUpload.detail')"
|
55
|
+
placement="top"
|
56
|
+
v-if="attachment && attachment.id && $attrs.showProperties!==false && !dataType">
|
57
|
+
<i class="iconfont icon-shuxing" @click="openPropertiesDialog(attachment)"></i>
|
58
|
+
</el-tooltip>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</li>
|
62
|
+
</ul>
|
63
|
+
</div>
|
64
|
+
</template>
|
65
|
+
<template v-else>
|
66
|
+
<a>
|
67
|
+
<el-image
|
68
|
+
:src="getShowUrl(attachment)"
|
69
|
+
@click="openPreview(attachment,index)"
|
70
|
+
:z-index="999999"
|
71
|
+
/>
|
72
|
+
</a>
|
73
|
+
<a href="javascript:void(0);" class="del" @click="deleteFile(index)"
|
74
|
+
v-if="$attrs.edit !== false && $attrs.edit !== 'false'"><i class="el-icon-error"></i></a>
|
75
|
+
</template>
|
76
|
+
</div>
|
77
|
+
<div class="el-upload el-upload--picture" style="vertical-align: middle;display: inline-block;float:left"
|
78
|
+
v-if="$attrs.edit !== false && $attrs.edit !== 'false'">
|
79
|
+
<button
|
80
|
+
type="button"
|
81
|
+
class=" avatar-uploader"
|
82
|
+
v-if="showUploadBtn"
|
83
|
+
@keyup.prevent
|
84
|
+
@keydown.enter.prevent
|
85
|
+
@click="
|
86
|
+
$baseUpload.open({
|
87
|
+
..._props,
|
88
|
+
...$attrs,
|
89
|
+
limit: limit,
|
90
|
+
multi:multi,
|
91
|
+
accept: accept ? accept : 'file',
|
92
|
+
auto: auto,
|
93
|
+
size: fileMaxSize,
|
94
|
+
chunkSize: chunkSize,
|
95
|
+
callback: fileConfirm,
|
96
|
+
pickPrivateProfile:pickPrivateProfile,
|
97
|
+
confirmUpload:confirmUpload,
|
98
|
+
otherParams:$attrs
|
99
|
+
})
|
100
|
+
"
|
101
|
+
>
|
102
|
+
<i class="el-icon-plus avatar-uploader-icon"></i>
|
103
|
+
</button>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<propertiesDialog v-if="showPropertiesDialog" :visiable.sync="showPropertiesDialog"
|
107
|
+
:editAttachment.sync="editAttachment" :edit.sync="$attrs.edit"></propertiesDialog>
|
108
|
+
<el-image-viewer v-if="showViewer" :on-close="closeViewer" :initial-index.sync="chooseIndex"
|
109
|
+
:url-list="pictureDtoList"/>
|
110
|
+
</div>
|
111
|
+
</template>
|
112
|
+
|
113
|
+
<script>
|
114
|
+
import {viewMixins} from './mixins';
|
115
|
+
|
116
|
+
export default {
|
117
|
+
mixins: [viewMixins],
|
118
|
+
components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')},
|
119
|
+
computed:{
|
120
|
+
classList(){
|
121
|
+
// 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
|
122
|
+
let arr = [];
|
123
|
+
if(this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')){
|
124
|
+
arr.push('upload-img')
|
125
|
+
}
|
126
|
+
let widgetSize = this.$attrs.widgetSize || 2
|
127
|
+
if(widgetSize){
|
128
|
+
let str1 = "widgetSize-" + widgetSize
|
129
|
+
arr.push(str1)
|
130
|
+
}
|
131
|
+
return arr
|
132
|
+
},
|
133
|
+
}
|
134
|
+
};
|
135
|
+
</script>
|
@@ -160,8 +160,9 @@
|
|
160
160
|
></el-input>
|
161
161
|
</el-form-item>
|
162
162
|
</el-collapse-item>
|
163
|
+
|
163
164
|
<el-collapse-item name="3" title="详情表单信息">
|
164
|
-
<el-form-item :label="i18nt('
|
165
|
+
<el-form-item :label="i18nt('查看页面表单编码')">
|
165
166
|
<el-input
|
166
167
|
class="search-input"
|
167
168
|
max="200"
|
@@ -176,13 +177,36 @@
|
|
176
177
|
<i
|
177
178
|
slot="suffix"
|
178
179
|
class="el-input__icon el-icon-search"
|
179
|
-
@click="
|
180
|
+
@click="openFormTemplate(2)"
|
180
181
|
></i>
|
181
182
|
</el-input>
|
182
183
|
</el-form-item>
|
183
|
-
<el-form-item :label="i18nt('
|
184
|
+
<el-form-item :label="i18nt('查看页面表单名称')">
|
184
185
|
{{ formConfig.editFormName }}
|
185
186
|
</el-form-item>
|
187
|
+
<el-form-item :label="i18nt('新增页面表单编码')">
|
188
|
+
<el-input
|
189
|
+
class="search-input"
|
190
|
+
max="200"
|
191
|
+
v-model="formConfig.addFormCode"
|
192
|
+
@clear="
|
193
|
+
formConfig.addFormCode = null;
|
194
|
+
$forceUpdate();
|
195
|
+
"
|
196
|
+
v-el-readonly
|
197
|
+
clearable
|
198
|
+
placeholder="默认使用查看表单编码"
|
199
|
+
>
|
200
|
+
<i
|
201
|
+
slot="suffix"
|
202
|
+
class="el-input__icon el-icon-search"
|
203
|
+
@click="openFormTemplate(1)"
|
204
|
+
></i>
|
205
|
+
</el-input>
|
206
|
+
</el-form-item>
|
207
|
+
<el-form-item :label="i18nt('新增页面表单名称')">
|
208
|
+
{{ formConfig.addFormName }}
|
209
|
+
</el-form-item>
|
186
210
|
</el-collapse-item>
|
187
211
|
<el-collapse-item name="4" title="查询弹框展示信息">
|
188
212
|
<el-form-item :label="i18nt('展示字段')">
|
@@ -1032,11 +1056,22 @@ export default {
|
|
1032
1056
|
this.formConfig[this.curEventName] = this.formEventHandlerCode;
|
1033
1057
|
this.showFormEventDialogFlag = false;
|
1034
1058
|
},
|
1059
|
+
openFormTemplate(flag){
|
1060
|
+
this.formTemplateFlag = flag;
|
1061
|
+
this.showFormTemplateDialog = true;
|
1062
|
+
},
|
1035
1063
|
confirmFormTemplate(rows) {
|
1036
1064
|
if (rows.length) {
|
1037
1065
|
let row = rows[0];
|
1038
|
-
|
1039
|
-
|
1066
|
+
if(this.formTemplateFlag==1){
|
1067
|
+
//新增
|
1068
|
+
this.$set(this.formConfig, "addFormCode", row.formCode);
|
1069
|
+
this.$set(this.formConfig, "addFormName", row.formName);
|
1070
|
+
}else{
|
1071
|
+
//查看
|
1072
|
+
this.$set(this.formConfig, "editFormCode", row.formCode);
|
1073
|
+
this.$set(this.formConfig, "editFormName", row.formName);
|
1074
|
+
}
|
1040
1075
|
}
|
1041
1076
|
},
|
1042
1077
|
getEventButtonName(funStr) {
|