From d07dd4455cfbb3a3819df0c9bcbbb44060376790 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Mon, 9 Dec 2024 16:50:00 +0800
Subject: [PATCH 1/2] 1
---
.../src/views/Editor/CanvasTool/index.vue | 15 ++++++++++++++-
.../newClassTaskAssign/searchQuestion/index.vue | 3 +++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
index 6896137..3b1b3cb 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
@@ -185,6 +185,7 @@ const applyCanvasPresetScale = (value: number) => {
}
const {
+ createTextElement,
createImageElement,
createChartElement,
createTableElement,
@@ -200,7 +201,14 @@ const insertImageElement = (files: FileList) => {
}
const onhtml2canvas = (imgbs64: string) => {
- createImageElement(imgbs64)
+ //createImageElement(imgbs64)
+ console.log('imgbs64->',imgbs64)
+ createTextElement({
+ left: 200,
+ top: 200,
+ width: 500,
+ height: 500,
+ }, { content: imgbs64 })
}
const shapePoolVisible = ref(false)
@@ -415,4 +423,9 @@ const imgVisible = ref(false)
display: none;
}
}
+
+
\ No newline at end of file
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
index 87f529b..8b30f81 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
@@ -439,6 +439,9 @@ const getPaginationList = ( page, limit ) => {
*/
const captureScreenshot = (id) => {
const targetElement = document.getElementById('screenshot-target-' + id);
+ emit('addQuizImgBs64', targetElement.outerHTML);
+ return;
+
html2canvas(targetElement).then(canvas => {
// 将canvas转换为图像URL
const screenshotUrl = canvas.toDataURL('image/png');
--
2.44.0.windows.1
From d90b7c695a19108e555db29194db402903421a67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Mon, 9 Dec 2024 17:14:37 +0800
Subject: [PATCH 2/2] 1
---
.../src/views/Editor/CanvasTool/index.vue | 15 +--------------
.../newClassTaskAssign/searchQuestion/index.vue | 3 ---
src/renderer/src/views/profile/userInfo.vue | 1 -
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
index 3b1b3cb..6896137 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
@@ -185,7 +185,6 @@ const applyCanvasPresetScale = (value: number) => {
}
const {
- createTextElement,
createImageElement,
createChartElement,
createTableElement,
@@ -201,14 +200,7 @@ const insertImageElement = (files: FileList) => {
}
const onhtml2canvas = (imgbs64: string) => {
- //createImageElement(imgbs64)
- console.log('imgbs64->',imgbs64)
- createTextElement({
- left: 200,
- top: 200,
- width: 500,
- height: 500,
- }, { content: imgbs64 })
+ createImageElement(imgbs64)
}
const shapePoolVisible = ref(false)
@@ -423,9 +415,4 @@ const imgVisible = ref(false)
display: none;
}
}
-
-
\ No newline at end of file
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
index 8b30f81..87f529b 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
@@ -439,9 +439,6 @@ const getPaginationList = ( page, limit ) => {
*/
const captureScreenshot = (id) => {
const targetElement = document.getElementById('screenshot-target-' + id);
- emit('addQuizImgBs64', targetElement.outerHTML);
- return;
-
html2canvas(targetElement).then(canvas => {
// 将canvas转换为图像URL
const screenshotUrl = canvas.toDataURL('image/png');
diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue
index c51ae31..6fcdb8d 100644
--- a/src/renderer/src/views/profile/userInfo.vue
+++ b/src/renderer/src/views/profile/userInfo.vue
@@ -34,7 +34,6 @@ import {getDept } from '@/api/login'
import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus'
-import { clearBookInfo } from '@/utils/ruoyi'
import { sessionStore } from '@/utils/store'
import {listClassmain} from '@/api/classManage/index'
//班级列表
--
2.44.0.windows.1