123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <template>
- <view class="bg">
- <view class="process"></view>
- <view class="role_name">
- <image v-if="roleList[role]" :src="roleList[role].name" mode="widthFix"></image>
- </view>
- <view class="role_img">
- <image v-if="roleList[role]" :src="roleList[role].img" mode="widthFix"></image>
- </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">得分:</view>
- <view class="score_num">{{scoreNum}}</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>
- <view class="result_box_r">
- <view class="sm_title">说明:</view>
- {{improvementSuggestions}}
- </view>
- </view>
- <view class="report_desc">
- <view class="desc_title">报告阅读说明</view>
- <view class="desc_txt">谢谢您的参与,阅读本报告时,请注意以下内容:</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`
- }
- }
- }
- </script>
- <style scoped>
- .bg {
- width: 100%;
- min-height: 1900rpx;
- background: url(../../static/images/EQtest/test_result_bg.png) no-repeat center;
- background-size: 100% auto;
- }
- .role_name {
- text-align: center;
- margin: 202rpx 0 0 0;
- }
- .role_name image {
- width: 308rpx;
- }
- .role_img {
- text-align: center;
- margin-top: -30rpx;
- }
- .role_img image {
- width: 660rpx;
- }
- .result_box {
- width: 706rpx;
- min-height: 548rpx;
- 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: -180rpx auto 0;
- 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: 46rpx;
- }
- .score_title {
- font-family: 'Alibaba PuHuiTi 2.0';
- font-weight: bold;
- font-size: 36rpx;
- color: #333333;
- line-height: 31rpx;
- margin: 104rpx 0 0 42rpx;
- }
- .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; */
- margin: 12rpx 0 7rpx 156rpx;
- }
- .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: 14rpx 0 8rpx 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;
- }
- </style>
|