Compare commits

..

No commits in common. "2cdc33d7062cba9a4f48ca9f32d3c1019fc0a235" and "974aaf35221ac34369e2b4b55fff0a8d48e77972" have entirely different histories.

22 changed files with 171 additions and 486 deletions

View File

@ -24,8 +24,8 @@ export default defineConfig({
server: {
proxy: {
'/dev-api': {
target: 'http://27.128.240.72:7865',
// target: 'http://192.168.2.52:7863',
// target: 'http://27.128.240.72:7865',
target: 'http://192.168.2.52:7863',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "1.0.7",
"version": "1.0.6",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -42,11 +42,6 @@ const updateInit = (win) => {
logger.error('检查更新失败')
})
// 监听下载进度
autoUpdater.on('download-progress', (progressObj) => {
win.webContents.send('update-app-progress', progressObj.percent);
});
// 跟新下载完毕
autoUpdater.on('update-downloaded', () => {
dialog
@ -63,4 +58,4 @@ const updateInit = (win) => {
})
}
export default updateInit
export default updateInit

View File

@ -1,9 +1,9 @@
@font-face {
font-family: "iconfont"; /* Project id 2794390 */
src: url('iconfont.woff2?t=1723452423265') format('woff2'),
url('iconfont.woff?t=1723452423265') format('woff'),
url('iconfont.ttf?t=1723452423265') format('truetype'),
url('iconfont.svg?t=1723452423265#iconfont') format('svg');
src: url('iconfont.woff2?t=1723186593107') format('woff2'),
url('iconfont.woff?t=1723186593107') format('woff'),
url('iconfont.ttf?t=1723186593107') format('truetype'),
url('iconfont.svg?t=1723186593107#iconfont') format('svg');
}
.iconfont {
@ -14,10 +14,6 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-zanwushuju:before {
content: "\e655";
}
.icon-xiangzuo:before {
content: "\e64d";
}

File diff suppressed because one or more lines are too long

View File

@ -5,13 +5,6 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "9689424",
"name": "暂无数据",
"font_class": "zanwushuju",
"unicode": "e655",
"unicode_decimal": 58965
},
{
"icon_id": "6176588",
"name": "向左",

View File

@ -14,8 +14,6 @@
/>
<missing-glyph />
<glyph glyph-name="zanwushuju" unicode="&#58965;" d="M876.202667 543.445333H147.882667L0 282.752V-42.666667h1024v325.376l-147.797333 260.736z m-234.112-263.637333c0-70.485333-58.197333-127.658667-130.090667-127.658667-71.893333 0-130.133333 57.173333-130.133333 127.658667H61.098667L179.541333 501.76H844.373333l118.442667-221.952H642.133333zM500.138667 810.666667h44.629333v-157.610667h-44.629333V810.666667zM197.290667 732.416l31.573333 31.018667L342.272 651.946667l-31.573333-31.018667-113.493334 111.445333z m491.52-80.512l113.493333 111.445333 31.573333-30.976-113.493333-111.445333-31.573333 30.976z" horiz-adv-x="1024" />
<glyph glyph-name="xiangzuo" unicode="&#58957;" d="M774.89 725L399.08 380.75l375.81-344.21a39.28 39.28 0 0 0 13.11-29c0-36.51-48.19-54.79-76.38-29L335.8 322.8c-34.94 32-34.94 83.9 0 115.9l375.82 344.22c28.19 25.81 76.38 7.53 76.38-29A39.3 39.3 0 0 0 774.89 725z" horiz-adv-x="1024" />
<glyph glyph-name="kechengziyuan1" unicode="&#58951;" d="M530.299631 315.712191a54.537462 54.537462 0 0 0-34.299976 12.187492L19.862486 563.299519l-3.749997 3.749997a55.187462 55.187462 0 0 0 0 77.949946l3.749997 3.749998L495.687155 883.836796A54.537462 54.537462 0 0 0 530.299631 895.999288a54.562462 54.562462 0 0 0 34.299976-12.162492l476.137169-235.424836 3.749997-3.749998a55.199962 55.199962 0 0 0 0-77.949945l-3.749997-3.749998-476.137169-235.399836a54.562462 54.562462 0 0 0-34.299976-11.849992z m-455.874683 289.999798l455.874683-225.449843 455.874683 225.437343-455.874683 225.749843z m0 0M530.299631 94.012346a54.574962 54.574962 0 0 0-34.299976 12.162491L24.537483 339.149675a31.174978 31.174978 0 1 0 27.749981 55.812461l474.899669-234.849836 3.112498-1.874999 3.124998 1.874999 474.887169 235.112336a31.174978 31.174978 0 0 0 27.749981-55.812461L564.599607 105.862337a54.562462 54.562462 0 0 0-34.299976-11.849991z m0 0M530.299631-128a54.862462 54.862462 0 0 0-34.299976 12.149992L24.537483 116.46233a31.174978 31.174978 0 1 0 27.749981 55.812461l474.899669-233.862337 3.112498-1.874999 3.124998 1.874999 474.887169 235.112336a31.724978 31.724978 0 1 0 27.749981-57.06246L564.599607-115.850008a55.199962 55.199962 0 0 0-34.299976-12.149992z m0 0" horiz-adv-x="1060" />

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -42,7 +42,7 @@
</template>
<script setup>
import { onMounted, ref, nextTick, toRaw, reactive,watch } from 'vue';
import { onMounted, ref, nextTick, toRaw, reactive } from 'vue';
import useUserStore from '@/store/modules/user'
import { listEvaluation } from '@/api/subject'
@ -102,11 +102,21 @@ const getSubjectContent = async () => {
}
let data;
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
treeLoading.value = false
if (localStorage.getItem('evaluationList')) {
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
data = evaluationList.value
treeLoading.value = false
}
else {
try {
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
} finally {
treeLoading.value = false
}
}
//
await getSubject()
@ -256,10 +266,14 @@ const transData = (data) => {
//
const getSubject = async () => {
const { rows } = await listEvaluation({ itemkey: "version", pageSize: 500 })
subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
if (localStorage.getItem('subjectList')) {
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
}
else {
const { rows } = await listEvaluation({ itemkey: "version", pageSize: 500 })
subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject && isHaveUnit(item.id))
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
}
//
if(!subjectList.value.length) return
@ -270,11 +284,11 @@ const getSubject = async () => {
}
// const isHaveUnit = (id) => {
// return evaluationList.value.some(item => {
// return item.rootid == id
// })
// }
const isHaveUnit = (id) => {
return evaluationList.value.some(item => {
return item.rootid == id
})
}
const handleNodeClick = (data, node) => {
@ -305,9 +319,7 @@ const handleNodeClick = (data, node) => {
currentNode.data = curData
emit('nodeClick', curData)
}
watch(() => userStore.edusubject, () => {
console.log(userStore.edusubject,'userStore.edusubject')
})
onMounted(() => {
getSubjectContent()
})

View File

@ -118,11 +118,18 @@ const getSubjectContent = async () => {
entpcourseedituserid: userId,
pageSize: 500
}
let data;
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
if (localStorage.getItem('evaluationList')) {
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
data = evaluationList.value
}
else {
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
}
//
getSubject()
@ -421,4 +428,4 @@ onMounted(() => {
color: #409EFF;
font-weight: bold
}
</style>
</style>

View File

@ -1,125 +0,0 @@
import useUserStore from '@/store/modules/user'
import { homeworklist, listEntpcourse } from '@/api/teaching/classwork'
import { addEntpcourse } from '@/api/teaching/classwork'
const userStore = useUserStore()
// 当前选中教材章节节点
let curNode = null
// 查询作业列表所需要的ID
let chapterId = null
export const useGetHomework = async (node) => {
/**
* node
*/
if (!node) return
curNode = node
// 获取查询作业列表所需ID
let { rows } = await getChapterId()
if (rows.length > 0) {
chapterId = rows[0].id
} else {
// 没有则 传教新的entpcourse 再次查询
await createEntpcourse()
let { rows } = await getChapterId()
chapterId = rows[0].id
}
return await getHomeWorkList()
}
// 根据教材章节ID 查询作业列表所需ID
const getChapterId = () => {
return listEntpcourse({
evalid: curNode.id ? curNode.id : curNode.parentNode.id,
edituserid: userStore.user.userId,
pageSize: 500
})
}
// 创建新的entpcourse
const createEntpcourse = () => {
// 参照 web AIx 传入参数
var cform = {}
cform.entpid = userStore.user.deptId
cform.level = 1
cform.parentid = 0
cform.dictid = 0
cform.evalid = curNode.id
cform.evalparentid = 0
cform.edusubject = curNode.edusubject
cform.edudegree = curNode.edudegree
cform.edustage = curNode.edustage
cform.coursetype = '课标学科'
cform.coursetitle = curNode.itemtitle
cform.coursedesc = ''
cform.status = ''
cform.dflag = 0
cform.edituserid = userStore.user.userId
cform.createblankfile = 'yes'
return addEntpcourse(cform)
}
const getHomeWorkList = async () => {
return await homeworklist({
entpcourseid: chapterId,
edituserid: userStore.user.userId,
pageSize: 100
}).then((res) => {
//以下代码 参照AIx web端 作业布置
let list = []
for (var i = 0; i < res.rows.length; i++) {
res.rows[i].taskconfig = []
// 找child
for (var j = 0; j < res.rows.length; j++) {
if (res.rows[j].parentid == res.rows[i].id) {
var ss = []
if (res.rows[j].classworkdatastudentids != null) {
ss = JSON.parse('[' + res.rows[j].classworkdatastudentids + ']')
}
var js = {
id: res.rows[j].id,
classid: res.rows[j].classid,
classcaption: res.rows[j].classcaption,
parentid: 0,
worktype: '',
workkey: res.rows[j].workkey,
worktag: '',
entpcourseid: 0,
evalid: 0,
edusubject: '',
edudegree: '',
workdate: '',
title: '',
workcodes: '',
studentlist: ss,
deaddate: res.rows[j].deaddate,
timelength: res.rows[j].timelength,
weights: res.rows[j].weights,
feedtype: res.rows[j].feedtype
}
res.rows[i].taskconfig.push(js)
}
}
res.rows[i].fileShowName = res.rows[i].uniquekey
// 注意slideid>0的这一些作业是添加到PPT页面的所以在作业管理中不能出现
// 2024-05-15酉阳jackyshen
if (res.rows[i].classid == 0 && res.rows[i].slideid == 0) {
list.push(res.rows[i])
}
// 如果是习题训练任务,则检查一共有多少道
if (res.rows[i].entpcourseworklist != '') {
res.rows[i].entpcourseworklistarray = JSON.parse('[' + res.rows[i].entpcourseworklist + ']')
} else {
res.rows[i].entpcourseworklistarray = []
}
}
return list
})
}

View File

@ -31,7 +31,7 @@ export const constantRoutes = [
path: '/prepare',
component: () => import('@/views/prepare/index.vue'),
name: 'prepare',
meta: {title: '备课'}
meta: {title: '备课',keepAlive:true}
},
{
path: '/teach',

View File

@ -9,10 +9,6 @@ export const useToolState = defineStore('tool', {
showBoardAll: false, // 全屏画板-是否显示
isPdfWin: false, // pdf窗口是否打开
isToolWin: false, // 工具窗口是否打开
curSubjectNode: {
data: {}, // 当前教材节点 (包含当前教材 单元)
querySearch: {} // 查询资源所需参数
}
}),
actions: {
}

View File

@ -7,47 +7,24 @@
<img class="welcome-img" :src="leftBg2" />
</div>
<div class="box-item login">
<WindowTools :is-has-max="false" />
<WindowTools :isHasMax="false" />
<div class="login-title">账号登录</div>
<el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large">
<el-form-item prop="username">
<el-input v-model.trim="loginForm.username" placeholder="请输入用户名" />
</el-form-item>
<el-form-item prop="password" style="margin-bottom: 15px">
<el-input
v-model="loginForm.password"
autocomplete="on"
type="password"
placeholder="请输入密码"
/>
<el-input v-model="loginForm.password" autocomplete="on" type="password" placeholder="请输入密码" />
</el-form-item>
<el-checkbox v-model="loginForm.rememberMe" class="flex mb-5">记住密码</el-checkbox>
<el-checkbox class="flex mb-5" v-model="loginForm.rememberMe">记住密码</el-checkbox>
<el-form-item>
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)"
>登录</el-button
>
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-dialog
v-model="showDownLoading"
width="500"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
align-center
>
<el-progress
:text-inside="true"
:stroke-width="22"
:percentage="downloadProp"
:show-text="false"
status="success"
/>
</el-dialog>
<!--选择学科-->
<SelectSubject v-model="isSubject" :login-data="loginForm" @on-success="successEditSubject" />
<SelectSubject v-model="isSubject" :loginData="loginForm" @onSuccess="successEditSubject"/>
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue'
@ -59,8 +36,7 @@ import WindowTools from '@/components/window-tools/index.vue'
import SelectSubject from '@/components/select-subject/index.vue'
const { session } = require('@electron/remote')
const downloadProp = ref(0)
const showDownLoading = ref(false)
const { ipcRenderer } = window.electron || {}
const formRef = ref()
const userStore = useUserStore()
@ -79,11 +55,7 @@ const rules = reactive({
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
})
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
ipcRenderer.on('update-app-progress', (e, prop) => {
downloadProp.value = prop
showDownLoading.value = prop !== 100
})
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH;
//
const submitForm = async (formEl) => {
@ -111,9 +83,11 @@ const submitForm = async (formEl) => {
if (userStore.user.edustage || userStore.user.edusubject) {
ElMessage.success('登录成功')
ipcRenderer && ipcRenderer.send('openMainWindow')
} else {
}
else {
isSubject.value = true
}
} finally {
btnLoading.value = false
}
@ -144,7 +118,7 @@ const getCookieDetail = (name) => {
// cookie
const setCookie = (name, value) => {
// 30
let Days = 30
let Days = 30;
let times = Math.round(Date.now() / 1000) + Days * 24 * 60 * 60
const cookie = {
url: curWinUrl,
@ -155,6 +129,8 @@ const setCookie = (name, value) => {
return session.defaultSession.cookies.set(cookie)
}
onMounted(() => {
localStorage.clear()
getCookie()

View File

@ -1,6 +1,6 @@
<template>
<el-dialog v-model="dialogVisible" center top="10vh" width="600px" :show-close="false" append-to-body
style="border-radius: 10px; padding: 10px 15px;">
:z-index="999999" style="border-radius: 10px; padding: 10px 15px;">
<template #header>
<div class="homerwork-header flex">
<span>{{ title }}</span>
@ -288,6 +288,7 @@ export default {
modelValue(val) {
this.dialogVisible = val
if (val) {
console.log(this.row,10000)
this.getGradeList()
}
}

View File

@ -4,13 +4,8 @@
<div class="page-right">
<div class="header-top flex">
<div class="textbook-img">
<el-image style="width: 80px; height: 110px" :src="curBookImg" @click="navtoPdf" />
<el-progress
v-if="downloadNum > 0 && downloadNum < 100"
style="position: absolute; left: 0; z-index: 999"
type="circle"
:percentage="downloadNum"
/>
<el-image style="width: 80px; height: 110px" :src="curBookImg" @click="navtoPdf"/>
<el-progress v-if="downloadNum>0 && downloadNum < 100" style="position:absolute;left: 0;z-index: 999;" type="circle" :percentage="downloadNum" />
</div>
<div class="top-item">
<el-button class="btn" @click="handleOutLink('standard')">课标研读</el-button>
@ -18,12 +13,7 @@
<el-button class="btn" @click="handleOutLink('gk')">高考研读</el-button>
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
</div>
<el-button
:type="!curClassReserv.id ? 'info' : 'primary'"
:disabled="!curClassReserv.id"
class="to-class-btn"
@click="openLesson"
>
<el-button :type="!curClassReserv.id?'info' : 'primary'" :disabled="!curClassReserv.id" class="to-class-btn" @click="openLesson">
<label><i class="iconfont icon-lingdang"></i>上课</label>
<label>{{ curClassReserv.classDay }} {{ getWeekday1(curClassReserv.classDay) }}</label>
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
@ -36,13 +26,7 @@
<el-popover placement="top-start" :width="250" trigger="hover">
<template #default>
<div>
<el-button
v-if="lastAsyncAllTime"
type="success"
size="small"
:icon="Check"
circle
/>
<el-button v-if="lastAsyncAllTime" type="success" size="small" :icon="Check" circle />
{{ lastAsyncAllTime ? toTimeText(lastAsyncAllTime) + '同步成功' : '' }}
</div>
</template>
@ -60,67 +44,26 @@
<el-button @click="handleOutLink('feedback')">作业反馈</el-button>
<el-button @click="handleOutLink('homeWork')">布置作业</el-button>
<el-button @click="isDialogOpen = true">上传资料</el-button>
<el-button type="primary" style="margin-left: 10px" @click="createFile"
>新建课件</el-button
>
<el-button type="primary" style="margin-left: 10px" @click="createFile">新建课件</el-button>
</div>
</div>
<el-checkbox-group
v-model="checkFileList"
class="prepare-body-main"
:style="{ 'margin-bottom': checkFileList.length > 0 ? '40px' : '0' }"
>
<file-list-item
v-for="(item, index) in currentFileList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item>
<file-list-item
v-for="(item, index) in currentWorkList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
<el-checkbox-group v-model="checkFileList" class="prepare-body-main"
:style="{ 'margin-bottom': checkFileList.length > 0 ? '40px' : '0' }">
<file-list-item v-for="(item, index) in currentFileList" :key="index" :item="item" :index="index"
@on-move="onMoveSingleFile" @on-delete="deleteTalk" @on-set="openSet" @on-delhomework="delhomework">
<el-checkbox label="" :value="item" v-if="!item.uniquekey" />
</file-list-item>
</el-checkbox-group>
<file-oper-batch
v-show="checkFileList.length > 0"
<file-oper-batch v-show="checkFileList.length > 0"
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentFileList.length"
:choose="checkFileList"
:check-all="isCheckAll"
@click-delete="clickDelete"
@click-move="clickMove"
@cancel="checkFileList = []"
@click-choose="clickChoose"
></file-oper-batch>
:choose="checkFileList" :check-all="isCheckAll" @click-delete="clickDelete" @click-move="clickMove"
@cancel="checkFileList = []" @click-choose="clickChoose"></file-oper-batch>
</div>
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
<SetHomework
v-model="setDialog"
:entpcourseid="entpcourseid"
:row="row"
@on-close="closeHomework"
/>
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" @on-close="closeHomework" />
</div>
<reserv
ref="reservDialog"
:current-node="currentNode"
:book-id="uploadData.textbookId"
@add-success="initReserv"
></reserv>
<reserv ref="reservDialog" @add-success="initReserv" :current-node="currentNode" :book-id="uploadData.textbookId"></reserv>
</template>
<script setup>
import { Check } from '@element-plus/icons-vue'
@ -175,7 +118,6 @@ export default {
fileList: [],
currentNode: {},
currentFileList: [],
currentWorkList: [],
curBookPath: '',
curClassReserv: {},
downloadNum: 0,
@ -223,20 +165,17 @@ export default {
this.initReserv()
},
mounted() {
this.$watch(
() => toolStore.isToolWin,
(newD, oldD) => {
setTimeout(this.initReserv, 500)
}
)
this.$watch(()=>toolStore.isToolWin,(newD, oldD)=>{
setTimeout(this.initReserv, 500)
})
},
activated() {
if (this.uploadData.textbookId !== null) {
this.asyncAllFile()
this.initHomeWork()
this.initReserv()
}
},
// activated() {
// if (this.uploadData.textbookId !== null) {
// this.asyncAllFile()
// this.initHomeWork()
// this.initReserv()
// }
// },
methods: {
initReserv() {
getSelfReserv().then((res) => {
@ -245,7 +184,7 @@ export default {
})
if (list.length > 0) {
this.curClassReserv = list[list.length - 1]
} else {
}else {
this.curClassReserv = {}
}
})
@ -254,7 +193,7 @@ export default {
let fileName = this.curBookPath
if (!fileName) return
fileName = fileName.replace('.txt', '.pdf')
return new Promise((resolve, reject) => {
return new Promise((resolve, reject)=>{
const userDataPath = Remote.app.getPath('userData')
const appRootFilePath = userDataPath + '\\selfFile\\'
let filePath = appRootFilePath + fileName
@ -416,11 +355,9 @@ export default {
this.uploadData.levelSecondId = cata[1]
this.uploadData.levelThirdId = cata[2]
this.uploadData.textbookId = data.textBook.curBookId
const toolStore = useToolState()
toolStore.curSubjectNode.data = data
toolStore.curSubjectNode.querySearch = this.uploadData
this.initHomeWork()
await this.asyncAllFile()
},
async initHomeWork() {
if (this.timerId) {
@ -431,10 +368,11 @@ export default {
let { rows } = await this.getChapterId()
if (rows.length > 0) {
this.entpcourseid = rows[0].id
} else {
await this.createEntpcourse()
let { rows } = await this.getChapterId()
this.entpcourseid = rows[0].id
}
else{
await this.createEntpcourse()
let { rows } = await this.getChapterId()
this.entpcourseid = rows[0].id
}
//
@ -444,26 +382,26 @@ export default {
// entpcourse
createEntpcourse() {
// web AIx
var cform = {}
cform.entpid = this.userStore.deptId
cform.level = 1
cform.parentid = 0
cform.dictid = 0
cform.evalid = this.currentNode.id
cform.evalparentid = 0
cform.edusubject = this.currentNode.edusubject
cform.edudegree = this.currentNode.edudegree
cform.edustage = this.currentNode.edustage
cform.coursetype = '课标学科'
cform.coursetitle = this.currentNode.itemtitle
cform.coursedesc = ''
cform.status = ''
cform.dflag = 0
cform.edituserid = this.userStore.userId
cform.createblankfile = 'yes'
var cform = {};
cform.entpid = this.userStore.deptId;
cform.level = 1;
cform.parentid = 0;
cform.dictid = 0;
cform.evalid = this.currentNode.id;
cform.evalparentid = 0;
cform.edusubject = this.currentNode.edusubject;
cform.edudegree = this.currentNode.edudegree;
cform.edustage = this.currentNode.edustage;
cform.coursetype = '课标学科';
cform.coursetitle = this.currentNode.itemtitle;
cform.coursedesc = '';
cform.status = '';
cform.dflag = 0;
cform.edituserid = this.userStore.userId;
cform.createblankfile = 'yes';
return addEntpcourse(cform)
},
openReserv() {
openReserv(){
this.$refs['reservDialog'].openDialog()
},
//
@ -483,7 +421,6 @@ export default {
},
// ID ID
getChapterId() {
console.log(this.userStore, 'this.userStore')
return listEntpcourse({
evalid: this.uploadData.levelSecondId,
edituserid: this.userStore.userId,
@ -494,7 +431,7 @@ export default {
createTimer() {
this.timerId = setInterval(() => {
this.getHomeWorkList()
}, 2500)
}, 1500)
},
//
getHomeWorkList() {
@ -559,7 +496,7 @@ export default {
//
let ary = uniqBy([...this.currentFileList, ...list], 'id')
//
this.currentWorkList = cloneDeep(ary)
this.currentFileList = cloneDeep(ary)
})
},
getWeekday1(date) {
@ -575,16 +512,14 @@ export default {
//
delhomework(item) {
this.isLoading = true
delClasswork(item.id)
.then(async (res) => {
ElMessage.success('操作成功')
this.isLoading = false
await this.asyncAllFile()
this.getHomeWorkList()
})
.catch(() => {
this.isLoading = false
})
delClasswork(item.id).then(async res => {
ElMessage.success('操作成功')
this.isLoading = false
await this.asyncAllFile()
this.getHomeWorkList()
}).catch(() => {
this.isLoading = false
})
},
closeHomework() {
this.setDialog = false
@ -603,15 +538,7 @@ export default {
const toolStore = useToolState()
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
startClass(this.curClassReserv.id)
createWindow('tool-sphere', {
url:
'/tool/sphere?entpcourseid=' +
this.entpcourseid +
'&label=' +
this.currentNode.label +
'&reservId=' +
this.curClassReserv.id
})
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + this.entpcourseid +'&label=' + this.currentNode.label+ "&reservId=" + this.curClassReserv.id })
}
}
}
@ -691,7 +618,7 @@ export default {
cursor: pointer;
}
:deep(.el-progress-circle) {
width: 90px !important;
width: 90px!important;
background-color: white;
}
}

View File

@ -34,8 +34,6 @@
import { ref, getCurrentInstance } from 'vue'
import { updateUserProfile } from '@/api/system/user'
import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus'
const props = defineProps({
user: {
@ -44,7 +42,6 @@ const props = defineProps({
})
const { proxy } = getCurrentInstance()
const userStore = useUserStore()
const rules = ref({
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
@ -99,17 +96,7 @@ function submit() {
if (valid) {
console.log(props.user)
updateUserProfile(props.user).then((response) => {
if(response.code == 200){
userStore.getInfo().then(res => {
if(res.code === 200){
ElMessage.success('修改成功')
}else{
ElMessage.error(response.msg)
}
})
}else{
ElMessage.error(response.msg)
}
proxy.$modal.msgSuccess('修改成功')
})
}
})

View File

@ -36,13 +36,11 @@
</div>
</div>
<div class="item-btns" @click.stop>
<!-- 只有自己创建的课件可以修改名称-->
<el-popover
placement="bottom-end"
trigger="hover"
popper-class="custom-popover"
:visible="item.showPopover"
v-if="Number(item.createUserId) === userInfo.userId"
>
<template #reference>
<el-button link type="primary">

View File

@ -8,7 +8,7 @@
<h3 class="title">{{ lesson }}</h3>
<div class="grade">{{ usertore.edusubject }}</div>
</div>
<i class="iconfont icon-xiangyou" @click="showLeft = !showLeft"></i>
<!-- <i class="iconfont icon-xiangyou"></i> -->
</div>
<div class="homework-list" v-loading="loading">
<el-scrollbar height="360px">
@ -42,26 +42,22 @@
</div>
<el-button color="#349d44" @click="sendHomework(item)">推送</el-button>
</li>
<div class="no-data flex" v-if="!dataList.length && !resourceList.length">
<i class="iconfont icon-zanwushuju"></i>
<span>暂无数据</span>
</div>
</ul>
</el-scrollbar>
</div>
<SetHomework v-model="setDialog" :title="'推送作业'" :entpcourseid="entpcourseid" :row="curRow"
@on-close="closeHomework" />
</div>
<div class="homework flex" v-else>
<div class="homework" @click="showLeft = !showLeft" v-else>
<div class="unit-top flex">
<div class="unit-top-left" @click="showLeft = !showLeft">
<div class="unit-top-left">
<i class="iconfont icon-xiangzuo"></i>
<span>返回</span>
</div>
<span class="unit-top-center">选择目录</span>
</div>
<div class="unit-content">
<Lesson @changeChapter="changeChapter" />
<div>
<!-- <Lesson/> -->
</div>
</div>
</transition>
@ -76,12 +72,10 @@ import { homeworklist } from '@/api/teaching/classwork'
import { getSmarttalkPage, getPrepareById } from '@/api/file'
import SetHomework from '@/views/prepare/container/set-homework.vue'
import FileImage from '@/components/file-image/index.vue'
import { useGetHomework } from '@/hooks/useGetHomework'
import { ipcMsgSend } from '@/utils/tool'
import { useToolState } from '@/store/modules/tool'
import { asyncLocalFile } from '@/utils/talkFile'
import Lesson from './lesson.vue';
import { parseCataByNode } from '@/utils/talkFile'
const { ipcRenderer } = window.electron || {}
const route = useRoute();
@ -114,28 +108,13 @@ const closeHomework = () => {
setDialog.value = false
}
const changeChapter = async (data)=>{
const res = await useGetHomework(data)
dataList.value = res
let cata = parseCataByNode(data)
toolStore.curSubjectNode.querySearch.levelFirstId = cata[0]
toolStore.curSubjectNode.querySearch.levelSecondId = cata[1]
lesson.value = data.label
showLeft.value = !showLeft.value
getResource()
}
//
const getResource = () => {
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
querySearch.orderByColumn = 'uploadTime'
querySearch.isAsc = 'desc'
querySearch.pageSize = 500
getSmarttalkPage(querySearch).then(res => {
let data = toRaw(toolStore.curSubjectNode)
data.orderByColumn = 'uploadTime'
data.isAsc = 'desc'
data.pageSize = 500
getSmarttalkPage(data).then(res => {
resourceList.value = res.rows
})
@ -231,9 +210,9 @@ onMounted(() => {
entpcourseid.value = route.query.entpcourseid
lesson.value = route.query.label
getHomework()
setTimeout(()=>{
setTimeout(() => {
getResource()
},5000)
}, 5000)
})
</script>
@ -245,9 +224,8 @@ onMounted(() => {
.homework {
width: 100%;
height: 100%;
position: absolute;
flex-direction: column;
}
.homework-content {
@ -339,18 +317,6 @@ onMounted(() => {
.unit-top-center{
margin: 0 auto;
}
}
.unit-content{
height: calc(100% - 50px);
}
.no-data{
padding-top: 30px;
color: #d7d7d7;
align-items: center;
flex-direction: column;
color: 12px;
.icon-zanwushuju{
font-size: 50px;
}
}
</style>

View File

@ -1,6 +1,5 @@
<template>
<el-scrollbar>
<div>
<el-tree ref="refTree" :data="treeData" :props="defaultProps" node-key="id"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNodeId" highlight-current
@node-click="handleNodeClick">
@ -8,16 +7,14 @@
<span :title="node.label" class="tree-label">{{ node.label }}</span>
</template>
</el-tree>
</el-scrollbar>
</div>
</template>
<script setup>
import { ref, onMounted, nextTick, markRaw, toRaw } from 'vue'
import { useToolState } from '@/store/modules/tool'
import { parseCataByNode } from '@/utils/talkFile'
const emit = defineEmits(['changeChapter'])
const toolStore = useToolState()
const treeData = ref([])
const defaultProps = {
@ -46,9 +43,12 @@ const getTreeData = () => {
//
let volumeTwo = evaluationList.value.filter(item => item.level == 1 && item.semester == '下册')
//
console.log(volumeOne,1)
console.log(volumeTwo,2)
let upData = transData(volumeOne)
let downData = transData(volumeTwo)
console.log(upData)
console.log(downData)
if(upData.length && downData.length){
treeData.value = [...upData,...downData]
}
@ -61,50 +61,28 @@ const getTreeData = () => {
}
nextTick(() => {
let defaultKey
if(toolStore.curSubjectNode.querySearch.levelSecondId){
defaultKey = toolStore.curSubjectNode.querySearch.levelSecondId
if(toolStore.curSubjectNode.levelSecondId){
defaultKey = toolStore.curSubjectNode.levelSecondId
}
else{
defaultKey = toolStore.curSubjectNode.querySearch.levelFirstId
defaultKey = toolStore.curSubjectNode.levelFirstId
}
currentNodeId.value = defaultKey
defaultExpandedKeys.value = defaultKey
// currentNode.data = getLastLevelData(treeData.value)[0]
// currentNodeId.value = getLastLevelData(treeData.value)[0].id
// currentNodeName.value = getLastLevelData(treeData.value)[0].label
})
}
const handleNodeClick = (data, node) => {
/**
* data : 当前节点数据
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
*/
const nodeData = data;
const parentNode = node.parent.data;
if (Array.isArray(parentNode)) {
nodeData.parentNode = null
}
else {
nodeData.parentNode = parentNode
}
emit('changeChapter', toRaw(nodeData))
}
// ID ID
const getChapterId = () => {
return listEntpcourse({
evalid: this.uploadData.levelSecondId,
edituserid: this.userStore.userId,
pageSize: 500
})
}
const handleNodeClick = ()=>{}
const transData = (data) => {
let ary = []
data.forEach(item => {
let obj = {}
console.log(item.rootid, '==========>',curBookId.value)
if (item.rootid == curBookId.value) {
obj.label = item.itemtitle
obj.id = item.id
@ -136,36 +114,16 @@ const transData = (data) => {
onMounted(()=>{
setTimeout(()=>{
let data = toRaw(toolStore.curSubjectNode)
curBookId.value = data.data.textBook.curBookId
getTreeData()
},500)
// console.log(toolStore.curSubjectNode,111)
// let data = toRaw(toolStore.curSubjectNode)
// console.log(data,222)
// curBookId.value = toolStore.curSubjectNode.textbookId
// getTreeData()
})
</script>
<style lang="scss" scoped>
.el-tree{
background-color: #121212
}
:deep(.el-tree-node) {
.el-tree-node__content {
height: 45px;
color: #EFEFEF;
//#368FFF
&:hover {
background-color: #272728;
}
}
}
:deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
background-color: #121212 !important;
color: #409EFF
}
:deep(.el-scrollbar__view){
height: 100%;
}
</style>
<style lang="scss" scoped></style>