commit
eae2171c70
|
@ -57,6 +57,7 @@
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"hfmath": "^0.0.2",
|
"hfmath": "^0.0.2",
|
||||||
"html-to-image": "^1.11.11",
|
"html-to-image": "^1.11.11",
|
||||||
|
"html2canvas": "^1.4.1",
|
||||||
"im_electron_sdk": "^8.0.5904",
|
"im_electron_sdk": "^8.0.5904",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
|
|
|
@ -54,7 +54,8 @@ export class PPTApi {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc', pageSize: 9999 }
|
const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc', pageSize: 9999 }
|
||||||
const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params)
|
const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params)
|
||||||
if (res.code === 200) {
|
console.log(res.rows,'res.rows');
|
||||||
|
if (res.code === 200) {
|
||||||
const slides = (res.rows || []).map(o => {
|
const slides = (res.rows || []).map(o => {
|
||||||
if (!!o.datacontent) {
|
if (!!o.datacontent) {
|
||||||
const json = JSON.parse(o.datacontent)
|
const json = JSON.parse(o.datacontent)
|
||||||
|
@ -64,8 +65,15 @@ export class PPTApi {
|
||||||
// 如果没有数据,默认空白页
|
// 如果没有数据,默认空白页
|
||||||
return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}}
|
return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}}
|
||||||
})
|
})
|
||||||
|
// 活动列表处理
|
||||||
|
const workList = (res.rows || []).map(o => o.activityContent)
|
||||||
|
const workItem = [...res.rows]
|
||||||
slidesStore.updateSlideIndex(0) // 下标0 为第一页
|
slidesStore.updateSlideIndex(0) // 下标0 为第一页
|
||||||
slidesStore.setSlides(slides) // 写入数据
|
slidesStore.setSlides(slides) // 写入数据
|
||||||
|
// 写入作业列表数据
|
||||||
|
slidesStore.setWorkList(workList)
|
||||||
|
// 获取所有的pptlist的数据
|
||||||
|
slidesStore.setWorkItem(workItem)
|
||||||
resolve(true)
|
resolve(true)
|
||||||
} else msgUtils.msgError(res.msg || '获取数据失败');resolve(false)
|
} else msgUtils.msgError(res.msg || '获取数据失败');resolve(false)
|
||||||
})
|
})
|
||||||
|
|
|
@ -31,6 +31,8 @@ export interface SlidesState {
|
||||||
slideIndex: number
|
slideIndex: number
|
||||||
viewportSize: number
|
viewportSize: number
|
||||||
viewportRatio: number
|
viewportRatio: number
|
||||||
|
workList:Object[],
|
||||||
|
workItem:Object[],
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useSlidesStore = defineStore('slides', {
|
export const useSlidesStore = defineStore('slides', {
|
||||||
|
@ -41,6 +43,8 @@ export const useSlidesStore = defineStore('slides', {
|
||||||
slideIndex: 0, // 当前页面索引
|
slideIndex: 0, // 当前页面索引
|
||||||
viewportSize: 1000, // 可视区域宽度基数
|
viewportSize: 1000, // 可视区域宽度基数
|
||||||
viewportRatio: 0.5625, // 可视区域比例,默认16:9
|
viewportRatio: 0.5625, // 可视区域比例,默认16:9
|
||||||
|
workList:[],// 活动的列表
|
||||||
|
workItem:[],// 获取到的所有pptlist
|
||||||
}),
|
}),
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
|
@ -131,6 +135,13 @@ export const useSlidesStore = defineStore('slides', {
|
||||||
setSlides(slides: Slide[]) {
|
setSlides(slides: Slide[]) {
|
||||||
this.slides = slides
|
this.slides = slides
|
||||||
},
|
},
|
||||||
|
// 更新活动列表
|
||||||
|
setWorkList(list: Object[]) {
|
||||||
|
this.workList = list
|
||||||
|
},
|
||||||
|
setWorkItem(list: Object[]) {
|
||||||
|
this.workItem = list
|
||||||
|
},
|
||||||
|
|
||||||
addSlide(slide: Slide | Slide[]) {
|
addSlide(slide: Slide | Slide[]) {
|
||||||
const slides = Array.isArray(slide) ? slide : [slide]
|
const slides = Array.isArray(slide) ? slide : [slide]
|
||||||
|
|
|
@ -6,4 +6,5 @@ export const enum ToolbarStates {
|
||||||
SLIDE_DESIGN = 'slideDesign',
|
SLIDE_DESIGN = 'slideDesign',
|
||||||
SLIDE_ANIMATION = 'slideAnimation',
|
SLIDE_ANIMATION = 'slideAnimation',
|
||||||
MULTI_POSITION = 'multiPosition',
|
MULTI_POSITION = 'multiPosition',
|
||||||
|
EL_ACTIVE = 'elActive',
|
||||||
}
|
}
|
|
@ -81,6 +81,7 @@
|
||||||
</template>
|
</template>
|
||||||
<IconVideoTwo class="handler-item" v-tooltip="'插入音视频'" />
|
<IconVideoTwo class="handler-item" v-tooltip="'插入音视频'" />
|
||||||
</Popover>
|
</Popover>
|
||||||
|
<IconPreviewOpen class="handler-item" v-tooltip="'插入试题'" @click="classWorkTaskVisible = true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-handler">
|
<div class="right-handler">
|
||||||
|
@ -110,6 +111,18 @@
|
||||||
@update="data => { createLatexElement(data); latexEditorVisible = false }"
|
@update="data => { createLatexElement(data); latexEditorVisible = false }"
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
v-model:visible="classWorkTaskVisible"
|
||||||
|
:width="880"
|
||||||
|
>
|
||||||
|
<QuestToPPTist
|
||||||
|
class="class-work-task-modal"
|
||||||
|
@close="classWorkTaskVisible = false"
|
||||||
|
@update="data => { onhtml2canvas(data); classWorkTaskVisible = false }"
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -135,6 +148,7 @@ import Modal from '../../../components/Modal.vue'
|
||||||
import Divider from '../../../components/Divider.vue'
|
import Divider from '../../../components/Divider.vue'
|
||||||
import Popover from '../../../components/Popover.vue'
|
import Popover from '../../../components/Popover.vue'
|
||||||
import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
|
import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
|
||||||
|
import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
||||||
|
@ -172,12 +186,17 @@ const insertImageElement = (files: FileList) => {
|
||||||
getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))
|
getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onhtml2canvas = (imgbs64: string) => {
|
||||||
|
createImageElement(imgbs64)
|
||||||
|
}
|
||||||
|
|
||||||
const shapePoolVisible = ref(false)
|
const shapePoolVisible = ref(false)
|
||||||
const linePoolVisible = ref(false)
|
const linePoolVisible = ref(false)
|
||||||
const chartPoolVisible = ref(false)
|
const chartPoolVisible = ref(false)
|
||||||
const tableGeneratorVisible = ref(false)
|
const tableGeneratorVisible = ref(false)
|
||||||
const mediaInputVisible = ref(false)
|
const mediaInputVisible = ref(false)
|
||||||
const latexEditorVisible = ref(false)
|
const latexEditorVisible = ref(false)
|
||||||
|
const classWorkTaskVisible = ref(false)
|
||||||
const textTypeSelectVisible = ref(false)
|
const textTypeSelectVisible = ref(false)
|
||||||
const shapeMenuVisible = ref(false)
|
const shapeMenuVisible = ref(false)
|
||||||
const moreVisible = ref(false)
|
const moreVisible = ref(false)
|
||||||
|
@ -343,6 +362,9 @@ const toggleNotesPanel = () => {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.class-work-task-modal{
|
||||||
|
height: 80vh;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (width <= 1200px) {
|
@media screen and (width <= 1200px) {
|
||||||
.right-handler .text {
|
.right-handler .text {
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|
||||||
<div class="page-number">幻灯片 {{slideIndex + 1}} / {{slides.length}}</div>
|
<div class="page-number">幻灯片 {{slideIndex + 1}} / {{slides.length}}</div>
|
||||||
|
|
||||||
|
<!-- 引入活动的列表页面 -->
|
||||||
|
<Active ref="activeRef" v-show="false"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -85,12 +88,13 @@ import ThumbnailSlide from '../../../views/components/ThumbnailSlide/index.vue'
|
||||||
import LayoutPool from './LayoutPool.vue'
|
import LayoutPool from './LayoutPool.vue'
|
||||||
import Popover from '../../../components/Popover.vue'
|
import Popover from '../../../components/Popover.vue'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
|
import Active from '../Toolbar/ElementStylePanel/Active/index.vue'
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const keyboardStore = useKeyboardStore()
|
const keyboardStore = useKeyboardStore()
|
||||||
const { selectedSlidesIndex: _selectedSlidesIndex, thumbnailsFocus } = storeToRefs(mainStore)
|
const { selectedSlidesIndex: _selectedSlidesIndex, thumbnailsFocus } = storeToRefs(mainStore)
|
||||||
const { slides, slideIndex, currentSlide } = storeToRefs(slidesStore)
|
const { slides, slideIndex, currentSlide, workList, workItem } = storeToRefs(slidesStore)
|
||||||
const { ctrlKeyState, shiftKeyState } = storeToRefs(keyboardStore)
|
const { ctrlKeyState, shiftKeyState } = storeToRefs(keyboardStore)
|
||||||
|
|
||||||
const { slidesLoadLimit } = useLoadSlides()
|
const { slidesLoadLimit } = useLoadSlides()
|
||||||
|
@ -123,6 +127,8 @@ const {
|
||||||
updateSectionTitle,
|
updateSectionTitle,
|
||||||
} = useSectionHandler()
|
} = useSectionHandler()
|
||||||
|
|
||||||
|
const activeRef = ref()
|
||||||
|
|
||||||
// 页面被切换时
|
// 页面被切换时
|
||||||
const thumbnailsRef = ref<InstanceType<typeof Draggable>>()
|
const thumbnailsRef = ref<InstanceType<typeof Draggable>>()
|
||||||
watch(() => slideIndex.value, () => {
|
watch(() => slideIndex.value, () => {
|
||||||
|
@ -145,6 +151,9 @@ watch(() => slideIndex.value, () => {
|
||||||
|
|
||||||
// 切换页面
|
// 切换页面
|
||||||
const changeSlideIndex = (index: number) => {
|
const changeSlideIndex = (index: number) => {
|
||||||
|
console.log(workItem.value[index],'hasSection');
|
||||||
|
activeRef.value.clickPPTList(workItem.value[index])
|
||||||
|
|
||||||
mainStore.setActiveElementIdList([])
|
mainStore.setActiveElementIdList([])
|
||||||
|
|
||||||
if (slideIndex.value === index) return
|
if (slideIndex.value === index) return
|
||||||
|
|
|
@ -0,0 +1,291 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-button size="small" title="活动引用" text style="height: 54px" @click="openList()">
|
||||||
|
<div class="buttonDiv">
|
||||||
|
<svg width="26" height="26" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#646473"><path d="M133.36576 308.12842667v407.74314666c0 96.39253333 78.31552 174.76266667 174.76266667 174.76266667h407.74314666c96.39253333 0 174.76266667-78.31552 174.76266667-174.76266667V308.12842667c0-96.39253333-78.31552-174.76266667-174.76266667-174.76266667H308.12842667a174.87189333 174.87189333 0 0 0-174.76266667 174.76266667zM75.09333333 308.12842667A233.19893333 233.19893333 0 0 1 308.12842667 75.09333333h407.74314666A233.19893333 233.19893333 0 0 1 948.90666667 308.12842667v407.74314666A233.19893333 233.19893333 0 0 1 715.87157333 948.90666667H308.12842667A233.19893333 233.19893333 0 0 1 75.09333333 715.87157333V308.12842667z m706.9696 192.07509333c0 24.46677333-5.67978667 48.22357333-16.98474666 71.21578667-11.35957333 22.99221333-26.76053333 43.52682667-46.25749334 61.54922666-19.44234667 18.0224-42.05226667 32.44032-67.61130666 43.25376a207.20298667 207.20298667 0 0 1-81.21002667 16.16554667h-26.54208c-10.37653333 0-21.62688 0.10922667-33.64181333 0.27306667-12.01493333 0.21845333-23.86602667 0.32768-35.66250667 0.32768h-31.9488c-13.1072 0-23.53834667 1.25610667-31.23882667 3.71370666-7.70048 2.51221333-11.35957333 7.91893333-10.92266666 16.16554667 0 6.22592-0.10922667 13.38026667-0.32768 21.46304-0.21845333 8.08277333-0.32768 15.45557333-0.32768 22.06378667 0 10.81344-3.16757333 17.74933333-9.50272 20.86229333-6.33514667 3.11296-14.7456 0.92842667-25.12213334-6.5536-10.92266667-7.42741333-23.37450667-16.27477333-37.41013333-26.43285333a36528.56490667 36528.56490667 0 0 0-126.42986667-91.09504c-10.37653333-7.42741333-15.72864-14.47253333-15.94709333-21.13536-0.27306667-6.60821333 4.36906667-13.65333333 13.9264-21.13536 9.93962667-7.48202667 21.62688-16.27477333 34.95253333-26.43285334 13.38026667-10.15808 27.30666667-20.58922667 41.83381334-31.40266666l42.81685333-31.67573334c14.03562667-10.37653333 26.48746667-19.71541333 37.41013333-28.01664 11.74186667-9.12042667 21.62688-12.61568 29.4912-10.54037333 7.97354667 2.07530667 11.96032 8.73813333 11.96032 19.87925333 0 3.2768 0.10922667 7.3728 0.32768 12.12416a2794.40042667 2794.40042667 0 0 1 1.69301334 43.85450667c0 7.86432 2.62144 12.72490667 7.80970666 14.58176 5.24288 1.85685333 12.34261333 2.83989333 21.40842667 2.83989333 20.42538667-0.43690667 43.30837333-0.65536 68.64896-0.65536h70.66965333c10.43114667 0 20.86229333-2.18453333 31.29344-6.5536 10.37653333-4.36906667 19.93386667-10.10346667 28.56277334-17.36704 8.57429333-7.26357333 15.61941333-15.67402667 21.02613333-25.17674666 5.46133333-9.55733333 8.192-19.6608 8.192-30.47424v-43.52682667c0-16.60245333-0.10922667-32.65877333-0.32768-48.22357333a2840.00256 2840.00256 0 0 1-0.38229333-40.68693334V341.6064c0-9.12042667 3.05834667-16.65706667 9.17504-22.66453333 6.11669333-6.00746667 13.81717333-10.59498667 23.10144-13.70794667 9.28426667-3.11296 19.38773333-4.64213333 30.25578666-4.64213333 10.92266667 0 20.97152 1.41994667 30.25578667 4.36906666 9.28426667 2.83989333 16.98474667 7.09973333 23.10144 12.72490667 6.11669333 5.57056 9.17504 12.56106667 9.17504 20.80768v46.03904c0 10.75882667 0.10922667 22.28224 0.32768 34.51562667 0.27306667 12.23338667 0.38229333 23.92064 0.38229333 35.11637333V500.20352z" p-id="7882"></path></svg>
|
||||||
|
<div style="margin-top: 10px">活动引用</div>
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" title="习题训练" text style="height: 54px" @click="showDialog('习题训练')">
|
||||||
|
<div class="buttonDiv">
|
||||||
|
<svg width="26" height="26" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#646473"><path d="M473.6 204.8c21.2 0 38.4 17.2 38.4 38.4s-17.2 38.4-38.4 38.4H243.2c-21.2 0-38.4-17.2-38.4-38.4s17.2-38.4 38.4-38.4h230.4z m-51.2 153.6c21.2 0 38.4 17.2 38.4 38.4s-17.2 38.4-38.4 38.4H243.2c-21.2 0-38.4-17.2-38.4-38.4s17.2-38.4 38.4-38.4h179.2zM371.2 512c21.2 0 38.4 17.2 38.4 38.4s-17.2 38.4-38.4 38.4h-128c-21.2 0-38.4-17.2-38.4-38.4S222 512 243.2 512h128z m192-384H153.6c-12.6 0-23 9.1-25.2 21l-0.4 4.6v512c0 12.6 9.1 23 21 25.2l4.6 0.4h257.1c-0.7-8.5-1.1-17-1.1-25.6 0-124 73.5-230.8 179.2-279.4V153.6c0-12.6-9.1-23-21-25.2l-4.6-0.4zM768 460.8H665.6v153.6H512v102.4h153.6v153.6H768V716.8h153.6V614.4H768V460.8zM563.2 51.2c56.6 0 102.4 45.8 102.4 102.4v209c16.6-2.8 33.7-4.2 51.2-4.2 169.7 0 307.2 137.5 307.2 307.2S886.5 972.8 716.8 972.8c-133.7 0-247.5-85.5-289.7-204.8H153.6C97 768 51.2 722.2 51.2 665.6v-512C51.2 97 97 51.2 153.6 51.2h409.6z" p-id="13225"></path></svg>
|
||||||
|
<div style="margin-top: 10px">习题训练</div>
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" title="课堂展示" text style="height: 54px" @click="showDialog('课堂展示')">
|
||||||
|
<div class="buttonDiv">
|
||||||
|
<svg width="26" height="26" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#646473"><path d="M741.75298 604.605763l3.836774 0.697596 17.43988 3.767014c154.656857 35.089039 260.133252 103.732407 260.133252 194.070985 0 88.455072-101.360583 156.261326-251.134274 191.838682l-9.068737 2.092785-17.370121 3.836774-17.788678 3.487976c-23.927515 4.39485-48.831664 8.092104-74.642686 11.022004l-19.462907 2.023026-24.69487 2.092786-5.022685 0.348797-20.090742 1.325431-10.18489 0.488317-10.25465 0.418557-20.579058 0.697595c-10.324409 0.209279-20.788337 0.348798-31.322025 0.348798l-15.695892-0.139519-15.556373-0.279038-20.648818-0.627836-10.18489-0.418557-10.18489-0.488317-20.160501-1.325431-9.975612-0.697595-19.741944-1.743988a1100.665713 1100.665713 0 0 1-75.968118-9.905852l-18.137475-3.139178-17.788678-3.487976-17.37012-3.767014C105.406635 961.983786 0 893.410178 0 803.141358c0-88.594591 101.360583-156.261326 251.134273-191.9782l8.998979-2.092785 17.43988-3.767014 3.767014-0.697596v93.756796l-10.952245 2.581102-15.207575 3.906533-14.6495 4.046052-13.951904 4.185572c-75.340282 23.857756-121.660604 61.946454-121.660603 89.989781 0 27.206213 43.250903 61.527897 114.196335 85.036855l7.394509 2.371824 14.021663 4.255331 14.6495 4.046052 15.207575 3.906533c8.580421 2.092786 17.43988 4.115812 26.578377 5.999319l13.951904 2.790381 17.021323 3.139178 8.7897 1.39519 17.788678 2.790381 9.068737 1.255672 18.556033 2.302064 14.161182 1.604469 14.370462 1.39519 19.532665 1.53471a1139.731044 1139.731044 0 0 0 142.867498 1.255671l19.881463-1.255671 19.532666-1.53471c8.580421-0.767355 17.021323-1.674228 25.392466-2.581102l12.417194-1.53471 18.276995-2.441583 17.858437-2.790381 8.71994-1.39519 17.091082-3.139178c9.417535-1.813748 18.486273-3.697255 27.415492-5.720281l13.11479-3.069419 15.207575-3.906533 14.649499-4.046052 13.951904-4.185572c75.340282-23.857756 121.590844-59.365352 121.590845-87.408679 0-27.206213-43.250903-64.178759-114.196335-87.617957l-7.39451-2.371824-14.021663-4.255331-14.649499-4.115811-15.207576-3.836774-10.952245-2.581102V604.605763zM451.204578 588.072757l121.660604 69.82928-131.078139 86.153008 9.417535-155.982288z m280.921589-484.131072l121.660603 69.82928-257.552149 443.810069-121.590844-69.899039 257.48239-443.74031zM842.904285 6.278357l40.530281 23.22992a46.459841 46.459841 0 0 1 17.160842 63.690442l-23.439198 40.321003L755.565365 63.620683l23.36944-40.321003a46.948157 46.948157 0 0 1 63.96948-17.021323z" p-id="59383"></path></svg>
|
||||||
|
<div style="margin-top: 10px">课堂展示</div>
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" title="常规作业" text style="height: 54px;margin-left: 0" @click="showDialog('常规作业')">
|
||||||
|
<div class="buttonDiv">
|
||||||
|
<svg width="26" height="26" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#646473"><path d="M901.705143 511.926857h-55.954286a8.045714 8.045714 0 0 1-8.045714-8.045714V183.881143H181.686857v656.091428H501.76c4.388571 0 8.045714 3.510857 8.045714 7.899429v56.027429c0 4.388571-3.657143 8.045714-8.045714 8.045714H141.750857a31.963429 31.963429 0 0 1-32.036571-32.036572V143.872c0-17.627429 14.336-31.963429 32.036571-31.963429H877.714286c17.700571 0 32.036571 14.336 32.036571 31.963429V503.954286c0 4.388571-3.657143 8.045714-8.045714 8.045714zM731.428571 911.945143a36.571429 36.571429 0 0 1-36.571428-36.571429v-109.714285H585.142857a36.571429 36.571429 0 0 1 0-73.142858h109.714286v-109.714285a36.571429 36.571429 0 0 1 73.142857 0v109.714285H877.714286a36.571429 36.571429 0 1 1 0 73.142858h-109.714286v109.714285a36.571429 36.571429 0 0 1-36.571429 36.571429z" p-id="22184"></path></svg>
|
||||||
|
<div style="margin-top: 10px">常规作业</div>
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Divider />
|
||||||
|
|
||||||
|
<!-- 作业列表 -->
|
||||||
|
<div class="c-apt-r">
|
||||||
|
<!-- 显示-作业内容 -->
|
||||||
|
<template v-for="(item, index) in workList">
|
||||||
|
<div class="item">
|
||||||
|
<div class="item-title">
|
||||||
|
<el-tag :type="getTagType(item.worktype) || 'primary'">{{item.worktype}}</el-tag>
|
||||||
|
<el-tooltip :content="item.title||item.uniquekey" placement="top">
|
||||||
|
<div class="tt">{{item.title||item.uniquekey}}</div>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-button class="btn-del" type="danger" link @click="handleRemoveDemoActivityClassWork(item)">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<!-- // 推送作业 -->
|
||||||
|
<el-dialog v-model="dialogVisible" append-to-body :show-close="false" width="80%">
|
||||||
|
<NewClassTsakAssign :currentCourse='currentCourse'/>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 活动引用 -->
|
||||||
|
<el-dialog
|
||||||
|
v-loading="tasklist_loading"
|
||||||
|
v-model="activeVisible"
|
||||||
|
append-to-body
|
||||||
|
:show-close="false"
|
||||||
|
width="40%"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table :data="taskList" style="width: 100%" height="500">
|
||||||
|
<el-table-column type="selection" :selectable="selectable" width="55" />
|
||||||
|
<el-table-column prop="evaltitle" label="活动名称" width="150" />
|
||||||
|
<el-table-column prop="worktype" label="活动类型" width="120" sortable>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="getTagType(scope.row.worktype) || 'primary'">{{ scope.row.worktype }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="timestamp" label="创建时间" sortable/>
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="activeVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="save">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted, onBeforeMount, defineExpose } from 'vue'
|
||||||
|
import Divider from '../../../../../components/Divider.vue'
|
||||||
|
import {listEntpcoursefile} from '@/api/education/entpcoursefile'
|
||||||
|
import {homeworklist} from '@/api/teaching/classwork'
|
||||||
|
import { processList } from "@/hooks/useProcessList";
|
||||||
|
import { listEntpcoursework } from "@/api/classTask/index";
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import NewClassTsakAssign from '@/views/classTask/newClassTaskAssign/index.vue'
|
||||||
|
import { sessionStore } from '@/utils/store'
|
||||||
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
|
const currentCourse = reactive({
|
||||||
|
textbookId:0,
|
||||||
|
levelFirstId:0,
|
||||||
|
levelSecondId:0,
|
||||||
|
coursetitle:'',
|
||||||
|
node:{},
|
||||||
|
id:1,
|
||||||
|
worktype:'',
|
||||||
|
})
|
||||||
|
const dataList = ref([])
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const tasklist_loading = ref(false)
|
||||||
|
// 活动列表
|
||||||
|
const taskList = ref([])
|
||||||
|
// 活动引用的弹窗
|
||||||
|
const activeVisible = ref(false)
|
||||||
|
const params = reactive({
|
||||||
|
parentid:14766,
|
||||||
|
pageSize:500,
|
||||||
|
orderby:'fileidx'
|
||||||
|
})
|
||||||
|
const type = ref([
|
||||||
|
{
|
||||||
|
label:'习题训练',
|
||||||
|
value:'danger'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'课堂展示',
|
||||||
|
value:'success'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'常规作业',
|
||||||
|
value:'primary'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
// 作业列表
|
||||||
|
const workList = ref([])
|
||||||
|
const selectable = (row,index) => {
|
||||||
|
console.log(row,index,'row,index');
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
const clickPPTList = (item) => {
|
||||||
|
console.log(item,'点击了')
|
||||||
|
workList.value = []
|
||||||
|
let datacontent = item.datacontent;
|
||||||
|
let pptJson = "";
|
||||||
|
if(typeof datacontent === 'string') pptJson = JSON.parse(datacontent)
|
||||||
|
if(pptJson&&pptJson[0]&&pptJson[0].classworkList) {
|
||||||
|
homeworklist({ids:pptJson[0].classworkList, pageSize: 100}).then( async res => {
|
||||||
|
await formatClassWorkFile(res.rows)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const formatClassWorkFile = async (postData) => {
|
||||||
|
return new Promise(async (resolve, reject)=>{
|
||||||
|
for (let i = 0; i < postData.length; i++) {
|
||||||
|
let item = postData[i];
|
||||||
|
switch (item.worktype) {
|
||||||
|
case '框架梳理': {
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '习题训练': {
|
||||||
|
item.entpcourseworklistarray = item.entpcourseworklist?JSON.parse('['+item.entpcourseworklist+']'):[];
|
||||||
|
let workIds = item.entpcourseworklistarray.map(items=>items.id).join(',')
|
||||||
|
let ress = await listEntpcoursework({ids:workIds})
|
||||||
|
processList(ress.rows)
|
||||||
|
item.workShowList = ress.rows
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '课堂展示': {
|
||||||
|
item.base64 = JSON.parse(item.workcodes).base64
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '常规作业': {
|
||||||
|
item.prevData = JSON.parse(item.workcodes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
workList.value.push(item)
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除作业
|
||||||
|
const handleRemoveDemoActivityClassWork = (item) => {
|
||||||
|
ElMessageBox.confirm('是否确认删除?')
|
||||||
|
.then(function () {
|
||||||
|
workList.value.splice(workList.value.indexOf(item), 1);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
// 获取tag的样式
|
||||||
|
const getTagType = (worktype) => {
|
||||||
|
return type.value.find(item => item.label == worktype).value
|
||||||
|
}
|
||||||
|
// 获取活动引用的列表数据
|
||||||
|
const initHomeWork = async()=> {
|
||||||
|
tasklist_loading.value = true;
|
||||||
|
const { res, chapterId } = await useGetHomework(sessionStore.get('subject.curNode'));
|
||||||
|
taskList.value = res;
|
||||||
|
tasklist_loading.value = false;
|
||||||
|
}
|
||||||
|
// 多选活动引用
|
||||||
|
const handleSelectionChange = (val) => {
|
||||||
|
console.log(val,'多选')
|
||||||
|
}
|
||||||
|
// 打开添加作业活动
|
||||||
|
const showDialog = (item) => {
|
||||||
|
currentCourse.worktype = item
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
const openList = () => {
|
||||||
|
activeVisible.value = true
|
||||||
|
initHomeWork()
|
||||||
|
}
|
||||||
|
// 添加活动引用列表作业
|
||||||
|
const save = () => {
|
||||||
|
console.log('添加了')
|
||||||
|
activeVisible.value = false
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
// console.log(sessionStore.get('subject.curBook'),'curBook');
|
||||||
|
// console.log(sessionStore.get('subject.subjectTree'),'subjectTree');
|
||||||
|
// console.log(sessionStore.get('subject.bookList'),'bookList');
|
||||||
|
console.log(sessionStore.get('subject.curNode'),'curNode');
|
||||||
|
const curNode = sessionStore.get('subject.curNode')
|
||||||
|
currentCourse.textbookId = curNode.rootid
|
||||||
|
currentCourse.levelFirstId = curNode.parentNode.id
|
||||||
|
currentCourse.levelSecondId = curNode.id
|
||||||
|
currentCourse.coursetitle = curNode.itemtitle,
|
||||||
|
currentCourse.node = curNode
|
||||||
|
listEntpcoursefile(params).then((res) => {
|
||||||
|
dataList.value = [...res.rows]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
defineExpose({
|
||||||
|
clickPPTList
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.buttonDiv{
|
||||||
|
margin-top: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
// (apt)编辑区-右侧
|
||||||
|
.c-apt-r{
|
||||||
|
flex:1;
|
||||||
|
overflow: auto;
|
||||||
|
.item{
|
||||||
|
position: relative;
|
||||||
|
margin-top: 5px;
|
||||||
|
.item-title{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.tt{
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 10px;
|
||||||
|
cursor: default;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
.btn-del{
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item-body{
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid silver;
|
||||||
|
padding: 10px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 5px 10px;
|
||||||
|
cursor: default;
|
||||||
|
&:hover{
|
||||||
|
border-color: var(--el-color-primary);
|
||||||
|
.el-text{
|
||||||
|
--el-text-color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
.el-tag{
|
||||||
|
--el-tag-bg-color: var(--el-color-primary);
|
||||||
|
--el-tag-border-color: var(--el-color-primary);
|
||||||
|
--el-tag-text-color: var(--el-color-white);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.c-icon-info{
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
right: -5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item-divider{
|
||||||
|
margin: 5px 0;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
--el-border-color: var(--current-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -25,6 +25,8 @@ import SlideDesignPanel from './SlideDesignPanel.vue'
|
||||||
import SlideAnimationPanel from './SlideAnimationPanel.vue'
|
import SlideAnimationPanel from './SlideAnimationPanel.vue'
|
||||||
import MultiPositionPanel from './MultiPositionPanel.vue'
|
import MultiPositionPanel from './MultiPositionPanel.vue'
|
||||||
import SymbolPanel from './SymbolPanel.vue'
|
import SymbolPanel from './SymbolPanel.vue'
|
||||||
|
// 新增的活动页面
|
||||||
|
import SymbolActivePanel from './ElementStylePanel/Active/index.vue'
|
||||||
import Tabs from '../../../components/Tabs.vue'
|
import Tabs from '../../../components/Tabs.vue'
|
||||||
|
|
||||||
interface ElementTabs {
|
interface ElementTabs {
|
||||||
|
@ -54,6 +56,7 @@ const slideTabs = [
|
||||||
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
|
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
|
||||||
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
|
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
|
||||||
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
|
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
|
||||||
|
{ label: '活动', key: ToolbarStates.EL_ACTIVE },
|
||||||
]
|
]
|
||||||
const multiSelectTabs = [
|
const multiSelectTabs = [
|
||||||
{ label: '样式', key: ToolbarStates.EL_STYLE },
|
{ label: '样式', key: ToolbarStates.EL_STYLE },
|
||||||
|
@ -86,6 +89,7 @@ const currentPanelComponent = computed(() => {
|
||||||
[ToolbarStates.SLIDE_ANIMATION]: SlideAnimationPanel,
|
[ToolbarStates.SLIDE_ANIMATION]: SlideAnimationPanel,
|
||||||
[ToolbarStates.MULTI_POSITION]: MultiPositionPanel,
|
[ToolbarStates.MULTI_POSITION]: MultiPositionPanel,
|
||||||
[ToolbarStates.SYMBOL]: SymbolPanel,
|
[ToolbarStates.SYMBOL]: SymbolPanel,
|
||||||
|
[ToolbarStates.EL_ACTIVE]: SymbolActivePanel,// 新增的活动页面
|
||||||
}
|
}
|
||||||
return panelMap[toolbarState.value] || null
|
return panelMap[toolbarState.value] || null
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="page-top">
|
<div class="page-top" v-if="!isShow">
|
||||||
<div class="page-top-left">
|
<div class="page-top-left">
|
||||||
<el-button type="danger" :icon="Delete" @click="handleDelete">删除</el-button>
|
<el-button type="danger" :icon="Delete" @click="handleDelete">删除</el-button>
|
||||||
<el-button type="success" @click="handleTaskAssignToAllClass()">批量推送</el-button>
|
<el-button type="success" @click="handleTaskAssignToAllClass()">批量推送</el-button>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-resource">
|
<div class="page-resource">
|
||||||
<div class="page-left">
|
<div class="page-left" v-if="!isShow">
|
||||||
<el-table
|
<el-table
|
||||||
ref="taskTable"
|
ref="taskTable"
|
||||||
v-loading="tasklist_loading"
|
v-loading="tasklist_loading"
|
||||||
|
@ -154,7 +154,9 @@ const route = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
currentCourse: Object,
|
||||||
})
|
})
|
||||||
|
const isShow = ref(false)
|
||||||
|
|
||||||
const propsQueryCourseObj = route.query.courseObj;//作业布置的内容对象
|
const propsQueryCourseObj = route.query.courseObj;//作业布置的内容对象
|
||||||
const courseObj = reactive({
|
const courseObj = reactive({
|
||||||
|
@ -186,16 +188,48 @@ const fileLoading = ref(false); // 常规作业loading
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
currentRow.value = {id:0};
|
currentRow.value = {id:0};
|
||||||
console.log('propsQueryCourseObj', JSON.parse(propsQueryCourseObj));
|
if(propsQueryCourseObj){
|
||||||
if(propsQueryCourseObj&&JSON.parse(propsQueryCourseObj)){
|
if(JSON.parse(propsQueryCourseObj)){
|
||||||
courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
|
courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
|
||||||
courseObj.levelFirstId = JSON.parse(propsQueryCourseObj).levelFirstId // 单元
|
courseObj.levelFirstId = JSON.parse(propsQueryCourseObj).levelFirstId // 单元
|
||||||
courseObj.levelSecondId = JSON.parse(propsQueryCourseObj).levelSecondId // 章节
|
courseObj.levelSecondId = JSON.parse(propsQueryCourseObj).levelSecondId // 章节
|
||||||
courseObj.coursetitle = JSON.parse(propsQueryCourseObj).coursetitle // (单元/章节) 名称
|
courseObj.coursetitle = JSON.parse(propsQueryCourseObj).coursetitle // (单元/章节) 名称
|
||||||
courseObj.node = JSON.parse(propsQueryCourseObj).node; // 保存当前节点
|
courseObj.node = JSON.parse(propsQueryCourseObj).node; // 保存当前节点
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(props.currentCourse){
|
||||||
|
courseObj.textbookId = props.currentCourse.textbookId // 版本
|
||||||
|
courseObj.levelFirstId = props.currentCourse.levelFirstId // 单元
|
||||||
|
courseObj.levelSecondId = props.currentCourse.levelSecondId // 章节
|
||||||
|
courseObj.coursetitle = props.currentCourse.coursetitle // (单元/章节) 名称
|
||||||
|
courseObj.node = props.currentCourse.node; // 保存当前节点
|
||||||
|
classWorkForm.worktype = props.currentCourse.worktype
|
||||||
|
currentRow.value = {
|
||||||
|
id:props.currentCourse.id,
|
||||||
|
worktype:props.currentCourse.worktype
|
||||||
|
}
|
||||||
|
isShow.value = true;
|
||||||
|
}else{
|
||||||
|
isShow.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initHomeWork();
|
initHomeWork();
|
||||||
})
|
})
|
||||||
|
watch(() => props.currentCourse, (newVal, oldVal) => {
|
||||||
|
if(newVal){
|
||||||
|
courseObj.textbookId = newVal.textbookId // 版本
|
||||||
|
courseObj.levelFirstId = newVal.levelFirstId // 单元
|
||||||
|
courseObj.levelSecondId = newVal.levelSecondId // 章节
|
||||||
|
courseObj.coursetitle = newVal.coursetitle // (单元/章节) 名称
|
||||||
|
courseObj.node = newVal.node; // 保存当前节点
|
||||||
|
classWorkForm.worktype = newVal.worktype
|
||||||
|
currentRow.value = {
|
||||||
|
id:props.currentCourse.id,
|
||||||
|
worktype:props.currentCourse.worktype
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(newVal,'newval');
|
||||||
|
},{deep:true})
|
||||||
//---------作业设计---
|
//---------作业设计---
|
||||||
const handleItemClick = (itemName) => {
|
const handleItemClick = (itemName) => {
|
||||||
console.log('itemName', itemName);
|
console.log('itemName', itemName);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> 查找</el-button>
|
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> 查找</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-button type="primary" @click="goToQuestUpload()">添加习题</el-button>
|
<el-button v-if="!props.isHtml2canvas" type="primary" @click="goToQuestUpload()">添加习题</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 习题表格 -->
|
<!-- 习题表格 -->
|
||||||
|
@ -58,9 +58,9 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div @click="showExamAnalyseDrawer(scope.row)">
|
<div @click="showExamAnalyseDrawer(scope.row)" :id=" `screenshot-target-${scope.row.id}` " style="padding: 5px;">
|
||||||
<div style="overflow: hidden; text-overflow: ellipsis" v-html="scope.row.titleFormat"></div>
|
<div style="overflow: hidden; text-overflow: ellipsis; padding: 2px;" v-html="scope.row.titleFormat"></div>
|
||||||
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px;" v-html="scope.row.workdescFormat"></div>
|
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px; padding: 2px;" v-html="scope.row.workdescFormat"></div>
|
||||||
<el-col :span="24" style="display: flex">
|
<el-col :span="24" style="display: flex">
|
||||||
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.entpname }} {{ scope.row.editusername }}</div>
|
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.entpname }} {{ scope.row.editusername }}</div>
|
||||||
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.worktag }}</div>
|
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.worktag }}</div>
|
||||||
|
@ -70,7 +70,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="100">
|
<el-table-column width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>
|
<el-button v-if="props.isHtml2canvas" type="primary" @click="captureScreenshot(scope.row.id)">选取该题</el-button>
|
||||||
|
<div v-else>
|
||||||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
||||||
<div style="padding: 2px;"></div>
|
<div style="padding: 2px;"></div>
|
||||||
<el-button type="warning" @click="handleImportSingleDlg(scope.row)">纠错</el-button>
|
<el-button type="warning" @click="handleImportSingleDlg(scope.row)">纠错</el-button>
|
||||||
|
@ -117,6 +118,7 @@
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
import html2canvas from 'html2canvas';
|
||||||
|
|
||||||
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
||||||
import { listEvaluationclue } from '@/api/classTask'
|
import { listEvaluationclue } from '@/api/classTask'
|
||||||
|
@ -136,7 +138,7 @@ const router = useRouter()
|
||||||
|
|
||||||
|
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['addQuiz'])
|
let emit = defineEmits(['addQuiz', 'addQuizImgBs64'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const {
|
const {
|
||||||
|
@ -150,6 +152,10 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
},
|
},
|
||||||
|
isHtml2canvas: {// 是否截屏
|
||||||
|
type: Boolean,
|
||||||
|
default: () => false
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
|
@ -440,6 +446,22 @@ const handleDelete = async(item, index) => {
|
||||||
// ElMessage('试题已经存在')
|
// ElMessage('试题已经存在')
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 把该题区域id 获取为截屏区域
|
||||||
|
* @param id 试题id
|
||||||
|
*/
|
||||||
|
const captureScreenshot = (id) => {
|
||||||
|
const targetElement = document.getElementById('screenshot-target-' + id);
|
||||||
|
html2canvas(targetElement).then(canvas => {
|
||||||
|
// 将canvas转换为图像URL
|
||||||
|
const screenshotUrl = canvas.toDataURL('image/png');
|
||||||
|
// 在这里可以将截图保存到本地或上传到服务器
|
||||||
|
// console.log(screenshotUrl);
|
||||||
|
emit('addQuizImgBs64', screenshotUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 防抖
|
// 防抖
|
||||||
const debounceQueryData = debounce(() => {
|
const debounceQueryData = debounce(() => {
|
||||||
console.log("防抖 加载数据中...")
|
console.log("防抖 加载数据中...")
|
||||||
|
|
|
@ -0,0 +1,115 @@
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<div class="page-resource">
|
||||||
|
<div class="page-center">
|
||||||
|
<el-tabs v-model="activeAptTab" style="height: 100%;">
|
||||||
|
<el-tab-pane label="自主搜题" name="自主搜题" class="prepare-center-zzst">
|
||||||
|
<SearchQuestion :bookobj="courseObj" :isHtml2canvas="true" @addQuizImgBs64="handleaddQuizImgBs64" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="校本题库" name="校本题库" class="prepare-center-xbtk">
|
||||||
|
<SchoolQuestion />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="个人题库" name="个人题库" class="prepare-center-grst">
|
||||||
|
<MyQuestion :bookobj="courseObj" :isHtml2canvas="true" @addQuizImgBs64="handleaddQuizImgBs64"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, ref, watch, reactive, getCurrentInstance, nextTick } from 'vue'
|
||||||
|
|
||||||
|
import MyQuestion from '@/views/classTask/newClassTaskAssign/myQuestion/index.vue'
|
||||||
|
import SchoolQuestion from '@/views/classTask/newClassTaskAssign/schoolQuestion/index.vue'
|
||||||
|
import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue'
|
||||||
|
|
||||||
|
import { sessionStore } from '@/utils/store'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
const userStore = useUserStore().user
|
||||||
|
|
||||||
|
|
||||||
|
const emit = defineEmits(['update']);
|
||||||
|
const courseObj = reactive({
|
||||||
|
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
||||||
|
textbookId: '',
|
||||||
|
levelFirstId: '',
|
||||||
|
levelSecondId: '',
|
||||||
|
coursetitle:'',
|
||||||
|
node: null, // 选择的课程节点
|
||||||
|
//
|
||||||
|
})
|
||||||
|
|
||||||
|
const activeAptTab = ref("自主搜题");
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const curNode = sessionStore.get('subject.curNode')
|
||||||
|
courseObj.textbookId = curNode.rootid
|
||||||
|
courseObj.levelFirstId = curNode.parentNode.id
|
||||||
|
courseObj.levelSecondId = curNode.id
|
||||||
|
courseObj.coursetitle = curNode.itemtitle,
|
||||||
|
courseObj.node = curNode
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const handleaddQuizImgBs64 = (quizbs64) => {
|
||||||
|
emit('update', quizbs64)
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.page-resource {
|
||||||
|
user-select: none;
|
||||||
|
height: calc(100% - 55px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
flex: 1;
|
||||||
|
:deep(.el-tabs__nav) {
|
||||||
|
.el-tabs__item{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page-center{
|
||||||
|
flex: 1;
|
||||||
|
//min-width: calc(100% - 675px);
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: white;
|
||||||
|
|
||||||
|
.prepare-center-zzst{
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.prepare-center-xbtk{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.prepare-center-grst{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.upload-homework{
|
||||||
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -71,9 +71,9 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div @click="showExamAnalyseDrawer(scope.row)">
|
<div @click="showExamAnalyseDrawer(scope.row)" :id=" `screenshot-target-${scope.row.id}` " style="padding: 5px;">
|
||||||
<div style="overflow: hidden; text-overflow: ellipsis" v-html="scope.row.titleFormat"></div>
|
<div style="overflow: hidden; text-overflow: ellipsis; padding: 2px;" v-html="scope.row.titleFormat"></div>
|
||||||
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px;" v-html="scope.row.workdescFormat"></div>
|
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px; padding: 2px;" v-html="scope.row.workdescFormat"></div>
|
||||||
<el-col :span="24" style="display: flex">
|
<el-col :span="24" style="display: flex">
|
||||||
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.entpname }} {{ scope.row.editusername }}</div>
|
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.entpname }} {{ scope.row.editusername }}</div>
|
||||||
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.worktag }}</div>
|
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ scope.row.worktag }}</div>
|
||||||
|
@ -83,7 +83,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" width="100">
|
<el-table-column align="left" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
<el-button v-if="props.isHtml2canvas" type="primary" @click="captureScreenshot(scope.row.id)">选取该题</el-button>
|
||||||
|
<el-button v-else type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -104,7 +105,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
import html2canvas from 'html2canvas';
|
||||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||||
|
|
||||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||||
|
@ -122,7 +123,7 @@ import useUserStore from '@/store/modules/user'
|
||||||
import useClassTaskStore from '@/store/modules/classTask'
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['addQuiz'])
|
let emit = defineEmits(['addQuiz', 'addQuizImgBs64'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const {
|
const {
|
||||||
|
@ -136,6 +137,10 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
},
|
},
|
||||||
|
isHtml2canvas: {// 是否截屏
|
||||||
|
type: Boolean,
|
||||||
|
default: () => false
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const entpCourseWorkPointList = ref([
|
const entpCourseWorkPointList = ref([
|
||||||
|
@ -427,6 +432,20 @@ const getPaginationList = ( page, limit ) => {
|
||||||
// ElMessage('试题已经存在')
|
// ElMessage('试题已经存在')
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 把该题区域id 获取为截屏区域
|
||||||
|
* @param id 试题id
|
||||||
|
*/
|
||||||
|
const captureScreenshot = (id) => {
|
||||||
|
const targetElement = document.getElementById('screenshot-target-' + id);
|
||||||
|
html2canvas(targetElement).then(canvas => {
|
||||||
|
// 将canvas转换为图像URL
|
||||||
|
const screenshotUrl = canvas.toDataURL('image/png');
|
||||||
|
// 在这里可以将截图保存到本地或上传到服务器
|
||||||
|
// console.log(screenshotUrl);
|
||||||
|
emit('addQuizImgBs64', screenshotUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 防抖
|
// 防抖
|
||||||
|
|
|
@ -197,19 +197,6 @@ const getResourceList = async () => {
|
||||||
// 统一HTTP处理
|
// 统一HTTP处理
|
||||||
const HTTP_SERVER_API = (type, params = {}) => {
|
const HTTP_SERVER_API = (type, params = {}) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'addSmarttalk': { // 获取课程
|
|
||||||
const def = {
|
|
||||||
fileId: '', // 文件id - Entpcoursefile 对应id
|
|
||||||
fileFlag: 'aptist',
|
|
||||||
fileShowName: courseObj.coursetitle + '.aptist',
|
|
||||||
textbookId: courseObj.textbookId,
|
|
||||||
levelFirstId: courseObj.levelFirstId,
|
|
||||||
levelSecondId: courseObj.levelSecondId,
|
|
||||||
fileSource: '个人',
|
|
||||||
fileRoot: '备课'
|
|
||||||
}
|
|
||||||
return API_smarttalk.creatAPT({...def, ...params})
|
|
||||||
}
|
|
||||||
case 'addEntpcourse': { // 添加课程
|
case 'addEntpcourse': { // 添加课程
|
||||||
const node = courseObj.node || {}
|
const node = courseObj.node || {}
|
||||||
if (!node) return msgUtils.msgWarning('请选择章节?')
|
if (!node) return msgUtils.msgWarning('请选择章节?')
|
||||||
|
@ -292,8 +279,6 @@ const handleAll = async(type, row) =>{
|
||||||
}
|
}
|
||||||
// 生成ppt课件-子级(slide)
|
// 生成ppt课件-子级(slide)
|
||||||
await HTTP_SERVER_API('addEntpcoursefile', params)
|
await HTTP_SERVER_API('addEntpcoursefile', params)
|
||||||
// 生成备课资源-Smarttalk
|
|
||||||
await HTTP_SERVER_API('addSmarttalk',{fileId: id})
|
|
||||||
// 刷新资源列表
|
// 刷新资源列表
|
||||||
await getResourceList()
|
await getResourceList()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue