Compare commits

..

21 Commits

Author SHA1 Message Date
朱浩 ea4afb409f Merge branch 'main' into zhuhao_dev
# Conflicts:
#	src/renderer/src/views/prepare/index.vue
2024-08-14 10:00:16 +08:00
朱浩 79055dc1c2 二期:BUG修复 2024-08-14 09:58:14 +08:00
yangws e3a04c0add Merge pull request 'fix:修改个人中心宽度,预约课件删除及时回应;' (#127) from yangws into main
Reviewed-on: #127
2024-08-14 09:56:10 +08:00
朱浩 3b872f371f Merge branch 'main' into zhuhao_dev 2024-08-13 17:43:49 +08:00
朱浩 7fc04faad1 二期:BUG修复 2024-08-13 17:43:34 +08:00
lyc d18c47994a Merge pull request '作业' (#126) from lyc-dev into main 2024-08-13 17:39:38 +08:00
lyc 7b804f9e62 作业 2024-08-13 17:39:23 +08:00
yangws 62367c13d3 fix:修改个人中心宽度,预约课件删除及时回应; 2024-08-13 17:33:04 +08:00
朱浩 8f50174595 二期:BUG修复 2024-08-13 16:46:47 +08:00
lyc bc9c6a3c89 Merge pull request 'lyc-dev' (#125) from lyc-dev into main 2024-08-13 16:23:03 +08:00
lyc e2d9b61fbe 作业 2024-08-13 16:22:35 +08:00
lyc bc5a6e961d 作业布置 2024-08-13 16:14:41 +08:00
lyc 2b5acf272d Merge branch 'main' into lyc-dev 2024-08-13 15:39:06 +08:00
lyc 9dda6b934c 作业-布置 2024-08-13 15:38:56 +08:00
yangws 3b52f9acc4 Merge pull request 'fix:去掉defineProps,以及修改备课-课标研读,高考研读,教学大模型链接不能同时跳转的bug;' (#124) from yangws into main
Reviewed-on: #124
2024-08-13 15:16:09 +08:00
lyc a1e00ba716 Merge branch 'main' into lyc-dev 2024-08-13 15:15:37 +08:00
lyc acc4d7c81e icon 2024-08-13 15:15:03 +08:00
yangws 1f9788498a fix:去掉defineProps,以及修改备课-课标研读,高考研读,教学大模型链接不能同时跳转的bug; 2024-08-13 15:12:55 +08:00
yangws f60fdbafa0 Merge pull request 'fix🐛资源-平台资源和校本资源里别人上传的文件不应该可以编辑名称;' (#123) from yangws into main
Reviewed-on: #123
2024-08-13 11:32:10 +08:00
yangws 776be8eaac fix🐛资源-平台资源和校本资源里别人上传的文件不应该可以编辑名称; 2024-08-13 11:31:39 +08:00
朱浩 67320f897e Merge pull request 'zhuhao_dev' (#122) from zhuhao_dev into main
Reviewed-on: #122
2024-08-13 11:28:27 +08:00
24 changed files with 136 additions and 67 deletions

View File

@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api'
VITE_APP_DOMAIN = 'file.ysaix.com' VITE_APP_DOMAIN = 'file.ysaix.com'
VITE_APP_UPLOAD_API = 'http://192.168.2.52:7863' VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/' VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'

View File

@ -126,12 +126,8 @@ async function createLinkWin(data) {
let cookieDetails = { ...data.cookieData } let cookieDetails = { ...data.cookieData }
await linkWin[data.key].webContents.session.cookies await linkWin[data.key].webContents.session.cookies
.set(cookieDetails) .set(cookieDetails)
.then(() => { .then(() => {})
console.log('Cookie is successful') .catch((error) => {})
})
.catch((error) => {
console.error('Cookie is error', error)
})
data.fullPath = data.fullPath.replaceAll('//', '/') data.fullPath = data.fullPath.replaceAll('//', '/')
linkWin[data.key].loadURL(data.fullPath) linkWin[data.key].loadURL(data.fullPath)

View File

@ -1,9 +1,9 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2794390 */ font-family: "iconfont"; /* Project id 2794390 */
src: url('iconfont.woff2?t=1723452423265') format('woff2'), src: url('iconfont.woff2?t=1723453634574') format('woff2'),
url('iconfont.woff?t=1723452423265') format('woff'), url('iconfont.woff?t=1723453634574') format('woff'),
url('iconfont.ttf?t=1723452423265') format('truetype'), url('iconfont.ttf?t=1723453634574') format('truetype'),
url('iconfont.svg?t=1723452423265#iconfont') format('svg'); url('iconfont.svg?t=1723453634574#iconfont') format('svg');
} }
.iconfont { .iconfont {
@ -14,6 +14,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-arrangement:before {
content: "\e656";
}
.icon-zanwushuju:before { .icon-zanwushuju:before {
content: "\e655"; content: "\e655";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "4978988",
"name": "作业-布置作业",
"font_class": "arrangement",
"unicode": "e656",
"unicode_decimal": 58966
},
{ {
"icon_id": "9689424", "icon_id": "9689424",
"name": "暂无数据", "name": "暂无数据",

View File

@ -14,6 +14,8 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="arrangement" unicode="&#58966;" d="M939.52 199.67999999999995c-10.24 10.24-25.6 10.24-35.84 0l-184.32-184.32-81.92 81.92c-10.24 10.24-25.6 10.24-35.84 0s-10.24-25.6 0-35.84l102.4-102.4c5.12-5.12 10.24-5.12 20.48-5.12s15.36 0 20.48 5.12l204.8 204.8c-5.12 5.12-5.12 25.6-10.24 35.84zM688.64 537.6c0 15.36-10.24 25.6-25.6 25.6h-409.6c-15.36 0-25.6-10.24-25.6-25.6s10.24-25.6 25.6-25.6h409.6c15.36 0 25.6 10.24 25.6 25.6zM458.24 153.60000000000002h-204.8c-15.36 0-25.6-10.24-25.6-25.6s10.24-25.6 25.6-25.6h204.8c15.36 0 25.6 10.24 25.6 25.6s-10.24 25.6-25.6 25.6zM611.84-76.79999999999995h-460.8c-15.36 0-25.6 10.24-25.6 25.6V742.4c0 15.36 10.24 25.6 25.6 25.6H227.84C227.84 727.04 263.68 691.2 304.64 691.2h307.2c40.96 0 76.8 35.84 76.8 76.8h76.8c15.36 0 25.6-10.24 25.6-25.6v-460.8c0-15.36 10.24-25.6 25.6-25.6s25.6 10.24 25.6 25.6V742.4c0 40.96-35.84 76.8-76.8 76.8H688.64c0 40.96-35.84 76.8-76.8 76.8h-307.2C263.68 896 227.84 860.16 227.84 819.2H151.04C110.08 819.2 74.24 783.36 74.24 742.4v-793.6c0-40.96 35.84-76.8 76.8-76.8h460.8c15.36 0 25.6 10.24 25.6 25.6s-10.24 25.6-25.6 25.6zM279.04 819.2c0 15.36 10.24 25.6 25.6 25.6h307.2c15.36 0 25.6-10.24 25.6-25.6v-51.2c0-15.36-10.24-25.6-25.6-25.6h-307.2c-15.36 0-25.6 10.24-25.6 25.6v51.2zM458.24 358.4h-204.8c-15.36 0-25.6-10.24-25.6-25.6s10.24-25.6 25.6-25.6h204.8c15.36 0 25.6 10.24 25.6 25.6s-10.24 25.6-25.6 25.6z" horiz-adv-x="1024" />
<glyph glyph-name="zanwushuju" unicode="&#58965;" d="M876.202667 543.445333H147.882667L0 282.752V-42.666667h1024v325.376l-147.797333 260.736z m-234.112-263.637333c0-70.485333-58.197333-127.658667-130.090667-127.658667-71.893333 0-130.133333 57.173333-130.133333 127.658667H61.098667L179.541333 501.76H844.373333l118.442667-221.952H642.133333zM500.138667 810.666667h44.629333v-157.610667h-44.629333V810.666667zM197.290667 732.416l31.573333 31.018667L342.272 651.946667l-31.573333-31.018667-113.493334 111.445333z m491.52-80.512l113.493333 111.445333 31.573333-30.976-113.493333-111.445333-31.573333 30.976z" horiz-adv-x="1024" /> <glyph glyph-name="zanwushuju" unicode="&#58965;" d="M876.202667 543.445333H147.882667L0 282.752V-42.666667h1024v325.376l-147.797333 260.736z m-234.112-263.637333c0-70.485333-58.197333-127.658667-130.090667-127.658667-71.893333 0-130.133333 57.173333-130.133333 127.658667H61.098667L179.541333 501.76H844.373333l118.442667-221.952H642.133333zM500.138667 810.666667h44.629333v-157.610667h-44.629333V810.666667zM197.290667 732.416l31.573333 31.018667L342.272 651.946667l-31.573333-31.018667-113.493334 111.445333z m491.52-80.512l113.493333 111.445333 31.573333-30.976-113.493333-111.445333-31.573333 30.976z" horiz-adv-x="1024" />
<glyph glyph-name="xiangzuo" unicode="&#58957;" d="M774.89 725L399.08 380.75l375.81-344.21a39.28 39.28 0 0 0 13.11-29c0-36.51-48.19-54.79-76.38-29L335.8 322.8c-34.94 32-34.94 83.9 0 115.9l375.82 344.22c28.19 25.81 76.38 7.53 76.38-29A39.3 39.3 0 0 0 774.89 725z" horiz-adv-x="1024" /> <glyph glyph-name="xiangzuo" unicode="&#58957;" d="M774.89 725L399.08 380.75l375.81-344.21a39.28 39.28 0 0 0 13.11-29c0-36.51-48.19-54.79-76.38-29L335.8 322.8c-34.94 32-34.94 83.9 0 115.9l375.82 344.22c28.19 25.81 76.38 7.53 76.38-29A39.3 39.3 0 0 0 774.89 725z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 264 KiB

View File

@ -5,7 +5,7 @@
</template> </template>
<script setup> <script setup>
import { ref, watch, defineProps, onMounted, defineEmits } from 'vue'; import { ref, watch, onMounted, defineEmits } from 'vue';
const placeholder = ref('') const placeholder = ref('')
const props = defineProps({ const props = defineProps({

View File

@ -19,8 +19,7 @@ export function shareStorePlugin({store}) {
// 同步数据-发送给主线程 // 同步数据-发送给主线程
function stateSync(store) { function stateSync(store) {
const storeName = store.$id const storeName = store.$id
const jsonStr = JSON.stringify(store.$state) const jsonStr = circularSafeStringify(store.$state)
console.log('state-change', jsonStr, storeName)
// 通知主线程更新 // 通知主线程更新
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr) ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
} }
@ -30,7 +29,7 @@ function stateChange(store) {
ipcRenderer?.on('pinia-state-set', (e, sName, jsonStr) => { ipcRenderer?.on('pinia-state-set', (e, sName, jsonStr) => {
if (sName == storeName) { // 更新对应数据 if (sName == storeName) { // 更新对应数据
// console.log('state-set', jsonStr, sName) // console.log('state-set', jsonStr, sName)
const curJson = JSON.stringify(store.$state) // 当前数据 const curJson = circularSafeStringify(store.$state) // 当前数据
const isUp = curJson != jsonStr // 不同的时候才写入,不然会导致触发数据变化监听,导致死循环 const isUp = curJson != jsonStr // 不同的时候才写入,不然会导致触发数据变化监听,导致死循环
if (!isUp) return if (!isUp) return
const stateJson = JSON.parse(jsonStr) // 新数据 const stateJson = JSON.parse(jsonStr) // 新数据
@ -41,3 +40,18 @@ function stateChange(store) {
} }
}) })
} }
//解决JSON.stringify嵌套循环产生的bug
const circularSafeStringify = (obj) => {
const cache = new Set();
return JSON.stringify(obj, (key, value) => {
if (typeof value === "object" && value !== null) {
if (cache.has(value)) {
// 当前对象已经存在于缓存中,说明存在循环引用,返回占位符或其他处理方式
return "[Circular Reference]";
}
cache.add(value);
}
return value;
});
}

View File

@ -47,6 +47,12 @@ export default () => {
data: { ...baseConfig() }, data: { ...baseConfig() },
fullPath: `${baseConfig().url}/platofai` fullPath: `${baseConfig().url}/platofai`
}, },
// 文件资源 布置作业
filehomework: {
data: { ...baseConfig() },
fullPath: `${baseConfig().url}/teaching/classtaskassign?titleName=作业布置`
},
getBaseData: () => { getBaseData: () => {
return { return {

View File

@ -82,7 +82,9 @@ export function ipcHandle(fn,key, cb) {
* @param {*} data 参数 * @param {*} data 参数
* @returns * @returns
*/ */
let wins_tool = null
export const createWindow = async (type, data) => { export const createWindow = async (type, data) => {
if (wins_tool) return console.error('createWindow: win is have')
if (!type) return console.error('createWindow: type is null') if (!type) return console.error('createWindow: type is null')
switch(type) { switch(type) {
case 'tool-sphere': { // 创建-悬浮球 case 'tool-sphere': { // 创建-悬浮球
@ -97,16 +99,16 @@ export const createWindow = async (type, data) => {
} }
data.isConsole = true // 是否开启控制台 data.isConsole = true // 是否开启控制台
data.option = {...defOption, ...option} data.option = {...defOption, ...option}
const win = await toolWindow(data) wins_tool = await toolWindow(data)
win.type = type // 唯一标识 wins_tool.type = type // 唯一标识
win.show() wins_tool.show()
win.setFullScreen(true) // 设置窗口为全屏 wins_tool.setFullScreen(true) // 设置窗口为全屏
win.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口 wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
win.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口 wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
win.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
// win.webContents.openDevTools() // 打开调试工具 // win.webContents.openDevTools() // 打开调试工具
eventHandles(type, win) // 事件监听处理 eventHandles(type, wins_tool) // 事件监听处理
return win return wins_tool
} }
case 'open-PDF': { //课本展示-pdf case 'open-PDF': { //课本展示-pdf
const option = data.option||{} const option = data.option||{}
@ -193,6 +195,7 @@ const eventHandles = (type, win) => {
win.on('closed', () => { win.on('closed', () => {
if(onClosed) onClosed() // 自定义关闭事件 if(onClosed) onClosed() // 自定义关闭事件
win = null win = null
wins_tool = null
}) })
// 新窗口-创建事件(如:主进程加载远程服务) // 新窗口-创建事件(如:主进程加载远程服务)
ipcRenderer.send('new-window', {id:win.id, type}) ipcRenderer.send('new-window', {id:win.id, type})

View File

@ -108,7 +108,7 @@
<script setup> <script setup>
import {listClassmain, listClassuser, addClassgroup, listClassgroup, delClassgroup,getClassgroup,updateClassgroup} from '@/api/classManage/index' import {listClassmain, listClassuser, addClassgroup, listClassgroup, delClassgroup,getClassgroup,updateClassgroup} from '@/api/classManage/index'
import {ref, onMounted, reactive, defineProps, watch} from 'vue' import {ref, onMounted, reactive, watch} from 'vue'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";

View File

@ -22,7 +22,7 @@
import {ElMessage, ElMessageBox} from "element-plus"; import {ElMessage, ElMessageBox} from "element-plus";
import { getClassmain,listClassuser,leaveClass} from '@/api/classManage/index' import { getClassmain,listClassuser,leaveClass} from '@/api/classManage/index'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import {reactive,onMounted,defineProps,nextTick,watch} from 'vue' import {reactive,onMounted,nextTick,watch} from 'vue'
import delClassDemo from '@/store/modules/delClass' import delClassDemo from '@/store/modules/delClass'
const props = defineProps({ const props = defineProps({
classId: { classId: {

View File

@ -17,6 +17,8 @@
v-show="tabActive === '已结束'" v-show="tabActive === '已结束'"
:key="index" :key="index"
:item="item" :item="item"
@open-edit="reservDialog.openDialog(item)"
@delete-reserv="deleteReserv(item)"
></reserv-item> ></reserv-item>
</div> </div>
<reserv ref="reservDialog"></reserv> <reserv ref="reservDialog"></reserv>
@ -51,8 +53,8 @@ const doneDataList = computed(() => {
}) })
const toolStore = useToolState() const toolStore = useToolState()
watch( watch(
() => toolStore.isToolWin, () => [dataList,toolStore.isToolWin],
(newD, oldD) => { () => {
getSelfReserv().then((res) => { getSelfReserv().then((res) => {
dataList.value = [...res.data] dataList.value = [...res.data]
}) })

View File

@ -68,18 +68,18 @@ const startClassR = (item) => {
} }
}) })
} }
const toolStore = useToolState() // const toolStore = useToolState()
let wins = null;
// - // -
const openLesson = () => { const openLesson = () => {
if (toolStore.isToolWin) return ElMessage.error('您当前已开始上课,请勿重复操作')
startClass(props.item.id) startClass(props.item.id)
listEntpcourse({ listEntpcourse({
evalid: props.item.ex2, evalid: props.item.ex2,
edituserid: useUserStore().user.userId, edituserid: useUserStore().user.userId,
pageSize: 500 pageSize: 500
}).then(res=>{ }).then(async res=>{
if (res.rows[0].id) { if (res.rows[0].id) {
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id }) wins = await createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
} }
}) })
} }

View File

@ -112,7 +112,7 @@
<script setup> <script setup>
import {addStudentmain, listClassuser,updateStudentmain,getClassmain,getStudentmain,leaveClass,removeStudentDataAll,addStudentmainByNameArray} from '@/api/classManage/index' import {addStudentmain, listClassuser,updateStudentmain,getClassmain,getStudentmain,leaveClass,removeStudentDataAll,addStudentmainByNameArray} from '@/api/classManage/index'
import {ref, onMounted, reactive, nextTick, defineProps, watch} from 'vue' import {ref, onMounted, reactive, nextTick, watch} from 'vue'
import {ElMessage,ElMessageBox} from "element-plus"; import {ElMessage,ElMessageBox} from "element-plus";
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import * as XLSX from 'xlsx' import * as XLSX from 'xlsx'

View File

@ -94,13 +94,20 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<!-- 判断是不是自己创建的课件-->
<div class="item-popover-item"> <div class="item-popover-item">
<el-button text @click="openFileLink(item)">
<i class="iconfont icon-arrangement"></i>
<span>布置</span>
</el-button>
</div>
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<el-button text @click="editTalk(item, index)"> <el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i> <i class="iconfont icon-bianji"></i>
<span>重命名</span> <span>重命名</span>
</el-button> </el-button>
</div> </div>
<div class="item-popover-item"> <div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<el-button text @click="deleteTalk(item)"> <el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i> <i class="iconfont icon-shanchu"></i>
<span>删除</span> <span>删除</span>
@ -140,6 +147,8 @@ import { asyncLocalFile } from '@/utils/talkFile'
import { toTimeText } from '@/utils/date' import { toTimeText } from '@/utils/date'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file' import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
import useUserStore from '@/store/modules/user'
import outLink from '@/utils/linkConfig'
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
export default { export default {
@ -162,11 +171,13 @@ export default {
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null }, emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null },
data() { data() {
return { return {
listenList: [] listenList: [],
userInfo:{}
} }
}, },
methods: { methods: {
editTalk(item) { editTalk(item) {
console.log(item,this.userInfo,'this.userInfo')
ElMessageBox.prompt('请输入新的名称', '重命名', { ElMessageBox.prompt('请输入新的名称', '重命名', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -252,7 +263,22 @@ export default {
// //
deleteHomework(item){ deleteHomework(item){
this.$emit('on-delhomework', item) this.$emit('on-delhomework', item)
},
// web AIX
openFileLink(item){
// key linkConfig.js
let key = 'filehomework'
let configObj = outLink()[key]
//
ipcRenderer.send('openWindow', {
key,
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`,
cookieData: { ...configObj.data }
})
} }
},
mounted() {
this.userInfo = useUserStore().user
} }
} }
</script> </script>

View File

@ -192,10 +192,10 @@ export default {
// //
userStore: '', userStore: '',
entpcourseid: '', entpcourseid: '',
timerId: null,
// //
setDialog: false, setDialog: false,
row: '' row: '',
isOpenHomework: false
} }
}, },
computed: { computed: {
@ -205,13 +205,7 @@ export default {
) )
} }
}, },
watch: {
$route(to) {
if (to.path != '/prepare' && this.timerId) {
clearInterval(this.timerId)
}
}
},
created() { created() {
this.userStore = useUserStore().user this.userStore = useUserStore().user
ipcRenderer.removeAllListeners('copy-file-default-reply') ipcRenderer.removeAllListeners('copy-file-default-reply')
@ -229,6 +223,16 @@ export default {
setTimeout(this.initReserv, 500) setTimeout(this.initReserv, 500)
} }
) )
// electron
const curWin = Remote.getCurrentWindow()
curWin.on('focus', ()=>{
if(!this.isOpenHomework) return
console.log(100)
this.initHomeWork()
this.isOpenHomework = false
})
}, },
// activated() { // activated() {
// if (this.uploadData.textbookId !== null) { // if (this.uploadData.textbookId !== null) {
@ -423,9 +427,7 @@ export default {
await this.asyncAllFile() await this.asyncAllFile()
}, },
async initHomeWork() { async initHomeWork() {
if (this.timerId) {
clearInterval(this.timerId)
}
if (this.uploadData.levelSecondId) { if (this.uploadData.levelSecondId) {
// ID // ID
let { rows } = await this.getChapterId() let { rows } = await this.getChapterId()
@ -468,9 +470,8 @@ export default {
}, },
// //
handleOutLink(key) { handleOutLink(key) {
if (key == 'homeWork') { if(key == 'homeWork'){
// this.isOpenHomework = true
this.createTimer()
} }
// key linkConfig.js // key linkConfig.js
let configObj = outLink()[key] let configObj = outLink()[key]
@ -483,19 +484,13 @@ export default {
}, },
// ID ID // ID ID
getChapterId() { getChapterId() {
console.log(this.userStore, 'this.userStore')
return listEntpcourse({ return listEntpcourse({
evalid: this.uploadData.levelSecondId, evalid: this.uploadData.levelSecondId,
edituserid: this.userStore.userId, edituserid: this.userStore.userId,
pageSize: 500 pageSize: 500
}) })
}, },
//
createTimer() {
this.timerId = setInterval(() => {
this.getHomeWorkList()
}, 2500)
},
// //
getHomeWorkList() { getHomeWorkList() {
homeworklist({ homeworklist({
@ -557,7 +552,7 @@ export default {
} }
} }
// //
let ary = uniqBy([...this.currentFileList, ...list], 'id') let ary = uniqBy([...list], 'id')
// //
this.currentWorkList = cloneDeep(ary) this.currentWorkList = cloneDeep(ary)
}) })
@ -601,7 +596,6 @@ export default {
// - // -
openLesson() { openLesson() {
const toolStore = useToolState() const toolStore = useToolState()
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
startClass(this.curClassReserv.id) startClass(this.curClassReserv.id)
createWindow('tool-sphere', { createWindow('tool-sphere', {
url: url:

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20" style="display: flex;flex-wrap: nowrap;justify-content: start">
<el-col :span="6" :xs="24"> <el-col :xs="24" style="min-width: 260px;max-width: 260px">
<el-card class="box-card"> <el-card class="box-card">
<template v-slot:header> <template v-slot:header>
<div class="clearfix"> <div class="clearfix">

View File

@ -25,6 +25,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
</li> </li>
<!--作业--> <!--作业-->
<li class="item flex" v-for="item in dataList" :key="item.id"> <li class="item flex" v-for="item in dataList" :key="item.id">
@ -82,8 +83,9 @@ import { useToolState } from '@/store/modules/tool'
import { asyncLocalFile } from '@/utils/talkFile' import { asyncLocalFile } from '@/utils/talkFile'
import Lesson from './lesson.vue'; import Lesson from './lesson.vue';
import { parseCataByNode } from '@/utils/talkFile' import { parseCataByNode } from '@/utils/talkFile'
import outLink from '@/utils/linkConfig'
const { ipcRenderer } = window.electron || {} import { ipcMsgSend2 } from '@/utils/tool'
const route = useRoute(); const route = useRoute();
const usertore = useUserStore().user const usertore = useUserStore().user
const toolStore = useToolState() const toolStore = useToolState()
@ -127,6 +129,19 @@ const changeChapter = async (data)=>{
getResource() getResource()
} }
// web AIX
const openFileLink = (item) =>{
// key linkConfig.js
let key = 'filehomework'
let configObj = outLink()[key]
ipcMsgSend2('openWindow', {
key,
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`,
cookieData: { ...configObj.data }
})
}
// //
const getResource = () => { const getResource = () => {
let querySearch = toRaw(toolStore.curSubjectNode).querySearch let querySearch = toRaw(toolStore.curSubjectNode).querySearch
@ -233,7 +248,7 @@ onMounted(() => {
getHomework() getHomework()
setTimeout(()=>{ setTimeout(()=>{
getResource() getResource()
},5000) },1000)
}) })
</script> </script>

View File

@ -139,4 +139,4 @@ const clickHandel = (o, e) => {
color: red; color: red;
} }
</style> </style>

View File

@ -109,7 +109,7 @@ const sideMouse = e => {
mouseChange(type == 'mouseleave') mouseChange(type == 'mouseleave')
} }
// : // :
const sideChange = o => { const sideChange = async o => {
// console.log(o) // console.log(o)
switch(o.prop) { switch(o.prop) {
case 'resource': // case 'resource': //
@ -120,7 +120,7 @@ const sideChange = o => {
break break
case 'over': // case 'over': //
toolStore.isToolWin = false toolStore.isToolWin = false
endClass(route.query.reservId) await endClass(route.query.reservId)
ipcMsgSend('tool-sphere:close') ipcMsgSend('tool-sphere:close')
break break
} }