跳转修改

This commit is contained in:
lyc 2024-09-25 09:42:58 +08:00
parent 40089a2cd0
commit 7845d0e0a1
4 changed files with 4 additions and 31 deletions

View File

@ -7,7 +7,7 @@ export const useGetSubject = async () =>{
// user store
const userStore = useUserStore()
const { edustage, edusubject, userId } = userStore.user
const { edustage, edusubject } = userStore.user
// 章节List
const unitList = ref([])
// 教材List
@ -15,7 +15,6 @@ export const useGetSubject = async () =>{
// 单元章节树结构
let treeData = null
// 根据学科 + 学段 获取所有单元章节
const getSubjectUnit = async () =>{
if(sessionStore.get('subject.unitList')){
@ -33,7 +32,6 @@ export const useGetSubject = async () =>{
unitList.value = rows
sessionStore.set('subject.unitList', rows)
}
await getSubject()
}
@ -64,7 +62,6 @@ export const useGetSubject = async () =>{
curNode = treeData[0]
}
sessionStore.set('subject.curNode', curNode)
console.log(curNode,treeData)
}
}

View File

@ -86,30 +86,6 @@ const currentRoute = ref('')
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const userSubjectList = ref([])
const handleOutLink = (path, type, name) => {
if (!path) return
if (type === 'hash') {
router.push(path)
} else {
// key linkConfig.js
let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/')
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
let unitId = levelSecondId ? levelSecondId : levelFirstId
if (name == '教材分析' || name == '考试分析') {
fullPath += `?unitId=${unitId}`
}
//
ipcRenderer.send('openWindow', {
key: path,
fullPath: fullPath,
cookieData: { ...configObj.data }
})
}
}
const activeId = ref('/home')
const headerMenus = [
{

View File

@ -180,7 +180,7 @@ const clickMenu = ({isOuter, path, disabled, id}) =>{
fullPath += `?unitId=${id}&bookeId=${rootid}`
}
else{
fullPath += `&unitId=${id}&bookeId=${id}`
fullPath += `&unitId=${id}&bookeId=${rootid}`
}
}
fullPath = fullPath.replaceAll('//', '/')

View File

@ -207,8 +207,8 @@ export default {
},
openFileWin(items) {
if (items.fileFlag === 'apt') {
let curBook = JSON.parse(localStorage.getItem('curBook'))
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id;
const { id, rootid } = sessionStore.get('subject.curNode')
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + id + "&bookId=" + rootid;
let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/')