Compare commits
No commits in common. "d1ab430a6c1b3937d8e26e25e5be224788ea6cfd" and "7f9afedef91e477e56a667b19d7d4d57f5e818d8" have entirely different histories.
d1ab430a6c
...
7f9afedef9
19
.env.lt
19
.env.lt
|
@ -1,19 +0,0 @@
|
||||||
# 页面标题
|
|
||||||
VITE_APP_TITLE = 文枢课堂
|
|
||||||
|
|
||||||
# 生产环境配置
|
|
||||||
VITE_APP_ENV = 'production'
|
|
||||||
|
|
||||||
# AIx融合数字管理系统/生产环境
|
|
||||||
VITE_APP_BASE_API = 'https://prev.ysaix.com:7868/prod-api'
|
|
||||||
|
|
||||||
VITE_APP_DOMAIN = 'prev.ysaix.com'
|
|
||||||
|
|
||||||
VITE_APP_UPLOAD_API = 'https://prev.ysaix.com:7868/prod-api'
|
|
||||||
|
|
||||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
|
||||||
VITE_BUILD_COMPRESS = gzip
|
|
||||||
|
|
||||||
VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/'
|
|
||||||
|
|
||||||
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = AIX智慧课堂
|
VITE_APP_TITLE = AIx数字平台
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
appId: com.electron.app
|
|
||||||
productName: 文枢课堂
|
|
||||||
directories:
|
|
||||||
output: dist
|
|
||||||
buildResources: build
|
|
||||||
win:
|
|
||||||
executableName: 文枢课堂
|
|
||||||
icon: resources/logo2.ico
|
|
||||||
files:
|
|
||||||
- '!**/.vscode/*'
|
|
||||||
- '!src/*'
|
|
||||||
- '!electron.vite.config.{js,ts,mjs,cjs}'
|
|
||||||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
|
||||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
|
||||||
asarUnpack:
|
|
||||||
- resources/**
|
|
||||||
nsis:
|
|
||||||
oneClick: false
|
|
||||||
allowToChangeInstallationDirectory: true
|
|
||||||
artifactName: ${name}-${version}-setup.${ext}
|
|
||||||
shortcutName: ${productName}
|
|
||||||
uninstallDisplayName: ${productName}
|
|
||||||
createDesktopShortcut: always
|
|
||||||
mac:
|
|
||||||
entitlementsInherit: build/entitlements.mac.plist
|
|
||||||
extendInfo:
|
|
||||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
|
||||||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
|
||||||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
|
||||||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
|
||||||
notarize: false
|
|
||||||
dmg:
|
|
||||||
artifactName: ${name}-${version}.${ext}
|
|
||||||
linux:
|
|
||||||
target:
|
|
||||||
- AppImage
|
|
||||||
- snap
|
|
||||||
- deb
|
|
||||||
maintainer: electronjs.org
|
|
||||||
category: Utility
|
|
||||||
appImage:
|
|
||||||
artifactName: ${name}-${version}.${ext}
|
|
||||||
npmRebuild: false
|
|
||||||
publish:
|
|
||||||
provider: generic
|
|
||||||
url: https://prev.ysaix.com:7868/src/assets/smarttalk/
|
|
||||||
electronDownload:
|
|
||||||
mirror: https://npmmirror.com/mirrors/electron/
|
|
||||||
# 额外依赖打包到输出目录
|
|
||||||
extraFiles:
|
|
||||||
- from: ./node_modules/im_electron_sdk/lib/
|
|
||||||
to: ./resources
|
|
||||||
filter:
|
|
||||||
- '**/*'
|
|
|
@ -3,14 +3,7 @@ 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,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.0.6",
|
"version": "1.2.3",
|
||||||
"description": "",
|
"description": "An Electron application with Vue",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
"homepage": "https://electron-vite.org",
|
"homepage": "https://electron-vite.org",
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
"build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
|
"build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
|
||||||
"build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml",
|
"build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml",
|
||||||
"build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
|
"build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
|
||||||
"build:lt": "electron-vite build --mode lt && electron-builder --win --config ./electron-builder-lt.yml",
|
|
||||||
"build:mac": "npm run build && electron-builder --mac",
|
"build:mac": "npm run build && electron-builder --mac",
|
||||||
"build:linux": "npm run build && electron-builder --linux"
|
"build:linux": "npm run build && electron-builder --linux"
|
||||||
},
|
},
|
||||||
|
@ -46,12 +45,10 @@
|
||||||
"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,27 +21,6 @@ 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
|
||||||
|
@ -74,7 +53,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()
|
||||||
})
|
})
|
||||||
|
@ -122,7 +101,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'])
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<div class="book-wrap">
|
<div class="book-wrap">
|
||||||
<el-scrollbar height="100%">
|
<el-scrollbar height="100%">
|
||||||
<div class="book-name flex" @click="dialogVisible = true">
|
<div class="book-name flex" @click="dialogVisible = true">
|
||||||
<span>{{ curBook.data.itemtitle }}</span>
|
<span>{{ curBookName }}</span>
|
||||||
<i class="iconfont icon-xiangyou"></i>
|
<i class="iconfont icon-xiangyou"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="book-list" v-loading="treeLoading">
|
<div class="book-list" v-loading="treeLoading">
|
||||||
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id"
|
<el-tree ref="refTree" :data="treeData" :props="defaultProps" node-key="id"
|
||||||
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
|
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNodeId" highlight-current
|
||||||
@node-click="handleNodeClick">
|
@node-click="handleNodeClick">
|
||||||
<template #default="{ node }">
|
<template #default="{ node }">
|
||||||
<span :title="node.label" class="tree-label">{{ node.label }}</span>
|
<span :title="node.label" class="tree-label">{{ node.label }}</span>
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
|
|
||||||
<div class="textbook-container">
|
<div class="textbook-container">
|
||||||
<el-scrollbar height="450px">
|
<el-scrollbar height="450px">
|
||||||
<div class="textbook-item flex" v-for="item in subjectList" :class="curBook.data.id == item.id ? 'active-item' : ''"
|
<div class="textbook-item flex" v-for="item in subjectList" :class="curBookId == item.id ? 'active-item' : ''"
|
||||||
:key="item.id" @click="changeBook(item)">
|
:key="item.id" @click="changeBook(item)">
|
||||||
<img v-if="item.avartar" :src="item.avartar.indexOf('http') === 0 ? item.avartar : BaseUrl + item.avartar" class="textbook-img" alt="">
|
<img v-if="item.avartar" :src="BaseUrl + item.avartar" class="textbook-img" alt="">
|
||||||
<div v-else class="textbook-img">
|
<div v-else class="textbook-img">
|
||||||
<i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i>
|
<i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,86 +43,146 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, nextTick, toRaw, reactive } from 'vue';
|
import { onMounted, ref, nextTick, toRaw, reactive } from 'vue';
|
||||||
import { cloneDeep } from 'lodash'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { useGetSubject } from '@/hooks/useGetSubject'
|
import { listEvaluation } from '@/api/subject'
|
||||||
|
|
||||||
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['nodeClick', 'changeBook'])
|
const emit = defineEmits(['nodeClick', 'changeBook'])
|
||||||
let useSubject = null
|
// store
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const { edustage, edusubject, userId } = userStore.user
|
||||||
|
//
|
||||||
const subjectList = ref([])
|
const subjectList = ref([])
|
||||||
|
const evaluationList = ref([])
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
// 当前教材下面单元内容数据
|
// 当前教材下面单元内容数据
|
||||||
const treeData = ref([])
|
const treeData = ref([])
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'itemtitle',
|
label: 'label',
|
||||||
class: 'textbook-tree'
|
class: 'textbook-tree'
|
||||||
}
|
}
|
||||||
// 当前选中的教材
|
|
||||||
const curBook = reactive({
|
const treeLoading = ref(false)
|
||||||
data: {}
|
//当前教材ID
|
||||||
})
|
const curBookId = ref(-1)
|
||||||
|
//当前教材名称
|
||||||
|
const curBookName = ref('')
|
||||||
|
//当前教材封面图
|
||||||
|
const curBookImg = ref('')
|
||||||
|
//当前教材文件路径
|
||||||
|
const curBookPath = ref('')
|
||||||
|
// 上册
|
||||||
|
const volumeOne = ref([])
|
||||||
|
//
|
||||||
|
const volumeTwo = ref([])
|
||||||
|
|
||||||
// 当前节点
|
// 当前节点
|
||||||
const curNode = reactive({
|
const currentNode = reactive({
|
||||||
data:{}
|
data:{}
|
||||||
})
|
})
|
||||||
const treeLoading = ref(false)
|
// 当前选中的节点ID
|
||||||
|
const currentNodeId = ref(0)
|
||||||
|
// 当前选中的节点名称
|
||||||
|
const currentNodeName = ref('')
|
||||||
// 默认展开的节点
|
// 默认展开的节点
|
||||||
const defaultExpandedKeys = ref([])
|
const defaultExpandedKeys = ref([])
|
||||||
|
// tree
|
||||||
|
const refTree = ref(null)
|
||||||
|
|
||||||
|
|
||||||
|
//获取教材下面的单元 + 章节
|
||||||
|
const getSubjectContent = async () => {
|
||||||
|
treeLoading.value = true
|
||||||
|
const params = {
|
||||||
|
edusubject,
|
||||||
|
edustage,
|
||||||
|
// entpcourseedituserid: userId,
|
||||||
|
itemgroup: 'textbook',
|
||||||
|
orderby: 'orderidx asc',
|
||||||
|
pageSize: 10000
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(localStorage.getItem('evaluationList')){
|
||||||
|
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const { rows } = await listEvaluation(params)
|
||||||
|
localStorage.setItem('evaluationList', JSON.stringify(rows))
|
||||||
|
evaluationList.value = rows
|
||||||
|
}
|
||||||
|
|
||||||
|
treeLoading.value = false
|
||||||
|
|
||||||
|
//获取教材版本
|
||||||
|
await getSubject()
|
||||||
|
//上册
|
||||||
|
/**
|
||||||
|
* 不区分上下册
|
||||||
|
* 2024/08/20调整
|
||||||
|
*/
|
||||||
|
// volumeOne.value = data.filter(item => item.level == 1 && item.semester == '上册')
|
||||||
|
// volumeTwo.value = data.filter(item => item.level == 1 && item.semester == '下册')
|
||||||
|
getTreeData()
|
||||||
|
}
|
||||||
|
|
||||||
//选择教材
|
//选择教材
|
||||||
const changeBook = (data) => {
|
const changeBook = ({ id, itemtitle, avartar, fileurl }) => {
|
||||||
curBook.data = data
|
curBookId.value = id
|
||||||
|
curBookName.value = itemtitle
|
||||||
localStorage.setItem('curBook', JSON.stringify(data))
|
curBookImg.value = BaseUrl + avartar
|
||||||
treeData.value = useSubject.getTreeData(data.id)
|
curBookPath.value = fileurl
|
||||||
|
getTreeData()
|
||||||
//切换教材后默认展开第一个并选中
|
|
||||||
nextTick(() =>{
|
|
||||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
|
||||||
curNode.data = getLastLevelData(treeData.value)[0]
|
|
||||||
|
|
||||||
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
|
|
||||||
localStorage.setItem('curNode',JSON.stringify(curNode.data))
|
|
||||||
emitChangeBook()
|
|
||||||
})
|
|
||||||
// 延迟关闭 视觉上选中
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTreeData = () => {
|
||||||
|
//数据过滤
|
||||||
|
let upData = transData(evaluationList.value)
|
||||||
|
|
||||||
|
|
||||||
|
if(upData.length){
|
||||||
|
treeData.value = [...upData]
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
treeData.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
defaultExpandedKeys.value = [treeData.value[0].id]
|
||||||
|
currentNode.data = getLastLevelData(treeData.value)[0]
|
||||||
|
currentNodeId.value = getLastLevelData(treeData.value)[0].id
|
||||||
|
currentNodeName.value = getLastLevelData(treeData.value)[0].label
|
||||||
|
emitChangeBook()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const emitChangeBook = () => {
|
||||||
|
let curNode = {
|
||||||
|
id: currentNodeId.value,
|
||||||
|
label: currentNodeName.value,
|
||||||
|
itemtitle: currentNode.data.itemtitle,
|
||||||
|
edudegree: currentNode.data.edudegree,
|
||||||
|
edustage: currentNode.data.edustage,
|
||||||
|
edusubject: currentNode.data.edusubject,
|
||||||
|
}
|
||||||
|
let parentNode = findParentByChildId(treeData.value, currentNodeId.value)
|
||||||
|
curNode.parentNode = toRaw(parentNode)
|
||||||
|
|
||||||
const emitChangeBook = async () => {
|
|
||||||
let curData = cloneDeep(toRaw(curNode.data))
|
|
||||||
let parentNode = findParentByChildId(treeData.value, curData.id)
|
|
||||||
curData.parentNode = toRaw(parentNode)
|
|
||||||
//怎加一个label 之前取的label
|
|
||||||
curData.label = curData.itemtitle
|
|
||||||
const data = {
|
const data = {
|
||||||
textBook: {
|
textBook: {
|
||||||
curBookId: curBook.data.id,
|
curBookId: curBookId.value,
|
||||||
curBookName: curBook.data.itemtitle,
|
curBookName: curBookName.value,
|
||||||
curBookImg: BaseUrl + curBook.data.avartar,
|
curBookImg: curBookImg.value,
|
||||||
curBookPath: curBook.data.fileurl
|
curBookPath: curBookPath.value
|
||||||
},
|
},
|
||||||
node: curData
|
node: curNode
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 临时用 后续删除 unitId
|
|
||||||
*/
|
|
||||||
let levelFirstId = null
|
|
||||||
let levelSecondId = null
|
|
||||||
let bookeId = curBook.data.id
|
|
||||||
if (curData.parentNode) {
|
|
||||||
levelFirstId = curData.parentNode.id
|
|
||||||
levelSecondId = curData.id
|
|
||||||
} else {
|
|
||||||
levelFirstId = curData.id
|
|
||||||
levelSecondId = ''
|
|
||||||
}
|
|
||||||
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
|
|
||||||
emit('changeBook', data)
|
emit('changeBook', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,95 +230,101 @@ const findParentByChildId = (treeData, targetNodeId) => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transData = (data) => {
|
||||||
|
let ary = []
|
||||||
|
data.forEach(item => {
|
||||||
|
let obj = {}
|
||||||
|
// 根据当前教材ID 过滤出对应的单元、章节
|
||||||
|
if (item.rootid == curBookId.value) {
|
||||||
|
if(item.level == 1){
|
||||||
|
obj.label = item.itemtitle
|
||||||
|
obj.id = item.id
|
||||||
|
obj.itemtitle = item.itemtitle
|
||||||
|
obj.edudegree = item.edudegree
|
||||||
|
obj.edustage = item.edustage
|
||||||
|
obj.edusubject = item.edusubject
|
||||||
|
let ary2 = []
|
||||||
|
evaluationList.value.forEach(el => {
|
||||||
|
let obj2 = {}
|
||||||
|
if (item.id == el.parentid) {
|
||||||
|
obj2 = {
|
||||||
|
label: el.itemtitle,
|
||||||
|
id: el.id,
|
||||||
|
itemtitle : el.itemtitle,
|
||||||
|
edudegree : el.edudegree,
|
||||||
|
edustage : el.edustage,
|
||||||
|
edusubject : el.edusubject,
|
||||||
|
}
|
||||||
|
ary2.push(obj2)
|
||||||
|
}
|
||||||
|
obj.children = ary2
|
||||||
|
})
|
||||||
|
ary.push(obj)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return ary
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取教材
|
||||||
|
const getSubject = async () => {
|
||||||
|
if(localStorage.getItem('subjectList')){
|
||||||
|
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000,orderby: 'orderidx asc', })
|
||||||
|
|
||||||
|
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
|
||||||
|
subjectList.value = rows
|
||||||
|
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认第一个
|
||||||
|
if(!subjectList.value.length) return
|
||||||
|
curBookName.value = subjectList.value[0].itemtitle
|
||||||
|
curBookId.value = subjectList.value[0].id
|
||||||
|
curBookImg.value = BaseUrl + subjectList.value[0].avartar
|
||||||
|
curBookPath.value = subjectList.value[0].fileurl
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const isHaveUnit = (id) => {
|
||||||
|
return evaluationList.value.some(item => {
|
||||||
|
return item.rootid == id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleNodeClick = (data, node) => {
|
const handleNodeClick = (data, node) => {
|
||||||
/**
|
/**
|
||||||
* data : 当前节点数据
|
* data : 当前节点数据
|
||||||
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
||||||
*/
|
*/
|
||||||
let nodeData = cloneDeep(toRaw(data));
|
|
||||||
//怎加一个label 之前取的label
|
const nodeData = data;
|
||||||
nodeData.label = nodeData.itemtitle
|
|
||||||
const parentNode = node.parent.data;
|
const parentNode = node.parent.data;
|
||||||
// parentNode 为数组 则点击的是一级节点
|
|
||||||
if (Array.isArray(parentNode)) {
|
if (Array.isArray(parentNode)) {
|
||||||
//
|
|
||||||
nodeData.parentNode = null
|
nodeData.parentNode = null
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 否则 点击的为二级节点 parentNode 为它的父级节点
|
nodeData.parentNode = parentNode
|
||||||
nodeData.parentNode = toRaw(parentNode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let curData = {
|
let curData = {
|
||||||
textBook: {
|
textBook: {
|
||||||
curBookId: curBook.data.id,
|
curBookId: curBookId.value,
|
||||||
curBookName: curBook.data.itemtitle,
|
curBookName: curBookName.value,
|
||||||
curBookImg: BaseUrl + curBook.data.avartar,
|
curBookImg: curBookImg.value,
|
||||||
curBookPath: curBook.data.fileurl
|
curBookPath: curBookPath.value
|
||||||
},
|
},
|
||||||
node: toRaw(nodeData)
|
node: toRaw(nodeData)
|
||||||
}
|
}
|
||||||
localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
|
currentNode.data = curData
|
||||||
localStorage.setItem('curNode', JSON.stringify(nodeData))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 临时用 后续删除 unitId
|
|
||||||
*/
|
|
||||||
let levelFirstId = null
|
|
||||||
let levelSecondId = null
|
|
||||||
let bookeId = curBook.data.id
|
|
||||||
if (nodeData.parentNode) {
|
|
||||||
levelFirstId = nodeData.parentNode.id
|
|
||||||
levelSecondId = nodeData.id
|
|
||||||
} else {
|
|
||||||
levelFirstId = nodeData.id
|
|
||||||
levelSecondId = ''
|
|
||||||
}
|
|
||||||
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
|
|
||||||
|
|
||||||
emit('nodeClick', curData)
|
emit('nodeClick', curData)
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted( async () => {
|
onMounted(() => {
|
||||||
treeLoading.value = true
|
getSubjectContent()
|
||||||
|
|
||||||
try{
|
|
||||||
useSubject = await useGetSubject()
|
|
||||||
subjectList.value = useSubject.subjectList
|
|
||||||
|
|
||||||
let book = localStorage.getItem('curBook')
|
|
||||||
if(book){
|
|
||||||
book = JSON.parse(book)
|
|
||||||
curBook.data = book
|
|
||||||
treeData.value = useSubject.getTreeData(book.id)
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
curBook.data = useSubject.subjectList[0]
|
|
||||||
treeData.value = useSubject.treeData
|
|
||||||
}
|
|
||||||
// 设置展开并选中
|
|
||||||
nextTick(() =>{
|
|
||||||
// 取缓存
|
|
||||||
let node = localStorage.getItem('curNode')
|
|
||||||
if(node){
|
|
||||||
curNode.data = JSON.parse(node)
|
|
||||||
defaultExpandedKeys.value = JSON.parse(localStorage.getItem('defaultExpandedKeys'))
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
|
||||||
curNode.data = getLastLevelData(treeData.value)[0]
|
|
||||||
//缓存记录当前展开以及选中节点
|
|
||||||
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
|
|
||||||
localStorage.setItem('curNode', JSON.stringify(curNode.data))
|
|
||||||
}
|
|
||||||
emitChangeBook()
|
|
||||||
})
|
|
||||||
|
|
||||||
} finally{
|
|
||||||
treeLoading.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -64,8 +64,6 @@ const getVertion = (data) => {
|
||||||
childs: []
|
childs: []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//判断是否存在该教材,有则展示第一项
|
|
||||||
if(treeData.value.length === 0) return
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
defaultExpandedKeys.value = [treeData.value[0].id]
|
||||||
node.currentNode.data = treeData.value[0]
|
node.currentNode.data = treeData.value[0]
|
||||||
|
|
|
@ -137,7 +137,7 @@ const getSubjectContent = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getSubject = async () => {
|
const getSubject = async () => {
|
||||||
|
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
||||||
|
|
||||||
if (localStorage.getItem('subjectList')) {
|
if (localStorage.getItem('subjectList')) {
|
||||||
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
|
||||||
|
|
|
@ -102,9 +102,8 @@ const getTreeData = () => {
|
||||||
levelFirstId = curNode.id
|
levelFirstId = curNode.id
|
||||||
levelSecondId = ''
|
levelSecondId = ''
|
||||||
}
|
}
|
||||||
let bookeId = curBookId
|
|
||||||
// 头部 教材分析、作业设计:打开外部链接需要当前章节ID
|
// 头部 教材分析、作业设计:打开外部链接需要当前章节ID
|
||||||
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
|
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
|
||||||
|
|
||||||
// const data = {
|
// const data = {
|
||||||
// textBook: {
|
// textBook: {
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
import { ref } from 'vue'
|
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
import { listEvaluation } from '@/api/subject'
|
|
||||||
|
|
||||||
export const useGetSubject = async () =>{
|
|
||||||
|
|
||||||
// user store
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const { edustage, edusubject, userId } = userStore.user
|
|
||||||
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
|
||||||
// 章节List
|
|
||||||
const unitList = ref([])
|
|
||||||
// 教材List
|
|
||||||
let subjectList = null
|
|
||||||
// 单元章节树结构
|
|
||||||
let treeData = null
|
|
||||||
|
|
||||||
|
|
||||||
// 根据 学科 + 学段 获取所有单元章节
|
|
||||||
const getSubjectUnit = async () =>{
|
|
||||||
let strUnit = localStorage.getItem('unitList')
|
|
||||||
if(strUnit){
|
|
||||||
unitList.value = JSON.parse(strUnit)
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
const unitParams = {
|
|
||||||
edusubject,
|
|
||||||
edustage,
|
|
||||||
itemgroup: 'textbook',
|
|
||||||
orderby: 'orderidx asc',
|
|
||||||
pageSize: 10000
|
|
||||||
}
|
|
||||||
const { rows } = await listEvaluation(unitParams)
|
|
||||||
unitList.value = rows
|
|
||||||
localStorage.setItem('unitList', JSON.stringify(rows))
|
|
||||||
}
|
|
||||||
|
|
||||||
await getSubject()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取 学科 + 学段 获取教材
|
|
||||||
const getSubject = async () =>{
|
|
||||||
|
|
||||||
let strSubject = localStorage.getItem('subjectList')
|
|
||||||
if(strSubject){
|
|
||||||
subjectList = JSON.parse(strSubject)
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
const subjectParams = {
|
|
||||||
itemkey: "version",
|
|
||||||
edusubject,
|
|
||||||
edustage,
|
|
||||||
pageSize: 10000,
|
|
||||||
orderby: 'orderidx asc'
|
|
||||||
}
|
|
||||||
const { rows } = await listEvaluation(subjectParams)
|
|
||||||
subjectList = rows
|
|
||||||
localStorage.setItem('subjectList', JSON.stringify(rows))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 默认选中第一个教材
|
|
||||||
if(subjectList && subjectList.length){
|
|
||||||
treeData = getTreeData(subjectList[0].id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单元章节数据转为“树”结构
|
|
||||||
const getTreeData = (bookId) =>{
|
|
||||||
// 根据当前教材的id 查找出对应的章节
|
|
||||||
let data = unitList.value.filter(item => item.rootid == bookId && item.level == 1)
|
|
||||||
data.forEach( item => {
|
|
||||||
item.children = unitList.value.filter( item2 => item2.parentid == item.id && item2.level == 2)
|
|
||||||
})
|
|
||||||
return data
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
await getSubjectUnit()
|
|
||||||
|
|
||||||
return { subjectList, treeData, getTreeData }
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="left-section">
|
<div class="left-section">
|
||||||
<div class="flex title-box">
|
<div class="flex title-box">
|
||||||
<el-image style="width: 23px; height: 23px" :src="logoIco" />
|
<el-image style="width: 23px; height: 23px" :src="logoIco" />
|
||||||
<span class="title" @click="changeTab">{{homeTitle}}</span>
|
<span class="title" @click="changeTab">AIX智慧课堂</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="change-tab">
|
<div class="change-tab">
|
||||||
<ul class="flex">
|
<ul class="flex">
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<div class="user-info flex">
|
<div class="user-info flex">
|
||||||
<span class="user-name">{{ userStore.user.nickName }}</span>
|
<span class="user-name">{{ userStore.user.nickName }}</span>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
<div class="user-depname">{{ userStore.user.deptName }}</div>
|
||||||
<el-dropdown @command="changeSubject">
|
<el-dropdown @command="changeSubject">
|
||||||
<div class="user-subject">{{ userStore.user.edusubject }}
|
<div class="user-subject">{{ userStore.user.edusubject }}
|
||||||
<el-icon class="el-icon--right"><arrow-down />
|
<el-icon class="el-icon--right"><arrow-down />
|
||||||
|
@ -52,7 +52,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-depname">{{ userStore.user.deptName }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -73,8 +72,7 @@ import { updateUserInfo } from '@/api/system/user'
|
||||||
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'
|
||||||
import { clearBookInfo } from '@/utils/ruoyi'
|
|
||||||
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
|
|
||||||
const { ipcRenderer } = window.electron || {}
|
const { ipcRenderer } = window.electron || {}
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
@ -192,7 +190,6 @@ function setLayout() {
|
||||||
}
|
}
|
||||||
// 切换学科
|
// 切换学科
|
||||||
const changeSubject = async (command) =>{
|
const changeSubject = async (command) =>{
|
||||||
clearBookInfo()
|
|
||||||
const { userId, userName, phonenumber, plainpwd } = userStore.user
|
const { userId, userName, phonenumber, plainpwd } = userStore.user
|
||||||
const data = {
|
const data = {
|
||||||
userId,
|
userId,
|
||||||
|
@ -332,7 +329,7 @@ onMounted(() => {
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
.user-depname {
|
.user-depname {
|
||||||
margin-right: 0;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-subject {
|
.user-subject {
|
||||||
|
@ -352,8 +349,8 @@ onMounted(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 45px;
|
width: 35px;
|
||||||
height: 45px;
|
height: 35px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ function stateSyncWatch(storeName, newState) {
|
||||||
// console.log('state-change-diffData', diffData)
|
// console.log('state-change-diffData', diffData)
|
||||||
try {
|
try {
|
||||||
for(const key in diffData) {
|
for(const key in diffData) {
|
||||||
const value = diffData[key] || null
|
const value = diffData[key]
|
||||||
const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种
|
const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种
|
||||||
const keyArr = key.split('.') || []
|
const keyArr = key.split('.') || []
|
||||||
keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue)
|
keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue)
|
||||||
|
@ -172,8 +172,6 @@ const getObjValue = (obj, key) => {
|
||||||
const findDifferences = (obj1, obj2) => {
|
const findDifferences = (obj1, obj2) => {
|
||||||
const differences = {};
|
const differences = {};
|
||||||
function compareObjects(o1, o2, path = '') {
|
function compareObjects(o1, o2, path = '') {
|
||||||
if (o1 == null) return
|
|
||||||
if (o2 == null) return
|
|
||||||
for (const key in o1) {
|
for (const key in o1) {
|
||||||
if (o1.hasOwnProperty(key)) {
|
if (o1.hasOwnProperty(key)) {
|
||||||
const newPath = path ? `${path}.${key}` : key;
|
const newPath = path ? `${path}.${key}` : key;
|
||||||
|
|
|
@ -36,13 +36,13 @@ export const constantRoutes = [
|
||||||
path: '/resource',
|
path: '/resource',
|
||||||
component: () => import('@/views/resource/index.vue'),
|
component: () => import('@/views/resource/index.vue'),
|
||||||
name: 'resource',
|
name: 'resource',
|
||||||
meta: {title: '资源库'}
|
meta: {title: '资源'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/prepare',
|
path: '/prepare',
|
||||||
component: () => import('@/views/prepare/index.vue'),
|
component: () => import('@/views/prepare/index.vue'),
|
||||||
name: 'prepare',
|
name: 'prepare',
|
||||||
meta: {title: '教学实践'}
|
meta: {title: '备课'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/teach',
|
path: '/teach',
|
||||||
|
|
|
@ -257,17 +257,3 @@ export const getFileName = (filename) => {
|
||||||
if(!filename) return
|
if(!filename) return
|
||||||
return filename.replace(/\.[^/.]+$/, "");
|
return filename.replace(/\.[^/.]+$/, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清除当前选中的教材 章节 相关信息
|
|
||||||
export const clearBookInfo = () =>{
|
|
||||||
//当前选中的教材
|
|
||||||
localStorage.removeItem('curBook')
|
|
||||||
// 当前选中的节点
|
|
||||||
localStorage.removeItem('curNode')
|
|
||||||
// 所有章节单元数据
|
|
||||||
localStorage.removeItem('unitList')
|
|
||||||
// 所有教材数据
|
|
||||||
localStorage.removeItem('subjectList')
|
|
||||||
// 展开的节点
|
|
||||||
localStorage.removeItem('defaultExpandedKeys')
|
|
||||||
}
|
|
|
@ -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,8 +186,7 @@
|
||||||
])
|
])
|
||||||
//选择的班级
|
//选择的班级
|
||||||
const classids = ref('')
|
const classids = ref('')
|
||||||
// 未加入的班级
|
|
||||||
const classesNotAMemberOf = ref([])
|
|
||||||
// 获取班级信息
|
// 获取班级信息
|
||||||
const getClassInfo = () => {
|
const getClassInfo = () => {
|
||||||
classList.value = []
|
classList.value = []
|
||||||
|
@ -200,13 +199,13 @@
|
||||||
});
|
});
|
||||||
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
||||||
//清除已有的班级
|
//清除已有的班级
|
||||||
classesNotAMemberOf.value = [...response.rows]
|
let arr = [...response.rows]
|
||||||
classList.value.forEach(item => {
|
classList.value.forEach(item => {
|
||||||
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
|
const currentIndex = arr.findIndex(items => items.id === item.id)
|
||||||
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
|
if(currentIndex) arr.splice(currentIndex, 1)
|
||||||
})
|
})
|
||||||
//这里获取组装所有班级
|
//这里获取组装所有班级
|
||||||
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
|
gradeTree.value = groupByCondition(arr, item => item.agekey);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//将所有班级筛选成二级的数组
|
//将所有班级筛选成二级的数组
|
||||||
|
@ -302,7 +301,7 @@
|
||||||
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
|
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
ElMessage({x
|
ElMessage({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
|
|
|
@ -141,7 +141,6 @@ const getClassWorkList = () => {
|
||||||
edustage: userStore.edustage,// 学段
|
edustage: userStore.edustage,// 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
status: '1', // 作业状态:1-已发布
|
|
||||||
orderby: 'concat(deaddate,uniquekey) DESC',
|
orderby: 'concat(deaddate,uniquekey) DESC',
|
||||||
pageSize: 100
|
pageSize: 100
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
<div class="teacher_content_con">
|
<div class="teacher_content_con">
|
||||||
<!-- 题目内容:习题训练 -->
|
<!-- 题目内容:习题训练 -->
|
||||||
<div v-if="dialogProps.studentObj.worktype == '习题训练'">
|
<div v-if="dialogProps.studentObj.worktype == '习题训练'">
|
||||||
<div v-for="(quItem, qIndex) in dialogProps.quizlist" :key="quItem.id">
|
|
||||||
<div v-for="(stuItem, sIndex) in dialogProps.studentQuizAllList" :key="stuItem.id">
|
<div v-for="(stuItem, sIndex) in dialogProps.studentQuizAllList" :key="stuItem.id">
|
||||||
|
<div v-for="quItem in dialogProps.quizlist" :key="quItem.id">
|
||||||
<div v-if="stuItem.entpcourseworkid == quItem.id">
|
<div v-if="stuItem.entpcourseworkid == quItem.id">
|
||||||
<el-card style="max-width: 100%; margin-bottom: 10px">
|
<el-card style="max-width: 100%; margin-bottom: 10px">
|
||||||
<!-- 题型 分值 -->
|
<!-- 题型 分值 -->
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span
|
<span
|
||||||
>{{ qIndex + 1 }}、{{ quItem.worktype }}
|
>{{ sIndex + 1 }}、{{ quItem.worktype }}
|
||||||
{{ stuItem.score ? stuItem.score : 0 }}分</span
|
{{ stuItem.score ? stuItem.score : 0 }}分</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,8 +94,11 @@
|
||||||
</span>
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="padding: 10px">
|
<el-col :span="6" style="padding: 10px">
|
||||||
<div v-if="stuItem.imagefile && stuItem.imagefile.length > 0">
|
<div
|
||||||
<div v-for="(imageItem, index) in stuItem.imagefile" :key="index">
|
v-for="(imageItem, index) in stuItem.imagefile"
|
||||||
|
v-if="stuItem.imagefile && stuItem.imagefile.length > 0"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 30px; height: 30px"
|
style="width: 30px; height: 30px"
|
||||||
:src="imageItem"
|
:src="imageItem"
|
||||||
|
@ -107,7 +110,6 @@
|
||||||
fit="contain"
|
fit="contain"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="padding: 10px">
|
<el-col :span="6" style="padding: 10px">
|
||||||
<!-- 单选题 填空题 多选题 判断题 主观题 复合题; 待完善:
|
<!-- 单选题 填空题 多选题 判断题 主观题 复合题; 待完善:
|
||||||
|
@ -209,11 +211,6 @@
|
||||||
|
|
||||||
<!-- 学生答题展示 -->
|
<!-- 学生答题展示 -->
|
||||||
<div v-if="feedContentList.length > 0">
|
<div v-if="feedContentList.length > 0">
|
||||||
<div v-if="dialogProps.studentObj.worktype == '常规作业' && stuItem.rightanswer != ''&& stuItem.rightanswer != null">
|
|
||||||
<!-- 常规作业:学生有的会答复 -->
|
|
||||||
<p style="padding: 10px 0;">学生答复内容</p>
|
|
||||||
<div style="padding: 0 20px">{{stuItem.rightanswer}}</div>
|
|
||||||
</div>
|
|
||||||
<p>学生答题附件内容</p>
|
<p>学生答题附件内容</p>
|
||||||
<div class="image_list">
|
<div class="image_list">
|
||||||
<div v-if="imageList.length > 0">
|
<div v-if="imageList.length > 0">
|
||||||
|
@ -250,9 +247,6 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 无附件内容 -->
|
|
||||||
<div v-if="imageList.length == 0 && fileList.length == 0" style="padding: 0 20px">未提交附件内容</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
@ -411,6 +411,8 @@ const queryForm = reactive({
|
||||||
entpCourseWorkTotal.value = entpcourseworkres.data.length;
|
entpCourseWorkTotal.value = entpcourseworkres.data.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if()
|
||||||
|
|
||||||
//格式化试题信息
|
//格式化试题信息
|
||||||
processList(workResource.entpCourseWorkList);
|
processList(workResource.entpCourseWorkList);
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<div class="desktop-work-item">
|
<div class="desktop-work-item">
|
||||||
<div class="item-title flex">
|
<div class="item-title flex">
|
||||||
<span class="title">工作动态</span>
|
<span class="title">工作动态</span>
|
||||||
<!-- <el-radio-group v-model="type">
|
<el-radio-group v-model="type">
|
||||||
<el-radio-button label="全部" :value="-1" />
|
<el-radio-button label="全部" :value="-1" />
|
||||||
</el-radio-group> -->
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-content" v-loading="loading">
|
<div class="item-content" v-loading="loading">
|
||||||
<el-scrollbar height="500px">
|
<el-scrollbar height="500px">
|
||||||
|
|
|
@ -87,7 +87,7 @@ const menuList = [{
|
||||||
// path: '/prepare'
|
// path: '/prepare'
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: '教学实践',
|
name: '教学实施',
|
||||||
icon: 'icon-jiaoxuefenxi',
|
icon: 'icon-jiaoxuefenxi',
|
||||||
path: '/prepare'
|
path: '/prepare'
|
||||||
},
|
},
|
||||||
|
@ -166,15 +166,12 @@ const clickMenu = ({isOuter, path, disabled}) =>{
|
||||||
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(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask'){
|
||||||
// 头部 教材分析打开外部链接需要当前章节ID
|
// 头部 教材分析打开外部链接需要当前章节ID
|
||||||
const { levelFirstId, levelSecondId, bookeId } = JSON.parse(localStorage.getItem('unitId'))
|
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
|
||||||
|
|
||||||
let unitId = levelSecondId ? levelSecondId : levelFirstId
|
let unitId = levelSecondId ? levelSecondId : levelFirstId
|
||||||
|
fullPath = fullPath + `&unitId=${unitId}`
|
||||||
fullPath = fullPath + `&unitId=${unitId}&bookeId=${bookeId}`
|
|
||||||
|
|
||||||
console.log(fullPath)
|
|
||||||
}
|
}
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
// 通知主进程
|
// 通知主进程
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple>
|
<el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple>
|
||||||
<el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/>
|
<el-step title="1.基本信息" @click="activeIndex=1" />
|
||||||
<el-step title="2.在校信息" />
|
<el-step title="2.在校信息" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -40,11 +40,9 @@
|
||||||
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
|
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
popper-class="aix-regist-address"
|
|
||||||
v-model="ruleForm.address"
|
v-model="ruleForm.address"
|
||||||
:options="regionData"
|
:options="regionData"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
:props="{checkStrictly: true}"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学校" prop="school" v-if="activeIndex==2">
|
<el-form-item label="学校" prop="school" v-if="activeIndex==2">
|
||||||
|
@ -74,7 +72,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="activeIndex==2">
|
<el-form-item v-if="activeIndex==2">
|
||||||
<div class="centerDiv">
|
<div class="centerDiv">
|
||||||
<el-button type="default" @click="activeIndex=1">上一步</el-button>
|
|
||||||
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
|
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -214,6 +211,12 @@ 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,
|
||||||
|
@ -297,6 +300,7 @@ const nextStep = (formEl) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getSubject()
|
getSubject()
|
||||||
|
console.log(res)
|
||||||
})
|
})
|
||||||
console.log('submit!')
|
console.log('submit!')
|
||||||
}
|
}
|
||||||
|
@ -310,8 +314,7 @@ const getSubject = async ()=>{
|
||||||
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
||||||
console.log(rows,'所有学科')
|
console.log(rows,'所有学科')
|
||||||
allSubjectList.value = rows.data
|
allSubjectList.value = rows.data
|
||||||
accessToDisciplines()
|
|
||||||
getClassmain()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const submitForm = async (formEl) => {
|
const submitForm = async (formEl) => {
|
||||||
|
@ -422,15 +425,9 @@ const sbmitImg=()=>{
|
||||||
const handleChange = (value) => {
|
const handleChange = (value) => {
|
||||||
console.log('选中的地址值:', value);
|
console.log('选中的地址值:', value);
|
||||||
};
|
};
|
||||||
const handleSchoolChange= ()=>{
|
const handleSchoolChange= async ()=>{
|
||||||
ruleForm.discipline=[];
|
ruleForm.discipline=[];
|
||||||
ruleForm.class=[];
|
ruleForm.class=[];
|
||||||
//获取学科班级
|
|
||||||
accessToDisciplines()
|
|
||||||
getClassmain()
|
|
||||||
}
|
|
||||||
// 获取学科
|
|
||||||
const accessToDisciplines = () => {
|
|
||||||
getDept({deptId:ruleForm.school[2]}).then(res =>{
|
getDept({deptId:ruleForm.school[2]}).then(res =>{
|
||||||
if(res.data.studying && res.data.studying.length){
|
if(res.data.studying && res.data.studying.length){
|
||||||
let studying = res.data.studying.split(',')
|
let studying = res.data.studying.split(',')
|
||||||
|
@ -453,12 +450,11 @@ const accessToDisciplines = () => {
|
||||||
schoolSubject.value = []
|
schoolSubject.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{
|
||||||
// 获取班级
|
|
||||||
const getClassmain = async ()=>{
|
|
||||||
console.log(ruleForm.school)
|
|
||||||
const res = await listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'})
|
|
||||||
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
||||||
|
console.log(gradeTree.value,'班级')
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
//将所有班级筛选成二级的数组
|
//将所有班级筛选成二级的数组
|
||||||
const groupByCondition = (arr, condition)=>{
|
const groupByCondition = (arr, condition)=>{
|
||||||
|
@ -494,10 +490,7 @@ const gradeName = (key) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
//默认给到地区重庆
|
|
||||||
ruleForm.address = ['50']
|
|
||||||
//默认给到学校的值
|
|
||||||
ruleForm.school = [100,255,279]
|
|
||||||
})
|
})
|
||||||
defineExpose({
|
defineExpose({
|
||||||
OpenModel,
|
OpenModel,
|
||||||
|
@ -511,17 +504,4 @@ defineExpose({
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
|
||||||
<style lang="scss">
|
|
||||||
.aix-regist-address{
|
|
||||||
.el-cascader-node{
|
|
||||||
position: relative!important;
|
|
||||||
.el-radio{
|
|
||||||
position: absolute!important;
|
|
||||||
width: 90%!important;
|
|
||||||
left:5px!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="box-item desc">
|
<div class="box-item desc">
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<p>欢迎登录 {{homeTitle}}</p>
|
<p>欢迎登录 AIX智慧课堂</p>
|
||||||
</div>
|
</div>
|
||||||
<img class="welcome-img" :src="leftBg2" />
|
<img class="welcome-img" :src="leftBg2" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,7 +93,6 @@ const rules = reactive({
|
||||||
})
|
})
|
||||||
|
|
||||||
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||||
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
|
|
||||||
ipcRenderer.on('update-app-progress', (e, prop) => {
|
ipcRenderer.on('update-app-progress', (e, prop) => {
|
||||||
downloadProp.value = prop
|
downloadProp.value = prop
|
||||||
showDownLoading.value = prop !== 100
|
showDownLoading.value = prop !== 100
|
||||||
|
|
|
@ -89,8 +89,6 @@ const userStore = useUserStore()
|
||||||
const visible = ref(false) // 是否打开窗口
|
const visible = ref(false) // 是否打开窗口
|
||||||
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
||||||
const imChatRef = ref(null) // im-chat ref
|
const imChatRef = ref(null) // im-chat ref
|
||||||
const emit = defineEmits(['close'])
|
|
||||||
|
|
||||||
const classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
const classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
||||||
form: {}, itemOption: [], option: {}
|
form: {}, itemOption: [], option: {}
|
||||||
})
|
})
|
||||||
|
@ -139,7 +137,6 @@ const handleClose = async () => {
|
||||||
reset() // 重置数据
|
reset() // 重置数据
|
||||||
await chat?.logout()
|
await chat?.logout()
|
||||||
chat = null
|
chat = null
|
||||||
emit('close')
|
|
||||||
}
|
}
|
||||||
// 初始化-数据
|
// 初始化-数据
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="file-oper-batch-wrap">
|
<div class="file-oper-batch-wrap">
|
||||||
<div style="line-height: 40px">
|
<div style="margin: 0 20px; line-height: 40px">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="isCheckAll"
|
v-model="isCheckAll"
|
||||||
:indeterminate="indeterminate"
|
:indeterminate="indeterminate"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { deleteSmarttalkBatch } from '@/api/file'
|
import { deleteSmarttalkBatch } from '@/api/file'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { exportFile } from '@/utils/talkFile'
|
import { exportFile } from '@/utils/talkFile'
|
||||||
export default {
|
export default {
|
||||||
name: 'FileOperBatch',
|
name: 'FileOperBatch',
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-body-main-item-btn">
|
<div class="prepare-body-main-item-btn">
|
||||||
<!-- <el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
|
<el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button>
|
||||||
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
|
<el-button v-else type="primary" @click="clickStartClass(item)">上课</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-body-main-item-tool">
|
<div class="prepare-body-main-item-tool">
|
||||||
<el-popover
|
<el-popover
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-popover-item">
|
<div class="item-popover-item">
|
||||||
<el-button text @click="deleteTalk(item)">
|
<el-button text @click="deleteTalk(item)" :disabled="activeClassId==item.id">
|
||||||
<i class="iconfont icon-shanchu"></i>
|
<i class="iconfont icon-shanchu"></i>
|
||||||
<span>删除</span>
|
<span>删除</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -108,12 +108,6 @@ 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 () {
|
||||||
|
@ -207,9 +201,8 @@ export default {
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
if (items.fileFlag === 'apt') {
|
||||||
console.log(this.curNode);
|
console.log(items);
|
||||||
let curBook = JSON.parse(localStorage.getItem('curBook'))
|
const path="/teaching/aptindex?id="+items.fileId
|
||||||
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.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('//', '/')
|
||||||
|
|
|
@ -86,7 +86,7 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
||||||
|
|
||||||
const emit = defineEmits(['addSuccess','close'])
|
const emit = defineEmits(['addSuccess'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookId: {
|
bookId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -115,7 +115,7 @@ const updateForm = ref({})
|
||||||
watch(
|
watch(
|
||||||
() => props.currentNode,
|
() => props.currentNode,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
form.name = newValue.itemtitle
|
form.name = newValue.label
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const ruleForm = reactive({
|
const ruleForm = reactive({
|
||||||
|
@ -216,9 +216,7 @@ const openDialog = (data) => {
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
ruleFormDialog.value.resetFields()
|
ruleFormDialog.value.resetFields()
|
||||||
centerDialogVisible.value = false
|
centerDialogVisible.value = false
|
||||||
form.name = props.currentNode.itemtitle
|
form.name = props.currentNode.label
|
||||||
emit('close')
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const classList = ref([])
|
const classList = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
:curNode="currentNode"
|
:activeClassId="activeClass?.id"
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-start-class="startClass"
|
@on-start-class="startClass"
|
||||||
>
|
>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
<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">共{{ currentFileList.filter(ite=>ite.fileFlag!=='apt'&&ite.fileFlag!=='课件').length }}个文件</label>
|
<label style="font-size: 15px">共{{ currentFileList.length }}个文件</label>
|
||||||
<el-popover placement="top-start" :width="250" trigger="hover">
|
<el-popover placement="top-start" :width="250" trigger="hover">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div>
|
<div>
|
||||||
|
@ -116,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"
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
</div>
|
</div>
|
||||||
<file-oper-batch
|
<file-oper-batch
|
||||||
v-show="checkFileList.length > 0"
|
v-show="checkFileList.length > 0"
|
||||||
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentSCFileList.length"
|
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentFileList.length"
|
||||||
:choose="checkFileList"
|
:choose="checkFileList"
|
||||||
:check-all="isCheckAll"
|
:check-all="isCheckAll"
|
||||||
@click-delete="clickDelete"
|
@click-delete="clickDelete"
|
||||||
|
@ -159,10 +159,9 @@
|
||||||
:current-node="currentNode"
|
:current-node="currentNode"
|
||||||
:book-id="uploadData.textbookId"
|
:book-id="uploadData.textbookId"
|
||||||
@add-success="initReserv"
|
@add-success="initReserv"
|
||||||
@close="closeChange"
|
|
||||||
></reserv>
|
></reserv>
|
||||||
<!-- 上课配置 -->
|
<!-- 上课配置 -->
|
||||||
<class-start ref="calssRef" @close="closeChange"/>
|
<class-start ref="calssRef"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Check,Plus } from '@element-plus/icons-vue'
|
import { Check,Plus } from '@element-plus/icons-vue'
|
||||||
|
@ -256,7 +255,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
isCheckAll() {
|
isCheckAll() {
|
||||||
return (
|
return (
|
||||||
this.checkFileList.length > 0 && this.checkFileList.length === this.currentSCFileList.length
|
this.checkFileList.length > 0 && this.checkFileList.length === this.currentFileList.length
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
currentKJFileList() {
|
currentKJFileList() {
|
||||||
|
@ -306,10 +305,10 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
startClass(item) {
|
startClass(item) {
|
||||||
// console.log(item, sessionStore)
|
// console.log(item, sessionStore)
|
||||||
|
if(item.fileFlag === '课件') {
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
||||||
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
||||||
if(item.fileFlag === '课件') {
|
|
||||||
this.openReserv()
|
this.openReserv()
|
||||||
}
|
}
|
||||||
if(item.fileFlag === 'apt') {
|
if(item.fileFlag === 'apt') {
|
||||||
|
@ -320,11 +319,6 @@ export default {
|
||||||
sessionStore.set('activeClass', item)
|
sessionStore.set('activeClass', item)
|
||||||
this.activeClass = item
|
this.activeClass = item
|
||||||
},
|
},
|
||||||
closeChange() { // 上课弹窗被关闭-触发
|
|
||||||
console.log('关闭上课弹窗')
|
|
||||||
this.activeClass = null
|
|
||||||
sessionStore.delete('activeClass')
|
|
||||||
},
|
|
||||||
initReserv(id) {
|
initReserv(id) {
|
||||||
getClassInfo(id).then((res) => {
|
getClassInfo(id).then((res) => {
|
||||||
this.curClassReserv = res.data
|
this.curClassReserv = res.data
|
||||||
|
@ -369,7 +363,7 @@ export default {
|
||||||
this.downloadNum = num
|
this.downloadNum = num
|
||||||
},
|
},
|
||||||
createFile() {
|
createFile() {
|
||||||
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
|
creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => {
|
||||||
this.currentFileList.unshift(res.resData)
|
this.currentFileList.unshift(res.resData)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -449,7 +443,7 @@ export default {
|
||||||
creatAPT({
|
creatAPT({
|
||||||
...this.uploadData,
|
...this.uploadData,
|
||||||
fileId: slideid,
|
fileId: slideid,
|
||||||
fileShowName: this.currentNode.itemtitle + '.apt'
|
fileShowName: this.currentNode.label + '.apt'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.currentFileList.unshift(res.resData)
|
this.currentFileList.unshift(res.resData)
|
||||||
})
|
})
|
||||||
|
@ -666,7 +660,7 @@ export default {
|
||||||
'/tool/sphere?entpcourseid=' +
|
'/tool/sphere?entpcourseid=' +
|
||||||
this.entpcourseid +
|
this.entpcourseid +
|
||||||
'&label=' +
|
'&label=' +
|
||||||
this.currentNode.itemtitle +
|
this.currentNode.label +
|
||||||
'&reservId=' +
|
'&reservId=' +
|
||||||
id
|
id
|
||||||
})
|
})
|
||||||
|
|
|
@ -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.identity }}</div>
|
<div class="right-align">{{ state.user.email }}</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="identity">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input v-model="user.identity" maxlength="50" />
|
<el-input v-model="user.email" maxlength="50" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" style="display: none">
|
<el-form-item label="性别">
|
||||||
<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.label">
|
<el-radio :value="item.title">
|
||||||
{{item.label }}
|
{{item.title }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
@ -42,11 +42,9 @@
|
||||||
<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'
|
||||||
import { clearBookInfo } from '@/utils/ruoyi'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
user: {
|
user: {
|
||||||
|
@ -61,30 +59,21 @@ const userStore = useUserStore()
|
||||||
const semesterList = ref([
|
const semesterList = ref([
|
||||||
{
|
{
|
||||||
id:1,
|
id:1,
|
||||||
label:'幼儿园'
|
title:'幼儿园'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:2,
|
id:2,
|
||||||
label:'小学'
|
title:'小学'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:3,
|
id:3,
|
||||||
label:'初中'
|
title:'初中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:4,
|
id:4,
|
||||||
label:'高中'
|
title:'高中'
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
// 获取学校所存在的学段
|
|
||||||
|
|
||||||
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' }],
|
||||||
|
@ -148,7 +137,8 @@ function submit() {
|
||||||
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
|
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
|
||||||
userStore.getInfo().then(res => {
|
userStore.getInfo().then(res => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
clearBookInfo()
|
localStorage.removeItem('subjectList')
|
||||||
|
localStorage.removeItem('evaluationList')
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error(response.msg)
|
ElMessage.error(response.msg)
|
||||||
|
@ -169,6 +159,5 @@ const semeterChange = (item) => {
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
getTheSection()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -38,7 +38,7 @@ const curBookId = ref('')
|
||||||
const evaluationList = ref([])
|
const evaluationList = ref([])
|
||||||
|
|
||||||
const getTreeData = () => {
|
const getTreeData = () => {
|
||||||
evaluationList.value = JSON.parse(localStorage.getItem('unitList'))
|
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
|
||||||
|
|
||||||
//上册
|
//上册
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,8 +57,6 @@ class Drag {
|
||||||
document.removeEventListener('mouseup', this.up);
|
document.removeEventListener('mouseup', this.up);
|
||||||
document.addEventListener('touchmove', this.move);
|
document.addEventListener('touchmove', this.move);
|
||||||
document.addEventListener('touchend', this.up);
|
document.addEventListener('touchend', this.up);
|
||||||
// 手动-触发事件 v-drag-start
|
|
||||||
this.el.dispatchEvent(new CustomEvent('v-drag-end', {detail:{drag: this}}))
|
|
||||||
}
|
}
|
||||||
// 业务逻辑
|
// 业务逻辑
|
||||||
updatePosition(e) {
|
updatePosition(e) {
|
||||||
|
@ -110,7 +108,6 @@ export default {
|
||||||
// const { style } = binding.value
|
// const { style } = binding.value
|
||||||
const drag = new Drag(el, binding)
|
const drag = new Drag(el, binding)
|
||||||
const dragStart = (e) => {
|
const dragStart = (e) => {
|
||||||
// console.log('start', e)
|
|
||||||
drag.down(e)
|
drag.down(e)
|
||||||
document.addEventListener('mousemove', drag.move);
|
document.addEventListener('mousemove', drag.move);
|
||||||
document.addEventListener('mouseup', drag.up);
|
document.addEventListener('mouseup', drag.up);
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
<im-chat ref="imChatRef" @change="chatChange" group />
|
<im-chat ref="imChatRef" @change="chatChange" group />
|
||||||
|
|
||||||
<!-- 底部工具栏 -->
|
<!-- 底部工具栏 -->
|
||||||
<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()">
|
||||||
<div class="c-logo" @click="logoHandle" title="拖动 | 折叠 | 展开">
|
<div class="c-logo" @click="logoHandle" title="拖动 | 折叠 | 展开">
|
||||||
|
@ -107,7 +106,7 @@ const getClassInfo = async () => {
|
||||||
const tabChange = (val) => {
|
const tabChange = (val) => {
|
||||||
const bool = !toolStore.isPdfWin && !toolStore.showBoardAll
|
const bool = !toolStore.isPdfWin && !toolStore.showBoardAll
|
||||||
if(bool) toolStore.showBoardAll = true
|
if(bool) toolStore.showBoardAll = true
|
||||||
// console.log('tabChange:', val, bool)
|
console.log('tabChange:', val, bool)
|
||||||
toolStore.model = val // 存储当前tab
|
toolStore.model = val // 存储当前tab
|
||||||
}
|
}
|
||||||
// logo 点击-事件 折叠|展开
|
// logo 点击-事件 折叠|展开
|
||||||
|
@ -144,12 +143,9 @@ const mouseChange = (bool) => {
|
||||||
const isPdf = !resBool && toolStore.isPdfWin
|
const isPdf = !resBool && toolStore.isPdfWin
|
||||||
if (isPdf) resBool = true
|
if (isPdf) resBool = true
|
||||||
}
|
}
|
||||||
console.log('mouseChange:', bool, resBool)
|
// console.log('mouseChange:', bool, resBool)
|
||||||
setIgnore(resBool)
|
setIgnore(resBool)
|
||||||
}
|
}
|
||||||
const touchChange = (e) => {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
// im-chat: 聊天事件 {type, data}
|
// im-chat: 聊天事件 {type, data}
|
||||||
const chatChange = (type, data, ...args) => {
|
const chatChange = (type, data, ...args) => {
|
||||||
if (type == 'createGroup') { // 创建群-监听
|
if (type == 'createGroup') { // 创建群-监听
|
||||||
|
|
Loading…
Reference in New Issue