Compare commits

..

3 Commits

5 changed files with 345 additions and 230 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -52,6 +52,13 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> --> </a-button> -->
<!-- 融合服务 存在fuseResourceList -->
<a-button type="primary" @click="handleAKeyApplication()" v-if="dataList.fuseResourceList">
<template #icon>
<form-outlined />
</template>
申请使用
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div> </div>
</div> </div>
@ -66,9 +73,16 @@
// import { useRouter } from 'vue-router' // import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus' // import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
//
const router = useRouter()
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
console.log('dataList------------>', props.dataList);
// const router = useRouter() // const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
// // // //
@ -95,6 +109,37 @@
// }, // },
// }) // })
// } // }
// --
const handleAKeyApplication = () => {
let _applyList = [];
(props.dataList.fuseResourceList || []).map(v => {
let resource = v.resource || {}
let obj = {
arr: [
{
delFlag: resource.delFlag,
description: resource.description,
resourceId: resource.id,
resourceName: resource.name,
time: resource.createDate,
type: resource.type,
},
],
deptId: resource.deptId,
deptName: resource.deptName,
}
_applyList.push(obj)
})
localStorage.setItem(
'applyList',
JSON.stringify(_applyList)
)
router.push({
path: '/apply',
})
}
// //
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
@ -112,6 +157,8 @@
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
console.log('props.dataList-----watch------->', val);
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
@ -127,6 +174,7 @@
background-size: 100%; background-size: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
.left { .left {
max-width: 7.2rem; max-width: 7.2rem;
color: #fff; color: #fff;
@ -135,9 +183,11 @@
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
span { span {
font-size: 0.14rem; font-size: 0.14rem;
} }
.name { .name {
// max-width: 3.3rem; // max-width: 3.3rem;
// overflow: hidden; // overflow: hidden;
@ -155,15 +205,18 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.label-content { .label-content {
position: relative; position: relative;
} }
.lable-father { .lable-father {
position: absolute; position: absolute;
min-width: 3.5rem; min-width: 3.5rem;
right: -3.5rem; right: -3.5rem;
top: 0; top: 0;
} }
.label { .label {
padding: 0.01rem 0.1rem; padding: 0.01rem 0.1rem;
margin-right: 0.1rem; margin-right: 0.1rem;
@ -171,15 +224,18 @@
background: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.4);
} }
} }
.main { .main {
margin-top: 0.2rem; margin-top: 0.2rem;
font-size: 0.18rem; font-size: 0.18rem;
line-height: 0.34rem; line-height: 0.34rem;
&>div:nth-of-type(1) { &>div:nth-of-type(1) {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
&>div:nth-of-type(2) { &>div:nth-of-type(2) {
max-height: 1rem; max-height: 1rem;
overflow: hidden; overflow: hidden;
@ -189,9 +245,11 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
} }
.bottom { .bottom {
margin-top: 0.4rem; margin-top: 0.4rem;
display: flex; display: flex;
.ant-btn { .ant-btn {
height: 0.5rem; height: 0.5rem;
margin-right: 0.2rem; margin-right: 0.2rem;
@ -202,12 +260,15 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.ant-btn:nth-of-type(1) { .ant-btn:nth-of-type(1) {
width: 1.8rem; width: 1.8rem;
} }
.ant-btn:nth-of-type(2) { .ant-btn:nth-of-type(2) {
width: 2.2rem; width: 2.2rem;
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 1.45rem; width: 1.45rem;
background: #fff; background: #fff;
@ -215,6 +276,7 @@
} }
} }
} }
.right { .right {
width: 5.8rem; width: 5.8rem;
height: 4rem; height: 4rem;

View File

@ -187,14 +187,12 @@ const getIntegrationServicesDeatil = (id) => {
let questionValue = fuseAttrList.find(v => v.attrType === '常见问题') || {} let questionValue = fuseAttrList.find(v => v.attrType === '常见问题') || {}
let questionObj = { let questionObj = {
attrType: '常见问题', attrType: '常见问题',
attrValue: JSON.stringify(questionValue.attrValue || []) attrValue: questionValue.attrValue || "[]"
} }
let areaObj = { let areaObj = {
attrType: '应用领域', attrType: '应用领域',
attrValue: detailInfoObj.value.applicationArea attrValue: detailInfoObj.value.applicationArea
} }
console.log('areaObj------------>', areaObj);
combineList.value.map(item => { combineList.value.map(item => {
let arr = (fuseResourceList.filter(v => v.resource && v.resource.type == item.title) || []).map(d => d.resource.name) let arr = (fuseResourceList.filter(v => v.resource && v.resource.type == item.title) || []).map(d => d.resource.name)
item.list = arr; item.list = arr;

View File

@ -1,18 +1,19 @@
<template> <template>
<div class="father"> <div class="menu-box">
<home-header></home-header> <home-header></home-header>
<div id="container" class="content"> <div id="container" class="content-menu">
<div class="left"> <div class="left">
<div class="first-title-text" @click="showManual" :style="{ color: showManualFlag ? '#0058e1' : '' }">新手指引</div> <div class="first-title-text" v-for="(data, i) in titleList" :key="i" @click="changeName(data)"
<div class="first-title-text" @click="showManual" :style="{ color: !showManualFlag ? '#0058e1' : '' }">技术文档 :style="{ color: data.name === titleData.name ? '#0058e1' : '' }">
<div class="img" :class="data.className"></div>
{{ data.name }}
</div> </div>
<abilityDocTree :dataList="treeArray" @treeClick="treeClick" :clickData="clickData"></abilityDocTree> <abilityDocTree :dataList="treeArray" @treeClick="treeClick" :clickData="clickData"></abilityDocTree>
</div> </div>
<div class="right"> <div class="right">
<div v-if="showManualFlag">新手指引</div> <div v-if="titleData.name === '新手指引'">新手指引</div>
<div v-else> <div v-else style="height:100%">
<!-- 技术文档 --> <iframe name="iframeName" width="1000" height="100%" id="iframeId" :frameborder="0"
<iframe name="iframeName" width="1000" height="800" id="iframeId" :frameborder="0"
:src="clickData.doc"></iframe> :src="clickData.doc"></iframe>
</div> </div>
</div> </div>
@ -22,26 +23,31 @@
<script setup> <script setup>
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import abilityDocTree from './components/abilityDocTree' import abilityDocTree from './components/abilityDocTree'
import { selectOne } from '@/api/home'
import { ref, reactive, onMounted, nextTick, watch } from 'vue' import { ref, reactive, onMounted, nextTick, watch } from 'vue'
import { useStore } from 'vuex'
import { Empty, message } from 'ant-design-vue' import { Empty, message } from 'ant-design-vue'
import { getDevelopDocTree } from '@/api/home' import { getDevelopDocTree } from '@/api/home'
const showManualFlag = ref(false) const titleList = ref([
const showManual = () => { {
showManualFlag.value = !showManualFlag.value name: '新手指引',
className: 'newGuide'
},
{
name: '技术文档',
className: 'doc'
} }
])
const titleData = ref(titleList.value[0])
const clickData = ref({}) const clickData = ref({})
let typeList = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库'];
const treeArray = ref([])
const treeClick = (item) => { const treeClick = (item) => {
showManualFlag.value = false;
console.log('item---treeClick--------->', item); console.log('item---treeClick--------->', item);
clickData.value = item; clickData.value = item;
titleData.value = titleList.value[1]
} }
let typeList = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库'];
const treeArray = ref([])
const getTreeData = () => { const getTreeData = () => {
getDevelopDocTree({}).then((res) => { getDevelopDocTree({}).then((res) => {
console.log('res------文档树------>', res); console.log('res------文档树------>', res);
@ -54,80 +60,31 @@ const getTreeData = () => {
}); });
} }
const changeName = (item) => {
titleData.value = item
}
onMounted(() => { onMounted(() => {
getTreeData() getTreeData()
// loadPage()
}) })
var x = document.getElementById("iframeId");
console.log('x------------>', x);
watch( watch(
() => clickData.value, () => clickData.value,
(val) => { (val) => {
if (val) { if (val) {
console.log('val-watch---clickData-------->', val); console.log('val-watch---clickData-------->', val);
// clickData.value = val
loadPage()
} }
}, },
{ {
//truewatch
//val,preValundefined
// immediate: true,
//
//messagemessage.a.b.cmessage
deep: true, deep: true,
} }
) )
// window.onload = () => loadPage()
const loadPage = () => {
console.log('2222----onload-------->', 2222);
if (!clickData.value.doc) {
return;
}
// var _iframe = document.getElementById('iframeId').contentWindow.document.getElementsByTagName('aside')//iframeid
// console.log('_iframe------------>', _iframe);
var x = document.getElementById("iframeId");
console.log('x------------>', x);
if (x) {
var y = (x.contentWindow || x.contentDocument);
if (y.document) {
y = y.document;
}
let asideDom = y.body.getElementsByClassName('.aside') && y.body.getElementsByClassName('.aside')[0]
if (asideDom) {
asideDom.style.right = 0;
}
console.log('asideDom------------>', asideDom);
let contentDom = y.body.getElementsByClassName('.content') && y.body.getElementsByClassName('.content')[0];
console.log('contentDom------------>', contentDom);
if (contentDom) {
contentDom.style.left = 0
contentDom.style.right = '16rem'
}
//idclass
// y.getElementById('id').style.fontSize = '12px'
}
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.father { .menu-box {
// overflow: hidden; // overflow: hidden;
height: 100%; height: 100%;
} }
@ -137,18 +94,36 @@ const loadPage = () => {
font-size: 18px; font-size: 18px;
color: #333; color: #333;
padding-bottom: 10px; padding-bottom: 10px;
display: flex;
align-items: center;
&:hover { &:hover {
color: #0058e1; color: #0058e1;
} }
} }
.content { .content-menu {
// width: 1240px;
// display: flex;
// justify-content: flex-start;
// margin: 0 auto;
// margin-top: 74px;
// box-sizing: border-box;
// position: relative;
width: 1240px; width: 1240px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
margin: 0 auto; margin: 0 auto;
margin-top: 84px; margin-top: 74px;
box-sizing: border-box;
/* height: calc(100vh - 306px); */
position: fixed;
left: 50%;
bottom: 0;
transform: translateX(-50%);
top: 0.6rem;
top: 0;
} }
.left { .left {
@ -158,10 +133,18 @@ const loadPage = () => {
margin-right: 20px; margin-right: 20px;
background: rgba(244, 245, 248, 0.8); background: rgba(244, 245, 248, 0.8);
overflow-y: auto; overflow-y: auto;
position: absolute;
top: 10px;
left: 0;
} }
.right { .right {
width: 880px; width: 880px;
height: calc(100% - 20px);
position: absolute;
top: 10px;
left: 260px;
} }
.sidebar { .sidebar {
@ -172,4 +155,76 @@ const loadPage = () => {
right: 16rem !important; right: 16rem !important;
left: 0 !important; left: 0 !important;
} }
.img {
height: 20px;
width: 20px;
margin-right: 8px;
}
.doc {
background: url('~@/assets/capabilityCloud/doc.png') no-repeat;
background-size: 100%;
}
.newGuide {
background: url('~@/assets/capabilityCloud/newGuide.png') no-repeat;
background-size: 100%;
}
#iframeId {
// ::-webkit-scrollbar {
// width: 6px;
// height: 6px;
// background-color: rgb(255, 255, 255);
// }
// ::-webkit-scrollbar-thumb {
// border-radius: 10px;
// background-color: rgb(200, 204, 209);
// }
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
// width: 2px;
// height: 2px;
// height: 67px;
}
::scrollbar {
width: 6px;
height: 6px;
// width: 2px;
// height: 2px;
// height: 67px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
display: none;
// -webkit-box-shadow: inset 0 0 3px #b18933;
// border-radius: 1px;
}
::scrollbar-track {
display: none;
// -webkit-box-shadow: inset 0 0 3px #98f165;
// border-radius: 1px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #006666;
-webkit-box-shadow: inset 0 0 1px #006666;
}
::scrollbar-thumb {
border-radius: 10px;
background: #006666;
-webkit-box-shadow: inset 0 0 1px #006666;
}
}
</style> </style>