agilebuilder-ui 1.0.18 → 1.0.19-beta2
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/.eslintrc.cjs +28 -0
- package/.prettierrc.json +12 -0
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +7050 -6479
- package/lib/super-ui.umd.cjs +55 -55
- package/package.json +1 -1
- package/packages/fs-preview/src/fs-preview.vue +50 -78
- package/packages/fs-upload-list/src/fs-upload-list.vue +334 -375
- package/packages/fs-upload-new/index.ts +6 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +129 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +132 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +199 -0
- package/packages/fs-upload-new/src/fs-upload-new.vue +149 -0
- package/packages/index.js +5 -2
- package/packages/super-grid/src/apis.js +11 -11
- package/packages/super-grid/src/super-grid.vue +4 -4
package/package.json
CHANGED
|
@@ -45,25 +45,17 @@
|
|
|
45
45
|
<el-table-column prop="showName" width="200" />
|
|
46
46
|
<el-table-column align="right">
|
|
47
47
|
<template v-slot="scope">
|
|
48
|
-
<el-tooltip
|
|
49
|
-
:content="$t('imatrixUIPublicModel.preview')"
|
|
50
|
-
class="item"
|
|
51
|
-
effect="dark"
|
|
52
|
-
placement="top"
|
|
53
|
-
>
|
|
48
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
|
|
54
49
|
<el-icon @click="previewSingle(scope.row)" style="cursor: pointer"><el-icon-view /></el-icon>
|
|
55
50
|
</el-tooltip>
|
|
56
51
|
</template>
|
|
57
52
|
</el-table-column>
|
|
58
53
|
<el-table-column>
|
|
59
54
|
<template v-slot="scope">
|
|
60
|
-
<el-tooltip
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
placement="top"
|
|
65
|
-
>
|
|
66
|
-
<el-icon @click="donwloadFile(scope.$index, fileList)" style="cursor: pointer"><el-icon-download /></el-icon>
|
|
55
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.download')" class="item" effect="dark" placement="top">
|
|
56
|
+
<el-icon @click="donwloadFile(scope.$index, fileList)" style="cursor: pointer"
|
|
57
|
+
><el-icon-download
|
|
58
|
+
/></el-icon>
|
|
67
59
|
</el-tooltip>
|
|
68
60
|
</template>
|
|
69
61
|
</el-table-column>
|
|
@@ -73,53 +65,52 @@
|
|
|
73
65
|
</template>
|
|
74
66
|
|
|
75
67
|
<script>
|
|
76
|
-
import {
|
|
77
|
-
Paperclip as ElIconPaperclip,
|
|
78
|
-
View as ElIconView,
|
|
79
|
-
Download as ElIconDownload,
|
|
80
|
-
} from '@element-plus/icons-vue'
|
|
68
|
+
import { Paperclip as ElIconPaperclip, View as ElIconView, Download as ElIconDownload } from '@element-plus/icons-vue'
|
|
81
69
|
import * as Vue from 'vue'
|
|
82
|
-
import {
|
|
83
|
-
isPlateSys,
|
|
84
|
-
getSystemFrontendUrl,
|
|
85
|
-
} from '../../../src/utils/common-util'
|
|
70
|
+
import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util'
|
|
86
71
|
import { isImage, getEntityFieldValue } from '../../../src/utils/util'
|
|
87
72
|
import { packageFile } from '../../super-grid/src/utils'
|
|
88
73
|
import { getToken } from '../../../src/utils/auth'
|
|
89
|
-
import {Base64} from 'js-base64'
|
|
74
|
+
import { Base64 } from 'js-base64'
|
|
90
75
|
export default {
|
|
91
76
|
components: {
|
|
92
77
|
ElIconPaperclip,
|
|
93
78
|
ElIconView,
|
|
94
|
-
ElIconDownload
|
|
79
|
+
ElIconDownload
|
|
95
80
|
},
|
|
96
81
|
name: 'FsPreview',
|
|
97
82
|
props: {
|
|
98
83
|
label: {
|
|
99
84
|
type: String,
|
|
100
|
-
default: null
|
|
85
|
+
default: null
|
|
101
86
|
},
|
|
102
87
|
fileSetObj: {
|
|
103
88
|
type: Object,
|
|
104
|
-
default: null
|
|
89
|
+
default: null
|
|
105
90
|
},
|
|
106
91
|
isSql: {
|
|
107
92
|
type: Boolean,
|
|
108
|
-
default: false
|
|
93
|
+
default: false
|
|
109
94
|
},
|
|
110
95
|
entity: {
|
|
111
96
|
type: Object,
|
|
112
97
|
default: () => {
|
|
113
98
|
return {}
|
|
114
|
-
}
|
|
99
|
+
}
|
|
115
100
|
},
|
|
101
|
+
fileInfo: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: () => {
|
|
104
|
+
return {}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
116
107
|
},
|
|
117
108
|
data() {
|
|
118
109
|
return {
|
|
119
110
|
showPreviewSingleImage: false,
|
|
120
111
|
showPreviewMulti: false,
|
|
121
112
|
previewImageInfo: {},
|
|
122
|
-
fileList: []
|
|
113
|
+
fileList: []
|
|
123
114
|
}
|
|
124
115
|
},
|
|
125
116
|
created() {
|
|
@@ -162,18 +153,16 @@ export default {
|
|
|
162
153
|
},
|
|
163
154
|
previewMuti() {
|
|
164
155
|
const keyValueParam = this.analysisFileSetObj(this.fileSetObj, this.isSql)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
)
|
|
156
|
+
let serverPath = null
|
|
157
|
+
if (this.fileInfo.showName && this.fileInfo.serverPath) {
|
|
158
|
+
serverPath = this.fileInfo.serverPath
|
|
159
|
+
} else if (entity) {
|
|
160
|
+
serverPath = getEntityFieldValue(this.entity, keyValueParam.serverPath)
|
|
161
|
+
}
|
|
169
162
|
if (serverPath) {
|
|
170
163
|
const uuids = serverPath.split(',')
|
|
171
164
|
this.$http
|
|
172
|
-
.post(
|
|
173
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
174
|
-
'/common/fs-upload/search-file-names',
|
|
175
|
-
uuids
|
|
176
|
-
)
|
|
165
|
+
.post(window.$vueApp.config.globalProperties.baseURL + '/common/fs-upload/search-file-names', uuids)
|
|
177
166
|
.then((result) => {
|
|
178
167
|
this.fileList = []
|
|
179
168
|
uuids.forEach((uuid) => {
|
|
@@ -193,9 +182,7 @@ export default {
|
|
|
193
182
|
const showName = fileInfo.showName
|
|
194
183
|
if (window.$vueApp.config.globalProperties.customPreviewUrl) {
|
|
195
184
|
window.open(
|
|
196
|
-
getSystemFrontendUrl(
|
|
197
|
-
window.$vueApp.config.globalProperties.portalUrl
|
|
198
|
-
) +
|
|
185
|
+
getSystemFrontendUrl(window.$vueApp.config.globalProperties.portalUrl) +
|
|
199
186
|
'/#/file-service/preview?serverPath=' +
|
|
200
187
|
fileInfo.serverPath +
|
|
201
188
|
'&showName=' +
|
|
@@ -209,54 +196,39 @@ export default {
|
|
|
209
196
|
}
|
|
210
197
|
let previewUrl
|
|
211
198
|
if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
|
|
212
|
-
const originUrl =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
199
|
+
const originUrl =
|
|
200
|
+
baseUrl +
|
|
201
|
+
'/common/super-form/downloads?jwt=' +
|
|
202
|
+
token +
|
|
203
|
+
'&showName=' +
|
|
204
|
+
encodeURI(showName) +
|
|
205
|
+
'&serverPath=' +
|
|
206
|
+
fileInfo.serverPath
|
|
217
207
|
//要预览文件的访问地址
|
|
218
|
-
const myPreviewUrl = originUrl + '&fullfilename='+showName
|
|
208
|
+
const myPreviewUrl = originUrl + '&fullfilename=' + showName
|
|
219
209
|
console.log('myPreviewUrl====', myPreviewUrl)
|
|
220
210
|
// http://127.0.0.1:8012/onlinePreview
|
|
221
|
-
previewUrl =
|
|
211
|
+
previewUrl =
|
|
212
|
+
window.$vueApp.config.globalProperties.kkFileViewUrl +
|
|
213
|
+
'?url=' +
|
|
214
|
+
encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
222
215
|
console.log('previewUrl====', previewUrl)
|
|
223
216
|
} else {
|
|
224
|
-
previewUrl =
|
|
225
|
-
|
|
226
|
-
'/common/fs-upload/preview?jwt=' +
|
|
227
|
-
token
|
|
228
|
-
previewUrl = previewUrl +
|
|
229
|
-
'&showName=' +
|
|
230
|
-
encodeURI(showName) +
|
|
231
|
-
'&serverPath=' +
|
|
232
|
-
fileInfo.serverPath
|
|
217
|
+
previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
|
|
218
|
+
previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + fileInfo.serverPath
|
|
233
219
|
}
|
|
234
|
-
window.open(
|
|
235
|
-
previewUrl,
|
|
236
|
-
showName
|
|
237
|
-
)
|
|
220
|
+
window.open(previewUrl, showName)
|
|
238
221
|
}
|
|
239
222
|
},
|
|
240
223
|
donwloadFile(index, fileList) {
|
|
241
224
|
const token = getToken()
|
|
242
225
|
const showName = this.formatFileName(this.fileList[index].showName)
|
|
243
226
|
if (!this.fileList[index].src) {
|
|
244
|
-
let url =
|
|
245
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
246
|
-
'/common/super-form/downloads?jwt=' +
|
|
247
|
-
token
|
|
227
|
+
let url = window.$vueApp.config.globalProperties.baseURL + '/common/super-form/downloads?jwt=' + token
|
|
248
228
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
249
|
-
url =
|
|
250
|
-
window.$vueApp.config.globalProperties.baseAPI +
|
|
251
|
-
'/component/super-form/downloads?jwt=' +
|
|
252
|
-
token
|
|
229
|
+
url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
253
230
|
}
|
|
254
|
-
const src =
|
|
255
|
-
url +
|
|
256
|
-
'&showName=' +
|
|
257
|
-
encodeURI(showName) +
|
|
258
|
-
'&serverPath=' +
|
|
259
|
-
this.fileList[index].serverPath
|
|
231
|
+
const src = url + '&showName=' + encodeURI(showName) + '&serverPath=' + this.fileList[index].serverPath
|
|
260
232
|
window.open(src)
|
|
261
233
|
} else {
|
|
262
234
|
window.open(this.fileList[index].src)
|
|
@@ -291,13 +263,13 @@ export default {
|
|
|
291
263
|
}
|
|
292
264
|
return {
|
|
293
265
|
showName: showName,
|
|
294
|
-
serverPath: serverPath
|
|
266
|
+
serverPath: serverPath
|
|
295
267
|
}
|
|
296
268
|
},
|
|
297
269
|
formatFileName(fileName) {
|
|
298
270
|
return fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
299
|
-
}
|
|
271
|
+
}
|
|
300
272
|
},
|
|
301
|
-
emits: ['close']
|
|
273
|
+
emits: ['close']
|
|
302
274
|
}
|
|
303
275
|
</script>
|