Переглянути джерело

修改新版本量表待对接

plg 11 місяців тому
батько
коміт
b1debb33d0

+ 1139 - 0
src/renderer/componentSub/TestResults/Record.vue

@@ -0,0 +1,1139 @@
+<template>
+  <div class="main_class">
+    <TopDes :flag="true" topDesFont="量表报告"></TopDes>
+    <div class="bgClass">
+      <div>
+        <div class="test-mid">
+          <el-row class="row-content">
+            <el-col :span="24">
+              <div class="first-floor">
+                <!--                左右图片定位-->
+                <img
+                  class="first-floor-img-left"
+                  src="../../assets/scale_report_bg_left.png"
+                  alt=""
+                />
+                <img
+                  class="first-floor-img-right"
+                  src="../../assets/scale_report_bg_right.png"
+                  alt=""
+                />
+
+                <div class="first-floor-head">
+                  <div class="first-floor-title">测试得分</div>
+                </div>
+                <div
+                  class="first-floor-name"
+                  v-if="testResultData && testResultData.userRecordEntity"
+                >
+                  <span class="first-floor-name-txt"
+                    >测试者:{{ testResultData.userRecordEntity.phone }}</span
+                  >
+                  <span>/{{ testResultData.userRecordEntity.testDate }}</span>
+                </div>
+                <div
+                  class="first-floor-scale-title"
+                  v-if="testResultData && testResultData.userRecordEntity"
+                >
+                  量表名称:{{ testResultData.userRecordEntity.name }}
+                </div>
+                <div class="first-floor-desc">
+                  <div class="first-floor-desc-title">报告阅读说明</div>
+                  <div class="first-floor-desc-txt">
+                    谢谢您的参与,阅读本报告时,请注意以下内容:本次报告结果仅供参考,不可做为临床诊断依据;如对报告有不理解的地方,建议向专业资质的人员进行咨询;
+                    如结果与你自己或他人的有出入,可回忆在测试时是否有事情影响到你,或自己答辩时是否有所顾虑。
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-if="resResult && resResult.length > 0">
+              <div class="second-floor">
+                <div class="second-floor-head">
+                  <div class="second-floor-title">分值</div>
+                </div>
+                <table class="second-floor-table">
+                  <tr class="table-th">
+                    <th style="border: 1px solid #e8f1f2">项目</th>
+                    <th style="border: 1px solid #e8f1f2">内容</th>
+                  </tr>
+                  <tr v-for="(value, index) in resResult" :key="index">
+                    <td class="td-result">{{ value.name }}</td>
+                    <td class="td-result">
+                      <p align="center">{{ value.score }}</p>
+                    </td>
+                  </tr>
+                </table>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-show="indicator && indicator.length > 0">
+              <div class="third-floor">
+                <div class="third-floor-head">
+                  <div class="third-floor-title">你的分数</div>
+                </div>
+
+                <div class="third-floor-radar">
+                  <StackedLine
+                    :reference="reference"
+                    :scoreList="scoreList"
+                    :indicator="indicator"
+                  ></StackedLine>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-if="symptomDescription && symptomDescription.length > 0">
+              <div class="fouth-floor">
+                <div class="fouth-floor-head">
+                  <div class="fouth-floor-title">结论</div>
+                </div>
+
+                <div
+                  class="dimension-warp"
+                  v-for="(list, j) in symptomDescription"
+                  :key="j"
+                >
+                  <div class="dimension-name">
+                    <span class="dimension-name-tag">维度名称</span>
+                    <span class="dimension-name-desc">{{ list.name }}</span>
+                  </div>
+                  <div class="dimension-content">
+                    <div class="dimension-item" v-if="list.score && list.score != '无'">
+                      <div class="dimension-item-title">得分</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.score }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.symptom && list.symptom != '无'"
+                    >
+                      <div class="dimension-item-title">症状</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.symptom }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="
+                        list.improvementSuggestions && list.improvementSuggestions != '无'
+                      "
+                    >
+                      <div class="dimension-item-title">维度说明</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">
+                        {{ list.improvementSuggestions }}
+                      </div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.nameExplain && list.nameExplain != '无'"
+                    >
+                      <div class="dimension-item-title">维度解读</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.nameExplain }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.suggestion && list.suggestion != '无'"
+                    >
+                      <div class="dimension-item-title">建议</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.suggestion }}</div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col
+              :span="24"
+              v-if="
+                testResultData.subject &&
+                testResultData.subject.reportReference &&
+                testResultData.subject.reportReference.length > 0
+              "
+            >
+              <div class="fifth-floor">
+                <div class="fifth-floor-head">
+                  <div class="fifth-floor-title">参考文献</div>
+                </div>
+
+                <div
+                  class="fifth-floor-list"
+                  v-for="(item, index) in replaceTxt(
+                    testResultData.subject.reportReference
+                  )"
+                  :key="index"
+                >
+                  <div class="fifth-floor-list-title">[{{ index + 1 }}]</div>
+                  <div class="fifth-floor-list-desc">{{ item }}</div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <div class="btnArea">
+            <el-button type="primary" round @click="downloadFile">下载答题记录</el-button>
+            <el-button type="primary" round @click="downloadPDF">PDF报告下载</el-button>
+            <!--              <el-button-->
+            <!--              v-if="testType == 0 && isGroup"-->
+            <!--                class="btnArea_btn"-->
+            <!--                type="primary"-->
+            <!--                round-->
+            <!--                @click="downloadReport"-->
+            <!--                >下载报告</el-button>-->
+            <el-button type="primary" round @click="goBack">返回</el-button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+/**
+ * 字短说明
+ *  totalScore 总分数
+ *  symptom   解读
+ *  symptomScore  测试结果分数列表
+ *  symptomDescription  测试结果表述列表
+ *
+ */
+
+export default {
+  name: "Record",
+  props: ["id", "come"],
+  data() {
+    return {
+      testResultData: {},
+
+      totalScores: 0,
+      symptomScore: [],
+      symptomDescription: [],
+      symptom: "",
+
+      baseUrl: "",
+      resResult: [],
+      list: [],
+      userType: "", //用户类型
+      show: false,
+      sex: 0,
+      age: 0,
+      data: "",
+      tabledata1: [],
+      tabledata2: [],
+      type: "", //量表类型0是量表,1是认知任务
+      iconInfo: "", //对应图表
+      resultList: [],
+      reference: [],
+      scoreList: [],
+      indicator: [],
+      improvementSuggestions: "无",
+      isGroup: process.env.VUE_APP_GROUP,
+    };
+  },
+
+  watch: {
+    id: {
+      deep: true,
+      handler() {
+        this.inits();
+      },
+    },
+  },
+  mounted() {
+    console.log(this.$route.query.testPlanId, "测试计划id");
+    // this.inits();
+  },
+  methods: {
+    init(v) {
+      this.totalScores = v;
+      console.log("totalScores", this.totalScores);
+    },
+    getDataList(v) {
+      let _this = this;
+      console.log("vvvvv", v);
+      v.forEach((item) => {
+        if (!item) return;
+        if (item.name === "总分" || item.name === "压力综合指数") {
+          _this.init(item.score);
+          _this.symptom = item.symptom;
+        }
+        _this.resResult.push({
+          name: item.name,
+          score: item.score,
+        });
+        if (item.isTotalScoreExplain === "是") {
+          _this.improvementSuggestions = item.symptom;
+        }
+        // _this.symptomDescription.push({
+        //   symptom: item.symptom,
+        //   name: item.name,
+        //   improvementSuggestions: item.improvementSuggestions,
+        // });
+
+        // 获取维度数据
+        this.symptomDescription.push(item);
+      });
+      console.log("symptomScore", this.symptomScore);
+    },
+    getOldData(data) {
+      this.resResult = [];
+      //获取旧版表格数据
+      let tableData = JSON.parse(data.userRecordEntity.testResult)[0].tableContext;
+      tableData.forEach((item) => {
+        if (!item) return;
+        this.resResult.push({
+          name: item.name,
+          score: item.value[0],
+        });
+      });
+    },
+    go1Back() {
+      //管理员用户
+      this.$router.push({
+        name: "PersonalCenter",
+        query: {
+          phone: this.$route.query.phone,
+        },
+      });
+    },
+    backMain() {
+      this.$router.push({
+        name: "MainTable",
+      });
+    },
+    getAge(strAge) {
+      var birArr = strAge.split("-");
+      var birYear = birArr[0];
+      var birMonth = birArr[1];
+      var birDay = birArr[2];
+
+      d = new Date();
+      var nowYear = d.getFullYear();
+      var nowMonth = d.getMonth() + 1; //记得加1
+      var nowDay = d.getDate();
+      var returnAge;
+
+      if (birArr == null) {
+        return false;
+      }
+      var d = new Date(birYear, birMonth - 1, birDay);
+      if (
+        d.getFullYear() == birYear &&
+        d.getMonth() + 1 == birMonth &&
+        d.getDate() == birDay
+      ) {
+        if (nowYear == birYear) {
+          returnAge = 0; //
+        } else {
+          var ageDiff = nowYear - birYear; //
+          if (ageDiff > 0) {
+            if (nowMonth == birMonth) {
+              var dayDiff = nowDay - birDay; //
+              if (dayDiff < 0) {
+                returnAge = ageDiff - 1;
+              } else {
+                returnAge = ageDiff;
+              }
+            } else {
+              var monthDiff = nowMonth - birMonth; //
+              if (monthDiff < 0) {
+                returnAge = ageDiff - 1;
+              } else {
+                returnAge = ageDiff;
+              }
+            }
+          } else {
+            return "出生日期晚于今天,数据有误"; //返回-1 表示出生日期输入错误 晚于今天
+          }
+        }
+        return returnAge;
+      } else {
+        return "输入的日期格式错误!";
+      }
+    },
+
+    inits() {
+      let _this = this;
+      // _this.id = sessionStorage.getItem("persionId");
+      _this.$http.post(`v1/record/find/${_this.id}`, {}, (res) => {
+        //   _this.$http.get(`getRecordById?id=${_this.id}`, {}, (res) => {
+        //当返回正确的话
+        if (res.data.code == 200) {
+          console.log("雷达图上", res.data.data);
+          let version = JSON.parse(res.data.data.userRecordEntity.testResult)[0].version;
+
+          this.testResultData = res.data.data;
+          this.iconInfo = res.data.data.subject.iconInfo;
+          const datas = res.data.data.userRecordEntity.testResult;
+          this.time = res.data.data.userRecordEntity.testDate
+            .replace("年", "/")
+            .replace("月", "/")
+            .replace("日", " ")
+            .replace("时", ":")
+            .replace("分", ":")
+            .replace("秒", "");
+
+          if (version == 2) {
+            //专业报告新版
+            const resResultData =
+              typeof datas == "string"
+                ? JSON.parse(datas)[0].newTableContext
+                : datas[0].newTableContext;
+            console.log("循环的name", resResultData);
+
+            if (resResultData.iconInfo != "") {
+              let indicatorList = resResultData.iconInfo.indicator;
+              let referenceList = resResultData.iconInfo.reference || [];
+              let scoreLists = resResultData.iconInfo.scoreList;
+              _this.radarFuction(indicatorList, referenceList, scoreLists);
+            }
+            _this.resultList = resResultData.result;
+            _this.getDataList(resResultData.result);
+          } else {
+            //旧版本无专业报告
+            this.getOldData(res.data.data);
+          }
+
+          //先获取到测试者
+          let str = res.data.data.userRecordEntity.fileName;
+          _this.tableName = res.data.data.userRecordEntity.name;
+          let sd = str.split("/");
+          let sp = sd[sd.length - 1];
+
+          let a = sp.split("-");
+          this.name = a[0];
+
+          _this.sex = a[4];
+          // let b = a[1] + "-" + a[2] + "-" + a[3];
+          // _this.age = _this.getAge(b);
+          // let c = a[5];
+          // let d = c.split("年");
+
+          // let e = d[1].split("月");
+
+          // let f = e[1].split("日");
+
+          // let g = f[1].split("时");
+
+          // let h = g[1].split("分");
+
+          // let p = h[1].split("秒");
+
+          // _this.time =
+          //   d[0] +
+          //   "/" +
+          //   e[0] +
+          //   "/" +
+          //   f[0] +
+          //   "  " +
+          //   g[0] +
+          //   ":" +
+          //   h[0] +
+          //   ":" +
+          //   p[0];
+          // let q = a[6].split(".");
+
+          //新增查看记录列表页不显示页签激活状态,详情页显示对应激活状态-liwenlong-2022-04-06-start
+          _this.type = res.data.data.userRecordEntity.type;
+          // _this.type == "0"
+          //   ? (_this.$root.activeIndex = 0)
+          //   : _this.type == "1"
+          //   ? (_this.$root.activeIndex = 1)
+          //   : (_this.$root.activeIndex = -1);
+          //新增查看记录列表页不显示页签激活状态,详情页显示对应激活状态-liwenlong-2022-04-06-end
+          _this.show = true;
+        }
+
+        //if 是记忆测试,就导出多边形所需要的数据
+        //表格内的数据导出
+        if (_this.tableName == "记忆检查测试") {
+          console.log("resResult:");
+          let grade1 = res.data.data.userRecordEntity.testResults;
+          console.log(res.data.data.userRecordEntity.testResults);
+          //即时记忆总成绩
+          let grade2 = grade1.split(";");
+          console.log(grade2);
+          let grade3 = [];
+          for (let i = 0; i < grade2.length; i++) {
+            grade3.push(grade2[i].split(":"));
+          }
+          //分离字符串
+          console.log(grade3);
+          //转换成数字
+          let grade4 = [];
+          for (let i = 0; i < grade3.length; i++) {
+            grade4.push(parseInt(grade3[i][1]));
+          }
+          console.log(grade4);
+          _this.tabledata1 = [
+            grade4[2],
+            grade4[5],
+            grade4[6],
+            grade4[9],
+            grade4[10],
+            grade4[11],
+            grade4[14],
+          ];
+          _this.tabledata2 = [
+            grade4[20],
+            grade4[23],
+            grade4[24],
+            grade4[27],
+            grade4[28],
+            0,
+            0,
+          ];
+          _this.drawLine();
+        }
+      });
+    },
+    radarFuction(indicatorList, referenceList, scoreLists) {
+      let _this = this;
+      if (indicatorList.length > 0) {
+        indicatorList.forEach((data) => {
+          _this.indicator.push({ text: data.text, max: Number(data.max) });
+        });
+      }
+      if (referenceList.length > 0) {
+        referenceList.forEach((data) => {
+          _this.reference.push(Number(data));
+        });
+      }
+      if (scoreLists.length > 0) {
+        scoreLists.forEach((data) => {
+          _this.scoreList.push(Number(data));
+        });
+      }
+      //  console.log("======>", _this.indicator)
+      // console.log("===reference===>", _this.reference)
+      // console.log("======>", _this.scoreList)
+    },
+    //返回上一级
+    goBack() {
+      let userType = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528");
+      let testPlanId = this.$route.query.testPlanId || "";
+      let comes = this.$route.query.come || ""; //1-来自量表测试,2-来自测试记录列表页,3-来自管理端量表测试报告,4-来自管理端测试报告进入的量表报告
+
+      this.$router.go(-1)
+    },
+    drawLine() {
+      this.$nextTick(() => {
+        console.log("调用了drawLine方法");
+        // 基于准备好的dom,初始化echarts实例
+        // var myChart = echarts.init(document.getElementById("myChart"));
+        let myChart = this.$echarts.init(document.getElementById("myChart"));
+        // 绘制图表
+        var option = {
+          color: ["#1AAC5C", "#FFE434"],
+          title: {
+            text: "记忆检查结果图:",
+            x: "5%",
+          },
+          legend: {
+            left: "45%",
+          },
+          radar: [
+            {
+              radius: 120,
+              startAngle: 90,
+              splitNumber: 4,
+              shape: "circle",
+              axisName: {
+                formatter: "【{value}】",
+                color: "#428BD4",
+              },
+              splitArea: {
+                areaStyle: {
+                  color: ["#77EADF", "#26C3BE", "#64AFE9", "#428BD4"],
+                  shadowColor: "rgba(0, 0, 0, 0.2)",
+                  shadowBlur: 10,
+                },
+              },
+              axisLine: {
+                lineStyle: {
+                  color: "rgba(211, 253, 250, 0.8)",
+                },
+              },
+              splitLine: {
+                lineStyle: {
+                  color: "rgba(211, 253, 250, 0.8)",
+                },
+              },
+            },
+            {
+              indicator: [
+                { text: "指向记忆", max: 48 },
+                { text: "词汇联想", max: 12 },
+                { text: "图像自由回忆", max: 30 },
+                { text: "图片联想", max: 30 },
+                { text: "人像特点", max: 18 },
+                { text: "视觉空间", max: 16 },
+                { text: "前瞻记忆", max: 160 },
+              ],
+              center: ["35%", "60%"],
+              radius: 200,
+              splitNumber: 0,
+              axisName: {
+                color: "#fff",
+                backgroundColor: "#666",
+                borderRadius: 3,
+                padding: [3, 5],
+              },
+            },
+          ],
+          series: [
+            {
+              type: "radar",
+              radarIndex: 1,
+              data: [
+                {
+                  value: this.tabledata1,
+                  name: "即时记忆",
+                  symbol: "rect",
+                  symbolSize: 12,
+                  lineStyle: {
+                    type: "dashed",
+                  },
+                  label: {
+                    show: true,
+                    formatter: function (params) {
+                      return params.value;
+                    },
+                  },
+                  areaStyle: {
+                    color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
+                      {
+                        color: "rgba(12, 222, 115, 0.5)",
+                        offset: 0,
+                      },
+                      {
+                        color: "rgba(12, 222, 115, 0.5)",
+                        offset: 1,
+                      },
+                    ]),
+                  },
+                },
+                {
+                  value: this.tabledata2,
+                  name: "延时记忆",
+                  label: {
+                    show: true,
+                    formatter: function (params) {
+                      return params.value;
+                    },
+                  },
+                  areaStyle: {
+                    color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
+                      {
+                        color: "rgba(255,228,52, 0.5)",
+                        offset: 0,
+                      },
+                      {
+                        color: "rgba(255,228,52, 0.5)",
+                        offset: 1,
+                      },
+                    ]),
+                  },
+                },
+              ],
+            },
+          ],
+        };
+        option && myChart.setOption(option);
+      });
+    },
+    replaceTxt(str) {
+      return str.split("//");
+    },
+    downloadFile() {
+      // if (this.tableName == "画钟测试") {
+      //   window.open(`${baseUrl}result/download/CDTImg?id=${this.id}`, "_blank");
+      // }
+      window.open(`${baseUrl}result/download/testResult?id=${this.id}`, "_blank");
+    },
+    downloadReport() {
+      window.open(`${baseUrl}result/download/testResultPdf?id=${this.id}`, "_blank");
+    },
+    downloadPDF() {
+      window.open(`${baseUrl}result/download/testResultPdf?id=${this.id}`, "_blank");
+    },
+  },
+};
+</script>
+<style scoped>
+.btnArea {
+  margin: 20px 0;
+  /*text-align: center;*/
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+}
+.cardList {
+  width: 100%;
+  display: block;
+  text-align: center;
+}
+.cardList ul li {
+  padding: 20px 15px;
+  box-sizing: border-box;
+  display: flex;
+  text-align: left;
+  line-height: 1.6;
+  cursor: pointer;
+  border-bottom: 0.5px solid #898989;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li h2 {
+  font-size: 20px;
+  color: #333333;
+}
+
+.cardList ul li p {
+  font-size: 16px;
+  color: #666666;
+}
+
+.cardList ul li .content {
+  width: 600px;
+  font-size: 14px;
+  display: -webkit-box;
+  color: #898989;
+}
+
+.pageNationBox {
+  padding: 20px 10px;
+}
+.view-text {
+  /**
+        思路:
+        1.设置inline-block属相
+        2.强制不换行
+        3.固定高度
+        4.隐藏超出部分
+        5.显示“……”
+      */
+  display: inline-block;
+  word-break: keep-all;
+  white-space: nowrap;
+  width: 960px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.imgSiz {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.lang-to {
+  font-size: 36px;
+  font-family: SSruiyuanTi-, SSruiyuanTi;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+}
+
+.unscramble {
+  font-size: 22px;
+  font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+  margin-top: 20px;
+}
+
+.widthTest {
+  display: block;
+  width: 80%;
+  text-align: center;
+  margin-left: 10%;
+}
+.wt1 {
+  width: 80%;
+}
+
+.bgClass {
+  overflow-y: auto;
+  flex: 1;
+  width: 78.75vw;
+  /*background: #c7eaf0;*/
+  background: url("../../assets/scale_report_bg.png") no-repeat center top,
+    linear-gradient(180deg, #3ecee6 0%, rgba(166, 232, 245, 0.63) 100%);
+  background-size: 100% auto;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  margin: 0 auto 60px;
+}
+.test-mid {
+  width: 780px;
+  height: auto;
+  border-radius: 6px 6px 6px 6px;
+  padding-top: 160px;
+}
+.test-img {
+  width: 720px;
+  display: inline-block;
+  text-align: center;
+  position: absolute;
+  margin-top: -20px;
+}
+.test-top-left {
+  color: #7fc1cd;
+  padding-top: 40px;
+  margin-top: 40px;
+  margin-left: 20px;
+  border-radius: 4px;
+  padding-left: 20px;
+}
+.test-top-left-ce {
+  width: 100%;
+  margin-left: 20px;
+  border-radius: 4px;
+  padding-left: 20px;
+  height: 160px;
+  color: #7fc1cd;
+}
+.tr-result {
+  height: 40px;
+}
+.td-result {
+  width: 50%;
+  line-height: 40px;
+  border: 1px solid #e8f1f2;
+}
+.progress-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.total-style {
+  width: 120px;
+  font-weight: bold;
+  font-size: 30px;
+  text-align: left;
+}
+::v-deep .el-progress-bar__inner {
+  background-color: #57acbb !important;
+  background-image: linear-gradient(to right, #57acbb, #57acbb) !important;
+}
+::v-deep .el-progress__text {
+  display: none;
+}
+.symptomDesContent {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-start;
+  width: 94%;
+  margin: 0 auto;
+  margin-top: 20px;
+}
+.symptomDesTitle {
+  width: 100%;
+  font-size: 18px;
+  font-weight: bold;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+  text-align: left;
+}
+.symptomDesContents {
+  text-align: left;
+  margin-top: 10px;
+  width: 100%;
+  text-indent: 2em;
+}
+.td-result {
+  width: 50%;
+  font-size: 14px;
+  line-height: 35px;
+  border: 1px solid #e8f1f2;
+}
+.table-th {
+  height: 35px;
+  line-height: 35px;
+  font-size: 16px;
+  background: #48e4e9 !important;
+  color: #fff;
+}
+.report-tip {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 20px 0 10px 20px;
+  text-align: left;
+}
+.tip-title {
+  width: 100px;
+  height: 30px;
+  font-size: 14px;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #308594;
+  line-height: 30px;
+  text-align: center;
+  background-image: linear-gradient(to right, #6fc1cf, #deeff4);
+  border-top-right-radius: 15px;
+  border-bottom-left-radius: 15px;
+}
+.tip-desc {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #666666;
+  line-height: 30px;
+  padding-left: 20px;
+}
+.tip-content {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #000;
+  line-height: 25px;
+  display: list-item;
+  list-style-type: disc;
+  margin-left: 36px;
+}
+.row-content {
+  margin-bottom: 30px;
+}
+.first-floor {
+  position: relative;
+}
+.first-floor-img-left {
+  width: 90px;
+  height: 90px;
+  position: absolute;
+  z-index: 10;
+  left: -45px;
+  top: -45px;
+}
+.first-floor-img-right {
+  width: 110px;
+  height: 110px;
+  position: absolute;
+  z-index: 10;
+  right: 0;
+  top: 0;
+}
+
+.first-floor,
+.second-floor,
+.third-floor,
+.fouth-floor,
+.fifth-floor {
+  width: 100%;
+  background: #ffffff;
+  border-radius: 15px;
+  /*overflow: hidden;*/
+  box-sizing: border-box;
+  padding: 0 20px 50px;
+}
+.first-floor-head,
+.second-floor-head,
+.third-floor-head,
+.fouth-floor-head,
+.fifth-floor-head {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+.first-floor-title,
+.second-floor-title,
+.third-floor-title,
+.fouth-floor-title,
+.fifth-floor-title {
+  width: 280px;
+  height: 35px;
+  background: #f79ecc;
+  text-align: center;
+  line-height: 35px;
+  font-size: 16px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #ffffff;
+  border-radius: 0px 0px 10px 10px;
+}
+.first-floor-name {
+  font-size: 12px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: bold;
+  color: #196371;
+  margin-top: 15px;
+}
+.first-floor-name-txt {
+  margin-right: 20px;
+}
+.first-floor-scale-title {
+  font-size: 18px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: 800;
+  color: #196371;
+  margin: 10px 0;
+}
+.first-floor-desc {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 15px 10px;
+  background: linear-gradient(180deg, #ffffff 0%, #ffdfd8 100%);
+  border-radius: 10px;
+}
+.first-floor-desc-title {
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+.first-floor-desc-txt {
+  font-size: 12px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+
+.second-floor-table {
+  width: 100%;
+  margin-top: 25px;
+  border-radius: 5px;
+  overflow: hidden;
+  text-align: center;
+}
+.second-floor-table tr:nth-child(2n-1) {
+  background: #bff2fc;
+}
+.second-floor-table tr:nth-child(2n) {
+  background: #ecfcff;
+}
+.second-floor-title {
+  background: #f6a832;
+}
+.third-floor-title {
+  background: #f79ecc;
+}
+.fouth-floor-title {
+  background: #7cbf74;
+}
+.fifth-floor-title {
+  background: #2d9cff;
+}
+
+.third-floor-radar {
+  width: 100%;
+  margin-top: 25px;
+}
+
+.dimension-warp {
+  width: 100%;
+  margin-top: 15px;
+}
+.dimension-name {
+  display: inline-block;
+  height: 27px;
+  min-width: 125px;
+  line-height: 27px;
+  font-size: 16px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #ffffff;
+  /*display: flex;*/
+  /*flex-direction: row;*/
+  /*justify-content: flex-start;*/
+  /*align-items: center;*/
+  /*margin-left: -8px;*/
+  text-align: left;
+  background: #ffcd5a;
+  border-radius: 0px 10px 0px 0px;
+  padding: 0 10px;
+}
+.dimension-name-tag {
+  width: 78px;
+  height: 27px;
+  /*text-align: left;*/
+  /*background: #FFCD5A;*/
+  /*border-radius: 0px 10px 0px 0px;*/
+}
+.dimension-name-desc {
+  /*color: #E8B643;*/
+  margin-left: 10px;
+}
+.dimension-content {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 6px 4px;
+  background: #f6f5f5;
+  border-radius: 8px;
+  margin-top: 5px;
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #505050;
+}
+.dimension-item {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  line-height: 25px;
+}
+.dimension-item-title {
+  width: 19%;
+  height: 25px;
+  font-weight: bold;
+  text-align: justify;
+  /*text-align-last: justify;*/
+  text-justify: distribute-all-lines;
+}
+.dimension-item-title::after {
+  width: 100%;
+  display: inline-block;
+  content: "";
+  /*这三个都不可以少*/
+}
+.dimension-item-mh {
+  width: 10px;
+  font-weight: bold;
+}
+.dimension-item-desc {
+  width: calc(81% - 10px);
+  text-align: left;
+}
+.fifth-floor-list {
+  font-size: 12px;
+  line-height: 20px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #575757;
+  text-align: left;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  padding-top: 15px;
+}
+.fifth-floor-list-title {
+  padding-right: 5px;
+}
+.main_class {
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+}
+</style>

+ 1349 - 0
src/renderer/componentSub/TestResults/SearchScale.vue

@@ -0,0 +1,1349 @@
+<template>
+  <div>
+    <!-- <Header /> -->
+    <!--    <div class="bgClass">-->
+    <!--      <p>-->
+    <!--        <img style="width: 100%" src="../../assets/test-bg-top.png" />-->
+    <!--      </p>-->
+    <!--      <div style="display: block; text-align: center">-->
+    <!--        <div class="test-img">-->
+    <!--          <img-->
+    <!--            style="text-align: center"-->
+    <!--            src="../../assets/test_result_title.png"-->
+    <!--          />-->
+    <!--        </div>-->
+    <!--        <div class="test-mid">-->
+    <!--          <el-row>-->
+    <!--            <el-col :span="12">-->
+    <!--              <div class="test-top-left">-->
+    <!--                <div class="display-row w100">-->
+    <!--                  <div class="total-style">总分</div>-->
+    <!--                  <div class="lang-to w100" style="">-->
+    <!--                    <div class="progress-row">-->
+    <!--                      <span>{{ totalScores }}</span-->
+    <!--                      >分-->
+    <!--                    </div>-->
+    <!--                    <div>-->
+    <!--                      <el-progress-->
+    <!--                        :text-inside="true"-->
+    <!--                        :percentage="totalScores"-->
+    <!--                      ></el-progress>-->
+    <!--                    </div>-->
+    <!--                  </div>-->
+    <!--                </div>-->
+    <!--                <p class="unscramble" v-if="improvementSuggestions != '无'">-->
+    <!--                  解读: <span>{{ improvementSuggestions }}</span>-->
+    <!--                </p>-->
+    <!--              </div>-->
+
+    <!--              <div class="test-top-left-ce">-->
+    <!--                <p class="unscramble">-->
+    <!--                  测试者:<span>{{ name }}</span>-->
+    <!--                </p>-->
+    <!--                <p class="unscramble">-->
+    <!--                  {{-->
+    <!--                    type == "0"-->
+    <!--                      ? "量表名称"-->
+    <!--                      : type == "1"-->
+    <!--                      ? "任务名称"-->
+    <!--                      : "其它"-->
+    <!--                  }}:<span>{{ tableName }}</span>-->
+    <!--                </p>-->
+    <!--                <p class="unscramble">-->
+    <!--                  测试时间:<span>{{ time }}</span>-->
+    <!--                </p>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+
+    <!--            <el-col :span="12" style="padding-top: 30px">-->
+    <!--              <img-->
+    <!--                width="250px"-->
+    <!--                height="200px"-->
+    <!--                src="../../assets/persion.png"-->
+    <!--              />-->
+    <!--            </el-col>-->
+
+    <!--            <el-col :span="24">-->
+    <!--              <div class="report-tip">-->
+    <!--                <div class="tip-title">报告阅读说明</div>-->
+    <!--                <p class="tip-desc">-->
+    <!--                  谢谢您的参与,阅读本报告时,请注意以下内容:-->
+    <!--                </p>-->
+    <!--                &lt;!&ndash;<p class="tip-content">测评图表可快速帮您掌握报告内容;</p>&ndash;&gt;-->
+    <!--                <p class="tip-content">-->
+    <!--                  本结果仅供参考,不可作为临床诊断的依据;-->
+    <!--                </p>-->
+    <!--                <p class="tip-content">-->
+    <!--                  如结果与你自己或他人感知的有出入,可回忆在测试时是否有事情影响了你,或自己答题时是否有所顾虑;-->
+    <!--                </p>-->
+    <!--                <p class="tip-content">-->
+    <!--                  如对报告有不理解的地方,建议向专业资质人员进行咨询。-->
+    <!--                </p>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+
+    <!--            <el-col :span="24">-->
+    <!--              <table class="gridtable mt20" style="width: 94%; margin: 0 auto">-->
+    <!--                <tr style="height: 60px">-->
+    <!--                  <th-->
+    <!--                    style="-->
+    <!--                      padding-top: 20px;-->
+    <!--                      border: 1px solid #e8f1f2;-->
+    <!--                      background-color: #e8f1f2;-->
+    <!--                      color: #7fc1cd;-->
+    <!--                    "-->
+    <!--                  >-->
+    <!--                    项目-->
+    <!--                  </th>-->
+    <!--                  <th-->
+    <!--                    style="-->
+    <!--                      padding-top: 20px;-->
+    <!--                      border: 1px solid #e8f1f2;-->
+    <!--                      background-color: #e8f1f2;-->
+    <!--                      color: #7fc1cd;-->
+    <!--                    "-->
+    <!--                  >-->
+    <!--                    内容-->
+    <!--                  </th>-->
+    <!--                </tr>-->
+    <!--                <tr v-for="(item, index) in resResult" :key="index">-->
+    <!--                  <td class="td-result">{{ item.name }}</td>-->
+    <!--                  <td class="td-result">-->
+    <!--                    <p align="center">-->
+    <!--                      {{ item.score }}-->
+    <!--                    </p>-->
+    <!--                  </td>-->
+    <!--                </tr>-->
+    <!--              </table>-->
+    <!--            </el-col>-->
+    <!--            <el-col :span="24"  v-show="indicator.length>0">-->
+    <!--              <StackedLine-->
+    <!--                :reference="reference"-->
+    <!--                :scoreList="scoreList"-->
+    <!--                :indicator="indicator"-->
+    <!--              ></StackedLine>-->
+    <!--            </el-col>-->
+    <!--            <el-col :span="24">-->
+    <!--              <div-->
+    <!--                class="symptomDesContent"-->
+    <!--                v-for="(value, index) in symptomDescription"-->
+    <!--                :key="index"-->
+    <!--                v-show="-->
+    <!--                  (value.symptom != '无' &&-->
+    <!--                    value.improvementSuggestions != '无') ||-->
+    <!--                  value.symptom != '无' ||-->
+    <!--                  value.improvementSuggestions != '无'-->
+    <!--                "-->
+    <!--              >-->
+    <!--&lt;!&ndash;                <div class="symptomDesTitle" v-if="value.symptom != '无'">&ndash;&gt;-->
+    <!--&lt;!&ndash;                  <span v-if="value.name && value.name != '总分'">{{ value.name }}:</span>&ndash;&gt;-->
+    <!--&lt;!&ndash;                  <span>{{ value.symptom }}</span>&ndash;&gt;-->
+    <!--&lt;!&ndash;                </div>&ndash;&gt;-->
+    <!--                    <div class="symptomDesTitle"  v-if="value.name && value.name != '总分' && value.symptom != '无'">-->
+    <!--                      <span>{{ value.name }}:</span>-->
+    <!--                      <span>{{ value.symptom }}</span>-->
+    <!--                    </div>-->
+    <!--                <div-->
+    <!--                  class="symptomDesContents"-->
+    <!--                  v-if="value.improvementSuggestions != '无'"-->
+    <!--                >-->
+    <!--                  {{ value.improvementSuggestions }}-->
+    <!--                </div>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+    <!--          </el-row>-->
+    <!--          <div class="btnArea">-->
+    <!--            <el-button type="primary" round @click="downloadPDF">PDF报告下载</el-button>-->
+    <!--            <el-button type="primary" round @click="downloadFile">下载答题记录</el-button>-->
+    <!--            <el-button class="btnArea_btn" type="primary" round @click="goBack">返回</el-button>-->
+    <!--          </div>-->
+    <!--        </div>-->
+    <!--      </div>-->
+    <!--      <p>-->
+    <!--        <img style="width: 100%" src="../../assets/test-bg-bottom.png" />-->
+    <!--      </p>-->
+    <!--    </div>-->
+
+    <div class="bgClass">
+      <div>
+        <div class="test-mid">
+          <el-row class="row-content">
+            <el-col :span="24">
+              <div class="first-floor">
+                <!--                左右图片定位-->
+                <img
+                  class="first-floor-img-left"
+                  src="../../assets/scale_report_bg_left.png"
+                  alt=""
+                />
+                <img
+                  class="first-floor-img-right"
+                  src="../../assets/scale_report_bg_right.png"
+                  alt=""
+                />
+
+                <div class="first-floor-head">
+                  <div class="first-floor-title">测试得分</div>
+                </div>
+                <div
+                  class="first-floor-name"
+                  v-if="testResultData && testResultData.userRecordEntity"
+                >
+                  <span class="first-floor-name-txt"
+                    >测试者:{{ testResultData.userRecordEntity.phone }}</span
+                  >
+                  <span>/{{ testResultData.userRecordEntity.testDate }}</span>
+                </div>
+                <div
+                  class="first-floor-scale-title"
+                  v-if="testResultData && testResultData.userRecordEntity"
+                >
+                  量表名称:{{ testResultData.userRecordEntity.name }}
+                </div>
+                <div class="first-floor-desc">
+                  <div class="first-floor-desc-title">报告阅读说明</div>
+                  <div class="first-floor-desc-txt">
+                    谢谢您的参与,阅读本报告时,请注意以下内容:本次报告结果仅供参考,不可做为临床诊断依据;如对报告有不理解的地方,建议向专业资质的人员进行咨询;
+                    如结果与你自己或他人的有出入,可回忆在测试时是否有事情影响到你,或自己答辩时是否有所顾虑。
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-if="resResult && resResult.length > 0">
+              <div class="second-floor">
+                <div class="second-floor-head">
+                  <div class="second-floor-title">分值</div>
+                </div>
+                <table class="second-floor-table">
+                  <tr class="table-th">
+                    <th style="border: 1px solid #e8f1f2">项目</th>
+                    <th style="border: 1px solid #e8f1f2">内容</th>
+                  </tr>
+                  <tr v-for="(value, index) in resResult" :key="index">
+                    <td class="td-result">{{ value.name }}</td>
+                    <td class="td-result">
+                      <p align="center">{{ value.score }}</p>
+                    </td>
+                  </tr>
+                </table>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-show="indicator && indicator.length > 0">
+              <div class="third-floor">
+                <div class="third-floor-head">
+                  <div class="third-floor-title">你的分数</div>
+                </div>
+
+                <div class="third-floor-radar">
+                  <StackedLine
+                    :reference="reference"
+                    :scoreList="scoreList"
+                    :indicator="indicator"
+                  ></StackedLine>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-if="symptomDescription && symptomDescription.length > 0">
+              <div class="fouth-floor">
+                <div class="fouth-floor-head">
+                  <div class="fouth-floor-title">结论</div>
+                </div>
+
+                <div
+                  class="dimension-warp"
+                  v-for="(list, j) in symptomDescription"
+                  :key="j"
+                >
+                  <div class="dimension-name">
+                    <span class="dimension-name-tag">维度名称</span>
+                    <span class="dimension-name-desc">{{ list.name }}</span>
+                  </div>
+                  <div class="dimension-content">
+                    <div class="dimension-item" v-if="list.score && list.score != '无'">
+                      <div class="dimension-item-title">得分</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.score }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.symptom && list.symptom != '无'"
+                    >
+                      <div class="dimension-item-title">症状</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.symptom }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="
+                        list.improvementSuggestions && list.improvementSuggestions != '无'
+                      "
+                    >
+                      <div class="dimension-item-title">维度说明</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">
+                        {{ list.improvementSuggestions }}
+                      </div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.nameExplain && list.nameExplain != '无'"
+                    >
+                      <div class="dimension-item-title">维度解读</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.nameExplain }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.suggestion && list.suggestion != '无'"
+                    >
+                      <div class="dimension-item-title">建议</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.suggestion }}</div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col
+              :span="24"
+              v-if="
+                testResultData.subject &&
+                testResultData.subject.reportReference &&
+                testResultData.subject.reportReference.length > 0
+              "
+            >
+              <div class="fifth-floor">
+                <div class="fifth-floor-head">
+                  <div class="fifth-floor-title">参考文献</div>
+                </div>
+
+                <div
+                  class="fifth-floor-list"
+                  v-for="(item, index) in replaceTxt(
+                    testResultData.subject.reportReference
+                  )"
+                  :key="index"
+                >
+                  <div class="fifth-floor-list-title">[{{ index + 1 }}]</div>
+                  <div class="fifth-floor-list-desc">{{ item }}</div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <div class="btnArea">
+            <el-button type="primary" round @click="downloadFile">下载答题记录</el-button>
+            <el-button type="primary" round @click="downloadPDF">PDF报告下载</el-button>
+            <!--              <el-button-->
+            <!--              v-if="testType == 0 && isGroup"-->
+            <!--                class="btnArea_btn"-->
+            <!--                type="primary"-->
+            <!--                round-->
+            <!--                @click="downloadReport"-->
+            <!--                >下载报告</el-button>-->
+            <el-button type="primary" round @click="goBack">返回</el-button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { mapActions } from "vuex";
+
+/**
+ * 字短说明
+ *  totalScore 总分数
+ *  symptom   解读
+ *  symptomScore  测试结果分数列表
+ *  symptomDescription  测试结果表述列表
+ *
+ */
+
+export default {
+  name: "SearchScale",
+  props: ["id", "come"],
+  data() {
+    return {
+      testResultData: {},
+      tableName: "",
+
+      totalScores: 0,
+      symptomScore: [],
+      symptomDescription: [],
+      symptom: "",
+
+      baseUrl: baseUrl,
+      resResult: [],
+      list: [],
+      userType: "", //用户类型
+      show: false,
+      sex: 0,
+      age: 0,
+      data: "",
+      tabledata1: [],
+      tabledata2: [],
+      type: "", //量表类型0是量表,1是认知任务
+      iconInfo: "", //对应图表
+      resultList: [],
+      reference: [],
+      scoreList: [],
+      indicator: [],
+      improvementSuggestions: "无",
+    };
+  },
+
+  watch: {
+    id: {
+      deep: true,
+      handler() {
+        this.inits();
+      },
+    },
+  },
+  //   mounted() {
+
+  //     this.inits();
+  //   },
+  methods: {
+    ...mapActions({
+      setMenuActive: "setMenuActive",
+    }),
+    init(v) {
+      this.totalScores = Number(parseInt(v));
+      console.log("totalScores", this.totalScores);
+    },
+    getDataList(v) {
+      let _this = this;
+      console.log("vvvvv", v);
+      v.forEach((item, index) => {
+        if (!item) return;
+        if (index === 0) {
+          _this.init(item.score);
+          _this.symptom = item.symptom;
+        }
+        _this.resResult.push({
+          name: item.name,
+          score: item.score,
+        });
+        if (item.isTotalScoreExplain === "是") {
+          _this.improvementSuggestions = item.symptom;
+        }
+        // _this.symptomDescription.push({
+        //   symptom: item.symptom,
+        //   name: item.name,
+        //   improvementSuggestions: item.improvementSuggestions,
+        // });
+
+        // 获取维度数据
+        this.symptomDescription.push(item);
+      });
+      console.log("symptomScore", this.symptomScore);
+    },
+    getOldData(data) {
+      this.resResult = [];
+      //获取旧版表格数据
+      let tableData = JSON.parse(data.userRecordEntity.testResult)[0].tableContext;
+      tableData.forEach((item) => {
+        if (!item) return;
+        this.resResult.push({
+          name: item.name,
+          score: item.value[0],
+        });
+      });
+    },
+    go1Back() {
+      //管理员用户
+      this.$router.push({
+        name: "PersonalCenter",
+        query: {
+          phone: this.$route.query.phone,
+        },
+      });
+    },
+    backMain() {
+      this.$router.push({
+        name: "MainTable",
+      });
+    },
+    getAge(strAge) {
+      var birArr = strAge.split("-");
+      var birYear = birArr[0];
+      var birMonth = birArr[1];
+      var birDay = birArr[2];
+
+      d = new Date();
+      var nowYear = d.getFullYear();
+      var nowMonth = d.getMonth() + 1; //记得加1
+      var nowDay = d.getDate();
+      var returnAge;
+
+      if (birArr == null) {
+        return false;
+      }
+      var d = new Date(birYear, birMonth - 1, birDay);
+      if (
+        d.getFullYear() == birYear &&
+        d.getMonth() + 1 == birMonth &&
+        d.getDate() == birDay
+      ) {
+        if (nowYear == birYear) {
+          returnAge = 0; //
+        } else {
+          var ageDiff = nowYear - birYear; //
+          if (ageDiff > 0) {
+            if (nowMonth == birMonth) {
+              var dayDiff = nowDay - birDay; //
+              if (dayDiff < 0) {
+                returnAge = ageDiff - 1;
+              } else {
+                returnAge = ageDiff;
+              }
+            } else {
+              var monthDiff = nowMonth - birMonth; //
+              if (monthDiff < 0) {
+                returnAge = ageDiff - 1;
+              } else {
+                returnAge = ageDiff;
+              }
+            }
+          } else {
+            return "出生日期晚于今天,数据有误"; //返回-1 表示出生日期输入错误 晚于今天
+          }
+        }
+        return returnAge;
+      } else {
+        return "输入的日期格式错误!";
+      }
+    },
+
+    inits() {
+      let _this = this;
+      // _this.id = sessionStorage.getItem("persionId");
+      _this.$http.get(`getRecordById?id=${_this.id}`, {}, (res) => {
+        //当返回正确的话
+        if (res.code == 200) {
+          let version = JSON.parse(res.data.userRecordEntity.testResult)[0].version;
+          console.log("雷达图上", res.data);
+          this.testResultData = res.data;
+
+          this.iconInfo = res.data.subject.iconInfo;
+          const datas = res.data.userRecordEntity.testResult;
+
+          if (version == 2) {
+            //专业报告新版
+            const resResultData =
+              typeof datas == "string"
+                ? JSON.parse(datas)[0].newTableContext
+                : datas[0].newTableContext;
+            if (resResultData.iconInfo != "") {
+              let indicatorList = resResultData.iconInfo.indicator;
+              let referenceList = resResultData.iconInfo.reference || [];
+              let scoreLists = resResultData.iconInfo.scoreList;
+              _this.radarFuction(indicatorList, referenceList, scoreLists);
+            }
+            _this.resultList = resResultData.result;
+            _this.getDataList(resResultData.result);
+          } else {
+            //旧版本无专业报告
+            this.getOldData(res.data);
+          }
+
+          //先获取到测试者
+          let str = res.data.userRecordEntity.fileName;
+          _this.tableName = res.data.userRecordEntity.name;
+          _this.time = res.data.userRecordEntity.testDate
+            .replace("年", "/")
+            .replace("月", "/")
+            .replace("日", " ")
+            .replace("时", ":")
+            .replace("分", ":")
+            .replace("秒", "");
+          let sd = str.split("/");
+          let sp = sd[sd.length - 1];
+          let a = sp.split("-");
+
+          _this.name = a[0];
+
+          _this.sex = a[4];
+          let b = a[1] + "-" + a[2] + "-" + a[3];
+          _this.age = _this.getAge(b);
+          // let c = a[5];
+          // let d = c.split("年");
+
+          // let e = d[1].split("月");
+
+          // let f = e[1].split("日");
+
+          // let g = f[1].split("时");
+
+          // let h = g[1].split("分");
+
+          // let p = h[1].split("秒");
+
+          // _this.time =
+          //   d[0] +
+          //   "/" +
+          //   e[0] +
+          //   "/" +
+          //   f[0] +
+          //   "  " +
+          //   g[0] +
+          //   ":" +
+          //   h[0] +
+          //   ":" +
+          //   p[0];
+          // let q = a[6].split(".");
+
+          //新增查看记录列表页不显示页签激活状态,详情页显示对应激活状态-liwenlong-2022-04-06-start
+          _this.type = res.data.userRecordEntity.type;
+          _this.type == "0"
+            ? (_this.$root.activeIndex = 0)
+            : _this.type == "1"
+            ? (_this.$root.activeIndex = 1)
+            : (_this.$root.activeIndex = -1);
+          //新增查看记录列表页不显示页签激活状态,详情页显示对应激活状态-liwenlong-2022-04-06-end
+          _this.show = true;
+        }
+
+        //if 是记忆测试,就导出多边形所需要的数据
+        //表格内的数据导出
+        if (_this.tableName == "记忆检查测试") {
+          console.log("resResult:");
+          let grade1 = res.data.userRecordEntity.testResults;
+          console.log(res.data.userRecordEntity.testResults);
+          //即时记忆总成绩
+          let grade2 = grade1.split(";");
+          console.log(grade2);
+          let grade3 = [];
+          for (let i = 0; i < grade2.length; i++) {
+            grade3.push(grade2[i].split(":"));
+          }
+          //分离字符串
+          console.log(grade3);
+          //转换成数字
+          let grade4 = [];
+          for (let i = 0; i < grade3.length; i++) {
+            grade4.push(parseInt(grade3[i][1]));
+          }
+          console.log(grade4);
+          _this.tabledata1 = [
+            grade4[2],
+            grade4[5],
+            grade4[6],
+            grade4[9],
+            grade4[10],
+            grade4[11],
+            grade4[14],
+          ];
+          _this.tabledata2 = [
+            grade4[20],
+            grade4[23],
+            grade4[24],
+            grade4[27],
+            grade4[28],
+            0,
+            0,
+          ];
+          _this.drawLine();
+        }
+      });
+    },
+    radarFuction(indicatorList, referenceList, scoreLists) {
+      let _this = this;
+      if (indicatorList.length > 0) {
+        indicatorList.forEach((data) => {
+          _this.indicator.push({ text: data.text, max: Number(data.max) });
+        });
+      }
+      if (referenceList.length > 0) {
+        referenceList.forEach((data) => {
+          _this.reference.push(Number(data));
+        });
+      }
+      if (scoreLists.length > 0) {
+        scoreLists.forEach((data) => {
+          _this.scoreList.push(Number(data));
+        });
+      }
+    },
+    //返回上一级
+    goBack() {
+      // this.$router.go(-1);
+      let userType = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528");
+      let backPage = this.$route.query.backPage;
+      let testPlanId = this.$route.query.testPlanId || "";
+      if (userType == "1") {
+        if (testPlanId) {
+          this.$router.push({
+            name: "TaskInTestPlan",
+            query: {
+              testPlanId: testPlanId,
+            },
+          });
+        } else {
+          if (backPage == 1) {
+            this.setMenuActive("/welcome/PersonalCenter");
+            this.$router.push({
+              path: "/welcome/PersonalCenter",
+            });
+          } else {
+            this.setMenuActive("/welcome/CognitiveAbility");
+            this.$router.push({
+              path: "/welcome/CognitiveAbility",
+            });
+          }
+        }
+      } else {
+        //返回认知任务
+        if (this.$route.query.type == 1) {
+          this.setMenuActive("/ContainerSys/UserRecords");
+
+          this.$router.push({
+            path: "/ContainerSys/SearchCognitiveTaskRecord",
+            query: {
+              phone: this.$route.query.phone,
+              type: 1,
+              institutionNo: sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527"),
+            },
+          });
+        }
+        //返回量表查询
+        if (this.$route.query.type == 0) {
+          this.setMenuActive("/ContainerSys/SearchScaleRecord");
+
+          this.$router.push({
+            path: "/ContainerSys/SearchScaleRecord",
+            query: {
+              phone: this.$route.query.phone,
+              type: 0,
+              institutionNo: sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527"),
+            },
+          });
+        }
+        // 返回量表测试记录按用户类型查询
+        if (this.come == 3) {
+          this.$router.push({
+            path: "/ContainerSys/SacleUserList",
+            query: {
+              name: this.tableName,
+            },
+          });
+        }
+      }
+    },
+    drawLine() {
+      this.$nextTick(() => {
+        console.log("调用了drawLine方法");
+        // 基于准备好的dom,初始化echarts实例
+        // var myChart = echarts.init(document.getElementById("myChart"));
+        let myChart = this.$echarts.init(document.getElementById("myChart"));
+        // 绘制图表
+        var option = {
+          color: ["#1AAC5C", "#FFE434"],
+          title: {
+            text: "记忆检查结果图:",
+            x: "5%",
+          },
+          legend: {
+            left: "45%",
+          },
+          radar: [
+            {
+              radius: 120,
+              startAngle: 90,
+              splitNumber: 4,
+              shape: "circle",
+              axisName: {
+                formatter: "【{value}】",
+                color: "#428BD4",
+              },
+              splitArea: {
+                areaStyle: {
+                  color: ["#77EADF", "#26C3BE", "#64AFE9", "#428BD4"],
+                  shadowColor: "rgba(0, 0, 0, 0.2)",
+                  shadowBlur: 10,
+                },
+              },
+              axisLine: {
+                lineStyle: {
+                  color: "rgba(211, 253, 250, 0.8)",
+                },
+              },
+              splitLine: {
+                lineStyle: {
+                  color: "rgba(211, 253, 250, 0.8)",
+                },
+              },
+            },
+            {
+              indicator: [
+                { text: "指向记忆", max: 48 },
+                { text: "词汇联想", max: 12 },
+                { text: "图像自由回忆", max: 30 },
+                { text: "图片联想", max: 30 },
+                { text: "人像特点", max: 18 },
+                { text: "视觉空间", max: 16 },
+                { text: "前瞻记忆", max: 160 },
+              ],
+              center: ["35%", "60%"],
+              radius: 200,
+              splitNumber: 0,
+              axisName: {
+                color: "#fff",
+                backgroundColor: "#666",
+                borderRadius: 3,
+                padding: [3, 5],
+              },
+            },
+          ],
+          series: [
+            {
+              type: "radar",
+              radarIndex: 1,
+              data: [
+                {
+                  value: this.tabledata1,
+                  name: "即时记忆",
+                  symbol: "rect",
+                  symbolSize: 12,
+                  lineStyle: {
+                    type: "dashed",
+                  },
+                  label: {
+                    show: true,
+                    formatter: function (params) {
+                      return params.value;
+                    },
+                  },
+                  areaStyle: {
+                    color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
+                      {
+                        color: "rgba(12, 222, 115, 0.5)",
+                        offset: 0,
+                      },
+                      {
+                        color: "rgba(12, 222, 115, 0.5)",
+                        offset: 1,
+                      },
+                    ]),
+                  },
+                },
+                {
+                  value: this.tabledata2,
+                  name: "延时记忆",
+                  label: {
+                    show: true,
+                    formatter: function (params) {
+                      return params.value;
+                    },
+                  },
+                  areaStyle: {
+                    color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
+                      {
+                        color: "rgba(255,228,52, 0.5)",
+                        offset: 0,
+                      },
+                      {
+                        color: "rgba(255,228,52, 0.5)",
+                        offset: 1,
+                      },
+                    ]),
+                  },
+                },
+              ],
+            },
+          ],
+        };
+        option && myChart.setOption(option);
+      });
+    },
+    replaceTxt(str) {
+      return str.split("//");
+    },
+    downloadFile() {
+      if (this.tableName == "画钟测试") {
+        window.open(`${baseUrl}result/download/CDTImg?id=${this.id}`, "_blank");
+      }
+      window.open(`${baseUrl}result/download/testResult?id=${this.id}`, "_blank");
+    },
+    downloadPDF() {
+      window.open(`${baseUrl}result/download/testResultPdf?id=${this.id}`, "_blank");
+    },
+  },
+};
+</script>
+<style scoped>
+.btnArea {
+  margin: 20px 0;
+  /*text-align: center;*/
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+}
+.cardList {
+  width: 100%;
+  display: block;
+  text-align: center;
+}
+.cardList ul li {
+  padding: 20px 15px;
+  box-sizing: border-box;
+  display: flex;
+  text-align: left;
+  line-height: 1.6;
+  cursor: pointer;
+  border-bottom: 0.5px solid #898989;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li h2 {
+  font-size: 20px;
+  color: #333333;
+}
+
+.cardList ul li p {
+  font-size: 16px;
+  color: #666666;
+}
+
+.cardList ul li .content {
+  width: 600px;
+  font-size: 14px;
+  display: -webkit-box;
+  color: #898989;
+}
+
+.pageNationBox {
+  padding: 20px 10px;
+}
+.view-text {
+  /**
+        思路:
+        1.设置inline-block属相
+        2.强制不换行
+        3.固定高度
+        4.隐藏超出部分
+        5.显示“……”
+      */
+  display: inline-block;
+  word-break: keep-all;
+  white-space: nowrap;
+  width: 960px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.imgSiz {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.lang-to {
+  font-size: 36px;
+  font-family: SSruiyuanTi-, SSruiyuanTi;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+}
+
+.unscramble {
+  font-size: 22px;
+  font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+  margin-top: 20px;
+}
+
+.widthTest {
+  display: block;
+  width: 80%;
+  text-align: center;
+  margin-left: 10%;
+}
+.wt1 {
+  width: 80%;
+}
+
+.bgClass {
+  width: 100%;
+  /*background: #c7eaf0;*/
+  background: url("../../assets/scale_report_bg.png") no-repeat center top,
+    linear-gradient(180deg, #3ecee6 0%, rgba(166, 232, 245, 0.63) 100%);
+  background-size: 100% auto;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+}
+.test-mid {
+  width: 780px;
+  height: auto;
+  border-radius: 6px 6px 6px 6px;
+  padding-top: 160px;
+}
+.test-img {
+  width: 720px;
+  display: inline-block;
+  text-align: center;
+  position: absolute;
+  margin-top: -20px;
+}
+.test-top-left {
+  color: #7fc1cd;
+  padding-top: 40px;
+  margin-top: 40px;
+  margin-left: 20px;
+  border-radius: 4px;
+  padding-left: 20px;
+}
+.test-top-left-ce {
+  width: 100%;
+  margin-left: 20px;
+  border-radius: 4px;
+  padding-left: 20px;
+  /*height: 160px;*/
+  color: #7fc1cd;
+}
+.tr-result {
+  height: 40px;
+}
+.td-result {
+  width: 50%;
+  line-height: 40px;
+  border: 1px solid #e8f1f2;
+}
+.progress-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.total-style {
+  width: 120px;
+  font-weight: bold;
+  font-size: 30px;
+  text-align: left;
+}
+::v-deep .el-progress-bar__inner {
+  background-color: #57acbb !important;
+  background-image: linear-gradient(to right, #57acbb, #57acbb) !important;
+}
+::v-deep .el-progress__text {
+  display: none;
+}
+.symptomDesContent {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-start;
+  width: 94%;
+  margin: 0 auto;
+  margin-top: 20px;
+}
+.symptomDesTitle {
+  width: 100%;
+  font-size: 18px;
+  font-weight: bold;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+  text-align: left;
+}
+.symptomDesContents {
+  text-align: left;
+  margin-top: 10px;
+  width: 100%;
+  text-indent: 2em;
+}
+
+.td-result {
+  width: 50%;
+  font-size: 14px;
+  line-height: 35px;
+  border: 1px solid #e8f1f2;
+}
+.table-th {
+  height: 35px;
+  line-height: 35px;
+  font-size: 16px;
+  background: #48e4e9 !important;
+  color: #fff;
+}
+.report-tip {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 20px 0 10px 20px;
+  text-align: left;
+}
+.tip-title {
+  width: 100px;
+  height: 30px;
+  font-size: 14px;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #308594;
+  line-height: 30px;
+  text-align: center;
+  background-image: linear-gradient(to right, #6fc1cf, #deeff4);
+  border-top-right-radius: 15px;
+  border-bottom-left-radius: 15px;
+}
+.tip-desc {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #666666;
+  line-height: 30px;
+  padding-left: 20px;
+}
+.tip-content {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #000;
+  line-height: 25px;
+  display: list-item;
+  list-style-type: disc;
+  margin-left: 36px;
+}
+
+.row-content {
+  margin-bottom: 30px;
+}
+.first-floor {
+  position: relative;
+}
+.first-floor-img-left {
+  width: 90px;
+  height: 90px;
+  position: absolute;
+  z-index: 10;
+  left: -45px;
+  top: -45px;
+}
+.first-floor-img-right {
+  width: 110px;
+  height: 110px;
+  position: absolute;
+  z-index: 10;
+  right: 0;
+  top: 0;
+}
+
+.first-floor,
+.second-floor,
+.third-floor,
+.fouth-floor,
+.fifth-floor {
+  width: 100%;
+  background: #ffffff;
+  border-radius: 15px;
+  /*overflow: hidden;*/
+  box-sizing: border-box;
+  padding: 0 20px 50px;
+}
+.first-floor-head,
+.second-floor-head,
+.third-floor-head,
+.fouth-floor-head,
+.fifth-floor-head {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+.first-floor-title,
+.second-floor-title,
+.third-floor-title,
+.fouth-floor-title,
+.fifth-floor-title {
+  width: 280px;
+  height: 35px;
+  background: #f79ecc;
+  text-align: center;
+  line-height: 35px;
+  font-size: 16px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #ffffff;
+  border-radius: 0px 0px 10px 10px;
+}
+.first-floor-name {
+  font-size: 12px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: bold;
+  color: #196371;
+  margin-top: 15px;
+}
+.first-floor-name-txt {
+  margin-right: 20px;
+}
+.first-floor-scale-title {
+  font-size: 18px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: 800;
+  color: #196371;
+  margin: 10px 0;
+}
+.first-floor-desc {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 15px 10px;
+  background: linear-gradient(180deg, #ffffff 0%, #ffdfd8 100%);
+  border-radius: 10px;
+}
+.first-floor-desc-title {
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+.first-floor-desc-txt {
+  font-size: 12px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+
+.second-floor-table {
+  width: 100%;
+  margin-top: 25px;
+  border-radius: 5px;
+  overflow: hidden;
+  text-align: center;
+}
+.second-floor-table tr:nth-child(2n-1) {
+  background: #bff2fc;
+}
+.second-floor-table tr:nth-child(2n) {
+  background: #ecfcff;
+}
+.second-floor-title {
+  background: #f6a832;
+}
+.third-floor-title {
+  background: #f79ecc;
+}
+.fouth-floor-title {
+  background: #7cbf74;
+}
+.fifth-floor-title {
+  background: #2d9cff;
+}
+
+.third-floor-radar {
+  width: 100%;
+  margin-top: 25px;
+}
+
+.dimension-warp {
+  width: 100%;
+  margin-top: 15px;
+}
+.dimension-name {
+  display: inline-block;
+  height: 27px;
+  min-width: 125px;
+  line-height: 27px;
+  font-size: 16px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #ffffff;
+  /*display: flex;*/
+  /*flex-direction: row;*/
+  /*justify-content: flex-start;*/
+  /*align-items: center;*/
+  /*margin-left: -8px;*/
+  text-align: left;
+  background: #ffcd5a;
+  border-radius: 0px 10px 0px 0px;
+  padding: 0 10px;
+}
+.dimension-name-tag {
+  width: 78px;
+  height: 27px;
+  /*text-align: left;*/
+  /*background: #FFCD5A;*/
+  /*border-radius: 0px 10px 0px 0px;*/
+}
+.dimension-name-desc {
+  /*color: #E8B643;*/
+  margin-left: 10px;
+}
+.dimension-content {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 6px 4px;
+  background: #f6f5f5;
+  border-radius: 8px;
+  margin-top: 5px;
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #505050;
+}
+.dimension-item {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  line-height: 25px;
+}
+.dimension-item-title {
+  width: 19%;
+  height: 25px;
+  font-weight: bold;
+  text-align: justify;
+  /*text-align-last: justify;*/
+  text-justify: distribute-all-lines;
+}
+.dimension-item-title::after {
+  width: 100%;
+  display: inline-block;
+  content: "";
+  /*这三个都不可以少*/
+}
+.dimension-item-mh {
+  width: 10px;
+  font-weight: bold;
+}
+.dimension-item-desc {
+  width: calc(81% - 10px);
+  text-align: left;
+}
+.fifth-floor-list {
+  font-size: 12px;
+  line-height: 20px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #575757;
+  text-align: left;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  padding-top: 15px;
+}
+.fifth-floor-list-title {
+  padding-right: 5px;
+}
+</style>

+ 1003 - 0
src/renderer/componentSub/TestResults/index.vue

@@ -0,0 +1,1003 @@
+<template>
+  <div>
+    <!-- <Header /> -->
+    <!--    <div class="bgClass">-->
+
+    <!--      <p>-->
+    <!--        <img style="width: 100%" src="../../assets/test-bg-top.png" />-->
+    <!--      </p>-->
+    <!--      <div style="display: block; text-align: center">-->
+    <!--        <div class="test-img">-->
+    <!--          <img-->
+    <!--            style="text-align: center"-->
+    <!--            src="../../assets/test_result_title.png"-->
+    <!--          />-->
+    <!--        </div>-->
+    <!--        <div class="test-mid">-->
+    <!--          <el-row>-->
+    <!--            <el-col :span="12">-->
+    <!--              <div class="test-top-left">-->
+    <!--                <div class="display-row w100">-->
+    <!--                  <div class="total-style">总分</div>-->
+    <!--                  <div class="lang-to w100" style="">-->
+    <!--                    <div class="progress-row">-->
+    <!--                      <span>{{ totalScores.toFixed(2) }}</span-->
+    <!--                      >分-->
+    <!--                    </div>-->
+    <!--                    <div>-->
+    <!--                      <el-progress-->
+    <!--                        :text-inside="true"-->
+    <!--                        :percentage="totalScores"-->
+    <!--                      ></el-progress>-->
+    <!--                    </div>-->
+    <!--                  </div>-->
+    <!--                </div>-->
+    <!--                <p class="unscramble" v-if="improvementSuggestions != '无'">-->
+    <!--                  解读: <span>{{ improvementSuggestions }}</span>-->
+    <!--                </p>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+    <!--            <el-col :span="12" style="padding-top: 30px">-->
+    <!--              <img-->
+    <!--                width="250px"-->
+    <!--                height="200px"-->
+    <!--                src="../../assets/persion.png"-->
+    <!--              />-->
+    <!--            </el-col>-->
+
+    <!--            <el-col :span="24">-->
+    <!--              <div class="report-tip">-->
+    <!--                <div class="tip-title">报告阅读说明</div>-->
+    <!--                <p class="tip-desc">-->
+    <!--                  谢谢您的参与,阅读本报告时,请注意以下内容:-->
+    <!--                </p>-->
+    <!--                &lt;!&ndash;<p class="tip-content">测评图表可快速帮您掌握报告内容;</p>&ndash;&gt;-->
+    <!--                <p class="tip-content">-->
+    <!--                  本结果仅供参考,不可作为临床诊断的依据;-->
+    <!--                </p>-->
+    <!--                <p class="tip-content">-->
+    <!--                  如结果与你自己或他人感知的有出入,可回忆在测试时是否有事情影响了你,或自己答题时是否有所顾虑;-->
+    <!--                </p>-->
+    <!--                <p class="tip-content">-->
+    <!--                  如对报告有不理解的地方,建议向专业资质人员进行咨询。-->
+    <!--                </p>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+
+    <!--            <el-col :span="24">-->
+    <!--              <table class="gridtable mt20" style="width: 94%; margin: 0 auto">-->
+    <!--                <tr style="height: 60px">-->
+    <!--                  <th-->
+    <!--                    style="-->
+    <!--                      padding-top: 20px;-->
+    <!--                      border: 1px solid #e8f1f2;-->
+    <!--                      background-color: #e8f1f2;-->
+    <!--                      color: #7fc1cd;-->
+    <!--                    "-->
+    <!--                  >-->
+    <!--                    项目-->
+    <!--                  </th>-->
+    <!--                  <th-->
+    <!--                    style="-->
+    <!--                      padding-top: 20px;-->
+    <!--                      border: 1px solid #e8f1f2;-->
+    <!--                      background-color: #e8f1f2;-->
+    <!--                      color: #7fc1cd;-->
+    <!--                    "-->
+    <!--                  >-->
+    <!--                    内容-->
+    <!--                  </th>-->
+    <!--                </tr>-->
+    <!--                <tr v-for="(value, index) in symptomScore" :key="index">-->
+    <!--                  <td class="td-result">{{ value.name }}</td>-->
+    <!--                  <td class="td-result">-->
+    <!--                    <p align="center">-->
+    <!--                      {{ value.score }}-->
+    <!--                    </p>-->
+    <!--                  </td>-->
+    <!--                </tr>-->
+    <!--              </table>-->
+    <!--            </el-col>-->
+    <!--            <el-col :span="24" v-show="indicator.length > 0">-->
+    <!--              <StackedLine-->
+    <!--                :reference="reference"-->
+    <!--                :scoreList="scoreList"-->
+    <!--                :indicator="indicator"-->
+    <!--              ></StackedLine>-->
+    <!--            </el-col>-->
+    <!--            <el-col :span="24">-->
+    <!--              <div-->
+    <!--                class="symptomDesContent"-->
+    <!--                v-for="(value, index) in symptomDescription"-->
+    <!--                :key="index"-->
+    <!--                v-show="-->
+    <!--                  (value.symptom != '无' &&-->
+    <!--                    value.improvementSuggestions != '无') ||-->
+    <!--                  value.symptom != '无' ||-->
+    <!--                  value.improvementSuggestions != '无'-->
+    <!--                "-->
+    <!--              >-->
+    <!--&lt;!&ndash;                <div class="symptomDesTitle" v-if="value.symptom != '无'">&ndash;&gt;-->
+    <!--&lt;!&ndash;                  <span >{{ value.name }}:</span>&ndash;&gt;-->
+    <!--&lt;!&ndash;                  <span v-if="value.symptom != '无'">{{ value.symptom }}</span>&ndash;&gt;-->
+    <!--&lt;!&ndash;                </div>&ndash;&gt;-->
+    <!--                <div class="symptomDesTitle" v-if="value.name && value.name !='总分' && value.symptom != '无'">-->
+    <!--                  <span >{{ value.name }}:</span>-->
+    <!--                  <span v-if="value.symptom != '无'">{{ value.symptom }}</span>-->
+    <!--                </div>-->
+    <!--                <div-->
+    <!--                  class="symptomDesContents"-->
+    <!--                  v-if="value.improvementSuggestions != '无'"-->
+    <!--                >-->
+    <!--                  {{ value.improvementSuggestions }}-->
+    <!--                </div>-->
+    <!--              </div>-->
+    <!--            </el-col>-->
+    <!--          </el-row>-->
+
+    <!--          <div class="btnArea">-->
+    <!--            <el-button type="primary" round @click="downloadPDF">PDF报告下载</el-button>-->
+    <!--            <el-button-->
+    <!--                class="btnArea_btn"-->
+    <!--                type="primary"-->
+    <!--                round-->
+    <!--                @click="downloadFile"-->
+    <!--            >下载答题记录</el-button>-->
+    <!--            &lt;!&ndash;              <el-button&ndash;&gt;-->
+    <!--            &lt;!&ndash;              v-if="testType == 0 && isGroup"&ndash;&gt;-->
+    <!--            &lt;!&ndash;                class="btnArea_btn"&ndash;&gt;-->
+    <!--            &lt;!&ndash;                type="primary"&ndash;&gt;-->
+    <!--            &lt;!&ndash;                round&ndash;&gt;-->
+    <!--            &lt;!&ndash;                @click="downloadReport"&ndash;&gt;-->
+    <!--            &lt;!&ndash;                >下载报告</el-button>&ndash;&gt;-->
+    <!--            <el-button-->
+    <!--                class="btnArea_btn"-->
+    <!--                type="primary"-->
+    <!--                round-->
+    <!--                @click="goBack"-->
+    <!--            >返回</el-button>-->
+    <!--          </div>-->
+
+    <!--        </div>-->
+    <!--      </div>-->
+    <!--      <p>-->
+    <!--        <img style="width: 100%" src="../../assets/test-bg-bottom.png" />-->
+    <!--      </p>-->
+    <!--    </div>-->
+
+    <div class="bgClass">
+      <div>
+        <div class="test-mid">
+          <el-row class="row-content">
+            <el-col :span="24">
+              <div class="first-floor">
+                <!--                左右图片定位-->
+                <img
+                  class="first-floor-img-left"
+                  src="../../assets/scale_report_bg_left.png"
+                  alt=""
+                />
+                <img
+                  class="first-floor-img-right"
+                  src="../../assets/scale_report_bg_right.png"
+                  alt=""
+                />
+
+                <div class="first-floor-head">
+                  <div class="first-floor-title">测试得分</div>
+                </div>
+                <div class="first-floor-name">
+                  <span class="first-floor-name-txt"
+                    >测试者:{{ tableData.userRecordEntity.phone }}</span
+                  >
+                  <span>/{{ tableData.userRecordEntity.testDate }}</span>
+                </div>
+                <div class="first-floor-scale-title">
+                  量表名称:{{ tableData.userRecordEntity.name }}
+                </div>
+                <div class="first-floor-desc">
+                  <div class="first-floor-desc-title">报告阅读说明</div>
+                  <div class="first-floor-desc-txt">
+                    谢谢您的参与,阅读本报告时,请注意以下内容:本次报告结果仅供参考,不可做为临床诊断依据;如对报告有不理解的地方,建议向专业资质的人员进行咨询;
+                    如结果与你自己或他人的有出入,可回忆在测试时是否有事情影响到你,或自己答辩时是否有所顾虑。
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24">
+              <div class="second-floor">
+                <div class="second-floor-head">
+                  <div class="second-floor-title">分值</div>
+                </div>
+                <table class="second-floor-table">
+                  <tr class="table-th">
+                    <th style="border: 1px solid #e8f1f2">项目</th>
+                    <th style="border: 1px solid #e8f1f2">内容</th>
+                  </tr>
+                  <tr v-for="(value, index) in symptomScore" :key="index">
+                    <td class="td-result">{{ value.name }}</td>
+                    <td class="td-result">
+                      <p align="center">{{ value.score }}</p>
+                    </td>
+                  </tr>
+                </table>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-show="indicator.length > 0">
+              <div class="third-floor">
+                <div class="third-floor-head">
+                  <div class="third-floor-title">你的分数</div>
+                </div>
+
+                <div class="third-floor-radar">
+                  <StackedLine
+                    :reference="reference"
+                    :scoreList="scoreList"
+                    :indicator="indicator"
+                  ></StackedLine>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col :span="24" v-if="symptomDescription && symptomDescription.length > 0">
+              <div class="fouth-floor">
+                <div class="fouth-floor-head">
+                  <div class="fouth-floor-title">结论</div>
+                </div>
+
+                <div
+                  class="dimension-warp"
+                  v-for="(list, j) in symptomDescription"
+                  :key="j"
+                >
+                  <div class="dimension-name">
+                    <span class="dimension-name-tag">维度名称</span>
+                    <span class="dimension-name-desc">{{ list.name }}</span>
+                  </div>
+                  <div class="dimension-content">
+                    <div class="dimension-item" v-if="list.score && list.score != '无'">
+                      <div class="dimension-item-title">得分</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.score }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.symptom && list.symptom != '无'"
+                    >
+                      <div class="dimension-item-title">症状</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.symptom }}</div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="
+                        list.improvementSuggestions && list.improvementSuggestions != '无'
+                      "
+                    >
+                      <div class="dimension-item-title">维度说明</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">
+                        {{ list.improvementSuggestions }}
+                      </div>
+                    </div>
+                    <div
+                      class="dimension-item"
+                      v-if="list.suggestion && list.suggestion != '无'"
+                    >
+                      <div class="dimension-item-title">建议</div>
+                      <div class="dimension-item-mh">:</div>
+                      <div class="dimension-item-desc">{{ list.suggestion }}</div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <el-row class="row-content">
+            <el-col
+              :span="24"
+              v-if="
+                tableData.subject.reportReference &&
+                tableData.subject.reportReference.length > 0
+              "
+            >
+              <div class="fifth-floor">
+                <div class="fifth-floor-head">
+                  <div class="fifth-floor-title">参考文献</div>
+                </div>
+
+                <div
+                  class="fifth-floor-list"
+                  v-for="(item, index) in replaceTxt(tableData.subject.reportReference)"
+                  :key="index"
+                >
+                  <div class="fifth-floor-list-title">[{{ index + 1 }}]</div>
+                  <div class="fifth-floor-list-desc">{{ item }}</div>
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <div class="btnArea">
+            <el-button type="primary" round @click="downloadFile">下载答题记录</el-button>
+            <el-button type="primary" round @click="downloadPDF">PDF报告下载</el-button>
+            <!--              <el-button-->
+            <!--              v-if="testType == 0 && isGroup"-->
+            <!--                class="btnArea_btn"-->
+            <!--                type="primary"-->
+            <!--                round-->
+            <!--                @click="downloadReport"-->
+            <!--                >下载报告</el-button>-->
+            <el-button type="primary" round @click="goBack">返回</el-button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+/**
+ * 字短说明
+ *  totalScore 总分数
+ *  symptom   解读
+ *  symptomScore  测试结果分数列表
+ *  symptomDescription  测试结果表述列表
+ *
+ */
+
+export default {
+  name: "TestResults",
+  props: ["tableData"],
+  data() {
+    return {
+      totalScores: 0,
+      symptomScore: [],
+      symptomDescription: [],
+      symptom: "",
+      reference: [],
+      scoreList: [],
+      indicator: [],
+      improvementSuggestions: "无",
+      testPlanId: "", //测试id
+      testType: "", //任务类型0-量表,1-认知任务
+      isGroup: process.env.VUE_APP_GROUP,
+      id: "",
+    };
+  },
+
+  watch: {
+    tableData: {
+      handler(val) {
+        this.getDataList(val);
+      },
+    },
+  },
+  methods: {
+    init(v) {
+      this.totalScores = Number(parseInt(v));
+      this.testPlanId = this.tableData.testPlanId;
+      //   this.testType = this.tableData.testType;
+      // console.log("totalScores", this.tableData);
+    },
+    getDataList(data) {
+      let _this = this;
+      console.log("-----传入的参数data----->", data);
+
+      let v = JSON.parse(data.userRecordEntity.testResult);
+      this.testType = data.subject.type;
+      this.id = data.userRecordEntity.id;
+      console.log("-----传入的参数----->", v);
+
+      // JSON.parse(data.data.)
+      v.forEach((items) => {
+        if (items.newTableContext.iconInfo != "") {
+          let indicatorList = items.newTableContext.iconInfo.indicator;
+
+          if (indicatorList.length > 0) {
+            indicatorList.forEach((data) => {
+              _this.indicator.push({ text: data.text, max: Number(data.max) });
+            });
+          }
+          let referenceList = items.newTableContext.iconInfo.reference || [];
+          if (referenceList.length > 0) {
+            referenceList.forEach((data) => {
+              _this.reference.push(Number(data));
+            });
+          }
+          let scoreLists = items.newTableContext.iconInfo.scoreList;
+          if (scoreLists.length > 0) {
+            scoreLists.forEach((data) => {
+              _this.scoreList.push(Number(data));
+            });
+          }
+        }
+
+        items.newTableContext.result.forEach((item) => {
+          if (!item) return;
+          if (item.name === "总分" || item.name === "压力综合指数") {
+            _this.init(item.score);
+            _this.symptom = item.symptom;
+          }
+          if (item.isTotalScoreExplain === "是") {
+            _this.improvementSuggestions = item.symptom;
+          }
+
+          _this.symptomScore.push({ name: item.name, score: item.score });
+          // _this.symptomDescription.push({
+          //   symptom: item.symptom,
+          //   name: item.name,
+          //   improvementSuggestions: item.improvementSuggestions,
+          // });
+
+          // 获取维度数据
+          this.symptomDescription.push(item);
+        });
+        console.log("0000000", items);
+      });
+    },
+    //   radarFuction(indicatorList, referenceList, scoreLists) {
+    //   let _this = this;
+    //   if (indicatorList.length > 0) {
+    //     indicatorList.forEach((data) => {
+    //       _this.indicator.push({ text: data.text, max: Number(data.max) });
+    //     });
+    //   }
+    //   if (referenceList.length > 0) {
+    //     referenceList.forEach((data) => {
+    //       _this.reference.push(Number(data));
+    //     });
+    //   }
+    //   if (scoreLists.length > 0) {
+    //     scoreLists.forEach((data) => {
+    //       _this.scoreList.push(Number(data));
+    //     });
+    //   }
+    // },
+    goBack() {
+      // this.$router.push("/welcome/mainTable");
+      if (this.testPlanId) {
+        // this.$router.push({
+        //     name: 'TestPlan',
+        //     params: {}
+        // });
+
+        this.$router.push({
+          name: "TaskInTestPlan",
+          query: {
+            testPlanId: this.testPlanId,
+          },
+          // params: {
+          //   name: this.testPlanList.name,
+          //   status: this.testPlanList.status,
+          //   institutionNo: this.name,
+          // },
+        });
+      } else {
+        //  this.$router.push("/welcome/mainTable");
+        if (this.testType && this.testType == 0) {
+          //跳量表
+          this.$router.push("/welcome/mainTable");
+        } else if (this.testType && this.testType == 1) {
+          //跳认知任务
+          this.$router.push("/welcome/CognitiveAbility");
+        } else {
+          //跳量表页
+          this.$router.push("/welcome/mainTable");
+        }
+      }
+    },
+    replaceTxt(str) {
+      return str.split("//");
+    },
+    downloadFile() {
+      if (this.tableName == "画钟测试") {
+        window.open(`${baseUrl}result/download/CDTImg?id=${this.id}`, "_blank");
+      }
+      window.open(`${baseUrl}result/download/testResult?id=${this.id}`, "_blank");
+    },
+
+    downloadReport() {
+      window.open(`${baseUrl}result/download/testResultPdf?id=${this.id}`, "_blank");
+    },
+    downloadPDF() {
+      window.open(`${baseUrl}result/download/testResultPdf?id=${this.id}`, "_blank");
+    },
+  },
+};
+</script>
+<style scoped>
+.btnArea {
+  margin: 20px 0;
+  /*text-align: center;*/
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+}
+.cardList {
+  width: 100%;
+  display: block;
+  text-align: center;
+}
+.cardList ul li {
+  padding: 20px 15px;
+  box-sizing: border-box;
+  display: flex;
+  text-align: left;
+  line-height: 1.6;
+  cursor: pointer;
+  border-bottom: 0.5px solid #898989;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li img {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.cardList ul li h2 {
+  font-size: 20px;
+  color: #333333;
+}
+
+.cardList ul li p {
+  font-size: 16px;
+  color: #666666;
+}
+
+.cardList ul li .content {
+  width: 600px;
+  font-size: 14px;
+  display: -webkit-box;
+  color: #898989;
+}
+
+.pageNationBox {
+  padding: 20px 10px;
+}
+.view-text {
+  /**
+        思路:
+        1.设置inline-block属相
+        2.强制不换行
+        3.固定高度
+        4.隐藏超出部分
+        5.显示“……”
+      */
+  display: inline-block;
+  word-break: keep-all;
+  white-space: nowrap;
+  width: 960px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.imgSiz {
+  width: 120px;
+  height: 75px;
+  margin-right: 15px;
+}
+
+.lang-to {
+  font-size: 36px;
+  font-family: SSruiyuanTi-, SSruiyuanTi;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+}
+
+.unscramble {
+  font-size: 26px;
+  font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
+  font-weight: normal;
+  color: #7fc1cd;
+  text-align: left;
+  margin-top: 20px;
+}
+
+.bgClass {
+  width: 100%;
+  /*background: #c7eaf0;*/
+  background: url("../../assets/scale_report_bg.png") no-repeat center top,
+    linear-gradient(180deg, #3ecee6 0%, rgba(166, 232, 245, 0.63) 100%);
+  background-size: 100% auto;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+}
+.test-mid {
+  width: 780px;
+  height: auto;
+  border-radius: 6px 6px 6px 6px;
+  padding-top: 160px;
+}
+.test-img {
+  width: 720px;
+  display: inline-block;
+  text-align: center;
+  position: absolute;
+  margin-top: -20px;
+}
+.test-top-left {
+  color: #7fc1cd;
+  padding-top: 40px;
+  margin-top: 40px;
+  margin-left: 20px;
+  border-radius: 4px;
+  padding-left: 20px;
+}
+.tr-result {
+  height: 40px;
+}
+.td-result {
+  width: 50%;
+  line-height: 40px;
+  border: 1px solid #e8f1f2;
+}
+.progress-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.total-style {
+  width: 120px;
+  font-weight: bold;
+  font-size: 30px;
+  text-align: left;
+}
+::v-deep .el-progress-bar__inner {
+  background-color: #57acbb !important;
+  background-image: linear-gradient(to right, #57acbb, #57acbb) !important;
+}
+::v-deep .el-progress__text {
+  display: none;
+}
+.symptomDesContent {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-start;
+  width: 94%;
+  margin: 0 auto;
+  margin-top: 20px;
+}
+.symptomDesTitle {
+  width: 100%;
+  font-size: 18px;
+  font-weight: bold;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+  text-align: left;
+}
+.symptomDesContents {
+  text-align: left;
+  margin-top: 10px;
+  width: 100%;
+  text-indent: 2em;
+}
+
+.report-tip {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 20px 0 10px 20px;
+  text-align: left;
+}
+.tip-title {
+  width: 100px;
+  height: 30px;
+  font-size: 14px;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #308594;
+  line-height: 30px;
+  text-align: center;
+  background-image: linear-gradient(to right, #6fc1cf, #deeff4);
+  border-top-right-radius: 15px;
+  border-bottom-left-radius: 15px;
+}
+.tip-desc {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #666666;
+  line-height: 30px;
+  padding-left: 20px;
+}
+.tip-content {
+  box-sizing: border-box;
+  font-size: 12px;
+  font-family: PingFang SC;
+  color: #000;
+  line-height: 25px;
+  display: list-item;
+  list-style-type: disc;
+  margin-left: 36px;
+}
+
+.td-result {
+  width: 50%;
+  font-size: 14px;
+  line-height: 35px;
+  border: 1px solid #e8f1f2;
+}
+.table-th {
+  height: 35px;
+  line-height: 35px;
+  font-size: 16px;
+  background: #48e4e9 !important;
+  color: #fff;
+}
+.report-tip {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 12px 0;
+  text-align: left;
+  font-size: 12px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #ffffff;
+}
+.tip-title {
+  width: 100px;
+  /*height: 35px;*/
+  /*font-size: 14px;*/
+  /*font-family: PingFang SC;*/
+  /*font-weight: 500;*/
+  /*color: #308594;*/
+  /*line-height: 35px;*/
+  /*text-align: center;*/
+  /*background-image: linear-gradient(to right, #6fc1cf,#deeff4);*/
+  /*border-top-right-radius: 18px;*/
+  /*border-bottom-left-radius: 18px;*/
+}
+.tip-desc {
+  box-sizing: border-box;
+  /*font-size: 12px;*/
+  /*font-family: PingFang SC;*/
+  /*color: #666666;*/
+  line-height: 30px;
+  /*padding-left: 10px;*/
+  opacity: 0.8;
+}
+.tip-content {
+  box-sizing: border-box;
+  /*font-size: 12px;*/
+  /*font-family: PingFang SC;*/
+  /*color: #000;*/
+  line-height: 20px;
+  display: list-item;
+  list-style-type: disc;
+  margin-left: 20px;
+  opacity: 0.8;
+}
+
+.row-content {
+  margin-bottom: 30px;
+}
+.first-floor {
+  position: relative;
+}
+.first-floor-img-left {
+  width: 90px;
+  height: 90px;
+  position: absolute;
+  z-index: 10;
+  left: -45px;
+  top: -45px;
+}
+.first-floor-img-right {
+  width: 110px;
+  height: 110px;
+  position: absolute;
+  z-index: 10;
+  right: 0;
+  top: 0;
+}
+
+.first-floor,
+.second-floor,
+.third-floor,
+.fouth-floor,
+.fifth-floor {
+  width: 100%;
+  background: #ffffff;
+  border-radius: 15px;
+  /*overflow: hidden;*/
+  box-sizing: border-box;
+  padding: 0 20px 50px;
+}
+.first-floor-head,
+.second-floor-head,
+.third-floor-head,
+.fouth-floor-head,
+.fifth-floor-head {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+.first-floor-title,
+.second-floor-title,
+.third-floor-title,
+.fouth-floor-title,
+.fifth-floor-title {
+  width: 280px;
+  height: 35px;
+  background: #f79ecc;
+  text-align: center;
+  line-height: 35px;
+  font-size: 16px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #ffffff;
+  border-radius: 0px 0px 10px 10px;
+}
+.first-floor-name {
+  font-size: 12px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: bold;
+  color: #196371;
+  margin-top: 15px;
+}
+.first-floor-name-txt {
+  margin-right: 20px;
+}
+.first-floor-scale-title {
+  font-size: 18px;
+  font-family: PingFang SC-Heavy, PingFang SC;
+  font-weight: 800;
+  color: #196371;
+  margin: 10px 0;
+}
+.first-floor-desc {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 15px 10px;
+  background: linear-gradient(180deg, #ffffff 0%, #ffdfd8 100%);
+  border-radius: 10px;
+}
+.first-floor-desc-title {
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+.first-floor-desc-txt {
+  font-size: 12px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #2ec2df;
+}
+
+.second-floor-table {
+  width: 100%;
+  margin-top: 25px;
+  border-radius: 5px;
+  overflow: hidden;
+  text-align: center;
+}
+.second-floor-table tr:nth-child(2n-1) {
+  background: #bff2fc;
+}
+.second-floor-table tr:nth-child(2n) {
+  background: #ecfcff;
+}
+.second-floor-title {
+  background: #f6a832;
+}
+.third-floor-title {
+  background: #f79ecc;
+}
+.fouth-floor-title {
+  background: #7cbf74;
+}
+.fifth-floor-title {
+  background: #2d9cff;
+}
+
+.third-floor-radar {
+  width: 100%;
+  margin-top: 25px;
+}
+
+.dimension-warp {
+  width: 100%;
+  margin-top: 15px;
+}
+.dimension-name {
+  display: inline-block;
+  height: 27px;
+  min-width: 125px;
+  line-height: 27px;
+  font-size: 16px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #ffffff;
+  /*display: flex;*/
+  /*flex-direction: row;*/
+  /*justify-content: flex-start;*/
+  /*align-items: center;*/
+  /*margin-left: -8px;*/
+  text-align: left;
+  background: #ffcd5a;
+  border-radius: 0px 10px 0px 0px;
+  padding: 0 10px;
+}
+.dimension-name-tag {
+  width: 78px;
+  height: 27px;
+  /*text-align: left;*/
+  /*background: #FFCD5A;*/
+  /*border-radius: 0px 10px 0px 0px;*/
+}
+.dimension-name-desc {
+  /*color: #E8B643;*/
+  margin-left: 10px;
+}
+.dimension-content {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 6px 4px;
+  background: #f6f5f5;
+  border-radius: 8px;
+  margin-top: 5px;
+  font-size: 14px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #505050;
+}
+.dimension-item {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  line-height: 25px;
+}
+.dimension-item-title {
+  width: 19%;
+  height: 25px;
+  font-weight: bold;
+  text-align: justify;
+  /*text-align-last: justify;*/
+  text-justify: distribute-all-lines;
+}
+.dimension-item-title::after {
+  width: 100%;
+  display: inline-block;
+  content: "";
+  /*这三个都不可以少*/
+}
+.dimension-item-mh {
+  width: 10px;
+  font-weight: bold;
+}
+.dimension-item-desc {
+  width: calc(81% - 10px);
+  text-align: left;
+}
+.fifth-floor-list {
+  font-size: 12px;
+  line-height: 20px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  color: #575757;
+  text-align: left;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  padding-top: 15px;
+}
+.fifth-floor-list-title {
+  padding-right: 5px;
+}
+</style>

+ 28 - 52
src/renderer/components/ManageScaleUserRecord.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="main_right_height">
-     <TopDes :flag="false" topDesFont="用户测评记录"></TopDes>
+    <TopDes :flag="false" topDesFont="用户测评记录"></TopDes>
     <!-- <div>
       <el-row>
         <el-col :span="1">&nbsp;</el-col>
@@ -22,8 +22,8 @@
     <div>
       <el-row>
         <el-col :span="1">&nbsp;</el-col>
-        <el-col :span="20" style="margin-top: 15px" >
-          <div style="display: flex"  class="xl_input">
+        <el-col :span="20" style="margin-top: 15px">
+          <div style="display: flex" class="xl_input">
             <el-date-picker
               v-model="value1"
               type="daterange"
@@ -37,7 +37,7 @@
             <el-input
               placeholder="请输入用户姓名"
               v-model="nameSearch"
-            @input="searchEle"
+              @input="searchEle"
               prefix-icon="el-icon-search"
             >
               <!-- <el-button
@@ -92,7 +92,7 @@
         <el-col :span="1">&nbsp;</el-col>
       </el-row>
     </div>
-    <div style="margin-top: 16px;">
+    <div style="margin-top: 16px">
       <el-row>
         <el-col :span="1"> &nbsp;</el-col>
         <el-col :span="22">
@@ -298,62 +298,38 @@ export default {
     getAnswerQuestionPaymentSuccess(id) {
       sessionStorage.setItem("back_page", "3");
       let _this = this;
-
-      _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
-        if (res.data.code == 200 && res.data.data) {
-          _this.resultJsonParams = res.data.data;
-          // let sleep = JSON.parse(
-          //   _this.resultJsonParams.userRecordEntity.testResult
-          // );
-          // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
-          // if (_this.scale_flag === "20210910163158") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
-          // if (_this.scale_flag === "20220805135201") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
-
-          // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
-          //   .version;
-          let testResult = JSON.parse(
-            res.data.data.userRecordEntity.testResult
-          )[0].version;
-
-          if (testResult == 2) {
-            _this.$router.push({
-              name: "scaleResultSCl",
-              params: { tableData: _this.resultJsonParams },
-            });
-          } else {
-            _this.$router.push({
-              name: "scaleResult",
-              params: { tableData: _this.resultJsonParams },
-            });
-          }
-        }
+      this.$router.push({
+        path: "/persionDetailSCl",
+        params: {
+          id: id,
+        },
+        query: {
+          // phone: this.userBid,
+          id: id,
+          come: 1,
+          testPlanId: "",
+        },
       });
-      // _this.$http.get(`/getRecordById?id=${id}`, {}, (res) => {
-      //   if (res.code == 200) {
-      //     _this.resultJsonParams = res.data;
-      //     let testResult = JSON.parse(res.data?.userRecordEntity?.testResult)[0]
-      //       .version;
+
+      // _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
+      //   if (res.data.code == 200 && res.data.data) {
+      //     _this.resultJsonParams = res.data.data;
+      //     let testResult = JSON.parse(
+      //       res.data.data.userRecordEntity.testResult
+      //     )[0].version;
 
       //     if (testResult == 2) {
       //       _this.$router.push({
       //         name: "scaleResultSCl",
-      //         query: _this.resultJsonParams,
+      //         params: { tableData: _this.resultJsonParams },
       //       });
       //     } else {
       //       _this.$router.push({
-      //         name: "ScaleResult",
-      //         query: JSON.stringify(_this.resultJsonParams),
+      //         name: "scaleResult",
+      //         params: { tableData: _this.resultJsonParams },
       //       });
       //     }
       //   }
-
-      //   console.log("请求数据的list", res);
       // });
     },
     handleDelete(index, row) {},
@@ -364,7 +340,7 @@ export default {
         return "success-row";
       }
       return "success-row";
-    }
+    },
   },
 };
 </script>
@@ -382,4 +358,4 @@ export default {
   border-collapse: separate;
   border-spacing: 0;
 }
-</style>
+</style>

+ 21 - 46
src/renderer/components/ManageUserScaleRecord.vue

@@ -291,62 +291,37 @@ export default {
     getAnswerQuestionPaymentSuccess(id) {
       sessionStorage.setItem("back_page", "3");
       let _this = this;
-
-      _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
-        if (res.data.code == 200 && res.data.data) {
-          _this.resultJsonParams = res.data.data;
-          // let sleep = JSON.parse(
-          //   _this.resultJsonParams.userRecordEntity.testResult
-          // );
-          // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
-          // if (_this.scale_flag === "20210910163158") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
-          // if (_this.scale_flag === "20220805135201") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
-
-          // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
-          //   .version;
-          let testResult = JSON.parse(
-            res.data.data.userRecordEntity.testResult
-          )[0].version;
-
-          if (testResult == 2) {
-            _this.$router.push({
-              name: "scaleResultSCl",
-              params: { tableData: _this.resultJsonParams },
-            });
-          } else {
-            _this.$router.push({
-              name: "scaleResult",
-              params: { tableData: _this.resultJsonParams },
-            });
-          }
-        }
+      this.$router.push({
+        path: "/persionDetailSCl",
+        params: {
+          id: id,
+        },
+        query: {
+          // phone: this.userBid,
+          id: id,
+          come: 1,
+          testPlanId: "",
+        },
       });
-      // _this.$http.get(`/getRecordById?id=${id}`, {}, (res) => {
-      //   if (res.code == 200) {
-      //     _this.resultJsonParams = res.data;
-      //     let testResult = JSON.parse(res.data?.userRecordEntity?.testResult)[0]
-      //       .version;
+      // _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
+      //   if (res.data.code == 200 && res.data.data) {
+      //     _this.resultJsonParams = res.data.data;
+      //     let testResult = JSON.parse(
+      //       res.data.data.userRecordEntity.testResult
+      //     )[0].version;
 
       //     if (testResult == 2) {
       //       _this.$router.push({
       //         name: "scaleResultSCl",
-      //         query: _this.resultJsonParams,
+      //         params: { tableData: _this.resultJsonParams },
       //       });
       //     } else {
       //       _this.$router.push({
-      //         name: "ScaleResult",
-      //         query: JSON.stringify(_this.resultJsonParams),
+      //         name: "scaleResult",
+      //         params: { tableData: _this.resultJsonParams },
       //       });
       //     }
       //   }
-
-      //   console.log("请求数据的list", res);
       // });
     },
     handleDelete(index, row) {},
@@ -377,4 +352,4 @@ export default {
   background-color: rgb(87, 172, 187);
   border-color: #ebeef5;
 }
-</style>
+</style>

+ 49 - 37
src/renderer/components/ScaleListResult.vue

@@ -33,7 +33,7 @@
             :offset="1"
             style="margin-right: 20px"
           >
-            <div class="card"  @click="queryDetail(item.id)">
+            <div class="card" @click="queryDetail(item.id)">
               <img src="../assets/newImage/xl1.png" alt="" class="img_card" />
               <div style="display: block; margin-left: 1vw">
                 <h3 class="h3_card">{{ item.name }}</h3>
@@ -41,7 +41,7 @@
                   {{ formatData(item.testDate) }}
                 </div>
                 <div class="desc_card">
-                  {{formatDesc(item.description)  }}
+                  {{ formatDesc(item.description) }}
                 </div>
               </div>
             </div>
@@ -116,41 +116,53 @@ export default {
       sessionStorage.setItem("back_page", "2");
       let _this = this;
 
-      _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
-        if (res.data.code == 200 && res.data.data) {
-          _this.resultJsonParams = res.data.data;
-          // let sleep = JSON.parse(
-          //   _this.resultJsonParams.userRecordEntity.testResult
-          // );
-          // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
-          // if (_this.scale_flag === "20210910163158") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
-          // if (_this.scale_flag === "20220805135201") {
-          //   _this.askEnd(sleep);
-          //   this.inputFlag = 0;
-          // }
+      this.$router.push({
+        path: "/persionDetailSCl",
+        params: {
+          id: id,
+        },
+        query: {
+          // phone: this.userBid,
+          id: id,
+          come: 1,
+          testPlanId: '',
+        },
+      });
+      // _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
+      //   if (res.data.code == 200 && res.data.data) {
+      //     _this.resultJsonParams = res.data.data;
+      //     // let sleep = JSON.parse(
+      //     //   _this.resultJsonParams.userRecordEntity.testResult
+      //     // );
+      //     // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
+      //     // if (_this.scale_flag === "20210910163158") {
+      //     //   _this.askEnd(sleep);
+      //     //   this.inputFlag = 0;
+      //     // }
+      //     // if (_this.scale_flag === "20220805135201") {
+      //     //   _this.askEnd(sleep);
+      //     //   this.inputFlag = 0;
+      //     // }
 
-          // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
-          //   .version;
-          let testResult = JSON.parse(
-            res.data.data.userRecordEntity.testResult
-          )[0].version;
+      //     // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
+      //     //   .version;
+      //     let testResult = JSON.parse(
+      //       res.data.data.userRecordEntity.testResult
+      //     )[0].version;
 
-          if (testResult == 2) {
-            _this.$router.push({
-              name: "scaleResultSCl",
-              params: { tableData: _this.resultJsonParams },
-            });
-          } else {
-            _this.$router.push({
-              name: "scaleResult",
-              params: { tableData: _this.resultJsonParams },
-            });
-          }
-        }
-      });
+      //     if (testResult == 2) {
+      //       _this.$router.push({
+      //         name: "scaleResultSCl",
+      //         params: { tableData: _this.resultJsonParams },
+      //       });
+      //     } else {
+      //       _this.$router.push({
+      //         name: "scaleResult",
+      //         params: { tableData: _this.resultJsonParams },
+      //       });
+      //     }
+      //   }
+      // });
     },
     queryLikeWord() {
       this.pageNum = 1;
@@ -193,8 +205,8 @@ export default {
     },
 
     formatDesc(str) {
-      return str.length < 30 ? str : str.substring(0, 30) + '...'
-    }
+      return str.length < 30 ? str : str.substring(0, 30) + "...";
+    },
   },
 };
 </script>

+ 99 - 46
src/renderer/components/ScaleTestPage.vue

@@ -12,10 +12,7 @@
           {{ scale_index + 1 }}.{{ scale_infos[scale_index].answer }}
         </p>
         <!-- 单选题答案区域 -->
-        <div
-          class="answer"
-          v-if="this.scale_infos[scale_index].questionType == '0'"
-        >
+        <div class="answer" v-if="this.scale_infos[scale_index].questionType == '0'">
           <div class="answer_list">
             <div
               class="answer_item"
@@ -51,6 +48,18 @@
         <div class="answer" v-if="scale_infos[scale_index].questionType == '3'">
           <el-slider v-model="radio" style="width:'300px"></el-slider>
         </div>
+        <!--5下拉答案类型区域-->
+        <div class="answer" v-if="scale_infos[scale_index].questionType == '5'">
+          <el-select v-model="radio" placeholder="请选择">
+            <el-option
+              v-for="item in scale_checkItems_arr"
+              :key="item.label"
+              :label="item.name"
+              :value="item.label"
+            >
+            </el-option>
+          </el-select>
+        </div>
       </el-col>
       <el-col :span="1">&nbsp;</el-col>
     </el-row>
@@ -108,6 +117,7 @@ export default {
       pointColor: "", // 仪表盘指针颜色
       suggestion: "",
       activeIndex: null,
+      scale_checkItems_arr: [],
     };
   },
   mounted() {
@@ -125,8 +135,10 @@ export default {
         this.scale_infos = res.data;
         console.log(this.scale_infos);
         this.scale_all = this.scale_infos.length;
-        this.scale_checkItems =
-          this.scale_infos[this.scale_index].checkItems.split(";");
+        this.scale_checkItems = this.scale_infos[this.scale_index].checkItems.split(";");
+        this.scale_checkItems_arr = this.scale_infos[this.scale_index].questionParam
+          ? JSON.parse(this.scale_infos[this.scale_index].questionParam)
+          : [];
         this.scale_percent = parseInt((this.scale_index + 1) / this.scale_all);
         this.scale_percent = ((this.scale_index + 1) * 100) / this.scale_all;
       });
@@ -157,14 +169,14 @@ export default {
       if (this.scale_index > 0) {
         let lastLabel = this.scale_result.pop();
         this.scale_index -= 1;
-        this.scale_checkItems =
-          this.scale_infos[this.scale_index].checkItems.split(";");
+        this.scale_checkItems = this.scale_infos[this.scale_index].checkItems.split(";");
         this.radio = lastLabel.checkItems;
         this.activeIndex = lastLabel.activeIndex;
       }
     },
     // 下一题
     nextItem() {
+      let that = this;
       var scaleInfoTemp = Object.assign({}, this.scale_infos[this.scale_index]);
       if (this.radio === "") {
         this.$message.error("请先答本题!");
@@ -187,7 +199,15 @@ export default {
         if (this.scale_index < this.scale_infos.length - 1) {
           this.scale_index += 1;
           this.activeIndex = null;
+          this.scale_checkItems = this.scale_infos[this.scale_index].checkItems.split(
+            ";"
+          );
+          this.scale_checkItems_arr = this.scale_infos[this.scale_index].questionParam
+            ? JSON.parse(this.scale_infos[this.scale_index].questionParam)
+            : [];
+          debugger;
         } else {
+          this.scale_result[this.scale_index] = scaleInfoTemp;
           // this.scale_index -= 1;
           this.disableRadio = true;
           //发送测试结果给后台
@@ -197,6 +217,7 @@ export default {
             type: "warning",
           })
             .then(() => {
+              debugger;
               this.$http.post(
                 `v1/result/${that.scale_flag}`,
                 {
@@ -231,30 +252,43 @@ export default {
     getAnswerQuestionPaymentSuccess(id) {
       sessionStorage.setItem("back_page", "1");
       let _this = this;
-      _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
-        if (res.data.code == 200 && res.data.data) {
-          _this.resultJsonParams = res.data.data;
-          let testResult = JSON.parse(
-            res.data.data.userRecordEntity.testResult
-          )[0].version;
-          if (testResult == 2) {
-            _this.$router.push({
-              name: "scaleResultSCl",
-              params: { tableData: _this.resultJsonParams },
-            });
-          } else {
-            _this.$router.push({
-              name: "scaleResult",
-              params: { tableData: _this.resultJsonParams },
-            });
-          }
-          // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0].version;
-          // _this.$router.push({
-          //   name: "scaleResultSCl",
-          //   params: { tableData: _this.resultJsonParams },
-          // });
-        }
+      this.$router.push({
+        path: "/persionDetailSCl",
+        params: {
+          id: id,
+        },
+        query: {
+          // phone: this.userBid,
+          id: id,
+          come: 1,
+          testPlanId: this.testPlanId,
+        },
       });
+
+      // _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
+      //   if (res.data.code == 200 && res.data.data) {
+      //     _this.resultJsonParams = res.data.data;
+      //     let testResult = JSON.parse(res.data.data.userRecordEntity.testResult)[0]
+      //       .version;
+      //       debugger;
+      //     if (testResult == 2) {
+      //       _this.$router.push({
+      //         name: "scaleResultSCl",
+      //         params: { tableData: _this.resultJsonParams },
+      //       });
+      //     } else {
+      //       _this.$router.push({
+      //         name: "scaleResult",
+      //         params: { tableData: _this.resultJsonParams },
+      //       });
+      //     }
+      //     // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0].version;
+      //     // _this.$router.push({
+      //     //   name: "scaleResultSCl",
+      //     //   params: { tableData: _this.resultJsonParams },
+      //     // });
+      //   }
+      // });
     },
     // 选中选项
     radioChange(item, index) {
@@ -264,23 +298,17 @@ export default {
       scaleInfoTemp.activeIndex = index;
       this.scale_result.push(scaleInfoTemp);
       // bbc测试判断是否展示20~24题
-      if (
-        item != "是" &&
-        this.scale_flag == "20211101163739" &&
-        this.scale_index == 19
-      ) {
+      if (item != "是" && this.scale_flag == "20211101163739" && this.scale_index == 19) {
         this.scale_index = 24;
         for (let i = 20; i < 24; i++) {
           this.scale_result.push(this.scale_infos[i]);
         }
-        this.scale_checkItems =
-          this.scale_infos[this.scale_index].checkItems.split(";");
+        this.scale_checkItems = this.scale_infos[this.scale_index].checkItems.split(";");
         return;
       }
       //如果是单选题
       if (scaleInfoTemp.questionType == "0") {
-        if (this.scale_index <= this.scale_infos.length - 1)
-          this.scale_index += 1;
+        if (this.scale_index <= this.scale_infos.length - 1) this.scale_index += 1;
         this.activeIndex = null;
         //scale_index == 题目总数,表示结束
         if (this.scale_index == this.scale_infos.length) {
@@ -311,6 +339,28 @@ export default {
                 this.resultJson = res.data.data;
 
                 if (this.scale_flag == "20210725100704") {
+                  if (this.resultJson["PSQI总分"] <= 5) {
+                    this.pointColor = "#32CD32";
+                    this.suggestion = "您具有很好的睡眠质量,请继续保持";
+                  } else if (this.resultJson["PSQI总分"] <= 10) {
+                    this.pointColor = "#2b7ac9";
+                    this.suggestion =
+                      "您存在少量睡眠质量问题,在今后工作和生活中请养成良好睡眠习惯";
+                  } else if (this.resultJson["PSQI总分"] <= 15) {
+                    this.pointColor = "#FFA500";
+                    this.suggestion =
+                      "您存在明显的睡眠质量问题,长期睡眠障碍对身心都会造成严重危害,请合理分配自己的作息时间,养成良好睡眠习惯";
+                  } else if (this.resultJson["PSQI总分"] <= 10) {
+                    this.pointColor = "#FF0000";
+                    this.suggestion = "您存在严重的睡眠问题,如有必要,请咨询就医";
+                  }
+                  this.setScaleResultData(this.resultJson);
+                  // _this.$router.push({
+                  //   name: "ScaleResult",
+                  // query: JSON.stringify(_this.resultJson),
+                  // });
+                  // _this.initMain();
+                  this.getAnswerQuestionPaymentSuccess(this.resultJson);
                 } else {
                   this.getAnswerQuestionPaymentSuccess(this.resultJson);
                 }
@@ -320,8 +370,12 @@ export default {
             }
           );
         } else {
-          this.scale_checkItems =
-            this.scale_infos[this.scale_index].checkItems.split(";");
+          this.scale_checkItems = this.scale_infos[this.scale_index].checkItems.split(
+            ";"
+          );
+          this.scale_checkItems_arr = this.scale_infos[this.scale_index].questionParam
+            ? JSON.parse(this.scale_infos[this.scale_index].questionParam)
+            : [];
         }
       }
     },
@@ -441,14 +495,13 @@ p.radioSpan {
   background: #e0f8ef;
   border-radius: 60px 60px 60px 60px;
   opacity: 1;
-  padding:1vh 2vw;
+  padding: 1vh 2vw;
   margin: 0 auto 3.05vh;
   cursor: pointer;
 }
 
 .answer_item.active {
-  background: #0fb577 url(../assets/newImage/correct_icon.png) no-repeat 19vw
-    center;
+  background: #0fb577 url(../assets/newImage/correct_icon.png) no-repeat 19vw center;
   color: #ffffff;
 }
 
@@ -505,4 +558,4 @@ p.radioSpan {
   position: absolute;
   right: 0;
 }
-</style>
+</style>

+ 1 - 0
src/renderer/components/TestResults.vue

@@ -1142,6 +1142,7 @@ export default {
   padding-right: 5px;
 }
 .main_class{
+  background-color: #ffffff !important;
   display: flex;
   flex-direction: column;
   height:100vh;

+ 21 - 0
src/renderer/components/persionDetailSCl.vue

@@ -0,0 +1,21 @@
+<template>
+  <div style="background-color:#ffffff"><Record :id="id" :come="come"></Record></div>
+</template>
+<script>
+export default {
+  name: "PersionDetailSCl",
+  data() {
+    return {
+      id: "",
+      come: "", //1-来自量表测试,2-来自测试记录列表页,3-来自管理端量表测试报告,4-来自管理端测试报告进入的量表报告
+    };
+  },
+  //页面初始化函数
+  mounted() {
+    this.id = this.$route.query.id;
+    this.come = this.$route.query.come;
+  },
+  methods: {},
+};
+</script>
+<style scoped></style>

+ 77 - 128
src/renderer/components/psychologicalClinic.vue

@@ -1,127 +1,68 @@
 <template>
   <div class="main_right_height">
-    <div class="">
-      <div class="">
-        <TopDes :flag='true' topDesFont='心理门诊'></TopDes>
-        <el-row class="mainTable-top-two">
-          <el-col :span="1">
-            <div>&nbsp;</div>
-          </el-col>
-          <el-col :span="10" class="search_card">
-            <div>
-              <el-input
-                class="xl_input"
-                placeholder="请输入搜索内容"
-                v-model="queryKeyword"
-                prefix-icon="el-icon-search"
-                @input="queryLikeWord"
-                clearable
-              >
-              </el-input>
-            </div>
-          </el-col>
-          <el-col :span="11">
-            <div class="provinceClass">
-              &nbsp;&nbsp;&nbsp;&nbsp;
-              <el-select
-                v-model="provinceCodeNew"
-                filterable
-                placeholder="选择省"
-                clearable
-                @change="changeFun"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </div>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="1">&nbsp;</el-col>
-          <el-col :span="22">
-            <el-col>
-              <!-- <div class="card">
-                <img src="../assets/newImage/xl1.png" alt="" class="img_card" />
-                <div style="display: block">
-                  <h3 class="h3_card">{{ item.name }}</h3>
-                  <div class="time_card">
-                    {{ item.testDate }}
-                  </div>
-                  <div class="goDetail">
-                    <a href="javascript:;" @click="queryDetail(item.id)">
-                      查看详情></a
-                    >
-                  </div>
-                  <div>&nbsp;</div>
-                </div>
-              </div> -->
-              <el-table
-                :data="dataList"
-                :header-cell-style="{
-                  background: '#66B497',
-                  color: '#FFFFFF',
-                  'letter-spacing': '4px',
-                }"
-                :row-class-name="tableRowClassName"
-                style="width: 100%"
-              >
-                <el-table-column
-                  prop="hospitalName"
-                  align="center"
-                  label="医院名称"
-                >
-                </el-table-column>
-                <el-table-column prop="section" align="center" label="科室">
-                </el-table-column>
-                <el-table-column prop="address" align="center" label="地址">
-                </el-table-column>
-                <el-table-column
-                  prop="contactNumber"
-                  align="center"
-                  label="联系方式"
-                >
-                </el-table-column>
-              </el-table>
-            </el-col>
-          </el-col>
-          <el-col :span="1">&nbsp;</el-col>
-        </el-row>
-        <el-row> </el-row>
-        <!-- <ul>
-          <li
-            v-for="(item, index) in dataList"
-            :key="index"
-            @click="detailP(item.id)"
+    <TopDes :flag="true" topDesFont="心理门诊"></TopDes>
+    <div class="mainTable-top-two">
+      <div>
+        <el-input
+          class="xl_input"
+          placeholder="请输入搜索内容"
+          v-model="queryKeyword"
+          prefix-icon="el-icon-search"
+          @input="queryLikeWord"
+          clearable
+        >
+        </el-input>
+      </div>
+      <div class="provinceClass">
+        &nbsp;&nbsp;&nbsp;&nbsp;
+        <el-select
+          v-model="provinceCodeNew"
+          filterable
+          placeholder="选择省"
+          clearable
+          @change="changeFun"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
           >
-            <img src="../assets/newImage/xl1.png" alt="" />
-            <div style="display: block">
-              <h2>{{ item.name }}</h2>
-              <div class="content">
-                {{ item.testDate }}
-              </div>
-              <div class="goDetail">
-                <a href="javascript:;"> 查看详情></a>
-              </div>
-            </div>
-          </li>
-        </ul> -->
+          </el-option>
+        </el-select>
       </div>
-      <div class="pageNationBox">
-        <el-pagination
-          layout="total, prev, pager, next"
-          :total="total"
-          :page-size="pageSize"
-          :current-page="pageNum"
-          @current-change="handleCurrentChange"
+    </div>
+    <div class="table_c">
+      <div>
+        <el-table
+          :data="dataList"
+          :header-cell-style="{
+            background: '#66B497',
+            color: '#FFFFFF',
+            'letter-spacing': '4px',
+          }"
+          :row-class-name="tableRowClassName"
+          style="width: 100%"
         >
-        </el-pagination>
+          <el-table-column prop="hospitalName" align="center" label="医院名称">
+          </el-table-column>
+          <el-table-column prop="section" align="center" label="科室"> </el-table-column>
+          <el-table-column prop="address" align="center" label="地址"> </el-table-column>
+          <el-table-column prop="contactNumber" align="center" label="联系方式">
+          </el-table-column>
+        </el-table>
       </div>
     </div>
+    <div class="pageNationBox">
+      <el-pagination
+        layout="total, prev, pager, next"
+        :total="total"
+        :page-size="pageSize"
+        :current-page="pageNum"
+        @current-change="handleCurrentChange"
+      >
+      </el-pagination>
+    </div>
   </div>
 </template>
 
@@ -215,9 +156,8 @@ export default {
 
           // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
           //   .version;
-          let testResult = JSON.parse(
-            res.data.data.userRecordEntity.testResult
-          )[0].version;
+          let testResult = JSON.parse(res.data.data.userRecordEntity.testResult)[0]
+            .version;
 
           if (testResult == 2) {
             _this.$router.push({
@@ -379,10 +319,10 @@ export default {
   margin-right: 15px;
 }
 .main_right_height {
-  display: block !important;
+  display: flex;
+  flex-direction: column;
   height: 100vh;
   background: #ffffff;
-  overflow-y: auto !important;
 }
 .card {
   background: #fff;
@@ -435,7 +375,7 @@ export default {
 .el-table {
   border-radius: 16px 16px 0px 0px;
   border: none;
-  background:transparent;
+  background: transparent;
 }
 
 .el-table .el-table__cell {
@@ -456,11 +396,20 @@ export default {
   margin: 0 5px;
 }
 
-.el-table--enable-row-hover
-  /deep/
-  .el-table__body
-  tr:hover
-  > td.el-table__cell {
+.el-table--enable-row-hover /deep/ .el-table__body tr:hover > td.el-table__cell {
   background: rgba(223, 246, 237, 1) !important;
 }
+.table_c {
+  flex: 1;
+  overflow: auto;
+  width: 92%;
+  margin-left: 4%;
+}
+.mainTable-top-two {
+  display: flex;
+  flex-direction: row;
+  margin-bottom: 20px;
+  width: 92%;
+  margin-left: 4%;
+}
 </style>

+ 2 - 0
src/renderer/main.js

@@ -16,6 +16,8 @@ import TopPage from './components/TopPage'
 import TopDes from './components/TopDes.vue'
 import FootDes from './components/FootDes.vue'
 
+import '../utils/componetSubRegister.js'
+
 import '../utils/public.css'
 Vue.prototype.$md5 = md5;
 Vue.use(Chat)

+ 13 - 3
src/renderer/router/index.js

@@ -23,6 +23,7 @@ import ControlPanel from '@/components/ControlPanel'
 import ScaleResult from '@/components/ScaleResult'
 import ScaleResultSCl from '@/components/ScaleResultSCl'
 
+import PersionDetailSCl from "@/components/PersionDetailSCl";
 //管理员端
 import ManageUser from '@/components/ManageUser'
 
@@ -68,6 +69,7 @@ if (result != '0') {
       name: 'mainTable',
       component: MainTable,
     },
+
     {
       path: '/menu',
       name: 'menu',
@@ -153,7 +155,7 @@ if (result != '0') {
             keepAlive: false, // 不需要被缓存
           }
         },
-        
+
         {
           path: 'evaluation',
           name: 'evaluation',
@@ -251,7 +253,7 @@ if (result != '0') {
           name: 'manageEquipment',
           component: ManageEquipment
         },
-        
+
 
         {
           path: 'scaleListResult',
@@ -278,7 +280,15 @@ if (result != '0') {
           name: 'healthDetail',
           component: () => import('@/components/healthDetail.vue')
         },
-       
+        {
+          path: "/persionDetailSCl",
+          name: "PersionDetailSCl",
+          component: PersionDetailSCl,
+          meta: {
+            keepAlive: false, // 需要被缓存
+          },
+        },
+
       ]
     },
     {

+ 10 - 0
src/utils/componetSubRegister.js

@@ -0,0 +1,10 @@
+//子组件批量注册页面
+//现在是将componnetSub下的页面全部加载到了全局
+import Vue from 'vue'
+const componentsContext = require.context('../renderer/componentSub', true, /\.vue$/)
+
+componentsContext.keys().forEach(component => {
+    const componentsConfig = componentsContext(component);
+    const config = componentsConfig.default || componentsConfig;
+    Vue.component(config.name, config);
+});

+ 1 - 1
static/run/index.html

@@ -96,7 +96,7 @@
       }).then((unityInstance) => {
         loadingBar.style.display = "none";
         this.gameInstance = unityInstance;
-        this.gameInstance.SendMessage("Runvelocity", "IsStart", "true");
+        // this.gameInstance.SendMessage("Runvelocity", "IsStart", "true");
       }).catch((message) => {
         alert(message);
       });

+ 1 - 1
static/tianping/index.html

@@ -96,7 +96,7 @@
       }).then((unityInstance) => {
         loadingBar.style.display = "none";
         this.gameInstance = unityInstance;
-        this.gameInstance.SendMessage("Tianping", "IsStart", "true");
+        // this.gameInstance.SendMessage("Tianping", "IsStart", "true");
       }).catch((message) => {
         alert(message);
       });