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