'对接学生首页'

main
JayChou 4 months ago
parent cef27691bf
commit 2f2e9e3fc8
  1. 6
      jeecgboot-vue3-master/src/api/common/api.ts
  2. 12
      jeecgboot-vue3-master/src/views/depart/workbench/components/components/cardListFive.vue
  3. 19
      jeecgboot-vue3-master/src/views/depart/workbench/components/components/cardListFour.vue
  4. 15
      jeecgboot-vue3-master/src/views/depart/workbench/components/organizingCommittee/organizingCommittee.vue
  5. 141
      jeecgboot-vue3-master/src/views/depart/workbench/components/student/student.vue

@ -159,3 +159,9 @@ export const getOrganizingCommittee = () => {
url:'/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs' url:'/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs'
}) })
} }
// 学生首页
export const getStudent = () => {
return defHttp.get({
url:'/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/xssybsjs'
})
}

@ -5,17 +5,19 @@
<div class="table"> <div class="table">
<div class="t_item t_head"> <div class="t_item t_head">
<!-- <div class="ranking">排名</div> --> <!-- <div class="ranking">排名</div> -->
<div class="name">所有奖项</div> <div class="name">奖项名称</div>
<div class="total">比赛名称</div> <div class="total">年度比赛名称</div>
<div class="total">年度比赛项目名称</div>
<div class="operate">积分</div> <div class="operate">积分</div>
</div> </div>
<div class="t_item t_con" v-for="(i,index) in props.data" :key="i"> <div class="t_item t_con" v-for="(i,index) in props.data" :key="i">
<!-- <div class="ranking"> <!-- <div class="ranking">
<div class="ol" :class="{ ac: index <= 3 }">{{ index +1 }}</div> <div class="ol" :class="{ ac: index <= 3 }">{{ index +1 }}</div>
</div> --> </div> -->
<div class="name">{{ i.name }}</div> <div class="name">{{ i.jxname }}</div>
<div class="total">{{ i.sum }}</div> <div class="total">{{ i.ndbs }}</div>
<div class="operate">{{ i.id }}</div> <div class="total">{{ i.ndbsxm }}</div>
<div class="operate">{{ i.jf }}</div>
</div> </div>
</div> </div>
</div> </div>

