fix : 修复首页适配

This commit is contained in:
2024-09-22 00:27:22 +08:00
parent 349f514bcb
commit fe45524d52

View File

@@ -2,7 +2,7 @@
<div class="home-bg" v-if="AuthStore.roles.length">
<el-row gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="17" :xl="17">
<div class="top-left">
<div class="top-left" id="topLeft">
<el-card shadow="never">
<div class="notice-title">早上好小i提醒您<span><span>{{ taskTabList[0].num }}</span>个审批待立项</span></div>
<el-row class="statistics">
@@ -182,7 +182,7 @@
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
<div class="right bottom">
<div class="right-top ">
<div class="right-top " >
<div class="title-block">
<div class="title">
<div class="tag"></div>
@@ -210,7 +210,7 @@
</div>
</div>
</div>
<div class="fund-pie" style="text-align: left;margin-left: 60px;margin-top: 10px">研发投入资金统计图</div>
<div class="fund-pie" style="text-align: left;margin-left: 70px;margin-top: 10px">研发投入资金统计图</div>
</div>
</div>
</el-col>
@@ -288,6 +288,7 @@ import {getArticle} from "@/api/article";
const AuthStore = useAuthStore()
const router = useRouter()
const topLeftHeight = ref('')
const activeName = ref('first')
const docActiveTab = ref('first')
const totalMoney = ref('45000')
@@ -389,7 +390,56 @@ const todoList = ref([
totalTime: '10',
},
])
const noticeList = ref([])
const noticeList = ref([ {
articleTitle: '系统升级通知,升级通知,期间部分服务将暂升级通知,期间部分服务将暂升级通知,期间部分服务将暂将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知期间部分服务将暂停4324234'
}, {
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知,期间部分服务将暂停'
},
{
articleTitle: '系统升级通知期间部分服务将暂停4324234'
}])
const rulesList = ref([])
const helpDocList = ref([])
const problemList = ref([])
@@ -562,8 +612,12 @@ const moneyPieOption = ref({
onMounted(async () => {
// getTodoList()
await getResearchChart()
noticeList.value = await getArticleList(0)
// nextTick(() => {
// let topLeft=document.getElementById('topLeft')
// console.info("🚀 ~method:topLeft -----", topLeft.offsetHeight)
// topLeftHeight.value=topLeft.offsetHeight
// })
// noticeList.value = await getArticleList(0)
rulesList.value = await getArticleList(1)
helpDocList.value = await getArticleList(2)
problemList.value = await getArticleList(3)
@@ -618,7 +672,6 @@ const getTodoList = () => {
const getResearchChart = () => {
getResearchFundChart().then(res => {
if (res.code === 1000) {
console.info("🚀 ~method:res -----", res.data, res.data.rdCompanyList)
totalMoney.value = res.data.totalAmount
moneyData.value = res.data.rdCompanyList
if (moneyPieOption.value.series && moneyPieOption.value.series?.length > 0) {
@@ -639,8 +692,6 @@ const getArticleList = async (articleType) => {
let {data, code, msg} = await getArticle({articleType: articleType})
if (code === 1000) {
return data.rows
// todoList.value=res.data.rows
// todoNum.value=res.data.total
} else {
ElNotification({
title: '提示',
@@ -772,6 +823,14 @@ const handleView = (row) => {
</script>
<style lang="scss" scoped>
@media (min-width: 1200px) and (max-width: 1920px) {
.right-top {
height: 684px!important;
}
.home-bg .notice-block{
height: 624px!important;
}
}
@media only screen and (max-width: 1500px) {
.statistics {
.block {
@@ -875,14 +934,14 @@ const handleView = (row) => {
.legend {
margin-top: 14px;
display: flex;
flex-wrap: wrap;
align-items: center;
flex-direction: column;
> div:last-child {
font-weight: 400;
font-size: 15px;
color: #000000;
letter-spacing: 1px;
margin-left: 28px;
}
.company-name {
@@ -890,7 +949,7 @@ const handleView = (row) => {
color: rgba(0, 0, 0, 0.6);
letter-spacing: 1px;
margin-left: 10px;
margin-right: 30px;
//margin-right: 30px;
//white-space: nowrap;
}