|
@@ -1,52 +1,65 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <Transition :enter-active-class="proxy?.animate.face.enter" :leave-active-class="proxy?.animate.face.right">
|
|
|
- <div class="mask" v-if="windowState" @click="close">
|
|
|
+ <Transition :enter-active-class="proxy?.animate.mask.enter" :leave-active-class="proxy?.animate.mask.leave">
|
|
|
+ <div class="mask" v-if="windowState" @click="close"></div>
|
|
|
+ </Transition>
|
|
|
+ <Transition :enter-active-class="proxy?.animate.rankingWindow.enter"
|
|
|
+ :leave-active-class="proxy?.animate.rankingWindow.leave">
|
|
|
+ <div class="multipleItemRanking" v-if="windowState" @click="close">
|
|
|
<div class="rankingBox">
|
|
|
<div class="top">
|
|
|
<div class="item two">
|
|
|
<div>
|
|
|
<div class="userInfo">
|
|
|
- <div class="maozi maozi2">2</div>
|
|
|
+ <div class="maozi maozi2">
|
|
|
+ <div class="num">2</div>
|
|
|
+ </div>
|
|
|
<div class="touxiang">
|
|
|
- <img :src="twoObj.faceCheckStu.face_pic || twoObj.faceCheckStu.logo_url" v-if="twoObj.faceCheckStu.face_pic || twoObj.faceCheckStu.logo_url" />
|
|
|
+ <img :src="twoObj?.faceCheckStu.face_pic || twoObj?.faceCheckStu?.logo_url"
|
|
|
+ v-if="twoObj?.faceCheckStu?.face_pic || twoObj?.faceCheckStu?.logo_url" />
|
|
|
<img src="@/assets/images/test/profilePicture2.png" v-else />
|
|
|
</div>
|
|
|
<div class="name">
|
|
|
- {{ twoObj.faceCheckStu.name }}
|
|
|
+ {{ twoObj?.faceCheckStu?.name || "名字" }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="score">{{ twoObj.count || 0 }}</div>
|
|
|
+ <div class="score">{{ twoObj.count || 0 }} <span>{{unit}}</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item one">
|
|
|
<div>
|
|
|
<div class="userInfo">
|
|
|
- <div class="maozi maozi1">1</div>
|
|
|
+ <div class="maozi maozi1">
|
|
|
+ <div class="num">1</div>
|
|
|
+ </div>
|
|
|
<div class="touxiang">
|
|
|
- <img :src="oneObj.faceCheckStu.face_pic || oneObj.faceCheckStu.logo_url" v-if="oneObj.faceCheckStu.face_pic || oneObj.faceCheckStu.logo_url" />
|
|
|
+ <img :src="oneObj.faceCheckStu?.face_pic || oneObj?.faceCheckStu?.logo_url"
|
|
|
+ v-if="oneObj?.faceCheckStu?.face_pic || oneObj?.faceCheckStu?.logo_url" />
|
|
|
<img src="@/assets/images/test/profilePicture2.png" v-else />
|
|
|
</div>
|
|
|
<div class="name">
|
|
|
- {{ oneObj.faceCheckStu.name }}
|
|
|
+ {{ twoObj?.faceCheckStu?.name || "名字" }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="score">{{ oneObj.count || 0 }}</div>
|
|
|
+ <div class="score">{{ oneObj.count || 0 }} <span>{{unit}}</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item three">
|
|
|
<div>
|
|
|
<div class="userInfo">
|
|
|
- <div class="maozi maozi3">3</div>
|
|
|
+ <div class="maozi maozi3">
|
|
|
+ <div class="num">3</div>
|
|
|
+ </div>
|
|
|
<div class="touxiang">
|
|
|
- <img :src="threeObj.faceCheckStu.face_pic || threeObj.faceCheckStu.logo_url" v-if="threeObj.faceCheckStu.face_pic || threeObj.faceCheckStu.logo_url" />
|
|
|
+ <img :src="threeObj?.faceCheckStu?.face_pic || threeObj?.faceCheckStu?.logo_url"
|
|
|
+ v-if="threeObj?.faceCheckStu?.face_pic || threeObj?.faceCheckStu?.logo_url" />
|
|
|
<img src="@/assets/images/test/profilePicture2.png" v-else />
|
|
|
</div>
|
|
|
<div class="name">
|
|
|
- {{ threeObj.faceCheckStu.name }}
|
|
|
+ {{ twoObj?.faceCheckStu?.name || "名字" }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="score">{{ threeObj.count || 0 }}</div>
|
|
|
+ <div class="score">{{ threeObj.count || 0 }} <span>{{unit}}</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -58,7 +71,10 @@
|
|
|
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
+const route = useRoute();
|
|
|
+import dataDictionary from "@/utils/dataDictionary"
|
|
|
const { proxy } = getCurrentInstance() as any;
|
|
|
+let project: any = route.query.project;
|
|
|
|
|
|
//父值
|
|
|
const props = defineProps({
|
|
@@ -69,37 +85,38 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
const data = reactive<any>({
|
|
|
+ unit: "",//单位
|
|
|
windowState: false,//窗口状态
|
|
|
oneObj: {},
|
|
|
twoObj: {},
|
|
|
threeObj: {},
|
|
|
});
|
|
|
|
|
|
-const { windowState, oneObj, twoObj, threeObj } = toRefs(data);
|
|
|
+const {unit, windowState, oneObj, twoObj, threeObj } = toRefs(data);
|
|
|
|
|
|
//打开
|
|
|
const open = () => {
|
|
|
let list = JSON.parse(JSON.stringify(props.testList))
|
|
|
- list.sort((a:any, b:any) => Number(b.count) - Number(a.count));
|
|
|
- if(list[0]){
|
|
|
+ list.sort((a: any, b: any) => Number(b.count) - Number(a.count));
|
|
|
+ if (list[0]) {
|
|
|
oneObj.value = list[0];
|
|
|
}
|
|
|
- if(list[1]){
|
|
|
+ if (list[1]) {
|
|
|
twoObj.value = list[1];
|
|
|
}
|
|
|
- if(list[2]){
|
|
|
+ if (list[2]) {
|
|
|
threeObj.value = list[2]
|
|
|
}
|
|
|
windowState.value = true;
|
|
|
};
|
|
|
|
|
|
//关闭
|
|
|
-const close = (data?: any) => {
|
|
|
+const close = () => {
|
|
|
windowState.value = false;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * 播报时间
|
|
|
+ * 定时关闭
|
|
|
*/
|
|
|
watch(
|
|
|
() => windowState.value,
|
|
@@ -109,12 +126,17 @@ watch(
|
|
|
if (windowState.value == true) {
|
|
|
close();
|
|
|
}
|
|
|
- }, 8000)
|
|
|
+ }, 6000)
|
|
|
}
|
|
|
},
|
|
|
{ immediate: true }
|
|
|
);
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ let dic: any = dataDictionary;
|
|
|
+ unit.value = dic.unit[project];
|
|
|
+})
|
|
|
+
|
|
|
//暴露给父组件用
|
|
|
defineExpose({
|
|
|
open,
|
|
@@ -128,15 +150,24 @@ defineExpose({
|
|
|
width: 100vw;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- background: rgba(0, 0, 0, 0.8);
|
|
|
+ background: rgba(0, 0, 0, 0.78);
|
|
|
z-index: 998;
|
|
|
+}
|
|
|
+
|
|
|
+.multipleItemRanking {
|
|
|
+ position: fixed;
|
|
|
+ height: 100vh;
|
|
|
+ width: 100vw;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 999;
|
|
|
}
|
|
|
|
|
|
.rankingBox {
|
|
|
- width: 50%;
|
|
|
+ width: 80%;
|
|
|
|
|
|
.top {
|
|
|
display: flex;
|
|
@@ -151,12 +182,20 @@ defineExpose({
|
|
|
flex-direction: column;
|
|
|
|
|
|
.maozi {
|
|
|
- width: 60px;
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
- text-align: center;
|
|
|
- font-size: 20px;
|
|
|
+ width: 3.5vw;
|
|
|
+ height: 2.2vw;
|
|
|
+ margin-bottom: 3px;
|
|
|
color: #ffffff;
|
|
|
+ font-family: 'Saira-ExtraBold';
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ .num {
|
|
|
+ font-size: 1.1vw;
|
|
|
+ line-height: 1.1vw;
|
|
|
+ padding-top: 0.5vw;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.maozi1 {
|
|
@@ -175,21 +214,41 @@ defineExpose({
|
|
|
}
|
|
|
|
|
|
.touxiang {
|
|
|
- width: 180px;
|
|
|
- height: 180px;
|
|
|
+ width: 12.5vw;
|
|
|
+ height: 12.5vw;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 50%;
|
|
|
+ position: relative;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ overflow: hidden;
|
|
|
|
|
|
img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: "";
|
|
|
+ width: 12.5vw;
|
|
|
+ height: 12.5vw;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 0.5vw solid rgba(26, 41, 58, 0.6);
|
|
|
+ border-radius: 50%;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.name {
|
|
|
+ font-size: 1.8vw;
|
|
|
color: #000000;
|
|
|
- height: 50px;
|
|
|
- line-height: 50px;
|
|
|
- border-radius: 25px;
|
|
|
- padding: 0 20px;
|
|
|
+ width: 12.5vw;
|
|
|
+ height: 2.8vw;
|
|
|
+ line-height: 2.8vw;
|
|
|
+ border-radius: 1.5vw;
|
|
|
+ box-sizing: border-box;
|
|
|
+ text-align: center;
|
|
|
background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
|
|
|
box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.9046), inset 0px 3px 6px 0px rgba(0, 0, 0, 0.0851);
|
|
|
}
|
|
@@ -197,25 +256,35 @@ defineExpose({
|
|
|
|
|
|
.score {
|
|
|
color: #ffffff;
|
|
|
- font-size: 24px;
|
|
|
+ font-size: 3vw;
|
|
|
text-align: center;
|
|
|
+ height: 5vw;
|
|
|
+ line-height: 5vw;
|
|
|
+ font-family: 'Saira-ExtraBold';
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ span{
|
|
|
+ font-size: 2vw;
|
|
|
+ display: block;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.two {
|
|
|
position: relative;
|
|
|
- bottom: -34px;
|
|
|
+ bottom: -3vw;
|
|
|
}
|
|
|
|
|
|
.three {
|
|
|
position: relative;
|
|
|
- bottom: -70px;
|
|
|
+ bottom: -4.5vw;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.bottom {
|
|
|
width: 100%;
|
|
|
- height: 30vh;
|
|
|
+ height: 15vw;
|
|
|
background: url('@/assets/images/ranking/jiangtai.png') center center no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|