09036d30 by zrj

9.18 lpt修改

1 parent 05233f72
......@@ -15,9 +15,9 @@
</el-col>
<el-col :lg="12">
<div style="display: flex;align-items: center;height: 100%">
<el-input class="search-input" clearable :placeholder="languageLibrary[language].e" v-model="searchParam.text">
<el-input v-model="searchParam.name" class="search-input" clearable :placeholder="languageLibrary[language].e">
<template #append>
<el-button class="search-btn" >
<el-button @click="getList" class="search-btn" >
<el-icon>
<Search/>
</el-icon>
......@@ -27,7 +27,7 @@
</div>
</el-col>
</el-row>
<el-card class="machCard" v-for="(n,index) in newest2">
<el-card v-loading="tableLoading" class="machCard" v-for="(n,index) in newest2">
<el-row>
<el-col :lg="8" :xs="24">
<div class="imgbox">
......@@ -116,8 +116,10 @@ const searchParam = ref({
pageSize:9999,
enrollStatus:'',
releaseStatus: 1,
name:'',
})
const newest2 = ref([])
const tableLoading = ref(false)
onMounted(() => {
getList()
......@@ -129,10 +131,12 @@ const searchByType = (type) => {
}
const getList = () => {
tableLoading.value = true
getCompetitionList(searchParam.value).then(res => {
if (res.code == 200) {
newest2.value = res.rows
}
tableLoading.value = false
console.log(res)
})
}
......
......@@ -16,18 +16,18 @@
</div>
</div>
<el-row style="margin: 20px 0">
<el-select
class="list-select"
v-model="query.type"
@change="getList"
>
<el-option
v-for="item in optionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-select-->
<!-- class="list-select"-->
<!-- v-model="query.type"-->
<!-- @change="getList"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in optionList"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
</el-row>
<el-row>
<el-col v-for="item in competitionList" :lg="8">
......@@ -129,7 +129,7 @@ const query = ref({
pageNum:1,
pageSize:9999,
cptId:'',
type:'1'
type:''
})
const competitionList = ref([])
......@@ -143,6 +143,7 @@ const getMainInfo = () => {
getMain(tId.value).then(res => {
if (res.code === 200) {
mainInfo.value = res.data
mainInfo.value.beginTime = getTimeFormate(mainInfo.value.beginTime)
query.value.cptId = mainInfo.value.id
getList()
}
......@@ -176,6 +177,15 @@ const getList = () => {
})
}
const getTimeFormate = (time) => {
const showDay = new Date(time)
const year = showDay.getFullYear();
const month = showDay.getMonth() + 1; // 月份是从0开始的,所以需要加1
const date = showDay.getDate();
return `${year}-${month.toString().padStart(2, '0')}-${date.toString().padStart(2, '0')}`;
}
const goDetail = (n) => {
router.push({
path:`/contest/detail/${n}`
......
......@@ -7,10 +7,10 @@
</el-col>
</el-row>
<el-row>
<el-col class="photo-space" :lg="24" v-for="item in itemList.slice(0,1)">
<el-col class="photo-space" :lg="8" v-for="item in itemList">
<div class="photo-img-group">
<img class="photo-img" :src="fillImgUrl(item.picUrl)">
<!-- <span style="display: block;font-size: 16px;margin:5px 0;color:#fff">{{item.name}}</span>-->
<span style="display: block;font-size: 16px;margin:5px 0;color:#fff">{{item.name}}</span>
</div>
</el-col>
</el-row>
......
......@@ -7,7 +7,7 @@
</el-col>
<el-col :lg="12">
<div style="display: flex;align-items: center;height: 100%">
<el-input class="search-input" clearable :placeholder="languageLibrary[language].c" v-model="searchParam.text">
<el-input class="search-input" clearable :placeholder="languageLibrary[language].c" v-model="searchParam.name">
<template #append>
<el-button @click="getList" class="search-btn" >
<el-icon>
......@@ -20,7 +20,7 @@
</el-col>
</el-row>
<div style="background: #1f2644;border-radius: 15px;box-shadow: 0 0 15px 5px rgba(0,0,0,0.36)">
<div v-loading="tableLoading" style="background: #1f2644;border-radius: 15px;box-shadow: 0 0 15px 5px rgba(0,0,0,0.36)">
<div class="newsLine" v-for="(n,index) in newsList" :key="index">
<div class="item" @click="goDetail(n.noteId)">
<div class="date">
......@@ -42,7 +42,7 @@
<a class="go" />
</div>
</div>
<div style="display: flex;align-items: center">
<div v-if="newsList.length > 10" style="display: flex;align-items: center">
<el-button class="news-more-btn" @click="getMoreInfo">{{ languageLibrary[language].b }}<div class="arrow_towDown"></div></el-button>
</div>
</div>
......@@ -82,13 +82,13 @@ const languageLibrary = ref([{
b:'Xem thêm',
c:'Nhập nội dung tìm kiếm',
}])
const tableLoading = ref(false)
const router = useRouter()
const totalTable = ref(0)
const searchParam = ref({
pageNum:1,
pageSize:10,
text:'',
name:'',
status: 1,
sortId: 1000,
})
......@@ -100,6 +100,7 @@ onMounted(() => {
})
const getList = () => {
tableLoading.value = true
searchParam.value.pageNum = 1
searchParam.value.pageSize = 10
match.getNoteList(searchParam.value).then(res => {
......@@ -107,6 +108,7 @@ const getList = () => {
newsList.value = res.rows
totalTable.value = res.total
}
tableLoading.value = false
})
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!