逻辑修改

This commit is contained in:
a0049873 2023-01-06 17:00:21 +08:00
parent f7b79f6ae8
commit 3cfaf14b37
1 changed files with 797 additions and 710 deletions

View File

@ -2,16 +2,27 @@
<template>
<div class="IntegrationServicesDetails" :class="{ fixed2: scrollTop >= 600 }">
<home-header></home-header>
<detail-back v-show="!hiddenBackFlag" :returnType="returnType" :districtType="districtType"></detail-back>
<detail-back
v-show="!hiddenBackFlag"
:returnType="returnType"
:districtType="districtType"
></detail-back>
<template v-if="districtType == 0 || returnType == '打包模式'">
<!-- 头部基本信息 -->
<application-top-details :dataList="detailInfoObj" :navList="navList"></application-top-details>
<application-top-details
:dataList="detailInfoObj"
:navList="navList"
></application-top-details>
<!-- 导航 -->
<div :class="{ fixed: scrollTop >= 600 }" style="z-index: 10012">
<div class="application-navigation">
<template v-for="nav in navList" :key="nav.key">
<div class="nav" :class="{ selectNow: nav.key == selectNow }" @click="selectNav(nav.key)">
<div
class="nav"
:class="{ selectNow: nav.key == selectNow }"
@click="selectNav(nav.key)"
>
{{ nav.name }}
<span class="line"></span>
</div>
@ -30,11 +41,16 @@
</div>
<div class="content" style="margin-left: 0.5rem">
<div class="content-item" v-for="(item, i) in painPoint" :key="i" style="
<div
class="content-item"
v-for="(item, i) in painPoint"
:key="i"
style="
margin-bottom: 0.2rem;
font-size: 0.18rem;
line-height: 0.3rem;
">
"
>
{{ i + 1 + '、' + item.description }}
</div>
</div>
@ -42,17 +58,26 @@
</div>
<!-- 解决方案 -->
<div id="integration-solution" class="solution scrollBox" style="background: #eee">
<div
id="integration-solution"
class="solution scrollBox"
style="background: #eee"
>
<div class="title-1">
<DetalsTitle title="解决方案" type="SOLUTION"></DetalsTitle>
</div>
<div class="flex-row-center">
<div class="content" style="background: #fff; margin-top: 0.2rem">
<div class="content-item" v-for="(item, i) in solution" :key="i" style="
<div
class="content-item"
v-for="(item, i) in solution"
:key="i"
style="
margin-bottom: 0.2rem;
font-size: 0.18rem;
line-height: 0.3rem;
">
"
>
{{ i + 1 + '、' + item.description }}
</div>
</div>
@ -64,11 +89,26 @@
<div class="title-1">
<DetalsTitle title="使用能力" type="ABILITY"></DetalsTitle>
</div>
<div class="flex-row-center combine-content" v-for="(item, i) in combineList" :key="i" style="display: block">
<div class="top" style="font-size: 0.24rem; text-align: center; margin-bottom: 0.3rem">
<div
class="flex-row-center combine-content"
v-for="(item, i) in combineList"
:key="i"
style="display: block"
>
<div
class="top"
style="
font-size: 0.24rem;
text-align: center;
margin-bottom: 0.3rem;
"
>
{{ i == 0 ? '基础设施' : i == 1 ? '组件服务' : '数据资源' }}
</div>
<div class="data-count" style="font-size: 0.14rem; text-align: right; margin-bottom: 0.2rem">
<div
class="data-count"
style="font-size: 0.14rem; text-align: right; margin-bottom: 0.2rem"
>
<span style="color: #909399">
{{
@ -83,23 +123,63 @@
<div class="bottom" style="display: flex; align-items: flex-start">
<div class="title" :class="'title' + i"></div>
<div class="table-box" v-if="returnType == '典型赋能场景'">
<el-table class="table" :data="item.list" stripe :header-cell-style="{ 'text-align': 'center' }">
<el-table-column prop="name" label="资源名称" align="center" width="200"
show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="type" label="资源类型" align="center" width="100"
show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="dept" label="来源部门" align="center" width="300"
show-overflow-tooltip="true"></el-table-column>
<el-table
class="table"
:data="item.list"
stripe
:header-cell-style="{ 'text-align': 'center' }"
>
<el-table-column
prop="name"
label="资源名称"
align="center"
width="200"
show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="type"
label="资源类型"
align="center"
width="100"
show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="dept"
label="来源部门"
align="center"
width="300"
show-overflow-tooltip="true"
></el-table-column>
</el-table>
</div>
<div class="table-box" v-else>
<el-table class="table" :data="item.list" stripe :header-cell-style="{ 'text-align': 'center' }">
<el-table-column prop="name" label="资源名称" align="center" width="200"
show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="platform" label="资源类型" align="center" width="100"
show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="dept" label="能力来源" align="center" width="300"
show-overflow-tooltip="true"></el-table-column>
<el-table
class="table"
:data="item.list"
stripe
:header-cell-style="{ 'text-align': 'center' }"
>
<el-table-column
prop="name"
label="资源名称"
align="center"
width="200"
show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="platform"
label="资源类型"
align="center"
width="100"
show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="dept"
label="能力来源"
align="center"
width="300"
show-overflow-tooltip="true"
></el-table-column>
</el-table>
</div>
</div>
@ -107,7 +187,11 @@
</div>
<!-- 构建步骤 -->
<div id="integration-step" class="step scrollBox" style="background: #eee">
<div
id="integration-step"
class="step scrollBox"
style="background: #eee"
>
<div class="title-1">
<DetalsTitle title="构建步骤" type="STEP"></DetalsTitle>
</div>
@ -132,31 +216,43 @@
<div class="li1" v-for="(item, i) in step" :key="i">
<div>
<div class="node">
<div class="step-span">{{ i+ 1}}</div>
<div class="step-span">{{ i + 1 }}</div>
<div>
<div class="step-question">{{ i+ 1}}:{{ item.question }}</div>
<div class="question-son" v-for="(itemson, i) in item.answer" :key="i">
<img src="~@/assets/home/arrow.png" style="margin-right:8px" />{{ i+ 1}}>{{ itemson.answer }}
<div class="step-question">
{{ i + 1 }}:{{ item.question }}
</div>
<div
class="question-son"
v-for="(itemson, i) in item.answer"
:key="i"
>
<img
src="~@/assets/home/arrow.png"
style="margin-right: 8px"
/>
{{ i + 1 }}>{{ itemson.answer }}
</div>
</div>
</div>
<div class="borderLeft"></div>
</div>
<div class="advice"></div>
</div>
</div>
</div>
</div>
</template>
<template v-else>
<div class="area">
<a-image style="width:615px;height:345px" :preview="false" :src="bgImg || imgSrcYyzy" />
<div class="label-name">{{ detailInfoObj.name }} <span class="label">
<a-image
style="width: 615px; height: 345px"
:preview="false"
:src="bgImg || imgSrcYyzy"
/>
<div class="label-name">
{{ detailInfoObj.name }}
<span class="label">
{{ detailInfoObj.type }}
</span>
<span class="label1">
@ -176,45 +272,45 @@
</template>
<script setup>
import ApplicationTopDetails from './components/ApplicationTopDetails.vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import HomeFooter from '@/views/newHome/components/Footer'
import HomeHeader from '@/views/home/components/header'
import detailBack from '@/views/home/detailBack.vue'
import { ref, onMounted, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router'
import { getIntegrationDetail } from '@/api/home'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const painPoint = ref([])
const solution = ref([])
const step = ref([])
const bgImg = ref('')
const dataSourceCount = ref(0)
const infrastructureCount = ref(0)
const componentCount = ref(0)
const id = router.currentRoute.value.query.id
const returnType = router.currentRoute.value.query.type
const districtType = router.currentRoute.value.query.districtType
const hiddenBackFlag = router.currentRoute.value.query.hiddenBackFlag
const imgSrcYyzy = ref(require('@/assets/newHome/empty.png'))
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
import ApplicationTopDetails from './components/ApplicationTopDetails.vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import HomeFooter from '@/views/newHome/components/Footer'
import HomeHeader from '@/views/home/components/header'
import detailBack from '@/views/home/detailBack.vue'
import { ref, onMounted, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router'
import { getIntegrationDetail } from '@/api/home'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const painPoint = ref([])
const solution = ref([])
const step = ref([])
const bgImg = ref('')
const dataSourceCount = ref(0)
const infrastructureCount = ref(0)
const componentCount = ref(0)
const id = router.currentRoute.value.query.id
const returnType = router.currentRoute.value.query.type
const districtType = router.currentRoute.value.query.districtType
const hiddenBackFlag = router.currentRoute.value.query.hiddenBackFlag
const imgSrcYyzy = ref(require('@/assets/newHome/empty.png'))
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top =
document.querySelector('#' + id) &&
document.querySelector('#' + id).offsetTop - 50
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
})
const navList = ref([
const navList = ref([
{
name: '场景痛点',
key: 'integration-pain-point',
@ -231,11 +327,11 @@ const navList = ref([
name: '构建步骤',
key: 'integration-step',
},
])
])
const selectNow = ref('integration-pain-point')
const selectNow = ref('integration-pain-point')
const useWayShowList = ref([
const useWayShowList = ref([
{
title: '归属部门',
info: {
@ -250,9 +346,9 @@ const useWayShowList = ref([
providerMobile: '联系人电话',
},
},
])
])
const combineList = ref([
const combineList = ref([
{
title: '基础设施',
list: [],
@ -265,10 +361,10 @@ const combineList = ref([
title: '数据资源',
list: [],
},
])
const detailInfoObj = ref({})
])
const detailInfoObj = ref({})
onMounted(() => {
onMounted(() => {
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
@ -292,21 +388,25 @@ onMounted(() => {
}
}
})
})
})
const selectNav = (key) => {
//
const openScene = (val) => {
window.open(val, '_blank')
}
const selectNav = (key) => {
selectNow.value = key
mybus.emit('flyToView', selectNow.value)
}
}
const getAttrValue = (fuseAttrList, text) => {
const getAttrValue = (fuseAttrList, text) => {
let _obj = fuseAttrList.find((v) => v.attrType === text) || {}
let data = JSON.parse(_obj.attrValue || '[]') || []
return data
}
}
// --
const getIntegrationServicesDeatil = (id) => {
// --
const getIntegrationServicesDeatil = (id) => {
getIntegrationDetail(id).then(
(res) => {
if (res.data.code !== 0) {
@ -340,7 +440,6 @@ const getIntegrationServicesDeatil = (id) => {
let fuseResourceList = res.data.data.fuseAttrList || []
combineList.value.forEach((item) => {
let arr = []
let resource = fuseResourceList.filter(
(v) => v.attrType == item.title
@ -349,16 +448,13 @@ const getIntegrationServicesDeatil = (id) => {
// let a=resource[0].attrValue
let resourceArrList = JSON.parse(resource[0].attrValue)
if (resourceArrList.length > 0) {
arr = resourceArrList.map((res) => ({
name: res.name,
dept: res.dept,
type: res.type,
}))
item.list = arr
}
})
} else {
//
@ -404,7 +500,6 @@ const getIntegrationServicesDeatil = (id) => {
})
}
detailInfoObj.value.infoList = []
detailInfoObj.value.infoList.push(questionObj)
detailInfoObj.value.infoList.push(areaObj)
@ -413,10 +508,10 @@ const getIntegrationServicesDeatil = (id) => {
message.error(err)
}
)
}
getIntegrationServicesDeatil(id)
}
getIntegrationServicesDeatil(id)
function handleOpenUrl(type) {
function handleOpenUrl(type) {
let obj =
(detailInfoObj.value.fuseAttrList || []).find(
(v) => v.attrType == type
@ -430,15 +525,15 @@ function handleOpenUrl(type) {
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(url))
)
}
}
onBeforeUnmount(() => {
onBeforeUnmount(() => {
mybus.off('flyToView')
})
})
</script>
<style lang="less" scoped>
.area {
.area {
padding-top: 93px;
text-align: center;
margin-bottom: 32px;
@ -450,7 +545,6 @@ onBeforeUnmount(() => {
margin-top: 32px;
}
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
@ -477,41 +571,39 @@ onBeforeUnmount(() => {
height: 32px;
border-radius: 2px;
border: 1px #0058e1 solid;
}
}
}
.area-desc {
.area-desc {
background: #f6f7f9;
padding: 24px;
width: 1300px;
margin-left: 343px;
margin-bottom: 24px;
}
}
.flex-row-between {
.flex-row-between {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}
.flex-row-start {
.flex-row-start {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
}
.flex-row-center {
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.IntegrationServicesDetails {
.IntegrationServicesDetails {
.fixed {
position: fixed !important;
z-index: 2000;
@ -519,7 +611,7 @@ onBeforeUnmount(() => {
left: 0;
}
.fixed2>div:nth-of-type(3) {
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
@ -557,9 +649,9 @@ onBeforeUnmount(() => {
}
}
}
}
}
.use-way {
.use-way {
padding: 0.8rem 0;
display: flex;
flex-direction: column;
@ -602,9 +694,11 @@ onBeforeUnmount(() => {
height: 1.5rem;
width: 6.2rem;
border-radius: 0.2rem;
background: linear-gradient(to right,
background: linear-gradient(
to right,
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4));
rgba(148, 163, 252, 0.4)
);
padding: 0 0.3rem;
display: flex;
justify-content: center;
@ -635,9 +729,9 @@ onBeforeUnmount(() => {
}
}
}
}
}
.pain-point {
.pain-point {
padding: 0.8rem 0;
background: rgb(247, 248, 250);
@ -672,9 +766,9 @@ onBeforeUnmount(() => {
margin: 0rem 0rem 0.1rem 0.1rem;
}
}
}
}
.solution {
.solution {
padding: 0.8rem 0;
background: rgb(247, 248, 250);
@ -686,9 +780,9 @@ onBeforeUnmount(() => {
margin: 0.3rem;
}
}
}
}
.step {
.step {
padding: 0.8rem 0;
background: rgb(247, 248, 250);
@ -698,7 +792,6 @@ onBeforeUnmount(() => {
background: #fff;
.left-process {
padding-left: 18px;
padding-top: 24px;
@ -719,7 +812,6 @@ onBeforeUnmount(() => {
left: -1px;
}
.step-question {
color: #0058e1;
font-weight: bold;
@ -739,7 +831,6 @@ onBeforeUnmount(() => {
}
.node {
cursor: pointer;
font-size: 16px;
line-height: 22.5px;
@ -763,8 +854,6 @@ onBeforeUnmount(() => {
background-color: #fff;
}
.advice {
font-size: 10px;
color: #0058e1;
@ -775,14 +864,11 @@ onBeforeUnmount(() => {
.li1:last-child .borderLeft {
display: none;
}
}
}
}
}
}
.ability {
.ability {
padding: 0.8rem 0;
background: rgb(247, 248, 250);
@ -837,7 +923,8 @@ onBeforeUnmount(() => {
font-size: 16px;
}
.data-count {}
.data-count {
}
}
.name-box {
@ -868,5 +955,5 @@ onBeforeUnmount(() => {
width: 50%;
box-sizing: border-box;
}
}
}
</style>