hi-ucs/front/src/views/personalCenter/components/TheNewRelease.vue

57 lines
2.0 KiB
Vue

<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-01 17:49:38
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 17:01:25
* @Description: 能力上架
-->
<template>
<div class="the-new-release">
<home-header></home-header>
<algorithm v-if="type === 'algorithm'"></algorithm>
<application v-else-if="type === 'application'"></application>
<development-components
v-else-if="type === 'development-components'"
></development-components>
<business-component
v-else-if="type === 'business-component'"
></business-component>
<layer-services v-else-if="type === 'layer-services'"></layer-services>
</div>
</template>
<script setup>
import HomeHeader from '@/views/home/components/header'
import Algorithm from '@/views/capacityOnTheShelf/Algorithm'
import Application from '@/views/capacityOnTheShelf/Application'
import DevelopmentComponents from '@/views/capacityOnTheShelf/DevelopmentComponents'
import BusinessComponent from '@/views/capacityOnTheShelf/BusinessComponent'
import LayerServices from '@/views/capacityOnTheShelf/LayerServices'
import { useRouter } from 'vue-router'
import { ref } from 'vue'
const router = useRouter()
const type = ref('')
const abilityToType = router.currentRoute.value.query.abilityToType
if (abilityToType === '应用资源') {
type.value = 'application'
} else {
const componentTypeValue =
router.currentRoute.value.query.componentTypeValue
if (componentTypeValue === '智能算法') {
type.value = 'algorithm'
} else if (componentTypeValue === '开发组件') {
type.value = 'development-components'
} else if (componentTypeValue === '业务组件') {
type.value = 'business-component'
} else if (componentTypeValue === '图层服务') {
type.value = 'layer-services'
}
}
window.sessionStorage.setItem('preview', JSON.stringify({}))
</script>
<style scoped lang="less">
.the-new-release {
background: #f5f7fa;
height: 10.8rem;
}
</style>