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