Compare commits
No commits in common. "c957961a0bfa9c8208ef9696925b4e24972b6faf" and "26576ad086dde7a0eb06b582cb87c150c1f2eb8d" have entirely different histories.
c957961a0b
...
26576ad086
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = AIX智慧课堂
|
VITE_APP_TITLE = 文枢课堂
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 文枢课堂
|
VITE_APP_TITLE = AIX智慧课堂
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
appId: com.electron.app
|
appId: com.electron.app
|
||||||
productName: AIx
|
productName: 文枢课堂
|
||||||
directories:
|
directories:
|
||||||
output: dist
|
output: dist
|
||||||
buildResources: build
|
buildResources: build
|
||||||
win:
|
win:
|
||||||
executableName: AIx
|
executableName: 文枢课堂
|
||||||
icon: resources/logo2.ico
|
icon: resources/logo2.ico
|
||||||
files:
|
files:
|
||||||
- '!**/.vscode/*'
|
- '!**/.vscode/*'
|
|
@ -1,10 +1,10 @@
|
||||||
appId: com.electron.app
|
appId: com.electron.app
|
||||||
productName: 文枢课堂
|
productName: AIx
|
||||||
directories:
|
directories:
|
||||||
output: dist
|
output: dist
|
||||||
buildResources: build
|
buildResources: build
|
||||||
win:
|
win:
|
||||||
executableName: 文枢课堂
|
executableName: AIx
|
||||||
icon: resources/logo2.ico
|
icon: resources/logo2.ico
|
||||||
files:
|
files:
|
||||||
- '!**/.vscode/*'
|
- '!**/.vscode/*'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.1",
|
"version": "2.0.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
|
|
@ -273,14 +273,9 @@ function handleAll() {
|
||||||
})
|
})
|
||||||
// 用于监听-状态管理变化-同步所有窗口
|
// 用于监听-状态管理变化-同步所有窗口
|
||||||
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
||||||
console.log('pinia-state-change-1', storeName, jsonStr)
|
|
||||||
|
|
||||||
for(const curWin of BrowserWindow.getAllWindows()){
|
for(const curWin of BrowserWindow.getAllWindows()){
|
||||||
const id = curWin.webContents.id
|
const id = curWin.webContents.id
|
||||||
const bool = id !== e.sender.id && !curWin.isDestroyed()
|
const bool = id !== e.sender.id && !curWin.isDestroyed()
|
||||||
if (id === e.sender.id) {
|
|
||||||
console.log('pinia-state-change-2', 'windows-send', curWin.type)
|
|
||||||
}
|
|
||||||
if (bool) { // 除了消息发送窗口和销毁的窗口 其他都发送
|
if (bool) { // 除了消息发送窗口和销毁的窗口 其他都发送
|
||||||
curWin.webContents.send('pinia-state-set', storeName, jsonStr)
|
curWin.webContents.send('pinia-state-set', storeName, jsonStr)
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="change-tab">
|
<div class="change-tab">
|
||||||
<ul class="flex">
|
<ul class="flex">
|
||||||
<li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']"
|
<li
|
||||||
v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)">
|
v-for="(item, index) in routeHeader.nowRouter"
|
||||||
<i class="iconfont" :class="menu.icon"></i>
|
:key="index"
|
||||||
<span class="text">{{ menu.name }}</span>
|
class="flex"
|
||||||
|
:style="{'color' : item.color}"
|
||||||
|
:class="currentRoute === item.url ? 'active-li' : ''"
|
||||||
|
@click="handleOutLink(item.url,item.type, item.name)"
|
||||||
|
>
|
||||||
|
<i :class="item.img"></i>
|
||||||
|
<span class="text">{{ item.name }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,9 +25,14 @@
|
||||||
<div class="right-section flex">
|
<div class="right-section flex">
|
||||||
<WindowTools />
|
<WindowTools />
|
||||||
<div class="user flex">
|
<div class="user flex">
|
||||||
|
|
||||||
<div class="avatar-container">
|
<div class="avatar-container">
|
||||||
<div class="avatar-wrapper flex">
|
<el-dropdown
|
||||||
<el-dropdown class="right-menu-item hover-effect" @command="handleCommand">
|
class="right-menu-item hover-effect"
|
||||||
|
trigger="click"
|
||||||
|
@command="handleCommand"
|
||||||
|
>
|
||||||
|
<div class="avatar-wrapper">
|
||||||
<img :src="dev_api + userStore.user.avatar" class="user-avatar" style="float: left" />
|
<img :src="dev_api + userStore.user.avatar" class="user-avatar" style="float: left" />
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
@ -54,8 +65,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="user-depname">{{ userStore.user.deptName }}</div>
|
<div class="user-depname">{{ userStore.user.deptName }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item @click="changePage('/testpdf')">测试页面</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="changePage('/classReserv')">课程预约</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
|
||||||
|
<el-dropdown-item divided command="logout">
|
||||||
|
<span>退出登录</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,13 +83,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import { ArrowDown } from '@element-plus/icons-vue'
|
import { ArrowDown } from '@element-plus/icons-vue'
|
||||||
import WindowTools from '@/components/window-tools/index.vue'
|
import WindowTools from '@/components/window-tools/index.vue'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { updateUserInfo } from '@/api/system/user'
|
import routerStore from '@/store/modules/route'
|
||||||
import outLink from '@/utils/linkConfig'
|
import outLink from '@/utils/linkConfig'
|
||||||
import logoIco from '@/assets/images/logo.png'
|
import logoIco from '@/assets/images/logo.png'
|
||||||
import { listEvaluation } from '@/api/classManage/index'
|
import { listEvaluation } from '@/api/classManage/index'
|
||||||
|
@ -84,21 +104,19 @@ const userStore = useUserStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const currentRoute = ref('')
|
const currentRoute = ref('')
|
||||||
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
||||||
const userSubjectList = ref([])
|
|
||||||
|
|
||||||
const handleOutLink = (path, type, name) => {
|
const handleOutLink = (path, type, name) => {
|
||||||
if (!path) return
|
if (!path) return
|
||||||
if (type === 'hash') {
|
if (type === 'hash') {
|
||||||
router.push(path)
|
router.push(path)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
// key 对应的 linkConfig.js 外部链接配置
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
let fullPath = configObj.fullPath + path
|
let fullPath = configObj.fullPath + path
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
|
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
|
||||||
let unitId = levelSecondId ? levelSecondId : levelFirstId
|
let unitId = levelSecondId ? levelSecondId :levelFirstId
|
||||||
if (name == '教材分析' || name == '考试分析') {
|
if(name == '教材分析' || name == '高考研究'){
|
||||||
fullPath += `?unitId=${unitId}`
|
fullPath += `?unitId=${unitId}`
|
||||||
}
|
}
|
||||||
// 通知主进程
|
// 通知主进程
|
||||||
|
@ -109,47 +127,34 @@ const handleOutLink = (path, type, name) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*const menus = ref([
|
||||||
const activeId = ref('/home')
|
|
||||||
const headerMenus = [
|
|
||||||
{
|
{
|
||||||
name: '工作台',
|
icon: 'icon-zhuye2 icon-homepage',
|
||||||
id: 1,
|
name: '主页',
|
||||||
icon: 'icon-gongzuotai',
|
path: '/homepage'
|
||||||
path: '/home'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '研究室',
|
icon: 'icon-jiaoxueziyuan icon-resource',
|
||||||
id: 2,
|
name: '资源',
|
||||||
icon: 'icon-yanjiushi',
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '资源库',
|
|
||||||
id: 3,
|
|
||||||
icon: 'icon-saoyisao',
|
|
||||||
path: '/resource'
|
path: '/resource'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '朋友圈',
|
icon: 'icon-beike icon-prepare',
|
||||||
id: 4,
|
name: '备课',
|
||||||
icon: 'icon-pengyouquan1',
|
path: '/prepare'
|
||||||
disabled: true
|
},
|
||||||
|
{
|
||||||
|
icon: 'icon-jiangke1 icon-teach',
|
||||||
|
name: '授课',
|
||||||
|
path: '/teach'
|
||||||
}
|
}
|
||||||
]
|
])*/
|
||||||
|
|
||||||
const clickMenu = ({ id, disabled, path }) => {
|
|
||||||
if (disabled) return
|
|
||||||
activeId.value = id
|
|
||||||
router.push(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 监听当前路由
|
// 监听当前路由
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value,
|
() => router.currentRoute.value,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
currentRoute.value = newValue
|
currentRoute.value = newValue.path
|
||||||
activeId.value = newValue.path
|
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
@ -190,48 +195,20 @@ function logout() {
|
||||||
ipcRenderer && ipcRenderer.send('openLoginWindow')
|
ipcRenderer && ipcRenderer.send('openLoginWindow')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => { })
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const emits = defineEmits(['setLayout'])
|
const emits = defineEmits(['setLayout'])
|
||||||
function setLayout() {
|
function setLayout() {
|
||||||
emits('setLayout')
|
emits('setLayout')
|
||||||
}
|
}
|
||||||
// 切换学科
|
|
||||||
const changeSubject = async (command) =>{
|
|
||||||
clearBookInfo()
|
|
||||||
const { userId, userName, phonenumber, plainpwd } = userStore.user
|
|
||||||
const data = {
|
|
||||||
userId,
|
|
||||||
userName,
|
|
||||||
edustage: command.edustage,
|
|
||||||
edusubject: command.edusubject
|
|
||||||
}
|
|
||||||
await updateUserInfo(data)
|
|
||||||
await userStore.login({username: phonenumber, password: plainpwd})
|
|
||||||
await userStore.getInfo()
|
|
||||||
router.go()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取学科
|
|
||||||
const getAllSubject = async () => {
|
|
||||||
const { rows } = await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
|
||||||
if(!userStore.user.subject) return
|
|
||||||
const subject = userStore.user.subject.split(',')
|
|
||||||
userSubjectList.value = rows.filter(item =>
|
|
||||||
subject.some(el => item.id == el)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getAllSubject()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.title-bar {
|
.title-bar {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
background: #ebf0f9;
|
||||||
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
@ -239,22 +216,8 @@ onMounted(() => {
|
||||||
|
|
||||||
.left-section {
|
.left-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 50%;
|
|
||||||
|
|
||||||
.title-box {
|
|
||||||
padding-top: 8px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 20px;
|
width: 50%;
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #4b73df;
|
|
||||||
font-size: 13px;
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.change-tab {
|
.change-tab {
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
|
@ -262,18 +225,18 @@ onMounted(() => {
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
li {
|
li {
|
||||||
|
padding: 3px 13px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 0 10px;
|
margin: 0 5px;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size: 26px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-resource {
|
.icon-resource {
|
||||||
|
@ -293,20 +256,12 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #409eff;
|
background: #d3e3fb;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
cursor: not-allowed;
|
|
||||||
color: #bfbfbf;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #bfbfbf;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.active-li {
|
.active-li {
|
||||||
|
background: #d3e3fb;
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,7 +271,11 @@ onMounted(() => {
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #4b73df;
|
||||||
|
font-size: 18px;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-section {
|
.right-section {
|
||||||
|
@ -328,25 +287,11 @@ onMounted(() => {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.user {
|
.user {
|
||||||
padding-right: 10px;
|
|
||||||
|
|
||||||
.user-info {
|
.user-info {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 100%;
|
|
||||||
justify-content: space-around;
|
|
||||||
|
|
||||||
.user-depname {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-subject {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,12 +301,12 @@ onMounted(() => {
|
||||||
|
|
||||||
.avatar-wrapper {
|
.avatar-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 45px;
|
width: 30px;
|
||||||
height: 45px;
|
height: 30px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
margin-top: 8px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,7 @@ export default {
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
if (items.fileFlag === 'apt') {
|
||||||
|
console.log(this.curNode);
|
||||||
let curBook = JSON.parse(localStorage.getItem('curBook'))
|
let curBook = JSON.parse(localStorage.getItem('curBook'))
|
||||||
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id;
|
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id;
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
|
|
Loading…
Reference in New Issue