跳转修改

This commit is contained in:
lyc 2024-09-23 16:49:48 +08:00
parent 3dc36cbc34
commit 713a592bcf
1 changed files with 32 additions and 21 deletions

View File

@ -8,7 +8,7 @@
<div class="item-title">{{ item.name }}</div> <div class="item-title">{{ item.name }}</div>
<div class="item-content"> <div class="item-content">
<ul class="flex con-ul"> <ul class="flex con-ul">
<li v-for="menu in item.list" @click="clickMenu(menu)" class="flex item-menu" :class="menu.disabled ? 'menu-disabled' : ''"> <li v-for="menu in item.list" :key="menu.id" @click="clickMenu(menu)" class="flex item-menu" :class="menu.disabled ? 'menu-disabled' : ''">
<i class="iconfont" :class="menu.icon"></i> <i class="iconfont" :class="menu.icon"></i>
<span>{{ menu.name }}</span> <span>{{ menu.name }}</span>
</li> </li>
@ -63,23 +63,27 @@ const menuList = [{
name: '课标分析', name: '课标分析',
icon: 'icon-kecheng', icon: 'icon-kecheng',
isOuter: true, isOuter: true,
path: '/teaching/chatwithstandard' path: '/teaching/chatwithstandard',
id: '1-1'
}, },
{ {
name: '教材分析', name: '教材分析',
icon: 'icon-jiaocaixuanze', icon: 'icon-jiaocaixuanze',
isOuter: true, isOuter: true,
path: '/teaching/chatwithtextbook' path: '/teaching/chatwithtextbook?',
id: '1-2'
}, },
{ {
name: '考试分析', name: '考试分析',
icon: 'icon-kaoshi', icon: 'icon-kaoshi',
path: '/examReport' path: '/examReport',
id: '1-3'
}, },
{ {
name: '学情分析', name: '学情分析',
icon: 'icon-xueqingfenxi', icon: 'icon-xueqingfenxi',
disabled: true disabled: true,
id: '1-4'
}, },
// { // {
// name: '', // name: '',
@ -89,12 +93,14 @@ const menuList = [{
{ {
name: '教学实践', name: '教学实践',
icon: 'icon-jiaoxuefenxi', icon: 'icon-jiaoxuefenxi',
path: '/prepare' path: '/prepare',
id: '1-5'
}, },
{ {
name: '教学反思', name: '教学反思',
icon: 'icon-jiaoxuefansi', icon: 'icon-jiaoxuefansi',
disabled: true disabled: true,
id: '1-6'
}, },
] ]
}, },
@ -107,7 +113,8 @@ const menuList = [{
name: '作业设计', name: '作业设计',
icon: 'icon-jiaoxuefansi', icon: 'icon-jiaoxuefansi',
isOuter: true, isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' path: '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask',
id: '2-1'
//path: '/newClassTask' //path: '/newClassTask'
//path: '/classTaskAssign' //path: '/classTaskAssign'
//isOuter: true, //isOuter: true,
@ -117,17 +124,20 @@ const menuList = [{
name: '作业布置', name: '作业布置',
icon: 'icon-xiezuo1', icon: 'icon-xiezuo1',
isOuter: true, isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置' path: '/teaching/classtaskassign?titleName=作业布置?',
id: '2-2'
}, },
{ {
name: '作业批改', name: '作业批改',
icon: 'icon-pigai', icon: 'icon-pigai',
path: '/classTask' path: '/classTask',
id: '2-3'
}, },
{ {
name: '作业统计', name: '作业统计',
icon: 'icon-tongji', icon: 'icon-tongji',
disabled: true disabled: true,
id: '2-4'
}, },
] ]
}, },
@ -139,44 +149,45 @@ const menuList = [{
{ {
name: '教学计划', name: '教学计划',
icon: 'icon-jiaoxuejihua', icon: 'icon-jiaoxuejihua',
disabled: true disabled: true,
id: '3-1'
}, },
{ {
name: '教学组织', name: '教学组织',
icon: 'icon-organization-framework-line', icon: 'icon-organization-framework-line',
disabled: true disabled: true,
id: '3-2'
}, },
{ {
name: '教学质量', name: '教学质量',
icon: 'icon-jiaoxuezhiliangfenxi', icon: 'icon-jiaoxuezhiliangfenxi',
disabled: true disabled: true,
id: '3-3'
}, },
{ {
name: '教学反馈', name: '教学反馈',
icon: 'icon-fankui', icon: 'icon-fankui',
disabled: true disabled: true,
id: '3-4'
}, },
] ]
} }
] ]
const clickMenu = ({isOuter, path, disabled}) =>{ const clickMenu = ({isOuter, path, disabled, id}) =>{
if(disabled) return if(disabled) return
// //
if(isOuter){ if(isOuter){
let configObj = outLink().getBaseData() let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path let fullPath = configObj.fullPath + path
if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){ if(id == '1-2' || id == '2-1' || id == '2-2' ){
// ID // ID
const { levelFirstId, levelSecondId, bookeId } = JSON.parse(localStorage.getItem('unitId')) const { levelFirstId, levelSecondId, bookeId } = JSON.parse(localStorage.getItem('unitId'))
let unitId = levelSecondId ? levelSecondId : levelFirstId let unitId = levelSecondId ? levelSecondId : levelFirstId
fullPath = fullPath + `&unitId=${unitId}&bookeId=${bookeId}` fullPath = fullPath + `&unitId=${unitId}&bookeId=${bookeId}`
console.log(fullPath)
} }
fullPath = fullPath.replaceAll('//', '/') fullPath = fullPath.replaceAll('//', '/')
console.log(fullPath)
// //
ipcRenderer.send('openWindow', { ipcRenderer.send('openWindow', {
key: path, key: path,