From 1a20fcc8353a1545ae209da953234a35d5a322ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Wed, 9 Oct 2024 16:17:31 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=95=99=E5=AD=A6=E5=AE=9E=E8=B7=B5]=20-=20?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=B8=AD=E5=A2=9E=E5=8A=A0=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=8F=8A=E5=8D=95=E4=BB=BB=E5=8A=A1=E7=BC=96?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/views/desktop/index.vue | 4 +-
.../prepare/container/file-list-item.vue | 16 +++++--
.../views/prepare/container/kj-list-item.vue | 2 +-
src/renderer/src/views/prepare/index.vue | 44 ++++++++++++++-----
.../views/resource/container/resoure-list.vue | 2 +-
5 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/src/renderer/src/views/desktop/index.vue b/src/renderer/src/views/desktop/index.vue
index 0f3758c..641c305 100644
--- a/src/renderer/src/views/desktop/index.vue
+++ b/src/renderer/src/views/desktop/index.vue
@@ -183,10 +183,10 @@ const clickMenu = ({isOuter, path, disabled, id}) =>{
// 头部 教材分析打开外部链接需要当前章节ID
const { id, rootid } = sessionStore.get('subject.curNode')
if(fullPath.indexOf('?') == -1){
- fullPath += `?unitId=${id}&bookeId=${rootid}`
+ fullPath += `?unitId=${id}&bookId=${rootid}`
}
else{
- fullPath += `&unitId=${id}&bookeId=${rootid}`
+ fullPath += `&unitId=${id}&bookId=${rootid}`
}
}
fullPath = fullPath.replaceAll('//', '/')
diff --git a/src/renderer/src/views/prepare/container/file-list-item.vue b/src/renderer/src/views/prepare/container/file-list-item.vue
index c880492..f617afb 100644
--- a/src/renderer/src/views/prepare/container/file-list-item.vue
+++ b/src/renderer/src/views/prepare/container/file-list-item.vue
@@ -86,10 +86,16 @@
布置
+
+
+
+ 编辑
+
+
- 删除
+ 删除
@@ -110,7 +116,7 @@
- 删除
+ 删除
@@ -168,7 +174,7 @@ export default {
}
}
},
- emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
+ emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
listenList: [],
@@ -275,6 +281,10 @@ export default {
setHomeWork(item) {
this.$emit('on-set', item)
},
+ // 编辑
+ reSetHomeWork(item) {
+ this.$emit('on-reSet', item)
+ },
// 删除作业
deleteHomework(item){
this.$emit('on-delhomework', item)
diff --git a/src/renderer/src/views/prepare/container/kj-list-item.vue b/src/renderer/src/views/prepare/container/kj-list-item.vue
index 7334daa..c660859 100644
--- a/src/renderer/src/views/prepare/container/kj-list-item.vue
+++ b/src/renderer/src/views/prepare/container/kj-list-item.vue
@@ -76,7 +76,7 @@
- 删除
+ 删除
diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue
index 40469a7..1346ea5 100644
--- a/src/renderer/src/views/prepare/index.vue
+++ b/src/renderer/src/views/prepare/index.vue
@@ -116,22 +116,20 @@
-
+
@@ -596,6 +594,7 @@ export default {
openReserv() {
this.$refs['reservDialog'].openDialog()
},
+
// 打开外部链接
handleOutLink(key) {
if (key == 'homeWork') {
@@ -609,12 +608,15 @@ export default {
let unitId = this.uploadData.levelSecondId
? this.uploadData.levelSecondId
: this.uploadData.levelFirstId
- if (key == 'gk') {
- fullPath += `?unitId=${unitId}`
- } else {
- fullPath += `&unitId=${unitId}`
+ let bookId = this.uploadData.textbookId;
+ if(fullPath.indexOf('?') == -1){
+ fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
+ }
+ else{
+ fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
}
}
+
// 通知主进程
ipcRenderer.send('openWindow', {
key,
@@ -632,6 +634,27 @@ export default {
this.row = row
this.setDialog = true
},
+ // 打开作业编辑窗口
+ openReSet(row) {
+ // 新窗口打开标识
+ this.isOpenHomework = true;
+ // key 对应的 linkConfig.js 外部链接配置
+ let configObj = outLink()['homeWork']
+ let fullPath = configObj.fullPath
+
+ let unitId = this.uploadData.levelSecondId
+ ? this.uploadData.levelSecondId
+ : this.uploadData.levelFirstId
+ let bookId = this.uploadData.textbookId;
+ fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
+
+ // 通知主进程
+ ipcRenderer.send('openWindow', {
+ key: 'homeWork',
+ fullPath: fullPath,
+ cookieData: { ...configObj.data }
+ })
+ },
// 删除作业
delhomework(item) {
this.isLoading = true
@@ -874,6 +897,7 @@ export default {
width: 100%;
flex: 1;
overflow: auto;
+ margin-top: 10px;
}
.prepare-body-main {
flex: 1;
diff --git a/src/renderer/src/views/resource/container/resoure-list.vue b/src/renderer/src/views/resource/container/resoure-list.vue
index 162d6bd..517d97f 100644
--- a/src/renderer/src/views/resource/container/resoure-list.vue
+++ b/src/renderer/src/views/resource/container/resoure-list.vue
@@ -61,7 +61,7 @@
@click="delRow(item)"
>
- 删除
+ 删除