imatrix-ui 2.8.21-dw → 2.8.21
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/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +5 -35
- package/package.json +4 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +296 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
<!-- 文件上传 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div v-loading="loading">
|
|
4
|
+
<div
|
|
5
|
+
v-if="
|
|
6
|
+
unifiedEnclosure &&
|
|
7
|
+
unifiedEnclosure.uuid &&
|
|
8
|
+
unifiedEnclosure.fileName &&
|
|
9
|
+
isShowData
|
|
10
|
+
"
|
|
11
|
+
>
|
|
12
|
+
<el-image
|
|
13
|
+
v-if="isImg"
|
|
14
|
+
:fit="fit"
|
|
15
|
+
:preview-src-list="[baseURL + '/common/fs-upload/download?serverPath=' + unifiedEnclosure.uuid + '&showName=' + unifiedEnclosure.fileName ]"
|
|
16
|
+
:src=" baseURL + '/common/fs-upload/download?serverPath=' + unifiedEnclosure.uuid + '&showName=' + unifiedEnclosure.fileName "
|
|
17
|
+
@click="bigPicture"
|
|
18
|
+
/>
|
|
19
|
+
<el-link
|
|
20
|
+
v-else
|
|
21
|
+
:href=" baseURL + '/common/fs-upload/download?serverPath=' + unifiedEnclosure.uuid + '&showName=' + unifiedEnclosure.fileName "
|
|
22
|
+
type="primary"
|
|
23
|
+
>
|
|
24
|
+
{{ unifiedEnclosure.fileName }}
|
|
25
|
+
</el-link>
|
|
26
|
+
<el-tooltip :content="$t('fsUpload.download')" effect="light">
|
|
27
|
+
<el-link
|
|
28
|
+
v-if="isImg"
|
|
29
|
+
:href="
|
|
30
|
+
baseURL +
|
|
31
|
+
'/common/fs-upload/download?serverPath=' +
|
|
32
|
+
unifiedEnclosure.uuid +
|
|
33
|
+
'&showName=' +
|
|
34
|
+
unifiedEnclosure.fileName
|
|
35
|
+
"
|
|
36
|
+
type="primary"
|
|
37
|
+
>
|
|
38
|
+
<i
|
|
39
|
+
class="el-icon-download"
|
|
40
|
+
style="margin-left: 10px;font-size: 30px;"
|
|
41
|
+
/>
|
|
42
|
+
</el-link>
|
|
43
|
+
</el-tooltip>
|
|
44
|
+
<el-tooltip :content="$t('fsUpload.delete')" effect="light">
|
|
45
|
+
<i
|
|
46
|
+
v-if="!disabled"
|
|
47
|
+
class="el-icon-delete"
|
|
48
|
+
style="color:red;margin-left: 10px;font-size: 30px;"
|
|
49
|
+
@click="deleteFile"
|
|
50
|
+
/>
|
|
51
|
+
</el-tooltip>
|
|
52
|
+
<el-tooltip
|
|
53
|
+
:content="$t('fsUpload.preview')"
|
|
54
|
+
style="margin-left: 10px;font-size: 30px;"
|
|
55
|
+
effect="light"
|
|
56
|
+
>
|
|
57
|
+
<i v-if="!isImg" class="el-icon-view" @click="preview" />
|
|
58
|
+
</el-tooltip>
|
|
59
|
+
</div>
|
|
60
|
+
<el-button
|
|
61
|
+
v-if="isShowButton && !disabled"
|
|
62
|
+
size="small"
|
|
63
|
+
type="primary"
|
|
64
|
+
icon="el-icon-upload2"
|
|
65
|
+
@click="selectDataFile"
|
|
66
|
+
>
|
|
67
|
+
{{ $t('fsUpload.upload') }}
|
|
68
|
+
</el-button>
|
|
69
|
+
<input
|
|
70
|
+
ref="uploadTemplate"
|
|
71
|
+
type="file"
|
|
72
|
+
name="uploadTemplate"
|
|
73
|
+
style="display:none"
|
|
74
|
+
:accept="accepts"
|
|
75
|
+
@change="upload"
|
|
76
|
+
>
|
|
77
|
+
<see-big-picture
|
|
78
|
+
v-if="bigPictureVisible"
|
|
79
|
+
:show-index="showIndex"
|
|
80
|
+
:unified-enclosures="data"
|
|
81
|
+
@close="bigPictureVisible = false"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
import Vue from 'vue'
|
|
88
|
+
import Cookies from 'js-cookie'
|
|
89
|
+
import seeBigPicture from './see-big-picture.vue'
|
|
90
|
+
import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util.js'
|
|
91
|
+
import { getToken } from '../../../src/utils/auth'
|
|
92
|
+
export default {
|
|
93
|
+
name: 'FsUploadSingle',
|
|
94
|
+
components: {
|
|
95
|
+
seeBigPicture
|
|
96
|
+
},
|
|
97
|
+
props: {
|
|
98
|
+
/**
|
|
99
|
+
* 系统编码
|
|
100
|
+
*/
|
|
101
|
+
systemCode: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: null
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* 上传限制的类型
|
|
107
|
+
*/
|
|
108
|
+
accept: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: null
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* 是否是图片
|
|
114
|
+
*/
|
|
115
|
+
isImg: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* 针对图片类型
|
|
121
|
+
*/
|
|
122
|
+
fit: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: null
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* 禁止编辑
|
|
128
|
+
*/
|
|
129
|
+
disabled: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* 是否显示按钮
|
|
135
|
+
*/
|
|
136
|
+
isShowButton: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: true
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* 是否显示数据
|
|
142
|
+
*/
|
|
143
|
+
isShowData: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: true
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* 回传数据
|
|
149
|
+
*/
|
|
150
|
+
data: {
|
|
151
|
+
type: Array,
|
|
152
|
+
default: null
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
data() {
|
|
156
|
+
return {
|
|
157
|
+
unifiedEnclosure: {
|
|
158
|
+
uuid: '',
|
|
159
|
+
fileName: ''
|
|
160
|
+
},
|
|
161
|
+
loading: '',
|
|
162
|
+
baseURL: '',
|
|
163
|
+
showIndex: 0,
|
|
164
|
+
accepts: '',
|
|
165
|
+
deleteUuid: '',
|
|
166
|
+
bigPictureVisible: false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
created() {
|
|
170
|
+
this.baseURL = Vue.prototype.baseURL
|
|
171
|
+
if (this.data) {
|
|
172
|
+
this.unifiedEnclosure = this.data[0]
|
|
173
|
+
}
|
|
174
|
+
if (this.accept) {
|
|
175
|
+
this.accepts = this.accept
|
|
176
|
+
} else {
|
|
177
|
+
if (this.isImg) {
|
|
178
|
+
this.accepts = 'image/*'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
methods: {
|
|
183
|
+
bigPicture() {
|
|
184
|
+
this.bigPictureVisible = true
|
|
185
|
+
},
|
|
186
|
+
deleteFile() {
|
|
187
|
+
this.deleteUuid = this.unifiedEnclosure.uuid
|
|
188
|
+
this.unifiedEnclosure = null
|
|
189
|
+
this.deleteSuccess()
|
|
190
|
+
},
|
|
191
|
+
deleteSuccess() {
|
|
192
|
+
if (this.unifiedEnclosure) {
|
|
193
|
+
const data = [this.unifiedEnclosure]
|
|
194
|
+
this.$emit('deleteSuccess', this.deleteUuid, data)
|
|
195
|
+
} else {
|
|
196
|
+
this.$emit('deleteSuccess', this.deleteUuid)
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
acceptService() {
|
|
200
|
+
if (this.isImg) {
|
|
201
|
+
return 'image/*'
|
|
202
|
+
} else {
|
|
203
|
+
return null
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
selectDataFile() {
|
|
207
|
+
this.$refs.uploadTemplate.click()
|
|
208
|
+
},
|
|
209
|
+
onSuccess() {
|
|
210
|
+
if (this.unifiedEnclosure) {
|
|
211
|
+
const data = [this.unifiedEnclosure]
|
|
212
|
+
this.$emit('onSuccess', data, this.deleteUuid)
|
|
213
|
+
} else {
|
|
214
|
+
this.$emit('onSuccess', null, this.deleteUuid)
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
preview() {
|
|
218
|
+
if (Vue.prototype.isOffice) {
|
|
219
|
+
const jwt = Cookies.get('JWT')
|
|
220
|
+
const map = {
|
|
221
|
+
fileName:
|
|
222
|
+
Vue.prototype.officeweb365Url +
|
|
223
|
+
'/common/fs-upload/download?serverPath=' +
|
|
224
|
+
this.unifiedEnclosure.uuid +
|
|
225
|
+
'&showName=' +
|
|
226
|
+
this.unifiedEnclosure.fileName +
|
|
227
|
+
'&jwt=' +
|
|
228
|
+
jwt
|
|
229
|
+
}
|
|
230
|
+
const http = this.$http
|
|
231
|
+
http
|
|
232
|
+
.post(Vue.prototype.baseURL + '/common/fs-upload/des-encrypt', map)
|
|
233
|
+
.then(data => {
|
|
234
|
+
window.open(Vue.prototype.isOffice + data)
|
|
235
|
+
})
|
|
236
|
+
} else {
|
|
237
|
+
let showName
|
|
238
|
+
const split = this.unifiedEnclosure.fileName.split('.')
|
|
239
|
+
if (
|
|
240
|
+
split[split.length - 1].toLowerCase() === 'xls' ||
|
|
241
|
+
split[split.length - 1].toLowerCase() === 'xlsx' ||
|
|
242
|
+
split[split.length - 1].toLowerCase() === 'csv'
|
|
243
|
+
) {
|
|
244
|
+
showName = split[0] + '.html'
|
|
245
|
+
} else {
|
|
246
|
+
showName = split[0] + '.pdf'
|
|
247
|
+
}
|
|
248
|
+
const token = getToken()
|
|
249
|
+
if (Vue.prototype.customPreviewUrl) {
|
|
250
|
+
window.open(getSystemFrontendUrl(Vue.prototype.portalUrl) + '/#/file-service/preview?serverPath=' + this.unifiedEnclosure.uuid +
|
|
251
|
+
'&showName=' + encodeURI(this.unifiedEnclosure.fileName),
|
|
252
|
+
showName
|
|
253
|
+
)
|
|
254
|
+
} else {
|
|
255
|
+
let url = Vue.prototype.baseURL +
|
|
256
|
+
'/common/fs-upload/preview?serverPath=' +
|
|
257
|
+
this.unifiedEnclosure.uuid +
|
|
258
|
+
'&showName=' +
|
|
259
|
+
this.unifiedEnclosure.fileName
|
|
260
|
+
if (isPlateSys(Vue.prototype.systemCode)) {
|
|
261
|
+
url = Vue.prototype.baseAPI +
|
|
262
|
+
'/common/fs-upload/preview?serverPath=' +
|
|
263
|
+
this.unifiedEnclosure.uuid +
|
|
264
|
+
'&showName=' +
|
|
265
|
+
this.unifiedEnclosure.fileName + '&jwt=' + token
|
|
266
|
+
}
|
|
267
|
+
window.open(url,
|
|
268
|
+
showName
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
upload(params) {
|
|
274
|
+
this.loading = true
|
|
275
|
+
const param = new FormData()
|
|
276
|
+
param.append('file', this.$refs.uploadTemplate.files[0])
|
|
277
|
+
const http = this.$http
|
|
278
|
+
http.headers = "'Content-Type': 'multipart/form-data'"
|
|
279
|
+
if (this.unifiedEnclosure) {
|
|
280
|
+
this.deleteUuid = this.unifiedEnclosure.uuid
|
|
281
|
+
}
|
|
282
|
+
http
|
|
283
|
+
.post(
|
|
284
|
+
Vue.prototype.baseURL +
|
|
285
|
+
'/common/fs-upload/upload-template/' +
|
|
286
|
+
this.systemCode,
|
|
287
|
+
param,
|
|
288
|
+
{ headers: { 'Content-Type': 'multipart/form-data' }}
|
|
289
|
+
)
|
|
290
|
+
.then(data => {
|
|
291
|
+
this.unifiedEnclosure = data
|
|
292
|
+
params.target.value = ''
|
|
293
|
+
console.log('data', data)
|
|
294
|
+
console.log(' this.unifiedEnclosure', this.unifiedEnclosure)
|
|
295
|
+
this.onSuccess()
|
|
296
|
+
this.loading = false
|
|
297
|
+
this.$message({
|
|
298
|
+
showClose: true,
|
|
299
|
+
type: 'success',
|
|
300
|
+
message: this.$t('fsUpload.uploadSucceeded')
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
.catch(() => {
|
|
304
|
+
params.target.value = ''
|
|
305
|
+
this.loading = false
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
</script>
|
|
311
|
+
|
|
312
|
+
<style scoped></style>
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<!-- 文件上传 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<fs-upload-multi
|
|
5
|
+
v-if="multiple"
|
|
6
|
+
:system-code="systemCode"
|
|
7
|
+
:accept="accept"
|
|
8
|
+
:is-img="isImg"
|
|
9
|
+
:is-show-list="isShowList"
|
|
10
|
+
:fit="fit"
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
:is-show-button="isShowButton"
|
|
13
|
+
:is-show-data="isShowData"
|
|
14
|
+
:data="data"
|
|
15
|
+
:img-size="imgSize"
|
|
16
|
+
:file-size="fileSize"
|
|
17
|
+
:table-height="tableHeight"
|
|
18
|
+
@onSuccess="onSuccess"
|
|
19
|
+
@deleteSuccess="deleteSuccess"
|
|
20
|
+
/>
|
|
21
|
+
<fs-upload-single
|
|
22
|
+
v-if="!multiple"
|
|
23
|
+
:system-code="systemCode"
|
|
24
|
+
:accept="accept"
|
|
25
|
+
:is-img="isImg"
|
|
26
|
+
:fit="fit"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:is-show-button="isShowButton"
|
|
29
|
+
:is-show-data="isShowData"
|
|
30
|
+
:data="data"
|
|
31
|
+
@onSuccess="onSuccess"
|
|
32
|
+
@deleteSuccess="deleteSuccess"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import fsUploadMulti from './fs-upload-multi.vue'
|
|
39
|
+
import fsUploadSingle from './fs-upload-single.vue'
|
|
40
|
+
import Vue from 'vue'
|
|
41
|
+
export default {
|
|
42
|
+
name: 'FsUpload',
|
|
43
|
+
components: {
|
|
44
|
+
fsUploadMulti,
|
|
45
|
+
fsUploadSingle
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
/**
|
|
49
|
+
* 系统编码
|
|
50
|
+
*/
|
|
51
|
+
systemCode: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: null
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* 上传限制的类型
|
|
57
|
+
*/
|
|
58
|
+
accept: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* 是否是图片
|
|
64
|
+
*/
|
|
65
|
+
isImg: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* 是否多选
|
|
71
|
+
*/
|
|
72
|
+
multiple: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* 针对多选情况
|
|
78
|
+
* 是否显示拼接字符串
|
|
79
|
+
* 如果未选择,直接显示表单
|
|
80
|
+
*/
|
|
81
|
+
isShowList: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: true
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* 针对图片类型
|
|
87
|
+
* 具体参考element-ui中的图片参数fit属性
|
|
88
|
+
*/
|
|
89
|
+
fit: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: null
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* 禁止编辑
|
|
95
|
+
*/
|
|
96
|
+
disabled: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* 是否显示按钮
|
|
102
|
+
*/
|
|
103
|
+
isShowButton: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: true
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* 是否显示数据
|
|
109
|
+
*/
|
|
110
|
+
isShowData: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: true
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* 回传数据
|
|
116
|
+
*/
|
|
117
|
+
data: {
|
|
118
|
+
type: Array,
|
|
119
|
+
default: null
|
|
120
|
+
},
|
|
121
|
+
/** 图片显示数量 */
|
|
122
|
+
imgSize: {
|
|
123
|
+
type: Number,
|
|
124
|
+
default: 0
|
|
125
|
+
},
|
|
126
|
+
/** 设置附件的上传数量 */
|
|
127
|
+
fileSize: {
|
|
128
|
+
type: Number,
|
|
129
|
+
default: 0
|
|
130
|
+
},
|
|
131
|
+
/** 设置table高度 */
|
|
132
|
+
tableHeight: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: null
|
|
135
|
+
},
|
|
136
|
+
isDelete: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: false
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
data() {
|
|
142
|
+
return {
|
|
143
|
+
deleteUuids: []
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
created() {},
|
|
147
|
+
methods: {
|
|
148
|
+
onSuccess(data, deleteUuid) {
|
|
149
|
+
console.log('data', data)
|
|
150
|
+
console.log('deleteUuid', deleteUuid)
|
|
151
|
+
|
|
152
|
+
if (this.isDelete && deleteUuid) {
|
|
153
|
+
this.deleteFile(deleteUuid)
|
|
154
|
+
this.$emit('onSuccess', data)
|
|
155
|
+
} else {
|
|
156
|
+
if (deleteUuid) {
|
|
157
|
+
this.deleteUuids.push(deleteUuid)
|
|
158
|
+
}
|
|
159
|
+
this.$emit('onSuccess', data)
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
deleteSuccess(deleteUuid, data) {
|
|
163
|
+
console.log('deleteUuid', deleteUuid)
|
|
164
|
+
console.log('data', data)
|
|
165
|
+
if (this.isDelete) {
|
|
166
|
+
this.deleteFile(deleteUuid)
|
|
167
|
+
this.$emit('deleteSuccess', data)
|
|
168
|
+
} else {
|
|
169
|
+
if (deleteUuid) {
|
|
170
|
+
this.deleteUuids.push(deleteUuid)
|
|
171
|
+
}
|
|
172
|
+
this.$emit('deleteSuccess', data)
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
deleteFile(deleteUuid) {
|
|
176
|
+
const http = this.$http
|
|
177
|
+
const list = [deleteUuid]
|
|
178
|
+
http
|
|
179
|
+
.delete(Vue.prototype.baseURL + '/common/fs-upload', { data: list })
|
|
180
|
+
.then(data => {})
|
|
181
|
+
},
|
|
182
|
+
getdeleteUuIds() {
|
|
183
|
+
return this.deleteUuids
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
</script>
|
|
188
|
+
|
|
189
|
+
<style scoped></style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:close-on-click-modal="false"
|
|
4
|
+
visible
|
|
5
|
+
append-to-body
|
|
6
|
+
@close="$emit('close')"
|
|
7
|
+
>
|
|
8
|
+
<el-carousel
|
|
9
|
+
style="width:100%;"
|
|
10
|
+
height="600px"
|
|
11
|
+
:autoplay="false"
|
|
12
|
+
indicator-position="outside"
|
|
13
|
+
:initial-index="displayIndex"
|
|
14
|
+
>
|
|
15
|
+
<el-carousel-item
|
|
16
|
+
v-for="(item,index) in unifiedEnclosures"
|
|
17
|
+
:key="index"
|
|
18
|
+
:label="item.fileName"
|
|
19
|
+
>
|
|
20
|
+
<div>
|
|
21
|
+
<el-image
|
|
22
|
+
style=" height: 580px;"
|
|
23
|
+
:preview-src-list="[baseURL+ '/common/fs-upload/download?serverPath=' + item.uuid + '&showName=' + item.fileName]"
|
|
24
|
+
:src="baseURL+ '/common/fs-upload/download?serverPath=' + item.uuid + '&showName=' + item.fileName"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</el-carousel-item>
|
|
28
|
+
</el-carousel>
|
|
29
|
+
</el-dialog>
|
|
30
|
+
</template>
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
props: {
|
|
34
|
+
unifiedEnclosures: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
showIndex: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 0
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
displayIndex: 0
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
created() {
|
|
50
|
+
this.displayIndex = this.showIndex
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|