Compare commits
16 Commits
ac599a2c39
...
274c80ad0a
Author | SHA1 | Date |
---|---|---|
朱浩 | 274c80ad0a | |
yangws | 923006eab1 | |
yangws | a64ba24742 | |
lyc | df1f8737bd | |
lyc | 19a3b948c5 | |
朱浩 | 622cdfe0fe | |
朱浩 | 78b795bf4f | |
lyc | 92667a7d25 | |
lyc | 71f7e4e5a1 | |
朱浩 | 3cced30959 | |
朱浩 | ef9fe838a3 | |
zhangxuelin | 9ff824e082 | |
zhangxuelin | 8975784ce0 | |
lyc | e586755b75 | |
lyc | ef771f4e0b | |
朱浩 | 049768c8b6 |
|
@ -3,7 +3,14 @@ import path from 'path'
|
||||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import WindiCSS from "vite-plugin-windicss"
|
import WindiCSS from "vite-plugin-windicss"
|
||||||
|
/*import electron from 'vite-plugin-electron'
|
||||||
|
plugins: [electron({
|
||||||
|
main: {
|
||||||
|
builderOptions: {
|
||||||
|
asar: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})],*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
main: {
|
main: {
|
||||||
plugins: [externalizeDepsPlugin()]
|
plugins: [externalizeDepsPlugin()]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"description": "An Electron application with Vue",
|
"description": "An Electron application with Vue",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
@ -45,10 +45,12 @@
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"jsondiffpatch": "0.6.0",
|
"jsondiffpatch": "0.6.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
"node-addon-api": "^8.1.0",
|
||||||
"pdfjs-dist": "4.4.168",
|
"pdfjs-dist": "4.4.168",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"spark-md5": "^3.0.2",
|
"spark-md5": "^3.0.2",
|
||||||
|
"vite-plugin-electron": "^0.28.8",
|
||||||
"vue-qr": "^4.0.9",
|
"vue-qr": "^4.0.9",
|
||||||
"vue-router": "^4.4.0",
|
"vue-router": "^4.4.0",
|
||||||
"xgplayer": "^3.0.19",
|
"xgplayer": "^3.0.19",
|
||||||
|
|
|
@ -21,6 +21,27 @@ File({ app, shell, BrowserWindow, ipcMain })
|
||||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
||||||
let mainWindow, loginWindow
|
let mainWindow, loginWindow
|
||||||
|
|
||||||
|
const additionalData = {myKey:'ys_axi_smarttalk'}
|
||||||
|
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
||||||
|
|
||||||
|
if(!gotTheLock){
|
||||||
|
app.quit()
|
||||||
|
}else{
|
||||||
|
app.on('second-instance',(event,commandLine,workingDirectory,additionalData)=>{
|
||||||
|
//输入从第二个实例中接收到的数据
|
||||||
|
console.log(additionalData)
|
||||||
|
//有人试图运行第二个实例,我们应该关注我们的窗口
|
||||||
|
if(mainWindow){
|
||||||
|
if(mainWindow.isMinimized()) mainWindow.restore()
|
||||||
|
mainWindow.focus()
|
||||||
|
}
|
||||||
|
if(loginWindow){
|
||||||
|
if(loginWindow.isMinimized()) loginWindow.restore()
|
||||||
|
loginWindow.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//登录窗口
|
//登录窗口
|
||||||
function createLoginWindow() {
|
function createLoginWindow() {
|
||||||
if (loginWindow) return
|
if (loginWindow) return
|
||||||
|
@ -53,7 +74,7 @@ function createLoginWindow() {
|
||||||
updateInit(loginWindow)
|
updateInit(loginWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
loginWindow.webContents.openDevTools()
|
// loginWindow.webContents.openDevTools()
|
||||||
loginWindow.once('ready-to-show', () => {
|
loginWindow.once('ready-to-show', () => {
|
||||||
loginWindow.show()
|
loginWindow.show()
|
||||||
})
|
})
|
||||||
|
@ -101,7 +122,7 @@ function createMainWindow() {
|
||||||
shell.openExternal(details.url)
|
shell.openExternal(details.url)
|
||||||
return { action: 'deny' }
|
return { action: 'deny' }
|
||||||
})
|
})
|
||||||
mainWindow.webContents.openDevTools()
|
// mainWindow.webContents.openDevTools()
|
||||||
|
|
||||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
||||||
|
|
|
@ -98,6 +98,8 @@ const emitChangeBook = async () => {
|
||||||
let curData = cloneDeep(toRaw(curNode.data))
|
let curData = cloneDeep(toRaw(curNode.data))
|
||||||
let parentNode = findParentByChildId(treeData.value, curData.id)
|
let parentNode = findParentByChildId(treeData.value, curData.id)
|
||||||
curData.parentNode = toRaw(parentNode)
|
curData.parentNode = toRaw(parentNode)
|
||||||
|
//怎加一个label 之前取的label
|
||||||
|
curData.label = curData.itemtitle
|
||||||
const data = {
|
const data = {
|
||||||
textBook: {
|
textBook: {
|
||||||
curBookId: curBook.data.id,
|
curBookId: curBook.data.id,
|
||||||
|
@ -107,6 +109,19 @@ const emitChangeBook = async () => {
|
||||||
},
|
},
|
||||||
node: curData
|
node: curData
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 临时用 后续删除 unitId
|
||||||
|
*/
|
||||||
|
let levelFirstId = null
|
||||||
|
let levelSecondId = null
|
||||||
|
if (curData.parentNode) {
|
||||||
|
levelFirstId = curData.parentNode.id
|
||||||
|
levelSecondId = curData.id
|
||||||
|
} else {
|
||||||
|
levelFirstId = curData.id
|
||||||
|
levelSecondId = ''
|
||||||
|
}
|
||||||
|
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
|
||||||
emit('changeBook', data)
|
emit('changeBook', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +175,9 @@ const handleNodeClick = (data, node) => {
|
||||||
* data : 当前节点数据
|
* data : 当前节点数据
|
||||||
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
||||||
*/
|
*/
|
||||||
const nodeData = cloneDeep(toRaw(data));
|
let nodeData = cloneDeep(toRaw(data));
|
||||||
|
//怎加一个label 之前取的label
|
||||||
|
nodeData.label = nodeData.itemtitle
|
||||||
const parentNode = node.parent.data;
|
const parentNode = node.parent.data;
|
||||||
// parentNode 为数组 则点击的是一级节点
|
// parentNode 为数组 则点击的是一级节点
|
||||||
if (Array.isArray(parentNode)) {
|
if (Array.isArray(parentNode)) {
|
||||||
|
@ -183,6 +200,21 @@ const handleNodeClick = (data, node) => {
|
||||||
}
|
}
|
||||||
localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
|
localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
|
||||||
localStorage.setItem('curNode', JSON.stringify(nodeData))
|
localStorage.setItem('curNode', JSON.stringify(nodeData))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 临时用 后续删除 unitId
|
||||||
|
*/
|
||||||
|
let levelFirstId = null
|
||||||
|
let levelSecondId = null
|
||||||
|
if (nodeData.parentNode) {
|
||||||
|
levelFirstId = nodeData.parentNode.id
|
||||||
|
levelSecondId = nodeData.id
|
||||||
|
} else {
|
||||||
|
levelFirstId = nodeData.id
|
||||||
|
levelSecondId = ''
|
||||||
|
}
|
||||||
|
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
|
||||||
|
|
||||||
emit('nodeClick', curData)
|
emit('nodeClick', curData)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card style="width: 100%;height: 100%;overflow: auto">
|
<el-card style="width: 100%;height: 100%;overflow: auto">
|
||||||
<!-- <template #header>-->
|
<template #header>
|
||||||
<!-- <div class="card-header" style="text-align: left">-->
|
<div class="card-header" style="text-align: left">
|
||||||
<!-- <el-button type="primary" @click="addGroup">新建分组</el-button>-->
|
<el-button type="primary" @click="addGroup">新建分组</el-button>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </template>-->
|
</template>
|
||||||
<template v-if="groupList.length > 0">
|
<template v-if="groupList.length > 0">
|
||||||
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
|
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
|
||||||
<div class="groupList">
|
<div class="groupList">
|
||||||
|
|
|
@ -186,7 +186,8 @@
|
||||||
])
|
])
|
||||||
//选择的班级
|
//选择的班级
|
||||||
const classids = ref('')
|
const classids = ref('')
|
||||||
|
// 未加入的班级
|
||||||
|
const classesNotAMemberOf = ref([])
|
||||||
// 获取班级信息
|
// 获取班级信息
|
||||||
const getClassInfo = () => {
|
const getClassInfo = () => {
|
||||||
classList.value = []
|
classList.value = []
|
||||||
|
@ -199,13 +200,13 @@
|
||||||
});
|
});
|
||||||
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
||||||
//清除已有的班级
|
//清除已有的班级
|
||||||
let arr = [...response.rows]
|
classesNotAMemberOf.value = [...response.rows]
|
||||||
classList.value.forEach(item => {
|
classList.value.forEach(item => {
|
||||||
const currentIndex = arr.findIndex(items => items.id === item.id)
|
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
|
||||||
if(currentIndex) arr.splice(currentIndex, 1)
|
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
|
||||||
})
|
})
|
||||||
//这里获取组装所有班级
|
//这里获取组装所有班级
|
||||||
gradeTree.value = groupByCondition(arr, item => item.agekey);
|
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//将所有班级筛选成二级的数组
|
//将所有班级筛选成二级的数组
|
||||||
|
|
|
@ -211,12 +211,6 @@ const rules = reactive({
|
||||||
message: '请选择地址',
|
message: '请选择地址',
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
},],
|
},],
|
||||||
class:[ {
|
|
||||||
type:'array',
|
|
||||||
required: true,
|
|
||||||
message: '请选择班级',
|
|
||||||
trigger: 'change',
|
|
||||||
},],
|
|
||||||
discipline:[ {
|
discipline:[ {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -108,6 +108,12 @@ export default {
|
||||||
name: 'FileListItem',
|
name: 'FileListItem',
|
||||||
components: { FileImage },
|
components: { FileImage },
|
||||||
props: {
|
props: {
|
||||||
|
curNode: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function () {
|
default: function () {
|
||||||
|
@ -201,8 +207,8 @@ export default {
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
if (items.fileFlag === 'apt') {
|
||||||
console.log(items);
|
console.log(this.curNode);
|
||||||
const path="/teaching/aptindex?id="+items.fileId
|
const path="/teaching/aptindex?id="+items.fileId + "&cataId=" + this.curNode.id;
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
let fullPath = configObj.fullPath + path
|
let fullPath = configObj.fullPath + path
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
|
:curNode="currentNode"
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-start-class="startClass"
|
@on-start-class="startClass"
|
||||||
>
|
>
|
||||||
|
@ -115,13 +116,13 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="作业" name="作业">
|
<el-tab-pane label="作业" name="作业">
|
||||||
<div class="prepare-body-header">
|
<!-- <div class="prepare-body-header">
|
||||||
<div>
|
<div>
|
||||||
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
||||||
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
|
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
|
||||||
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
|
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="prepare-work-wrap">
|
<div class="prepare-work-wrap">
|
||||||
<file-list-item
|
<file-list-item
|
||||||
v-for="(item, index) in currentWorkList"
|
v-for="(item, index) in currentWorkList"
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
<Message class="Message"/>
|
<Message class="Message"/>
|
||||||
<span>用户邮箱</span>
|
<span>身份证号</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-align">{{ state.user.email }}</div>
|
<div class="right-align">{{ state.user.identity }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<Avatar class="Avatar"/>
|
<Avatar class="Avatar"/>
|
||||||
<span>所属角色</span>
|
<span>所属角色</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-align">{{ state.roleGroup }}</div>
|
<div class="right-align">{{ state.roleGroup || '教师' }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<el-form-item label="手机号码" prop="phonenumber">
|
<el-form-item label="手机号码" prop="phonenumber">
|
||||||
<el-input v-model="user.phonenumber" maxlength="11" />
|
<el-input v-model="user.phonenumber" maxlength="11" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="身份证号" prop="identity">
|
||||||
<el-input v-model="user.email" maxlength="50" />
|
<el-input v-model="user.identity" maxlength="50" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别" style="display: none">
|
||||||
<el-radio-group v-model="user.sex">
|
<el-radio-group v-model="user.sex">
|
||||||
<el-radio value="0">男</el-radio>
|
<el-radio value="0">男</el-radio>
|
||||||
<el-radio value="1">女</el-radio>
|
<el-radio value="1">女</el-radio>
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<el-form-item label="学段">
|
<el-form-item label="学段">
|
||||||
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
||||||
<template v-for="(item,index) in semesterList" :key="index">
|
<template v-for="(item,index) in semesterList" :key="index">
|
||||||
<el-radio :value="item.title">
|
<el-radio :value="item.label">
|
||||||
{{item.title }}
|
{{item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, getCurrentInstance,onMounted } from 'vue'
|
import { ref, getCurrentInstance,onMounted } from 'vue'
|
||||||
import {updateUserInfo } from '@/api/system/user'
|
import {updateUserInfo } from '@/api/system/user'
|
||||||
|
import {getDept } from '@/api/login'
|
||||||
import { listEvaluation } from '@/api/subject/index'
|
import { listEvaluation } from '@/api/subject/index'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
|
@ -60,21 +61,30 @@ const userStore = useUserStore()
|
||||||
const semesterList = ref([
|
const semesterList = ref([
|
||||||
{
|
{
|
||||||
id:1,
|
id:1,
|
||||||
title:'幼儿园'
|
label:'幼儿园'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:2,
|
id:2,
|
||||||
title:'小学'
|
label:'小学'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:3,
|
id:3,
|
||||||
title:'初中'
|
label:'初中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:4,
|
id:4,
|
||||||
title:'高中'
|
label:'高中'
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
// 获取学校所存在的学段
|
||||||
|
|
||||||
|
const getTheSection = () => {
|
||||||
|
getDept({deptId:userStore.user.deptId}).then(res => {
|
||||||
|
//获取该学校可以选择的学科
|
||||||
|
const arr = res.data.studying.split(',')
|
||||||
|
semesterList.value = semesterList.value.filter(items => {return arr.includes(items.label)}).map(item => item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
||||||
|
@ -159,5 +169,6 @@ const semeterChange = (item) => {
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
|
getTheSection()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
<div class="tool-bottom-all"
|
<div class="tool-bottom-all"
|
||||||
@mouseenter="mouseChange(0)" @mouseleave="mouseChange(1)">
|
@mouseenter="mouseChange(0)" @mouseleave="mouseChange(1)">
|
||||||
<div v-drag="{handle:'.tool-bottom-all', dragtime}"
|
<div v-drag="{handle:'.tool-bottom-all', dragtime}"
|
||||||
@v-drag-start="dragtime = Date.now()"
|
@v-drag-start="dragtime = Date.now()">
|
||||||
@v-drag-end="mouseChange(1)">
|
|
||||||
<div class="c-logo" @click="logoHandle" title="拖动 | 折叠 | 展开">
|
<div class="c-logo" @click="logoHandle" title="拖动 | 折叠 | 展开">
|
||||||
<el-image :src="logo" draggable="false" />
|
<el-image :src="logo" draggable="false" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue