|
|
@@ -1,6 +1,4 @@
|
|
|
<template>
|
|
|
- <!-- <a-layout> -->
|
|
|
- <!-- <Header @onChangeCurrent="onChangeCurrent" /> -->
|
|
|
<div class="resource-container">
|
|
|
<!-- <BreadCrumb /> -->
|
|
|
<div class="resource">
|
|
|
@@ -13,33 +11,23 @@
|
|
|
</div>
|
|
|
<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
|
|
|
</div>
|
|
|
- <!-- </a-layout> -->
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import Header from '@/views/portal/components/Header.vue'
|
|
|
- import BreadCrumb from '@/views/portal/components/BreadCrumb.vue'
|
|
|
- import Footer from '@/views/portal/components/Footer.vue'
|
|
|
import VideoDetails from './components/VideoDetails.vue'
|
|
|
- import { useRoute, useRouter } from 'vue-router'
|
|
|
import TallList from './components/TallList.vue'
|
|
|
import { addViewCount, detail, add, queryList } from '@/api/portal'
|
|
|
import resourceAuditApi from '@/api/resourceAudit.js'
|
|
|
- import EventBus from '@/utils/EventBus'
|
|
|
import { resourceAuditStore } from '@/store/resourceAudit'
|
|
|
|
|
|
- const router = useRouter()
|
|
|
- const route = useRoute()
|
|
|
const auditStore = resourceAuditStore()
|
|
|
-
|
|
|
- const indexType = ref('resourceCenter')
|
|
|
const itemData = ref({})
|
|
|
const tallList = ref(null)
|
|
|
const VideoDetailsRef = ref(null)
|
|
|
-
|
|
|
+ const emit = defineEmits(['auditComplete'])
|
|
|
// 从store中获取参数,如果store中没有则从路由中获取
|
|
|
- const isState = ref(auditStore.auditParams.state || route.query.state || null)
|
|
|
- const isAudit = ref(auditStore.auditParams.audit || route.query.audit || null)
|
|
|
+ const isState = ref(auditStore.auditParams.state || null)
|
|
|
+ const isAudit = ref(auditStore.auditParams.audit || null)
|
|
|
// {
|
|
|
// "fileName": "Kettle文档",
|
|
|
// "courseType": "0",
|
|
|
@@ -76,7 +64,7 @@
|
|
|
}
|
|
|
const handleAuditResult = (val) => {
|
|
|
// 优先从store中获取ID,如果没有则从路由中获取
|
|
|
- const id = auditStore.auditParams.id || route.query.id
|
|
|
+ const id = auditStore.auditParams.id
|
|
|
const params = {
|
|
|
ids: id,
|
|
|
verifyStatus: val
|
|
|
@@ -87,20 +75,13 @@
|
|
|
if (res.code == 200) {
|
|
|
// 清空store中的审核参数
|
|
|
auditStore.clearAuditParams()
|
|
|
- router.go(-1)
|
|
|
+ emit('auditComplete')
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
}
|
|
|
- const onChangeCurrent = (current) => {
|
|
|
- indexType.value = current
|
|
|
-
|
|
|
- router.push({
|
|
|
- path: '/' + current
|
|
|
- })
|
|
|
- }
|
|
|
|
|
|
const setData = (item) => {
|
|
|
// emit('handlerItemSidebar', item)
|
|
|
@@ -121,7 +102,7 @@
|
|
|
|
|
|
onMounted(() => {
|
|
|
// 优先从store中获取ID,如果没有则从路由中获取
|
|
|
- const id = auditStore.auditParams.id || route.query.id
|
|
|
+ const id = auditStore.auditParams.id
|
|
|
if (id != undefined && id != '') {
|
|
|
addViewCount({ id: id })
|
|
|
getData({ id: id })
|