提交 9bec5a21 authored 作者: matian's avatar matian

updates:资源详情跳转调整

上级 c936e35e
...@@ -6,6 +6,7 @@ import { useGetCategoryList } from '@/composables/useGetCategoryList' ...@@ -6,6 +6,7 @@ import { useGetCategoryList } from '@/composables/useGetCategoryList'
const appList = ref() const appList = ref()
// 资源出处 tab触发 // 资源出处 tab触发
const tabValue = ref('1') const tabValue = ref('1')
const path = ref('')
let tableData: any = reactive({ let tableData: any = reactive({
list: [], list: [],
title: '', title: '',
...@@ -106,6 +107,15 @@ const handleSave = () => { ...@@ -106,6 +107,15 @@ const handleSave = () => {
emit('create') emit('create')
}) })
} }
if (props.btnInfo.resource_type === '2') {
path.value = '/resource/video/view'
} else if (props.btnInfo.resource_type === '10') {
path.value = '/resource/courseware/view'
} else if (props.btnInfo.resource_type === '11') {
path.value = '/resource/lessonplan/view'
} else if (props.btnInfo.resource_type === '4') {
path.value = '/resource/other/view'
}
</script> </script>
<template> <template>
...@@ -137,12 +147,11 @@ const handleSave = () => { ...@@ -137,12 +147,11 @@ const handleSave = () => {
<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">
<div style="position: relative" v-for="(item, index) in data" :key="index"> <div style="position: relative" v-for="(item, index) in data" :key="index">
{{ item.check_status }}
<el-checkbox <el-checkbox
v-model="item.check_status" v-model="item.check_status"
style="position: absolute; right: 40px; bottom: 22px" style="position: absolute; right: 40px; bottom: 22px"
></el-checkbox> ></el-checkbox>
<CardListItem :tabIndex="tabValue" :data="item"> </CardListItem> <CardListItem :tabIndex="tabValue" :data="item" :path="path"> </CardListItem>
</div> </div>
</div> </div>
</div> </div>
......
<script setup lang="ts"> <script setup lang="ts">
const props: any = defineProps<{ data: object; tabIndex: string }>() const props: any = defineProps<{ data: object; tabIndex: string; path: string }>()
</script> </script>
<template> <template>
<!-- <div>{{ props.data }}</div> --> <!-- <div>{{ props.data }}</div> -->
...@@ -15,7 +15,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>() ...@@ -15,7 +15,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
</router-link> --> </router-link> -->
</div> </div>
<div style="min-width: 100%"> <div style="min-width: 100%">
<router-link v-if="props.data.auth_view" :to="`/resource/video/view?id=${props.data.id}`"> <router-link v-if="props.data.auth_view" :to="`${props.path}?id=${props.data.id}`">
<div class="view-btn">查看</div> <div class="view-btn">查看</div>
</router-link> </router-link>
</div> </div>
......
...@@ -229,10 +229,10 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) => ...@@ -229,10 +229,10 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
</template> </template>
</el-tree> </el-tree>
<div class="btn-box" style="display: flex; justify-content: center"> <div class="btn-box" style="display: flex; justify-content: center">
<el-button type="primary" @click="router.push('/course/my')">保存</el-button>
<el-button type="primary" @click="router.push({ path: '/course/update-course', query: { id: id } })" <el-button type="primary" @click="router.push({ path: '/course/update-course', query: { id: id } })"
>上一步</el-button >上一步</el-button
> >
<el-button type="primary" @click="router.push('/course/my')">保存</el-button>
</div> </div>
</AppCard> </AppCard>
<!-- 添加章 --> <!-- 添加章 -->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论