Merge branch 'main' into zouyf_dev

This commit is contained in:
“zouyf” 2024-10-19 14:20:34 +08:00
commit 0a2d3f54b7
17 changed files with 115 additions and 64 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "aix-win", "name": "aix-win",
"version": "2.1.9", "version": "2.1.12",
"description": "", "description": "",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "example.com", "author": "example.com",

View File

@ -246,8 +246,10 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
/*创建新的ppt文件*/ /*创建新的ppt文件*/
ipcMain.on('creat-ai-file-default', (e, { name, url, uploadData, cookie }) => { ipcMain.on('creat-ai-file-default', (e, { name, url, uploadData, cookie }) => {
createFolder('tempFile').then(async () => { createFolder('tempFile').then(async () => {
let lastname = decodeURIComponent(url);
name = lastname.substring(lastname.lastIndexOf("/")+1)
let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '') let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '')
let {type,item} = await downloadFile(url,name) let {type,item} = await downloadFiles(url,name)
if (type==="成功") { if (type==="成功") {
let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
let formData = new FormData() let formData = new FormData()
@ -279,7 +281,8 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
}) })
}) })
function downloadFile(url,fileName) { function downloadFiles(url,fileName) {
console.log(url,fileName)
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject)=>{
const browserWindow = BrowserWindow.getFocusedWindow() const browserWindow = BrowserWindow.getFocusedWindow()
const id = manager.download({ const id = manager.download({

View File

@ -285,8 +285,11 @@ export class ImChat {
// callback: (data) => {} // callback: (data) => {}
} }
// console.log('发送消息', option) // console.log('发送消息', option)
this.setConsole('%cim-chat: 发送消息', option) this.setConsole('%cim-chat: 发送消息【req】', conv_id, msg)
return this.timChat.TIMMsgSendMessageV2(option) return this.timChat.TIMMsgSendMessageV2(option).then(res => {
this.setConsole('%cim-chat: 发送消息【res】', JSON.stringify(res))
return res
})
} }
/** /**
* @description 发送群消息 * @description 发送群消息

View File

@ -1,27 +1,49 @@
import axios from "axios"; import axios from "axios";
import { getSignature } from "./index"; import { getSignature } from "./index";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import request from '@/utils/request'
let appId = "01ec9aa3"; let appId = "01ec9aa3";
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy"; let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
let timestamp = Math.floor(Date.now() / 1000); let timestamp = Math.floor(Date.now() / 1000);
let signature = getSignature(appId, secret, timestamp); let signature = getSignature(appId, secret, timestamp);
let req = (url, type, data)=>{
let config = {
headers: {
"Content-Type": "application/json",
appId: appId,
timestamp: timestamp,
signature: signature,
},
url: url,
method: type,
}
if (type === "GET") {
config.params = data;
} else {
config.data = data;
}
return request(config)
}
const instance = axios.create({ /*const instance = axios.create({
baseURL: "", // baseURL: import.meta.env.VITE_APP_ENV === "development"?"/parth":import.meta.env.VITE_APP_BASE_API,
baseURL: "/dev-api",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
'Authorization': 'Bearer ' + getToken(),
appId: appId, appId: appId,
timestamp: timestamp, timestamp: timestamp,
signature: signature, signature: signature,
}, },
}); });*/
const createOutline = async (data) => { const createOutline = async (data) => {
console.log("createOutline data:", data); console.log("createOutline data:", data);
try { try {
const response = await instance.post( const response = await req(
"/parth/api/aippt/createOutline", "/api/aippt/createOutline",
"POST",
data data
); );
console.log("createOutline response:", response); console.log("createOutline response:", response);
@ -36,7 +58,7 @@ const createOutline = async (data) => {
}; };
const getBackGround = async () => { const getBackGround = async () => {
try { try {
const response = await instance.get("/parth/api/aippt/themeList"); const response = await req("/api/aippt/themeList", "GET");
return response.data; return response.data;
} catch (error) { } catch (error) {
console.error("请求失败:", error); console.error("请求失败:", error);
@ -45,7 +67,7 @@ const getBackGround = async () => {
}; };
const createPPT = async (data) => { const createPPT = async (data) => {
try { try {
const response = await instance.post("/parth/api/aippt/create", data); const response = await req("/api/aippt/create", "POST", data);
console.log("createOutline response:", response); console.log("createOutline response:", response);
return response.data; return response.data;
@ -56,7 +78,7 @@ const createPPT = async (data) => {
}; };
const createByOutline = async (data) => { const createByOutline = async (data) => {
try { try {
const response = await instance.post("/parth/api/aippt/createByOutline", data); const response = await req("/api/aippt/createByOutline","POST", data);
console.log("createByOutline response:", response); console.log("createByOutline response:", response);
return response.data; return response.data;
@ -67,7 +89,7 @@ const createByOutline = async (data) => {
}; };
const getProgress = async (id) => { const getProgress = async (id) => {
try { try {
const response = await instance.get(`/parth/api/aippt/progress?sid=${id}`); const response = await req(`/api/aippt/progress?sid=${id}`, "GET");
return response.data; return response.data;
} catch (error) { } catch (error) {
console.error("请求失败:", error); console.error("请求失败:", error);
@ -75,4 +97,4 @@ const getProgress = async (id) => {
} }
}; };
export { instance, createOutline, getBackGround, createPPT, getProgress, createByOutline }; export { createOutline, getBackGround, createPPT, getProgress, createByOutline };

View File

@ -58,17 +58,17 @@
<script setup> <script setup>
import { ref, onMounted, onUnmounted, computed, watch } from 'vue' import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask' import { listByDeadDate, listClassworkdata } from '@/api/classTask'
import TaskItem from '@/views/classTask/container/classTask/task-item.vue' import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
// import ItemDialog from '@/views/classTask/container/item-dialog.vue' // import ItemDialog from '@/views/classTask/container/item-dialog.vue'
import { useToolState } from '@/store/modules/tool' import { useToolState } from '@/store/modules/tool'
import { getCurrentTime, getTomorrow } from '@/utils/date' import { getCurrentTime } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useClassTaskStore from "@/store/modules/classTask"; import useClassTaskStore from "@/store/modules/classTask";
import {createWindow} from '@/utils/tool' import {createWindow} from '@/utils/tool'
import {sessionStore} from '@/utils/store' import {sessionStore} from '@/utils/store'
import {throttle,debounce } from '@/utils/comm' import {debounce } from '@/utils/comm'
const toolState = useToolState(); const toolState = useToolState();
@ -141,14 +141,12 @@ const getClassWorkList = async () => {
{ {
// homeworklist // homeworklist
const response = await listByDeadDate({ const response = await listByDeadDate({
//classidarray: classTaskStore.classListIds.join(','),
edituserid: userStore.userId, // id edituserid: userStore.userId, // id
edustage: userStore.edustage, // edustage: userStore.edustage, //
edusubject: userStore.edusubject,// edusubject: userStore.edusubject,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,// // deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
deaddate: EndDate.value,// deaddate: EndDate.value,//
status: '1', // 1- status: '1', // 1-
// orderby: 'concat(deaddate,uniquekey) DESC',
orderby: 'deaddate DESC', orderby: 'deaddate DESC',
pageSize: 100, pageSize: 100,
}) })
@ -182,7 +180,7 @@ const getClassWorkList = async () => {
// UI // UI
if (list[i].worktype == '学习目标定位') { if (list[i].worktype == '学习目标定位') {
list[i].workclass = 'success' list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(response.rows[i].workcodes) list[i].workcodesList = JSON.parse(list[i].workcodes)
} else if (list[i].worktype == '教材研读') { } else if (list[i].worktype == '教材研读') {
list[i].workclass = 'primary' list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') { } else if (list[i].worktype == '框架梳理') {

View File

@ -121,12 +121,12 @@
</el-table-column> </el-table-column>
<el-table-column label="分值" align="center" width="180"> <el-table-column label="分值" align="center" width="180">
<template #default="scope"> <template #default="scope">
<el-input-number v-model="scope.row.score" :min="1" :max="100" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)"></el-input-number > <el-input-number v-model="scope.row.score" :min="1" :max="100" :disabled="currentWorkEdit.currentType == 'query'?true:false"></el-input-number >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
<el-button :disabled="checkTaskAssigned(currentWorkEdit.currentTask)" @click="handleWorkConfigQuizMinus(scope.$index)">删除</el-button> <el-button :disabled="currentWorkEdit.currentType == 'query'?true:false" @click="handleWorkConfigQuizMinus(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -203,8 +203,7 @@
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;"> <div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
<div style="display: flex"> <div style="display: flex">
<el-button type="primary" style="margin-left: auto" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)" <el-button type="primary" style="margin-left: auto" @click="workEdit = false"> </el-button>
@click="submitStudy('submit')"> </el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -779,7 +778,12 @@ const handleTaskAssignToAllClass = () => {
*/ */
const handleNewClassWorkDialog = () => { const handleNewClassWorkDialog = () => {
// //
router.push({ path: '/newClassTask' }); router.push({
path: '/newClassTask',
query: {
isBack: true,
}
});
} }
/** /**
@ -930,3 +934,4 @@ watch(() => courseObj.node, (newVal,oldVal) => {
} }
} }
</style> </style>
<style src="@/assets/styles/JYStyle.css"></style>

View File

@ -74,7 +74,7 @@ function initChart() {
position: 'top', position: 'top',
formatter: params => { formatter: params => {
const value = dataList.value[params.dataIndex].value; const value = dataList.value[params.dataIndex].value;
const percentage = ((value / total) * 100).toFixed(); // const percentage = value ? ((value / total) * 100).toFixed() : 0; //
return `${value}${percentage}%`; // return `${value}${percentage}%`; //
}, },
color: '#333', color: '#333',

View File

@ -266,6 +266,10 @@ const props = defineProps({
isedit: { isedit: {
type: Boolean, type: Boolean,
default: false default: false
},
isback:{
type: Boolean,
default: false
} }
}) })
@ -740,14 +744,16 @@ const handleClassWorkSave = async () => {
// //
// this.getClassWorkAllList(); // this.getClassWorkAllList();
// TODO
//TODO 3
// this.newWorkSpace = false;
// this.newWorkSpaceEdit = false;
// this.workEdit = false;
}) })
} }
if(props.isback){
//
router.back();
}else{
//
router.push({ path: '/classTaskAssign' });
}
} }
}); });
}; };
@ -980,3 +986,4 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
} }
</style> </style>
<style src="@/assets/styles/JYStyle.css"></style>

View File

@ -16,6 +16,7 @@
<el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto"> <el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto">
<el-col :span="12" style="padding-left: 20px; text-align: left;"> <el-col :span="12" style="padding-left: 20px; text-align: left;">
<div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook"> <div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
<i v-if="isback" class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
<i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i> <i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i>
<span>课程目录</span> <span>课程目录</span>
<i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i> <i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i>
@ -35,7 +36,7 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 作业类型:内容 --> <!-- 作业类型:内容 -->
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/> <task-type-view :bookobj="courseObj" :isback="isback" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
</div> </div>
</div> </div>
</template> </template>
@ -53,6 +54,7 @@ const route = useRoute();
const router = useRouter() const router = useRouter()
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const isback = ref(route.query.isBack?true:false);
const classtaskObj = route.query.classtaskObj;// const classtaskObj = route.query.classtaskObj;//
const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');// const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');//
const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); // const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); //
@ -184,3 +186,4 @@ onMounted(() => {
} }
} }
</style> </style>
<style src="@/assets/styles/JYStyle.css"></style>

View File

@ -51,7 +51,7 @@ const getHomework = async () => {
loading.value = true loading.value = true
const { edustage, edusubject } = user const { edustage, edusubject } = user
try { try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'uniquekey DESC', pageSize: 500 }) const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'deaddate DESC', pageSize: 500 })
// //
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) // homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) //
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) // // homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //

View File

@ -178,7 +178,7 @@ const getBackground = () => {
treeData.value = []; treeData.value = [];
getBackGround().then((res) => { getBackGround().then((res) => {
console.log(res); console.log(res);
backGroundList.value = res.data; backGroundList.value = res;
}); });
}; };
@ -222,14 +222,14 @@ const outlineCreatePPT = () => {
activeStep.value = 4 activeStep.value = 4
const checkProgress = () => { const checkProgress = () => {
getProgress(res.data.sid).then((response) => { getProgress(res.sid).then((response) => {
percentage.value = response.data.process; percentage.value = response.process;
if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) { if (response && response.pptUrl && response.pptUrl.length > 4) {
console.log('PPT',response) console.log('PPT',response)
// window.location.href = response.data.pptUrl; // window.location.href = response.data.pptUrl;
//URLURL //URLURL
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx" // let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx"
creatAIPPT(props.currentNode.itemtitle + '.pptx',response.data.pptUrl, props.uploadData).then((res) => { creatAIPPT(props.currentNode.itemtitle + '.pptx',response.pptUrl, props.uploadData).then((res) => {
emit('addSuccess',res) emit('addSuccess',res)
}) })
ElMessage.success("生成成功"); ElMessage.success("生成成功");

View File

@ -689,7 +689,12 @@ export default {
// //
goNewClassTask(){ goNewClassTask(){
// router.push({ path: '/newClassTask' }); // router.push({ path: '/newClassTask' });
this.$router.push({ path: '/newClassTask' }); this.$router.push({
path: '/newClassTask',
query: {
isBack: true,
}
});
}, },
getWeekday1(date) { getWeekday1(date) {
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']

View File

@ -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,11 +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.fileurl !== ''){
if(item.fileurl !== ''){ bookList.value.push(bookInfo.value)
bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}) }
} }
}) })
console.log(bookList)
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject) const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
booksel.value = textselidx booksel.value = textselidx
const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf') const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf')
@ -282,7 +283,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 +334,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 +553,4 @@ onMounted(async () => {
color: #ffffff; color: #ffffff;
} }
} }
</style> </style>

View File

@ -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>

View File

@ -128,7 +128,7 @@ const closeHomework = async() => {
const successHomework = (data)=>{ const successHomework = (data)=>{
// console.log('', data) // console.log('', data)
// im-(app|) // im-(app|)
ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016) // ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
} }
// change // change
const changeChapter = async (data)=>{ const changeChapter = async (data)=>{

View File

@ -12,7 +12,7 @@ const props = defineProps({
}) })
const imChatObj = reactive({imChat:null}) const imChatObj = reactive({imChat:null})
onMounted(() => { onMounted(() => {
ipcMainHandle() // -ipcMain im // ipcMainHandle() // -ipcMain im
}) })
// im-chat // im-chat
const initImChat = async (timGroupId) => { const initImChat = async (timGroupId) => {

View File

@ -105,7 +105,7 @@ const getClassInfo = async () => {
const chat = await imChatRef.value?.initImChat(timGroupId) // im-chat const chat = await imChatRef.value?.initImChat(timGroupId) // im-chat
if (!timGroupId) timGroupId = chat?.timGroupId if (!timGroupId) timGroupId = chat?.timGroupId
if (!timGroupId) return ElMessage.error('房间创建-失败') if (!timGroupId) return ElMessage.error('房间创建-失败')
classManageApi.startClass(classObj.id, timGroupId) // if (data.status != '上课中') classManageApi.startClass(classObj.id, timGroupId) //
} }
// tab-change // tab-change
const tabChange = (val) => { const tabChange = (val) => {
@ -158,7 +158,7 @@ const touchChange = (e) => {
const chatChange = (type, data, ...args) => { const chatChange = (type, data, ...args) => {
if (type == 'createGroup') { // - if (type == 'createGroup') { // -
console.log('创建群:', data) console.log('创建群:', data)
!!data && classManageApi.startClass(classObj.id, data) // !!data && classManageApi.startClass(classObj.id, data)
} else if (type == 'msg') { // im-chat } else if (type == 'msg') { // im-chat
if (!data) return // msg message_msg_id if (!data) return // msg message_msg_id
const msgId = (args||[])[0].message_msg_id const msgId = (args||[])[0].message_msg_id