agilebuilder-ui 1.1.49 → 1.1.50-sit1
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-a94cd05b.js → 401-a5673c5d.js} +1 -1
- package/lib/{404-eb21244b.js → 404-62f3a128.js} +1 -1
- package/lib/{iframe-page-7add4333.js → iframe-page-31db5f9e.js} +1 -1
- package/lib/{index-7a601895.js → index-c625583f.js} +13919 -13847
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +98 -98
- package/lib/{tab-content-iframe-index-483b398c.js → tab-content-iframe-index-75aa0f68.js} +1 -1
- package/lib/{tab-content-index-0862686f.js → tab-content-index-229106e0.js} +1 -1
- package/lib/{tache-subprocess-history-c80e8ed2.js → tache-subprocess-history-ea3e3d70.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree-inline/src/search-result.vue +2 -1
- package/packages/department-user-tree-inline/src/search-result.vue +2 -1
- package/packages/fs-preview/src/fs-preview.vue +21 -8
- package/packages/fs-upload/src/fs-upload-multi.vue +7 -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 +5 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +5 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -8
- package/packages/fs-upload-new/src/fs-upload-new.vue +16 -1
- package/packages/multipart-upload/src/multipart-upload-form.vue +6 -2
- package/packages/multipart-upload/src/multipart-upload-list.vue +6 -2
- package/packages/plugins/export-data-new.js +14 -1
- package/packages/super-grid/src/normal-column-content.vue +1 -0
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/search-form-item.vue +17 -13
- package/packages/super-grid/src/utils.js +1 -0
- package/packages/super-grid/src/view-image-dialog.vue +6 -2
- package/src/utils/auth.js +3 -0
- package/src/utils/common-util.js +37 -0
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
|
|
3
3
|
@blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
|
|
4
|
-
<span :style="myStyle">
|
|
4
|
+
<span class="table-operation-row-btn" :style="myStyle">
|
|
5
5
|
<template v-if="isShowButton()">
|
|
6
6
|
<el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
|
|
7
|
-
<template v-if="operationSettingData
|
|
7
|
+
<template v-if="operationSettingData?.permission">
|
|
8
8
|
<component
|
|
9
9
|
v-bind="operationSettingData"
|
|
10
10
|
:is="isElementType"
|
|
@@ -77,9 +77,13 @@ export default {
|
|
|
77
77
|
type: String,
|
|
78
78
|
default: null,
|
|
79
79
|
},
|
|
80
|
+
operation: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: () => ({}),
|
|
83
|
+
},
|
|
80
84
|
operationSetting: {
|
|
81
85
|
type: Object,
|
|
82
|
-
default:
|
|
86
|
+
default: () => ({}),
|
|
83
87
|
},
|
|
84
88
|
operationIndex: {
|
|
85
89
|
type: Number,
|
|
@@ -148,16 +152,16 @@ export default {
|
|
|
148
152
|
},
|
|
149
153
|
// 后置图标
|
|
150
154
|
suffixIcon() {
|
|
151
|
-
if(['right'].includes(this.
|
|
155
|
+
if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
|
|
152
156
|
return undefined
|
|
153
157
|
},
|
|
154
158
|
// 是否显示文字按钮 > 图标模式
|
|
155
159
|
isTextIcon() {
|
|
156
160
|
if (this.isTableBtnLinkShow) {
|
|
157
|
-
if (this.
|
|
161
|
+
if (this.operationSetting.isTextIcon === undefined) {
|
|
158
162
|
return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
|
|
159
163
|
}
|
|
160
|
-
return this.
|
|
164
|
+
return this.operationSetting.isTextIcon
|
|
161
165
|
} else {
|
|
162
166
|
return false
|
|
163
167
|
}
|
|
@@ -172,14 +176,14 @@ export default {
|
|
|
172
176
|
},
|
|
173
177
|
// 是否自动开启表格 按钮 转 文字按钮
|
|
174
178
|
isTableBtnLinkShow() {
|
|
175
|
-
if (this.operationSetting
|
|
179
|
+
if (this.operationSetting?.text) return true
|
|
176
180
|
if (this.isTableBtnLink && this.elementType === 'el-button') {
|
|
177
|
-
return [this.operationSetting
|
|
181
|
+
return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
|
|
178
182
|
}
|
|
179
183
|
return false
|
|
180
184
|
},
|
|
181
185
|
operationSettingData() {
|
|
182
|
-
const dataList = { ...this.operationSetting }
|
|
186
|
+
const dataList = { ...(this.operationSetting ?? {}) }
|
|
183
187
|
if (this.isTableBtnLinkShow) {
|
|
184
188
|
dataList.underline = false
|
|
185
189
|
delete dataList.text
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
>
|
|
158
158
|
<dynamic-source-select
|
|
159
159
|
v-model:value="searchForm[column.prop]"
|
|
160
|
-
:allow-create="
|
|
160
|
+
:allow-create="dataSourceOptions?.controlConfig?.allowCreate"
|
|
161
161
|
:base-props="{
|
|
162
162
|
multiple: column.componentType === 'multiselect' ? true : false
|
|
163
163
|
}"
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
:is-join-table="isJoinTable"
|
|
167
167
|
:list-code="code"
|
|
168
168
|
:list-toolbar-form-data="listToolbarFormData"
|
|
169
|
-
:options="
|
|
169
|
+
:options="dataSourceOptions"
|
|
170
170
|
:table-name="tableName"
|
|
171
171
|
@change="multiselectChange"
|
|
172
172
|
/>
|
|
@@ -289,7 +289,8 @@ export default {
|
|
|
289
289
|
moduleConfig: {},
|
|
290
290
|
dateVal: this.getFormItemValue(this.column.prop),
|
|
291
291
|
controlConfig: getControlConfig(this.column),
|
|
292
|
-
isShowEmtptyFlag: false
|
|
292
|
+
isShowEmtptyFlag: false,
|
|
293
|
+
dataSourceOptions: {}
|
|
293
294
|
// checkedEmpty: false,
|
|
294
295
|
}
|
|
295
296
|
},
|
|
@@ -323,6 +324,14 @@ export default {
|
|
|
323
324
|
if (this.column.valueSetOptions) {
|
|
324
325
|
this.moduleConfig = JSON.parse(this.column.valueSetOptions)
|
|
325
326
|
}
|
|
327
|
+
const componentType = this.column.componentType
|
|
328
|
+
if (
|
|
329
|
+
componentType &&
|
|
330
|
+
(componentType === 'multiselect' || componentType === 'select') &&
|
|
331
|
+
this.isDynamicDataSourceSource(this.column)
|
|
332
|
+
) {
|
|
333
|
+
this.dataSourceOptions = this.getDynamicDataSourceOptions(this.column)
|
|
334
|
+
}
|
|
326
335
|
console.log('searchitem页面', this.column)
|
|
327
336
|
},
|
|
328
337
|
mounted() {
|
|
@@ -346,12 +355,7 @@ export default {
|
|
|
346
355
|
return isDynamicDataSourceSource(column)
|
|
347
356
|
},
|
|
348
357
|
setValueToModelProp(prop, value, componentName, index) {
|
|
349
|
-
console.log('setValueToModelProp',
|
|
350
|
-
prop,
|
|
351
|
-
value,
|
|
352
|
-
componentName,
|
|
353
|
-
index
|
|
354
|
-
)
|
|
358
|
+
console.log('setValueToModelProp', prop, value, componentName, index)
|
|
355
359
|
if (prop && prop.indexOf('.') > 0) {
|
|
356
360
|
const parentOjbect = this.getParentObject(prop)
|
|
357
361
|
// 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
|
|
@@ -497,10 +501,10 @@ export default {
|
|
|
497
501
|
return ['00:00:00']
|
|
498
502
|
}
|
|
499
503
|
} else {
|
|
500
|
-
const now = new Date()
|
|
501
|
-
const year = now.getFullYear()
|
|
502
|
-
const month = now.getMonth() + 1
|
|
503
|
-
const day = now.getDate()
|
|
504
|
+
const now = new Date()
|
|
505
|
+
const year = now.getFullYear() // e.g., 2023
|
|
506
|
+
const month = now.getMonth() + 1 // Months are 0-indexed, so add 1
|
|
507
|
+
const day = now.getDate() // Day of the month
|
|
504
508
|
return [`${year}-${month}-${day} 00:00:00`, `${year}-${month}-${day} 23:59:59`]
|
|
505
509
|
}
|
|
506
510
|
},
|
|
@@ -51,6 +51,7 @@ import * as Vue from 'vue'
|
|
|
51
51
|
import {
|
|
52
52
|
isPlateSys,
|
|
53
53
|
getSystemFrontendUrl,
|
|
54
|
+
getKkFilePreviewUrl,
|
|
54
55
|
} from '../../../src/utils/common-util'
|
|
55
56
|
import {getToken} from '../../../src/utils/auth'
|
|
56
57
|
|
|
@@ -154,7 +155,10 @@ export default {
|
|
|
154
155
|
//要预览文件的访问地址
|
|
155
156
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
156
157
|
// http://127.0.0.1:8012/onlinePreview
|
|
157
|
-
|
|
158
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
159
|
+
window.open(url, myShowName)
|
|
160
|
+
})
|
|
161
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
158
162
|
} else {
|
|
159
163
|
previewUrl =
|
|
160
164
|
this.baseUrl +
|
|
@@ -165,8 +169,8 @@ export default {
|
|
|
165
169
|
encodeURI(myShowName) +
|
|
166
170
|
'&serverPath=' +
|
|
167
171
|
uuid
|
|
172
|
+
window.open(previewUrl, myShowName)
|
|
168
173
|
}
|
|
169
|
-
window.open(previewUrl, myShowName)
|
|
170
174
|
}
|
|
171
175
|
},
|
|
172
176
|
deleteFile() {
|
package/src/utils/auth.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import authApi from './auth-api'
|
|
2
2
|
import { removeAllSystemPermissions } from './permissionAuth'
|
|
3
3
|
import { removeGlobalPropCache } from './global-prop'
|
|
4
|
+
import { removeWatermark} from './watermark-cache'
|
|
4
5
|
|
|
5
6
|
export function getToken() {
|
|
6
7
|
return authApi.getToken()
|
|
@@ -168,4 +169,6 @@ export function clearPermission() {
|
|
|
168
169
|
|
|
169
170
|
// 清除系统参数设置的全局属性缓存
|
|
170
171
|
removeGlobalPropCache()
|
|
172
|
+
// 清除水印配置
|
|
173
|
+
removeWatermark()
|
|
171
174
|
}
|
package/src/utils/common-util.js
CHANGED
|
@@ -3,6 +3,8 @@ import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
|
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid'
|
|
4
4
|
import { getCookieCache } from './auth'
|
|
5
5
|
import i18nUtil from './i18n-util'
|
|
6
|
+
import { Base64 } from 'js-base64'
|
|
7
|
+
import { getWatermarkSetting } from './watermark'
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* 获得相对地址
|
|
@@ -818,3 +820,38 @@ export function getURLSearchParamObj(fullPath) {
|
|
|
818
820
|
console.error('error===',error)
|
|
819
821
|
}
|
|
820
822
|
}
|
|
823
|
+
|
|
824
|
+
// 获得KKFileView预览url,处理水印
|
|
825
|
+
export function getKkFilePreviewUrl(previewUrl) {
|
|
826
|
+
let myPreviewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(previewUrl))
|
|
827
|
+
return new Promise((resolve,reject)=>{
|
|
828
|
+
getWatermarkSetting().then((watermark)=>{
|
|
829
|
+
if(watermark){
|
|
830
|
+
myPreviewUrl = myPreviewUrl + '&watermarkTxt='+watermark.content+'&watermarkXSpace=60&watermarkYSpace=100&watermarkWidth=500&watermarkHeight=100'
|
|
831
|
+
}
|
|
832
|
+
resolve(myPreviewUrl)
|
|
833
|
+
}).catch((error)=>{
|
|
834
|
+
console.error('获得水印失败',error)
|
|
835
|
+
resolve(myPreviewUrl)
|
|
836
|
+
})
|
|
837
|
+
})
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
function getKkFileBackendUrl() {
|
|
841
|
+
let kkFileViewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl
|
|
842
|
+
let kkFileViewUrlResult = kkFileViewUrl
|
|
843
|
+
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
844
|
+
if(kkFileViewUrl && baseURL){
|
|
845
|
+
let baseUrls = baseURL.split('/')
|
|
846
|
+
let prefixUrl = baseUrls[0]+ '//' + baseUrls[2]
|
|
847
|
+
let kkFileViewUrls = kkFileViewUrl.split('/')
|
|
848
|
+
let kkFilePrefixUrl = kkFileViewUrls[0]+ '//' + kkFileViewUrls[2]
|
|
849
|
+
if(prefixUrl === kkFilePrefixUrl){
|
|
850
|
+
// 如果baseURL和kkFileViewUrl的ip和端口一致,则表示kkFileView服务被nginx代理了,此时需要做内网、外网域名替换,例如:西安西开项目
|
|
851
|
+
// 如果baseURL和kkFileViewUrl的ip和端口不一致,则表示kkFileView服务没有被nginx代理,此时不需要处理kkFileViewUrl路径,例如:公司产品项目
|
|
852
|
+
kkFileViewUrlResult = getRelativeBaseUrl(kkFileViewUrl)
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
console.log('获得kkFile服务部署路径', kkFileViewUrlResult)
|
|
856
|
+
return kkFileViewUrlResult
|
|
857
|
+
}
|
package/src/utils/request.js
CHANGED
|
@@ -80,7 +80,13 @@ service.interceptors.response.use(
|
|
|
80
80
|
}
|
|
81
81
|
} else if (error.response.status === 403) {
|
|
82
82
|
// ForbiddenException(403) 403没权限
|
|
83
|
-
|
|
83
|
+
let message = ''
|
|
84
|
+
if (error.response.data?.message) {
|
|
85
|
+
message = error.response.data.message
|
|
86
|
+
console.error('ForbiddenException(403):', error.response.data)
|
|
87
|
+
} else {
|
|
88
|
+
message = getI18n().t('imatrixUIMessage.forbiddenException')
|
|
89
|
+
}
|
|
84
90
|
const serverConfig = window['$vueApp'].config.globalProperties
|
|
85
91
|
let vnode
|
|
86
92
|
if (serverConfig.forbiddenUser || serverConfig.forbiddenLinkUrl) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const watermarkSetting = 'AMB_WATERMARK_SETTING'
|
|
2
|
+
|
|
3
|
+
export function getWatermark() {
|
|
4
|
+
return localStorage.getItem(watermarkSetting)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function cacheWatermark(value) {
|
|
8
|
+
localStorage.setItem(watermarkSetting, value)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function removeWatermark() {
|
|
12
|
+
localStorage.removeItem(watermarkSetting)
|
|
13
|
+
}
|
package/src/utils/watermark.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// import ssoService from '../api/sso-service'
|
|
1
|
+
import {getWatermark, cacheWatermark, removeWatermark} from './watermark-cache'
|
|
3
2
|
const watermark = {}
|
|
4
3
|
|
|
5
4
|
const setWatermark = (str, parma, paramId) => {
|
|
@@ -35,12 +34,12 @@ const setWatermark = (str, parma, paramId) => {
|
|
|
35
34
|
const div = document.createElement('div')
|
|
36
35
|
div.id = id
|
|
37
36
|
div.style.pointerEvents = 'none'
|
|
38
|
-
div.style.top = '80px
|
|
39
|
-
div.style.left = '200px
|
|
37
|
+
div.style.top = '10px' // 80px
|
|
38
|
+
div.style.left = '0px' // 200px
|
|
40
39
|
div.style.position = 'fixed'
|
|
41
40
|
div.style.zIndex = '10000'
|
|
42
|
-
div.style.width = '70%
|
|
43
|
-
div.style.height = '80%
|
|
41
|
+
div.style.width = '100%' // 70%
|
|
42
|
+
div.style.height = '100%' // 80%
|
|
44
43
|
div.style.background =
|
|
45
44
|
'url(' + can.toDataURL('image/png') + ') left top repeat'
|
|
46
45
|
|
|
@@ -71,6 +70,48 @@ export function showWatermark(label, parma, user, paramId) {
|
|
|
71
70
|
}
|
|
72
71
|
})
|
|
73
72
|
}
|
|
73
|
+
|
|
74
|
+
// 获得水印维护信息
|
|
75
|
+
export function getWatermarkSetting(){
|
|
76
|
+
return new Promise((resolve,reject)=>{
|
|
77
|
+
let watermark = getWatermark()
|
|
78
|
+
if(!watermark || watermark === 'EMPTY_VALUE'){
|
|
79
|
+
window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/component/watermark').then((data)=>{
|
|
80
|
+
if(data){
|
|
81
|
+
watermark = data
|
|
82
|
+
cacheWatermark(JSON.stringify(watermark))
|
|
83
|
+
// 兼容之前的代码
|
|
84
|
+
watermark.font = watermark.fontStyle
|
|
85
|
+
watermark.color = watermark.fontColor
|
|
86
|
+
resolve(watermark)
|
|
87
|
+
} else {
|
|
88
|
+
cacheWatermark('EMPTY_VALUE')
|
|
89
|
+
resolve()
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
} else {
|
|
93
|
+
try{
|
|
94
|
+
watermark = JSON.parse(watermark)
|
|
95
|
+
// 兼容之前的代码
|
|
96
|
+
watermark.font = watermark.fontStyle
|
|
97
|
+
watermark.color = watermark.fontColor
|
|
98
|
+
resolve(watermark)
|
|
99
|
+
}catch(error){
|
|
100
|
+
console.error('watermark content error.',error)
|
|
101
|
+
resolve()
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 该方法只允许调用一次
|
|
108
|
+
export function showWatermarkNew() {
|
|
109
|
+
getWatermarkSetting().then((watermark)=>{
|
|
110
|
+
if(watermark){
|
|
111
|
+
setWatermark(watermark.content, watermark)
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
}
|
|
74
115
|
// watermark.set = (label, parma) => {
|
|
75
116
|
|
|
76
117
|
// }
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { Sidebar, AppMain, Breadcrumb } from './components'
|
|
18
18
|
import ResizeMixin from './mixin/ResizeHandler'
|
|
19
19
|
import { isShowMenuRoute } from '../../../src/utils/common-util'
|
|
20
|
+
import {showWatermarkNew} from '../../utils/watermark'
|
|
20
21
|
|
|
21
22
|
export default {
|
|
22
23
|
name: 'Layout',
|
|
@@ -49,6 +50,9 @@ export default {
|
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
},
|
|
53
|
+
mounted(){
|
|
54
|
+
showWatermarkNew()
|
|
55
|
+
},
|
|
52
56
|
methods: {
|
|
53
57
|
handleClickOutside() {
|
|
54
58
|
this.$store.dispatch('closeSidebar', { withoutAnimation: false })
|
|
@@ -9,10 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import { AppMain } from './components'
|
|
12
|
+
import {showWatermarkNew} from '../../utils/watermark'
|
|
12
13
|
export default {
|
|
13
14
|
name: 'NewLayout',
|
|
14
15
|
components: {
|
|
15
16
|
AppMain,
|
|
16
17
|
},
|
|
18
|
+
mounted(){
|
|
19
|
+
showWatermarkNew()
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
</script>
|