Compare commits
4 Commits
122487cf8b
...
b47feb4a3a
Author | SHA1 | Date |
---|---|---|
“zouyf” | b47feb4a3a | |
“zouyf” | c79911cc99 | |
“zouyf” | 755cfc615a | |
baigl | fa776d2a8c |
|
@ -162,7 +162,6 @@ import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
|
||||||
import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
|
import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
|
||||||
import MaterialDialog from './MaterialDialog.vue'
|
import MaterialDialog from './MaterialDialog.vue'
|
||||||
import TextCreateImg from '@/components/ai-kolors/index.vue'
|
import TextCreateImg from '@/components/ai-kolors/index.vue'
|
||||||
import { toPng, toJpeg } from 'html-to-image' // 引入html-to-image库
|
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
||||||
|
@ -200,10 +199,8 @@ const insertImageElement = (files: FileList) => {
|
||||||
getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))
|
getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))
|
||||||
}
|
}
|
||||||
|
|
||||||
const onhtml2canvas = async (html: HTMLElement) => {
|
const onhtml2canvas = async (imgbs64: String) => {
|
||||||
//createImageElement(imgbs64);
|
createImageElement(imgbs64);
|
||||||
const ele = await toPng(html)
|
|
||||||
createImageElement(ele);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const shapePoolVisible = ref(false)
|
const shapePoolVisible = ref(false)
|
||||||
|
|
|
@ -949,11 +949,11 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const getPaginationList = ( page, limit ) => {
|
const getPaginationList = async ( page, limit ) => {
|
||||||
paginationParams.pageNum = page;
|
paginationParams.pageNum = page;
|
||||||
paginationParams.pageSize = limit;
|
paginationParams.pageSize = limit;
|
||||||
//console.log(page, limit)
|
//console.log(page, limit)
|
||||||
handleQueryFromEntpCourseWork(0);
|
await handleQueryFromEntpCourseWork(0);
|
||||||
// 重置滚动条至顶部
|
// 重置滚动条至顶部
|
||||||
tableRef.value.setScrollTop(0);
|
tableRef.value.setScrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
:data="workResource.entpCourseWorkList"
|
:data="workResource.entpCourseWorkList"
|
||||||
style="width: 100%; height: calc(100% - 55px);"
|
style="width: 100%; height: calc(100% - 55px);"
|
||||||
v-loading="pageParams.loading"
|
v-loading="pageParams.loading"
|
||||||
|
ref="tableRef"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="60" />
|
<el-table-column type="index" width="60" />
|
||||||
<el-table-column align="left" >
|
<el-table-column align="left" >
|
||||||
|
@ -119,6 +120,7 @@ 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 html2canvas from 'html2canvas';
|
||||||
|
import { toPng } from 'html-to-image' // 引入html-to-image库
|
||||||
|
|
||||||
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
||||||
import { listEvaluationclue } from '@/api/classTask'
|
import { listEvaluationclue } from '@/api/classTask'
|
||||||
|
@ -364,11 +366,15 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
|
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getPaginationList = ( page, limit ) => {
|
|
||||||
|
const tableRef = ref();
|
||||||
|
const getPaginationList = async ( page, limit ) => {
|
||||||
paginationParams.pageNum = page;
|
paginationParams.pageNum = page;
|
||||||
paginationParams.pageSize = limit;
|
paginationParams.pageSize = limit;
|
||||||
console.log(page, limit)
|
console.log(page, limit)
|
||||||
handleQueryFromEntpCourseWork(0);
|
await handleQueryFromEntpCourseWork(0);
|
||||||
|
// 重置滚动条至顶部
|
||||||
|
tableRef.value.setScrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 单题上传弹出框----纠错修改框 */
|
/** 单题上传弹出框----纠错修改框 */
|
||||||
|
@ -454,15 +460,10 @@ const handleDelete = async(item, index) => {
|
||||||
const captureScreenshot = (id) => {
|
const captureScreenshot = (id) => {
|
||||||
const targetElement = document.getElementById('screenshot-target-' + id);
|
const targetElement = document.getElementById('screenshot-target-' + id);
|
||||||
if (targetElement) {
|
if (targetElement) {
|
||||||
emit('addQuizImgBs64', targetElement);
|
toPng(targetElement).then(canvas => {
|
||||||
|
emit('addQuizImgBs64', canvas);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// html2canvas(targetElement).then(canvas => {
|
|
||||||
// // 将canvas转换为图像URL
|
|
||||||
// const screenshotUrl = canvas.toDataURL('image/png');
|
|
||||||
// // 在这里可以将截图保存到本地或上传到服务器
|
|
||||||
// // console.log(screenshotUrl);
|
|
||||||
// emit('addQuizImgBs64', screenshotUrl);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 防抖
|
// 防抖
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
:data="workResource.entpCourseWorkList"
|
:data="workResource.entpCourseWorkList"
|
||||||
style="width: 100%; height: calc(100% - 50px);"
|
style="width: 100%; height: calc(100% - 50px);"
|
||||||
v-loading="pageParams.loading"
|
v-loading="pageParams.loading"
|
||||||
|
ref="tableRef"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="60" />
|
<el-table-column type="index" width="60" />
|
||||||
<el-table-column align="left" >
|
<el-table-column align="left" >
|
||||||
|
@ -106,6 +107,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
//import html2canvas from 'html2canvas';
|
//import html2canvas from 'html2canvas';
|
||||||
|
import { toPng } from 'html-to-image' // 引入html-to-image库
|
||||||
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'
|
||||||
|
@ -396,11 +398,15 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
|
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getPaginationList = ( page, limit ) => {
|
|
||||||
|
const tableRef = ref();
|
||||||
|
const getPaginationList = async ( page, limit ) => {
|
||||||
paginationParams.pageNum = page;
|
paginationParams.pageNum = page;
|
||||||
paginationParams.pageSize = limit;
|
paginationParams.pageSize = limit;
|
||||||
console.log(page, limit)
|
console.log(page, limit)
|
||||||
handleQueryFromEntpCourseWork(0);
|
await handleQueryFromEntpCourseWork(0);
|
||||||
|
// 重置滚动条至顶部
|
||||||
|
tableRef.value.setScrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -440,15 +446,10 @@ const getPaginationList = ( page, limit ) => {
|
||||||
const captureScreenshot = (id) => {
|
const captureScreenshot = (id) => {
|
||||||
const targetElement = document.getElementById('screenshot-target-' + id);
|
const targetElement = document.getElementById('screenshot-target-' + id);
|
||||||
if (targetElement) {
|
if (targetElement) {
|
||||||
emit('addQuizImgBs64', targetElement);
|
toPng(targetElement).then(canvas => {
|
||||||
|
emit('addQuizImgBs64', canvas);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// html2canvas(targetElement).then(canvas => {
|
|
||||||
// // 将canvas转换为图像URL
|
|
||||||
// const screenshotUrl = canvas.toDataURL('image/png');
|
|
||||||
// // 在这里可以将截图保存到本地或上传到服务器
|
|
||||||
// // console.log(screenshotUrl);
|
|
||||||
// emit('addQuizImgBs64', screenshotUrl);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue