agilebuilder-ui 1.1.53-rc5 → 1.1.53-rc6
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-e375b1fe.js → 401-52d9bf08.js} +1 -1
- package/lib/{404-12a6ecca.js → 404-605442b2.js} +1 -1
- package/lib/{iframe-page-05a1a478.js → iframe-page-6a628a9a.js} +1 -1
- package/lib/{index-2b362c08.js → index-5713357a.js} +33590 -33335
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +109 -116
- package/lib/{tab-content-iframe-index-9ad40367.js → tab-content-iframe-index-9e07d77b.js} +1 -1
- package/lib/{tab-content-index-8faba618.js → tab-content-index-5d9aba1e.js} +1 -1
- package/lib/{tache-subprocess-history-098fc139.js → tache-subprocess-history-8a078a8c.js} +1 -1
- package/package.json +1 -1
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +8 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +3 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +5 -2
- package/packages/organization-input/src/organization-input.vue +6 -6
- package/packages/utils/utils.js +1 -1
- package/src/permission.js +14 -3
- package/src/utils/auth.js +2 -2
- package/src/utils/common-util.js +104 -77
- package/src/utils/global-prop.ts +44 -0
- package/src/utils/global-prop.js +0 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-5713357a.js";
|
|
3
3
|
const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
|
|
4
4
|
this.src = this.$route.query.src;
|
|
5
5
|
} }, mounted() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-
|
|
1
|
+
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-5713357a.js";
|
|
2
2
|
import { resolveComponent as u, openBlock as d, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
|
|
3
3
|
const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
|
|
4
4
|
return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
|
|
2
|
-
import { _ as I } from "./index-
|
|
2
|
+
import { _ as I } from "./index-5713357a.js";
|
|
3
3
|
const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
|
|
4
4
|
const o = this.$route.query.workflowId;
|
|
5
5
|
o && (this.workflowId = parseInt(o));
|
package/package.json
CHANGED
|
@@ -364,7 +364,9 @@ export default {
|
|
|
364
364
|
loginName: user.loginName,
|
|
365
365
|
email: user.email,
|
|
366
366
|
telephone: user.telephone,
|
|
367
|
+
mainDepartmentCode: user.mainDepartmentCode,
|
|
367
368
|
mainDepartmentName: user.mainDepartmentName,
|
|
369
|
+
subCompanyCode: user.subCompanyCode,
|
|
368
370
|
subCompanyName: user.subCompanyName,
|
|
369
371
|
user: user,
|
|
370
372
|
enName: user.enName,
|
|
@@ -619,7 +621,9 @@ export default {
|
|
|
619
621
|
telephones: [],
|
|
620
622
|
users: [],
|
|
621
623
|
divisionManager: [],
|
|
622
|
-
divisionManagerName: []
|
|
624
|
+
divisionManagerName: [],
|
|
625
|
+
subCompanyName: [],
|
|
626
|
+
subCompanyCode: []
|
|
623
627
|
}
|
|
624
628
|
// 是否需要显示提示框,默认不显示
|
|
625
629
|
var showTip = false
|
|
@@ -632,6 +636,8 @@ export default {
|
|
|
632
636
|
// 不存在该用户则放到结果集合中,去掉重复使用
|
|
633
637
|
selectNodeInfo.userIds.push(userData.id)
|
|
634
638
|
selectNodeInfo.loginNames.push(userData.loginName)
|
|
639
|
+
selectNodeInfo.subCompanyName.push(userData.subCompanyName)
|
|
640
|
+
selectNodeInfo.subCompanyCode.push(userData.subCompanyCode)
|
|
635
641
|
if (userData.divisionManager && userData.divisionManager !== '') {
|
|
636
642
|
selectNodeInfo.divisionManager.push(userData.divisionManager)
|
|
637
643
|
}
|
|
@@ -649,6 +655,7 @@ export default {
|
|
|
649
655
|
} else {
|
|
650
656
|
selectNodeInfo.users.push(userData)
|
|
651
657
|
}
|
|
658
|
+
|
|
652
659
|
var name = userData.name
|
|
653
660
|
selectNodeInfo.userZhNames.push(name)
|
|
654
661
|
if (userData.enName && userData.enName.trim() !== '') {
|
|
@@ -261,6 +261,9 @@ export default {
|
|
|
261
261
|
containBranch: this.containBranch,
|
|
262
262
|
user: user,
|
|
263
263
|
enName: user.enName,
|
|
264
|
+
mainDepartmentCode: user.mainDepartmentCode,
|
|
265
|
+
mainDepartmentName: user.mainDepartmentName,
|
|
266
|
+
subCompanyCode: user.subCompanyCode,
|
|
264
267
|
subCompanyName: user.subCompanyName,
|
|
265
268
|
divisionManager: user.divisionManager,
|
|
266
269
|
divisionManagerName: user.divisionManagerName
|
|
@@ -249,7 +249,11 @@ export default {
|
|
|
249
249
|
// 上传成功
|
|
250
250
|
uploadOnSuccess(response, file) {
|
|
251
251
|
if (response) {
|
|
252
|
-
|
|
252
|
+
this.$message({
|
|
253
|
+
showClose: true,
|
|
254
|
+
type: 'success',
|
|
255
|
+
message: this.$t('fsUpload.uploadSucceeded')
|
|
256
|
+
})
|
|
253
257
|
$emit(this, 'upload-success', {
|
|
254
258
|
showName: response.name,
|
|
255
259
|
serverPath: response.serverPath
|
|
@@ -320,7 +324,6 @@ export default {
|
|
|
320
324
|
},
|
|
321
325
|
onError(error) {
|
|
322
326
|
$emit(this, 'on-error', error)
|
|
323
|
-
|
|
324
327
|
}
|
|
325
328
|
},
|
|
326
329
|
emits: ['close', 'upload-success', 'delete-success', 'delete', 'update:value', 'close', 'update:value', 'on-error']
|
|
@@ -414,20 +414,20 @@ export default {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
return branchNames.join(this.separator)
|
|
417
|
-
} else if (orgDataType === 'subCompanyId') {
|
|
418
|
-
// 分支id
|
|
419
|
-
const
|
|
417
|
+
} else if (orgDataType === 'subCompanyId' || orgDataType === 'subCompanyCode') {
|
|
418
|
+
// 分支id或code
|
|
419
|
+
const branchDeptInfos = []
|
|
420
420
|
if (isUserTree) {
|
|
421
421
|
const users = selectNodeInfo.users
|
|
422
422
|
if (users) {
|
|
423
423
|
users.forEach((user) => {
|
|
424
|
-
if (user
|
|
425
|
-
|
|
424
|
+
if (user[orgDataType]) {
|
|
425
|
+
branchDeptInfos.push(user[orgDataType])
|
|
426
426
|
}
|
|
427
427
|
})
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return branchDeptInfos.join(this.separator)
|
|
431
431
|
} else if (orgDataType === 'divisionManager' || orgDataType === 'divisionManagerName') {
|
|
432
432
|
let divisionManagerArr = []
|
|
433
433
|
if (isUserTree) {
|
package/packages/utils/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getI18n } from '../../src/utils/util'
|
|
2
2
|
import * as Vue from 'vue'
|
|
3
|
-
import { cacheCanShowOrgTree, getCanShowOrgTree } from '../../src/utils/global-prop.
|
|
3
|
+
import { cacheCanShowOrgTree, getCanShowOrgTree } from '../../src/utils/global-prop.ts'
|
|
4
4
|
const utils = {
|
|
5
5
|
getSearchUserFields() {
|
|
6
6
|
const i18n = getI18n()
|
package/src/permission.js
CHANGED
|
@@ -8,7 +8,12 @@ import { ElMessage as Message } from 'element-plus'
|
|
|
8
8
|
import * as Vue from 'vue'
|
|
9
9
|
import authApi from './utils/auth-api'
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
cacheAllLanguagesUtil,
|
|
13
|
+
getLocaleByLang,
|
|
14
|
+
cacheCurrentLanguageUtil,
|
|
15
|
+
cacheAllEnableGlobalPropUtil
|
|
16
|
+
} from './utils/common-util'
|
|
12
17
|
|
|
13
18
|
// 首次加载业务系统时,获得用户的语言
|
|
14
19
|
function initUserLanguage() {
|
|
@@ -27,6 +32,11 @@ function cacheAllLanguages() {
|
|
|
27
32
|
return cacheAllLanguagesUtil(window.$http)
|
|
28
33
|
}
|
|
29
34
|
|
|
35
|
+
// 首次加载业务系统时,缓存所有语言
|
|
36
|
+
function cacheAllEnableGlobalProp() {
|
|
37
|
+
return cacheAllEnableGlobalPropUtil(window.$http)
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
const whiteList = ['/login', '/update-password', '/forget-password', '/reset-password', '/redirect'] // 不重定向白名单
|
|
31
41
|
|
|
32
42
|
let devpJWTKey = '_devpJWT'
|
|
@@ -143,6 +153,7 @@ router.beforeEach((to, from, next) => {
|
|
|
143
153
|
cacheAllLanguages().then(() => {
|
|
144
154
|
resolve(user)
|
|
145
155
|
})
|
|
156
|
+
cacheAllEnableGlobalProp()
|
|
146
157
|
})
|
|
147
158
|
})
|
|
148
159
|
.then((user) => {
|
|
@@ -156,13 +167,13 @@ router.beforeEach((to, from, next) => {
|
|
|
156
167
|
} else {
|
|
157
168
|
// 开发平台本身的功能或直接平台功能时
|
|
158
169
|
// console.log('开发平台本身的功能或直接平台功能时')
|
|
159
|
-
let systemCode = to.query ? to.query.customSystem: null
|
|
170
|
+
let systemCode = to.query ? to.query.customSystem : null
|
|
160
171
|
console.log('getCurrentUserPermissions---systemCode111=', systemCode)
|
|
161
172
|
if (!systemCode) {
|
|
162
173
|
systemCode = window.$vueApp.config.globalProperties.currentSystem
|
|
163
174
|
}
|
|
164
175
|
console.log('getCurrentUserPermissions---systemCode222=', systemCode)
|
|
165
|
-
return store.dispatch('getCurrentUserPermissions', {loginName:user.loginName, systemCode})
|
|
176
|
+
return store.dispatch('getCurrentUserPermissions', { loginName: user.loginName, systemCode })
|
|
166
177
|
}
|
|
167
178
|
})
|
|
168
179
|
.then((permissions) => {
|
package/src/utils/auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import authApi from './auth-api'
|
|
2
2
|
import { removeAllSystemPermissions } from './permissionAuth'
|
|
3
|
-
import {
|
|
3
|
+
import { removeAllGlobalPropCache } from './global-prop'
|
|
4
4
|
import { removeWatermark} from './watermark-cache'
|
|
5
5
|
|
|
6
6
|
export function getToken() {
|
|
@@ -168,7 +168,7 @@ export function clearPermission() {
|
|
|
168
168
|
removeSystemCacheUrl()
|
|
169
169
|
|
|
170
170
|
// 清除系统参数设置的全局属性缓存
|
|
171
|
-
|
|
171
|
+
removeAllGlobalPropCache()
|
|
172
172
|
// 清除水印配置
|
|
173
173
|
removeWatermark()
|
|
174
174
|
}
|
package/src/utils/common-util.js
CHANGED
|
@@ -5,12 +5,13 @@ import { getCookieCache } from './auth'
|
|
|
5
5
|
import i18nUtil from './i18n-util'
|
|
6
6
|
import { Base64 } from 'js-base64'
|
|
7
7
|
import { getWatermarkSetting } from './watermark'
|
|
8
|
+
import { cacheAllGlobalPropCache, GLOBAL_PROP, } from './global-prop'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* 获得相对地址
|
|
11
12
|
*/
|
|
12
13
|
export function getRelativeBaseUrl(originalBaseUrl) {
|
|
13
|
-
if(!originalBaseUrl){
|
|
14
|
+
if (!originalBaseUrl) {
|
|
14
15
|
return originalBaseUrl
|
|
15
16
|
}
|
|
16
17
|
if (
|
|
@@ -237,13 +238,13 @@ export function getServerConfigUtil(http) {
|
|
|
237
238
|
return new Promise((resolve, reject) => {
|
|
238
239
|
let timestamp = '1'
|
|
239
240
|
try {
|
|
240
|
-
if(__BUILD_TIME__) {
|
|
241
|
+
if (__BUILD_TIME__) {
|
|
241
242
|
timestamp = __BUILD_TIME__
|
|
242
243
|
}
|
|
243
244
|
} catch (error) {
|
|
244
245
|
console.log('__BUILD_TIME__ not define')
|
|
245
246
|
}
|
|
246
|
-
http.get('./server-config.json?t='+timestamp).then((result) => {
|
|
247
|
+
http.get('./server-config.json?t=' + timestamp).then((result) => {
|
|
247
248
|
const config = result
|
|
248
249
|
for (const key in config) {
|
|
249
250
|
window.$vueApp.config.globalProperties[key] = config[key]
|
|
@@ -265,16 +266,16 @@ export function getServerConfigUtil(http) {
|
|
|
265
266
|
})
|
|
266
267
|
}
|
|
267
268
|
|
|
268
|
-
export function insertFontIconCss(config){
|
|
269
|
-
if(!window.insertCssFile){
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if(!config){
|
|
269
|
+
export function insertFontIconCss(config) {
|
|
270
|
+
if (!window.insertCssFile) {
|
|
271
|
+
return
|
|
272
|
+
}
|
|
273
|
+
if (!config) {
|
|
273
274
|
config = window.$vueApp.config.globalProperties
|
|
274
275
|
}
|
|
275
276
|
let timestamp = '1'
|
|
276
277
|
try {
|
|
277
|
-
if(__BUILD_TIME__) {
|
|
278
|
+
if (__BUILD_TIME__) {
|
|
278
279
|
timestamp = __BUILD_TIME__
|
|
279
280
|
}
|
|
280
281
|
} catch (error) {
|
|
@@ -288,27 +289,29 @@ export function insertFontIconCss(config){
|
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
|
|
291
|
-
export function insertThirdLoginJs(config){
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
292
|
+
export function insertThirdLoginJs(config) {
|
|
293
|
+
if (!window.insertJsFile) {
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
if (!config) {
|
|
297
|
+
config = window.$vueApp.config.globalProperties
|
|
298
|
+
}
|
|
299
|
+
if (!config || (config.systemCode !== 'portal' && config.systemCode !== 'devp')) {
|
|
300
|
+
return
|
|
301
|
+
}
|
|
302
|
+
// 只有portal和devp需要动态添加这些js
|
|
303
|
+
// userName,dingtalk,feishu,qiwei
|
|
304
|
+
if (!config.loginMethod || config.loginMethod.indexOf('dingtalk') >= 0) {
|
|
305
|
+
window.insertJsFile(`https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js`)
|
|
306
|
+
}
|
|
307
|
+
if (!config.loginMethod || config.loginMethod.indexOf('feishu') >= 0) {
|
|
308
|
+
window.insertJsFile(
|
|
309
|
+
`https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js`
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
if (!config.loginMethod || config.loginMethod.indexOf('qiwei') >= 0) {
|
|
313
|
+
window.insertJsFile(`https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-2.3.1.js`)
|
|
314
|
+
}
|
|
312
315
|
}
|
|
313
316
|
/**
|
|
314
317
|
* postmessage跨域传message时获得orign路径使用
|
|
@@ -615,45 +618,49 @@ async function handlePlateSysLang(currentLanguage) {
|
|
|
615
618
|
}
|
|
616
619
|
// 缓存项目设值信息
|
|
617
620
|
export function cacheProjectSetting() {
|
|
618
|
-
return new Promise((resolve,reject)=>{
|
|
621
|
+
return new Promise((resolve, reject) => {
|
|
619
622
|
const projectSettingCache = localStorage.getItem('PROJECT_SETTINGS')
|
|
620
623
|
let projectSettings = null
|
|
621
|
-
if(projectSettingCache && projectSettingCache === '_EMPTY_VALUE') {
|
|
622
|
-
|
|
624
|
+
if (projectSettingCache && projectSettingCache === '_EMPTY_VALUE') {
|
|
625
|
+
resolve(projectSettings)
|
|
623
626
|
} else if (projectSettingCache) {
|
|
624
627
|
projectSettings = JSON.parse(projectSettingCache)
|
|
625
628
|
setBrowserFavicon(projectSettings)
|
|
626
629
|
resolve(projectSettings)
|
|
627
630
|
} else {
|
|
628
|
-
window.$vueApp.config.globalProperties.$http
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
631
|
+
window.$vueApp.config.globalProperties.$http
|
|
632
|
+
.get(window.$vueApp.config.globalProperties.baseAPI + '/cfg/project-settings')
|
|
633
|
+
.then((data) => {
|
|
634
|
+
if (data) {
|
|
635
|
+
localStorage.setItem('PROJECT_SETTINGS', JSON.stringify(data))
|
|
636
|
+
projectSettings = data
|
|
637
|
+
setBrowserFavicon(projectSettings)
|
|
638
|
+
} else {
|
|
639
|
+
localStorage.setItem('PROJECT_SETTINGS', '_EMPTY_VALUE')
|
|
640
|
+
}
|
|
641
|
+
resolve(projectSettings)
|
|
642
|
+
})
|
|
643
|
+
.catch((error) => {
|
|
644
|
+
reject(error)
|
|
645
|
+
})
|
|
640
646
|
}
|
|
641
647
|
})
|
|
642
648
|
}
|
|
643
649
|
|
|
644
|
-
function setBrowserFavicon(projectSettings){
|
|
650
|
+
function setBrowserFavicon(projectSettings) {
|
|
645
651
|
const linkElement = document.getElementById('ambBrowserIcon')
|
|
646
|
-
if(!linkElement){
|
|
652
|
+
if (!linkElement) {
|
|
647
653
|
return
|
|
648
654
|
}
|
|
649
655
|
if (projectSettings) {
|
|
650
|
-
const browserIconUrl =
|
|
651
|
-
|
|
656
|
+
const browserIconUrl =
|
|
657
|
+
window.$vueApp.config.globalProperties.baseAPI + '/cfg/project/icon/browserIcon?t=' + __BUILD_TIME__
|
|
658
|
+
if (projectSettings.browserImageUuid && (!linkElement.href || linkElement.href !== browserIconUrl)) {
|
|
652
659
|
linkElement.href = browserIconUrl
|
|
653
660
|
}
|
|
654
661
|
}
|
|
655
|
-
if(!linkElement.href) {
|
|
656
|
-
linkElement.href = 'favicon.svg?t='+__BUILD_TIME__
|
|
662
|
+
if (!linkElement.href) {
|
|
663
|
+
linkElement.href = 'favicon.svg?t=' + __BUILD_TIME__
|
|
657
664
|
}
|
|
658
665
|
}
|
|
659
666
|
|
|
@@ -804,37 +811,43 @@ export function getAuthSource() {
|
|
|
804
811
|
/**
|
|
805
812
|
* 把路径中的参数转为对象
|
|
806
813
|
* @param {*} fullPath 全路径。例如:hash路径:http://xx:8090/#/sss/dd?p1=1&p2=2 或 普通路径:http://xx:8090/sss/dd?p1=1&p2=2
|
|
807
|
-
* @returns
|
|
814
|
+
* @returns
|
|
808
815
|
*/
|
|
809
816
|
export function getURLSearchParamObj(fullPath) {
|
|
810
|
-
try{
|
|
811
|
-
// 提取hash部分
|
|
812
|
-
const hash = fullPath.includes('#') ? fullPath.split('#')[1] : fullPath
|
|
813
|
-
// 提取查询参数
|
|
814
|
-
const queryString = hash.includes('?') ? hash.split('?')[1] : hash
|
|
815
|
-
// 解析参数
|
|
816
|
-
const params = new URLSearchParams(queryString)
|
|
817
|
+
try {
|
|
818
|
+
// 提取hash部分
|
|
819
|
+
const hash = fullPath.includes('#') ? fullPath.split('#')[1] : fullPath
|
|
820
|
+
// 提取查询参数
|
|
821
|
+
const queryString = hash.includes('?') ? hash.split('?')[1] : hash
|
|
822
|
+
// 解析参数
|
|
823
|
+
const params = new URLSearchParams(queryString)
|
|
817
824
|
// 转换为普通对象
|
|
818
825
|
return Object.fromEntries(params)
|
|
819
|
-
}catch(error){
|
|
820
|
-
console.error('error===',error)
|
|
826
|
+
} catch (error) {
|
|
827
|
+
console.error('error===', error)
|
|
821
828
|
}
|
|
822
829
|
}
|
|
823
830
|
|
|
824
831
|
// 获得KKFileView预览url,处理水印
|
|
825
832
|
export function getKkFilePreviewUrl(previewUrl) {
|
|
826
|
-
let myPreviewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(previewUrl))
|
|
827
|
-
return new Promise((resolve,reject)=>{
|
|
828
|
-
getWatermarkSetting()
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
833
|
+
let myPreviewUrl = getKkFileBackendUrl() + '?url=' + encodeURIComponent(Base64.encode(previewUrl))
|
|
834
|
+
return new Promise((resolve, reject) => {
|
|
835
|
+
getWatermarkSetting()
|
|
836
|
+
.then((watermark) => {
|
|
837
|
+
if (watermark && watermark.useRange && watermark.useRange.indexOf('annex') >= 0) {
|
|
838
|
+
// 表示适用范围有附件时
|
|
839
|
+
myPreviewUrl =
|
|
840
|
+
myPreviewUrl +
|
|
841
|
+
'&watermarkTxt=' +
|
|
842
|
+
watermark.content +
|
|
843
|
+
'&watermarkXSpace=60&watermarkYSpace=100&watermarkWidth=500&watermarkHeight=100'
|
|
844
|
+
}
|
|
845
|
+
resolve(myPreviewUrl)
|
|
846
|
+
})
|
|
847
|
+
.catch((error) => {
|
|
848
|
+
console.error('获得水印失败', error)
|
|
849
|
+
resolve(myPreviewUrl)
|
|
850
|
+
})
|
|
838
851
|
})
|
|
839
852
|
}
|
|
840
853
|
|
|
@@ -842,12 +855,12 @@ function getKkFileBackendUrl() {
|
|
|
842
855
|
let kkFileViewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl
|
|
843
856
|
let kkFileViewUrlResult = kkFileViewUrl
|
|
844
857
|
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
845
|
-
if(kkFileViewUrl && baseURL){
|
|
858
|
+
if (kkFileViewUrl && baseURL) {
|
|
846
859
|
let baseUrls = baseURL.split('/')
|
|
847
|
-
let prefixUrl = baseUrls[0]+ '//' + baseUrls[2]
|
|
860
|
+
let prefixUrl = baseUrls[0] + '//' + baseUrls[2]
|
|
848
861
|
let kkFileViewUrls = kkFileViewUrl.split('/')
|
|
849
|
-
let kkFilePrefixUrl = kkFileViewUrls[0]+ '//' + kkFileViewUrls[2]
|
|
850
|
-
if(prefixUrl === kkFilePrefixUrl){
|
|
862
|
+
let kkFilePrefixUrl = kkFileViewUrls[0] + '//' + kkFileViewUrls[2]
|
|
863
|
+
if (prefixUrl === kkFilePrefixUrl) {
|
|
851
864
|
// 如果baseURL和kkFileViewUrl的ip和端口一致,则表示kkFileView服务被nginx代理了,此时需要做内网、外网域名替换,例如:西安西开项目
|
|
852
865
|
// 如果baseURL和kkFileViewUrl的ip和端口不一致,则表示kkFileView服务没有被nginx代理,此时不需要处理kkFileViewUrl路径,例如:公司产品项目
|
|
853
866
|
kkFileViewUrlResult = getRelativeBaseUrl(kkFileViewUrl)
|
|
@@ -856,3 +869,17 @@ function getKkFileBackendUrl() {
|
|
|
856
869
|
console.log('获得kkFile服务部署路径', kkFileViewUrlResult)
|
|
857
870
|
return kkFileViewUrlResult
|
|
858
871
|
}
|
|
872
|
+
|
|
873
|
+
export function cacheAllEnableGlobalPropUtil() {
|
|
874
|
+
const hasLoadState = localStorage.getItem(GLOBAL_PROP.loadState)
|
|
875
|
+
if (hasLoadState && hasLoadState === 'true') {
|
|
876
|
+
return
|
|
877
|
+
}
|
|
878
|
+
// window.$http
|
|
879
|
+
// .get(window.$vueApp.config.globalProperties.baseAPI + '/component/common/prop-setting')
|
|
880
|
+
// .then((propMap) => {
|
|
881
|
+
// if (propMap) {
|
|
882
|
+
// cacheAllGlobalPropCache(propMap)
|
|
883
|
+
// }
|
|
884
|
+
// })
|
|
885
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const GLOBAL_PROP = {
|
|
2
|
+
loadState: 'GLOBAL_PROP_LOAD_STATE',
|
|
3
|
+
CAN_SHOW_ORG_TREE: 'global-show-org-tree',
|
|
4
|
+
PORTAL_CHART_LAYOUT_COL: 'portal-chart-layout-col'
|
|
5
|
+
} as const
|
|
6
|
+
|
|
7
|
+
export function cacheAllGlobalPropCache(propMap: Record<string, string>) {
|
|
8
|
+
for (const key in propMap) {
|
|
9
|
+
localStorage.setItem(key, propMap[key])
|
|
10
|
+
}
|
|
11
|
+
localStorage.setItem(GLOBAL_PROP.loadState, 'true')
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function removeAllGlobalPropCache() {
|
|
15
|
+
localStorage.removeItem(GLOBAL_PROP.loadState)
|
|
16
|
+
localStorage.removeItem(GLOBAL_PROP.CAN_SHOW_ORG_TREE)
|
|
17
|
+
localStorage.removeItem(GLOBAL_PROP.PORTAL_CHART_LAYOUT_COL)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getCanShowOrgTree() {
|
|
21
|
+
return localStorage.getItem(GLOBAL_PROP.CAN_SHOW_ORG_TREE)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function cacheCanShowOrgTree(value: string) {
|
|
25
|
+
localStorage.setItem(GLOBAL_PROP.CAN_SHOW_ORG_TREE, value)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function removeCanShowOrgTree() {
|
|
29
|
+
localStorage.removeItem(GLOBAL_PROP.CAN_SHOW_ORG_TREE)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function cacheGlobalProp(key: string, value: string) {
|
|
33
|
+
localStorage.setItem(key, value)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function getGlobalProp(key: string) {
|
|
37
|
+
return localStorage.getItem(key)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function removeGlobalProp(key: string) {
|
|
41
|
+
localStorage.removeItem(key)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { GLOBAL_PROP }
|
package/src/utils/global-prop.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const canShowOrgTree = 'CAN_SHOW_ORG_TREE'
|
|
2
|
-
|
|
3
|
-
export function removeGlobalPropCache() {
|
|
4
|
-
localStorage.removeItem(canShowOrgTree)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function getCanShowOrgTree() {
|
|
8
|
-
return localStorage.getItem(canShowOrgTree)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function cacheCanShowOrgTree(value) {
|
|
12
|
-
localStorage.setItem(canShowOrgTree, value)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function removeCanShowOrgTree() {
|
|
16
|
-
localStorage.removeItem(canShowOrgTree)
|
|
17
|
-
}
|