imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe2
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 +2 -2
- package/src/api/sso-service.js +19 -1
- package/src/assets/nonemessage.png +0 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +18 -6
- package/src/i18n/langs/en.js +20 -7
- package/src/permission.js +2 -2
- package/src/plugins.js +3 -3
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/store/modules/user.js +32 -2
- package/src/styles/display-layout.scss +1 -1
- package/src/styles/index.scss +74 -4
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +6 -30
- package/src/styles/theme/blue/font-style.scss +37 -0
- package/src/styles/theme/blue/index.scss +2 -18
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +3 -13
- package/src/styles/theme/dark-blue/card.scss +4 -6
- package/src/styles/theme/dark-blue/form.scss +7 -4
- package/src/styles/theme/dark-blue/index.scss +30 -5
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/radio.scss +13 -0
- package/src/styles/theme/dark-blue/sidebar.scss +7 -37
- package/src/styles/theme/dark-blue/tab.scss +4 -1
- package/src/styles/theme/dark-blue/table.scss +1 -1
- package/src/styles/theme/dark-blue/tree.scss +35 -10
- package/src/styles/theme/gray/card-style.scss +13 -1
- package/src/styles/theme/gray/font-style.scss +38 -0
- package/src/styles/theme/gray/index.scss +13 -25
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +7 -14
- package/src/utils/auth-api.js +47 -1
- package/src/utils/common-util.js +22 -81
- package/src/utils/jump-page-utils.js +3 -6
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +6 -3
- package/src/utils/util.js +13 -11
- package/src/utils/workflow-util.js +3 -0
- package/src/views/dsc-component/Sidebar/Item.vue +7 -5
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
- package/src/views/dsc-component/Sidebar/index.vue +12 -20
- package/src/views/dsc-component/tabs/tab-content.vue +8 -9
- package/src/views/layout/EmptyLayout.vue +4 -1
- package/src/views/layout/NewLayout.vue +6 -65
- package/src/views/layout/components/AppMain.vue +2 -1
- package/src/views/layout/components/Menubar/Item.vue +23 -7
- package/src/views/layout/components/Menubar/Link.vue +11 -2
- package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
- package/src/views/layout/components/Menubar/index.vue +51 -16
- package/src/views/layout/components/tabs/tab-content.vue +162 -0
- package/src/views/layout/tab-content-iframe-index.vue +31 -0
- package/src/views/layout/tab-content-index.vue +85 -0
- package/src/views/login/index.vue +1 -1
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -71
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -108
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -408
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -273
- package/packages/department-tree-inline/src/search-result.vue +0 -176
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
- package/packages/department-user-tree/src/department-user-tree.vue +0 -101
- package/packages/department-user-tree-inline/index.js +0 -6
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -636
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
- package/packages/department-user-tree-inline/src/search-result.vue +0 -197
- package/packages/directives/prevent-reclick.js +0 -19
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
- package/packages/dynamic-source-select/src/events.js +0 -55
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -226
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
- package/packages/fs-upload/src/fs-upload-single.vue +0 -312
- package/packages/fs-upload/src/fs-upload.vue +0 -189
- package/packages/fs-upload/src/see-big-picture.vue +0 -55
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -38
- package/packages/index.js +0 -121
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -73
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -542
- package/packages/plugins/export-data-new.js +0 -466
- package/packages/plugins/export-data.js +0 -361
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -43
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -172
- package/packages/remove-department/src/remove-dept-service.js +0 -20
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -20
- package/packages/remove-user/src/remove-user.vue +0 -195
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -278
- package/packages/rich-editor/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/viewer.vue +0 -103
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -33
- package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
- package/packages/scan-code-input/src/scan-code-input.vue +0 -116
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -90
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -820
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -278
- package/packages/super-grid/src/dynamic-input.vue +0 -1279
- package/packages/super-grid/src/eventBus.js +0 -2
- package/packages/super-grid/src/events.js +0 -55
- package/packages/super-grid/src/formValidatorUtil.js +0 -226
- package/packages/super-grid/src/formatter.js +0 -181
- package/packages/super-grid/src/group-column.vue +0 -100
- package/packages/super-grid/src/header-context-menu.vue +0 -87
- package/packages/super-grid/src/index-column.vue +0 -51
- package/packages/super-grid/src/normal-column.vue +0 -771
- package/packages/super-grid/src/public-methods.js +0 -31
- package/packages/super-grid/src/row-operation.vue +0 -161
- package/packages/super-grid/src/search-button.vue +0 -66
- package/packages/super-grid/src/search-condition-input.vue +0 -61
- package/packages/super-grid/src/search-condition-list.vue +0 -59
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -404
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -170
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
- package/packages/super-grid/src/search-form.vue +0 -642
- package/packages/super-grid/src/search-methods.js +0 -448
- package/packages/super-grid/src/selection-column.vue +0 -43
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service.js +0 -593
- package/packages/super-grid/src/super-grid.vue +0 -2882
- package/packages/super-grid/src/utils.js +0 -762
- package/packages/super-grid/src/view-image-dialog.vue +0 -130
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -103
- package/packages/super-nine-grid/src/custom-formatter.js +0 -66
- package/packages/super-nine-grid/src/formatter.js +0 -132
- package/packages/super-nine-grid/src/search-form-number.vue +0 -38
- package/packages/super-nine-grid/src/search-form.vue +0 -430
- package/packages/super-nine-grid/src/search-methods.js +0 -134
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -91
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
- package/packages/super-nine-grid/src/utils.js +0 -261
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/memory-cache-utils.js +0 -90
- package/packages/utils/utils.js +0 -152
- package/packages/utils/value-set.js +0 -86
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -95
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -325
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
- package/packages/workgroup-user-tree-inline/index.js +0 -6
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -51
- package/src/index.js +0 -93
- package/src/styles/theme/gray/form-style.scss +0 -41
|
@@ -1,312 +0,0 @@
|
|
|
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>
|
|
@@ -1,189 +0,0 @@
|
|
|
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>
|
|
@@ -1,55 +0,0 @@
|
|
|
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>
|