|
@@ -0,0 +1,438 @@
|
|
|
+<script setup lang="ts">
|
|
|
+//引入echarts
|
|
|
+import * as echarts from 'echarts'
|
|
|
+
|
|
|
+
|
|
|
+import CpmdHeader from '@/components/CpmdHeader.vue';
|
|
|
+import { onMounted, onUnmounted, reactive, ref } from 'vue'
|
|
|
+
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
+
|
|
|
+//雷达图
|
|
|
+const echarts_ld = ref<any>()
|
|
|
+const option = reactive({
|
|
|
+ title: {
|
|
|
+ // text: 'Basic Radar Chart'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ // data: ['Allocated Budget', 'Actual Spending']
|
|
|
+ },
|
|
|
+ radar: {
|
|
|
+ shape: 'square', //设置雷达图形状,值有circle、square,默认为方形
|
|
|
+ splitNumber: 3, // 雷达图圈数设置
|
|
|
+ // shape: 'circle',
|
|
|
+ indicator: [
|
|
|
+ { name: '阳光指数', max: 100 },
|
|
|
+ { name: '社交能力', max: 100 },
|
|
|
+ { name: '爱情观', max: 100 },
|
|
|
+ { name: '人生观', max: 100 },
|
|
|
+ { name: '自律能力', max: 100 },
|
|
|
+ { name: '应变能力', max: 100 }
|
|
|
+ ],
|
|
|
+ name: { //修改indicator文字的颜色
|
|
|
+ textStyle: {
|
|
|
+ color: "#999999"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 设置雷达图中间射线的颜色
|
|
|
+ axisLine: {
|
|
|
+ lineStyle: {
|
|
|
+ color: '#FFBA92',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // splitArea: { //设置图表颜色,show的值为true
|
|
|
+ // show: true,
|
|
|
+ // areaStyle: {
|
|
|
+ // // color:"#c1ddf8", //一般设置方式
|
|
|
+ // //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
|
|
|
+ // //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
|
|
|
+ // //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
|
|
|
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 0, [
|
|
|
+ // { offset: 1, color: '#F7E1DE' }, // 0% 处的颜色
|
|
|
+ // { offset: 0, color: '#FF1E00' }// 100% 处的颜色
|
|
|
+ // ], false)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ splitArea: {
|
|
|
+ areaStyle: {
|
|
|
+ color: {
|
|
|
+ type: 'radial', // linear 线性渐变 radial径向渐变
|
|
|
+ x: 0.4, // 0.5为正中心,如果小于渐变中心靠左
|
|
|
+ y: 0.5, // 0.5为正中心,如果小于渐变中心靠上
|
|
|
+ r: 1,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0, color: '#f16e6e' // 0% 处的颜色rgba(247, 215, 211, 1)
|
|
|
+ }, {
|
|
|
+ offset: 1, color: 'rgba(247, 225, 222, 1)' // 100% 处的颜色rgba(247, 225, 222, 1)
|
|
|
+ }],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //网格颜色设置
|
|
|
+ splitLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ width: 1,
|
|
|
+ color: '#FFBA92',
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'Budget vs spending',
|
|
|
+ type: 'radar',
|
|
|
+ symbolSize: 6,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: [90, 10, 30, 20, 10, 60],
|
|
|
+ itemStyle: { //该数值区域样式设置
|
|
|
+ normal: {
|
|
|
+ color: 'red', //背景颜色,还需设置areaStyle //修改线条颜色
|
|
|
+ lineStyle: {
|
|
|
+ color: '#FF1E00', //边框颜色
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // name: 'Actual Spending'
|
|
|
+ areaStyle: {
|
|
|
+ //阴影区域背景
|
|
|
+ // color: 'rgba(255, 228, 52, 0.6)'
|
|
|
+ color: 'rgba(255,30,0,0.6)'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+})
|
|
|
+
|
|
|
+const route = useRoute()
|
|
|
+//此处应该是唯一的报告ID
|
|
|
+const id = ref<string>('')
|
|
|
+//持久化设置 菜单状态
|
|
|
+//刚进入页面就将高度设置为页面需要的
|
|
|
+onMounted(() => {
|
|
|
+ console.log(route.params)
|
|
|
+ const params = route.params
|
|
|
+
|
|
|
+ id.value = params.id as string
|
|
|
+ //进到界面开始轮询
|
|
|
+
|
|
|
+ const myChart = echarts.init(echarts_ld.value)
|
|
|
+ myChart.setOption(option);
|
|
|
+})
|
|
|
+//界面销毁函数
|
|
|
+
|
|
|
+//跳转页面切换页面
|
|
|
+const viewReport = () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//轮旋切换页面的方法
|
|
|
+
|
|
|
+//退出页面销毁 方法
|
|
|
+onUnmounted(() => {
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="home_header_out">
|
|
|
+ <div class=" home_header_inner">
|
|
|
+ <CpmdHeader />
|
|
|
+ <div class="report_top">
|
|
|
+ <div class="report_jt">
|
|
|
+ <span>你真棒!测评已完成</span>
|
|
|
+ <span>下面是结果解析:</span>
|
|
|
+ </div>
|
|
|
+ <img class="xlts_img" src="../assets/report/report_top.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="kply">
|
|
|
+ <div class="kply_inner">
|
|
|
+ <div style="padding: 20px 40px;">
|
|
|
+ <div class="report_totol_score">
|
|
|
+ <div class="report_bei">
|
|
|
+ <img height="200xp" src="../assets/report/bei.png" />
|
|
|
+ <div class="score">360</div>
|
|
|
+ </div>
|
|
|
+ <div class="totol_result_des">
|
|
|
+ 结论:潜力无限,未来因挑战而更加精彩。你有着巨大的成长空间,只要勇于面对挑战,不断努力,你的人生必将绽放出璀璨的光芒。
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="report_echarts_out">
|
|
|
+ <div ref="echarts_ld" style="width:400px;height:300px">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+</template>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.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;
|
|
|
+
|
|
|
+ .xlts_img {
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .report_jt {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ font-size: 50px;
|
|
|
+ font-weight: 700;
|
|
|
+ letter-spacing: 3px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .kply {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 100px;
|
|
|
+ // background-color: #FAFAFA;
|
|
|
+
|
|
|
+ .kply_inner {
|
|
|
+ // padding: 20px 20px;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 1200px;
|
|
|
+ min-height: 500px;
|
|
|
+
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 40px;
|
|
|
+
|
|
|
+ .report_totol_score {
|
|
|
+ margin-top: 60px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .report_bei {
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ // background-color: #111111;
|
|
|
+
|
|
|
+
|
|
|
+ .score {
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
+ text-align: center;
|
|
|
+ // height: 120px;
|
|
|
+ // background-color: #ffffff;
|
|
|
+ // width: 10px;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ top: -40px;
|
|
|
+ bottom: 0;
|
|
|
+ margin: auto;
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .totol_result_des {
|
|
|
+ font-size: 30px;
|
|
|
+ margin-left: 50px;
|
|
|
+ letter-spacing: 3px;
|
|
|
+ line-height: 50px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .report_echarts_out {
|
|
|
+ margin-top: 100px;
|
|
|
+ background-color: #F7F7F7;
|
|
|
+ border-radius: 40px;
|
|
|
+ // height: 200px;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+.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>
|