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"
active
>
<a-tooltip
placement="topLeft"
:title="item.demandDetails || '--'"
arrow-point-at-center
mouseEnterDelay="1"
>
<a-list-item-meta
:description="'描述:' + (item.demandDetails || '--')"
>
<template #title> <template #title>
<span <div class="tooltip-desc">{{ item.demandDetails || '--' }}</div>
@click="showDetail(item)" </template>
style="cursor: pointer" <a-list-item-meta :description="'描述:' + (item.demandDetails || '--')">
class="name" <template #title>
> <span @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,21 +55,21 @@
</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: '基础设施',
@ -126,9 +100,9 @@
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') {
@ -142,13 +116,13 @@
} }
pageNum.value = 1 pageNum.value = 1
getApplyList() getApplyList()
} }
const pageChange = (val) => { const pageChange = (val) => {
console.log(val) console.log(val)
pageNum.value = val pageNum.value = val
getApplyList() getApplyList()
} }
const getApplyList = () => { const getApplyList = () => {
const params = { const params = {
page: pageNum.value, page: pageNum.value,
limit: pageSize.value, limit: pageSize.value,
@ -161,9 +135,9 @@
list.value = res.data.data.list list.value = res.data.data.list
total.value = res.data.data.total total.value = res.data.data.total
}) })
} }
const showDetail = (item) => { const showDetail = (item) => {
// console.log('demandDetails', item) // console.log('demandDetails', item)
// store.commit('home/demandDetailsData', item) // store.commit('home/demandDetailsData', item)
router.push({ router.push({
@ -172,15 +146,15 @@
id: item.id, id: item.id,
}, },
}) })
} }
const newpage = router.resolve({ const newpage = router.resolve({
path: '/addApplication', // path: '/addApplication', //
}) })
const toView = () => { const toView = () => {
window.open(newpage.href, '_blank') window.open(newpage.href, '_blank')
} }
onMounted(() => { onMounted(() => {
const params = { const params = {
page: pageNum.value, page: pageNum.value,
limit: pageSize.value, limit: pageSize.value,
@ -190,10 +164,10 @@
list.value = res.data.data.list list.value = res.data.data.list
total.value = res.data.data.total 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);
@ -201,16 +175,20 @@
background-position-x: center; background-position-x: center;
display: flex; display: flex;
justify-content: center; justify-content: center;
.main { .main {
width: 1200px; width: 1200px;
height: 100%; height: 100%;
padding-top: 30px; padding-top: 30px;
display: flex; display: flex;
.left { .left {
width: 15%; width: 15%;
.ant-card { .ant-card {
background: transparent; background: transparent;
border: none; border: none;
.ant-card-grid { .ant-card-grid {
height: 50px; height: 50px;
display: flex; display: flex;
@ -222,14 +200,17 @@
cursor: pointer; cursor: pointer;
} }
} }
.ant-layout-sider { .ant-layout-sider {
background-color: transparent; background-color: transparent;
:deep(.ant-menu-item) { :deep(.ant-menu-item) {
height: 100px; height: 100px;
font-size: 18px; font-size: 18px;
color: #333333; color: #333333;
border: 1px solid #dee8f5; border: 1px solid #dee8f5;
margin: 0; margin: 0;
&::after { &::after {
margin-top: 30px; margin-top: 30px;
height: 40px; height: 40px;
@ -237,11 +218,13 @@
background-color: #0087ff; background-color: #0087ff;
} }
} }
:deep(.ant-menu-item-selected) { :deep(.ant-menu-item-selected) {
background-color: #e9f4ff; background-color: #e9f4ff;
} }
} }
} }
.right { .right {
flex: 1; flex: 1;
margin-left: 30px; margin-left: 30px;
@ -249,17 +232,21 @@
background-color: #ffffff; background-color: #ffffff;
box-shadow: 10px 8px 10px 3px #9dc6ea; box-shadow: 10px 8px 10px 3px #9dc6ea;
padding: 20px; padding: 20px;
.title { .title {
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: 500;
color: #1492ff; color: #1492ff;
} }
.ant-list { .ant-list {
height: 730px; height: 730px;
overflow-y: scroll; overflow-y: scroll;
:deep(.ant-list-item-meta-title) { :deep(.ant-list-item-meta-title) {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.name { .name {
width: 800px; width: 800px;
font-size: 18px; font-size: 18px;
@ -276,6 +263,7 @@
word-break: break-all; word-break: break-all;
} }
} }
:deep(.ant-list-item-meta-description) { :deep(.ant-list-item-meta-description) {
display: -webkit-box; display: -webkit-box;
/*设置为弹性盒子*/ /*设置为弹性盒子*/
@ -289,14 +277,17 @@
word-break: break-all; word-break: break-all;
} }
} }
// //
.ant-list::-webkit-scrollbar { .ant-list::-webkit-scrollbar {
display: none; display: none;
} }
.ant-pagination { .ant-pagination {
margin-top: 10px; margin-top: 10px;
} }
} }
.fixedmount { .fixedmount {
height: 1.5rem; height: 1.5rem;
display: flex; display: flex;
@ -321,10 +312,12 @@
position: relative; position: relative;
cursor: pointer; cursor: pointer;
background: #e3edfc; background: #e3edfc;
p { p {
margin: 0; margin: 0;
} }
} }
.fixedmount div p:nth-child(1) { .fixedmount div p:nth-child(1) {
height: 0.24rem; height: 0.24rem;
width: 0.24rem; width: 0.24rem;
@ -333,11 +326,18 @@
background-position: center; 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>