Compare commits
No commits in common. "5cc93bb093b2b864b6dffec3f5da2b1ae3ea3efb" and "bc63691645a8b10cf6840a75c8c77b713e414eed" have entirely different histories.
5cc93bb093
...
bc63691645
|
@ -53,14 +53,3 @@ 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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
@ -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,
|
||||||
cataList:getFullObj(data.node)
|
bookList:getFullObj(data.node)
|
||||||
}
|
}
|
||||||
console.log(getNodeInfo.value,'log')
|
console.log(getNodeInfo.value,'log')
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<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">
|
||||||
|
@ -140,6 +141,8 @@
|
||||||
<!-- 上课配置 -->
|
<!-- 上课配置 -->
|
||||||
<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>
|
||||||
|
@ -634,7 +637,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
|
||||||
|
@ -793,6 +796,11 @@ export default {
|
||||||
'&reservId=' +
|
'&reservId=' +
|
||||||
id
|
id
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 打开章节
|
||||||
|
openChapter(){
|
||||||
|
// 打开弹窗
|
||||||
|
this.$refs.treelogRef.openDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,6 @@
|
||||||
</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>
|
||||||
|
@ -70,27 +66,25 @@
|
||||||
/>
|
/>
|
||||||
</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 } from 'element-plus'
|
// import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { Clock,View,Folder } from '@element-plus/icons-vue'
|
import { Clock,View,Folder,Search } 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) => {
|
||||||
|
@ -120,31 +114,6 @@ 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