miniprogramReport.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="divport" content="width=device-width, initial-scale=1.0">
  7. <title>小程序测试报告</title>
  8. <style>
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. html,
  14. body {
  15. width: 800px;
  16. }
  17. .report_head {
  18. width: 100%;
  19. height: 308px;
  20. background: url(https://test.jue-ming.com:8849/api/show?filePath=./images/report_head_bg.png) no-repeat center;
  21. background-size: cover;
  22. }
  23. .logo {
  24. width: 219px;
  25. height: auto;
  26. margin: 38px 0 0 20px;
  27. }
  28. .scaleInfo {
  29. display: flex;
  30. width: 760px;
  31. height: 134px;
  32. background: url(https://test.jue-ming.com:8849/api/show?filePath=./images/scaleinfo_bg.png) no-repeat center;
  33. background-size: cover;
  34. margin: -100px auto 0;
  35. border-radius: 36px;
  36. overflow: hidden;
  37. }
  38. .scaleInfo .head {
  39. width: 91px;
  40. height: 91px;
  41. margin: 22px 0 0 14px;
  42. border-radius: 36px;
  43. }
  44. .titleAndDesc {
  45. flex: 1;
  46. margin: 28px 0 0 11px;
  47. }
  48. .title {
  49. font-size: 28px;
  50. font-weight: 800;
  51. color: #242424;
  52. }
  53. .desc {
  54. width: 460px;
  55. font-size: 26px;
  56. color: rgba(65, 65, 65, 0.49);
  57. margin-top: 10px;
  58. overflow: hidden;
  59. white-space: nowrap;
  60. text-overflow: ellipsis;
  61. }
  62. .testNum {
  63. font-size: 24px;
  64. font-family: 'PingFang SC-Heavy, PingFang SC';
  65. display: flex;
  66. flex-direction: row;
  67. margin: 32px 23px 0 0;
  68. }
  69. .mum_text {
  70. font-size: 24px;
  71. font-weight: 800;
  72. color: #04919B;
  73. text-align: right;
  74. }
  75. .unit {
  76. font-size: 24px;
  77. font-weight: 800;
  78. color: rgba(65, 65, 65, 0.49);
  79. }
  80. .test-result-inner {
  81. width: 100%;
  82. height: calc(100vh - var(--status-bar-height) - 80px);
  83. overflow: hidden;
  84. box-sizing: border-box;
  85. padding: 20px;
  86. margin-top: 20px;
  87. background-image: linear-gradient(#A9EBFF, #FFFFFF);
  88. border-radius: 20px;
  89. }
  90. .test-result-content {
  91. width: 100%;
  92. background: #FFFFFF;
  93. box-sizing: border-box;
  94. padding: 30px 18px 0;
  95. border-radius: 36px 36px 0 0;
  96. }
  97. .target-content {
  98. margin-bottom: 35px;
  99. }
  100. .report-tip {
  101. width: 100%;
  102. margin-top: 20px;
  103. }
  104. .tip-title {
  105. font-size: 28px;
  106. font-family: PingFang SC;
  107. font-weight: 500;
  108. color: rgba(87, 87, 87, 1);
  109. line-height: 50px;
  110. text-align: left;
  111. }
  112. .tip-desc {
  113. box-sizing: border-box;
  114. font-size: 22px;
  115. font-family: PingFang SC;
  116. color: rgba(65, 65, 65, 0.49);
  117. line-height: 50px;
  118. }
  119. .tip-content {
  120. box-sizing: border-box;
  121. font-size: 24px;
  122. font-family: PingFang SC;
  123. color: rgba(87, 87, 87, 1);
  124. line-height: 50px;
  125. display: list-item;
  126. list-style-type: disc;
  127. margin-left: 25px;
  128. }
  129. .total-score-progress-content {
  130. margin-bottom: 20px;
  131. }
  132. .test-result-first-floor {
  133. display: flex;
  134. flex-direction: row;
  135. justify-content: space-between;
  136. align-items: center;
  137. }
  138. .avatar {
  139. width: 136px;
  140. height: 136px;
  141. border-radius: 50%;
  142. }
  143. .scale-name {
  144. font-size: 30px;
  145. font-family: PingFang SC-Regular, PingFang SC;
  146. font-weight: 600;
  147. color: #FFAC41;
  148. line-height: 50px;
  149. }
  150. .test-time {
  151. font-size: 26px;
  152. font-family: PingFang SC-Regular, PingFang SC;
  153. color: rgba(65, 65, 65, 0.49);
  154. line-height: 50px;
  155. }
  156. .table-title {
  157. width: 176px;
  158. height: 50px;
  159. font-size: 30px;
  160. font-family: PingFang SC;
  161. font-weight: 500;
  162. line-height: 50px;
  163. text-indent: 12px;
  164. color: #fff;
  165. text-align: left;
  166. background: #FF6A97;
  167. border-radius: 0 36px 36px 0;
  168. margin: 45px 0;
  169. }
  170. .score_table {
  171. width: 656rpx;
  172. border-radius: 16px;
  173. opacity: 1;
  174. overflow: hidden;
  175. }
  176. .score_table tr {
  177. width: 100%;
  178. }
  179. .score_table th {
  180. box-sizing: border-box;
  181. width: 50%;
  182. font-size: 28px;
  183. font-family: PingFang SC-Regular, PingFang SC;
  184. font-weight: 400;
  185. color: #FFFFFF;
  186. line-height: 71px;
  187. background: rgba(83, 220, 230, 1);
  188. padding: 6px 18px;
  189. text-align: left;
  190. }
  191. .score_table td {
  192. box-sizing: border-box;
  193. width: 50%;
  194. font-size: 28px;
  195. font-family: PingFang SC-Regular, PingFang SC;
  196. font-weight: 400;
  197. color: rgba(80, 80, 80, 1);
  198. line-height: 71px;
  199. padding: 6px 8px;
  200. }
  201. .score_table tr.odd {
  202. background: #BFF2FC;
  203. }
  204. .radar-title {
  205. width: 176px;
  206. height: 50px;
  207. font-size: 30px;
  208. font-family: PingFang SC;
  209. font-weight: 500;
  210. line-height: 50px;
  211. text-indent: 12px;
  212. color: #fff;
  213. text-align: left;
  214. background: #2CC5F2;
  215. border-radius: 0 36px 36px 0;
  216. margin: 45px 0;
  217. }
  218. .total-score-progress-width {
  219. width: 80%;
  220. }
  221. .total-score-progress {
  222. font-size: 40px;
  223. font-weight: bold;
  224. width: 120px
  225. }
  226. .total-score-progress-test {
  227. font-size: 32px;
  228. }
  229. .demo-layout-bg-purple-light {
  230. display: flex;
  231. padding: 0 40px;
  232. }
  233. .demo-layout-bg-purple {
  234. width: 200px;
  235. height: 200px
  236. }
  237. .demo-layout-bg-purple img {
  238. width: 100%;
  239. height: 100%
  240. }
  241. .custom-style-list {
  242. width: 100%;
  243. margin: 0 auto;
  244. }
  245. .b-b {
  246. border: 1px solid #f5f5f5;
  247. }
  248. .b-d {
  249. border-right: 1px solid #f5f5f5;
  250. }
  251. .custom-style-list-left {
  252. text-align: left
  253. }
  254. .custom-style-list-right {
  255. text-align: center
  256. }
  257. .padding20 {
  258. margin-top: 20px
  259. }
  260. .spanIndent {
  261. text-indent: 33px;
  262. }
  263. .content_app11 {
  264. width: 210px !important;
  265. height: 91px !important;
  266. }
  267. ::v-deep .u-button--mini {
  268. height: 90px !important;
  269. width: 210px !important;
  270. }
  271. .over-style {
  272. width: 176px;
  273. height: 50px;
  274. font-size: 30px;
  275. font-family: PingFang SC;
  276. font-weight: 500;
  277. line-height: 50px;
  278. text-indent: 12px;
  279. color: #fff;
  280. text-align: left;
  281. background: #FF9B6E;
  282. border-radius: 0 36px 36px 0;
  283. margin: 45px 0;
  284. }
  285. .dimension-warp {
  286. width: 100%;
  287. margin-top: 20px;
  288. }
  289. .dimension-name {
  290. height: 32px;
  291. line-height: 32px;
  292. font-size: 30px;
  293. font-family: PingFang SC-Regular, PingFang SC;
  294. color: #E8B643;
  295. border-left: 6px solid #E8B643;
  296. padding-left: 13px;
  297. }
  298. .dimension-content {
  299. width: 100%;
  300. box-sizing: border-box;
  301. padding: 20px 12px;
  302. background: #F6F5F5;
  303. border-radius: 8px;
  304. margin-top: 20px;
  305. font-size: 26px;
  306. font-family: PingFang SC-Regular, PingFang SC;
  307. color: #505050;
  308. }
  309. .dimension-item {
  310. display: flex;
  311. flex-direction: row;
  312. justify-content: flex-start;
  313. line-height: 50px;
  314. }
  315. .dimension-item-title {
  316. width: 19%;
  317. height: 50px;
  318. font-weight: bold;
  319. text-align: justify;
  320. text-justify: distribute-all-lines;
  321. }
  322. .dimension-item-title::after {
  323. width: 100%;
  324. display: inline-block;
  325. content: '';
  326. }
  327. .dimension-item-mh {
  328. width: 20px;
  329. font-weight: bold;
  330. }
  331. .dimension-item-desc {
  332. width: calc(81% - 20px);
  333. }
  334. .analysis-title {
  335. font-size: 26px;
  336. font-family: PingFang SC-Heavy, PingFang SC;
  337. font-weight: 800;
  338. color: #575757;
  339. line-height: 50px;
  340. }
  341. .analysis-desc {
  342. font-size: 24px;
  343. font-family: PingFang SC-Regular, PingFang SC;
  344. font-weight: 400;
  345. color: #575757;
  346. line-height: 45px;
  347. }
  348. .more_test {
  349. width: 709px;
  350. margin: 0 auto;
  351. overflow: hidden;
  352. }
  353. .more_txt {
  354. margin-top: 100px;
  355. float: left;
  356. }
  357. .more_txt p {
  358. font-size: 26px;
  359. font-family: PingFang SC-Regular, PingFang SC;
  360. font-weight: 400;
  361. color: rgba(65, 65, 65, 0.49);
  362. }
  363. .more_txt h2 {
  364. font-size: 30px;
  365. font-family: PingFang SC-Heavy, PingFang SC;
  366. font-weight: 800;
  367. color: #04919B;
  368. }
  369. .qr_code {
  370. width: 221px;
  371. height: auto;
  372. float: right;
  373. }
  374. </style>
  375. <script src="./js/vue@2"></script>
  376. <script src="./js/echarts.min.js"></script>
  377. </head>
  378. <body>
  379. <div id="app" class="">
  380. <div class="report_head">
  381. <image src="https://test.jue-ming.com:8849/api/show?filePath=./images/camera_logo.png" class="logo" />
  382. </div>
  383. <div class="scaleInfo">
  384. <img class="head" src="https://test.jue-ming.com:8849/api/show?filePath=./images/lbce_pic1.png" />
  385. <div class="titleAndDesc">
  386. <p class="title">{{name}}</p>
  387. <p class="desc">{{scaleInfo.description}}</p>
  388. </div>
  389. <div class="testNum">
  390. <span class="mum_text">{{scaleInfo.testNum}}</span>
  391. <span class="unit">人已测评</span>
  392. </div>
  393. </div>
  394. <div class="test-result-inner test-result-warp" v-show="showContent">
  395. <div class="test-result-content">
  396. <div class="target-content" ref="targetDom" id="targetDom">
  397. <div class="total-score-progress-content">
  398. <div class="test-result-first-floor">
  399. <div>
  400. <div class="scale-name" v-if="name">量表名称:{{ name }}</div>
  401. <div class="test-time" v-if="time">测试时间:{{ time }}</div>
  402. </div>
  403. <img class="avatar" :src="avatarUrl"></img>
  404. </div>
  405. <div class="report-tip">
  406. <div class="tip-title">报告阅读说明</div>
  407. <p class="tip-desc">谢谢您的参与,阅读本报告时,请注意以下内容:</p>
  408. <!--<p class="tip-content">测评图表可快速帮您掌握报告内容;</p>-->
  409. <p class="tip-content">本结果仅供参考,不可作为临床诊断的依据;</p>
  410. <p class="tip-content">如对报告有不理解的地方,建议向专业资质人员进行咨询;</p>
  411. <p class="tip-content">如结果与你自己或他人感知的有出入,可回忆在测试</br>时是否有事情影响到你,或自己答辩时是否有所顾虑。</p>
  412. </div>
  413. </div>
  414. <template v-if="scoresList">
  415. <div class="table-title">分值</div>
  416. <table width="100%" class="score_table" v-for="(items,index) in scoresList" :key="index">
  417. <tr>
  418. <th v-for="(itemTitle,i) in items.colNames" :key="i">{{itemTitle}}</th>
  419. </tr>
  420. <tr v-for="(c,p) in testResult == 2 ?items.newTableContext.result : items.tableContext"
  421. :class="{'odd': p % 2 == 0}" :key="p">
  422. <td>{{c.name != undefined?c.name:'总分'}}</td>
  423. <td v-if="c.name != undefined">{{testResult == 2?c.score:c.value[0]}}</td>
  424. </tr>
  425. </table>
  426. </template>
  427. <template v-if="scoreList && scoreList.length > 0">
  428. <div class="radar-title">你的分数</div>
  429. <div id="main" class="canvas" style="width: 724px;height:400px;"></div>
  430. <!-- <lei-da-cognitive-tasks :dataList="allData.chartModule.chartBody"></lei-da-cognitive-tasks> -->
  431. </template>
  432. <template v-if="showResultText">
  433. <div class="over-style">结果分析</div>
  434. <div class="dimension-warp" v-for="(list, j) in symptomDescription" :key="j">
  435. <div class="dimension-name">维度名称:{{ list.name }}</div>
  436. <div class="dimension-content">
  437. <div class="dimension-item" v-if="list.score && list.score != '无'">
  438. <span class="dimension-item-title">得分</span>
  439. <span class="dimension-item-mh">:</span>
  440. <span class="dimension-item-desc">{{ list.score }}</span>
  441. </div>
  442. <div class="dimension-item" v-if="list.symptom && list.symptom != '无'">
  443. <span class="dimension-item-title">症状</span>
  444. <span class="dimension-item-mh">:</span>
  445. <span class="dimension-item-desc">{{ list.symptom }}</span>
  446. </div>
  447. <div class="dimension-item"
  448. v-if="list.improvementSuggestions && list.improvementSuggestions != '无'">
  449. <span class="dimension-item-title">维度说明</span>
  450. <span class="dimension-item-mh">:</span>
  451. <span class="dimension-item-desc">{{ list.improvementSuggestions }}</span>
  452. </div>
  453. <div class="dimension-item" v-if="list.suggestion && list.suggestion != '无'">
  454. <span class="dimension-item-title">建议</span>
  455. <span class="dimension-item-mh">:</span>
  456. <span class="dimension-item-desc">{{ list.suggestion }}</span>
  457. </div>
  458. </div>
  459. </div>
  460. </template>
  461. <div class="more_test">
  462. <div class="more_txt">
  463. <p>更多测评请在微信搜索</p>
  464. <h2>心灵照相机</h2>
  465. </div>
  466. <img class="qr_code" :src="`data:image/png;base64,${qrCodeImg}`" alt="">
  467. </div>
  468. </div>
  469. </div>
  470. </div>
  471. </div>
  472. <script>
  473. var app = new Vue({
  474. el: '#app',
  475. data() {
  476. return {
  477. getBenDatas: null,
  478. avatarUrl: "",
  479. petName: "",
  480. showTestedPerson: false,
  481. baseUrl: 'https://test.jue-ming.com:8443/',
  482. name: "",
  483. time: "",
  484. totalScores: 0,
  485. symptomScore: [],
  486. symptomDescription: [],
  487. symptom: "",
  488. reference: [],
  489. scoreList: [],
  490. indicator: [],
  491. improvementSuggestions: "无",
  492. scoresList: [],
  493. resultId: "",
  494. subjectOrCognitiveId: "",
  495. testResult: 2,
  496. imgUrl: '',
  497. messageShare: 0,
  498. productList: [{
  499. name: '谢谢您的参与,阅读本报告时,请注意以下内容:'
  500. },
  501. {
  502. name: '. 本结果仅供参考,不可作为临床诊断的依据'
  503. },
  504. {
  505. name: '. 如结果与你自己或他人感知的有出入,可回忆在测试'
  506. },
  507. {
  508. name: '时是否有事情影响了你,或自己答题时是否有所顾虑'
  509. },
  510. {
  511. name: '. 如对报告有不理解的地方,建议向专业人员进行咨询'
  512. }
  513. ],
  514. showResultText: false,
  515. relevantList: [],
  516. scaleInfo: {},
  517. flag: '',
  518. showContent: false, //等接口返回数据初始化完成再
  519. tableData: [],
  520. allData: {}, //测试显示内容
  521. resultData: ReplaceData,
  522. qrCodeImg: base64img,
  523. color: ['#FCEF9A', '#D54039', '#56743E', '#FF917C'],
  524. radarIndicator: [],
  525. radarData: [],
  526. option: {},
  527. myChart: null
  528. }
  529. },
  530. computed: {
  531. },
  532. created() {
  533. this.getScaleTestResults();
  534. },
  535. mounted() {
  536. this.myChart = echarts.init(document.getElementById("main"));
  537. if (this.myChart) this.drawLine();
  538. },
  539. methods: {
  540. getScaleTestResults(id) {
  541. let _this = this;
  542. this.avatarUrl = this.resultData.userInfo.avatarUrl ? `https://test.jue-ming.com:8849/api/show?filePath=${this.resultData.userInfo.avatarUrl}` : 'https://test.jue-ming.com:8849/api/show?filePath=./images/lbcs_pic2.png';
  543. this.testResult = parseInt(JSON.parse(this.resultData?.userRecordEntity?.testResult)[0].version);
  544. _this.testResult = parseInt(JSON.parse(this.resultData?.userRecordEntity?.testResult)[0].version);
  545. _this.name = this.resultData.userRecordEntity.name;
  546. _this.flag = this.resultData.subject.flag;
  547. _this.scaleInfo = this.resultData.subject;
  548. let testDateTime = this.resultData.userRecordEntity.testDate;
  549. let yearMonthDay = testDateTime
  550. .replace("年", "/")
  551. .replace("月", "/")
  552. .replace("日", " ")
  553. .replace("时", ":")
  554. .replace("分", ":")
  555. .replace("秒", "");
  556. _this.time = yearMonthDay;
  557. if (_this.testResult == 2) {
  558. _this.getDataList(this.resultData);
  559. } else {
  560. _this.scoresList = JSON.parse(this.resultData.userRecordEntity.testResult);
  561. _this.init(_this.scoresList[0].tableContext[0].value[0])
  562. }
  563. this.showContent = true;
  564. },
  565. init(v) {
  566. let _this = this;
  567. _this.totalScores = Number(v);
  568. },
  569. getDataList(data) {
  570. let _this = this;
  571. let v = JSON.parse(data.userRecordEntity.testResult);
  572. _this.scoresList = v;
  573. console.log("-----传入的参数----->", v);
  574. v.forEach((items) => {
  575. if (items.newTableContext.iconInfo != "") {
  576. let indicatorList = items?.newTableContext?.iconInfo?.indicator;
  577. if (indicatorList.length > 0) {
  578. indicatorList.forEach((data) => {
  579. _this.indicator.push({
  580. text: data.text,
  581. max: Number(data.max)
  582. });
  583. });
  584. }
  585. let referenceList = items?.newTableContext?.iconInfo?.reference || [];
  586. if (referenceList.length > 0) {
  587. referenceList.forEach((data) => {
  588. _this.reference.push(Number(data));
  589. });
  590. }
  591. let scoreLists = items?.newTableContext?.iconInfo?.scoreList;
  592. if (scoreLists.length > 0) {
  593. scoreLists.forEach((data) => {
  594. _this.scoreList.push(Number(data));
  595. });
  596. }
  597. console.log("==1111=====>", _this.indicator)
  598. console.log("==2222=====>", _this.reference)
  599. console.log("==3333=====>", _this.scoreList)
  600. }
  601. // _this.symptomDescription=[]
  602. items.newTableContext.result.forEach((item) => {
  603. if (!item) return;
  604. if (item.name === "总分" || item.name === "压力综合指数") {
  605. _this.init(item.score);
  606. _this.symptom = item.symptom;
  607. }
  608. if (item.isTotalScoreExplain === "是") {
  609. _this.improvementSuggestions = item.symptom;
  610. }
  611. _this.symptomScore.push({
  612. name: item.name,
  613. score: item.score
  614. });
  615. // _this.symptomDescription.push({
  616. // symptom: item.symptom,
  617. // name: item.name,
  618. // improvementSuggestions: item.improvementSuggestions,
  619. // });
  620. // if (item.improvementSuggestions && item.improvementSuggestions != '无') _this.showResultText = true;
  621. // 获取维度数据
  622. this.symptomDescription.push(item);
  623. });
  624. if (this.symptomDescription && this.symptomDescription.length > 0) {
  625. //判断维度显示
  626. this.showResultText = true;
  627. }
  628. console.log("0000-----000", _this.symptomDescription);
  629. });
  630. },
  631. drawLine() {
  632. let _this = this;
  633. console.log("_this.indicator", _this.indicator);
  634. console.log("_this.reference", _this.reference);
  635. console.log("_this.scoreList", _this.scoreList);
  636. let legendData = this.reference?.length > 0 ? ["你的分数", "参考值"] : ["你的分数"];
  637. let options = {
  638. color: ["#67F9D8", "#FFE434", "#56A3F1", "#FF917C"],
  639. title: {
  640. text: "",
  641. },
  642. legend: {
  643. data: legendData,
  644. orient: "vertical",
  645. left: "left",
  646. },
  647. radar: [
  648. {
  649. center: ["25%", "50%"],
  650. radius: 120,
  651. startAngle: 2,
  652. splitNumber: 1,
  653. shape: "circle",
  654. axisName: {
  655. formatter: "【{value}】",
  656. color: "#428BD4",
  657. },
  658. splitArea: {
  659. areaStyle: {
  660. color: ["#77EADF", "#26C3BE", "#64AFE9", "#428BD4"],
  661. shadowColor: "rgba(0, 0, 0, 0.2)",
  662. shadowBlur: 10,
  663. },
  664. },
  665. axisLine: {
  666. lineStyle: {
  667. color: "rgba(211, 253, 250, 0.8)",
  668. },
  669. },
  670. splitLine: {
  671. lineStyle: {
  672. color: "rgba(211, 253, 250, 0.8)",
  673. },
  674. },
  675. },
  676. {
  677. indicator: _this.indicator,
  678. center: ["50%", "50%"],
  679. radius: "60%",
  680. axisName: {
  681. color: "#fff",
  682. backgroundColor: "#666",
  683. borderRadius: 3,
  684. padding: [3, 5],
  685. },
  686. },
  687. ],
  688. series: [
  689. {
  690. type: "radar",
  691. radarIndex: 1,
  692. data: [
  693. {
  694. value: _this.scoreList,
  695. name: "你的分数",
  696. symbol: "rect",
  697. symbolSize: 12,
  698. lineStyle: {
  699. type: "dashed",
  700. },
  701. label: {
  702. show: true,
  703. formatter: function (params) {
  704. return params.value;
  705. },
  706. },
  707. },
  708. {
  709. value: _this.reference,
  710. name: "参考值",
  711. label: {
  712. show: true,
  713. formatter: function (params) {
  714. return params.value;
  715. },
  716. },
  717. areaStyle: {
  718. color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
  719. {
  720. color: "rgba(255, 145, 124, 0.1)",
  721. offset: 0,
  722. },
  723. {
  724. color: "rgba(255, 145, 124, 0.9)",
  725. offset: 1,
  726. },
  727. ]),
  728. },
  729. },
  730. ],
  731. },
  732. ],
  733. }
  734. this.myChart.setOption(options);
  735. }
  736. }
  737. })
  738. </script>
  739. </body>
  740. </html>