diff --git a/src/main/store.js b/src/main/store.js index c37f8f5..0607e19 100644 --- a/src/main/store.js +++ b/src/main/store.js @@ -16,6 +16,12 @@ const defaultData = { curSubjectNode: { data: {}, // 当前教材节点 (包含当前教材 单元) querySearch: {} // 查询资源所需参数 + }, + subject: { + bookList: null, // 教材列表 + curBook: null, // 当前选中的教材 + curNode: null, // 当前选中的节点 + defaultExpandedKeys: [], //展开的节点 } }, local: { // 本地(永久localStorage) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index a79d68b..aa50586 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -44,11 +44,12 @@ 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 99f1da3..7334daa 100644 --- a/src/renderer/src/views/prepare/container/kj-list-item.vue +++ b/src/renderer/src/views/prepare/container/kj-list-item.vue @@ -207,8 +207,8 @@ export default { }, openFileWin(items) { if (items.fileFlag === 'apt') { - let curBook = JSON.parse(localStorage.getItem('curBook')) - const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id; + const { id, rootid } = sessionStore.get('subject.curNode') + const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + id + "&bookId=" + rootid; let configObj = outLink().getBaseData() let fullPath = configObj.fullPath + path fullPath = fullPath.replaceAll('//', '/') diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index d675bcb..5de5618 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -1,6 +1,6 @@