123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119 |
- <template>
- <div>
- <Header @confirmExit="confirmExit"></Header>
- <div class="main">
- <transition :enter-active-class="proxy?.animate.dialog.enter" :leave-active-class="proxy?.animate.dialog.leave">
- <div class="time" v-show="[42].includes(examState)">{{
- time.countdownNum
- }}</div>
- </transition>
- <div class="testBox"
- :class="{ 'testBox1': styleType == 1, 'testBox2': styleType == 2, 'testBox3': styleType == 3 }">
- <div class="ul" :class="{ 'overlap': ![0, 3, 40, 41].includes(examState), 'ready': [41].includes(examState) }"
- v-for="(items, indexs) in testListArr " :key="indexs">
- <MultipleItem :ref="(el: any) => { multipleItemRef(el, item.itemNumber, item.area) }"
- v-for="(item, index) in items" :query="parameter" :area="item.area" :key="index"
- :itemNumber="item.itemNumber" @returnData="returnData" :examState="examState" :needStart="needStart"
- :styleType="styleType" />
- </div>
- </div>
- </div>
- <div class="footerBtn">
- <template v-if="needStart">
- <div class="btn" @click="getAgain" v-if="examState == 42 || showTestAgain">再测一次</div>
- <div class="btn" @click="getOpenOneTestAndStartFace" v-if="examState < 41">开始识别</div>
- <div class="btn" @click="getStopFace" v-if="examState == 41">停止人脸识别</div>
- <div class="btn startBtn" @click="getStartOneTest" v-if="examState == 43">开始测试</div>
- </template>
- <template v-else>
- <div class="btn startBtn" @click="getReady" v-if="examState == 43">开始测试</div>
- </template>
- </div>
- <!--倒计时开始-->
- <div>
- <transition :enter-active-class="proxy?.animate.mask.enter" :leave-active-class="proxy?.animate.mask.leave">
- <div class="mask" v-show="examState == 43 && time.ready"></div>
- </transition>
- <transition :enter-active-class="proxy?.animate.face.enter" :leave-active-class="proxy?.animate.face.leave2">
- <div class="confirmDiaBg" v-show="examState == 43 && time.ready">
- <div class="confirmDiaWindow">
- <div class="confirmDiaWindow-con">
- <div class="readyBox">
- <div class="value">{{ time.ready }}</div>
- <div class="lable">倒计时</div>
- </div>
- </div>
- </div>
- </div>
- </transition>
- </div>
- <!--倒计时结束-->
- </div>
- </template>
- <script setup name="Multiple" lang="ts">
- import { initSpeech, speckText, speckCancel, chineseNumber } from '@/utils/speech'
- import { initWs, examEnds, openOneTest, startFace, stopFace, faceConfirmOnly, startOneTest, finishOneTest, closeOneTest, suspendFaceRecognitionChannels, resumeFaceRecognitionChannels } from '@/utils/ws'
- const { proxy } = getCurrentInstance() as any;
- const router = useRouter();
- const route = useRoute();
- const data = reactive<any>({
- timerManager: {},//计时器管理
- parameter: {},//参数
- time: {
- testTime: 60,//时长
- countdownNum: 0,//计时
- ready: 0,//预备
- },
- userInfo: {},//用户信息
- examState: 0,//当前状态
- needStart: false,//是否需要按钮
- showTestAgain: false,//再测一次按钮
- testList: [],//获取区列表
- multipleItemRefList: [],//获取区列表
- styleType: null,//展示样式1:1-5个,2:6-10个,3:10个以上
- });
- const { timerManager, parameter, time, userInfo, examState, needStart, showTestAgain, testList, multipleItemRefList, styleType } = toRefs(data);
- /**
- * 创建组件实例
- */
- const multipleItemRef = (el: any, index: number, area: any) => {
- multipleItemRefList.value[index - 1] = el;
- }
- /**
- * 开始识别
- */
- const getOpenOneTestAndStartFace = () => {
- cleanData();
- examState.value = 41;
- for (let i = 0; i < multipleItemRefList.value.length; i++) {
- multipleItemRefList.value[i].getOpenOneTestAndStartFace()
- }
- };
- /**
- * 停止人脸识别
- */
- const getStopFace = async () => {
- // let flag = false;
- // for (let i = 0; i < testList.value.length; i++) {
- // if (testList.value[i] && testList.value[i].faceCheckStu?.student_id) {
- // flag = true;
- // }
- // }
- // if (!flag) {
- // proxy?.$modal.msgWarning("请选择人员!");
- // return false;
- // }
- examState.value = 43;
- for (let i = 0; i < multipleItemRefList.value.length; i++) {
- multipleItemRefList.value[i].getStopFace()
- }
- };
- /**
- * 开始测试
- */
- const getStartOneTest = () => {
- if (examState.value != 43) {
- return false;
- }
- let flag = false;
- for (let i = 0; i < testList.value.length; i++) {
- if (testList.value[i] && testList.value[i].faceCheckStu?.student_id) {
- flag = true;
- }
- }
- if (!flag) {
- proxy?.$modal.msgWarning("请选择人员!");
- return false;
- }
- getClearTimer("readyTimer");
- time.value.ready = 0;
- examState.value = 42;
- for (let i = 0; i < multipleItemRefList.value.length; i++) {
- if (testList.value[i].examState == 41) {
- //正在识别的停止识别
- multipleItemRefList.value[i].getStopFace()
- }
- if (testList.value[i].examState == 43) {
- multipleItemRefList.value[i].getStartOneTest()
- }
- }
- speckText("哨声");
- //显示再测一次按钮
- showTestAgain.value = true;
- //时间为0的为正计时,大于0的为倒计时
- if (time.value.testTime == 0) {
- getCounting("+");
- } else {
- getCounting("-");
- }
- };
- /**
- * 再测一次
- */
- const getAgain = async () => {
- cleanData();
- examState.value = 43;
- for (let i = 0; i < multipleItemRefList.value.length; i++) {
- multipleItemRefList.value[i].getAgain()
- }
- };
- /**
- * 确认退出
- */
- const confirmExit = () => {
- proxy?.$modal.confirm("确定退出吗?").then(() => {
- getExit();
- }).finally(() => {
- });
- };
- /**
- * 退出
- */
- const getExit = () => {
- getClearTimer();//清除计时器
- examEnds();//通知工作站关闭
- speckCancel()//停止播报;
- router.push({ path: '/' });//跳转
- };
- /**
- * 清空定时任务
- */
- const getClearTimer = (data?: any) => {
- if (data) {
- //清除指定
- clearInterval(timerManager.value[data])
- timerManager.value[data] = null;
- } else {
- //清除全部
- for (let key in timerManager.value) {
- if (timerManager.value.hasOwnProperty(key)) {
- clearInterval(timerManager.value[key])
- timerManager.value[key] = null;
- }
- }
- }
- };
- /**
- * 清除历史记录
- */
- const cleanData = () => {
- getClearTimer("countdownTimer");
- time.value.countdownNum = time.value.testTime;
- showTestAgain.value = false;
- };
- /**
- * 时间转换
- */
- // const countdownNumFormat = computed(() => {
- // return time.value.countdownNum;
- // //return proxy?.$utils.timeFormat(time.value.countdownNum);
- // });
- /**
- * 倒计时
- */
- const getCounting = (type: string) => {
- timerManager.value.countdownTimer = setInterval(() => {
- //正计时
- if (type == "+") {
- time.value.countdownNum++;
- }
- //倒计时
- if (type == "-") {
- if (time.value.countdownNum <= 0) {
- getClearTimer("countdownTimer");
- } else {
- time.value.countdownNum--;
- }
- }
- }, 1000);
- };
- /**
- * 子组件返回数据
- */
- const returnData = (data: any) => {
- let index = testList.value.findIndex((item: any) => {
- return item.area == data.area;
- });
- let obj = Object.assign(testList.value[index], data);
- testList.value[index] = JSON.parse(JSON.stringify(obj));
- console.log("testList.value", testList.value)
- if (examState.value == 0) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value;
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].examState == 3) {
- flag = true;
- }
- }
- if (flag) {
- console.log("变更状态:", 3)
- examState.value = 3;
- }
- }
- if (examState.value == 3) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value;
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].examState == 40) {
- flag = true;
- }
- }
- if (flag) {
- console.log("变更状态:", 40)
- examState.value = 40;
- }
- }
- if (examState.value == 40) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value;
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].examState == 41) {
- flag = true;
- }
- }
- if (flag) {
- console.log("变更状态:", 41)
- examState.value = 41;
- let txt = parameter.value.gesture ? "请举手看摄像头人脸识别" : "请看摄像头进行人脸识别";
- speckText(txt);
- }
- }
- if (examState.value == 41) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value.filter((item: any) => {
- return item?.faceCheckStu?.student_id;
- })
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].faceCheckStu?.student_id && newList[i].examState == 43) {
- flag = true;
- }
- }
- if (flag) {
- console.log("变更状态:", 43)
- examState.value = 43;
- cleanData();
- }
- }
- //测试完成后回退状态
- if (examState.value == 42) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value.filter((item: any) => {
- return item?.faceCheckStu?.student_id;
- })
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].faceCheckStu?.student_id && newList[i].examState == 3) {
- flag = true;
- } else {
- return false;
- }
- }
- if (flag) {
- console.log("变更状态:", 3)
- examState.value = 3;
- }
- }
- //如果全部状态为0就退出
- if (examState.value >= 0) {
- let flag = false;
- //只监听人脸识别的区
- let newList = testList.value;
- for (let i = 0; i < newList.length; i++) {
- if (newList[i] && newList[i].examState == 0) {
- flag = true;
- } else {
- return false;
- }
- }
- if (flag) {
- examState.value = 0;
- getExit();
- }
- }
- };
- /**
- * 准备开始
- */
- const getReady = () => {
- //停止播报;
- speckCancel()
- //正在识别的停止识别
- for (let i = 0; i < multipleItemRefList.value.length; i++) {
- if (testList.value[i].examState == 41) {
- multipleItemRefList.value[i].getStopFace()
- }
- }
- time.value.ready = 5;
- speckText(time.value.ready);
- timerManager.value.readyTimer = setInterval(() => {
- time.value.ready--;
- if (time.value.ready <= 0) {
- getClearTimer("readyTimer");
- getStartOneTest();
- } else {
- speckText(time.value.ready);
- }
- }, 1000);
- };
- /**
- * 将测试列表转为多行
- */
- const testListArr = computed(() => {
- let list: any = [];
- let num = 0;
- if (styleType.value == 1) {
- num = 3
- }
- if (styleType.value == 2) {
- num = 5
- }
- if (styleType.value == 3) {
- num = 10
- }
- let myLength = Math.ceil(testList.value.length / num);
- for (let i = 0; i < myLength; i++) {
- list[i] = [];
- for (let j = 0; j < testList.value.length; j++) {
- if (j >= i * num && j < (i + 1) * num) {
- list[i].push(testList.value[j])
- }
- }
- }
- return list;
- });
- onBeforeMount(() => {
- parameter.value = route.query;
- let project = parameter.value.project;
- let area = parameter.value.area;
- parameter.value.examId = `${project}_${area}`; //项目+区
- if (parameter.value.time) {
- time.value.testTime = parameter.value.time
- }
- time.value.countdownNum = time.value.testTime;
- let myInfo: any = localStorage.getItem("userInfo");
- userInfo.value = JSON.parse(myInfo);
- if (parameter.value.gesture == 'true') {
- parameter.value.gesture = true
- } else {
- parameter.value.gesture = false
- }
- testList.value = parameter.value.area.split(',').map((item: any, index: number) => {
- let obj = {
- area: item,
- itemNumber: index + 1
- }
- return obj;
- });
- //需要开始按钮的项目
- if (testList.value.length > 10) {
- needStart.value = true;
- }
- //展示样式控制
- if (testList.value.length <= 5) {
- styleType.value = 1;
- }
- if (testList.value.length > 5 && testList.value.length <= 10) {
- styleType.value = 2;
- }
- if (testList.value.length > 10) {
- styleType.value = 3;
- }
- })
- onMounted(() => {
- //加载WS
- let project = parameter.value.project;
- initWs({ parameter: parameter.value, testTime: time.value.testTime, version: "v2" }, (data: any) => {
- let index = testList.value.findIndex((item: any) => {
- let examId = `${project}_${item.area}`;
- return examId == data.exam_id;
- })
- multipleItemRefList.value[index]?.getMessage(data);
- });
- initSpeech();
- setTimeout(() => {
- //10秒还在0状态就算超时
- if (examState.value == 0) {
- getExit();
- }
- }, 10000);
- })
- onUnmounted(() => {
- getExit();
- })
- </script>
- <style scoped lang="scss">
- $waiPadding: 6.51rem;
- .main {
- width: calc(100% - ($waiPadding * 2));
- height: 78vh;
- padding-top: 10rem;
- margin: 0 auto;
- display: flex;
- overflow: hidden;
- flex-direction: column;
- .time {
- width: 20vh;
- height: 20vh;
- line-height: 20vh;
- border-radius: 50%;
- color: #FF9402;
- font-size: 8vh;
- text-align: center;
- background-image: url("@/assets/images/test/time.png");
- background-position: center;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- position: absolute;
- right: 50%;
- top: -4vh;
- margin-right: -10vh;
- font-family: 'Saira-BlackItalic';
- }
- }
- .mask {
- position: fixed;
- height: 100vh;
- width: 100vw;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.3);
- z-index: 998;
- }
- .confirmDiaBg {
- width: 100%;
- height: 100vh;
- position: fixed;
- left: 0;
- top: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 999;
- .confirmDiaWindow {
- width: 23.5%;
- height: 43.4%;
- border-radius: 29px;
- opacity: 1;
- background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
- text-align: center;
- display: flex;
- align-items: center;
- justify-content: center;
- position: fixed;
- .confirmDiaWindow-con {
- .pic {
- width: 22.3vh;
- height: 22.3vh;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- position: relative;
- margin: 0 auto 2vh auto;
- .shine {
- position: absolute;
- left: -5vh;
- top: 0;
- width: 5vh;
- height: 22.3vh;
- animation: shineani 3s infinite;
- -webkit-animation: shineani 3s infinite;
- z-index: 1;
- img {
- width: 100%;
- height: 100%;
- }
- }
- img {
- width: 100%;
- }
- }
- .pic2 {
- box-sizing: border-box;
- border: 0.44rem solid rgba(26, 41, 58, 0.6315);
- }
- .name {
- width: 100%;
- color: #1A293A;
- font-size: 2.21rem;
- }
- .name2 {
- padding: 0 0.3rem;
- border-radius: 1.1rem;
- 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);
- }
- }
- }
- }
- .footerBtn {
- width: 100%;
- padding: 0 calc(13.02rem /2);
- box-sizing: border-box;
- position: fixed;
- bottom: 3vh;
- display: flex;
- justify-content: end;
- .btn {
- width: 14.6vw;
- height: 6.1vh;
- line-height: 6.1vh;
- font-size: 3vh;
- color: #1A293A;
- text-align: center;
- border-radius: 1vh;
- cursor: pointer;
- background: radial-gradient(159% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
- box-shadow: 3px 6px 4px 1px rgba(0, 0, 0, 0.1874), inset 0px 1px 0px 2px rgba(255, 255, 255, 0.5577);
- &:hover {
- background: #8EFFA9;
- }
- }
- .startBtn {
- color: #ffffff;
- background: radial-gradient(159% 126% at 5% 93%, #F99F02 0%, #ED7905 100%);
- box-shadow: 3px 6px 4px 1px rgba(0, 0, 0, 0.1874), inset 0px 1px 0px 2px rgba(255, 255, 255, 0.5577);
- &:hover {
- background: #F99F02;
- }
- }
- }
- //列表样式写在此父组件里,子组件尽量减少个性化class和style,多样性以父组件控制类型
- ::v-deep(.testBox1) {
- $listMargin: 10vw;
- $listWidth: calc((100% - $listMargin) / 5);
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- .ul {
- width: 100%;
- height: 35vh;
- display: flex;
- .li {
- width: $listWidth;
- position: relative;
- .ready {
- position: absolute;
- height: 100%;
- width: 100%;
- display: flex;
- align-items: center;
- justify-items: center;
- img {
- width: 100%;
- }
- }
- .userInfo {
- width: 100%;
- height: 100%;
- border-radius: 1.6rem;
- background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
- text-align: center;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- margin-bottom: 3px;
- .userInfo-center {
- .pic {
- width: calc($listWidth - 1vw);
- height: calc($listWidth - 1vw);
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- margin: 0 auto 2vh auto;
- position: relative;
- .area {
- position: absolute;
- top: 6vh;
- color: #203C52;
- font-size: 5.2vh;
- line-height: 1;
- font-family: 'Saira-ExtraBold';
- text-align: center;
- }
- img {
- width: 100%;
- }
- }
- .pic2 {
- box-sizing: border-box;
- border: 0.44rem solid rgba(26, 41, 58, 0.6315);
- }
- .name {
- width: 100%;
- color: #1A293A;
- font-size: 2.21rem;
- }
- .name2 {
- padding: 0 0.3rem;
- border-radius: 1.1rem;
- 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);
- }
- }
- }
- .score {
- height: 18vh;
- line-height: 18vh;
- font-size: 12vh;
- font-family: 'Saira-BlackItalic';
- background: #ffffff;
- box-sizing: border-box;
- border: 0.55rem solid #13ED84;
- text-align: center;
- border-radius: 1.6rem;
- box-sizing: content-box;
- color: #1A293A;
- position: relative;
- &::before {
- content: "";
- width: 2vw;
- height: 2vw;
- display: block;
- position: absolute;
- top: -1.5vw;
- left: 50%;
- margin-left: -1vw;
- background-image: url("@/assets/images/home/test_icon.png");
- background-position: center;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- border-radius: 50%;
- flex-shrink: 0;
- transition: all 0.5s;
- }
- }
- }
- &:nth-child(1) {
- justify-content: space-between;
- }
- &:nth-child(2) {
- justify-content: space-evenly;
- .list {
- margin-left: calc($listMargin/4);
- margin-right: calc($listMargin/4);
- }
- }
- }
- .ready.ul {
- &:nth-child(1) {
- .li:nth-child(2) {
- &::after {
- content: "";
- position: absolute;
- height: 100%;
- width: 100%;
- display: block;
- background-image: url("@/assets/images/test/ready3.png");
- background-position: center center;
- background-repeat: no-repeat;
- background-size: 100%;
- }
- .score {
- display: none;
- }
- }
- }
- &:nth-child(2) {
- .list {
- &::after {
- content: "";
- position: absolute;
- height: 100%;
- width: 100%;
- display: block;
- background-image: url("@/assets/images/test/ready3.png");
- background-position: center center;
- background-repeat: no-repeat;
- background-size: 100%;
- top: -100%;
- }
- .score {
- display: none;
- }
- }
- }
- }
- .overlap.ul {
- transition: all 0.5s;
- &:nth-child(1) {
- margin-top: 5vh;
- .li {
- &::before {
- display: none
- }
- &::after {
- display: none
- }
- }
- }
- &:nth-child(2) {
- margin-top: -20vh;
- .li {
- &::before {
- display: none
- }
- &::after {
- display: none
- }
- }
- }
- }
- }
- ::v-deep(.testBox2) {
- $listMargin: 10vw;
- $listWidth: calc((100% - $listMargin) / 5);
- .ul {
- width: 100%;
- height: 34vh;
- display: flex;
- justify-content: space-between;
- margin-bottom: 4vh;
- .li {
- width: $listWidth;
- position: relative;
- height: 100%;
- border-radius: 3vh;
- padding: 0.6vw;
- background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- box-sizing: border-box;
- .userInfo {
- width: 100%;
- height: 100%;
- border-radius: 1.6rem;
- background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
- text-align: center;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- .userInfo-center {
- .pic {
- width: 12vw;
- height: 12vw;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- margin: 0 auto 2vh auto;
- position: relative;
- .area {
- position: absolute;
- top: 6vh;
- color: #203C52;
- font-size: 5.2vh;
- line-height: 1;
- font-family: 'Saira-ExtraBold';
- text-align: center;
- }
- img {
- width: 100%;
- }
- }
- .pic2 {
- box-sizing: border-box;
- border: 0.44rem solid rgba(26, 41, 58, 0.6315);
- }
- .name {
- width: 100%;
- color: #1A293A;
- font-size: 2.21rem;
- }
- }
- }
- .score {
- height: 14vh;
- line-height: 14vh;
- font-size: 9vh;
- font-family: 'Saira-BlackItalic';
- background: #ffffff;
- box-sizing: border-box;
- border: 0.55rem solid #13ED84;
- text-align: center;
- border-radius: 1.6rem;
- box-sizing: content-box;
- color: #1A293A;
- position: relative;
- display: none;
- &::before {
- content: "";
- width: 2vw;
- height: 2vw;
- display: block;
- position: absolute;
- top: -1.3vw;
- left: 50%;
- margin-left: -1vw;
- background-image: url("@/assets/images/home/test_icon.png");
- background-position: center;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- border-radius: 50%;
- flex-shrink: 0;
- transition: all 0.5s;
- }
- }
- }
- }
- .overlap {
- .li {
- .userInfo {
- height: 6.2vw;
- .userInfo-center {
- width: 100%;
- text-align: center;
- display: flex;
- align-items: center;
- cursor: pointer;
- .pic {
- width: 6.2vw;
- height: 6.2vw;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- position: relative;
- flex-shrink: 0;
- margin: 0;
- .area {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- line-height: 6.2vw;
- color: #ffffff;
- font-size: 2.5vw;
- font-family: 'Saira-ExtraBold';
- text-align: center;
- background: rgba(#000000, 0.4)
- }
- img {
- width: 100%;
- }
- }
- .pic2 {
- box-sizing: border-box;
- border: 2px solid rgba(26, 41, 58, 0.6315);
- }
- .name {
- width: 100%;
- color: #1A293A;
- font-size: 1.8rem;
- border-radius: 2vw;
- padding: 0.5rem 0;
- 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);
- }
- }
- }
- .score {
- display: block;
- }
- }
- }
- }
- ::v-deep(.testBox3) {
- $listMargin: 5vw;
- $listWidth: calc((100% - $listMargin) / 10);
- .ul {
- width: 100%;
- height: 14vh;
- display: flex;
- justify-content: space-evenly;
- margin-bottom: calc($listMargin / 10);
- .li {
- width: $listWidth;
- position: relative;
- height: 100%;
- border-radius: 5vh;
- background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
- .userInfo {
- padding: 2vh 0.6vw 0 0.6vw;
- margin-bottom: 0.8vh;
- .userInfo-center {
- text-align: center;
- display: flex;
- align-items: center;
- cursor: pointer;
- border-radius: 1.3vw;
- height: 2.6vw;
- background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.6571) 100%);
- border: 1px solid #FFFFFF;
- .pic {
- width: 2.6vw;
- height: 2.6vw;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- position: relative;
- flex-shrink: 0;
- .area {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- line-height: 2.6vw;
- color: #ffffff;
- font-size: 1.4vw;
- font-family: 'Saira-ExtraBold';
- text-align: center;
- background: rgba(#000000, 0.4)
- }
- img {
- width: 100%;
- }
- }
- .pic2 {
- box-sizing: border-box;
- border: 2px solid rgba(26, 41, 58, 0.6315);
- }
- .name {
- color: #1A293A;
- font-size: 1rem;
- margin-left: 0.5vw;
- }
- }
- }
- .score {
- font-size: 3rem;
- font-family: 'Saira-BlackItalic';
- text-align: center;
- color: #1A293A;
- line-height: 1;
- }
- }
- }
- }
- </style>
|