From 2ca3d89d1c2f9180b981518f0067ec7e0b087616 Mon Sep 17 00:00:00 2001 From: lyc Date: Mon, 4 Nov 2024 15:45:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/PdfJs/index.vue | 14 +- src/renderer/src/hooks/useGetSubject.js | 1 + src/renderer/src/layout/components/Header.vue | 272 +++++------------- src/renderer/src/router/index.js | 1 + .../container/pdf-template.vue | 28 ++ .../src/views/curriculum-standards/index.vue | 62 ++-- .../container/pdf-template.vue | 28 ++ .../container/question-answer.vue | 153 ++++++++++ .../container/read-result.vue | 174 +++++++++++ .../container/read-template.vue | 116 ++++++++ .../src/views/examination-analysis/index.vue | 168 ++++++++++- .../container/pdf-template.vue | 28 ++ .../container/question-answer.vue | 152 ++++++++++ .../container/read-result.vue | 193 +++++++++++++ .../container/read-template.vue | 157 ++++++++++ .../src/views/teaching-material/index.vue | 169 ++++++++++- 16 files changed, 1480 insertions(+), 236 deletions(-) create mode 100644 src/renderer/src/views/curriculum-standards/container/pdf-template.vue create mode 100644 src/renderer/src/views/examination-analysis/container/pdf-template.vue create mode 100644 src/renderer/src/views/examination-analysis/container/question-answer.vue create mode 100644 src/renderer/src/views/examination-analysis/container/read-result.vue create mode 100644 src/renderer/src/views/examination-analysis/container/read-template.vue create mode 100644 src/renderer/src/views/teaching-material/container/pdf-template.vue create mode 100644 src/renderer/src/views/teaching-material/container/question-answer.vue create mode 100644 src/renderer/src/views/teaching-material/container/read-result.vue create mode 100644 src/renderer/src/views/teaching-material/container/read-template.vue diff --git a/src/renderer/src/components/PdfJs/index.vue b/src/renderer/src/components/PdfJs/index.vue index 0973e5e..f99aa83 100644 --- a/src/renderer/src/components/PdfJs/index.vue +++ b/src/renderer/src/components/PdfJs/index.vue @@ -16,6 +16,10 @@ const props = defineProps({ isWin: { type: Boolean, default: false + }, + showCatalog: { + type: Boolean, + default: true } }) /**pdf文件地址 */ @@ -25,7 +29,15 @@ const fileUrl = props.isWin ? props.url : getAppInstallUrl('pdfjs-dist/web/viewe onMounted(() => { /** 将传入的pdf地址进行编码,防止中文识别错误 */ if(props.isWin) pdfUrl.value = fileUrl - else pdfUrl.value = fileUrl + encodeURIComponent(props.url) + '#pageMode=outline' + else{ + let url = fileUrl + encodeURIComponent(props.url) + if(props.showCatalog){ + pdfUrl.value = url + '#pageMode=outline' + } + else{ + pdfUrl.value = url + } + } }) diff --git a/src/renderer/src/hooks/useGetSubject.js b/src/renderer/src/hooks/useGetSubject.js index 2b61a08..b25b4b1 100644 --- a/src/renderer/src/hooks/useGetSubject.js +++ b/src/renderer/src/hooks/useGetSubject.js @@ -51,6 +51,7 @@ export const useGetSubject = async () =>{ } const { rows } = await listEvaluation(subjectParams) subjectList = rows + sessionStore.set('subject.curBook', rows[0]) sessionStore.set('subject.bookList', rows) treeData = getTreeData(subjectList[0].id) // 设置一个默认的curNode diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index eebff93..bc94c34 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -1,234 +1,63 @@ \ No newline at end of file diff --git a/src/renderer/src/views/curriculum-standards/index.vue b/src/renderer/src/views/curriculum-standards/index.vue index 37d5396..61fa22a 100644 --- a/src/renderer/src/views/curriculum-standards/index.vue +++ b/src/renderer/src/views/curriculum-standards/index.vue @@ -3,25 +3,31 @@
-
课程标准研读
- - {{ item.label }} - -
-
    -
  • - - {{ item.name }} -
  • -
-
+ +
- {{ item.label + {{ item.label }}
@@ -40,9 +46,12 @@ import { ref } from 'vue' import ReadTemplate from './container/read-template.vue'; import QuestionAnswer from './container/question-answer.vue' import ReadResult from './container/read-result.vue' +import PdfTemplate from './container/pdf-template.vue' const url = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F11044b08-04c1-41a0-a453-1fd20b58a614%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1732953359&t=7ab1d1b3a903db85b1149914407aea35' +/************************左侧************* */ +const radio = ref(1) const radioList = ref([ { label: '浏览研读', value: 1 }, { label: '跨学科研读', value: 2 }, @@ -50,22 +59,12 @@ const radioList = ref([ { label: '课标修订研读', value: 4 }, { label: '自由研读', value: 5 }, ]) - -const radio = ref(1) -// 当前选中 -const activeIndex = ref(-1) -// 列表 const list = ref([ { name: '高中语文课程标准', url } ]) - -const clickItem = (index) => { - activeIndex.value = index -} - const changeRadio = () => { list.value = [] for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) { @@ -75,6 +74,14 @@ const changeRadio = () => { }) } } +const activeIndex = ref(-1) + +const clickItem = (index) => { + activeIndex.value = index +} + + +/************************右侧************* */ const contentMenu = [ { label: '研读模板', value: 1 }, @@ -82,10 +89,11 @@ const contentMenu = [ { label: '研读结果', value: 3 } ] const activeMenu = ref(1) -const onClickMenu = (item) =>{ +const onClickMenu = (item) => { activeMenu.value = item.value } + \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/question-answer.vue b/src/renderer/src/views/examination-analysis/container/question-answer.vue new file mode 100644 index 0000000..1a99ab2 --- /dev/null +++ b/src/renderer/src/views/examination-analysis/container/question-answer.vue @@ -0,0 +1,153 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/read-result.vue b/src/renderer/src/views/examination-analysis/container/read-result.vue new file mode 100644 index 0000000..aa3bd2d --- /dev/null +++ b/src/renderer/src/views/examination-analysis/container/read-result.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/read-template.vue b/src/renderer/src/views/examination-analysis/container/read-template.vue new file mode 100644 index 0000000..0b2c218 --- /dev/null +++ b/src/renderer/src/views/examination-analysis/container/read-template.vue @@ -0,0 +1,116 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/index.vue b/src/renderer/src/views/examination-analysis/index.vue index 07dc820..9d0044d 100644 --- a/src/renderer/src/views/examination-analysis/index.vue +++ b/src/renderer/src/views/examination-analysis/index.vue @@ -1,13 +1,177 @@ \ No newline at end of file diff --git a/src/renderer/src/views/teaching-material/container/pdf-template.vue b/src/renderer/src/views/teaching-material/container/pdf-template.vue new file mode 100644 index 0000000..ceba60f --- /dev/null +++ b/src/renderer/src/views/teaching-material/container/pdf-template.vue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/teaching-material/container/question-answer.vue b/src/renderer/src/views/teaching-material/container/question-answer.vue new file mode 100644 index 0000000..bb27c86 --- /dev/null +++ b/src/renderer/src/views/teaching-material/container/question-answer.vue @@ -0,0 +1,152 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/teaching-material/container/read-result.vue b/src/renderer/src/views/teaching-material/container/read-result.vue new file mode 100644 index 0000000..d5729c4 --- /dev/null +++ b/src/renderer/src/views/teaching-material/container/read-result.vue @@ -0,0 +1,193 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/teaching-material/container/read-template.vue b/src/renderer/src/views/teaching-material/container/read-template.vue new file mode 100644 index 0000000..1972c09 --- /dev/null +++ b/src/renderer/src/views/teaching-material/container/read-template.vue @@ -0,0 +1,157 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/teaching-material/index.vue b/src/renderer/src/views/teaching-material/index.vue index da0bd6e..ba787fb 100644 --- a/src/renderer/src/views/teaching-material/index.vue +++ b/src/renderer/src/views/teaching-material/index.vue @@ -1,13 +1,178 @@ \ No newline at end of file