工作台-edit

This commit is contained in:
lyc 2024-09-25 16:12:55 +08:00
parent 773d0c1957
commit eb78a80131
4 changed files with 77 additions and 61 deletions

View File

@ -88,9 +88,10 @@ function createLoginWindow() {
//主窗口
function createMainWindow() {
mainWindow = new BrowserWindow({
width: 1200,
minWidth: 1350,
width: 1350,
minWidth: 1200,
height: 700,
minHeight: 700,
show: false,
frame: false, // 无边框
autoHideMenuBar: true,
@ -118,6 +119,11 @@ function createMainWindow() {
}, 1000)
// app.quit() // 主窗口关闭-结束所有进程
})
mainWindow.on('resize', () => {
const { width, height } = mainWindow.getBounds();
mainWindow.webContents.send('minWinResize', { width, height });
});
mainWindow.webContents.setWindowOpenHandler((details) => {
shell.openExternal(details.url)
return { action: 'deny' }
@ -129,6 +135,7 @@ function createMainWindow() {
} else {
mainWindow.loadFile(join(__dirname, '../renderer/index.html'))
}
// mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口
// mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
// 第三步: 开启remote服务

View File

@ -70,10 +70,8 @@ import { ArrowDown } from '@element-plus/icons-vue'
import WindowTools from '@/components/window-tools/index.vue'
import useUserStore from '@/store/modules/user'
import { updateUserInfo } from '@/api/system/user'
import outLink from '@/utils/linkConfig'
import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index'
import { clearBookInfo } from '@/utils/ruoyi'
import { sessionStore } from '@/utils/store'
import { useToolState } from '@/store/modules/tool'

View File

@ -34,30 +34,15 @@
<script setup>
import { ref, onMounted } from 'vue'
import useUserStore from '@/store/modules/user'
import { getSelfReserv } from '@/api/classManage'
import { homeworklist } from '@/api/teaching/classwork'
import { getCurrentTime, getTomorrow } from '@/utils/date'
import ItemDialog from '@/views/classTask/container/item-dialog.vue'
const type = ref(-1)
const user = useUserStore().user
const loading = ref(false)
const classList = ref([])
const homeworkList = ref([])
const itemDialogRef = ref(null)
//
const getClass = async () => {
loading.value = true
try {
const res = await getSelfReserv()
let list = res.data || []
list.sort((a, b) => { if (a.status == '上课中') return -1; else return 0 })
classList.value = list.filter(item => item.status !== '已结束')
} finally {
loading.value = false
}
}
//
const getHomework = async () => {
loading.value = true
@ -98,16 +83,16 @@ const tagType = (time) => {
onMounted(() => {
// getClass()
getHomework()
})
</script>
<style lang="scss" scoped>
.desktop-work-item {
align-items: center;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.item-title {
height: 32px;
text-align: left;
@ -126,7 +111,7 @@ onMounted(() => {
border-radius: 5px;
padding: 10px 15px;
font-size: 13px;
height: calc(100% - 60px);
flex: 1;
.class-item {
justify-content: space-between;

View File

@ -1,40 +1,40 @@
<template>
<div class="page-desktop">
<el-row :gutter="20">
<el-col :span="17">
<el-row :gutter="20">
<el-col :span="item.span" v-for="item in menuList" :key="item.id">
<div class="desktop-item">
<div class="item-title">{{ item.name }}</div>
<div class="item-content">
<ul class="flex con-ul">
<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>
<span>{{ menu.name }}</span>
</li>
</ul>
<el-row :gutter="20" style="height: 100%;">
<el-col :span="17" class="desktop-left">
<el-row :gutter="20">
<el-col :span="item.span" v-for="item in menuList" :key="item.id">
<div class="desktop-item">
<div class="item-title">{{ item.name }}</div>
<div class="item-content">
<ul class="flex con-ul">
<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>
<span>{{ menu.name }}</span>
</li>
</ul>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="desktop-item">
<div class="item-title flex">
<span>教学进度</span>
</el-col>
</el-row>
<el-row style="height: 100%;">
<el-col :span="24">
<div class="desktop-item-chart">
<div class="item-title flex">
<span>教学进度</span>
</div>
<div class="item-content">
<div ref="chartDom" class="chart-box"></div>
</div>
</div>
<div class="item-content">
<div ref="chartDom" class="chart-box"></div>
</div>
</div>
</el-col>
</el-row>
</el-col>
<el-col :span="7">
<!--工作动态-->
<workTrend/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="7" style="flex: 1;">
<!--工作动态-->
<workTrend/>
</el-col>
</el-row>
</div>
</template>
@ -42,11 +42,12 @@
<script setup>
import { ref, onMounted, nextTick } from 'vue'
import { useRouter } from 'vue-router'
import * as echarts from 'echarts'
import workTrend from './container/work-trend.vue'
import outLink from '@/utils/linkConfig'
import * as echarts from 'echarts'
import { useGetSubject } from '@/hooks/useGetSubject'
import { sessionStore } from '@/utils/store'
import { debounce } from 'lodash'
const router = useRouter()
const { ipcRenderer } = window.electron || {}
@ -191,6 +192,10 @@ const clickMenu = ({isOuter, path, disabled, id}) =>{
}
}
ipcRenderer.on('minWinResize', debounce((e, data) =>{
chartInstance.resize()
}, 100))
onMounted(async ()=>{
await useGetSubject()
@ -250,7 +255,10 @@ onMounted(async ()=>{
.page-desktop{
height: 100%;
padding-top: 20px;
.desktop-left{
display: flex;
flex-direction: column;
}
.desktop-item{
margin-bottom: 20px;
.item-title{
@ -298,12 +306,30 @@ onMounted(async ()=>{
}
}
}
.chart-box{
height: 220px;
}
}
}
}
.desktop-item-chart{
height: 100%;
display: flex;
flex-direction: column;
.item-title{
height: 32px;
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
align-items: center;
}
.item-content{
background: #fff;
flex: 1;
.chart-box{
height: 100%;
}
}
}
</style>