@ -5,29 +5,38 @@
<div class="table"> <div class="table">
<div class="t_item t_head"> <div class="t_item t_head">
<!-- <div class="ranking">排名</div> --> <!-- <div class="ranking">排名</div> -->
<div class="name">比赛名称</div> <div class="name">报名比赛项目</div>
<div class="total">比赛状态</div> <div class="total">状态</div>
<div class="operate">操作</div> <div class="operate">操作</div>
</div> </div>
<div class="t_item t_con" v-for="(i,index) in props.data" :key="i"> <div class="t_item t_con" v-for="(i,index) in props.data" :key="i">
<!-- <div class="ranking"> <!-- <div class="ranking">
<div class="ol" :class="{ ac: index <= 3 }">{{ index +1 }}</div> <div class="ol" :class="{ ac: index <= 3 }">{{ index +1 }}</div>
</div> --> </div> -->
<div class="name">{{ i.name }}</div> <div class="name">{{ i.xmname }}</div>
<div class="total">{{ i.sum }}</div> <div class="total">{{ i.zt }}</div>
<div class="operate">详情</div> <div class="operate" @click="goToInfo(i)">详情</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {useRouter} from 'vue-router'
const router = useRouter()
const props = defineProps({ const props = defineProps({
data: { data: {
type: Array, type: Array,
default: [], default: [],
}, },
}); });
console.log(props.data,'111');
const goToInfo = (record:any) => {
router.push({
path: '/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistrationList',
query: {annualCompid: record.xmname ,entryFormat: record.cyxs, id: record.xmid}
})
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -129,7 +129,20 @@
}, 1000); }, 1000);
}; };
}; };
const data = ref<any>({}) const data = ref<any>({
ydjNumber:0,
edjNumber:0,
sdjNumber:0,
sidjNumber:0,
wdjNumber:0,
qwtxmList:[],
bsxmSum:0,
csyxbmpm:[],
bmxsxxList:[],
})
const getOrganizingCommitteeEvent = async () => { const getOrganizingCommitteeEvent = async () => {
const res = await getOrganizingCommittee() const res = await getOrganizingCommittee()
data.value = res data.value = res

@ -1,33 +1,36 @@
<template> <template>
<div class="container-box"> <div class="container-box">
<a-row :gutter="[24, 24]" style="margin-top: 30px;"> <a-row :gutter="[24, 24]" style="margin-top: 30px">
<a-col :xxl="12" :xl="12" :lg="24"> <a-col :xxl="12" :xl="12" :lg="24">
<a-row :gutter="[24, 24]" style="margin-top: 0"> <a-row :gutter="[24, 24]" style="margin-top: 0">
<a-col :span="12"> <a-col :span="12">
<div class="card1"> <div class="card1">
<div class="title"> <div class="title">
<div class="left">赛人数</div> <div class="left">加比赛项目数量</div>
<div class="right"><SvgIcon size="20" name="content" /></div> <div class="right"><SvgIcon size="20" name="content" /></div>
</div> </div>
<div class="name">1314</div> <div class="name">{{ data.cjbsxmsl }}</div>
<div class="total"> <div class="total" style="margin-top: 10px">
<div class="one">一等11</div> <div class="two">国家级{{ data.gjj }}</div>
<div class="two">二等1</div> <div class="three">省级{{ data.shengj }}</div>
<div class="three">三等1</div> <div class="three">市级{{ data.shij }}</div>
<div class="three">校级{{ data.xj }}</div>
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<div class="card1"> <div class="card1">
<div class="title"> <div class="title">
<div class="left">参赛人</div> <div class="left">获奖</div>
<div class="right"><SvgIcon size="20" name="content" /></div> <div class="right"><SvgIcon size="20" name="content" /></div>
</div> </div>
<div class="name">1314</div> <div class="name">1314</div>
<div class="total"> <div class="total" style="grid-template-columns: repeat(5, 1fr)">
<div class="one">一等11</div> <div class="one">一等{{data.ydjNumber}}</div>
<div class="two">二等1</div> <div class="two">二等{{data.edjNumber}}</div>
<div class="three">三等1</div> <div class="three">三等{{data.sdjNumber}}</div>
<div class="two">四等{{data.sidjNumber}}</div>
<div class="three">五等{{data.wdjNumber}}</div>
</div> </div>
</div> </div>
</a-col> </a-col>
@ -63,12 +66,13 @@
<a-col :xxl="12" :xl="12" :lg="24"> <a-col :xxl="12" :xl="12" :lg="24">
<div class="right-list"> <div class="right-list">
<a-card title="报名比赛" style="width: 100%; height: 100%"> <a-card title="报名比赛" style="width: 100%; height: 100%">
<cardListFour /> <cardListFour :data="data.bmbsxm"/>
</a-card> </a-card>
<div class="gengduo" @click="router.push('/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistrationList')">更多</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[24, 24]" style="margin-top: 30px;"> <a-row :gutter="[24, 24]" style="margin-top: 30px">
<a-col :xxl="12" :xl="12" :lg="24" <a-col :xxl="12" :xl="12" :lg="24"
><div class="huojiangqingkuang"> ><div class="huojiangqingkuang">
<a-card title="获奖情况" style="width: 100%; height: 100%"> <a-card title="获奖情况" style="width: 100%; height: 100%">
@ -79,7 +83,7 @@
<a-col :xxl="12" :xl="12" :lg="24"> <a-col :xxl="12" :xl="12" :lg="24">
<div class="all-jiangxiang"> <div class="all-jiangxiang">
<a-card title="所有奖项" style="width: 100%"> <a-card title="所有奖项" style="width: 100%">
<cardListFive /> <cardListFive :data="data.allApList"/>
</a-card> </a-card>
</div> </div>
</a-col> </a-col>
@ -92,15 +96,34 @@
import cardListFour from '../components/cardListFour.vue'; import cardListFour from '../components/cardListFour.vue';
import cardListFive from '../components/cardListFive.vue'; import cardListFive from '../components/cardListFive.vue';
import echarts from '/@/utils/lib/echarts'; import echarts from '/@/utils/lib/echarts';
import { getStudent }from '/@/api/common/api' import { getStudent } from '/@/api/common/api';
import { onMounted } from 'vue'; import { onMounted, ref } from 'vue';
const getStudentEvent = async() => { import {useRouter} from 'vue-router'
const res = await getStudent() const router = useRouter()
const data = ref({
cjbsxmsl:0,
gjj:0,
shengj:0,
shij:0,
xj:0,
ydjNumber:0,
edjNumber:0,
sdjNumber:0,
sidjNumber:0,
wdjNumber:0,
allApList:[],
ndbsxm:[],
bmbsxm:[]
});
const getStudentEvent = async () => {
const res = await getStudent();
data.value = res;
console.log(res); console.log(res);
initHuojiangChart();
} };
getStudentEvent() getStudentEvent();
const throttle = (fn: any) => { const throttle = (fn: any) => {
let timer: any; let timer: any;
return function () { return function () {
@ -113,7 +136,7 @@
timer = null; timer = null;
}, 1000); }, 1000);
}; };
} };
var indicator = [ var indicator = [
{ {
text: '前言探索', text: '前言探索',
@ -259,46 +282,53 @@
window.addEventListener('resize', resize); window.addEventListener('resize', resize);
}; };
const initHuojiangChart = () => { const initHuojiangChart = () => {
console.log(data.value,'ata.value');
const myChart = echarts.init(document.getElementById('chart-huojiang')); const myChart = echarts.init(document.getElementById('chart-huojiang'));
const option = { const option = {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
}, },
// grid: { // grid: {
// left: '20px', // left: '20px',
// containLabel: false, // containLabel: false,
// }, // },
legend: { legend: {
type:"scroll", type: 'scroll',
orient: 'vertical', orient: 'vertical',
left:'70%', left: '70%',
align:'left', align: 'left',
top:'middle', top: 'middle',
textStyle: { textStyle: {
color:'#8C8C8C' color: '#8C8C8C',
}, },
height:250 height: 250,
}, },
series: [ series: [
{ {
name: '获奖情况', name: '获奖情况',
type: 'pie', type: 'pie',
center: ['35%', '50%'], center: ['35%', '50%'],
radius: '80%', radius: '80%',
label: { label: {
normal: { normal: {
show: false, show: false,
position: 'outter', position: 'outter',
formatter:function (parms){ formatter: function (parms) {
return parms.data.value return parms.data.value;
} },
}
}, },
labelLine: { },
show:false labelLine: {
show: false,
}, },
data: [{ value: 1048, name: '一等奖' }, { value: 735, name: '二等奖' }, { value: 580, name: '三等奖' }], data: [
{ value: data.value.ydjNumber, name: '一等奖' },
{ value: data.value.edjNumber, name: '二等奖' },
{ value: data.value.sdjNumber, name: '三等奖' },
{ value: data.value.sidjNumber, name: '四等奖' },
{ value: data.value.wdjNumber, name: '五等奖' },
],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -317,7 +347,6 @@
}; };
onMounted(() => { onMounted(() => {
initChart(); initChart();
initHuojiangChart();
}); });
</script> </script>
@ -351,9 +380,15 @@
margin-top: 20px; margin-top: 20px;
font-size: 12px; font-size: 12px;
color: #000; color: #000;
display: flex; // display: flex;
width: 100%; width: 100%;
justify-content: space-between; display: grid;
grid-template-columns: repeat(4, 1fr); /* 创建两列,每列宽度相等 */
grid-template-rows: repeat(2, 10px); /* 创建四行,每行高度固定为100px */
gap: 10px;
div {
// width: 25%;
}
} }
} }
.render { .render {
@ -406,9 +441,17 @@
} }
} }
.right-list { .right-list {
position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
.gengduo{
position: absolute;
right: 50px;
top: 20px;
color: #1890ff;
cursor: pointer;
}
} }
.huojiangqingkuang { .huojiangqingkuang {
width: 100%; width: 100%;

Loading…
Cancel
Save