From 7b59d78ce3fd27186ba1a7735ca12360869a4e21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Mon, 2 Dec 2024 17:30:24 +0800
Subject: [PATCH 01/13] 1
---
src/renderer/src/hooks/useProcessList.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/renderer/src/hooks/useProcessList.js b/src/renderer/src/hooks/useProcessList.js
index 8cd80ad..bb2b0c3 100644
--- a/src/renderer/src/hooks/useProcessList.js
+++ b/src/renderer/src/hooks/useProcessList.js
@@ -36,13 +36,13 @@ export const processList = (row, aloneOption=false) => {
row[i].method = jjj.method
row[i].discuss = jjj.discuss
//row[i].discusscollapse = false;
- if (row[i].examdate !== null && row[i].examdate !== undefined) {
+ if (row[i].examdate && row[i].examdate != "") {
row[i].examdate = row[i].examdate.substring(0, 10)
}
// 具体题型数据结构处理
if (row[i].worktype == '复合题') {
- // 旧类型
+ // 复合题 - 旧格式
if (row[i].title.indexOf('!@#$%') !== -1) {
// 1.选项解析替换
const options = JSON.parse(row[i].workdesc)
@@ -129,7 +129,9 @@ export const processList = (row, aloneOption=false) => {
row[i].workanswerFormat = answer
} else {
- // 处理[题干显示] - 不再需要处理
+ // 复合题 - 现格式
+
+ // 处理[题干显示] - 不再需要处理(头部已处理)
// row[i].titleFormat = row[i].title; // 仅占位提示
/**
@@ -222,6 +224,7 @@ export const processList = (row, aloneOption=false) => {
row[i].workanswerFormat = workAnswerHtml
}
} else if (
+ /** 主观题/非基础题(其中主要为第三方的各类解答题) */
row[i].worktype == '主观题' ||
(row[i].worktype !== '单选题' &&
row[i].worktype !== '多选题' &&
@@ -236,7 +239,7 @@ export const processList = (row, aloneOption=false) => {
row[i].workanswerFormat = JSON.parse(row[i].workanswer)
}
} else {
- // 单选题|多选题|填空题|判断题|主观题?(待确认是否归在这里)
+ // 基础题: 单选题|多选题|填空题|判断题|主观题?(待确认是否归在这里)
// 通用选项结构 ['ABC123','ABC123'] | ['ABC123','ABC123'] | [](填空题无选项) | [](判断题无选项)
let workDescArr = []
if (
From 8ad041e963c5fc426e9a143958028f9fb840bcc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Wed, 4 Dec 2024 14:34:25 +0800
Subject: [PATCH 02/13] 1
---
src/renderer/src/views/model/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue
index f39fc99..7435edf 100644
--- a/src/renderer/src/views/model/index.vue
+++ b/src/renderer/src/views/model/index.vue
@@ -52,7 +52,7 @@ import { useRouter } from 'vue-router'
import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-vue'
import useUserStore from '@/store/modules/user' // 用户信息
import msgUtils from '@/plugins/modal' // 消息工具
-import { createWindow, sessionStore } from '@/utils/tool' // 相关工具
+import { createWindow } from '@/utils/tool' // 相关工具
import * as API_entpcourse from '@/api/education/entpcourse' // 相关api
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
From df474db4a55772d3beb5217de2fcca2b22c333c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Wed, 4 Dec 2024 14:38:28 +0800
Subject: [PATCH 03/13] 1
---
src/renderer/src/views/model/index.vue | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue
index 3af46e0..0617ab3 100644
--- a/src/renderer/src/views/model/index.vue
+++ b/src/renderer/src/views/model/index.vue
@@ -52,12 +52,8 @@ import { useRouter } from 'vue-router'
import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-vue'
import useUserStore from '@/store/modules/user' // 用户信息
import msgUtils from '@/plugins/modal' // 消息工具
-<<<<<<< HEAD
import { createWindow } from '@/utils/tool' // 相关工具
-=======
-import { createWindow, sessionStore } from '@/utils/tool' // 相关工具
import * as API_smarttalk from '@/api/file' // 文件相关api
->>>>>>> c22b360e0fc344cad791625894423981d45c5cb2
import * as API_entpcourse from '@/api/education/entpcourse' // 相关api
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
@@ -201,19 +197,6 @@ const getResourceList = async () => {
// 统一HTTP处理
const HTTP_SERVER_API = (type, params = {}) => {
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': { // 添加课程
const node = courseObj.node || {}
if (!node) return msgUtils.msgWarning('请选择章节?')
@@ -296,8 +279,6 @@ const handleAll = async(type, row) =>{
}
// 生成ppt课件-子级(slide)
await HTTP_SERVER_API('addEntpcoursefile', params)
- // 生成备课资源-Smarttalk
- await HTTP_SERVER_API('addSmarttalk',{fileId: id})
// 刷新资源列表
await getResourceList()
} else {
From edabc0336f481fbb5abb2de2344535b07e5f2e4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666>
Date: Wed, 4 Dec 2024 14:57:56 +0800
Subject: [PATCH 04/13] =?UTF-8?q?add=EF=BC=9A=E6=96=B0=E5=A2=9Epptlist?=
=?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/AixPPTist/src/api/index.ts | 10 +-
.../src/AixPPTist/src/store/slides.ts | 11 +
.../src/AixPPTist/src/types/toolbar.ts | 1 +
.../src/views/Editor/Thumbnails/index.vue | 11 +-
.../ElementStylePanel/Active/index.vue | 291 ++++++++++++++++++
.../src/views/Editor/Toolbar/index.vue | 4 +
.../classTask/newClassTaskAssign/index.vue | 52 +++-
7 files changed, 369 insertions(+), 11 deletions(-)
create mode 100644 src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue
diff --git a/src/renderer/src/AixPPTist/src/api/index.ts b/src/renderer/src/AixPPTist/src/api/index.ts
index 658ba69..236f171 100644
--- a/src/renderer/src/AixPPTist/src/api/index.ts
+++ b/src/renderer/src/AixPPTist/src/api/index.ts
@@ -53,7 +53,8 @@ export class PPTApi {
return new Promise(async (resolve, reject) => {
const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc', pageSize: 9999 }
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 => {
if (!!o.datacontent) {
const json = JSON.parse(o.datacontent)
@@ -63,8 +64,15 @@ export class PPTApi {
// 如果没有数据,默认空白页
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.setSlides(slides) // 写入数据
+ // 写入作业列表数据
+ slidesStore.setWorkList(workList)
+ // 获取所有的pptlist的数据
+ slidesStore.setWorkItem(workItem)
resolve(true)
} else msgUtils.msgError(res.msg || '获取数据失败');resolve(false)
})
diff --git a/src/renderer/src/AixPPTist/src/store/slides.ts b/src/renderer/src/AixPPTist/src/store/slides.ts
index c5a0def..78e9d02 100644
--- a/src/renderer/src/AixPPTist/src/store/slides.ts
+++ b/src/renderer/src/AixPPTist/src/store/slides.ts
@@ -31,6 +31,8 @@ export interface SlidesState {
slideIndex: number
viewportSize: number
viewportRatio: number
+ workList:Object[],
+ workItem:Object[],
}
export const useSlidesStore = defineStore('slides', {
@@ -41,6 +43,8 @@ export const useSlidesStore = defineStore('slides', {
slideIndex: 0, // 当前页面索引
viewportSize: 1000, // 可视区域宽度基数
viewportRatio: 0.5625, // 可视区域比例,默认16:9
+ workList:[],// 活动的列表
+ workItem:[],// 获取到的所有pptlist
}),
getters: {
@@ -131,6 +135,13 @@ export const useSlidesStore = defineStore('slides', {
setSlides(slides: Slide[]) {
this.slides = slides
},
+ // 更新活动列表
+ setWorkList(list: Object[]) {
+ this.workList = list
+ },
+ setWorkItem(list: Object[]) {
+ this.workItem = list
+ },
addSlide(slide: Slide | Slide[]) {
const slides = Array.isArray(slide) ? slide : [slide]
diff --git a/src/renderer/src/AixPPTist/src/types/toolbar.ts b/src/renderer/src/AixPPTist/src/types/toolbar.ts
index 5e87881..5746777 100644
--- a/src/renderer/src/AixPPTist/src/types/toolbar.ts
+++ b/src/renderer/src/AixPPTist/src/types/toolbar.ts
@@ -6,4 +6,5 @@ export const enum ToolbarStates {
SLIDE_DESIGN = 'slideDesign',
SLIDE_ANIMATION = 'slideAnimation',
MULTI_POSITION = 'multiPosition',
+ EL_ACTIVE = 'elActive',
}
\ No newline at end of file
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue
index 9edc344..e61e623 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue
@@ -66,6 +66,9 @@
幻灯片 {{slideIndex + 1}} / {{slides.length}}
+
+
+
@@ -85,12 +88,13 @@ import ThumbnailSlide from '../../../views/components/ThumbnailSlide/index.vue'
import LayoutPool from './LayoutPool.vue'
import Popover from '../../../components/Popover.vue'
import Draggable from 'vuedraggable'
+import Active from '../Toolbar/ElementStylePanel/Active/index.vue'
const mainStore = useMainStore()
const slidesStore = useSlidesStore()
const keyboardStore = useKeyboardStore()
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 { slidesLoadLimit } = useLoadSlides()
@@ -123,6 +127,8 @@ const {
updateSectionTitle,
} = useSectionHandler()
+const activeRef = ref()
+
// 页面被切换时
const thumbnailsRef = ref>()
watch(() => slideIndex.value, () => {
@@ -145,6 +151,9 @@ watch(() => slideIndex.value, () => {
// 切换页面
const changeSlideIndex = (index: number) => {
+ console.log(workItem.value[index],'hasSection');
+ activeRef.value.clickPPTList(workItem.value[index])
+
mainStore.setActiveElementIdList([])
if (slideIndex.value === index) return
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue
new file mode 100644
index 0000000..9bf72ac
--- /dev/null
+++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue
@@ -0,0 +1,291 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{item.worktype}}
+
+ {{item.title||item.uniquekey}}
+
+
删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.worktype }}
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue
index 49bfd8e..ea16b24 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue
@@ -25,6 +25,8 @@ import SlideDesignPanel from './SlideDesignPanel.vue'
import SlideAnimationPanel from './SlideAnimationPanel.vue'
import MultiPositionPanel from './MultiPositionPanel.vue'
import SymbolPanel from './SymbolPanel.vue'
+// 新增的活动页面
+import SymbolActivePanel from './ElementStylePanel/Active/index.vue'
import Tabs from '../../../components/Tabs.vue'
interface ElementTabs {
@@ -54,6 +56,7 @@ const slideTabs = [
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
+ { label: '活动', key: ToolbarStates.EL_ACTIVE },
]
const multiSelectTabs = [
{ label: '样式', key: ToolbarStates.EL_STYLE },
@@ -86,6 +89,7 @@ const currentPanelComponent = computed(() => {
[ToolbarStates.SLIDE_ANIMATION]: SlideAnimationPanel,
[ToolbarStates.MULTI_POSITION]: MultiPositionPanel,
[ToolbarStates.SYMBOL]: SymbolPanel,
+ [ToolbarStates.EL_ACTIVE]: SymbolActivePanel,// 新增的活动页面
}
return panelMap[toolbarState.value] || null
})
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue
index 55ff885..b1a52f2 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue
@@ -1,6 +1,6 @@
-
+
删除
批量推送
@@ -10,7 +10,7 @@
-
+
{
currentRow.value = {id:0};
- console.log('propsQueryCourseObj', JSON.parse(propsQueryCourseObj));
- if(propsQueryCourseObj&&JSON.parse(propsQueryCourseObj)){
- courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
- courseObj.levelFirstId = JSON.parse(propsQueryCourseObj).levelFirstId // 单元
- courseObj.levelSecondId = JSON.parse(propsQueryCourseObj).levelSecondId // 章节
- courseObj.coursetitle = JSON.parse(propsQueryCourseObj).coursetitle // (单元/章节) 名称
- courseObj.node = JSON.parse(propsQueryCourseObj).node; // 保存当前节点
+ if(propsQueryCourseObj){
+ if(JSON.parse(propsQueryCourseObj)){
+ courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
+ courseObj.levelFirstId = JSON.parse(propsQueryCourseObj).levelFirstId // 单元
+ courseObj.levelSecondId = JSON.parse(propsQueryCourseObj).levelSecondId // 章节
+ courseObj.coursetitle = JSON.parse(propsQueryCourseObj).coursetitle // (单元/章节) 名称
+ 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();
})
+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) => {
console.log('itemName', itemName);
From a31b8d73767e60007679ab25787e94b23bcc5a77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Wed, 4 Dec 2024 14:58:47 +0800
Subject: [PATCH 05/13] =?UTF-8?q?pptist=EF=BC=9Acanvastool=20=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=20=E6=8F=92=E5=85=A5=E4=B9=A0=E9=A2=98=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AixPPTist/src/views/Editor/CanvasTool/index.vue | 13 +++++++++++++
1 file changed, 13 insertions(+)
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 0340b20..e0c8ab9 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
@@ -81,6 +81,7 @@
+
@@ -110,6 +111,17 @@
@update="data => { createLatexElement(data); latexEditorVisible = false }"
/>
+
+
+ { createLatexElement(data); classWorkTaskVisible = false }"
+ />
+
+
@@ -178,6 +190,7 @@ const chartPoolVisible = ref(false)
const tableGeneratorVisible = ref(false)
const mediaInputVisible = ref(false)
const latexEditorVisible = ref(false)
+const classWorkTaskVisible = ref(false)
const textTypeSelectVisible = ref(false)
const shapeMenuVisible = ref(false)
const moreVisible = ref(false)
From ea204de407f0abca60022f5a87184f5f6171e89c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Wed, 4 Dec 2024 15:05:48 +0800
Subject: [PATCH 06/13] 1
---
src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue | 1 +
1 file changed, 1 insertion(+)
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 e0c8ab9..749e1ab 100644
--- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
+++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
@@ -147,6 +147,7 @@ import Modal from '../../../components/Modal.vue'
import Divider from '../../../components/Divider.vue'
import Popover from '../../../components/Popover.vue'
import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
+import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue'
const mainStore = useMainStore()
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
From d542064ee35b8f508dbb93dbb0c5a1b738112b3f Mon Sep 17 00:00:00 2001
From: zdg
Date: Wed, 4 Dec 2024 17:08:51 +0800
Subject: [PATCH 07/13] =?UTF-8?q?ppt=E7=94=9F=E6=88=90=E8=AF=BE=E5=A0=82?=
=?UTF-8?q?=E5=A4=87=E8=AF=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/teachingDesign/container/right.vue | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/renderer/src/views/teachingDesign/container/right.vue b/src/renderer/src/views/teachingDesign/container/right.vue
index e94a7c2..6fae50c 100644
--- a/src/renderer/src/views/teachingDesign/container/right.vue
+++ b/src/renderer/src/views/teachingDesign/container/right.vue
@@ -210,13 +210,14 @@ emitter.on('changeResult', (item) => {
const HTTP_SERVER_API = (type, params = {}) => {
switch (type) {
case 'addSmarttalk': { // 获取课程
+ const node = courseObj.node || {}
const def = {
fileId: '', // 文件id - Entpcoursefile 对应id
fileFlag: 'aptist',
- fileShowName: courseObj.coursetitle + '.aptist',
- textbookId: courseObj.textbookId,
- levelFirstId: courseObj.levelFirstId,
- levelSecondId: courseObj.levelSecondId,
+ fileShowName: node.itemtitle + '.aptist',
+ textbookId: node.rootid,
+ levelFirstId: node.parentid||node.id,
+ levelSecondId: node.parentid && node.id,
fileSource: '个人',
fileRoot: '备课'
}
@@ -314,6 +315,7 @@ const toRousrceUrl = async(o) => {
const curNode = reactive({})
onMounted(() => {
let data = sessionStore.get('subject.curNode')
+ console.log('data', sessionStore)
Object.assign(curNode, data);
courseObj.node = data
From 7845d9bb1a2c6e5df615dd31af6318e99c55eb9d Mon Sep 17 00:00:00 2001
From: lyc
Date: Wed, 4 Dec 2024 17:15:20 +0800
Subject: [PATCH 08/13] edit
---
src/renderer/index.html | 2 +-
.../examination-analysis/container/dialog.vue | 86 +++++++++++++++----
.../examination-analysis/container/pdf.vue | 10 ++-
3 files changed, 78 insertions(+), 20 deletions(-)
diff --git a/src/renderer/index.html b/src/renderer/index.html
index d1459f5..8bb269e 100644
--- a/src/renderer/index.html
+++ b/src/renderer/index.html
@@ -8,7 +8,7 @@
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:"
/> -->
-
+
diff --git a/src/renderer/src/views/examination-analysis/container/dialog.vue b/src/renderer/src/views/examination-analysis/container/dialog.vue
index eba70bc..49ba96b 100644
--- a/src/renderer/src/views/examination-analysis/container/dialog.vue
+++ b/src/renderer/src/views/examination-analysis/container/dialog.vue
@@ -1,5 +1,5 @@
-
+
- -
+
-
+ 预览
{{ item.fileName }}
@@ -24,8 +26,8 @@
@@ -116,9 +116,10 @@
v-model:visible="classWorkTaskVisible"
:width="880"
>
- { createLatexElement(data); classWorkTaskVisible = false }"
+ @update="data => { onhtml2canvas(data); classWorkTaskVisible = false }"
/>
@@ -147,7 +148,7 @@ import Modal from '../../../components/Modal.vue'
import Divider from '../../../components/Divider.vue'
import Popover from '../../../components/Popover.vue'
import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
-import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue'
+import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
const mainStore = useMainStore()
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
@@ -185,6 +186,10 @@ const insertImageElement = (files: FileList) => {
getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))
}
+const onhtml2canvas = (imgbs64: string) => {
+ createImageElement(imgbs64)
+}
+
const shapePoolVisible = ref(false)
const linePoolVisible = ref(false)
const chartPoolVisible = ref(false)
@@ -357,6 +362,9 @@ const toggleNotesPanel = () => {
font-size: 13px;
}
}
+.class-work-task-modal{
+ height: 80vh;
+}
@media screen and (width <= 1200px) {
.right-handler .text {
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue
index e605b51..23970f4 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue
@@ -40,7 +40,7 @@
查找
- 添加习题
+ 添加习题
@@ -58,9 +58,9 @@
-
-
-
+
+
+
{{ scope.row.entpname }} {{ scope.row.editusername }}
{{ scope.row.worktag }}
@@ -70,7 +70,8 @@
-
+
选取该题
+
添加
纠错
@@ -117,6 +118,7 @@
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 { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
import { listEvaluationclue } from '@/api/classTask'
@@ -136,7 +138,7 @@ const router = useRouter()
// 定义要发送的emit事件
-const emit = defineEmits(['addQuiz'])
+let emit = defineEmits(['addQuiz', 'addQuizImgBs64'])
const { proxy } = getCurrentInstance()
const userStore = useUserStore().user
const {
@@ -150,6 +152,10 @@ const props = defineProps({
type: Object,
default: () => ({})
},
+ isHtml2canvas: {// 是否截屏
+ type: Boolean,
+ default: () => false
+ },
})
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
@@ -440,6 +446,22 @@ const handleDelete = async(item, index) => {
// 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(() => {
console.log("防抖 加载数据中...")
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue
new file mode 100644
index 0000000..26be2e9
--- /dev/null
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
index b24c080..d09d913 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue
@@ -71,9 +71,9 @@
-
-
-
+
+
+
{{ scope.row.entpname }} {{ scope.row.editusername }}
{{ scope.row.worktag }}
@@ -83,7 +83,8 @@
- 添加
+ 选取该题
+ 添加
@@ -104,7 +105,7 @@