agilebuilder-ui 1.1.46 → 1.1.48-rc1
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-a94cd05b.js} +1 -1
- package/lib/{404-48d76996.js → 404-eb21244b.js} +1 -1
- package/lib/{iframe-page-77e184a0.js → iframe-page-7add4333.js} +1 -1
- package/lib/index-7a601895.js +92839 -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-483b398c.js} +1 -1
- package/lib/{tab-content-index-65696e56.js → tab-content-index-0862686f.js} +1 -1
- package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-c80e8ed2.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/department-tree-service.js +17 -11
- package/packages/department-tree-inline/src/search-result.vue +187 -219
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +17 -4
- 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/department-user-tree-multi-service.js +23 -13
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +9 -5
- package/packages/department-user-tree-inline/src/group-user-tree-service.js +17 -11
- package/packages/department-user-tree-inline/src/search-result.vue +207 -220
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +14 -3
- 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 +30 -38
- package/packages/super-grid/src/normal-column.vue +8 -1
- package/packages/super-grid/src/super-grid.vue +23 -10
- package/packages/utils/utils.js +27 -9
- package/packages/workgroup-tree-inline/src/search-result.vue +2 -1
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +16 -5
- package/packages/workgroup-user-tree-inline/src/search-result.vue +2 -1
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +30 -24
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +49 -37
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +281 -222
- 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/index.scss +45 -0
- package/src/utils/auth.js +10 -7
- package/src/utils/chat-ai-util.ts +31 -0
- package/src/utils/common-util.js +78 -8
- package/src/utils/global-prop.js +17 -0
- 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
|
Binary file
|
package/src/i18n/langs/cn.js
CHANGED
|
@@ -56,7 +56,7 @@ const cn = {
|
|
|
56
56
|
pleaseRemoveallpersonnelBeforeSelectingSpecificPersonnel: '请先移除所有人员,再选择具体人员',
|
|
57
57
|
queryResultIsEmpty: '查询结果为空',
|
|
58
58
|
pleaseSelectATeam: '请选择工作组',
|
|
59
|
-
pleaseEnterTeamName: '
|
|
59
|
+
pleaseEnterTeamName: '请输入工作组信息筛选',
|
|
60
60
|
validationFailed: '验证失败',
|
|
61
61
|
selectionDate: '选择日期',
|
|
62
62
|
selectTime: '选择时间',
|
|
@@ -84,7 +84,7 @@ const cn = {
|
|
|
84
84
|
uploadFileTip: '上传的文件不超过{fileSize}M',
|
|
85
85
|
asyncExportJumpMsg: '或点击我跳转到下载页面',
|
|
86
86
|
mustFill: '{label} 必须填写',
|
|
87
|
-
filePathNotFound: '文件UUID未找到,请检查配置'
|
|
87
|
+
filePathNotFound: '文件UUID未找到,请检查配置'
|
|
88
88
|
},
|
|
89
89
|
// 列表组件
|
|
90
90
|
superGrid: {
|
|
@@ -136,13 +136,13 @@ const cn = {
|
|
|
136
136
|
prevRow: '上一行',
|
|
137
137
|
nextRow: '下一行',
|
|
138
138
|
detail: '详情',
|
|
139
|
-
searchEmpty:'查询空值'
|
|
139
|
+
searchEmpty: '查询空值'
|
|
140
140
|
},
|
|
141
141
|
// 部门树组件
|
|
142
142
|
departmentTree: {},
|
|
143
143
|
// 嵌入部门树组件
|
|
144
144
|
departmentTreeInline: {
|
|
145
|
-
pleaseEnterDepartmentName: '
|
|
145
|
+
pleaseEnterDepartmentName: '请输入部门信息筛选',
|
|
146
146
|
name: '部门名称',
|
|
147
147
|
code: '部门编码',
|
|
148
148
|
removeDepartment: '移除部门',
|
|
@@ -156,7 +156,7 @@ const cn = {
|
|
|
156
156
|
},
|
|
157
157
|
// 用户树
|
|
158
158
|
departmentUserTree: {
|
|
159
|
-
pleaseEnterUserInformation: '
|
|
159
|
+
pleaseEnterUserInformation: '请输入用户信息筛选',
|
|
160
160
|
selectedPeople: '已选人员',
|
|
161
161
|
searchFieldUserName: '姓名',
|
|
162
162
|
searchFieldLoginName: '登录名',
|
|
@@ -284,7 +284,9 @@ const cn = {
|
|
|
284
284
|
theNumberOfUploadsExceedsTheLimitTheLimitIs: '上传数量超过限制,限制数量为',
|
|
285
285
|
image: '图片',
|
|
286
286
|
video: '视频',
|
|
287
|
-
updateSuccess: '更新成功'
|
|
287
|
+
updateSuccess: '更新成功',
|
|
288
|
+
more: '更多',
|
|
289
|
+
uploadFailed: '上传失败!'
|
|
288
290
|
},
|
|
289
291
|
messageVideo: {
|
|
290
292
|
attemptingToIdentify: '正在尝试识别....',
|
|
@@ -299,6 +301,18 @@ const cn = {
|
|
|
299
301
|
},
|
|
300
302
|
imatrixUIPromptMessage: {
|
|
301
303
|
NoContent: '暂无内容'
|
|
304
|
+
},
|
|
305
|
+
chatEmbed: {
|
|
306
|
+
name: '小助手',
|
|
307
|
+
history: '历史记录',
|
|
308
|
+
minimize: '缩小',
|
|
309
|
+
fullscreen: '全屏',
|
|
310
|
+
close: '关闭',
|
|
311
|
+
regenerate: '重新生成',
|
|
312
|
+
copy: '复制',
|
|
313
|
+
newChat: '新建会话',
|
|
314
|
+
copySuccess: '复制成功',
|
|
315
|
+
requestFailed: '请求会话失败!'
|
|
302
316
|
}
|
|
303
317
|
}
|
|
304
318
|
export default cn
|
package/src/i18n/langs/en.js
CHANGED
|
@@ -57,7 +57,7 @@ const en = {
|
|
|
57
57
|
'Please Remove All Personnel Before Selecting Specific Personnel',
|
|
58
58
|
queryResultIsEmpty: 'Query Result Is Empty',
|
|
59
59
|
pleaseSelectATeam: 'Please Select A Team',
|
|
60
|
-
pleaseEnterTeamName: 'Please Enter Team
|
|
60
|
+
pleaseEnterTeamName: 'Please Enter Team Info Filter',
|
|
61
61
|
validationFailed: 'Validation Failed',
|
|
62
62
|
selectionDate: 'Selection Date',
|
|
63
63
|
selectTime: 'Select Time',
|
|
@@ -136,11 +136,11 @@ const en = {
|
|
|
136
136
|
prevRow: 'Prev Row',
|
|
137
137
|
nextRow: 'Next Row',
|
|
138
138
|
detail: 'Detail',
|
|
139
|
-
searchEmpty:'Search Empty'
|
|
139
|
+
searchEmpty: 'Search Empty'
|
|
140
140
|
},
|
|
141
141
|
departmentTree: {},
|
|
142
142
|
departmentTreeInline: {
|
|
143
|
-
pleaseEnterDepartmentName: 'Please Enter Department
|
|
143
|
+
pleaseEnterDepartmentName: 'Please Enter Department Info Filter',
|
|
144
144
|
name: 'Department Name',
|
|
145
145
|
code: 'Department Code',
|
|
146
146
|
removeDepartment: 'Remove Department',
|
|
@@ -154,7 +154,7 @@ const en = {
|
|
|
154
154
|
},
|
|
155
155
|
// 用户树
|
|
156
156
|
departmentUserTree: {
|
|
157
|
-
pleaseEnterUserInformation: 'Please Enter User Information',
|
|
157
|
+
pleaseEnterUserInformation: 'Please Enter User Information Filter',
|
|
158
158
|
selectedPeople: 'Selected People',
|
|
159
159
|
searchFieldUserName: 'Name',
|
|
160
160
|
searchFieldLoginName: 'Login Name',
|
|
@@ -283,7 +283,9 @@ const en = {
|
|
|
283
283
|
theNumberOfUploadsExceedsTheLimitTheLimitIs: 'The number of uploads exceeds the limit. The limit is',
|
|
284
284
|
image: 'Image',
|
|
285
285
|
video: 'Video',
|
|
286
|
-
updateSuccess: 'Update success'
|
|
286
|
+
updateSuccess: 'Update success',
|
|
287
|
+
more: 'More',
|
|
288
|
+
uploadFailed: 'Upload failed!'
|
|
287
289
|
},
|
|
288
290
|
messageVideo: {
|
|
289
291
|
attemptingToIdentify: 'Attempting to identify',
|
|
@@ -298,6 +300,18 @@ const en = {
|
|
|
298
300
|
},
|
|
299
301
|
imatrixUIPromptMessage: {
|
|
300
302
|
NoContent: 'No content'
|
|
303
|
+
},
|
|
304
|
+
chatEmbed: {
|
|
305
|
+
name: 'Assistant',
|
|
306
|
+
history: 'History',
|
|
307
|
+
minimize: 'Minimize',
|
|
308
|
+
fullscreen: 'Full Screen',
|
|
309
|
+
close: 'Close',
|
|
310
|
+
regenerate: 'Regenerate',
|
|
311
|
+
copy: 'Copy',
|
|
312
|
+
newChat: 'New Chat',
|
|
313
|
+
copySuccess: 'Copy successful',
|
|
314
|
+
requestFailed: 'Request failed!'
|
|
301
315
|
}
|
|
302
316
|
}
|
|
303
317
|
export default en
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ref, computed, reactive } from 'vue'
|
|
2
|
+
import { defineStore } from 'pinia'
|
|
3
|
+
|
|
4
|
+
type Menu = {
|
|
5
|
+
menuCode: string
|
|
6
|
+
menuName: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default defineStore('ChatAiStore', () => {
|
|
10
|
+
const currentTabName = ref('chat')
|
|
11
|
+
const activeMenu = ref<Menu>({
|
|
12
|
+
menuCode: '',
|
|
13
|
+
menuName: ''
|
|
14
|
+
})
|
|
15
|
+
const pageInfo = ref<any>({})
|
|
16
|
+
|
|
17
|
+
// 最后操作的表格实例
|
|
18
|
+
const pageRef = ref<any>(null)
|
|
19
|
+
const pageData = ref<any[]>([])
|
|
20
|
+
|
|
21
|
+
function setCurrentTabName(name: string) {
|
|
22
|
+
currentTabName.value = name
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getCurrentTabName() {
|
|
26
|
+
return currentTabName.value
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function setPageInfoToChatStore(menuCode: string, info: any) {
|
|
30
|
+
pageInfo.value[menuCode] = info
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getPageInfo(menuCode: string) {
|
|
34
|
+
return pageInfo.value[menuCode] || null
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getActiveMenuPageInfo() {
|
|
38
|
+
return pageInfo.value[activeMenu.value.menuCode] || null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function setPageData(newSelection: any[]) {
|
|
42
|
+
pageData.value = JSON.parse(JSON.stringify(newSelection))
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getPageData() {
|
|
46
|
+
return pageData.value
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function clearPageData() {
|
|
50
|
+
pageData.value = []
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function setActiveMenu(menu: any) {
|
|
54
|
+
activeMenu.value = menu
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getActiveMenu() {
|
|
58
|
+
return activeMenu.value
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function getPageType() {}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
setCurrentTabName,
|
|
65
|
+
getCurrentTabName,
|
|
66
|
+
setPageData,
|
|
67
|
+
getPageData,
|
|
68
|
+
clearPageData,
|
|
69
|
+
getActiveMenu,
|
|
70
|
+
setActiveMenu,
|
|
71
|
+
getPageType,
|
|
72
|
+
setPageInfoToChatStore,
|
|
73
|
+
getPageInfo,
|
|
74
|
+
getActiveMenuPageInfo,
|
|
75
|
+
pageData,
|
|
76
|
+
activeMenu
|
|
77
|
+
}
|
|
78
|
+
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { setActiveMenuToChatAiStore } from '../../utils/chat-ai-util.ts'
|
|
1
2
|
const tabContent = {
|
|
2
3
|
state: {
|
|
3
4
|
openTab: [], // 所有打开的路由
|
|
4
|
-
activeIndex: null
|
|
5
|
+
activeIndex: null // 激活状态
|
|
5
6
|
},
|
|
6
7
|
mutations: {
|
|
7
8
|
// 添加tabs
|
|
@@ -21,6 +22,11 @@ const tabContent = {
|
|
|
21
22
|
},
|
|
22
23
|
// 设置当前激活的tab
|
|
23
24
|
set_active_index(state, index) {
|
|
25
|
+
const activeTab = state.openTab.find((item) => item.code === index)
|
|
26
|
+
setActiveMenuToChatAiStore({
|
|
27
|
+
menuCode: index,
|
|
28
|
+
menuName: activeTab?.name || ''
|
|
29
|
+
})
|
|
24
30
|
state.activeIndex = index
|
|
25
31
|
},
|
|
26
32
|
// 清空tabs
|
|
@@ -28,9 +34,9 @@ const tabContent = {
|
|
|
28
34
|
if (state.openTab.length > 0) {
|
|
29
35
|
state.openTab.splice(0, state.openTab.length)
|
|
30
36
|
}
|
|
31
|
-
}
|
|
37
|
+
}
|
|
32
38
|
},
|
|
33
|
-
actions: {}
|
|
39
|
+
actions: {}
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export default tabContent
|
package/src/styles/index.scss
CHANGED
|
@@ -303,4 +303,49 @@ body .el-table colgroup.gutter {
|
|
|
303
303
|
|
|
304
304
|
.dec-page-main {
|
|
305
305
|
padding: var(--dec-page-main-padding, 15px);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// 必填背景色
|
|
309
|
+
.required_bg {
|
|
310
|
+
background-color: #fff3e0 !important;
|
|
311
|
+
border-left: 4px solid #ff9800 !important;
|
|
312
|
+
padding: 10px;
|
|
313
|
+
display: block;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// 必填时右上角标样式
|
|
317
|
+
.required-corner::after {
|
|
318
|
+
content: "*";
|
|
319
|
+
color: #e74c3c;
|
|
320
|
+
font-size: 18px;
|
|
321
|
+
font-weight: bold;
|
|
322
|
+
position: absolute;
|
|
323
|
+
top: 3px;
|
|
324
|
+
right: 5px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
// "暂无更多" 样式
|
|
329
|
+
.empty_center_area {
|
|
330
|
+
width: 100%;
|
|
331
|
+
position: relative;
|
|
332
|
+
|
|
333
|
+
.empty_notAvailable {
|
|
334
|
+
background-image: url('../assets/nonemessage.png');
|
|
335
|
+
background-size: 100%;
|
|
336
|
+
position: absolute;
|
|
337
|
+
top: 30%;
|
|
338
|
+
left: 50%;
|
|
339
|
+
transform: translate(-50%, -50%);
|
|
340
|
+
|
|
341
|
+
.empty_notAvailable_text {
|
|
342
|
+
position: absolute;
|
|
343
|
+
bottom: 0;
|
|
344
|
+
left: 50%;
|
|
345
|
+
transform: translate(-50%, 100%);
|
|
346
|
+
color: #313233;
|
|
347
|
+
font-weight: regular;
|
|
348
|
+
font-size: 14px;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
306
351
|
}
|
package/src/utils/auth.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import authApi from './auth-api'
|
|
2
2
|
import { removeAllSystemPermissions } from './permissionAuth'
|
|
3
|
+
import { removeGlobalPropCache } from './global-prop'
|
|
3
4
|
|
|
4
5
|
export function getToken() {
|
|
5
6
|
return authApi.getToken()
|
|
@@ -85,13 +86,12 @@ function removeAllLanguages() {
|
|
|
85
86
|
authApi.removeAllLanguages()
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
|
|
89
89
|
export function getTheme() {
|
|
90
90
|
return authApi.getTheme()
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
export function setTheme(theme) {
|
|
94
|
-
if(theme) {
|
|
94
|
+
if (theme) {
|
|
95
95
|
authApi.setTheme(theme)
|
|
96
96
|
} else {
|
|
97
97
|
removeTheme()
|
|
@@ -122,9 +122,9 @@ function removePublishControl() {
|
|
|
122
122
|
*/
|
|
123
123
|
export function removeDevpPermissions() {
|
|
124
124
|
let devpJWTKey = '_devpJWT'
|
|
125
|
-
let currentRoleKey = '_CURRENT_ROLE'
|
|
126
|
-
authApi.removeSessionCache(devpJWTKey)
|
|
127
|
-
authApi.removeSessionCache(currentRoleKey)
|
|
125
|
+
let currentRoleKey = '_CURRENT_ROLE'
|
|
126
|
+
authApi.removeSessionCache(devpJWTKey)
|
|
127
|
+
authApi.removeSessionCache(currentRoleKey)
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export function isDevpSystem() {
|
|
@@ -149,7 +149,7 @@ export function removeSystemCacheUrl() {
|
|
|
149
149
|
|
|
150
150
|
export function getRunCurrentRole() {
|
|
151
151
|
let runCurrentRoleKey = '_RUN_CURRENT_ROLE'
|
|
152
|
-
if(!isDevpSystem()){
|
|
152
|
+
if (!isDevpSystem()) {
|
|
153
153
|
return authApi.getSessionCache(runCurrentRoleKey)
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -165,4 +165,7 @@ export function clearPermission() {
|
|
|
165
165
|
removeAllSystemPermissions()
|
|
166
166
|
removePublishControl()
|
|
167
167
|
removeSystemCacheUrl()
|
|
168
|
-
|
|
168
|
+
|
|
169
|
+
// 清除系统参数设置的全局属性缓存
|
|
170
|
+
removeGlobalPropCache()
|
|
171
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function setPageDataToChatAiStore(ref, newSelection, type = 'list') {
|
|
2
|
+
try {
|
|
3
|
+
if (window.top.ChatAiStore) {
|
|
4
|
+
window.top.ChatAiStore.setPageData(ref, newSelection, type)
|
|
5
|
+
}
|
|
6
|
+
} catch (error) {
|
|
7
|
+
console.error('ChatAiStore not found', error)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function setActiveMenuToChatAiStore(activeMenu) {
|
|
12
|
+
try {
|
|
13
|
+
if (window.top.ChatAiStore) {
|
|
14
|
+
window.top.ChatAiStore.setActiveMenu(activeMenu)
|
|
15
|
+
}
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error('ChatAiStore not found', error)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function setPageInfoToChatStore(pageContext, info) {
|
|
22
|
+
try {
|
|
23
|
+
if (pageContext && window.top.ChatAiStore) {
|
|
24
|
+
window.top.ChatAiStore.setPageInfoToChatStore(pageContext.menuCode, info)
|
|
25
|
+
}
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error('ChatAiStore not found', error)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { setPageDataToChatAiStore, setActiveMenuToChatAiStore, setPageInfoToChatStore }
|
package/src/utils/common-util.js
CHANGED
|
@@ -8,6 +8,9 @@ import i18nUtil from './i18n-util'
|
|
|
8
8
|
* 获得相对地址
|
|
9
9
|
*/
|
|
10
10
|
export function getRelativeBaseUrl(originalBaseUrl) {
|
|
11
|
+
if(!originalBaseUrl){
|
|
12
|
+
return originalBaseUrl
|
|
13
|
+
}
|
|
11
14
|
if (
|
|
12
15
|
window.$vueApp.config.globalProperties.projectModel === undefined ||
|
|
13
16
|
window.$vueApp.config.globalProperties.projectModel !== 'developing.model'
|
|
@@ -231,8 +234,12 @@ export function isPlateSys(systemCode) {
|
|
|
231
234
|
export function getServerConfigUtil(http) {
|
|
232
235
|
return new Promise((resolve, reject) => {
|
|
233
236
|
let timestamp = '1'
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
try {
|
|
238
|
+
if(__BUILD_TIME__) {
|
|
239
|
+
timestamp = __BUILD_TIME__
|
|
240
|
+
}
|
|
241
|
+
} catch (error) {
|
|
242
|
+
console.log('__BUILD_TIME__ not define')
|
|
236
243
|
}
|
|
237
244
|
http.get('./server-config.json?t='+timestamp).then((result) => {
|
|
238
245
|
const config = result
|
|
@@ -247,16 +254,60 @@ export function getServerConfigUtil(http) {
|
|
|
247
254
|
)
|
|
248
255
|
localStorage.setItem('_baseAPI_', window.$vueApp.config.globalProperties.baseAPI)
|
|
249
256
|
localStorage.setItem('_amb_projectModel_', window.$vueApp.config.globalProperties.projectModel)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
|
|
255
|
-
}
|
|
257
|
+
// 插入图标css样式文件
|
|
258
|
+
insertFontIconCss(config)
|
|
259
|
+
// 第3方集成js
|
|
260
|
+
insertThirdLoginJs(config)
|
|
256
261
|
resolve()
|
|
257
262
|
})
|
|
258
263
|
})
|
|
259
264
|
}
|
|
265
|
+
|
|
266
|
+
export function insertFontIconCss(config){
|
|
267
|
+
if(!window.insertCssFile){
|
|
268
|
+
return
|
|
269
|
+
}
|
|
270
|
+
if(!config){
|
|
271
|
+
config = window.$vueApp.config.globalProperties
|
|
272
|
+
}
|
|
273
|
+
let timestamp = '1'
|
|
274
|
+
try {
|
|
275
|
+
if(__BUILD_TIME__) {
|
|
276
|
+
timestamp = __BUILD_TIME__
|
|
277
|
+
}
|
|
278
|
+
} catch (error) {
|
|
279
|
+
console.log('__BUILD_TIME__ not define')
|
|
280
|
+
}
|
|
281
|
+
if (config.fontIconAddress && window.insertCssFile) {
|
|
282
|
+
window.insertCssFile(`${config.fontIconAddress}/iconfont.css?t=${timestamp}`)
|
|
283
|
+
}
|
|
284
|
+
if (config.fontIconAddress && window.insertCssFile) {
|
|
285
|
+
window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export function insertThirdLoginJs(config){
|
|
290
|
+
if(!window.insertJsFile ){
|
|
291
|
+
return
|
|
292
|
+
}
|
|
293
|
+
if(!config){
|
|
294
|
+
config = window.$vueApp.config.globalProperties
|
|
295
|
+
}
|
|
296
|
+
if(!config || (config.systemCode !== 'portal' && config.systemCode !== 'devp')){
|
|
297
|
+
return
|
|
298
|
+
}
|
|
299
|
+
// 只有portal和devp需要动态添加这些js
|
|
300
|
+
// userName,dingtalk,feishu,qiwei
|
|
301
|
+
if (!config.loginMethod || config.loginMethod.indexOf('dingtalk')>=0) {
|
|
302
|
+
window.insertJsFile(`https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js`)
|
|
303
|
+
}
|
|
304
|
+
if (!config.loginMethod || config.loginMethod.indexOf('feishu')>=0) {
|
|
305
|
+
window.insertJsFile(`https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js`)
|
|
306
|
+
}
|
|
307
|
+
if (!config.loginMethod || config.loginMethod.indexOf('qiwei')>=0) {
|
|
308
|
+
window.insertJsFile(`https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-2.3.1.js`)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
260
311
|
/**
|
|
261
312
|
* postmessage跨域传message时获得orign路径使用
|
|
262
313
|
* @returns orign路径
|
|
@@ -748,3 +799,22 @@ export function cacheSystemUrl() {
|
|
|
748
799
|
export function getAuthSource() {
|
|
749
800
|
return window.localStorage.getItem('auth_source')
|
|
750
801
|
}
|
|
802
|
+
/**
|
|
803
|
+
* 把路径中的参数转为对象
|
|
804
|
+
* @param {*} fullPath 全路径。例如:hash路径:http://xx:8090/#/sss/dd?p1=1&p2=2 或 普通路径:http://xx:8090/sss/dd?p1=1&p2=2
|
|
805
|
+
* @returns
|
|
806
|
+
*/
|
|
807
|
+
export function getURLSearchParamObj(fullPath) {
|
|
808
|
+
try{
|
|
809
|
+
// 提取hash部分
|
|
810
|
+
const hash = fullPath.includes('#') ? fullPath.split('#')[1] : fullPath;
|
|
811
|
+
// 提取查询参数
|
|
812
|
+
const queryString = hash.includes('?') ? hash.split('?')[1] : hash;
|
|
813
|
+
// 解析参数
|
|
814
|
+
const params = new URLSearchParams(queryString);
|
|
815
|
+
// 转换为普通对象
|
|
816
|
+
return Object.fromEntries(params)
|
|
817
|
+
}catch(error){
|
|
818
|
+
console.error('error===',error)
|
|
819
|
+
}
|
|
820
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
package/src/utils/insert_css.js
CHANGED
|
@@ -15,7 +15,6 @@ if (!window.insertCssFile) {
|
|
|
15
15
|
if (!cssUrl || window.insertedCssFiles.has(cssUrl)) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const timestamp = new Date().getTime();
|
|
19
18
|
const link = document.createElement('link');
|
|
20
19
|
link.rel = 'stylesheet';
|
|
21
20
|
link.href = cssUrl;
|
|
@@ -29,6 +28,20 @@ if (!window.insertCssFile) {
|
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|
|
31
|
+
|
|
32
|
+
if (!window.insertJsFile) {
|
|
33
|
+
window.insertJsFile = (jsUrl) => {
|
|
34
|
+
if (!jsUrl || window.insertedCssFiles.has(jsUrl)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const link = document.createElement('script');
|
|
38
|
+
link.src = jsUrl;
|
|
39
|
+
link.onload = function () {
|
|
40
|
+
window.insertedCssFiles.add(jsUrl);
|
|
41
|
+
};
|
|
42
|
+
document.head.appendChild(link);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
32
45
|
// if (window.insertCssFile) {
|
|
33
46
|
// window.insertCssFile(window.defaultCssUrl);
|
|
34
47
|
// }
|
|
@@ -73,6 +73,7 @@ export function initialization(
|
|
|
73
73
|
if (jumpPageResult && jumpPageResult.visible) {
|
|
74
74
|
const res = { ...jumpPageResult }
|
|
75
75
|
res.jumpPageSetting = JSON.stringify(jumpPageItem.jumpPageSetting)
|
|
76
|
+
res.jumpPageItem = jumpPageItem
|
|
76
77
|
return res
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -228,7 +229,10 @@ export function jumpToPage(
|
|
|
228
229
|
}
|
|
229
230
|
getSystem(system, jumpPageSetting.jumpPageUrl, jumpPageSetting.isNewPage, jumpPageSetting)
|
|
230
231
|
.then((system) => {
|
|
231
|
-
if (
|
|
232
|
+
if (
|
|
233
|
+
(jumpPageSetting.jumpPageAdditional && jumpPageSetting.jumpPageAdditional.length > 0) ||
|
|
234
|
+
(jumpPageSetting.jumpPageTitle && jumpPageSetting.jumpPageTitle.indexOf('${') >= 0)
|
|
235
|
+
) {
|
|
232
236
|
// 发送请求,获取附加参数,并存入缓存
|
|
233
237
|
const paramPath =
|
|
234
238
|
window.$vueApp.config.globalProperties.baseAPI + '/component/super-pages/parsing-additional-parameters'
|
|
@@ -242,7 +246,7 @@ export function jumpToPage(
|
|
|
242
246
|
if (!pageData) {
|
|
243
247
|
pageData = {}
|
|
244
248
|
}
|
|
245
|
-
if(!additionalParamMap){
|
|
249
|
+
if (!additionalParamMap) {
|
|
246
250
|
additionalParamMap = {}
|
|
247
251
|
}
|
|
248
252
|
Object.assign(additionalParamMap, pageData)
|
|
@@ -593,11 +597,11 @@ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, bu
|
|
|
593
597
|
// 移动端时,获得移动端打开方式
|
|
594
598
|
jumpMode = jumpPageSetting.jumpPageMobileOpenMode
|
|
595
599
|
}
|
|
596
|
-
if(!jumpMode && jumpPageSetting) {
|
|
600
|
+
if (!jumpMode && jumpPageSetting) {
|
|
597
601
|
// 移动端没有配置则以 打开方式为准
|
|
598
602
|
jumpMode = jumpPageSetting.jumpPageOpenMode
|
|
599
603
|
}
|
|
600
|
-
if(!jumpMode){
|
|
604
|
+
if (!jumpMode) {
|
|
601
605
|
// 默认是刷新页面
|
|
602
606
|
jumpMode = 'refresh'
|
|
603
607
|
}
|
|
@@ -53,6 +53,7 @@ import AppLink from './Link.vue'
|
|
|
53
53
|
import * as Vue from 'vue'
|
|
54
54
|
import tabJs from '../../../api/tab'
|
|
55
55
|
import { getI18nName } from '../../../utils/menu'
|
|
56
|
+
import { getRelativeBaseUrl, getURLSearchParamObj } from '../../../utils/common-util'
|
|
56
57
|
// import { SidebarItemChild } from './SidebarItemChild.vue'
|
|
57
58
|
export default {
|
|
58
59
|
name: 'SidebarItem',
|
|
@@ -171,6 +172,11 @@ export default {
|
|
|
171
172
|
url = url.substring(0, url.lastIndexOf('&'))
|
|
172
173
|
}
|
|
173
174
|
}
|
|
175
|
+
const paramObj = getURLSearchParamObj(url)
|
|
176
|
+
if(paramObj && paramObj._isThird && paramObj._isThird === 'false') {
|
|
177
|
+
// 表示不是第3方系统,需要替换域名,内网外网部署时需要使用
|
|
178
|
+
url = getRelativeBaseUrl(url)
|
|
179
|
+
}
|
|
174
180
|
window.open(url, toPathObj.query._menuName)
|
|
175
181
|
} else {
|
|
176
182
|
// 刷新页签打开菜单
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<script>
|
|
36
36
|
import * as Vue from 'vue'
|
|
37
37
|
import { mapGetters } from 'vuex'
|
|
38
|
+
import { getRelativeBaseUrl, getURLSearchParamObj } from '../../../utils/common-util'
|
|
38
39
|
export default {
|
|
39
40
|
name: 'TabContent',
|
|
40
41
|
data() {
|
|
@@ -158,6 +159,11 @@ export default {
|
|
|
158
159
|
) {
|
|
159
160
|
path = path.substring(0, path.lastIndexOf('&'))
|
|
160
161
|
}
|
|
162
|
+
const paramObj = getURLSearchParamObj(path)
|
|
163
|
+
if(paramObj && paramObj._isThird && paramObj._isThird === 'false') {
|
|
164
|
+
// 表示不是第3方系统,需要替换域名,内网外网部署时需要使用
|
|
165
|
+
path = getRelativeBaseUrl(path)
|
|
166
|
+
}
|
|
161
167
|
return path
|
|
162
168
|
},
|
|
163
169
|
recieveMessage(event) {
|