123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- <template>
- <view class="bg">
- <view class="introduce">
- <image src="https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/introduce.png" mode="widthFix">
- </image>
- </view>
- <view class="process"></view>
- <view class="result_box">
- <view class="role_medal">
- <image v-if="roleList[role]" :src="roleList[role].medal" mode="widthFix"></image>
- </view>
- <view class="score_bar">
- <view class="score_title"><text>得分:</text><text class="score_num">{{scoreNum}}</text></view>
- <view class="score_percentage">
- <view class="score_wrap">
- <image class="process_bar" :style="{'left': percentage}"
- src="https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/process_bar.png"
- mode="widthFix"></image>
- </view>
- <view class="score_text">{{parseInt(scoreNum)}}/{{parseInt(maxScore)}}</view>
- </view>
- <view class="score_explain">注: 得分越高,情商水平越高</view>
- </view>
- <view class="role_name">
- <image v-if="roleList[role]" :src="roleList[role].name" mode="heightFix"></image>
- </view>
- <view class="role_img">
- <image v-if="roleList[role]" :src="roleList[role].img" mode="heightFix"></image>
- </view>
- </view>
- <view class="result_box2">
- <image class="fx_title" src="https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/fx_title.png"
- mode="widthFix">
- </image>
- <view class="result_box_r">
- <view class="c_item" v-for="item in (segmentation(improvementSuggestions))">
- <view class="list_style_bg"></view>
- <text style="flex: 1;">{{item}}</text>
- </view>
- </view>
- </view>
- <view class="report_desc">
- <view class="desc_title">报告阅读说明</view>
- <view class="stext">谢谢您的参与,阅读本报告时,请注意以下内容:</view>
- <view style="display: flex;">
- <view class="list_mark">·</view>
- <view class="desc_txt">本结果仅供参考,不可作为临床诊断的依据;</view>
- </view>
- <view style="display: flex;">
- <view class="list_mark">·</view>
- <view class="desc_txt">如对报告有不理解的地方,建议咨询专业人员;</view>
- </view>
- <view style="display: flex;">
- <view class="list_mark">·</view>
- <view class="desc_txt">如结果与你自己或他人的感受有出入,可回忆在测试时是否有事情影响到你,或自己回答时是否有所顾虑。</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getRecordById
- } from "@/api/index.js";
- import {
- photoUrl
- } from "@/common/config.js"
- const photoUrls = `${photoUrl}api/show?filePath=./webo`
- console.log(photoUrl);
- export default {
- data() {
- return {
- isChecked: true,
- isShake: false,
- scaleDetail: {},
- questionList: [],
- currentQuestion: {},
- currentAnswerList: [],
- currentIndex: 0,
- userAnswerList: [],
- resultId: '',
- isLoading: false,
- isDisbale: false,
- roleList: {
- '坚韧黑铁': {
- name: `${photoUrls}/EQtest/role/role_name1.png`,
- img: `${photoUrls}/EQtest/role/role_img1.png`,
- medal: `${photoUrls}/EQtest/role/role_medal1.png`
- },
- '英勇黄铜': {
- name: `${photoUrls}/EQtest/role/role_name2.png`,
- img: `${photoUrls}/EQtest/role/role_img2.png`,
- medal: `${photoUrls}/EQtest/role/role_medal1.png`
- },
- '英勇黄铜+': {
- name: `${photoUrls}/EQtest/role/role_name3.png`,
- img: `${photoUrls}/EQtest/role/role_img2.png`,
- medal: `${photoUrls}/EQtest/role/role_medal2.png`
- },
- '不屈白银': {
- name: `${photoUrls}/EQtest/role/role_name4.png`,
- img: `${photoUrls}/EQtest/role/role_img3.png`,
- medal: `${photoUrls}/EQtest/role/role_medal3.png`
- },
- '不屈白银+': {
- name: `${photoUrls}/EQtest/role/role_name5.png`,
- img: `${photoUrls}/EQtest/role/role_img3.png`,
- medal: `${photoUrls}/EQtest/role/role_medal3.png`
- },
- '荣耀黄金': {
- name: `${photoUrls}/EQtest/role/role_name6.png`,
- img: `${photoUrls}/EQtest/role/role_img4.png`,
- medal: `${photoUrls}/EQtest/role/role_medal4.png`
- },
- '荣耀黄金+': {
- name: `${photoUrls}/EQtest/role/role_name7.png`,
- img: `${photoUrls}/EQtest/role/role_img4.png`,
- medal: `${photoUrls}/EQtest/role/role_medal4.png`
- },
- '华贵铂金': {
- name: `${photoUrls}/EQtest/role/role_name8.png`,
- img: `${photoUrls}/EQtest/role/role_img5.png`,
- medal: `${photoUrls}/EQtest/role/role_medal5.png`
- },
- '华贵铂金+': {
- name: `${photoUrls}/EQtest/role/role_name9.png`,
- img: `${photoUrls}/EQtest/role/role_img5.png`,
- medal: `${photoUrls}/EQtest/role/role_medal5.png`
- },
- '流光翡翠': {
- name: `${photoUrls}/EQtest/role/role_name10.png`,
- img: `${photoUrls}/EQtest/role/role_img6.png`,
- medal: `${photoUrls}/EQtest/role/role_medal6.png`
- },
- '璀璨钻石': {
- name: `${photoUrls}/EQtest/role/role_name11.png`,
- img: `${photoUrls}/EQtest/role/role_img7.png`,
- medal: `${photoUrls}/EQtest/role/role_medal7.png`
- },
- '超凡大师': {
- name: `${photoUrls}/EQtest/role/role_name12.png`,
- img: `${photoUrls}/EQtest/role/role_img8.png`,
- medal: `${photoUrls}/EQtest/role/role_medal8.png`
- },
- '傲世宗师': {
- name: `${photoUrls}/EQtest/role/role_name13.png`,
- img: `${photoUrls}/EQtest/role/role_img9.png`,
- medal: `${photoUrls}/EQtest/role/role_medal9.png`
- },
- '最强王者': {
- name: `${photoUrls}/EQtest/role/role_name14.png`,
- img: `${photoUrls}/EQtest/role/role_img10.png`,
- medal: `${photoUrls}/EQtest/role/role_medal10.png`
- }
- },
- resultId: '',
- role: '',
- improvementSuggestions: '',
- scoreNum: 0,
- maxScore: 0,
- minScore: 0
- }
- },
- onLoad(options) {
- if (options && options.resultId) {
- this.resultId = options.resultId
- this.getScaleTestResults(this.resultId);
- }
- },
- computed: {
- percentage() {
- return (((this.scoreNum / this.maxScore) * 318) - 318) + 'rpx'
- }
- },
- methods: {
- getScaleTestResults(id) {
- let _this = this;
- _this.$request
- .get({
- url: `${getRecordById}?id=${id}`,
- loadingTip: "加载中...",
- data: {},
- })
- .then(
- (res) => {
- console.log('222:', new Date().getTime());
- console.log("----测试结果--->", res);
- if (res.code == 200) {
- _this.testResult = JSON.parse(res.data?.userRecordEntity?.testResult)[0];
- _this.role = _this.testResult.newTableContext.result[0].symptom;
- _this.improvementSuggestions = _this.testResult.newTableContext.result[0]
- .improvementSuggestions;
- _this.scoreNum = _this.testResult.newTableContext.result[0].score;
- _this.maxScore = _this.testResult.newTableContext.result[0].maxScore;
- } else if (res.code == 401) {} else {
- (res) => {
- console.log("世界上绝对绝对绝对绝对绝对的", res);
- }
- }
- })
- },
- getNameUrl() {
- console.log(`${photoUrls}/EQtest/role/role_name1.png`)
- return `${photoUrls}/EQtest/role/role_name1.png`
- },
- segmentation(str) {
- return str.split('\n');
- }
- }
- }
- </script>
- <style scoped>
- .bg {
- width: 100%;
- min-height: 1900rpx;
- background: url(https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/test_result_bg.png) no-repeat top, url(https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/test_result_bg2.png) repeat center 1498rpx;
- background-size: 100% auto;
- padding-bottom: 40rpx;
- overflow: hidden;
- }
- .role_name {
- position: relative;
- margin: 40rpx 0 0 40rpx;
- z-index: 2;
- }
- .role_name image {
- height: 621rpx;
- }
- .role_img {
- position: absolute;
- top: 310rpx;
- right: -20rpx;
- }
- .role_img image {
- height: 570rpx;
- }
- .result_box {
- width: 706rpx;
- min-height: 956rpx;
- padding-bottom: 28rpx;
- background: url(https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/result_bg_w.png) no-repeat top;
- background-size: 100% auto;
- overflow: hidden;
- margin: 18rpx auto;
- border-radius: 33rpx;
- position: relative;
- }
- .result_box2 {
- width: 706rpx;
- min-height: 548rpx;
- padding-bottom: 28rpx;
- background: #E5FAFA;
- overflow: hidden;
- margin: 0 auto;
- border-radius: 33rpx;
- position: relative;
- }
- .role_medal {
- position: absolute;
- right: 50rpx;
- top: 0;
- }
- .role_medal image {
- width: 155rpx;
- }
- .result_box_r {
- box-sizing: border-box;
- width: 660rpx;
- min-height: 283rpx;
- padding: 26rpx;
- margin: 0 auto 0;
- background: #FFFFFF url(https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/result_bg_r.png) no-repeat top;
- background-size: 100% auto;
- border-radius: 33rpx;
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: normal;
- font-size: 32rpx;
- color: #333333;
- line-height: 1.8;
- text-align: justify;
- letter-spacing: 3rpx;
- }
- .c_item {
- display: flex;
- align-items: flex-start;
- text-align: justify;
- letter-spacing: 2px;
- margin-bottom: 16rpx;
- }
- .list_style_bg {
- width: 16rpx;
- height: 16rpx;
- background: #fd7884;
- background-size: 100% auto;
- border-radius: 50%;
- margin: 17rpx 10rpx 0 0;
- }
- .score_title {
- display: flex;
- align-items: center;
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: bolder;
- font-size: 36rpx;
- color: #333333;
- line-height: 31rpx;
- margin: 110rpx 0 25rpx 32rpx;
- }
- .score_num {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: bold;
- font-size: 81rpx;
- color: #FF9C00;
- line-height: 51rpx;
- /* text-stroke: 4px #FFFFFF;
- background: linear-gradient(269deg, #FF443D 0%, #FF9C00 100%);
- -webkit-text-stroke: 4px #FFFFFF;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent; */
- }
- .score_percentage {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 420rpx;
- height: 46rpx;
- background: url(https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/score_percentage_bg.png) no-repeat center;
- background-size: cover;
- margin: 4rpx 0 0 72rpx;
- }
- .score_wrap {
- width: 318rpx;
- height: 32rpx;
- margin: 0 0 0 12rpx;
- position: relative;
- overflow-x: hidden;
- border-radius: 25rpx;
- }
- .process {
- overflow: hidden;
- }
- .process_bar {
- width: 318rpx;
- position: absolute;
- left: -100rpx;
- }
- .score_text {
- font-family: Alibaba PuHuiTi 2.0;
- font-weight: normal;
- font-size: 18rpx;
- color: #FFFFFF;
- line-height: 16rpx;
- margin-right: 16rpx;
- }
- .sm_title {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: bold;
- font-size: 36rpx;
- color: #333333;
- line-height: 31rpx;
- margin-bottom: 22rpx;
- }
- .report_desc {
- margin: 30rpx 38rpx;
- letter-spacing: 1px;
- }
- .desc_title {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: normal;
- font-size: 28rpx;
- color: #FFFFFF;
- line-height: 46rpx;
- }
- .desc_txt {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: normal;
- font-size: 20rpx;
- color: #FFFFFF;
- line-height: 30rpx;
- }
- .list_mark {
- line-height: 0.7;
- font-size: 36rpx;
- color: #ffffff;
- font-weight: 600;
- margin-right: 5rpx;
- }
- .introduce {
- width: 702rpx;
- margin: 174rpx auto 0;
- }
- .introduce image {
- width: 100%;
- }
- .fx_title {
- width: 383rpx;
- margin: 32rpx 0 20rpx 24rpx;
- }
- .stext {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: normal;
- font-size: 20rpx;
- color: #ffffff;
- line-height: 30rpx;
- }
- .score_explain {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: normal;
- font-size: 20rpx;
- color: #999999;
- line-height: 31rpx;
- margin-left: 86rpx;
- }
- </style>
|