提交 19d93265 authored 作者: matian's avatar matian

修改添加课程添加视频警告

上级 dbe032f8
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
import { getVideoList, createCharacter, getCourseListSearch, getLessonList, getOtherList } from '../../api' import { getVideoList, createCharacter, getCourseListSearch, getLessonList, getOtherList } from '../../api'
import CardListItem from './CardListItem.vue' import CardListItem from './CardListItem.vue'
import { useGetCategoryList } from '@/composables/useGetCategoryList' import { useGetCategoryList } from '@/composables/useGetCategoryList'
const appList = ref() const appList = ref()
const currentResource: any = $ref({}) const currentResource: any = $ref('')
// 资源出处 tab触发 // 资源出处 tab触发
const tabValue = ref('1') const tabValue = ref('1')
const path = ref('') const path = ref('')
...@@ -94,13 +93,12 @@ const handleCancel = () => { ...@@ -94,13 +93,12 @@ const handleCancel = () => {
// 保存 添加 // 保存 添加
const handleSave = () => { const handleSave = () => {
const params: any = { const params: any = {
name: currentResource.name, name: tableData.list.filter((item: any) => item.id === currentResource)[0]?.name,
course_id: props.course_id, course_id: props.course_id,
resource_type: props.btnInfo.resource_type, resource_type: props.btnInfo.resource_type,
parent_id: props.chapterID, parent_id: props.chapterID,
resource_id: currentResource.id resource_id: currentResource
} }
createCharacter(params).then(() => { createCharacter(params).then(() => {
emit('update:isShowAddDialog', false) emit('update:isShowAddDialog', false)
emit('create') emit('create')
...@@ -145,6 +143,7 @@ if (props.btnInfo.resource_type === '2') { ...@@ -145,6 +143,7 @@ if (props.btnInfo.resource_type === '2') {
<template #body="{ data }"> <template #body="{ data }">
<div class="card-list" v-if="data.length"> <div class="card-list" v-if="data.length">
<div class="card-list-con"> <div class="card-list-con">
{{ currentResource }}
<el-radio-group v-model="currentResource"> <el-radio-group v-model="currentResource">
<div style="position: relative" v-for="(item, index) in data" :key="index"> <div style="position: relative" v-for="(item, index) in data" :key="index">
<el-radio <el-radio
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论