BUG修改

This commit is contained in:
a0049873 2022-06-20 18:59:43 +08:00
parent 09f421580b
commit 6edf4d50f9
6 changed files with 45 additions and 20 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.zhangfeihu * @Author: hisense.zhangfeihu
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.zhangfeihu * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-13 14:31:19 * @LastEditTime: 2022-06-20 18:58:40
* @Description: 赋能案例-详情页 * @Description: 赋能案例-详情页
--> -->
<template> <template>
@ -281,8 +281,8 @@
} }
} else { } else {
if ( if (
scrollTop.value > domArr.value[i].offsetTop - 50 && scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value < domArr.value[i + 1].offsetTop - 50 scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) { ) {
selectNow.value = domArr.value[i].id selectNow.value = domArr.value[i].id
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 10:39:37 * @LastEditTime: 2022-06-20 18:58:46
* @Description: 算法详情页 * @Description: 算法详情页
--> -->
<template> <template>
@ -117,8 +117,8 @@
} }
} else { } else {
if ( if (
scrollTop.value > domArr.value[i].offsetTop - 50 && scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value < domArr.value[i + 1].offsetTop - 50 scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) { ) {
selectNow.value = domArr.value[i].id selectNow.value = domArr.value[i].id
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-15 18:10:36 * @LastEditTime: 2022-06-20 18:59:18
* @Description: 应用详情页 * @Description: 应用详情页
--> -->
<template> <template>
@ -88,7 +88,7 @@
document.body.scrollTop = 0 document.body.scrollTop = 0
mybus.on('flyToView', (id) => { mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50 let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop) // console.log(top, document.querySelector('#' + id).offsetTop-50)
document.documentElement.scrollTop = top document.documentElement.scrollTop = top
document.body.scrollTop = top document.body.scrollTop = top
}) })
@ -109,8 +109,8 @@
} }
} else { } else {
if ( if (
scrollTop.value > domArr.value[i].offsetTop - 50 && scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value < domArr.value[i + 1].offsetTop - 50 scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) { ) {
selectNow.value = domArr.value[i].id selectNow.value = domArr.value[i].id
} }

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.gaoyuanwei * @Author: hisense.gaoyuanwei
* @Date: 2022-06-20 10:12:22 * @Date: 2022-06-20 10:12:22
* @LastEditors: hisense.gaoyuanwei * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-20 18:10:36 * @LastEditTime: 2022-06-20 18:58:56
* @Description: 业务组件详情页 * @Description: 业务组件详情页
--> -->
<template> <template>
@ -100,8 +100,8 @@
} }
} else { } else {
if ( if (
scrollTop.value > domArr.value[i].offsetTop - 50 && scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value < domArr.value[i + 1].offsetTop - 50 scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) { ) {
selectNow.value = domArr.value[i].id selectNow.value = domArr.value[i].id
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-15 18:10:36 * @LastEditTime: 2022-06-20 18:59:01
* @Description: 开发组件详情页 * @Description: 开发组件详情页
--> -->
<template> <template>
@ -107,8 +107,8 @@
} }
} else { } else {
if ( if (
scrollTop.value > domArr.value[i].offsetTop - 50 && scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value < domArr.value[i + 1].offsetTop - 50 scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) { ) {
selectNow.value = domArr.value[i].id selectNow.value = domArr.value[i].id
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-14 09:43:49 * @Date: 2022-06-14 09:43:49
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-15 18:19:22 * @LastEditTime: 2022-06-20 18:44:52
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -35,6 +35,7 @@
import AlgorithmDetails from '@/views/detailsAll/AlgorithmDetails' import AlgorithmDetails from '@/views/detailsAll/AlgorithmDetails'
import ApplicationDetails from '@/views/detailsAll/ApplicationDetails' import ApplicationDetails from '@/views/detailsAll/ApplicationDetails'
import DeveloperComponents from '@/views/detailsAll/DeveloperComponents' import DeveloperComponents from '@/views/detailsAll/DeveloperComponents'
import BusinessDetails from '@/views/detailsAll/BusinessDetails'
import { selectOne } from '@/api/home' import { selectOne } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
export default defineComponent({ export default defineComponent({
@ -47,6 +48,7 @@
AlgorithmDetails, AlgorithmDetails,
ApplicationDetails, ApplicationDetails,
DeveloperComponents, DeveloperComponents,
BusinessDetails,
}, },
setup() { setup() {
const formState = reactive({ const formState = reactive({
@ -122,7 +124,30 @@
} else if (obj) { } else if (obj) {
console.log('obj============>', obj) console.log('obj============>', obj)
if (obj.type == '组件服务') { if (obj.type == '组件服务') {
showView.value = 'algorithm-details' let detection = obj.infoList.filter(
(item) => item.attrType === '组件类型'
)[0]
if (detection) {
obj.infoList.map((item) => {
if (item.attrType == '组件类型') {
switch (item.attrValue) {
case '智能算法':
showView.value = 'algorithm-details'
break
case '开发组件':
showView.value = 'development-of-component'
break
case '业务组件':
showView.value = 'business-details'
break
default:
break
}
}
})
} else {
showView.value = 'algorithm-details'
}
} else { } else {
showView.value = 'application-details' showView.value = 'application-details'
} }