Compare commits
11 Commits
fa54546f5e
...
c9bfd41fc7
Author | SHA1 | Date |
---|---|---|
baigl | c9bfd41fc7 | |
白了个白 | 51a8df474a | |
白了个白 | fbbd84df93 | |
朱浩 | 5cc93bb093 | |
朱浩 | eefa9aff63 | |
朱浩 | 3ef73885e1 | |
zouyf | bc63691645 | |
朱浩 | d50327bc17 | |
白了个白 | 78eb65d532 | |
朱浩 | 77921f7e61 | |
朱浩 | ac1cad8fd0 |
|
@ -53,3 +53,14 @@ export const moveSmarttalk = (params) => {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const addFileToPrepareThird = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/smarttalk/file/addFileToPrepareThird',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
style="margin-bottom: 1px"
|
style="margin-bottom: 1px"
|
||||||
@change="tableRadioChange"
|
@change="tableRadioChange"
|
||||||
>
|
>
|
||||||
<el-radio-button :value="1" :label="'已交' + '(' + tableRadio.num1 + ')'" />
|
<el-radio-button :value="1" :label="'已交' + '(' + tableRadio.num1 + ')'"/>
|
||||||
<el-radio-button :value="0" :label="'未交' + '(' + tableRadio.num0 + ')'" />
|
<el-radio-button :value="0" :label="'未交' + '(' + tableRadio.num0 + ')'"/>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 学生列表:classWorkAnalysis.classworkdata; 已交未交:tableRadio.list -->
|
<!-- 学生列表:classWorkAnalysis.classworkdata; 已交未交:tableRadio.list -->
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -179,7 +179,7 @@ const classWorkAnalysis = reactive({
|
||||||
entpcourseworklistarray: [], // 当前学习任务所包含的试题ID
|
entpcourseworklistarray: [], // 当前学习任务所包含的试题ID
|
||||||
})
|
})
|
||||||
const tableRadio = reactive({
|
const tableRadio = reactive({
|
||||||
value: '1', // 已交
|
value: 1, // 已交
|
||||||
list: [], // 已交list
|
list: [], // 已交list
|
||||||
num1: 0, // 已交人数
|
num1: 0, // 已交人数
|
||||||
num0: 0 // 未交人数
|
num0: 0 // 未交人数
|
||||||
|
@ -219,7 +219,7 @@ const openDialog = (data, isInit=true) => {
|
||||||
classWorkAnalysis.workclass = data.workclass
|
classWorkAnalysis.workclass = data.workclass
|
||||||
// 重置学生列表
|
// 重置学生列表
|
||||||
tableRadio.list = []
|
tableRadio.list = []
|
||||||
tableRadio.value = '1'
|
tableRadio.value = 1
|
||||||
tableRadio.num0 = 0
|
tableRadio.num0 = 0
|
||||||
tableRadio.num1 = 0
|
tableRadio.num1 = 0
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.list =
|
tableRadio.list =
|
||||||
classWorkAnalysis.classworkdata &&
|
classWorkAnalysis.classworkdata &&
|
||||||
classWorkAnalysis.classworkdata.filter((item) => item.finishtimelength != '0')
|
classWorkAnalysis.classworkdata.filter((item) => item.finishtimelength != '0')
|
||||||
tableRadio.value = '1'
|
tableRadio.value = 1
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
// 自动批阅判断
|
// 自动批阅判断
|
||||||
|
@ -417,7 +417,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
*/
|
*/
|
||||||
const teacherCriticism = ()=>{
|
const teacherCriticism = ()=>{
|
||||||
// 已交的list才自动批阅判断
|
// 已交的list才自动批阅判断
|
||||||
if(tableRadio.value == '1'&& classWorkAnalysis.worktype == '习题训练'){
|
if(tableRadio.value == 1 && classWorkAnalysis.worktype == '习题训练'){
|
||||||
// 只有习题训练才会自动批阅
|
// 只有习题训练才会自动批阅
|
||||||
tableRadio.list = tableRadio.list.map((item) => {
|
tableRadio.list = tableRadio.list.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
@ -572,16 +572,16 @@ const tableRadioChange = (e) => {
|
||||||
isopen_dtwk_table.value = false;
|
isopen_dtwk_table.value = false;
|
||||||
console.log(e,'??????')
|
console.log(e,'??????')
|
||||||
console.log("学生列表:", classWorkAnalysis.classworkdata)
|
console.log("学生列表:", classWorkAnalysis.classworkdata)
|
||||||
if(e=='1'){
|
if(e==1){
|
||||||
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength != '0')
|
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength != '0')
|
||||||
tableRadio.value = '1';
|
tableRadio.value = 1;
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
||||||
tableRadio.num1 = tableRadio.list.length;
|
tableRadio.num1 = tableRadio.list.length;
|
||||||
// 自动批阅判断
|
// 自动批阅判断
|
||||||
teacherCriticism();
|
teacherCriticism();
|
||||||
}else if(e=='0'){
|
}else if(e==0){
|
||||||
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0')
|
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0')
|
||||||
tableRadio.value = '0';
|
tableRadio.value = 0;
|
||||||
tableRadio.num0 = tableRadio.list.length;
|
tableRadio.num0 = tableRadio.list.length;
|
||||||
tableRadio.num1 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
tableRadio.num1 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
import { ref, defineExpose,defineEmits } from 'vue'
|
import { ref, defineExpose,defineEmits } from 'vue'
|
||||||
import ChooseTextbook from './chooseTextbook.vue'
|
import ChooseTextbook from './chooseTextbook.vue'
|
||||||
const emit = defineEmits(['onsuccess'])
|
const emit = defineEmits(['onsuccess'])
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const getNodeInfo = ref({})
|
const getNodeInfo = ref({})
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
const nodeClick = (data) => {
|
const nodeClick = (data) => {
|
||||||
getNodeInfo.value = {
|
getNodeInfo.value = {
|
||||||
textbookId:data.node.rootid,
|
textbookId:data.node.rootid,
|
||||||
bookList:getFullObj(data.node)
|
cataList:getFullObj(data.node)
|
||||||
}
|
}
|
||||||
console.log(getNodeInfo.value,'log')
|
console.log(getNodeInfo.value,'log')
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<div v-loading="isLoading" class="page-resource flex">
|
<div v-loading="isLoading" class="page-resource flex">
|
||||||
<ChooseTextbook @node-click="nodeClick" />
|
<ChooseTextbook @node-click="nodeClick" />
|
||||||
<div class="page-center-wrap">
|
<div class="page-center-wrap">
|
||||||
<el-button @click="openChapter" type="primary">打开章节</el-button>
|
|
||||||
<el-tabs v-model="activeAptTab" style="height: 100%;">
|
<el-tabs v-model="activeAptTab" style="height: 100%;">
|
||||||
<el-tab-pane label="教学课件" name="教学课件" class="prepare-center-jxkj">
|
<el-tab-pane label="教学课件" name="教学课件" class="prepare-center-jxkj">
|
||||||
<div class="prepare-center-header">
|
<div class="prepare-center-header">
|
||||||
|
@ -141,8 +140,6 @@
|
||||||
<!-- 上课配置 -->
|
<!-- 上课配置 -->
|
||||||
<class-start ref="calssRef" @close="closeChange"/>
|
<class-start ref="calssRef" @close="closeChange"/>
|
||||||
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
|
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
|
||||||
<!-- 章节弹窗 -->
|
|
||||||
<TreeLog ref="treelogRef"/>
|
|
||||||
<!-- <button @click="test">test</button> -->
|
<!-- <button @click="test">test</button> -->
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -637,7 +634,7 @@ export default {
|
||||||
},
|
},
|
||||||
async nodeClick(data) {
|
async nodeClick(data) {
|
||||||
console.log(data,'data');
|
console.log(data,'data');
|
||||||
|
|
||||||
if (this.currentNode.id === data.node.id) return
|
if (this.currentNode.id === data.node.id) return
|
||||||
this.curBookImg = data.textBook.curBookImg
|
this.curBookImg = data.textBook.curBookImg
|
||||||
this.curBookPath = data.textBook.curBookPath
|
this.curBookPath = data.textBook.curBookPath
|
||||||
|
@ -796,11 +793,6 @@ export default {
|
||||||
'&reservId=' +
|
'&reservId=' +
|
||||||
id
|
id
|
||||||
})
|
})
|
||||||
},
|
|
||||||
// 打开章节
|
|
||||||
openChapter(){
|
|
||||||
// 打开弹窗
|
|
||||||
this.$refs.treelogRef.openDialog()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-button v-loading="item.loading" size="small" plain round type="primary" @click.stop="openChapter(item)">
|
||||||
|
<i class="iconfont icon-jiahao"></i>
|
||||||
|
备课</el-button
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -66,25 +70,27 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<FilePreview ref="thirdPreview" v-model="isViewImg"></FilePreview>
|
<FilePreview ref="thirdPreview" v-model="isViewImg"></FilePreview>
|
||||||
|
<TreeLog ref="treelogRef" @onsuccess="addToPrepare"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
// import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { Clock,View,Folder,Search } from '@element-plus/icons-vue'
|
import { Clock,View,Folder } from '@element-plus/icons-vue'
|
||||||
import FileImage from '@/components/file-image/index.vue'
|
import FileImage from '@/components/file-image/index.vue'
|
||||||
import FilePreview from '@/components/thirdFile-preview/index.vue'
|
import FilePreview from '@/components/thirdFile-preview/index.vue'
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
import useResoureStore from '../store'
|
import useResoureStore from '../store'
|
||||||
|
import { addFileToPrepareThird } from '@/api/file'
|
||||||
|
import TreeLog from '@/views/prepare/components/treeLog.vue'
|
||||||
|
|
||||||
const userstore = useUserStore()
|
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
|
|
||||||
// const userInfo = userstore.user
|
|
||||||
//判断是否预览图片
|
//判断是否预览图片
|
||||||
const isViewImg = ref(false)
|
const isViewImg = ref(false)
|
||||||
const thirdPreview = ref()
|
const thirdPreview = ref()
|
||||||
|
const treelogRef = ref()
|
||||||
|
const currentItem = ref()
|
||||||
|
|
||||||
// 分页change
|
// 分页change
|
||||||
const handleSizeChange = (limit) => {
|
const handleSizeChange = (limit) => {
|
||||||
|
@ -114,6 +120,31 @@ const handleRow = (item) => {
|
||||||
isViewImg.value = true
|
isViewImg.value = true
|
||||||
thirdPreview.value.init(item.itemId)
|
thirdPreview.value.init(item.itemId)
|
||||||
}
|
}
|
||||||
|
const openChapter = (item)=>{
|
||||||
|
currentItem.value = item
|
||||||
|
// 打开弹窗
|
||||||
|
treelogRef.value.openDialog()
|
||||||
|
}
|
||||||
|
const addToPrepare = (data) => {
|
||||||
|
console.log(data)
|
||||||
|
let chapterArr = []
|
||||||
|
for (let i = 0; i < data.cataList.length; i++) {
|
||||||
|
chapterArr.push({id: data.cataList[i].id,name: data.cataList[i].title})
|
||||||
|
}
|
||||||
|
let postData = {
|
||||||
|
itemId: currentItem.value.itemId,
|
||||||
|
textBookId: data.textbookId,
|
||||||
|
chapter: JSON.stringify(chapterArr)
|
||||||
|
}
|
||||||
|
currentItem.value.loading = true
|
||||||
|
addFileToPrepareThird(postData).then((res) => {
|
||||||
|
currentItem.value.loading = false
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 200) {
|
||||||
|
ElMessage.success("加入备课成功")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
Loading…
Reference in New Issue