123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499 |
- <script setup lang="ts">
- import CpmdHeader from '@/components/CpmdHeader.vue';
- import { onMounted, onUnmounted, ref } from 'vue'
- import { Check } from '@element-plus/icons-vue'
- import { number } from 'echarts';
- import { ElMessage } from 'element-plus';
- import { useRouter, useRoute } from 'vue-router';
- const router = useRouter()
- const route = useRoute()
- //持久化设置 菜单状态
- // import { menuStatusStore } from '@/stores'
- // const menuStatus = menuStatusStore();
- // menuStatus.saveActiveIndex('3')
- //当前量表是否已经提交
- const isCompleted = ref<boolean>(true)
- const flag = ref<string>('')
- const flagName = ref<string>('')
- const planId = ref<string>('')
- const planName = ref<string>('')
- const num = ref<string>('')
- //当前题的对象
- //点击跳转到下一列表
- const subScaleData = () => {
- }
- //返回计划列表
- const goBackList = () => {
- router.push({ name: 'plan' })
- }
- //跳转到下一个任务
- const nextTask = () => {
- if (num.value == '1') {
- router.push({
- name: 'scale', params: {
- planId: planId.value,
- planName: planName.value,
- flag: flag.value,
- flagName: flagName.value,
- num: '2'
- }
- })
- }
- if (num.value == '2') {
- router.push({
- name: 'cognize', params: {
- planId: planId.value,
- planName: planName.value,
- flag: flag.value,
- flagName: flagName.value,
- num: '3'
- }
- })
- }
- if (num.value == '3') {
- router.push({
- name: 'cognize', params: {
- planId: planId.value,
- planName: planName.value,
- flag: flag.value,
- flagName: flagName.value,
- num: '4'
- }
- })
- }
- if (num.value == '4') {
- //跳转到测试记录页面
- router.push({
- name: 'testRecord'
- })
- }
- }
- //跳转到下一个任务
- //刚进入页面就将高度设置为页面需要的
- onMounted(() => {
- flag.value = route.params.flag as string;
- planId.value = route.params.planId as string
- planName.value = route.params.planName as string
- flagName.value = route.params.flagName as string
- num.value = route.params.num as string
- //进到界面开始轮询
- })
- //界面销毁函数
- //轮旋切换页面的方法
- //退出页面销毁 方法
- onUnmounted(() => {
- })
- </script>
- <template>
- <div class="home_header_out">
- <div class=" home_header_inner">
- <CpmdHeader />
- <div class="report_top">
- <div class="report_jt">
- <span v-show="isCompleted">心灵万花筒测试完成</span>
- <span v-show="isCompleted" class="des">以上测试已完成,请选择进行下一个测试或返回任务。</span>
- </div>
- </div>
- </div>
- <div class="kply">
- <div class="kply_inner" :style="{ border: isCompleted ? '8px solid #ffffff' : '8px solid #B2F2D2' }">
- <div style="padding :20px 40px">
- <div v-show="isCompleted" class="finish_calss">
- <div class="finish_img">
- <img width="30%" src="../assets/scale/complete.png" />
- <div class="finish_font">测试已完成</div>
- </div>
- <div class="scale_button">
- <el-row>
- <el-col :span="12" class="scale_button_inner">
- <div class="scale_button_self" @click="goBackList">返回计划列表
- </div>
- </el-col>
- <el-col :span="12" class="scale_button_inner">
- <div class="scale_button_self" v-show="num != '4'" @click="nextTask">
- 下一个任务
- </div>
- <div class="scale_button_self" v-show="num == '4'" @click="nextTask">
- 下一个任务
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <style lang="scss" scoped>
- :deep(.el-progress-bar__outer) {
- background-color: #ffffff;
- border-radius: 100px;
- height: 6px;
- overflow: hidden;
- position: relative;
- vertical-align: middle;
- }
- :deep(.el-radio-group) {
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- font-size: 0;
- flex-direction: column;
- }
- :deep(.el-radio-button) {
- display: inline-block;
- outline: none;
- position: relative;
- width: 80% !important;
- }
- :deep(.el-radio-button__inner) {
- width: 100%;
- border-radius: 40px !important;
- margin-top: 30px;
- border: 10px solid #B2F2D2;
- border-left: 10px solid #B2F2D2 !important;
- padding: 20px 20px;
- font-size: 20px;
- font-weight: 700;
- text-align: left;
- }
- :deep(.el-radio-button__inner:hover) {
- width: 100%;
- border-radius: 40px !important;
- margin-top: 30px;
- border: 10px solid #B2F2D2;
- border-left: 10px solid #B2F2D2 !important;
- padding: 20px 20px;
- font-size: 20px;
- font-weight: 700;
- text-align: left;
- color: #000000;
- background-color: #48D68E;
- color: #ffffff;
- }
- :deep().el-radio-button__original-radio:checked+.el-radio-button__inner {
- background-color: #48D68E;
- border-color: #B2F2D2;
- box-shadow: 0 0 0 0 var(--el-radio-button-checked-border-color, var(--el-color-primary));
- color: var(--el-radio-button-checked-text-color, var(--el-color-white));
- }
- .home_header_out {
- // position: relative;
- 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: #FAFAFA; //估计是需要动态
- //获取屏幕宽度home_header_out 这个div的宽度--然后宽度*1000再除1920即为当前div的宽度
- .home_header_inner {
- min-height: 1;
- left: 0;
- right: 0;
- margin: auto;
- // height: 100px;
- width: 1200px;
- .report_top {
- margin-top: 50px;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 40px;
- .xlts_img {
- margin-right: 100px;
- width: 200px;
- }
- .report_jt {
- display: flex;
- flex-direction: column;
- font-size: 50px;
- font-weight: 700;
- letter-spacing: 3px;
- .des {
- color: #888888;
- // opacity: 0.4;
- font-size: 20px;
- letter-spacing: 0px;
- margin-top: 10px;
- }
- }
- }
- }
- .kply {
- width: 100%;
- margin-top: 40px;
- // background-color: #FAFAFA;
- .kply_inner {
- // border: 8px solid #B2F2D2;
- min-height: 500px;
- left: 0;
- right: 0;
- margin: auto;
- width: 1200px;
- // padding: 20px 20px;
- background-color: #ffffff;
- border-radius: 40px;
- .scale_title {
- margin-top: 20px;
- font-size: 35px;
- letter-spacing: 4px;
- line-height: 60px;
- .scale_radio_group {
- display: flex;
- flex-direction: column;
- }
- }
- .scale_button {
- margin-top: 60px;
- margin-bottom: 20px;
- .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 90px;
- cursor: pointer;
- display: flex;
- align-items: center;
- font-size: 24px;
- }
- }
- }
- .finish_calss {
- display: flex;
- flex-direction: column;
- .finish_img {
- margin-top: 60px;
- display: flex;
- flex-direction: column;
- align-items: center;
- .finish_font {
- margin-top: 40px;
- font-size: 30px;
- margin-bottom: 100px;
- }
- }
- }
- }
- }
- }
- .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>
|