diff --git a/package.json b/package.json
index 5034c80..0f251bf 100644
--- a/package.json
+++ b/package.json
@@ -57,6 +57,7 @@
"file-saver": "^2.0.5",
"hfmath": "^0.0.2",
"html-to-image": "^1.11.11",
+ "html2canvas": "^1.4.1",
"im_electron_sdk": "^8.0.5904",
"js-cookie": "^3.0.5",
"jsencrypt": "^3.3.2",
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/AixPPTist/src/api/index.ts b/src/renderer/src/AixPPTist/src/api/index.ts
index 13f8b73..629a040 100644
--- a/src/renderer/src/AixPPTist/src/api/index.ts
+++ b/src/renderer/src/AixPPTist/src/api/index.ts
@@ -55,7 +55,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)
@@ -65,8 +66,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/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue
index 0340b20..a0d73aa 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,18 @@
@update="data => { createLatexElement(data); latexEditorVisible = false }"
/>
+
+
+ { onhtml2canvas(data); classWorkTaskVisible = false }"
+ />
+
+
@@ -135,6 +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 QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
const mainStore = useMainStore()
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
@@ -172,12 +186,17 @@ 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)
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)
@@ -343,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/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);
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 @@
-
\ No newline at end of file
diff --git a/src/renderer/src/views/examination-analysis/container/pdf.vue b/src/renderer/src/views/examination-analysis/container/pdf.vue
index c83dfd0..c871a8d 100644
--- a/src/renderer/src/views/examination-analysis/container/pdf.vue
+++ b/src/renderer/src/views/examination-analysis/container/pdf.vue
@@ -14,8 +14,14 @@ const pdfUrl = ref('')
onMounted(async () =>{
await nextTick()
- const { fileurl } = sessionStore.get('subject.curBook')
- pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
+
+ let data = sessionStore.get('subject.curBook')
+ let fileurl = data.fileurl
+
+ if(fileurl == ''){
+ fileurl = `${data.edustage}-${data.edusubject}-课标.txt`
+ }
+ pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt', '.pdf')
})
diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue
index d09f75d..6085346 100644
--- a/src/renderer/src/views/model/index.vue
+++ b/src/renderer/src/views/model/index.vue
@@ -197,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('请选择章节?')
@@ -292,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 {