解决教材课标切换名字问题
This commit is contained in:
parent
ae433b7520
commit
39aa3b157d
|
@ -7,7 +7,7 @@
|
||||||
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stand-head-right">
|
<div class="stand-head-right">
|
||||||
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName : ''}}</div>
|
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle : ''}}</div>
|
||||||
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
||||||
<div class="stand-head-right-row">
|
<div class="stand-head-right-row">
|
||||||
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div class="booklist">
|
<div class="booklist">
|
||||||
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
||||||
<el-image class="bookimg" :src="item.avartar" />
|
<el-image class="bookimg" :src="item.avartar" />
|
||||||
<div class="bookname">{{item.bookName}}</div>
|
<div class="bookname">{{item.itemtitle}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -173,7 +173,7 @@ const selectHandel = (value) => {
|
||||||
}
|
}
|
||||||
//保存json文件
|
//保存json文件
|
||||||
const saveJSON = (data) => {
|
const saveJSON = (data) => {
|
||||||
|
|
||||||
let filename = ''
|
let filename = ''
|
||||||
// const data = {
|
// const data = {
|
||||||
// name: 'txt',
|
// name: 'txt',
|
||||||
|
@ -247,9 +247,12 @@ const getAllSubject = async () => {
|
||||||
rows && rows.map(item => {
|
rows && rows.map(item => {
|
||||||
if(edustage === item.edustage && item.edusubject === edusubject){
|
if(edustage === item.edustage && item.edusubject === edusubject){
|
||||||
bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}
|
bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}
|
||||||
|
if(item.itemgroup==="校本课程") {
|
||||||
|
bookInfo.value.avartar = item.avartar
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(item.fileurl !== ''){
|
if(item.fileurl !== ''){
|
||||||
bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)})
|
bookList.value.push(bookInfo.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
|
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
|
||||||
|
@ -282,7 +285,7 @@ onMounted(async () => {
|
||||||
const searchh = searchref.value.offsetHeight;
|
const searchh = searchref.value.offsetHeight;
|
||||||
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
if(cardref.value && headref.value){
|
if(cardref.value && headref.value){
|
||||||
const cardH = cardref.value.offsetHeight;
|
const cardH = cardref.value.offsetHeight;
|
||||||
|
@ -333,9 +336,9 @@ onMounted(async () => {
|
||||||
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// const isDev = process.env.NODE_ENV == 'development'
|
// const isDev = process.env.NODE_ENV == 'development'
|
||||||
// if (isDev)
|
// if (isDev)
|
||||||
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
||||||
// else
|
// else
|
||||||
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
||||||
|
@ -552,4 +555,4 @@ onMounted(async () => {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stand-head-right">
|
<div class="stand-head-right">
|
||||||
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName: ''}}</div>
|
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle: ''}}</div>
|
||||||
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
||||||
<div class="stand-head-right-row">
|
<div class="stand-head-right-row">
|
||||||
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div class="booklist">
|
<div class="booklist">
|
||||||
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
||||||
<el-image class="bookimg" :src="item.avartar" />
|
<el-image class="bookimg" :src="item.avartar" />
|
||||||
<div class="bookname">{{item.bookName}}</div>
|
<div class="bookname">{{item.itemtitle}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -175,7 +175,7 @@ const selectHandel = (value) => {
|
||||||
}
|
}
|
||||||
//保存json文件
|
//保存json文件
|
||||||
const saveJSON = (data) => {
|
const saveJSON = (data) => {
|
||||||
|
|
||||||
let filename = ''
|
let filename = ''
|
||||||
// const data = {
|
// const data = {
|
||||||
// name: 'txt',
|
// name: 'txt',
|
||||||
|
@ -249,7 +249,11 @@ const getAllSubject = async () => {
|
||||||
const dataList = [];
|
const dataList = [];
|
||||||
rows && rows.map((item,idx) => {
|
rows && rows.map((item,idx) => {
|
||||||
if(item.fileurl !== ''){
|
if(item.fileurl !== ''){
|
||||||
dataList.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')})
|
let infos = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')}
|
||||||
|
if(infos.itemgroup==="校本课程") {
|
||||||
|
infos.avartar = item.avartar
|
||||||
|
}
|
||||||
|
dataList.push(infos)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
bookList.value = dataList
|
bookList.value = dataList
|
||||||
|
@ -265,7 +269,7 @@ const getAllSubject = async () => {
|
||||||
bookInfo.value = {...dataList[0]}
|
bookInfo.value = {...dataList[0]}
|
||||||
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
||||||
}
|
}
|
||||||
await loadPdfAnimation(filePath)
|
await loadPdfAnimation(filePath)
|
||||||
}else{
|
}else{
|
||||||
bookInfo.value = {...dataList[0]}
|
bookInfo.value = {...dataList[0]}
|
||||||
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
||||||
|
@ -295,7 +299,7 @@ onMounted(async () => {
|
||||||
const searchh = searchref.value.offsetHeight;
|
const searchh = searchref.value.offsetHeight;
|
||||||
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
if(cardref.value && headref.value){
|
if(cardref.value && headref.value){
|
||||||
const cardH = cardref.value.offsetHeight;
|
const cardH = cardref.value.offsetHeight;
|
||||||
|
@ -346,9 +350,9 @@ onMounted(async () => {
|
||||||
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// const isDev = process.env.NODE_ENV == 'development'
|
// const isDev = process.env.NODE_ENV == 'development'
|
||||||
// if (isDev)
|
// if (isDev)
|
||||||
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
||||||
// else
|
// else
|
||||||
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
||||||
|
@ -570,4 +574,4 @@ onMounted(async () => {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue