agilebuilder-ui 1.1.45 → 1.1.46-sit2
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-1bde8dc9.js → 401-75472dcd.js} +1 -1
- package/lib/{404-48d76996.js → 404-e5ce8455.js} +1 -1
- package/lib/{iframe-page-77e184a0.js → iframe-page-9d5ce6b0.js} +1 -1
- package/lib/index-789fbe10.js +92825 -0
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +33 -32
- package/lib/super-ui.umd.cjs +172 -133
- package/lib/{tab-content-iframe-index-39745d49.js → tab-content-iframe-index-47fae8cf.js} +1 -1
- package/lib/{tab-content-index-65696e56.js → tab-content-index-6e5f5717.js} +1 -1
- package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-1ed95cee.js} +1 -1
- package/package.json +7 -2
- package/packages/chat-embed/index.ts +6 -0
- package/packages/chat-embed/src/chat-embed-message.ts +79 -0
- package/packages/chat-embed/src/chat-embed.css +117 -0
- package/packages/chat-embed/src/chat-sender.vue +240 -0
- package/packages/chat-embed/src/header.vue +50 -0
- package/packages/chat-embed/src/index.vue +425 -0
- package/packages/chat-embed/src/recommendation-message.vue +37 -0
- package/packages/chat-embed/src/util.ts +33 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +42 -34
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +53 -42
- package/packages/department-tree-inline/src/search-result.vue +187 -219
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
- package/packages/department-user-tree-inline/src/search-result.vue +207 -220
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
- package/packages/empty-state/index.vue +28 -0
- package/packages/fs-preview/src/fs-preview.vue +12 -3
- package/packages/fs-upload/src/fs-upload-multi.vue +6 -4
- package/packages/fs-upload/src/fs-upload-single.vue +7 -6
- package/packages/fs-upload/src/fs-upload.vue +3 -1
- package/packages/fs-upload/src/see-big-picture.vue +3 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +8 -2
- package/packages/fs-upload-new/src/fs-button-upload.vue +11 -4
- package/packages/fs-upload-new/src/fs-drag-upload.vue +11 -4
- package/packages/fs-upload-new/src/fs-preview-new.vue +8 -5
- package/packages/fs-upload-new/src/fs-upload-new.vue +17 -0
- package/packages/index.js +16 -13
- package/packages/json-view/index.ts +3 -0
- package/packages/json-view/json-view-dialog.vue +53 -0
- package/packages/json-view/json-view.vue +126 -0
- package/packages/plugins/export-data-new.js +2 -0
- package/packages/super-grid/src/apis.js +11 -0
- package/packages/super-grid/src/components/grid-icon.vue +6 -3
- package/packages/super-grid/src/custom-formatter.js +15 -2
- package/packages/super-grid/src/dynamic-input.vue +46 -4
- package/packages/super-grid/src/formatter.js +5 -1
- package/packages/super-grid/src/normal-column-content.vue +31 -38
- package/packages/super-grid/src/normal-column.vue +8 -1
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/super-grid.vue +21 -8
- package/packages/utils/utils.js +26 -9
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +45 -36
- package/src/assets/chat-embed/avatar.png +0 -0
- package/src/i18n/langs/cn.js +20 -6
- package/src/i18n/langs/en.js +19 -5
- package/src/store/modules/chat-ai-store.ts +78 -0
- package/src/store/modules/tab-content.js +9 -3
- package/src/styles/element-ui.scss +8 -7
- package/src/styles/index.scss +45 -0
- package/src/utils/chat-ai-util.ts +31 -0
- package/src/utils/common-util.js +78 -8
- package/src/utils/insert_css.js +14 -1
- package/src/utils/jump-page-utils.js +8 -4
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
- package/src/views/dsc-component/tabs/tab-content.vue +6 -0
- package/lib/index-465b0d69.js +0 -73558
|
@@ -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 {getSystemFrontendUrl, isPlateSys,} from '../../../src/utils/common-util.js'
|
|
115
|
+
import {getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys,} from '../../../src/utils/common-util.js'
|
|
116
116
|
import {getToken} from '../../../src/utils/auth'
|
|
117
117
|
|
|
118
118
|
export default {
|
|
@@ -194,10 +194,11 @@ export default {
|
|
|
194
194
|
data: {
|
|
195
195
|
type: Array,
|
|
196
196
|
default: null,
|
|
197
|
+
baseURL: null
|
|
197
198
|
},
|
|
198
199
|
},
|
|
199
200
|
created() {
|
|
200
|
-
this.baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
201
|
+
this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
201
202
|
if (this.data) {
|
|
202
203
|
this.unifiedEnclosure = this.data[0]
|
|
203
204
|
}
|
|
@@ -260,7 +261,7 @@ export default {
|
|
|
260
261
|
const http = this.$http
|
|
261
262
|
http
|
|
262
263
|
.post(
|
|
263
|
-
|
|
264
|
+
this.baseURL +
|
|
264
265
|
'/common/fs-upload/des-encrypt',
|
|
265
266
|
map
|
|
266
267
|
)
|
|
@@ -294,9 +295,9 @@ export default {
|
|
|
294
295
|
} else {
|
|
295
296
|
const myShowName = this.unifiedEnclosure.fileName
|
|
296
297
|
const uuid = this.unifiedEnclosure.uuid
|
|
297
|
-
let baseUrl =
|
|
298
|
+
let baseUrl = this.baseURL
|
|
298
299
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
299
|
-
baseUrl = window.$vueApp.config.globalProperties.baseAPI
|
|
300
|
+
baseUrl = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
|
|
300
301
|
}
|
|
301
302
|
let previewUrl
|
|
302
303
|
if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
|
|
@@ -335,7 +336,7 @@ export default {
|
|
|
335
336
|
}
|
|
336
337
|
http
|
|
337
338
|
.post(
|
|
338
|
-
|
|
339
|
+
this.baseURL +
|
|
339
340
|
'/common/fs-upload/upload-template/' +
|
|
340
341
|
this.systemCode,
|
|
341
342
|
param,
|
|
@@ -38,6 +38,7 @@ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
|
38
38
|
import fsUploadMulti from './fs-upload-multi.vue'
|
|
39
39
|
import fsUploadSingle from './fs-upload-single.vue'
|
|
40
40
|
import * as Vue from 'vue'
|
|
41
|
+
import { getRelativeBaseUrl } from '../../../src/utils/common-util'
|
|
41
42
|
export default {
|
|
42
43
|
name: 'FsUpload',
|
|
43
44
|
components: {
|
|
@@ -175,9 +176,10 @@ export default {
|
|
|
175
176
|
deleteFile(deleteUuid) {
|
|
176
177
|
const http = this.$http
|
|
177
178
|
const list = [deleteUuid]
|
|
179
|
+
const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
178
180
|
http
|
|
179
181
|
.delete(
|
|
180
|
-
|
|
182
|
+
baseURL + '/common/fs-upload',
|
|
181
183
|
{ data: list }
|
|
182
184
|
)
|
|
183
185
|
.then((data) => {})
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script>
|
|
45
|
+
import { getRelativeBaseUrl } from '../../../src/utils/common-util'
|
|
45
46
|
export default {
|
|
46
47
|
props: {
|
|
47
48
|
unifiedEnclosures: {
|
|
@@ -56,9 +57,11 @@ export default {
|
|
|
56
57
|
data() {
|
|
57
58
|
return {
|
|
58
59
|
displayIndex: 0,
|
|
60
|
+
baseURL: null
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
created() {
|
|
64
|
+
this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
62
65
|
this.displayIndex = this.showIndex
|
|
63
66
|
},
|
|
64
67
|
methods: {},
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:show-file-list="false"
|
|
22
22
|
:headers="headers"
|
|
23
23
|
:on-success="uploadOnSuccess"
|
|
24
|
+
:on-error="onError"
|
|
24
25
|
:with-credentials="true"
|
|
25
26
|
name="file"
|
|
26
27
|
>
|
|
@@ -73,7 +74,7 @@ import { $emit } from '../../utils/gogocodeTransfer'
|
|
|
73
74
|
|
|
74
75
|
import { getToken } from '../../../src/utils/auth'
|
|
75
76
|
import { isImage } from '../../../src/utils/util'
|
|
76
|
-
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser } from '../../../src/utils/common-util'
|
|
77
|
+
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getRelativeBaseUrl } from '../../../src/utils/common-util'
|
|
77
78
|
import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
78
79
|
import { packageFile } from '../../super-grid/src/utils'
|
|
79
80
|
import FileUploadInputMobile from '../../fs-upload-new/src/file-upload-mobile/file-upload-input.vue'
|
|
@@ -159,6 +160,7 @@ export default {
|
|
|
159
160
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
160
161
|
defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
161
162
|
}
|
|
163
|
+
defaultAction = getRelativeBaseUrl(defaultAction)
|
|
162
164
|
const isMobile = isMobileBrowser()
|
|
163
165
|
const systemCode = this.pageContext && this.pageContext.systemCode ? this.pageContext.systemCode : null
|
|
164
166
|
return {
|
|
@@ -310,9 +312,13 @@ export default {
|
|
|
310
312
|
},
|
|
311
313
|
getFileIconByName(fileName) {
|
|
312
314
|
return getFileIconByName(fileName)
|
|
315
|
+
},
|
|
316
|
+
onError(error) {
|
|
317
|
+
$emit(this, 'on-error', error)
|
|
318
|
+
|
|
313
319
|
}
|
|
314
320
|
},
|
|
315
|
-
emits: ['close', 'upload-success', 'delete-success', 'delete', 'update:value', 'close', 'update:value']
|
|
321
|
+
emits: ['close', 'upload-success', 'delete-success', 'delete', 'update:value', 'close', 'update:value', 'on-error']
|
|
316
322
|
}
|
|
317
323
|
</script>
|
|
318
324
|
<style lang="scss" scoped>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:before-upload="handleBeforeUpload"
|
|
15
15
|
:before-remove="beforeRemove"
|
|
16
16
|
:on-success="onSuccess"
|
|
17
|
+
:on-error="onError"
|
|
17
18
|
>
|
|
18
19
|
<el-button size="small" type="primary">{{ placeholder }}</el-button>
|
|
19
20
|
<template #tip>
|
|
@@ -40,13 +41,15 @@
|
|
|
40
41
|
</template>
|
|
41
42
|
|
|
42
43
|
<script setup lang="ts">
|
|
43
|
-
import { ref, defineProps } from 'vue'
|
|
44
|
-
import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
44
|
+
import { ref, defineProps, defineEmits } from 'vue'
|
|
45
|
+
import { getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
45
46
|
import { getToken } from '../../../src/utils/auth'
|
|
46
47
|
import type { UploadFile, UploadFiles } from 'element-plus'
|
|
47
48
|
import fsPreviewNew from './fs-preview-new.vue'
|
|
48
49
|
import { ElMessage } from 'element-plus'
|
|
49
50
|
import { useI18n } from 'vue-i18n'
|
|
51
|
+
|
|
52
|
+
const emits = defineEmits(['on-error'])
|
|
50
53
|
const { t } = useI18n()
|
|
51
54
|
const props = defineProps({
|
|
52
55
|
openFsUpload: {
|
|
@@ -138,8 +141,8 @@ const props = defineProps({
|
|
|
138
141
|
default: 0
|
|
139
142
|
}
|
|
140
143
|
})
|
|
141
|
-
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
142
|
-
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
144
|
+
const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
145
|
+
const baseAPI = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
|
|
143
146
|
const defaultAction = ref<string>('')
|
|
144
147
|
const buttonUploadRef = ref()
|
|
145
148
|
const innerLimitFileSize = ref(props.limitFileSize)
|
|
@@ -200,4 +203,8 @@ const onSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFil
|
|
|
200
203
|
})
|
|
201
204
|
props.onSuccess(response, uploadFile, uploadFiles)
|
|
202
205
|
}
|
|
206
|
+
|
|
207
|
+
const onError = (error: any) => {
|
|
208
|
+
emits('on-error', error)
|
|
209
|
+
}
|
|
203
210
|
</script>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:before-upload="handleBeforeUpload"
|
|
13
13
|
:on-success="onUploadSuccess"
|
|
14
14
|
:before-remove="beforeRemove"
|
|
15
|
+
:on-error="onError"
|
|
15
16
|
>
|
|
16
17
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
|
17
18
|
<div class="el-upload__text">{{ placeholder }}</div>
|
|
@@ -38,13 +39,15 @@
|
|
|
38
39
|
|
|
39
40
|
<script setup lang="ts">
|
|
40
41
|
import { UploadFilled } from '@element-plus/icons-vue'
|
|
41
|
-
import { ref, defineProps } from 'vue'
|
|
42
|
-
import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
42
|
+
import { ref, defineProps, defineEmits } from 'vue'
|
|
43
|
+
import { getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
43
44
|
import { getToken } from '../../../src/utils/auth'
|
|
44
45
|
import type { UploadFile, UploadFiles } from 'element-plus'
|
|
45
46
|
import fsPreviewNew from './fs-preview-new.vue'
|
|
46
47
|
import { ElMessage } from 'element-plus'
|
|
47
48
|
import { useI18n } from 'vue-i18n'
|
|
49
|
+
|
|
50
|
+
const emits = defineEmits(['on-error'])
|
|
48
51
|
const { t } = useI18n()
|
|
49
52
|
const props = defineProps({
|
|
50
53
|
openFsUpload: {
|
|
@@ -136,8 +139,8 @@ const props = defineProps({
|
|
|
136
139
|
default: 0
|
|
137
140
|
}
|
|
138
141
|
})
|
|
139
|
-
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
140
|
-
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
142
|
+
const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
143
|
+
const baseAPI = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
|
|
141
144
|
const defaultAction = ref<string>('')
|
|
142
145
|
const innerLimitFileSize = ref(props.limitFileSize)
|
|
143
146
|
if (props.action) {
|
|
@@ -197,4 +200,8 @@ const onUploadSuccess = (response: any, uploadFile: UploadFile, uploadFiles: Upl
|
|
|
197
200
|
})
|
|
198
201
|
props.onSuccess(response, uploadFile, uploadFiles)
|
|
199
202
|
}
|
|
203
|
+
|
|
204
|
+
const onError = (error: any) => {
|
|
205
|
+
emits('on-error', error)
|
|
206
|
+
}
|
|
200
207
|
</script>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<script setup lang="ts">
|
|
62
62
|
import { Close, Paperclip, Download } from '@element-plus/icons-vue'
|
|
63
63
|
import { ref, defineProps } from 'vue'
|
|
64
|
-
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain } from '../../../src/utils/common-util'
|
|
64
|
+
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain, getRelativeBaseUrl } from '../../../src/utils/common-util'
|
|
65
65
|
import { getToken } from '../../../src/utils/auth'
|
|
66
66
|
import { isImage } from '../../../src/utils/util'
|
|
67
67
|
import { Base64 } from 'js-base64'
|
|
@@ -125,8 +125,10 @@ const props = defineProps({
|
|
|
125
125
|
default: false
|
|
126
126
|
}
|
|
127
127
|
})
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
let baseURL = props.baseURL ? props.baseURL : window.$vueApp.config.globalProperties.baseURL
|
|
129
|
+
let baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
130
|
+
baseURL = getRelativeBaseUrl(baseURL)
|
|
131
|
+
baseAPI = getRelativeBaseUrl(baseAPI)
|
|
130
132
|
|
|
131
133
|
const dialogVisible = ref<boolean>(false)
|
|
132
134
|
const previewImageInfo = ref<any>({})
|
|
@@ -233,9 +235,9 @@ const previweDoc = (showName: string, serverPath: string) => {
|
|
|
233
235
|
showName
|
|
234
236
|
)
|
|
235
237
|
} else {
|
|
236
|
-
let baseUrl =
|
|
238
|
+
let baseUrl = baseURL
|
|
237
239
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
238
|
-
baseUrl =
|
|
240
|
+
baseUrl = baseAPI
|
|
239
241
|
}
|
|
240
242
|
let previewUrl
|
|
241
243
|
if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
|
|
@@ -258,6 +260,7 @@ const previweDoc = (showName: string, serverPath: string) => {
|
|
|
258
260
|
previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
|
|
259
261
|
previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
|
|
260
262
|
}
|
|
263
|
+
previewUrl = getRelativeBaseUrl(previewUrl)
|
|
261
264
|
window.open(previewUrl, showName)
|
|
262
265
|
}
|
|
263
266
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
}"
|
|
18
18
|
@upload-success="onInputUploadSuccess"
|
|
19
19
|
@delete-success="onInputDeleteSuccess"
|
|
20
|
+
@on-error="onError"
|
|
20
21
|
/>
|
|
21
22
|
<fs-button-upload
|
|
22
23
|
v-else-if="!isMobile && displayType === 'button'"
|
|
@@ -135,6 +136,9 @@ import FileUploadInputMobile from './file-upload-mobile/file-upload-input.vue'
|
|
|
135
136
|
import FsUploadList from '../../fs-upload-list/src/fs-upload-list.vue'
|
|
136
137
|
import { ref, defineProps } from 'vue'
|
|
137
138
|
import { getReplaceUrlDomain, isMobileBrowser, isPlateSys } from '../../../src/utils/common-util'
|
|
139
|
+
import { useI18n } from 'vue-i18n'
|
|
140
|
+
import { ElMessage } from 'element-plus'
|
|
141
|
+
const { t } = useI18n()
|
|
138
142
|
const props = defineProps({
|
|
139
143
|
openFsUpload: {
|
|
140
144
|
type: Object,
|
|
@@ -377,5 +381,18 @@ function uploadFileDone(data) {
|
|
|
377
381
|
fileUploadRef.value.uploadFileDone(data)
|
|
378
382
|
}
|
|
379
383
|
}
|
|
384
|
+
|
|
385
|
+
function onError(error) {
|
|
386
|
+
console.error('Upload error:', error)
|
|
387
|
+
if (error.message) {
|
|
388
|
+
let message = JSON.parse(error.message)
|
|
389
|
+
if (message && message.message) {
|
|
390
|
+
message = JSON.parse(message.message)
|
|
391
|
+
}
|
|
392
|
+
ElMessage.error(message)
|
|
393
|
+
} else {
|
|
394
|
+
ElMessage.error(t('fsUpload.uploadFailed'))
|
|
395
|
+
}
|
|
396
|
+
}
|
|
380
397
|
defineExpose({ pickFileDone, uploadFileDone })
|
|
381
398
|
</script>
|
package/packages/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../src/utils/insert_css' // 公共样式库
|
|
2
2
|
// 依次导入组件库的各个组件
|
|
3
3
|
import { resizeDirective } from '../src/utils/resize'
|
|
4
|
-
import '../src/utils/iframe-communicator'
|
|
5
|
-
import store from '../src/store'
|
|
4
|
+
import '../src/utils/iframe-communicator'
|
|
5
|
+
import store from '../src/store'
|
|
6
6
|
import Breadcrumb from './breadcrumb'
|
|
7
7
|
import DepartmentTree from './department-tree'
|
|
8
8
|
import Hamburger from './hamburger'
|
|
@@ -44,8 +44,9 @@ import FsUploadNew from './fs-upload-new'
|
|
|
44
44
|
import ScanCodeInputBrowser from './scan-code-input-browser'
|
|
45
45
|
import WorkgroupTreeMobile from './workgroup-tree-mobile'
|
|
46
46
|
import RowForm from './row-form'
|
|
47
|
-
import * as ElementPlusIconsVue from
|
|
48
|
-
import YxAffix from '../src/components/Affix'
|
|
47
|
+
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
48
|
+
import YxAffix from '../src/components/Affix'
|
|
49
|
+
import ChatEmbed from './chat-embed'
|
|
49
50
|
// 将所有组件都存储起来,方便后续统一注册
|
|
50
51
|
const components = [
|
|
51
52
|
YxAffix,
|
|
@@ -81,11 +82,12 @@ const components = [
|
|
|
81
82
|
IntervalSelection,
|
|
82
83
|
DepartmentTreeMobile,
|
|
83
84
|
DepartmentUserTreeMobile,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
SuperIcon,
|
|
86
|
+
FsUploadNew,
|
|
86
87
|
ScanCodeInputBrowser,
|
|
87
88
|
WorkgroupTreeMobile,
|
|
88
|
-
RowForm
|
|
89
|
+
RowForm,
|
|
90
|
+
ChatEmbed
|
|
89
91
|
]
|
|
90
92
|
|
|
91
93
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
@@ -106,8 +108,8 @@ const install = function (Vue) {
|
|
|
106
108
|
Vue.component(key, component)
|
|
107
109
|
}
|
|
108
110
|
// store挂载到Vue原型
|
|
109
|
-
Vue.provide('$agilebuilderUIStore', store)
|
|
110
|
-
if(Vue.config.globalProperties) Vue.config.globalProperties.$agilebuilderUIStore = store
|
|
111
|
+
Vue.provide('$agilebuilderUIStore', store)
|
|
112
|
+
if (Vue.config.globalProperties) Vue.config.globalProperties.$agilebuilderUIStore = store
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
// 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
|
|
@@ -146,16 +148,17 @@ export {
|
|
|
146
148
|
SecretInfo,
|
|
147
149
|
DepartmentTreeMobile,
|
|
148
150
|
DepartmentUserTreeMobile,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
SuperIcon,
|
|
152
|
+
FsUploadNew,
|
|
151
153
|
ScanCodeInputBrowser,
|
|
152
154
|
WorkgroupTreeMobile,
|
|
153
|
-
RowForm
|
|
155
|
+
RowForm,
|
|
156
|
+
ChatEmbed
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
export default {
|
|
157
160
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
158
161
|
install,
|
|
159
162
|
store,
|
|
160
|
-
...components
|
|
163
|
+
...components
|
|
161
164
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
append-to-body
|
|
4
|
+
v-model="showJsonVisible"
|
|
5
|
+
:append-to-body="appendToBody"
|
|
6
|
+
:title="title"
|
|
7
|
+
width="600"
|
|
8
|
+
@close="close"
|
|
9
|
+
>
|
|
10
|
+
<json-view :jsonObject="jsonObject" />
|
|
11
|
+
</el-dialog>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { ref, defineEmits, defineProps, defineOptions, watch } from 'vue'
|
|
15
|
+
defineOptions({
|
|
16
|
+
name: 'JsonViewDialog',
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
})
|
|
19
|
+
import JsonView from './json-view.vue'
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
jsonObject: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: () => {}
|
|
24
|
+
},
|
|
25
|
+
appendToBody: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'JSON 预览'
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
const emits = defineEmits(['update:modelValue'])
|
|
39
|
+
const showJsonVisible = ref(false)
|
|
40
|
+
watch(
|
|
41
|
+
() => props.modelValue,
|
|
42
|
+
(newVal) => {
|
|
43
|
+
if (newVal) {
|
|
44
|
+
showJsonVisible.value = true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
const close = () => {
|
|
49
|
+
showJsonVisible.value = false
|
|
50
|
+
emits('update:modelValue', false)
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
<style scoped></style>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
width: '100%'
|
|
5
|
+
}"
|
|
6
|
+
ref="cfCodemirrorJsonViewRef"
|
|
7
|
+
id="cf-codemirror-view-json"
|
|
8
|
+
></div>
|
|
9
|
+
</template>
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { ref, defineProps, defineOptions, watch, nextTick, onMounted } from 'vue'
|
|
12
|
+
defineOptions({
|
|
13
|
+
name: 'JsonView',
|
|
14
|
+
inheritAttrs: false
|
|
15
|
+
})
|
|
16
|
+
import { basicSetup, EditorView } from 'codemirror'
|
|
17
|
+
import { jsonLanguage } from '@codemirror/lang-json'
|
|
18
|
+
import { EditorState, Facet } from '@codemirror/state'
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
jsonObject: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: () => {}
|
|
24
|
+
},
|
|
25
|
+
height: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
theme: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
const editor = ref<any>(null)
|
|
35
|
+
const cfCodemirrorJsonViewRef = ref()
|
|
36
|
+
const codemirrorHeight = ref('400px')
|
|
37
|
+
watch(
|
|
38
|
+
() => props.jsonObject,
|
|
39
|
+
(newVal) => {
|
|
40
|
+
if (editor.value) {
|
|
41
|
+
// 更新 CodeMirror 中的值
|
|
42
|
+
loadEditor()
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{ deep: true }
|
|
46
|
+
)
|
|
47
|
+
onMounted(() => {
|
|
48
|
+
nextTick(() => {
|
|
49
|
+
loadEditor()
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
function loadEditor() {
|
|
54
|
+
if (editor.value) {
|
|
55
|
+
editor.value.destroy()
|
|
56
|
+
}
|
|
57
|
+
const jsonStr = props.jsonObject ? JSON.stringify(props.jsonObject, null, 2) : ''
|
|
58
|
+
if (props.height) {
|
|
59
|
+
codemirrorHeight.value = props.height + 'px'
|
|
60
|
+
} else {
|
|
61
|
+
if (cfCodemirrorJsonViewRef.value) {
|
|
62
|
+
const rect = cfCodemirrorJsonViewRef.value.getBoundingClientRect()
|
|
63
|
+
if (rect.y || rect.y === 0) {
|
|
64
|
+
console.log('window.innerHeight - rect.y', window.innerHeight, rect.y)
|
|
65
|
+
codemirrorHeight.value = window.innerHeight - rect.y - 100 + 'px'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const state = getEditorState(jsonStr)
|
|
70
|
+
let element: Element | null = document.getElementById('cf-codemirror-view-json')
|
|
71
|
+
if (element) {
|
|
72
|
+
editor.value = new EditorView({
|
|
73
|
+
state,
|
|
74
|
+
parent: element
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// 获取编辑器状态
|
|
79
|
+
function getEditorState(jsonStr: string) {
|
|
80
|
+
// 获取主题
|
|
81
|
+
const mytheme = getTheme()
|
|
82
|
+
// 基本主题样式,主要设置字体大小和高度
|
|
83
|
+
const baseTheme = EditorView.theme({
|
|
84
|
+
'.cm-content, .cm-gutter': { minHeight: codemirrorHeight.value },
|
|
85
|
+
'&': {
|
|
86
|
+
height: codemirrorHeight.value,
|
|
87
|
+
maxHeight: codemirrorHeight.value,
|
|
88
|
+
fontSize: '12px'
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
return EditorState.create({
|
|
92
|
+
doc: jsonStr,
|
|
93
|
+
extensions: [
|
|
94
|
+
EditorState.tabSize.of(16),
|
|
95
|
+
basicSetup,
|
|
96
|
+
jsonLanguage,
|
|
97
|
+
mytheme,
|
|
98
|
+
baseTheme,
|
|
99
|
+
readOnlyFacet.of(true),
|
|
100
|
+
preventChanges
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 创建一个新的 Facet
|
|
106
|
+
const readOnlyFacet = Facet.define<boolean, boolean>({ combine: (values) => values.some((a) => a) })
|
|
107
|
+
|
|
108
|
+
// 创建一个新的 StateField 来监听更改
|
|
109
|
+
const preventChanges = EditorState.transactionFilter.of((tr: any) => {
|
|
110
|
+
if (tr.isUserEvent && tr.docChanged && tr.state.facet(readOnlyFacet)) {
|
|
111
|
+
return {
|
|
112
|
+
changes: {
|
|
113
|
+
from: tr.changes.from,
|
|
114
|
+
to: tr.changes.to,
|
|
115
|
+
insert: tr.startState.doc.sliceString(tr.changes.from, tr.changes.to)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return tr
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
function getTheme() {
|
|
123
|
+
return EditorView.theme({})
|
|
124
|
+
}
|
|
125
|
+
</script>
|
|
126
|
+
<style scoped></style>
|
|
@@ -4,6 +4,7 @@ import store from '../super-grid/src/store'
|
|
|
4
4
|
import {getExtraParam} from '../super-grid/src/utils'
|
|
5
5
|
import nineGridStore from '../super-nine-grid/src/store'
|
|
6
6
|
import {packageEnumAndBeanColumnValueSets} from '../utils/value-set'
|
|
7
|
+
import { getRelativeBaseUrl } from '../../src/utils/common-util'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -327,6 +328,7 @@ function exportListData(
|
|
|
327
328
|
if(!baseUrl){
|
|
328
329
|
baseUrl = window.$vueApp.config.globalProperties.baseURL
|
|
329
330
|
}
|
|
331
|
+
baseUrl = getRelativeBaseUrl(baseUrl)
|
|
330
332
|
window.$vueApp.config.globalProperties.$http
|
|
331
333
|
.post(
|
|
332
334
|
baseUrl +
|
|
@@ -1460,6 +1460,17 @@ const apis = {
|
|
|
1460
1460
|
},
|
|
1461
1461
|
getCustomFunc(funcName) {
|
|
1462
1462
|
window.$PageUtil.getCustomFunc(this.pageContext, funcName)
|
|
1463
|
+
},
|
|
1464
|
+
addRequiredClass(fieldName,listCode, rowIndex, pageNum) {
|
|
1465
|
+
const gridParams = store.get(listCode)
|
|
1466
|
+
if (this.isFormSubTable && this.isSubTableShowPage){
|
|
1467
|
+
rowIndex = rowIndex - 1
|
|
1468
|
+
if(pageNum !== this.currentPage){
|
|
1469
|
+
this.currentPage = pageNum
|
|
1470
|
+
this.changePage(pageNum)
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
gridParams.gridData[rowIndex]['validateErrorField'] = fieldName
|
|
1463
1474
|
}
|
|
1464
1475
|
}
|
|
1465
1476
|
export default apis
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
<span v-if="formatConfig.isTag">
|
|
4
4
|
<el-tag
|
|
5
5
|
v-if="displayText"
|
|
6
|
-
:type="customStyle.type"
|
|
6
|
+
:type="customStyle.type || formatConfig.tagType"
|
|
7
7
|
:color="customStyle.color"
|
|
8
|
-
:effect="formatConfig.
|
|
8
|
+
:effect="formatConfig.tagEffect"
|
|
9
9
|
:size="formatConfig.size"
|
|
10
10
|
:hit="formatConfig.hit"
|
|
11
|
+
:round="customStyle.round || formatConfig.round"
|
|
11
12
|
>
|
|
12
13
|
{{ displayText }}
|
|
13
14
|
</el-tag>
|
|
@@ -144,7 +145,9 @@ export default {
|
|
|
144
145
|
this.customStyle = result
|
|
145
146
|
})
|
|
146
147
|
} else {
|
|
147
|
-
|
|
148
|
+
if (customEventResult) {
|
|
149
|
+
this.customStyle = customEventResult
|
|
150
|
+
}
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $emit } from '../../utils/gogocodeTransfer'
|
|
2
|
-
import { doFormat } from './formatter'
|
|
2
|
+
import { doFormat, formatDateTime } from './formatter'
|
|
3
3
|
import store from './store'
|
|
4
4
|
import { initialization, jumpToPage } from '../../../src/utils/jump-page-utils'
|
|
5
5
|
import { analysisFileSetObj, otherFilesToStandard } from './utils'
|
|
@@ -198,9 +198,10 @@ const customFormatter = {
|
|
|
198
198
|
jumpPageJson = column.formatter.options.format
|
|
199
199
|
}
|
|
200
200
|
if (jumpPageJson && jumpPageJson !== '') {
|
|
201
|
+
const jumpPageJsonObject = JSON.parse(jumpPageJson)
|
|
201
202
|
// 解析是否需要显示该超链接
|
|
202
203
|
const result = initialization(
|
|
203
|
-
|
|
204
|
+
jumpPageJsonObject,
|
|
204
205
|
row,
|
|
205
206
|
isSql,
|
|
206
207
|
additionalParamerter,
|
|
@@ -227,6 +228,18 @@ const customFormatter = {
|
|
|
227
228
|
hyperLinkResult.label = this.objectPropValueTwo(row, column)
|
|
228
229
|
hyperLinkResult.title = hyperLinkResult.label
|
|
229
230
|
}
|
|
231
|
+
if (hyperLinkResult.jumpPageItem) {
|
|
232
|
+
const jumpSetting = hyperLinkResult.jumpPageItem.jumpPageSetting
|
|
233
|
+
if (jumpSetting && jumpSetting.displayTextFormatType && jumpSetting.displayTextFormat) {
|
|
234
|
+
const formatValue = formatDateTime(
|
|
235
|
+
jumpSetting.displayTextFormatType,
|
|
236
|
+
hyperLinkResult.label,
|
|
237
|
+
jumpSetting.displayTextFormat
|
|
238
|
+
)
|
|
239
|
+
hyperLinkResult.label = formatValue
|
|
240
|
+
hyperLinkResult.title = formatValue
|
|
241
|
+
}
|
|
242
|
+
}
|
|
230
243
|
return hyperLinkResult
|
|
231
244
|
},
|
|
232
245
|
// 点击超链接
|