123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533 |
- <script setup lang="ts">
- import CpmdHeader from '@/components/CpmdHeader.vue';
- import { onMounted, onUnmounted, ref } from 'vue'
- import pdf3 from '../assets/cognize/goNogo.pdf'
- import pdf4 from '../assets/cognize/dtc.pdf'
- import { useRoute, useRouter } from 'vue-router';
- import { queryCognizeDetailApi } from '@/api/plan';
- import { userInfoStore } from '@/stores';
- const isPass = userInfoStore().isPass
- const router = useRouter()
- const route = useRoute()
- const flag = ref<string>('')
- const planName = ref<string>('')
- const planId = ref<string>('')
- const type = ref<string>('')
- const cognizeDetail = ref<any>({})
- // 查看PDF
- //刚进入页面就将高度设置为页面需要的
- onMounted(() => {
- //获取参数传过来的ID
- //获取参数传过来的planId
- flag.value = route.params.flag as string;
- planId.value = route.params.planId as string
- planName.value = route.params.planName as string
- type.value = route.params.type as string
- //根据flag 查询认知任务详情
- //进到界面开始轮询
- if (type.value == '1') {
- queryScaleDetail()
- }
- })
- const queryScaleDetail = async () => {
- //根据flag查询量表详情
- let res: any = await queryCognizeDetailApi(flag.value)
- cognizeDetail.value = res.data
- }
- const centerDialogVisible = ref<boolean>(false)
- const viewPDF = () => {
- centerDialogVisible.value = true
- }
- // vue3+vite 实现动态加载图片
- const requireImg = (name: string) => {
- // return new URL(`${path}`, import.meta.url).href
- // ../assets/cognize/goNogo.pdf
- return new URL(`../assets/cognize/${name}.pdf`, import.meta.url).href
- }
- const startCog = (val: number) => {
- router.push(
- {
- name: 'shapeIntuitionRandom',
- params: { planId: planId.value, planName: planName.value, flag: flag.value, flagName: cognizeDetail.value.name, formalTest: val }
- })
- // if (num.value == '3') {
- // router.push({ name: 'cognizeGoNoGo', params: { currentType: val } })
- // } else if (num.value == '4') {
- // router.push({ name: 'cognizeFaceDot', params: { currentType: val } })
- // }
- }
- //界面销毁函数
- //轮旋切换页面的方法
- //退出页面销毁 方法
- onUnmounted(() => {
- })
- </script>
- <template>
- <div class="home_header_out" ref="homeHeaderOut">
- <div class=" home_header_inner">
- <CpmdHeader />
- <div style="text-align: center;">
- <!-- <img class="xlts_img" style="margin-top:20px" src="../assets/home/other_text.png" /> -->
- </div>
- </div>
- <div class="kply">
- <div class="kply_inner">
- <div style="padding :20px 40px">
- <div class="cognize_title">
- {{ cognizeDetail.name }}
- </div>
- <div class="cognize_img_out">
- <!-- <img src="../assets/kepu/czscz_default.png" width=" 100px" style="margin-right: 20px;" /> -->
- <!-- <img src="../assets/cognize/c2.png" v-show="num == '4'" width="100px"
- style="margin-right: 20px;" /> -->
- <div class="cognize_des">
- <span class="cpjs">测评介绍:</span>
- <span class="cpjs_detail">{{ cognizeDetail.testExplain }}</span>
- </div>
- </div>
- <div class="cpll">
- <span class="cpll_title">理论:</span>
- <span class="cpll_detail">{{ cognizeDetail.theory }}</span>
- </div>
- <div class="czsm">
- <span class="czsm_title">操作说明:</span>
- <span class="czsm_detail">
- {{ cognizeDetail.description }}
- {{ cognizeDetail.testDescription }}
- </span>
- </div>
- <div class="cognize_title2"> {{ cognizeDetail.name }}演示视频:</div>
- <div class="cognize_video">
- <!-- poster="../assets/cognize/bg_ty.png" -->
- <video width="60%" height="100%" controls style="border-radius: 40px;">
- <source src="../assets/cognize/yd.mp4" type="video/mp4">
- <!-- <source src="movie.ogg" type="video/ogg"> -->
- 您的浏览器不支持 video 标签。
- </video>
- </div>
- <div class="scale_button">
- <div class="scale_button_inner" v-show="!isPass">
- <div class="scale_button_self" @click="startCog(0)">练习测试
- </div>
- </div>
- <div :span="12" class="scale_button_inner" v-show="isPass">
- <div class="scale_button_self" @click="startCog(1)">开始测试</div>
- </div>
- </div>
- <div class="pdf_op">
- <div class="pdf_sc">
- <img @click="viewPDF" src="../assets/cognize/pdf.png" width="30px"
- style="margin-right:10px" />
- <div @click="viewPDF">测试手册</div>
- </div>
- <div class="pdf_sc">
- <!-- <img @click="viewPDF" width="40px" src="../assets/cognize/yan.png">
- <div @click="viewPDF" class="view">预览</div> -->
- </div>
- </div>
- <div class="reference_cla" v-if="cognizeDetail.reference">
- <div class="reference_title">参考文献:</div>
- <div class="reference_detail" v-for="item, index in cognizeDetail.reference.split('//')"
- :key="item">
- <div>[{{ index + 1 }}] </div>
- <div> {{ item }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-dialog v-model="centerDialogVisible" title="预览" width="90%" top="2vh" center>
- <span>
- <!-- :src="requireImg('../assets/cognize/goNogo.pdf')" -->
- <!-- <embed width="100%" height=500px v-show="num == '3'" src='../assets/cognize/goNogo.pdf'>
- </embed> -->
- <!-- <embed width="100%" height=500px v-show="num == '3'" :src="pdf3">
- </embed> -->
- <embed width="100%" height=700px :src="requireImg('yd')">
- </embed>
- <!-- <embed width="100%" height=500px v-show="num == '4'" :src="pdf4">
- </embed> -->
- </span>
- </el-dialog>
- </div>
- <!-- <div class="cognize_real_out">
- 我是认知任务
- </div> -->
- </template>
- <style lang="scss" scoped>
- .cognize_real_out {
- background-color: #b64d4d;
- color: #41348a;
- position: fixed;
- z-index: 100;
- top: 0;
- width: 100vw;
- height: 100vh;
- }
- .home_header_out {
- padding-bottom: 60px;
- width: 100%;
- min-width: 1200px;
- background-image: url('../assets/home/bg_ty.png');
- background-repeat: no-repeat;
- background-size: contain;
- background-color: #B3F1DA; //估计是需要动态
- .home_header_inner {
- min-height: 1;
- left: 0;
- right: 0;
- margin: auto;
- width: 1200px;
- .xlts_img {
- height: 40px;
- }
- }
- .kply {
- width: 100%;
- margin-top: 20px;
- .kply_inner {
- min-height: 500px;
- left: 0;
- right: 0;
- margin: auto;
- width: 860px;
- // padding: 20px 20px;
- background-color: #ffffff;
- border-radius: 40px;
- .reference_cla {
- margin-top: 10px;
- .reference_title {
- font-size: 14px;
- color: #a9a9a9;
- line-height: 24px;
- }
- .reference_detail {
- font-size: 14px;
- color: #a9a9a9;
- line-height: 24px;
- letter-spacing: 3px;
- display: flex;
- }
- }
- .cpll {
- margin-top: 10px;
- .cpll_title {
- font-size: 14px;
- color: #48D68E;
- font-weight: 700;
- }
- .cpll_detail {
- font-size: 14px;
- letter-spacing: 3px;
- line-height: 24px;
- }
- }
- .czsm {
- margin-top: 10px;
- .czsm_title {
- color: #48D68E;
- font-weight: 700;
- line-height: 24px;
- font-size: 14px;
- }
- .czsm_detail {
- line-height: 24px;
- font-size: 14px;
- letter-spacing: 3px;
- }
- }
- .cognize_title {
- font-size: 20px;
- letter-spacing: 3px;
- font-weight: 700;
- margin-bottom: 10px;
- }
- .cognize_title2 {
- font-size: 20px;
- letter-spacing: 3px;
- // font-weight: 700;
- margin-top: 10px;
- margin-bottom: 20px;
- }
- .cognize_img_out {
- display: flex;
- justify-content: center;
- .cognize_des {
- letter-spacing: 2px;
- line-height: 20px;
- font-size: 16px;
- .cpjs {
- color: #48D68E;
- font-weight: 700;
- font-size: 14px;
- line-height: 24px;
- }
- .cpjs_detail {
- line-height: 24px;
- letter-spacing: 3px;
- font-size: 14px;
- }
- }
- }
- .cognize_video {
- display: flex;
- justify-content: center;
- }
- .pdf_op {
- margin-top: 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .pdf_sc {
- display: flex;
- // justify-content: space-between;
- align-items: center;
- cursor: pointer;
- .view {
- margin-left: 10px;
- color: #3E43FF;
- }
- }
- }
- .scale_button {
- margin-top: 30px;
- margin-bottom: 20px;
- display: flex;
- justify-content: space-around;
- .scale_button_inner {
- text-align: center;
- display: flex;
- justify-content: center;
- .scale_button_self {
- border-radius: 12px;
- border: 3px solid #48D68E;
- color: #ffffff;
- background-color: #000000;
- margin-right: 20px;
- padding: 10px 40px;
- cursor: pointer;
- display: flex;
- align-items: center;
- font-size: 16px;
- }
- }
- }
- }
- }
- }
- .home_mid {
- // background-color: blanchedalmond;
- width: 1200px;
- left: 0;
- right: 0;
- margin: auto;
- margin-top: 40px;
- // position: relative;
- .kepu_title {
- text-align: center;
- font-size: 50px;
- color: #111111;
- line-height: 95px;
- // width: 100%;
- // left: 0;
- // right: 0;
- // margin: auto
- }
- .kepu_title_sub {
- margin-top: 30px;
- text-align: center;
- font-size: 28px;
- color: #48D68E;
- line-height: 26px;
- }
- .man1_group {
- margin-top: 60px;
- height: 100%;
- display: flex;
- .man1 {
- position: relative;
- width: 327px;
- // height: 100%;
- // height: 100%
- .man1_img {
- position: absolute;
- bottom: 0;
- /* bottom: 0px; */
- /* height: auto; */
- width: 100%;
- left: 100px
- }
- }
- .des {
- border: #48D68E solid 5px;
- border-radius: 40px;
- padding: 20px;
- letter-spacing: 6px;
- flex: 1;
- .des_inner {
- border: 1px dashed #48D68E;
- border-radius: 40px;
- padding-bottom: 40px;
- padding-top: 30px;
- padding-left: 100px;
- padding-right: 20px;
- letter-spacing: 6px;
- font-weight: normal;
- font-size: 24px;
- color: #333333;
- line-height: 40px;
- }
- }
- }
- .man2_group {
- margin-top: 60px;
- height: 100%;
- display: flex;
- .man2 {
- position: relative;
- width: 327px;
- // height: 100%;
- // height: 100%
- .man2_img {
- position: absolute;
- bottom: 0;
- /* bottom: 0px; */
- /* height: auto; */
- width: 100%;
- left: -100px
- }
- }
- .des2 {
- border: #48D68E solid 5px;
- border-radius: 40px;
- padding: 20px;
- letter-spacing: 6px;
- flex: 1;
- .des2_inner {
- border: 1px dashed #48D68E;
- border-radius: 40px;
- padding-bottom: 40px;
- padding-top: 30px;
- padding-left: 20px;
- padding-right: 100px;
- letter-spacing: 6px;
- font-weight: normal;
- font-size: 24px;
- color: #333333;
- line-height: 40px;
- }
- }
- }
- .get_more {
- text-align: center;
- img {
- width: 300px;
- margin-top: 60px;
- margin-bottom: 60px;
- }
- }
- }
- // .home_footer_out {
- // width: 100%;
- // background-color: #000000;
- // }</style>
|