打开外部链接 url 增加参数

This commit is contained in:
lyc 2024-08-14 14:03:06 +08:00
parent d18c47994a
commit 41b0660559
2 changed files with 21 additions and 7 deletions

View File

@ -168,7 +168,7 @@ export default {
} }
} }
}, },
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null }, emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
data() { data() {
return { return {
listenList: [], listenList: [],
@ -266,15 +266,18 @@ export default {
}, },
// web AIX // web AIX
openFileLink(item){ openFileLink(item){
let unitId = item.levelSecondId ? item.levelSecondId : item.levelFirstId
// key linkConfig.js // key linkConfig.js
let key = 'filehomework' let key = 'filehomework'
let configObj = outLink()[key] let configObj = outLink()[key]
// //
ipcRenderer.send('openWindow', { ipcRenderer.send('openWindow', {
key, key,
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`, fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`,
cookieData: { ...configObj.data } cookieData: { ...configObj.data }
}) })
this.$emit('on-filearg', item)
} }
}, },
mounted() { mounted() {

View File

@ -79,6 +79,7 @@
@on-delete="deleteTalk" @on-delete="deleteTalk"
@on-set="openSet" @on-set="openSet"
@on-delhomework="delhomework" @on-delhomework="delhomework"
@on-filearg="isOpenHomework = true"
> >
<el-checkbox v-if="!item.uniquekey" label="" :value="item" /> <el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item> </file-list-item>
@ -91,6 +92,7 @@
@on-delete="deleteTalk" @on-delete="deleteTalk"
@on-set="openSet" @on-set="openSet"
@on-delhomework="delhomework" @on-delhomework="delhomework"
> >
<el-checkbox v-if="!item.uniquekey" label="" :value="item" /> <el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item> </file-list-item>
@ -227,8 +229,8 @@ export default {
const curWin = Remote.getCurrentWindow() const curWin = Remote.getCurrentWindow()
curWin.on('focus', ()=>{ curWin.on('focus', ()=>{
if(!this.isOpenHomework) return if(!this.isOpenHomework) return
console.log(100)
this.initHomeWork() this.initHomeWork()
this.asyncAllFile()
this.isOpenHomework = false this.isOpenHomework = false
}) })
@ -475,10 +477,21 @@ export default {
} }
// key linkConfig.js // key linkConfig.js
let configObj = outLink()[key] let configObj = outLink()[key]
let fullPath = configObj.fullPath
// urlunitId ID
if(key != 'standard' && key != 'aiModel'){
let unitId = this.uploadData.levelSecondId ? this.uploadData.levelSecondId : this.uploadData.levelFirstId
if(key == 'gk'){
fullPath += `?unitId=${unitId}`
}
else{
fullPath += `&unitId=${unitId}`
}
}
// //
ipcRenderer.send('openWindow', { ipcRenderer.send('openWindow', {
key, key,
fullPath: configObj.fullPath, fullPath: fullPath,
cookieData: { ...configObj.data } cookieData: { ...configObj.data }
}) })
}, },
@ -551,10 +564,8 @@ export default {
res.rows[i].entpcourseworklistarray = [] res.rows[i].entpcourseworklistarray = []
} }
} }
//
let ary = uniqBy([...this.currentFileList, ...list], 'id')
// //
this.currentWorkList = cloneDeep(ary) this.currentWorkList = cloneDeep(list)
}) })
}, },
getWeekday1(date) { getWeekday1(date) {