跳转修改
This commit is contained in:
parent
40089a2cd0
commit
7845d0e0a1
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 = [
|
||||
{
|
||||
|
|
|
@ -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('//', '/')
|
||||
|
|
|
@ -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('//', '/')
|
||||
|
|
Loading…
Reference in New Issue