This commit is contained in:
parent
be78520410
commit
48cd120eed
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
div<template>
|
||||
<div class="book-wrap">
|
||||
<el-scrollbar height="100%">
|
||||
<div class="book-name flex" v-if="isStadium() === true"> {{userStore.user.deptName}}</div>
|
||||
|
@ -7,11 +7,29 @@
|
|||
<i class="iconfont icon-xiangyou"></i>
|
||||
</div>
|
||||
<div class="book-list" v-loading="treeLoading">
|
||||
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id" :render-content="renderContent"
|
||||
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id"
|
||||
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
|
||||
@node-click="handleNodeClick">
|
||||
<template #default="{ node }">
|
||||
<span :title="node.label" class="tree-label" >
|
||||
{{ node.label }}
|
||||
</span>
|
||||
<!-- <div v-if="node.bookId == '' || node.bookId == '0'">
|
||||
<el-tooltip effect="light" placement="top" content="当前单元章节无试题">
|
||||
<span :title="node.label" class="tree-label" style="color: #A5B3CA">
|
||||
{{ node }}
|
||||
</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span :title="node.label" class="tree-label">{{ node.label }}</span>
|
||||
</div> -->
|
||||
<!-- <div v-if="props.isClassTask == true">
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<span :title="node.label" class="tree-label">{{ node.label }}</span>
|
||||
</div> -->
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
|
@ -51,6 +69,13 @@ import useUserStore from '@/store/modules/user'
|
|||
const userStore = useUserStore()
|
||||
|
||||
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
|
||||
const props = defineProps({
|
||||
// 是否为[教学大模型]中使用(作业设计中对应该章节是否存在第三方试题)
|
||||
isClassTask: {
|
||||
default: true
|
||||
},
|
||||
})
|
||||
const isStadium = () => {
|
||||
let roles = userStore.user.roles
|
||||
return roles.some(item => item.roleKey === 'stadium')
|
||||
|
@ -184,7 +209,7 @@ const renderContent = (h, { node, data, store }) => {
|
|||
'span',
|
||||
{
|
||||
style: {
|
||||
color: data.bookId==''||data.bookId=='0' ? '#A5B3CA' : 'black',
|
||||
color: props.isClassTask ? data.bookId==''||data.bookId=='0'?'#A5B3CA':'black' : 'black',
|
||||
},
|
||||
},
|
||||
node.label
|
||||
|
|
|
@ -815,6 +815,7 @@ const editWork = async (cform) =>{
|
|||
let res = await updateClasswork(cform);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
taskList.value = [];
|
||||
// 清空左侧 选中的布置列表 并刷新列表
|
||||
if(isShow.value){
|
||||
currentRow.value.id = 1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-row class="model-wrap">
|
||||
<!-- 左侧 选择教材 目录 -->
|
||||
<ChooseTextbook @change-book="changeBook" @node-click="changeBook" />
|
||||
<ChooseTextbook :isClassTask="true" @change-book="changeBook" @node-click="changeBook" />
|
||||
<!-- 右侧 展示内容 -->
|
||||
<div class="right-content">
|
||||
<div class="content-header-wrap">
|
||||
|
|
Loading…
Reference in New Issue