agilebuilder-ui 1.1.50-rc1 → 1.1.50-rc3
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/{401-aaa4054d.js → 401-aead36a9.js} +1 -1
- package/lib/{404-ef3b10e9.js → 404-9ad11c2e.js} +1 -1
- package/lib/{iframe-page-28c30283.js → iframe-page-bf851287.js} +1 -1
- package/lib/{index-bece2c1c.js → index-75ff2a06.js} +21818 -21643
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +104 -104
- package/lib/{tab-content-iframe-index-87ac3b2b.js → tab-content-iframe-index-c7bb8381.js} +1 -1
- package/lib/{tab-content-index-956a0533.js → tab-content-index-95a59e50.js} +1 -1
- package/lib/{tache-subprocess-history-2c4f98f2.js → tache-subprocess-history-106dc6ec.js} +1 -1
- package/package.json +1 -1
- package/packages/chat-embed/src/chat-embed-message.ts +5 -2
- package/packages/chat-embed/src/chat-sender.vue +41 -30
- package/packages/chat-embed/src/header.vue +2 -2
- package/packages/chat-embed/src/index.vue +503 -158
- package/packages/fs-preview/src/fs-preview.vue +19 -7
- package/packages/fs-upload/src/fs-upload-multi.vue +5 -3
- package/packages/fs-upload/src/fs-upload-single.vue +6 -3
- package/packages/fs-upload-list/src/fs-upload-list.vue +6 -1
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +6 -1
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +7 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +6 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +6 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +56 -12
- package/packages/fs-upload-new/src/fs-upload-new.vue +16 -1
- package/packages/multipart-upload/src/multipart-upload-form.vue +6 -3
- package/packages/multipart-upload/src/multipart-upload-list.vue +6 -3
- package/packages/plugins/export-data-new.js +14 -1
- package/packages/super-grid/src/apis.js +9 -0
- package/packages/super-grid/src/dynamic-input.vue +25 -5
- package/packages/super-grid/src/search-form-item.vue +17 -13
- package/packages/super-grid/src/search-methods.js +148 -139
- package/packages/super-grid/src/super-grid.vue +2 -0
- package/packages/super-grid/src/utils.js +1 -0
- package/packages/super-grid/src/view-image-dialog.vue +6 -3
- package/packages/utils/value-set.js +49 -13
- package/src/utils/auth.js +3 -0
- package/src/utils/common-util.js +20 -5
- package/src/utils/request.js +7 -1
- package/src/utils/watermark-cache.js +13 -0
- package/src/utils/watermark.js +47 -6
- package/src/views/layout/EmptyLayout.vue +9 -1
- package/src/views/layout/Layout.vue +4 -0
- package/src/views/layout/NewLayout.vue +4 -0
- package/src/views/login/update-password.vue +3 -0
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
// import { Image } from 'antd';
|
|
85
85
|
import { Paperclip as ElIconPaperclip, View as ElIconView, Download as ElIconDownload } from '@element-plus/icons-vue'
|
|
86
86
|
import * as Vue from 'vue'
|
|
87
|
-
import { isPlateSys, getSystemFrontendUrl, getRelativeBaseUrl,
|
|
87
|
+
import { isPlateSys, getSystemFrontendUrl, getRelativeBaseUrl, getKkFilePreviewUrl } from '../../../src/utils/common-util'
|
|
88
88
|
import { isImage, getEntityFieldValue } from '../../../src/utils/util'
|
|
89
89
|
import { packageFile } from '../../super-grid/src/utils'
|
|
90
90
|
import { getToken } from '../../../src/utils/auth'
|
|
@@ -134,6 +134,11 @@ export default {
|
|
|
134
134
|
enableDelete: {
|
|
135
135
|
type: Boolean,
|
|
136
136
|
default: false
|
|
137
|
+
},
|
|
138
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
139
|
+
watermark:{
|
|
140
|
+
type: Object,
|
|
141
|
+
default: () => ({})
|
|
137
142
|
}
|
|
138
143
|
},
|
|
139
144
|
data() {
|
|
@@ -293,11 +298,13 @@ export default {
|
|
|
293
298
|
const myPreviewUrl = originUrl + '&fullfilename=' + showName
|
|
294
299
|
console.log('myPreviewUrl====', myPreviewUrl)
|
|
295
300
|
// http://127.0.0.1:8012/onlinePreview
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
302
|
+
window.open(url, showName)
|
|
303
|
+
})
|
|
304
|
+
// window.$vueApp.config.globalProperties.kkFileViewUrl +
|
|
305
|
+
// '?url=' +
|
|
306
|
+
// encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
307
|
+
/window.open(previewUrl, showName)
|
|
301
308
|
console.log('previewUrl====', previewUrl)
|
|
302
309
|
} else {
|
|
303
310
|
previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
|
|
@@ -318,12 +325,17 @@ export default {
|
|
|
318
325
|
},
|
|
319
326
|
download(showName, serverPath) {
|
|
320
327
|
const token = getToken()
|
|
328
|
+
const isShowWatermark = this.watermark.isShowWatermark
|
|
329
|
+
let watermarkContent = this.watermark?.content
|
|
330
|
+
if(!watermarkContent){
|
|
331
|
+
watermarkContent = ''
|
|
332
|
+
}
|
|
321
333
|
let url = window.$vueApp.config.globalProperties.baseURL + '/common/super-form/downloads?jwt=' + token
|
|
322
334
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
323
335
|
url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
324
336
|
}
|
|
325
337
|
url = getRelativeBaseUrl(url)
|
|
326
|
-
const src = url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
|
|
338
|
+
const src = url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath+'&isShowWatermark='+isShowWatermark+'&watermark='+watermarkContent
|
|
327
339
|
window.open(src)
|
|
328
340
|
},
|
|
329
341
|
analysisFileSetObj(fileSetObj, isSql) {
|
|
@@ -173,7 +173,7 @@ import {
|
|
|
173
173
|
isPlateSys,
|
|
174
174
|
getSystemFrontendUrl,
|
|
175
175
|
getRelativeBaseUrl,
|
|
176
|
-
|
|
176
|
+
getKkFilePreviewUrl,
|
|
177
177
|
} from '../../../src//utils//common-util.js'
|
|
178
178
|
|
|
179
179
|
export default {
|
|
@@ -382,8 +382,10 @@ export default {
|
|
|
382
382
|
//要预览文件的访问地址
|
|
383
383
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
384
384
|
// http://127.0.0.1:8012/onlinePreview
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
386
|
+
window.open(url, showName)
|
|
387
|
+
})
|
|
388
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
387
389
|
} else {
|
|
388
390
|
previewUrl =
|
|
389
391
|
baseUrl +
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
import {$emit} from '../../utils/gogocodeTransfer'
|
|
113
113
|
import Cookies from 'js-cookie'
|
|
114
114
|
import seeBigPicture from './see-big-picture.vue'
|
|
115
|
-
import {
|
|
115
|
+
import {getKkFilePreviewUrl, getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys,} from '../../../src/utils/common-util.js'
|
|
116
116
|
import {getToken} from '../../../src/utils/auth'
|
|
117
117
|
|
|
118
118
|
export default {
|
|
@@ -309,7 +309,10 @@ export default {
|
|
|
309
309
|
//要预览文件的访问地址
|
|
310
310
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
311
311
|
// http://127.0.0.1:8012/onlinePreview
|
|
312
|
-
|
|
312
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
313
|
+
window.open(url, showName)
|
|
314
|
+
})
|
|
315
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
313
316
|
} else {
|
|
314
317
|
previewUrl =
|
|
315
318
|
baseUrl +
|
|
@@ -320,8 +323,8 @@ export default {
|
|
|
320
323
|
encodeURI(myShowName) +
|
|
321
324
|
'&serverPath=' +
|
|
322
325
|
uuid
|
|
326
|
+
window.open(previewUrl, showName)
|
|
323
327
|
}
|
|
324
|
-
window.open(previewUrl, showName)
|
|
325
328
|
}
|
|
326
329
|
}
|
|
327
330
|
},
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
:file-set-obj="fileSetObj"
|
|
11
11
|
:is-sql="isSql"
|
|
12
12
|
:label="value"
|
|
13
|
+
:watermark="watermark"
|
|
13
14
|
@delete-file="deleteRow"
|
|
14
15
|
>
|
|
15
16
|
<template #prefix>
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
:componentId="componentId"
|
|
54
55
|
:listCode="listCode"
|
|
55
56
|
:openCameraOrChoosePhoto="fileSetObj.openCameraOrChoosePhoto"
|
|
57
|
+
:watermark="watermark"
|
|
56
58
|
/>
|
|
57
59
|
</template>
|
|
58
60
|
<template v-else>
|
|
@@ -63,6 +65,7 @@
|
|
|
63
65
|
:file-set-obj="fileSetObj"
|
|
64
66
|
:is-sql="isSql"
|
|
65
67
|
:label="value"
|
|
68
|
+
:watermark="watermark"
|
|
66
69
|
/>
|
|
67
70
|
</template>
|
|
68
71
|
</span>
|
|
@@ -163,6 +166,7 @@ export default {
|
|
|
163
166
|
defaultAction = getRelativeBaseUrl(defaultAction)
|
|
164
167
|
const isMobile = isMobileBrowser()
|
|
165
168
|
const systemCode = this.pageContext && this.pageContext.systemCode ? this.pageContext.systemCode : null
|
|
169
|
+
const watermark = this.fileSetObj.watermark
|
|
166
170
|
return {
|
|
167
171
|
deleteUuids: [],
|
|
168
172
|
headers,
|
|
@@ -174,7 +178,8 @@ export default {
|
|
|
174
178
|
previewImageInfo: {},
|
|
175
179
|
showFileList: this.fileList,
|
|
176
180
|
isMobile,
|
|
177
|
-
systemCode
|
|
181
|
+
systemCode,
|
|
182
|
+
watermark
|
|
178
183
|
}
|
|
179
184
|
},
|
|
180
185
|
components: {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:onRemove="onRemove"
|
|
13
13
|
:beforeDownload="beforeDownload"
|
|
14
14
|
:baseURL="baseURLVal"
|
|
15
|
+
:watermark="watermark"
|
|
15
16
|
@chooseFile="pickBrowserFiles"
|
|
16
17
|
@remove="removeFile"
|
|
17
18
|
/>
|
|
@@ -137,6 +138,11 @@ const props = defineProps({
|
|
|
137
138
|
beforeUpload: {
|
|
138
139
|
type: Function,
|
|
139
140
|
default: () => {}
|
|
141
|
+
},
|
|
142
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
143
|
+
watermark:{
|
|
144
|
+
type: Object,
|
|
145
|
+
default: () => ({})
|
|
140
146
|
}
|
|
141
147
|
})
|
|
142
148
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:onRemove="onRemove"
|
|
13
13
|
:beforeDownload="beforeDownload"
|
|
14
14
|
:baseURL="baseURLVal"
|
|
15
|
+
:watermark="watermark"
|
|
15
16
|
@chooseFile="pickBrowserFiles"
|
|
16
17
|
@remove="removeFile"
|
|
17
18
|
/>
|
|
@@ -180,6 +181,11 @@ const props = defineProps({
|
|
|
180
181
|
beforeUpload: {
|
|
181
182
|
type: Function,
|
|
182
183
|
default: () => {}
|
|
184
|
+
},
|
|
185
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
186
|
+
watermark:{
|
|
187
|
+
type: Object,
|
|
188
|
+
default: () => ({})
|
|
183
189
|
}
|
|
184
190
|
})
|
|
185
191
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{{file.name}}
|
|
15
15
|
</div></div>
|
|
16
16
|
<img v-else class="el-upload-list__item-thumbnail" :src="getPreviewSrc(file.showName?file.showName: file.name, file.serverPath)" alt="" />
|
|
17
|
-
<fs-preview-new :disabled="disabled" :file-list="fileListResult" :file="file" :system-code="systemCode" :before-remove="beforeRemove" :on-remove="onRemove" :before-download="beforeDownload" @remove="removeFile"/>
|
|
17
|
+
<fs-preview-new :disabled="disabled" :file-list="fileListResult" :file="file" :system-code="systemCode" :watermark="watermark" :before-remove="beforeRemove" :on-remove="onRemove" :before-download="beforeDownload" @remove="removeFile"/>
|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
@@ -66,6 +66,11 @@ const props = defineProps({
|
|
|
66
66
|
baseURL: {
|
|
67
67
|
type: String,
|
|
68
68
|
default: ''
|
|
69
|
+
},
|
|
70
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
71
|
+
watermark:{
|
|
72
|
+
type: Object,
|
|
73
|
+
default: () => ({})
|
|
69
74
|
}
|
|
70
75
|
})
|
|
71
76
|
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
:componentName="componentName"
|
|
46
46
|
:listCode="listCode"
|
|
47
47
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
48
|
+
:watermark="watermark"
|
|
48
49
|
@uploadend="uploadendMobile"
|
|
49
50
|
@remove="removeMobileFile"
|
|
50
51
|
/>
|
|
@@ -171,6 +172,11 @@ const props = defineProps({
|
|
|
171
172
|
beforeUpload: {
|
|
172
173
|
type: Function,
|
|
173
174
|
default: () => {}
|
|
175
|
+
},
|
|
176
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
177
|
+
watermark:{
|
|
178
|
+
type: Object,
|
|
179
|
+
default: () => ({})
|
|
174
180
|
}
|
|
175
181
|
})
|
|
176
182
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:componentName="componentName"
|
|
27
27
|
:listCode="listCode"
|
|
28
28
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
29
|
+
:watermark="watermark"
|
|
29
30
|
@uploadend="uploadedFile"
|
|
30
31
|
@remove="removeFile"
|
|
31
32
|
/>
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
:componentName="componentName"
|
|
56
57
|
:listCode="listCode"
|
|
57
58
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
59
|
+
:watermark="watermark"
|
|
58
60
|
@uploadend="uploadedFile"
|
|
59
61
|
@remove="removeFile"
|
|
60
62
|
/>
|
|
@@ -181,6 +183,11 @@ const props = defineProps({
|
|
|
181
183
|
beforeUpload: {
|
|
182
184
|
type: Function,
|
|
183
185
|
default: () => {}
|
|
186
|
+
},
|
|
187
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
188
|
+
watermark:{
|
|
189
|
+
type: Object,
|
|
190
|
+
default: () => ({})
|
|
184
191
|
}
|
|
185
192
|
})
|
|
186
193
|
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
:file-list="fileList"
|
|
34
34
|
:system-code="systemCode"
|
|
35
35
|
:before-remove="beforeRemove"
|
|
36
|
+
:watermark="watermark"
|
|
36
37
|
:on-remove="onRemove"
|
|
37
38
|
:before-download="beforeDownload"
|
|
38
39
|
:downloadable="downloadable"
|
|
@@ -139,6 +140,11 @@ const props = defineProps({
|
|
|
139
140
|
limit: {
|
|
140
141
|
type: Number,
|
|
141
142
|
default: 0
|
|
143
|
+
},
|
|
144
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
145
|
+
watermark:{
|
|
146
|
+
type: Object,
|
|
147
|
+
default: () => ({})
|
|
142
148
|
}
|
|
143
149
|
})
|
|
144
150
|
const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:disabled-no-download="disabledNoDownload"
|
|
31
31
|
:file-list="fileList"
|
|
32
32
|
:system-code="systemCode"
|
|
33
|
+
:watermark="watermark"
|
|
33
34
|
:before-remove="beforeRemove"
|
|
34
35
|
:on-remove="onRemove"
|
|
35
36
|
:before-download="beforeDownload"
|
|
@@ -137,6 +138,11 @@ const props = defineProps({
|
|
|
137
138
|
limit: {
|
|
138
139
|
type: Number,
|
|
139
140
|
default: 0
|
|
141
|
+
},
|
|
142
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
143
|
+
watermark:{
|
|
144
|
+
type: Object,
|
|
145
|
+
default: () => ({})
|
|
140
146
|
}
|
|
141
147
|
})
|
|
142
148
|
const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
</el-tooltip>
|
|
21
21
|
</template>
|
|
22
22
|
<el-tooltip v-if="!disabled || !disabledNoDownload" :content="t('fsUpload.download')" placement="top">
|
|
23
|
-
<el-icon style="margin-left: 10px" @click="handleDownload(file)">
|
|
23
|
+
<!-- <el-icon style="margin-left: 10px" @click="handleDownload(file)">
|
|
24
24
|
<Download />
|
|
25
|
-
</el-icon>
|
|
25
|
+
</el-icon> -->
|
|
26
|
+
<super-icon class="fs-preview-icon" @click="handleDownload(file)" iconValue="amb-color-icon-xiazai" />
|
|
26
27
|
</el-tooltip>
|
|
27
28
|
<el-tooltip v-if="!disabled" :content="t('fsUpload.delete')" placement="top">
|
|
28
|
-
<
|
|
29
|
+
<super-icon class="fs-preview-icon" @click="handleOnRemove(file)" iconValue="amb-color-icon-shanchu" />
|
|
29
30
|
</el-tooltip>
|
|
30
31
|
</div>
|
|
31
32
|
</template>
|
|
@@ -61,7 +62,14 @@
|
|
|
61
62
|
<script setup lang="ts">
|
|
62
63
|
import { Close, Paperclip, Download } from '@element-plus/icons-vue'
|
|
63
64
|
import { ref, defineProps } from 'vue'
|
|
64
|
-
import {
|
|
65
|
+
import {
|
|
66
|
+
getSystemFrontendUrl,
|
|
67
|
+
isPlateSys,
|
|
68
|
+
isMobileBrowser,
|
|
69
|
+
getReplaceUrlDomain,
|
|
70
|
+
getRelativeBaseUrl,
|
|
71
|
+
getKkFilePreviewUrl
|
|
72
|
+
} from '../../../src/utils/common-util'
|
|
65
73
|
import { getToken } from '../../../src/utils/auth'
|
|
66
74
|
import { isImage } from '../../../src/utils/util'
|
|
67
75
|
import { Base64 } from 'js-base64'
|
|
@@ -123,13 +131,22 @@ const props = defineProps({
|
|
|
123
131
|
disabledNoDownload: {
|
|
124
132
|
type: Boolean,
|
|
125
133
|
default: false
|
|
134
|
+
},
|
|
135
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
136
|
+
watermark: {
|
|
137
|
+
type: Object,
|
|
138
|
+
default: () => ({})
|
|
126
139
|
}
|
|
127
140
|
})
|
|
128
141
|
let baseURL = props.baseURL ? props.baseURL : window.$vueApp.config.globalProperties.baseURL
|
|
129
142
|
let baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
130
143
|
baseURL = getRelativeBaseUrl(baseURL)
|
|
131
144
|
baseAPI = getRelativeBaseUrl(baseAPI)
|
|
132
|
-
|
|
145
|
+
if (!props.watermark.content) {
|
|
146
|
+
// 如果没有传水印配置,从按钮配置configure中获取
|
|
147
|
+
props.watermark.isShowWatermark = props.configure.props?.watermark?.isShowWatermark===undefined?'true':props.configure.props?.watermark.isShowWatermark+''
|
|
148
|
+
props.watermark.content = props.configure.props?.watermark?.content
|
|
149
|
+
}
|
|
133
150
|
const dialogVisible = ref<boolean>(false)
|
|
134
151
|
const previewImageInfo = ref<any>({})
|
|
135
152
|
const previewSrcList = ref<string[]>([])
|
|
@@ -156,6 +173,11 @@ const download = (file: any) => {
|
|
|
156
173
|
const token = getToken()
|
|
157
174
|
const fileName = file.showName ? file.showName : file.name
|
|
158
175
|
const showName = fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
176
|
+
const isShowWatermark = props.watermark?.isShowWatermark
|
|
177
|
+
let watermarkContent = props.watermark?.content
|
|
178
|
+
if (!watermarkContent) {
|
|
179
|
+
watermarkContent = ''
|
|
180
|
+
}
|
|
159
181
|
let url =
|
|
160
182
|
baseURL +
|
|
161
183
|
'/common/super-form/downloads?showName=' +
|
|
@@ -163,8 +185,12 @@ const download = (file: any) => {
|
|
|
163
185
|
'&serverPath=' +
|
|
164
186
|
file.serverPath +
|
|
165
187
|
'&jwt=' +
|
|
166
|
-
token
|
|
167
|
-
|
|
188
|
+
token +
|
|
189
|
+
'&isShowWatermark=' +
|
|
190
|
+
isShowWatermark +
|
|
191
|
+
'&watermark=' +
|
|
192
|
+
encodeURI(watermarkContent)
|
|
193
|
+
if (isPlateSys(props.systemCode)) {
|
|
168
194
|
url =
|
|
169
195
|
baseAPI +
|
|
170
196
|
'/component/super-form/downloads?showName=' +
|
|
@@ -253,9 +279,11 @@ const previweDoc = (showName: string, serverPath: string) => {
|
|
|
253
279
|
const myPreviewUrl = originUrl + '&fullfilename=' + showName
|
|
254
280
|
console.log('myPreviewUrl====', myPreviewUrl)
|
|
255
281
|
// http://127.0.0.1:8012/onlinePreview
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
282
|
+
getKkFilePreviewUrl(myPreviewUrl).then((url) => {
|
|
283
|
+
window.open(url, showName)
|
|
284
|
+
})
|
|
285
|
+
// previewUrl =
|
|
286
|
+
// window.$vueApp.config.globalProperties.kkFileViewUrl + '?url=' + encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
259
287
|
console.log('previewUrl====', previewUrl)
|
|
260
288
|
} else {
|
|
261
289
|
previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
|
|
@@ -297,7 +325,23 @@ const isPreview = (fileName: string) => {
|
|
|
297
325
|
</script>
|
|
298
326
|
<style lang="scss" scoped>
|
|
299
327
|
.amb-color-iconfont {
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
328
|
+
width: 25px;
|
|
329
|
+
height: 25px;
|
|
330
|
+
}
|
|
331
|
+
.fs-preview-icon {
|
|
332
|
+
font-size: 15px !important;
|
|
333
|
+
display: inline-block;
|
|
334
|
+
width: 1em !important;
|
|
335
|
+
height: 1em !important;
|
|
336
|
+
line-height: 1em;
|
|
337
|
+
cursor: pointer;
|
|
338
|
+
|
|
339
|
+
&:not(:first-of-type) {
|
|
340
|
+
margin-left: 20px;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
& + & {
|
|
344
|
+
margin-left: 5px;
|
|
345
|
+
}
|
|
302
346
|
}
|
|
303
347
|
</style>
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
multiple: multiple,
|
|
14
14
|
limitFileSize: limitFileSize,
|
|
15
15
|
limit: limitNum,
|
|
16
|
-
downloadable: downloadable
|
|
16
|
+
downloadable: downloadable,
|
|
17
|
+
watermark: watermark
|
|
17
18
|
}"
|
|
18
19
|
@upload-success="onInputUploadSuccess"
|
|
19
20
|
@delete-success="onInputDeleteSuccess"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
:beforeDownload="beforeDownload"
|
|
42
43
|
:pageContext="pageContext"
|
|
43
44
|
:configure="configure"
|
|
45
|
+
:watermark="watermark"
|
|
44
46
|
:openFsUpload="openFsUpload"
|
|
45
47
|
/>
|
|
46
48
|
<fs-drag-upload
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
:action="action"
|
|
59
61
|
:headers="headers"
|
|
60
62
|
:file-list="fileList"
|
|
63
|
+
:watermark="watermark"
|
|
61
64
|
:beforeUpload="beforeUpload"
|
|
62
65
|
:onSuccess="onSuccess"
|
|
63
66
|
:beforeRemove="beforeRemove"
|
|
@@ -83,6 +86,7 @@
|
|
|
83
86
|
:action="action"
|
|
84
87
|
:headers="headers"
|
|
85
88
|
:file-list="fileList"
|
|
89
|
+
:watermark="watermark"
|
|
86
90
|
:beforeUpload="beforeUpload"
|
|
87
91
|
:onSuccess="onSuccess"
|
|
88
92
|
:beforeRemove="beforeRemove"
|
|
@@ -112,6 +116,7 @@
|
|
|
112
116
|
:action="action"
|
|
113
117
|
:headers="headers"
|
|
114
118
|
:file-list="fileList"
|
|
119
|
+
:watermark="watermark"
|
|
115
120
|
:beforeUpload="beforeUpload"
|
|
116
121
|
:onSuccess="onSuccess"
|
|
117
122
|
:beforeRemove="beforeRemove"
|
|
@@ -276,6 +281,11 @@ const props = defineProps({
|
|
|
276
281
|
disabledNoDownload: {
|
|
277
282
|
type: Boolean,
|
|
278
283
|
default: false
|
|
284
|
+
},
|
|
285
|
+
// 水印配置{isShowWatermark:true/false,content:'xxxxx'}
|
|
286
|
+
watermark: {
|
|
287
|
+
type: Object,
|
|
288
|
+
default: () => ({})
|
|
279
289
|
}
|
|
280
290
|
})
|
|
281
291
|
const isMobile = ref(isMobileBrowser())
|
|
@@ -292,6 +302,11 @@ console.log(
|
|
|
292
302
|
'props.pageContext=',
|
|
293
303
|
props.pageContext
|
|
294
304
|
)
|
|
305
|
+
if (!props.watermark.content) {
|
|
306
|
+
// 如果没有传水印配置,从按钮配置configure中获取
|
|
307
|
+
props.watermark.isShowWatermark = props.configure?.props?.watermark?.isShowWatermark===undefined?'true':props.configure?.props?.watermark.isShowWatermark+''
|
|
308
|
+
props.watermark.content = props.configure?.props?.watermark?.content
|
|
309
|
+
}
|
|
295
310
|
const listFileLabel = ref<string>('')
|
|
296
311
|
if (props.displayType === 'input') {
|
|
297
312
|
listFileLabel.value = props.fileInfo.showName || ''
|
|
@@ -132,7 +132,7 @@ import {isImage} from '../../../src/utils/util'
|
|
|
132
132
|
import {
|
|
133
133
|
isPlateSys,
|
|
134
134
|
getSystemFrontendUrl,
|
|
135
|
-
|
|
135
|
+
getKkFilePreviewUrl,
|
|
136
136
|
} from '../../../src/utils/common-util'
|
|
137
137
|
import * as Vue from 'vue'
|
|
138
138
|
import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
@@ -350,7 +350,10 @@ export default {
|
|
|
350
350
|
//要预览文件的访问地址
|
|
351
351
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
352
352
|
// http://127.0.0.1:8012/onlinePreview
|
|
353
|
-
|
|
353
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
354
|
+
window.open(url, myShowName)
|
|
355
|
+
})
|
|
356
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
354
357
|
} else {
|
|
355
358
|
previewUrl =
|
|
356
359
|
baseUrl +
|
|
@@ -361,8 +364,8 @@ export default {
|
|
|
361
364
|
encodeURI(myShowName) +
|
|
362
365
|
'&serverPath=' +
|
|
363
366
|
uuid
|
|
367
|
+
window.open(previewUrl, myShowName)
|
|
364
368
|
}
|
|
365
|
-
window.open(previewUrl, myShowName)
|
|
366
369
|
}
|
|
367
370
|
},
|
|
368
371
|
deleteRow(index) {
|
|
@@ -170,7 +170,7 @@ import {isImage} from '../../../src/utils/util'
|
|
|
170
170
|
import {
|
|
171
171
|
isPlateSys,
|
|
172
172
|
getSystemFrontendUrl,
|
|
173
|
-
|
|
173
|
+
getKkFilePreviewUrl,
|
|
174
174
|
} from '../../../src/utils/common-util'
|
|
175
175
|
import * as Vue from 'vue'
|
|
176
176
|
import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
@@ -503,7 +503,10 @@ export default {
|
|
|
503
503
|
//要预览文件的访问地址
|
|
504
504
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
505
505
|
// http://127.0.0.1:8012/onlinePreview
|
|
506
|
-
|
|
506
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
507
|
+
window.open(url, myShowName)
|
|
508
|
+
})
|
|
509
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
507
510
|
} else {
|
|
508
511
|
previewUrl =
|
|
509
512
|
baseUrl +
|
|
@@ -514,8 +517,8 @@ export default {
|
|
|
514
517
|
encodeURI(myShowName) +
|
|
515
518
|
'&serverPath=' +
|
|
516
519
|
uuid
|
|
520
|
+
window.open(previewUrl, myShowName)
|
|
517
521
|
}
|
|
518
|
-
window.open(previewUrl, myShowName)
|
|
519
522
|
}
|
|
520
523
|
},
|
|
521
524
|
handleOnRemove(index) {
|
|
@@ -323,7 +323,13 @@ function exportListData(
|
|
|
323
323
|
// 页面编码
|
|
324
324
|
param['pageCode'] = pageCode
|
|
325
325
|
// 导出按钮是否需要验证权限
|
|
326
|
-
param['isPermission'] = isPermission
|
|
326
|
+
param['isPermission'] = isPermission
|
|
327
|
+
const isShowWatermark = exportOptions.isShowWatermark===undefined || exportOptions.isShowWatermark===null?'true':exportOptions.isShowWatermark
|
|
328
|
+
param['isShowWatermark'] = isShowWatermark
|
|
329
|
+
let watermarkContent = exportOptions.watermarkContent
|
|
330
|
+
if(watermarkContent){
|
|
331
|
+
param['watermarkContent'] = watermarkContent
|
|
332
|
+
}
|
|
327
333
|
let baseUrl = exportOptions ? exportOptions.backendUrl : null
|
|
328
334
|
if(!baseUrl){
|
|
329
335
|
baseUrl = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -369,11 +375,18 @@ function exportListData(
|
|
|
369
375
|
localStorage.setItem(uuid, 'ok')
|
|
370
376
|
} else {
|
|
371
377
|
if (data.indexOf('~~') >= 0) {
|
|
378
|
+
const isShowWatermark = exportOptions.isShowWatermark===undefined || exportOptions.isShowWatermark===null?'true':exportOptions.isShowWatermark
|
|
379
|
+
let watermarkContent = exportOptions.watermarkContent
|
|
380
|
+
if(!watermarkContent){
|
|
381
|
+
watermarkContent = ''
|
|
382
|
+
}
|
|
372
383
|
localStorage.setItem(uuid, 'ok')
|
|
373
384
|
return download(
|
|
374
385
|
window.$vueApp.config.globalProperties.baseAPI +
|
|
375
386
|
'/component/super-grids/downloads?fileName=' +
|
|
376
387
|
encodeURI(data) +
|
|
388
|
+
'&isShowWatermark='+isShowWatermark+
|
|
389
|
+
'&watermark='+encodeURI(watermarkContent) +
|
|
377
390
|
'&_t=' +
|
|
378
391
|
new Date().getTime(),
|
|
379
392
|
excelName
|
|
@@ -1471,6 +1471,15 @@ const apis = {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
gridParams.gridData[rowIndex]['validateErrorField'] = fieldName
|
|
1474
|
+
},
|
|
1475
|
+
/**
|
|
1476
|
+
* 手动执行自定义查询
|
|
1477
|
+
* @param {Array} searchableColumns 查询字段集合
|
|
1478
|
+
* @param {object} searchData 查询值对象。例如:{'DEPT_CODE':'xxx','DEPT_NAME':'xxxx'}
|
|
1479
|
+
*/
|
|
1480
|
+
handleSearch(searchableColumns, searchData){
|
|
1481
|
+
const searchForm = this.packageSearchParamNormalType(searchableColumns, searchData)
|
|
1482
|
+
this.doSearch(searchForm)
|
|
1474
1483
|
}
|
|
1475
1484
|
}
|
|
1476
1485
|
export default apis
|
|
@@ -861,12 +861,20 @@ export default {
|
|
|
861
861
|
// 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
|
|
862
862
|
if (this.column.valueSetOptions) {
|
|
863
863
|
if (this.column.componentType === 'switch') {
|
|
864
|
-
|
|
864
|
+
let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
|
|
865
|
+
if(typeof valueSetOptionsObj === 'string'){
|
|
866
|
+
// 再转一次
|
|
867
|
+
valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
|
|
868
|
+
}
|
|
865
869
|
if (valueSetOptionsObj) {
|
|
866
870
|
this.valueSetOptions = valueSetOptionsObj
|
|
867
871
|
}
|
|
868
872
|
} else if (this.column.componentType !== 'inputNumber') {
|
|
869
|
-
|
|
873
|
+
let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
|
|
874
|
+
if(typeof valueSetOptionsObj === 'string'){
|
|
875
|
+
// 再转一次
|
|
876
|
+
valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
|
|
877
|
+
}
|
|
870
878
|
if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
|
|
871
879
|
this.valueSetOptions = valueSetOptionsObj.valueSetOptions
|
|
872
880
|
}
|
|
@@ -990,7 +998,11 @@ export default {
|
|
|
990
998
|
*/
|
|
991
999
|
getDateAllowTime() {
|
|
992
1000
|
if (this.column.valueSetOptions) {
|
|
993
|
-
|
|
1001
|
+
let optionsObj = JSON.parse(this.column.valueSetOptions)
|
|
1002
|
+
if(typeof optionsObj === 'string'){
|
|
1003
|
+
// 再转一次
|
|
1004
|
+
optionsObj = JSON.parse(optionsObj)
|
|
1005
|
+
}
|
|
994
1006
|
const nowTime = Date.now()
|
|
995
1007
|
if (optionsObj.stateForbiddenTime) {
|
|
996
1008
|
const stateDayNumber = optionsObj.stateForbiddenTime
|
|
@@ -1822,7 +1834,11 @@ export default {
|
|
|
1822
1834
|
this.column.valueSetOptions !== '' &&
|
|
1823
1835
|
this.column.componentType === 'inputNumber'
|
|
1824
1836
|
) {
|
|
1825
|
-
|
|
1837
|
+
let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
|
|
1838
|
+
if(typeof inputNumberSetting === 'string'){
|
|
1839
|
+
// 再转一次
|
|
1840
|
+
inputNumberSetting = JSON.parse(inputNumberSetting)
|
|
1841
|
+
}
|
|
1826
1842
|
if (inputNumberSetting.min) {
|
|
1827
1843
|
defaultValue = inputNumberSetting.min
|
|
1828
1844
|
}
|
|
@@ -1912,7 +1928,11 @@ export default {
|
|
|
1912
1928
|
this.column.valueSetOptions !== '' &&
|
|
1913
1929
|
this.column.componentType === 'inputNumber'
|
|
1914
1930
|
) {
|
|
1915
|
-
|
|
1931
|
+
let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
|
|
1932
|
+
if(typeof inputNumberSetting === 'string'){
|
|
1933
|
+
// 再转一次
|
|
1934
|
+
inputNumberSetting = JSON.parse(inputNumberSetting)
|
|
1935
|
+
}
|
|
1916
1936
|
this.inputNumberSet = inputNumberSetting
|
|
1917
1937
|
} else {
|
|
1918
1938
|
this.inputNumberSet = {
|