Compare commits

..

2 Commits

1 changed files with 265 additions and 265 deletions

View File

@ -4,11 +4,7 @@
<div class="main"> <div class="main">
<div class="left"> <div class="left">
<a-layout-sider> <a-layout-sider>
<a-menu <a-menu v-model:selectedKeys="selectedKeys" mode="inline" @click="handleClick">
v-model:selectedKeys="selectedKeys"
mode="inline"
@click="handleClick"
>
<a-menu-item v-for="item in menuList" :key="item.key"> <a-menu-item v-for="item in menuList" :key="item.key">
<img :src="item.img" alt="" style="margin-right: 10px" /> <img :src="item.img" alt="" style="margin-right: 10px" />
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
@ -18,36 +14,19 @@
</div> </div>
<div class="right"> <div class="right">
<!-- <div class="title">数据需求</div> --> <!-- <div class="title">数据需求</div> -->
<a-list <a-list class="demo-loadmore-list" :loading="initLoading" item-layout="horizontal" :data-source="list"
class="demo-loadmore-list" :key="showKey">
:loading="initLoading"
item-layout="horizontal"
:data-source="list"
:key="showKey"
>
<template #renderItem="{ item }"> <template #renderItem="{ item }">
<a-list-item> <a-list-item>
<a-skeleton <a-skeleton avatar :title="false" :loading="!!item.loading" active>
avatar <a-tooltip placement="topLeft" arrow-point-at-center mouseEnterDelay="1"
:title="false" overlayClassName="tooltip-card">
:loading="!!item.loading" <template #title>
active <div class="tooltip-desc">{{ item.demandDetails || '--' }}</div>
> </template>
<a-tooltip <a-list-item-meta :description="'描述:' + (item.demandDetails || '--')">
placement="topLeft"
:title="item.demandDetails || '--'"
arrow-point-at-center
mouseEnterDelay="1"
>
<a-list-item-meta
:description="'描述:' + (item.demandDetails || '--')"
>
<template #title> <template #title>
<span <span @click="showDetail(item)" style="cursor: pointer" class="name">
@click="showDetail(item)"
style="cursor: pointer"
class="name"
>
{{ item.demandSubject }} {{ item.demandSubject }}
</span> </span>
<span class="time">{{ item.createDate }}</span> <span class="time">{{ item.createDate }}</span>
@ -58,13 +37,8 @@
</a-list-item> </a-list-item>
</template> </template>
</a-list> </a-list>
<a-pagination <a-pagination v-model:current="pageNum" v-model:page-size="pageSize" :total="total" @change="pageChange"
v-model:current="pageNum" :key="showKey">
v-model:page-size="pageSize"
:total="total"
@change="pageChange"
:key="showKey"
>
<template #buildOptionText="props"> <template #buildOptionText="props">
<span>{{ props.value }}/</span> <span>{{ props.value }}/</span>
</template> </template>
@ -81,205 +55,205 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { demandApplyListPage } from '@/api/personalCenter' import { demandApplyListPage } from '@/api/personalCenter'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
// import { useStore } from 'vuex' // import { useStore } from 'vuex'
const router = useRouter() const router = useRouter()
// const store = useStore() // const store = useStore()
const list = ref([]) const list = ref([])
const pageNum = ref(1) const pageNum = ref(1)
const pageSize = ref(8) const pageSize = ref(8)
const total = ref() const total = ref()
const showKey = ref(0) const showKey = ref(0)
const whoShow1 = ref(whoShow) const whoShow1 = ref(whoShow)
const menuList = [ const menuList = [
{ {
key: '1', key: '1',
title: '基础设施', title: '基础设施',
num: '0', num: '0',
img: require('@/assets/home/menujcss.png'), img: require('@/assets/home/menujcss.png'),
}, },
{ {
key: '2', key: '2',
title: '数据资源', title: '数据资源',
num: '0', num: '0',
img: require('@/assets/home/menusjzy.png'), img: require('@/assets/home/menusjzy.png'),
}, },
{ {
key: '3', key: '3',
title: '组件服务', title: '组件服务',
num: '0', num: '0',
img: require('@/assets/home/menuzjfw.png'), img: require('@/assets/home/menuzjfw.png'),
}, },
{ {
key: '4', key: '4',
title: '应用资源', title: '应用资源',
num: '0', num: '0',
img: require('@/assets/home/menuyyzy.png'), img: require('@/assets/home/menuyyzy.png'),
}, },
{ {
key: '5', key: '5',
title: '知识库', title: '知识库',
num: '0', num: '0',
img: require('@/assets/home/menuyyzy.png'), img: require('@/assets/home/menuyyzy.png'),
}, },
] ]
const detailsType = ref('') const detailsType = ref('')
const handleClick = (item) => { const handleClick = (item) => {
if (item.key === '1') { if (item.key === '1') {
detailsType.value = '基础设施' detailsType.value = '基础设施'
} else if (item.key === '2') { } else if (item.key === '2') {
detailsType.value = '数据资源' detailsType.value = '数据资源'
} else if (item.key === '3') { } else if (item.key === '3') {
detailsType.value = '组件服务' detailsType.value = '组件服务'
} else if (item.key === '4') { } else if (item.key === '4') {
detailsType.value = '应用资源' detailsType.value = '应用资源'
} else if (item.key === '5') { } else if (item.key === '5') {
detailsType.value = '知识库' detailsType.value = '知识库'
}
pageNum.value = 1
getApplyList()
} }
const pageChange = (val) => { pageNum.value = 1
console.log(val) getApplyList()
pageNum.value = val }
getApplyList() const pageChange = (val) => {
console.log(val)
pageNum.value = val
getApplyList()
}
const getApplyList = () => {
const params = {
page: pageNum.value,
limit: pageSize.value,
flag: 3,
} }
const getApplyList = () => { if (detailsType.value) {
const params = { params.detailsType = detailsType.value
page: pageNum.value,
limit: pageSize.value,
flag: 3,
}
if (detailsType.value) {
params.detailsType = detailsType.value
}
demandApplyListPage(params).then((res) => {
list.value = res.data.data.list
total.value = res.data.data.total
})
} }
demandApplyListPage(params).then((res) => {
const showDetail = (item) => { list.value = res.data.data.list
// console.log('demandDetails', item) total.value = res.data.data.total
// store.commit('home/demandDetailsData', item)
router.push({
path: '/demandDetails',
query: {
id: item.id,
},
})
}
const newpage = router.resolve({
path: '/addApplication', //
}) })
const toView = () => { }
window.open(newpage.href, '_blank')
}
onMounted(() => { const showDetail = (item) => {
const params = { // console.log('demandDetails', item)
page: pageNum.value, // store.commit('home/demandDetailsData', item)
limit: pageSize.value, router.push({
flag: 3, path: '/demandDetails',
} query: {
demandApplyListPage(params).then((res) => { id: item.id,
list.value = res.data.data.list },
total.value = res.data.data.total
})
}) })
}
const newpage = router.resolve({
path: '/addApplication', //
})
const toView = () => {
window.open(newpage.href, '_blank')
}
onMounted(() => {
const params = {
page: pageNum.value,
limit: pageSize.value,
flag: 3,
}
demandApplyListPage(params).then((res) => {
list.value = res.data.data.list
total.value = res.data.data.total
})
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main-cont { .main-cont {
margin-top: 64px; margin-top: 64px;
width: 100%; width: 100%;
height: calc(100%-90px); height: calc(100%-90px);
background: url('~@/assets/demandCenter/bj.png') no-repeat; background: url('~@/assets/demandCenter/bj.png') no-repeat;
background-position-x: center; background-position-x: center;
display: flex;
justify-content: center;
.main {
width: 1200px;
height: 100%;
padding-top: 30px;
display: flex; display: flex;
justify-content: center;
.main { .left {
width: 1200px; width: 15%;
height: 100%;
padding-top: 30px; .ant-card {
display: flex; background: transparent;
.left { border: none;
width: 15%;
.ant-card { .ant-card-grid {
background: transparent; height: 50px;
border: none; display: flex;
.ant-card-grid { align-items: center;
height: 50px; justify-content: center;
display: flex; margin-bottom: 10px;
align-items: center; border: 1px solid #fff;
justify-content: center; background-color: #fff;
margin-bottom: 10px; cursor: pointer;
border: 1px solid #fff;
background-color: #fff;
cursor: pointer;
}
}
.ant-layout-sider {
background-color: transparent;
:deep(.ant-menu-item) {
height: 100px;
font-size: 18px;
color: #333333;
border: 1px solid #dee8f5;
margin: 0;
&::after {
margin-top: 30px;
height: 40px;
width: 4px;
background-color: #0087ff;
}
}
:deep(.ant-menu-item-selected) {
background-color: #e9f4ff;
}
} }
} }
.right {
flex: 1; .ant-layout-sider {
margin-left: 30px; background-color: transparent;
height: 850px;
background-color: #ffffff; :deep(.ant-menu-item) {
box-shadow: 10px 8px 10px 3px #9dc6ea; height: 100px;
padding: 20px; font-size: 18px;
.title { color: #333333;
font-size: 22px; border: 1px solid #dee8f5;
font-weight: 500; margin: 0;
color: #1492ff;
} &::after {
.ant-list { margin-top: 30px;
height: 730px; height: 40px;
overflow-y: scroll; width: 4px;
:deep(.ant-list-item-meta-title) { background-color: #0087ff;
display: flex;
justify-content: space-between;
.name {
width: 800px;
font-size: 18px;
color: #1492ff;
display: -webkit-box;
/*设置为弹性盒子*/
-webkit-line-clamp: 1;
/*最多显示2行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*超出显示为省略号*/
-webkit-box-orient: vertical;
word-break: break-all;
}
} }
:deep(.ant-list-item-meta-description) { }
:deep(.ant-menu-item-selected) {
background-color: #e9f4ff;
}
}
}
.right {
flex: 1;
margin-left: 30px;
height: 850px;
background-color: #ffffff;
box-shadow: 10px 8px 10px 3px #9dc6ea;
padding: 20px;
.title {
font-size: 22px;
font-weight: 500;
color: #1492ff;
}
.ant-list {
height: 730px;
overflow-y: scroll;
:deep(.ant-list-item-meta-title) {
display: flex;
justify-content: space-between;
.name {
width: 800px;
font-size: 18px;
color: #1492ff;
display: -webkit-box; display: -webkit-box;
/*设置为弹性盒子*/ /*设置为弹性盒子*/
-webkit-line-clamp: 2; -webkit-line-clamp: 1;
/*最多显示2行*/ /*最多显示2行*/
overflow: hidden; overflow: hidden;
/*超出隐藏*/ /*超出隐藏*/
@ -289,55 +263,81 @@
word-break: break-all; word-break: break-all;
} }
} }
//
.ant-list::-webkit-scrollbar { :deep(.ant-list-item-meta-description) {
display: none; display: -webkit-box;
/*设置为弹性盒子*/
-webkit-line-clamp: 2;
/*最多显示2行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*超出显示为省略号*/
-webkit-box-orient: vertical;
word-break: break-all;
} }
.ant-pagination {
margin-top: 10px;
}
}
.fixedmount {
height: 1.5rem;
display: flex;
position: fixed;
right: 2.6rem;
z-index: 10;
flex-direction: column;
justify-content: space-between;
align-items: center;
} }
.fixedmount div { //
width: 0.7rem; .ant-list::-webkit-scrollbar {
height: 0.7rem; display: none;
border-radius: 0.04rem;
border: 0.01rem #94aac9 solid;
display: flex;
flex-direction: column;
// justify-content: center;
align-items: center;
padding-top: 0.13rem;
position: relative;
cursor: pointer;
background: #e3edfc;
p {
margin: 0;
}
} }
.fixedmount div p:nth-child(1) {
height: 0.24rem; .ant-pagination {
width: 0.24rem; margin-top: 10px;
background: url('~@/assets/home/shenqing.png') no-repeat;
background-size: contain;
background-position: center;
} }
} }
.fixedmount {
height: 1.5rem;
display: flex;
position: fixed;
right: 2.6rem;
z-index: 10;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.fixedmount div {
width: 0.7rem;
height: 0.7rem;
border-radius: 0.04rem;
border: 0.01rem #94aac9 solid;
display: flex;
flex-direction: column;
// justify-content: center;
align-items: center;
padding-top: 0.13rem;
position: relative;
cursor: pointer;
background: #e3edfc;
p {
margin: 0;
}
}
.fixedmount div p:nth-child(1) {
height: 0.24rem;
width: 0.24rem;
background: url('~@/assets/home/shenqing.png') no-repeat;
background-size: contain;
background-position: center;
}
} }
}
</style> </style>
<style> <style>
body, body,
html { html {
height: unset; height: unset;
} }
.tooltip-card {
max-width: 900px !important;
min-width: 600px !important;
max-height: 600px !important;
overflow-y: auto;
}
</style> </style>