diff --git a/src/renderer/src/views/teach/standardAnalysis/index.vue b/src/renderer/src/views/teach/standardAnalysis/index.vue
index 5eca765..e2e2cbe 100644
--- a/src/renderer/src/views/teach/standardAnalysis/index.vue
+++ b/src/renderer/src/views/teach/standardAnalysis/index.vue
@@ -4,14 +4,14 @@
-
-
+
+
+
{{item.edustage + item.edusubject}}
+
@@ -82,7 +84,7 @@ import { listEvaluationclue } from '@/api/teaching/classwork'
import { uploadServer, getJSONFile } from '@/utils/common'
import { ElNotification } from 'element-plus'
import ChooseTextbook from "@/components/choose-textbook/index.vue";
-
+import { listEvaluation } from '@/api/classManage/index'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const sourceStore = useResoureStore()
@@ -101,6 +103,10 @@ const searchref = ref(null);
const listHeight = ref(0);
const dialogVisible = ref(false);
const booktitle = ref('');
+const bookInfo = ref(null);
+const booksel = ref(0);
+const bookList = ref([])
+
const searchOptions = [{
value: '0',
@@ -109,7 +115,7 @@ const searchOptions = [{
value: '1',
label: '按内容量',
}];
-const standList = ref([])
+const standList = ref([]);
const showData = ref([]);
//查询课标分析列表
@@ -234,16 +240,41 @@ const getData = (data) => {
// 头部 教材分析打开外部链接需要当前章节ID
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
}
-onMounted(() => {
-
+// 获取学科
+const getAllSubject = async () => {
+ const { rows } = await listEvaluation({ itemkey: "subject", pageSize: 500 })
+ const { edustage, edusubject } = userStore.user;
+ rows && rows.map(item => {
+ if(item.edustage === edustage && item.edusubject === edusubject){
+ bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar}
+ }
+ if(item.fileurl !== ''){
+ bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar})
+ }
+ })
+ booksel.value = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
+}
+const bookChange = async (item, idx) => {
+ booksel.value = idx
+ bookInfo.value = {...item}
+ booktitle.value = `${item.edustage + item.edusubject}课程标准`
+ pdfUrl.value = '';
+ const filepath = import.meta.env.VITE_APP_RES_FILE_PATH + item.fileurl.replace('.txt','.pdf')
+ await loadPdfAnimation(filepath)
+ dialogVisible.value = false
+}
+const loadPdfAnimation = (path) => {
+ const timer = setTimeout(() => {
+ pdfUrl.value = path
+ clearTimeout(timer);
+ },2000)
+}
+onMounted(async () => {
+ await getAllSubject();
const { edustage, edusubject } = userStore.user;
booktitle.value = `${edustage + edusubject}课程标准`
const filePath = `${import.meta.env.VITE_APP_RES_FILE_PATH}${edustage}-${edusubject}-课标.pdf`
- const timer = setTimeout(() => {
- pdfUrl.value = filePath
- clearTimeout(timer);
- },2000)
-
+ await loadPdfAnimation(filePath)
if(cardref.value && headref.value){
const cardH = cardref.value.offsetHeight;
const headh = headref.value.offsetHeight;
@@ -492,4 +523,23 @@ onMounted(() => {
}
}
}
+.booklist{
+ width: 100%;
+ height: 500px;
+ padding-top: 1px;
+ overflow: auto;
+ .item{
+ width: 100%;
+ height: auto;
+ padding: 8px 16px;
+ background-color: #ffffff;
+ border-top: 1px solid #f1f1f1;
+ font-size: 14px;
+ color: #3b3b3b;
+ }
+ .active{
+ background-color: #409eff;
+ color: #ffffff;
+ }
+}
\ No newline at end of file