提交 5e62f249 authored 作者: 王鹏飞's avatar 王鹏飞

feat: 清理无用代码并修复变量引用错误

上级 bdba14af
...@@ -78,10 +78,10 @@ const btnList = [ ...@@ -78,10 +78,10 @@ const btnList = [
btn_name: '直播', btn_name: '直播',
resource_type: '6', resource_type: '6',
}, },
{ // {
btn_name: '知识点', // btn_name: '知识点',
resource_type: '999', // resource_type: '999',
}, // },
{ {
btn_name: '关联数字教材', btn_name: '关联数字教材',
resource_type: '13', resource_type: '13',
...@@ -152,7 +152,7 @@ const setDefaultKnowledgePoints = (courseData: any) => { ...@@ -152,7 +152,7 @@ const setDefaultKnowledgePoints = (courseData: any) => {
// 在knowledgeTree中查找匹配的知识点 // 在knowledgeTree中查找匹配的知识点
const matchedKnowledge = knowledgeTree.find( const matchedKnowledge = knowledgeTree.find(
(item: any) => (item: any) =>
item.courseName === courseName && item.chapterName === fullChapterName && item.sectionName === sectionName item.courseName === courseName && item.chapterName === fullChapterName && item.sectionName === sectionName,
) )
if (matchedKnowledge) { if (matchedKnowledge) {
...@@ -166,7 +166,7 @@ const setDefaultKnowledgePoints = (courseData: any) => { ...@@ -166,7 +166,7 @@ const setDefaultKnowledgePoints = (courseData: any) => {
matchedKnowledge.children, matchedKnowledge.children,
courseData.id, courseData.id,
chapter.parent_id, chapter.parent_id,
chapter.id chapter.id,
) )
// 添加到现有数据中 // 添加到现有数据中
...@@ -198,7 +198,7 @@ const convertKnowledgeToStorageFormat = ( ...@@ -198,7 +198,7 @@ const convertKnowledgeToStorageFormat = (
knowledgeNodes: any[], knowledgeNodes: any[],
courseId: string, courseId: string,
chapterId: string, chapterId: string,
sectionId: string sectionId: string,
): any[] => { ): any[] => {
const result: any[] = [] const result: any[] = []
...@@ -322,7 +322,7 @@ const handleConsult = (node: any) => { ...@@ -322,7 +322,7 @@ const handleConsult = (node: any) => {
} }
if (node.data.resource_type === '13') { if (node.data.resource_type === '13') {
window.open( window.open(
`https://zijingebook.ezijing.com/student/book?book_id=${route.query.bid}&chapter_id=${node.data.resource_id}` `https://zijingebook.ezijing.com/student/book?book_id=${route.query.bid}&chapter_id=${node.data.resource_id}`,
) )
} }
} }
...@@ -513,7 +513,7 @@ const handleShowCourseKnowledgeGraph = () => { ...@@ -513,7 +513,7 @@ const handleShowCourseKnowledgeGraph = () => {
v-permission="'v1-course-create-chapter'" v-permission="'v1-course-create-chapter'"
>添加章</el-button >添加章</el-button
> >
<el-button type="primary" round style="margin-bottom: 20px" @click="handleShowCourseKnowledgeGraph" <el-button type="primary" round style="margin-bottom: 20px" @click="handleShowCourseKnowledgeGraph" v-if="false"
>知识点脑图</el-button >知识点脑图</el-button
> >
<div class="course_tip"> <div class="course_tip">
...@@ -603,7 +603,11 @@ const handleShowCourseKnowledgeGraph = () => { ...@@ -603,7 +603,11 @@ const handleShowCourseKnowledgeGraph = () => {
<el-icon><Plus /></el-icon> <el-icon><Plus /></el-icon>
&nbsp; 添加小节 &nbsp; 添加小节
</el-button> </el-button>
<el-button class="btn_operate" v-if="data.depth === '1'" @click="handleShowKnowledgeGraph(node)"> <el-button
class="btn_operate"
v-if="data.depth === '1'"
@click="handleShowKnowledgeGraph(node)"
v-show="false">
<el-icon><Plus /></el-icon> <el-icon><Plus /></el-icon>
&nbsp; 知识点脑图 &nbsp; 知识点脑图
</el-button> </el-button>
......
...@@ -69,11 +69,13 @@ const addTagId = ref<any>('') ...@@ -69,11 +69,13 @@ const addTagId = ref<any>('')
const handleAddTagSame = (scope: any) => { const handleAddTagSame = (scope: any) => {
const id = findParentIdById(tableData.value, scope?.row?.id) const id = findParentIdById(tableData.value, scope?.row?.id)
addTagId.value = id || '' addTagId.value = id || ''
pName.value = ''
isUpdate.value = false isUpdate.value = false
dialogVisible.value = true dialogVisible.value = true
} }
const handleAddTagChild = (scope: any) => { const handleAddTagChild = (scope: any) => {
addTagId.value = scope?.row.id addTagId.value = scope?.row.id
pName.value = ''
isUpdate.value = false isUpdate.value = false
dialogVisible.value = true dialogVisible.value = true
} }
...@@ -86,7 +88,7 @@ const handleUpdateTag = (scope: any) => { ...@@ -86,7 +88,7 @@ const handleUpdateTag = (scope: any) => {
// 输入完名称点击输入框 // 输入完名称点击输入框
const handleConfirm = () => { const handleConfirm = () => {
if (isUpdate) { if (isUpdate.value) {
updateTagRequest() updateTagRequest()
} else { } else {
addTagRequest() addTagRequest()
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论