lyc-dev #100

Merged
lyc merged 3 commits from lyc-dev into main 2024-08-05 17:05:17 +08:00
2 changed files with 16 additions and 10 deletions
Showing only changes of commit d46d312b37 - Show all commits

View File

@ -5,7 +5,7 @@
<span>{{ curBookName }}</span>
<i class="iconfont icon-xiangyou"></i>
</div>
<div class="book-list">
<div class="book-list" v-loading="treeLoading">
<el-tree ref="refTree" :data="treeData" :props="defaultProps" node-key="id"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNode" highlight-current
@node-click="handleNodeClick">
@ -60,6 +60,8 @@ const defaultProps = {
label: 'label',
class: 'textbook-tree'
}
const treeLoading = ref(false)
//ID
const curBookId = ref(-1)
//
@ -82,6 +84,7 @@ const refTree = ref(null)
//
const getSubjectContent = async () => {
treeLoading.value = true
const params = {
edusubject,
edustage,
@ -93,12 +96,17 @@ const getSubjectContent = async () => {
if (localStorage.getItem('evaluationList')) {
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
data = evaluationList.value
treeLoading.value = false
}
else {
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
try {
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
} finally {
treeLoading.value = false
}
}
//

View File

@ -54,7 +54,7 @@ const rules = reactive({
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
})
let curWinUrl;
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH;
//
const submitForm = async (formEl) => {
@ -131,9 +131,7 @@ const setCookie = (name, value) => {
onMounted(() => {
// URL
curWinUrl = BrowserWindow.getFocusedWindow().webContents.getURL()
localStorage.clear()
getCookie()
})
</script>