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

updates:资源详情跳转调整

上级 c936e35e
......@@ -6,6 +6,7 @@ import { useGetCategoryList } from '@/composables/useGetCategoryList'
const appList = ref()
// 资源出处 tab触发
const tabValue = ref('1')
const path = ref('')
let tableData: any = reactive({
list: [],
title: '',
......@@ -106,6 +107,15 @@ const handleSave = () => {
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>
<template>
......@@ -137,12 +147,11 @@ const handleSave = () => {
<div class="card-list" v-if="data.length">
<div class="card-list-con">
<div style="position: relative" v-for="(item, index) in data" :key="index">
{{ item.check_status }}
<el-checkbox
v-model="item.check_status"
style="position: absolute; right: 40px; bottom: 22px"
></el-checkbox>
<CardListItem :tabIndex="tabValue" :data="item"> </CardListItem>
<CardListItem :tabIndex="tabValue" :data="item" :path="path"> </CardListItem>
</div>
</div>
</div>
......
<script setup lang="ts">
const props: any = defineProps<{ data: object; tabIndex: string }>()
const props: any = defineProps<{ data: object; tabIndex: string; path: string }>()
</script>
<template>
<!-- <div>{{ props.data }}</div> -->
......@@ -15,7 +15,7 @@ const props: any = defineProps<{ data: object; tabIndex: string }>()
</router-link> -->
</div>
<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>
</router-link>
</div>
......
......@@ -229,10 +229,10 @@ const handleDrop = (startNode: any, endNode: any, position: any, event: any) =>
</template>
</el-tree>
<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
>
<el-button type="primary" @click="router.push('/course/my')">保存</el-button>
</div>
</AppCard>
<!-- 添加章 -->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论