agilebuilder-ui 1.1.46 → 1.1.48
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-64e37702.js} +1 -1
- package/lib/{404-48d76996.js → 404-7d89180e.js} +1 -1
- package/lib/{iframe-page-77e184a0.js → iframe-page-4c8bc1d5.js} +1 -1
- package/lib/index-5c1112e8.js +92783 -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-0a36be80.js} +1 -1
- package/lib/{tab-content-index-65696e56.js → tab-content-index-9a271908.js} +1 -1
- package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-93d013b2.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/fs-preview/src/fs-preview.vue +5 -1
- package/packages/fs-upload-list/src/fs-upload-list.vue +6 -1
- package/packages/fs-upload-new/src/fs-button-upload.vue +8 -1
- package/packages/fs-upload-new/src/fs-drag-upload.vue +8 -1
- 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/super-grid/src/apis.js +11 -0
- 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 +29 -37
- package/packages/super-grid/src/normal-column.vue +8 -1
- package/packages/super-grid/src/super-grid.vue +21 -8
- package/src/assets/chat-embed/avatar.png +0 -0
- package/src/i18n/langs/cn.js +17 -3
- package/src/i18n/langs/en.js +16 -2
- package/src/store/modules/chat-ai-store.ts +78 -0
- package/src/store/modules/tab-content.js +9 -3
- package/src/styles/index.scss +19 -0
- package/src/utils/chat-ai-util.ts +31 -0
- package/src/utils/common-util.js +56 -8
- package/src/utils/insert_css.js +14 -1
- package/src/utils/jump-page-utils.js +8 -4
- package/lib/index-465b0d69.js +0 -73558
|
@@ -226,7 +226,7 @@ import { checkPermission } from '../../../src/utils/permission'
|
|
|
226
226
|
import { getGuId } from '../../../src/utils/guid.js'
|
|
227
227
|
// import resizeMixin from '../../../src/mixins/resizeMixin.js';
|
|
228
228
|
import storeVuex from '../../../src/store'
|
|
229
|
-
|
|
229
|
+
import { setPageDataToChatAiStore, setPageInfoToChatStore } from '../../../src/utils/chat-ai-util.ts'
|
|
230
230
|
export default {
|
|
231
231
|
components: {
|
|
232
232
|
IndexColumn,
|
|
@@ -924,6 +924,16 @@ export default {
|
|
|
924
924
|
deep: true
|
|
925
925
|
}
|
|
926
926
|
)
|
|
927
|
+
if (!this.isFormSubTable) {
|
|
928
|
+
setPageInfoToChatStore(this.pageContext.menuCode, {
|
|
929
|
+
listRefs: [
|
|
930
|
+
{
|
|
931
|
+
ref: this
|
|
932
|
+
}
|
|
933
|
+
],
|
|
934
|
+
pageType: 'list'
|
|
935
|
+
})
|
|
936
|
+
}
|
|
927
937
|
})
|
|
928
938
|
},
|
|
929
939
|
beforeDestroy() {
|
|
@@ -1649,16 +1659,16 @@ export default {
|
|
|
1649
1659
|
}
|
|
1650
1660
|
return isCanRefreshTableData
|
|
1651
1661
|
},
|
|
1652
|
-
getSubTableGridData(subTableData) {
|
|
1662
|
+
getSubTableGridData(subTableData, currentPage) {
|
|
1653
1663
|
let gridData = subTableData
|
|
1654
1664
|
if (this.isSubTableShowPage === true) {
|
|
1655
1665
|
if (subTableData && subTableData.length > 0) {
|
|
1656
1666
|
// const subTableData = JSON.parse(JSON.stringify(this.subTableData))
|
|
1657
1667
|
this.pagination.total = subTableData.length
|
|
1658
1668
|
// 当前是第几页
|
|
1659
|
-
let
|
|
1660
|
-
if (
|
|
1661
|
-
|
|
1669
|
+
let newCurrentPage = currentPage!== undefined && currentPage !== null ?currentPage: this.currentPage
|
|
1670
|
+
if (newCurrentPage === undefined || newCurrentPage === null) {
|
|
1671
|
+
newCurrentPage = 1
|
|
1662
1672
|
}
|
|
1663
1673
|
// 每页显示多少条记录
|
|
1664
1674
|
let pageSize = this.pageSize
|
|
@@ -1669,7 +1679,7 @@ export default {
|
|
|
1669
1679
|
pageSize = 20
|
|
1670
1680
|
}
|
|
1671
1681
|
// 当前页的第一条记录的数组下标
|
|
1672
|
-
const startRowIndex = (
|
|
1682
|
+
const startRowIndex = (newCurrentPage - 1) * pageSize
|
|
1673
1683
|
// 当前页的最后一条记录的数组下标
|
|
1674
1684
|
let lastRowIndex = startRowIndex + pageSize
|
|
1675
1685
|
if (subTableData.length > startRowIndex) {
|
|
@@ -2380,13 +2390,13 @@ export default {
|
|
|
2380
2390
|
this.changePage()
|
|
2381
2391
|
}
|
|
2382
2392
|
},
|
|
2383
|
-
changePage() {
|
|
2393
|
+
changePage(currentPage) {
|
|
2384
2394
|
console.log('点击了分页')
|
|
2385
2395
|
// 翻页操作会导致筛选项发生变化,所以需要清空已有的
|
|
2386
2396
|
this.$refs.superGrid?.clearFilter()
|
|
2387
2397
|
// TODO: 把当前页数、每页条数、查询条件、排序信息传回后台
|
|
2388
2398
|
if (this.isSubTableShowPage) {
|
|
2389
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
2399
|
+
this.gridData = this.getSubTableGridData(this.subTableData, currentPage)
|
|
2390
2400
|
const gridParams = store.get(this.code)
|
|
2391
2401
|
gridParams.gridData = this.gridData
|
|
2392
2402
|
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
@@ -3222,6 +3232,9 @@ export default {
|
|
|
3222
3232
|
// this.$refs.superGrid?.toggleRowSelection(newSelection[newSelection.length - 1], false)
|
|
3223
3233
|
// }
|
|
3224
3234
|
}
|
|
3235
|
+
if (!this.isFormSubTable) {
|
|
3236
|
+
setPageDataToChatAiStore(newSelection)
|
|
3237
|
+
}
|
|
3225
3238
|
this.selectionChange(newSelection)
|
|
3226
3239
|
},
|
|
3227
3240
|
// 显示移动端查询区域
|
|
Binary file
|
package/src/i18n/langs/cn.js
CHANGED
|
@@ -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,7 +136,7 @@ const cn = {
|
|
|
136
136
|
prevRow: '上一行',
|
|
137
137
|
nextRow: '下一行',
|
|
138
138
|
detail: '详情',
|
|
139
|
-
searchEmpty:'查询空值'
|
|
139
|
+
searchEmpty: '查询空值'
|
|
140
140
|
},
|
|
141
141
|
// 部门树组件
|
|
142
142
|
departmentTree: {},
|
|
@@ -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
|
@@ -136,7 +136,7 @@ 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: {
|
|
@@ -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,23 @@ 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;
|
|
306
325
|
}
|
|
@@ -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(menuCode, info) {
|
|
22
|
+
try {
|
|
23
|
+
if (window.top.ChatAiStore) {
|
|
24
|
+
window.top.ChatAiStore.setPageInfoToChatStore(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
|
@@ -231,8 +231,12 @@ export function isPlateSys(systemCode) {
|
|
|
231
231
|
export function getServerConfigUtil(http) {
|
|
232
232
|
return new Promise((resolve, reject) => {
|
|
233
233
|
let timestamp = '1'
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
try {
|
|
235
|
+
if(__BUILD_TIME__) {
|
|
236
|
+
timestamp = __BUILD_TIME__
|
|
237
|
+
}
|
|
238
|
+
} catch (error) {
|
|
239
|
+
console.log('__BUILD_TIME__ not define')
|
|
236
240
|
}
|
|
237
241
|
http.get('./server-config.json?t='+timestamp).then((result) => {
|
|
238
242
|
const config = result
|
|
@@ -247,16 +251,60 @@ export function getServerConfigUtil(http) {
|
|
|
247
251
|
)
|
|
248
252
|
localStorage.setItem('_baseAPI_', window.$vueApp.config.globalProperties.baseAPI)
|
|
249
253
|
localStorage.setItem('_amb_projectModel_', window.$vueApp.config.globalProperties.projectModel)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
|
|
255
|
-
}
|
|
254
|
+
// 插入图标css样式文件
|
|
255
|
+
insertFontIconCss(config)
|
|
256
|
+
// 第3方集成js
|
|
257
|
+
insertThirdLoginJs(config)
|
|
256
258
|
resolve()
|
|
257
259
|
})
|
|
258
260
|
})
|
|
259
261
|
}
|
|
262
|
+
|
|
263
|
+
export function insertFontIconCss(config){
|
|
264
|
+
if(!window.insertCssFile){
|
|
265
|
+
return
|
|
266
|
+
}
|
|
267
|
+
if(!config){
|
|
268
|
+
config = window.$vueApp.config.globalProperties
|
|
269
|
+
}
|
|
270
|
+
let timestamp = '1'
|
|
271
|
+
try {
|
|
272
|
+
if(__BUILD_TIME__) {
|
|
273
|
+
timestamp = __BUILD_TIME__
|
|
274
|
+
}
|
|
275
|
+
} catch (error) {
|
|
276
|
+
console.log('__BUILD_TIME__ not define')
|
|
277
|
+
}
|
|
278
|
+
if (config.fontIconAddress && window.insertCssFile) {
|
|
279
|
+
window.insertCssFile(`${config.fontIconAddress}/iconfont.css?t=${timestamp}`)
|
|
280
|
+
}
|
|
281
|
+
if (config.fontIconAddress && window.insertCssFile) {
|
|
282
|
+
window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export function insertThirdLoginJs(config){
|
|
287
|
+
if(!window.insertJsFile ){
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
if(!config){
|
|
291
|
+
config = window.$vueApp.config.globalProperties
|
|
292
|
+
}
|
|
293
|
+
if(!config || (config.systemCode !== 'portal' && config.systemCode !== 'devp')){
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
// 只有portal和devp需要动态添加这些js
|
|
297
|
+
// userName,dingtalk,feishu,qiwei
|
|
298
|
+
if (!config.loginMethod || config.loginMethod.indexOf('dingtalk')>=0) {
|
|
299
|
+
window.insertJsFile(`https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js`)
|
|
300
|
+
}
|
|
301
|
+
if (!config.loginMethod || config.loginMethod.indexOf('feishu')>=0) {
|
|
302
|
+
window.insertJsFile(`https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js`)
|
|
303
|
+
}
|
|
304
|
+
if (!config.loginMethod || config.loginMethod.indexOf('qiwei')>=0) {
|
|
305
|
+
window.insertJsFile(`https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-2.3.1.js`)
|
|
306
|
+
}
|
|
307
|
+
}
|
|
260
308
|
/**
|
|
261
309
|
* postmessage跨域传message时获得orign路径使用
|
|
262
310
|
* @returns orign路径
|
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
|
}
|