修改样式

GST002_H5
JayChou 2 weeks ago
parent d2cfb6f125
commit cd4137e06c
  1. 6
      src/Layout/footer/index.vue
  2. 4
      src/main.ts
  3. 77
      src/views/raceInfo/index.vue

@ -63,7 +63,7 @@ const toNewsDetail = (id: number) => {
} }
.item { .item {
text-align: center; text-align: center;
font-size: 18px; font-size: 14px;
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
} }
@ -78,10 +78,14 @@ const toNewsDetail = (id: number) => {
.copyright { .copyright {
margin-top: 30px; margin-top: 30px;
font-size: 10px;
} }
.report { .report {
margin-top: 0.1042rem; margin-top: 0.1042rem;
font-size: 10px;
text-align: center;
} }
&.dark-layout { &.dark-layout {

@ -59,8 +59,8 @@ const pcHost = new URL(import.meta.env.VITE_APP_PC_URL).host
if (isMobile && currentHost !== mobileHost) { if (isMobile && currentHost !== mobileHost) {
console.log('手机端,跳转到移动站') console.log('手机端,跳转到移动站')
location.href = import.meta.env.VITE_APP_MOBILE_URL // location.href = import.meta.env.VITE_APP_MOBILE_URL
} else if (!isMobile && currentHost !== pcHost) { } else if (!isMobile && currentHost !== pcHost) {
console.log('电脑端,跳转到 PC 站') console.log('电脑端,跳转到 PC 站')
location.href = import.meta.env.VITE_APP_PC_URL // location.href = import.meta.env.VITE_APP_PC_URL
} }

@ -6,7 +6,7 @@
<el-card> <el-card>
<template #header> <template #header>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<el-breadcrumb style="display: flex;align-items: center;"> <el-breadcrumb style="display: flex; align-items: center">
<el-breadcrumb-item <el-breadcrumb-item
v-for="item in Route.matched" v-for="item in Route.matched"
:key="item.path" :key="item.path"
@ -45,7 +45,7 @@
<div class="label">负责人:</div> <div class="label">负责人:</div>
<div class="text">{{ raceInfo.createBy }}</div> <div class="text">{{ raceInfo.createBy }}</div>
</li> </li>
<li > <li>
<div class="label">负责部门:</div> <div class="label">负责部门:</div>
<div class="text">{{ raceInfo.comporderc }}</div> <div class="text">{{ raceInfo.comporderc }}</div>
</li> </li>
@ -94,10 +94,16 @@
</div> </div>
</el-card> </el-card>
</div> </div>
</div> </div>
<!-- 年度比赛列表 --> <!-- 年度比赛列表 -->
<div style="margin-top: .8rem; font-size: .64rem; font-weight: 600;margin-left: .5333rem;"> <div
style="
margin-top: 0.8rem;
font-size: 0.64rem;
font-weight: 600;
margin-left: 0.5333rem;
"
>
年度比赛列表: 年度比赛列表:
</div> </div>
<el-card v-if="reacProjectList.length === 0" style="margin-top: 20px"> <el-card v-if="reacProjectList.length === 0" style="margin-top: 20px">
@ -120,9 +126,11 @@
class="item" class="item"
v-for="item in reacProjectList" v-for="item in reacProjectList"
:key="item.id" :key="item.id"
@click="goToCompetition(item.id, item.endtime,item.isopen)" @click="goToCompetition(item.id, item.endtime, item.isopen)"
:style="{ :style="{
'background-color': isTimePassed(item.endtime) ? 'rgb(232 232 232)' : '#fff', 'background-color': isTimePassed(item.endtime)
? 'rgb(232 232 232)'
: '#fff',
}" }"
> >
<div class="image"> <div class="image">
@ -135,7 +143,14 @@
</div> </div>
<div <div
class="reac-title" class="reac-title"
style="font-weight: 600; color: #000; font-size: 16px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" style="
font-weight: 600;
color: #000;
font-size: 16px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
> >
{{ item.name }} {{ item.name }}
</div> </div>
@ -155,8 +170,14 @@
</div> </div>
</div> </div>
</div> </div>
<div style="margin-top: 20px;display: flex;justify-content: center;"> <div style="margin-top: 20px; display: flex; justify-content: center">
<el-pagination background layout="prev, pager, next" :total="page.total" :page-size="page.pageSize" @change="pageChange"/> <el-pagination
background
layout="prev, pager, next"
:total="page.total"
:page-size="page.pageSize"
@change="pageChange"
/>
</div> </div>
</el-card> </el-card>
@ -187,17 +208,17 @@ console.log(Route, 'Route')
const loading = ref(false) const loading = ref(false)
const reacProjectList = ref<any>([]) const reacProjectList = ref<any>([])
let page = ref<any>({ let page = ref<any>({
id: Route.query.id, id: Route.query.id,
column: 'createTime', column: 'createTime',
order: 'desc', order: 'desc',
pageNo: 1, pageNo: 1,
pageSize: 8, pageSize: 8,
total: 0 total: 0,
}) })
const getRaceProjectListEvent = async () => { const getRaceProjectListEvent = async () => {
loading.value = true loading.value = true
const res: any = await getYearRaceList({...page.value,individual:true}) const res: any = await getYearRaceList({ ...page.value, individual: true })
console.log(res) console.log(res)
reacProjectList.value = res.result.records reacProjectList.value = res.result.records
page.value.total = res.result.total page.value.total = res.result.total
@ -206,7 +227,7 @@ const getRaceProjectListEvent = async () => {
loading.value = false loading.value = false
} }
getRaceProjectListEvent() getRaceProjectListEvent()
const pageChange = (e:any) => { const pageChange = (e: any) => {
page.value.pageNo = e page.value.pageNo = e
getRaceProjectListEvent() getRaceProjectListEvent()
} }
@ -224,11 +245,11 @@ const getraceInfoEvent = async () => {
getraceInfoEvent() getraceInfoEvent()
// //
const goToCompetition = async (id: any, endTime: string,isOpen:string) => { const goToCompetition = async (id: any, endTime: string, isOpen: string) => {
if(isOpen == '0') return ElMessage.error('比赛未开启') // if(isOpen == '0') return ElMessage.error('')
if (isTimePassed(endTime)) { // if (isTimePassed(endTime)) {
return ElMessage.error('比赛已结束') // return ElMessage.error('')
} // }
const projectId: any = await getProjectId({ anncmopid: id }) const projectId: any = await getProjectId({ anncmopid: id })
console.log(projectId.result) console.log(projectId.result)
@ -365,7 +386,7 @@ const scrollToPosition = () => {
margin-top: 30px; margin-top: 30px;
min-height: 750px; min-height: 750px;
.left-info { .left-info {
width: 100%; width: 100%;
} }
.right-history { .right-history {
// width: 300px; // width: 300px;
@ -473,18 +494,18 @@ const scrollToPosition = () => {
display: flex; display: flex;
margin: 10px 0; margin: 10px 0;
.label { .label {
font-size: 16px; font-size: 14px;
color: var(--text-color); color: var(--text-color);
opacity: 0.45; opacity: 0.45;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 16px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: var(--text-color); color: var(--text-color);
} }
} }
} }
} }
} }

Loading…
Cancel
Save