Browse Source

修改趋势统计的页面功能

plg 3 months ago
parent
commit
d9234912db

+ 118 - 0
src/components/PerQSChart.vue

@@ -0,0 +1,118 @@
+<template>
+  <div class="pie-chart-content">
+    <div :id="refCurrent" style="width: 100%; height: 70vh"></div>
+  </div>
+</template>
+<script>
+import * as echarts from "echarts";
+export default {
+  props: {
+    options: {
+      type: Object,
+      default: function () {
+        return {};
+      },
+    },
+    name: {
+      type: String,
+      default: "",
+    },
+    refCurrent: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {};
+  },
+  //当前监听到数据发生变化就开始渲染
+  watch: {
+    options() {
+      this.myZhuEcharts(this.options);
+    },
+  },
+  methods: {
+    myZhuEcharts(data) {
+      //修改测试计划
+      let myChart = this.$echarts.init(document.getElementById(this.refCurrent));
+      // let myChart = this.$echarts.init(this.$refs.this.refCurrent);
+      let option = {
+        title: {
+          text: "",
+        },
+        // tooltip: {
+        //   trigger: "axis",
+        // },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+          // formatter: '{b} : {c} % '
+          // formatter: function (params,trigger) {
+          formatter: function (params) {
+            var relVal = params[0].name;
+            for (var i = 0, l = params.length; i < l; i++) {
+              relVal +=
+                "<br/>" +
+                params[i].marker +
+                params[i].seriesName +
+                " : " +
+                params[i].value +
+                "分";
+            }
+            return relVal;
+          },
+          //   return '{a} <br/>{b} : {c} <br/>百分比 : {d}%'
+          // },
+        },
+        legend: {
+          data: ["焦虑", "抑郁", "压力", "视觉整合能力", "心理健康"],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {
+            // saveAsImage: {},
+          },
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: data.nameList,
+          axisLabel: {
+            interval: 0,
+            rotate: "-70",
+            formatter: function (value) {
+              return value.substring(0, 8) + "...";
+            },
+          },
+          // axisLabel: {
+          //   interval: 0,
+          //   formatter: function (value) {
+          //     return value.substring(0, 4) + "...";
+          //   },
+          // },
+        },
+        yAxis: {
+          max:100,
+          type: "value",
+          name: "分数",
+        },
+        series: data.scoreList,
+      };
+      myChart.setOption(option);
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.pie-chart-content {
+  width: 100%;
+  /* height: 100%; */
+}
+</style>

+ 74 - 33
src/components/PlanUserStatus.vue

@@ -14,15 +14,29 @@
             <p v-if="!isView" class="dig_title">编辑计划</p>
             <div slot=""></div>
             <div slot="footer"></div>
-            <div style="margin-bottom: 20px;">
-              <el-input v-model="studentName" clearable placeholder="请输入姓名" style="width: 200px;"></el-input
-                >&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
-                <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
-              >搜索</el-button
-            >
-            <el-button type="info" round @click="clearSearch">清空</el-button>
+            <div style="margin-bottom: 20px">
+              <el-input
+                v-model="studentName"
+                clearable
+                placeholder="请输入姓名"
+                style="width: 200px"
+              ></el-input
+              >&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
+              <el-select v-model="userStatus" clearable placeholder="请选择状态">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option> </el-select
+              >&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
+              <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
+                >搜索</el-button
+              >
+              <el-button type="info" round @click="clearSearch">清空</el-button>
             </div>
-          
+
             <div class="table-content">
               <el-table
                 :data="tableData"
@@ -90,9 +104,21 @@
                   width=""
                 >
                 </el-table-column>
-                <el-table-column label="操作" width="" align="center" v-if="proDataLin.planStatus=='2'">
+                <el-table-column
+                  label="操作"
+                  width=""
+                  align="center"
+                  v-if="proDataLin.planStatus == '2'"
+                >
                   <template slot-scope="scope">
-                    <div class="detail_button_out" v-show="scope.row.isComplete == '1'&&proDataLin.planStatus=='2'&&scope.row.isReset=='0'">
+                    <div
+                      class="detail_button_out"
+                      v-show="
+                        scope.row.isComplete == '1' &&
+                        proDataLin.planStatus == '2' &&
+                        scope.row.isReset == '0'
+                      "
+                    >
                       <div class="detail_button" @click="anewStart(scope.row)">
                         <img style="width: 18px" src="../assets/img/table/pro.png" />
                         <span> 重新测试 </span>
@@ -114,7 +140,6 @@
               :total="total"
             >
             </el-pagination>
-
             <div class="dig_button"></div>
           </div>
         </div>
@@ -129,9 +154,9 @@
       >
         <div slot="title">
           <div class="demo-ruleForm">
-            <p  class="dig_title">重新测试</p>
-         
-            <p style="margin-bottom: 40px;text-align: center;">确认重新测试吗?</p>
+            <p class="dig_title">重新测试</p>
+
+            <p style="margin-bottom: 40px; text-align: center">确认重新测试吗?</p>
             <div class="dig_button">
               <el-button type="info" round @click="cancleReset()">取消</el-button>
               <!-- <el-button type="success" round @click="submitForm('ruleForm')"
@@ -153,9 +178,9 @@ export default {
   data() {
     return {
       //学生名字
-      studentName:'',
+      studentName: "",
       //重新测试弹出确认框
-      resetVisible:false,
+      resetVisible: false,
 
       userVisible: false,
       //编辑返回的值
@@ -186,7 +211,18 @@ export default {
       userPageNum: 1,
       userTableData: [],
       multipleSelection: [],
-      userNo:''
+      userNo: "",
+      options: [
+        {
+          value: "1",
+          label: "已完成",
+        },
+        {
+          value: "0",
+          label: "未完成",
+        },
+      ],
+      userStatus: "",
     };
   },
   mounted() {
@@ -199,38 +235,38 @@ export default {
   methods: {
     clearSearch() {
       this.studentName = "";
+      this.userStatus = "";
       //搜索的用户编号
       this.searchTarget();
     },
     //取消关闭重新测试框
-    cancleReset(){
+    cancleReset() {
       //关闭弹出框
-      this.resetVisible=false;
+      this.resetVisible = false;
     },
     //提交确认框
-    submitCom(){
+    submitCom() {
       //提交进行重新测试
       //然后重新查询页面列表
       let url = `/record/resetUserRecord?planId=${this.proDataLin.id}&userNo=${this.userNo}`;
       this.$http.get(url, {}, (res) => {
-        this.resetVisible=false;
+        this.resetVisible = false;
         if (res && res.code == 200) {
           //关闭弹出框
           //调用列表刷线接口
           //
-          this.$message.success('设置重新测试成功');
+          this.$message.success("设置重新测试成功");
           this.searchList();
         } else {
           // this.$toast.fail(res.msg);
           this.$message.error(res.msg);
         }
       });
-
     },
-    anewStart(val){
-      this.userNo=val.userNo
+    anewStart(val) {
+      this.userNo = val.userNo;
       //保存选择个人的信息
-      this.resetVisible=true;
+      this.resetVisible = true;
     },
     formaCom(val) {
       if (val.isComplete == "0") {
@@ -310,13 +346,18 @@ export default {
     //进来调用已选列表接口
     searchList() {
       //
-      let url=''
-      if(this.studentName==''){
-        url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}`;
-      }else{
-        url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}&userName=${this.studentName}`;
-      }
-    
+      let url = "";
+      // if (this.studentName == "") {
+      //   url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}`;
+      // } else {
+      //   url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}&userName=${this.studentName}`;
+      // }
+      url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${
+        this.pageNum
+      }&planId=${this.proDataLin.id}${
+        this.studentName == "" ? "" : `&userName=${this.studentName}`
+      }${this.userStatus == "" ? "" : `&userStatus=${this.userStatus}`}`;
+
       this.$http.get(url, {}, (res) => {
         if (res && res.code == 200) {
           this.tableData = res.data.content;

+ 117 - 0
src/components/QSChart.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="pie-chart-content">
+    <div :id="refCurrent" style="width: 100%; height: 70vh"></div>
+  </div>
+</template>
+<script>
+import * as echarts from "echarts";
+export default {
+  props: {
+    options: {
+      type: Object,
+      default: function () {
+        return {};
+      },
+    },
+    name: {
+      type: String,
+      default: "",
+    },
+    refCurrent: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {};
+  },
+  //当前监听到数据发生变化就开始渲染
+  watch: {
+    options() {
+      this.myZhuEcharts(this.options);
+    },
+  },
+  methods: {
+    myZhuEcharts(data) {
+      //修改测试计划
+      let myChart = this.$echarts.init(document.getElementById(this.refCurrent));
+      // let myChart = this.$echarts.init(this.$refs.this.refCurrent);
+      let option = {
+        title: {
+          text: "",
+        },
+        // tooltip: {
+        //   trigger: "axis",
+        // },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+          // formatter: '{b} : {c} % '
+          // formatter: function (params,trigger) {
+          formatter: function (params) {
+            var relVal = params[0].name;
+            for (var i = 0, l = params.length; i < l; i++) {
+              relVal +=
+                "<br/>" +
+                params[i].marker +
+                params[i].seriesName +
+                " : " +
+                params[i].value +
+                "%";
+            }
+            return relVal;
+          },
+          //   return '{a} <br/>{b} : {c} <br/>百分比 : {d}%'
+          // },
+        },
+        legend: {
+          data: ["焦虑", "抑郁", "压力", "视觉整合能力", "心理健康"],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {
+            // saveAsImage: {},
+          },
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: data.nameList,
+          axisLabel: {
+            interval: 0,
+            rotate: "-70",
+            formatter: function (value) {
+              return value.substring(0, 8) + "...";
+            },
+          },
+          // axisLabel: {
+          //   interval: 0,
+          //   formatter: function (value) {
+          //     return value.substring(0, 4) + "...";
+          //   },
+          // },
+        },
+        yAxis: {
+          type: "value",
+          name: "占比(%)",
+        },
+        series: data.scoreList,
+      };
+      myChart.setOption(option);
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.pie-chart-content {
+  width: 100%;
+  /* height: 100%; */
+}
+</style>

+ 8 - 1
src/router/router.js

@@ -105,7 +105,8 @@ export const routerList = [
       {
         path: "editHomePage",
         name: "editHomePage",
-        component: () => import("../views/manage/channelManagement/editHomePage"),
+        component: () =>
+          import("../views/manage/channelManagement/editHomePage"),
       },
 
       //财税报告、、价格接口
@@ -192,6 +193,12 @@ export const routerList = [
         name: "tendency",
         component: () => import("../views/manage/tendency"),
       },
+      // 趋势统计--个人趋势对比
+      {
+        path: "individualTendency",
+        name: "individualTendency",
+        component: () => import("../views/manage/individualTendency"),
+      },
     ],
   },
 ];

+ 2 - 2
src/utils/http.js

@@ -18,11 +18,11 @@ import { router } from "@/router";
 // axios.defaults.baseURL = 'https://child.hhnao.com:8070';
 //https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx01d1a44906973cf2&redirect_uri=http%3A%2F%2F192.168.18.51%3A8085&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
 // 少锋本地
-// export const basePath = "http://10.113.248.4:8089";
+export const basePath = "http://10.113.248.4:8089";
 //少锋本地 wifi
 // export const basePath = "http://172.28.50.2:8089";
 //30
-export const basePath = "http://43.143.198.30:8089";
+// export const basePath = "http://43.143.198.30:8089";
 //红朵服务器
 // export const basePath = "http://129.211.221.44:8089";
 //锦泓税务服务器

+ 0 - 4
src/views/manage/channelManagement/contract.vue

@@ -692,10 +692,6 @@ export default {
             : `&orgNo=${this.group[this.group.length - 1]}`
         }`;
       }
-      console.log("isUser");
-      console.log(this.isUser + "");
-      console.log("url");
-      console.log(url);
       this.$http.get(url, {}, (res) => {
         if (res && res.code == 200) {
           console.log(res.data.content);

+ 5 - 8
src/views/manage/generalSituation.vue

@@ -429,7 +429,7 @@ export default {
             position: "top",
             color: "#006FFF",
             formatter: function (params) {
-              return (params.value) + "%";
+              return params.value + "%";
             },
           },
         },
@@ -640,7 +640,10 @@ export default {
           scoreList.push(
             this.completeNum == 0
               ? 0
-              : (((this.completeNum - this.abnormalNum) / this.completeNum) * 100).toFixed(2)
+              : (
+                  ((this.completeNum - this.abnormalNum) / this.completeNum) *
+                  100
+                ).toFixed(2)
           );
           scoreList.push(
             this.completeNum == 0
@@ -821,12 +824,6 @@ export default {
               }
             }
           }
-          //   {
-          //   name: "焦虑",
-          //   type: "line",
-          //   stack: "Total",
-          //   data: [132, 101, 134],
-          // },
           //设置总共维度
 
           //测试计划---

+ 942 - 0
src/views/manage/individualTendency.vue

@@ -0,0 +1,942 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <!-- <img src="../../../assets/report/lv.png" alt=""> -->
+      <el-row>
+        <el-col :span="24">
+          <div class="search-head">
+            <el-select
+              :clearable="true"
+              v-model="year"
+              placeholder="请选择年份"
+              @clear="yearChange"
+              @change="yearChange"
+            >
+              <el-option
+                v-for="item in optionsYear"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </el-col>
+      </el-row>
+      <div v-show="!isUser">
+        <div
+          style="
+            text-align: center;
+            font-size: 16px;
+            font-weight: 700;
+            margin-bottom: 10px;
+            margin-top: 10px;
+          "
+        >
+          {{userInfoLin.userName}}<span v-show='year!=""'>{{year}}年</span>近10次趋势统计
+        </div>
+        <div style="width: 100%; height: 70vh" class="block_lei">
+          <PerQSChart
+            :options="qsOptionzz1"
+            name=""
+            refCurrent="qsOptionzz1"
+            v-show="hasData"
+          />
+          <div
+            style="
+              width: 100%;
+              height: 100%;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+            "
+            v-show="!hasData"
+          >
+            <div style="line-height: 100%">暂无数据</div>
+          </div>
+        </div>
+        <!-- 时间选择框 -->
+        <!-- 选择时间
+          <el-date-picker
+          style='margin-top:80px'
+            v-model="year"
+            type="monthrange"
+            range-separator="至"
+            start-placeholder="开始月份"
+            end-placeholder="结束月份"
+          >
+          </el-date-picker> -->
+
+        <!-- <div
+            style="
+              text-align: center;
+              font-size: 16px;
+              font-weight: 700;
+              margin-bottom: 20px;
+            "
+          >
+            趋势统计
+          </div>
+          <div style="width: 100%; height: 70vh" class="block_lei">
+            <QSChart :options="qsOptionzz2" name="" refCurrent="qsOptionzz2" />
+          </div> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PerQSChart from "../../components/PerQSChart.vue";
+import { oSessionStorage } from "../../utils/utils";
+import { basePath } from "../../utils/http";
+import userImgActive from "../../assets/report/lv.png";
+import userImgDefault from "../../assets/report/white.png";
+import * as echarts from "echarts";
+export default {
+  name: "individualTendency",
+  components: { PerQSChart: PerQSChart },
+  data() {
+    return {
+      //判断是用户还是计划对比
+      isUser: false,
+      //用户背景图
+      userImg: userImgActive,
+      //计划背景图
+      planImg: userImgDefault,
+
+      basePath: basePath,
+      //上传文件的弹出款的标志
+      fileVisible: false,
+      //判断点击的是重置密码还是点击删除
+      isDelete: false,
+      //重置密码需要调用个userId
+      userId: "",
+      //充值密码使用userName
+      userName: "",
+      //重置密码弹出框
+      resetVisible: false,
+      //根据名称搜索
+      planName: "",
+      name: "",
+      //搜索的用户编号
+      studentNumber: "",
+      //搜索的组织架构
+      // 搜索需要的性别
+      sex: "",
+
+      group: "",
+      ppData: [],
+      groupData: [],
+      options: [
+        {
+          value: "1",
+          label: "选项1",
+          children: [
+            {
+              value: "11",
+              label: "选项11",
+              children: [{ value: "111", label: "选项111" }],
+            },
+          ],
+        },
+      ],
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+      view: {
+        name: "",
+        studentNumber: "",
+        sex: "",
+        orgName: "",
+      },
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
+      choosePlanVisible: false,
+      currentPlanId: "",
+      comparePlanList: [],
+      chooseComparePlanList: [],
+      formInline: {},
+      option_zhu: {},
+      echarts_zhu: "",
+      echarts_zhu_time: "",
+      //选项
+      qsOptionzz1: { nameList: [], scoreList: [] },
+      qsOptionzz2: { nameList: [], scoreList: [] },
+      qsOptiongr1: { nameList: [], scoreList: [] },
+      qsOptiongr2: { nameList: [], scoreList: [] },
+      year: "",
+      optionsYear: [
+        {
+          label: "2021年",
+          value: 2021,
+        },
+        {
+          label: "2022年",
+          value: 2022,
+        },
+        {
+          label: "2023年",
+          value: 2023,
+        },
+      ],
+      hasData: false,
+      userInfoLin: {},
+    };
+  },
+  created() {},
+  async mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    this.userInfoLin = JSON.parse(sessionStorage.getItem("individualTendency"));
+
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+
+    //判断当页面是 isUser为false时需要调用判断方法
+    if (!this.isUser) {
+      this.initGroup();
+    }
+  },
+  methods: {
+    yearChange(val) {
+      this.query4Score();
+    },
+    //查询4个维度的值
+    async query4Score() {
+      let list = ["抑郁", "焦虑", "躯体化", "视觉能力整合"];
+      //抑郁集合
+      let listDepressed = [];
+      //焦虑组合
+      let listAnxiety = [];
+      //压力集合
+      let listStress = [];
+      //视觉能力整合
+      let listSj = [];
+      for (let i = 0; i < list.length; i++) {
+        //抑郁集合
+        if (list[i] == "抑郁") {
+          listDepressed = await this.queryDetailScore(list[i]);
+        }
+        //焦虑集合
+        if (list[i] == "焦虑") {
+          listAnxiety = await this.queryDetailScore(list[i]);
+        }
+        //躯体化集合
+        if (list[i] == "躯体化") {
+          listStress = await this.queryDetailScore(list[i]);
+        }
+        //视觉能力集合
+        if (list[i] == "视觉能力整合") {
+          listSj = await this.queryDetailScore(list[i]);
+        }
+      }
+      //判断抑郁长度为0是,需要提示暂无数据
+      //焦虑
+      // console.log(listAnxiety);
+      // //抑郁
+      // console.log(listDepressed);
+      // //躯体化
+      // console.log(listStress);
+      // //视觉整合能力
+      // console.log(listSj);
+      //将4个数组转化为 需要渲染的格式
+      //判断现在没数据的话
+      //当返回数据为空数组时--显示暂无数据字样
+      if (listAnxiety.length == 0) {
+        //显示暂无数据字样
+        //显示暂无数据模样
+        this.hasData = false;
+      } else {
+        this.hasData = true;
+        let nameList = [];
+        let scoreList = [];
+
+        // listAnxiety
+        //焦虑数据重组
+        let listAnxietyTmp = [];
+        for (let i = 0; i < listAnxiety.length; i++) {
+          listAnxietyTmp.push(listAnxiety[i].dimScore);
+          nameList.push(listAnxiety[i].name);
+        }
+        //抑郁数据重组
+        let listDepressedTmp = [];
+        for (let i = 0; i < listDepressed.length; i++) {
+          listDepressedTmp.push(listDepressed[i].dimScore);
+        }
+        //躯体化数据重组
+        let listStressTmp = [];
+        for (let i = 0; i < listStress.length; i++) {
+          listStressTmp.push(listStress[i].dimScore);
+        }
+        //视觉整合能力数据重组
+        let listSjTmp = [];
+        for (let i = 0; i < listSj.length; i++) {
+          listSjTmp.push(listSj[i].dimScore);
+        }
+        scoreList = [
+          {
+            name: "焦虑",
+            type: "line",
+            stack: "Total",
+            data: listAnxietyTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "抑郁",
+            type: "line",
+
+            data: listDepressedTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "压力",
+            type: "line",
+
+            data: listStressTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "视觉整合能力",
+            type: "line",
+
+            data: listSjTmp,
+            symbolSize: 6,
+            lineStyle: {
+              type: "dashed",
+              width: 3,
+            },
+          },
+        ];
+        //----------------在这里设置显示echarts 图
+        //在这里改变数组状态
+        // this.echarts_zhu = this.$refs.echarts_zhu;
+        // this.option_zhu.xAxis.data = nameList;
+        // this.option_zhu.series = scoreList;
+        // echarts.init(this.echarts_zhu).setOption(this.option_zhu);
+        this.qsOptionzz1 = { nameList: nameList, scoreList: scoreList };
+        //根据时间选择
+        this.qsOptionzz2 = { nameList: nameList, scoreList: scoreList };
+        // this.echarts_zhu_time = this.$refs.echarts_zhu_time;
+        // this.option_zhu.xAxis.data = nameList;
+        // this.option_zhu.series = scoreList;
+        // echarts.init(this.echarts_zhu_time).setOption(this.option_zhu);
+      }
+    },
+    // 查询当前组织的届数----现在只是这个班应该是只有一个级数
+    //拿到这个班的级数
+    //当你查人的时候---你这个级数是固定的--相当于还有还是只有一个
+    //
+    queryDetailScore(val) {
+      // this.group[this.group.length - 1]
+      return new Promise((solve, reject) => {
+        let url = `/userRecordScore/countUserTrend?dimName=${val}&userNo=${
+          this.userInfoLin.userNo
+        }${this.year != "" ? `&year=${this.year}` : ""}`;
+        this.$http.get(url, {}, (res) => {
+          if (res.code == 200) {
+            solve(res.data);
+          } else {
+            reject([]);
+          }
+        });
+      });
+    },
+    groupCompare(val) {
+      //打开群体报告统计页面
+      this.$refs.groupUser.open(val);
+    },
+    titleFormatter(val) {
+      if (val.planStatus == "1") {
+        return "计划未开始";
+      } else if (val.planStatus == "2") {
+        return "计划进行中";
+      }
+
+      if (val.enable == "0") {
+        return "当前计划未授权";
+      }
+    },
+    isClikcObj(val) {
+      this.isUser = val;
+      //
+      if (val) {
+        this.userImg = userImgActive;
+        this.planImg = userImgDefault;
+      } else {
+        this.planImg = userImgActive;
+        this.userImg = userImgDefault;
+      }
+      if (this.isUser) {
+        this.group = [];
+        this.searchTarget();
+      } else {
+        //组织
+        //默认选择第一个
+
+        this.initGroup();
+        // this.queryDetailScore();
+      }
+    },
+    initGroup() {
+      // 最新的级数
+      let ji = parseInt(this.userInfoLin.grade);
+      //获取当前年
+      let currentYear = new Date().getFullYear();
+      //判断级数是和当前年相同吗
+      if (currentYear == ji) {
+        this.optionsYear = [
+          {
+            label: `${currentYear}年`,
+            value: ji,
+          },
+        ];
+      } else {
+        let list = [];
+        for (let i = ji; i <= currentYear; i++) {
+          let obj = {
+            label: `${i}年`,
+            value: i,
+          };
+          list.push(obj);
+        }
+        this.optionsYear = list;
+        // this.year = list[0].value;
+      }
+      this.query4Score();
+    },
+    planReport(val) {
+      this.$refs.planProfession.open(val);
+    },
+    forMaPlan(val) {
+      if (val.planStatus == "1") {
+        return "未开始";
+        //
+      } else if (val.planStatus == "2") {
+        //
+        return "进行中";
+      } else if (val.planStatus == "3") {
+        //
+        return "已完成";
+      }
+    },
+    //文件上传成功
+    fileSuccess(res) {
+      if (res.code == 200) {
+        this.searchTarget();
+        this.$message({
+          message: res.msg,
+          type: "success",
+        });
+      } else {
+        this.$message({
+          message: res.msg,
+          type: "error",
+        });
+      }
+      //查询列表
+    },
+    //文件上传失败
+    fileError() {
+      this.$message({
+        message: "上传失败",
+        type: "error",
+      });
+    },
+    cancle() {
+      this.resetVisible = false;
+    },
+    //提交文本
+    submitCom() {
+      //判断当前是否是
+      if (this.isDelete) {
+        this.deleteUser();
+        //调用删除方法
+      } else {
+        this.resetFun();
+        // 调用重置密码方法
+      }
+    },
+    //性别---
+    genderFun(val) {
+      let sex = val.gender;
+      if (sex == "1") {
+        return "男";
+      } else if (sex == "0") {
+        return "女";
+      } else {
+        return sex;
+      }
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.searchTarget();
+
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    //获取组织架构方法--------------------开始-----------------------
+    //z增加
+    addPro(val) {
+      let data = JSON.parse(JSON.stringify(val));
+      for (let i = 0; i < val.length; i++) {
+        data[i].value = val[i].orgNo;
+        data[i].label = val[i].orgName;
+      }
+      return data;
+    },
+    //非递归方式:将平铺数据转换为树形结构数据
+    arrToTree(arr) {
+      let data = arr.filter((item) => {
+        item.children = arr.filter((e) => {
+          return item.orgNo === e.parentOrgNo;
+        });
+        return this.userInfo.orgNo == item.orgNo;
+        // return !item.parentOrgNo;
+      });
+      return data;
+    },
+    //去除转换树形结构数据后存在的空children
+    deleteChildren(arr) {
+      let childs = arr;
+      for (let i = childs.length; i--; i > 0) {
+        if (childs[i].children) {
+          if (childs[i].children.length) {
+            this.deleteChildren(childs[i].children);
+          } else {
+            delete childs[i].children;
+          }
+        }
+      }
+      return arr;
+    },
+    //获取组织架构方法--------------------结束-----------------------
+    formatterDelete(row) {
+      if (row.state == 0) {
+        return "已删除";
+      } else {
+        return "正常";
+      }
+    },
+    resetUser(flag, val) {
+      this.resetVisible = true;
+      this.isDelete = flag;
+      this.userId = val.id;
+      this.userName = val.userName;
+      //当前用户id
+
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.view.name = row.userName;
+      this.view.studentNumber = row.userNo;
+      this.view.sex = row.gender == "0" ? "女" : "男";
+      this.view.orgName = row.orgName;
+      this.centerDialogVisible = true;
+    },
+    planUser(val) {
+      if (this.userInfo.roleType != "5") {
+        if (val.enable == "0") {
+          this.$message({
+            type: "error",
+            message: "暂未授权",
+          });
+          return;
+        }
+      }
+      this.$refs.planUser.open(val);
+    },
+    addUser(val) {
+      this.addRegisterUser(val);
+    },
+    clearSearch() {
+      this.name = "";
+      //搜索的用户编号
+      this.studentNumber = "";
+      //搜索的组织架构
+      // 搜索需要的性别
+      this.planName = "";
+      this.group = "";
+      this.searchTarget();
+    },
+
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      let url;
+      if (this.isUser) {
+        url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
+          this.pageNum
+        }&roleType=1${
+          this.group.length == 0
+            ? `&orgNo=${this.userInfo.orgNo}`
+            : `&orgNo=${this.group[this.group.length - 1]}`
+        }${this.name == "" ? "" : `&userName=${this.name}`}${
+          this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
+        }`;
+      } else {
+        url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}${
+          this.planName == "" ? "" : `&planName=${this.planName}`
+        }${
+          this.group.length == 0
+            ? `&orgNo=${this.userInfo.orgNo}`
+            : `&orgNo=${this.group[this.group.length - 1]}`
+        }`;
+      }
+      this.$http.get(url, {}, (res) => {
+        if (res && res.code == 200) {
+
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      // this.group
+      //判断是趋势用户
+      if (this.isUser) {
+        this.pageNum = 1;
+        this.searchList();
+      } else {
+        // this.queryDetailScore("躯体化");
+        this.query4Score();
+      }
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+
+    // 专业报告对比
+    compareReport(val) {
+      //查看当前用户---角色
+      //如果当前角色运维管理员
+      if (this.userInfo.roleType != "5") {
+        if (val.enable == "0") {
+          this.$message({
+            type: "error",
+            message: "暂未授权",
+          });
+          return;
+        }
+      }
+      // if(val.enable=='0'){
+      //   this.$message({
+      //     type:'error',
+      //     message:'暂未授权'
+      //   })
+      //   return
+      // }
+      //查看传输参数
+
+      sessionStorage.setItem("comparePlanInfo", JSON.stringify(val));
+      this.$router.push("/manage/comparePlanProfession");
+    },
+
+    // 筛选已完成计划
+    filterComplete() {
+      this.comparePlanList = this.tableData.filter((item) => {
+
+        return item.planStatus == 3 && item.id != this.currentPlanId;
+      });
+    },
+    selectHandle(selection, row) {
+      this.$refs.multipleTable.clearSelection();
+      this.$refs.multipleTable.toggleRowSelection(row);
+      this.chooseComparePlanList[1] = row;
+    },
+    chooseEnsure() {
+      this.choosePlanVisible = false;
+      this.$refs.planProfession.open(this.chooseComparePlanList);
+    },
+    chooseCancel() {
+      this.choosePlanVisible = false;
+      this.chooseComparePlanList = [];
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../styles/theme.less";
+
+.pag_class {
+  text-align: end;
+}
+
+.pag_class /deep/.el-input__inner {
+  width: 100% !important;
+}
+
+.pag_class /deep/.el-pagination--small span:not([class*="suffix"]) {
+  height: 22px;
+  line-height: 28px !important;
+}
+
+.record-warp {
+  position: relative;
+  width: 100%;
+  height: 80vh;
+
+  .compare_out {
+    line-height: 40px;
+    position: absolute;
+
+    top: -42px;
+    display: flex;
+
+    // background-color: #00bf78;
+    .user {
+      cursor: pointer;
+      position: relative;
+
+      span {
+        top: -5px;
+        left: 19px;
+        font-weight: 700;
+      }
+
+      // background-image: image("../.");
+      // background-color: #00bf78;
+      // background-image: url("../../../assets/report/lv.png");
+      // background-size: cover;
+      // background-repeat: no-repeat;
+    }
+  }
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+    display: flex;
+    flex-direction: column;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+      flex: 1;
+      overflow-y: auto;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+}
+
+.user_out {
+  display: flex;
+  width: 100%;
+  align-items: center;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+
+.detail_button_out {
+  flex: 1;
+  display: flex;
+  // justify-content: space-around;
+  justify-content: flex-start;
+
+  .detail_button {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+
+    span {
+      color: #00bf78;
+      // font-weight: 600;
+    }
+  }
+}
+
+.detail_button_out_dis {
+  flex: 1;
+  display: flex;
+  // justify-content: space-around;
+  justify-content: flex-start;
+
+  .detail_button_dis {
+    display: flex;
+    align-items: center;
+    cursor: not-allowed;
+    letter-spacing: 2px;
+
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+
+    span {
+      color: #d1d1d1;
+      // font-weight: 600;
+    }
+  }
+}
+
+//弹出框样式
+
+.dig_update /deep/.el-cascader {
+  position: relative;
+  font-size: 14px;
+  line-height: 40px;
+  width: 100%;
+}
+
+.dig_update /deep/.el-dialog {
+  box-shadow: none !important;
+  background: transparent !important;
+}
+
+.demo-ruleForm /deep/ .el-form-item {
+  margin-right: 10px;
+  vertical-align: top;
+  display: flex !important;
+  flex-direction: column;
+}
+
+.demo-ruleForm /deep/.el-dialog__header {
+  background-color: #ffffff;
+  padding-left: 140px !important;
+}
+
+.demo-ruleForm /deep/.el-form-item__label {
+  text-align: left;
+  vertical-align: middle;
+  float: left;
+  font-size: 14px;
+  color: #606266;
+  line-height: 40px;
+  padding: 0 12px 0 0;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.demo-ruleForm /deep/.el-input {
+  width: 100% !important;
+}
+
+.demo-ruleForm /deep/.el-input__inner {
+  width: 100% !important;
+  background-color: #f7f7f7;
+  border: 0px;
+}
+
+.dig_button {
+  margin-top: 40px;
+  display: flex;
+  width: 100%;
+  justify-content: space-around;
+}
+
+.demo-ruleForm {
+  background-color: #ffffff;
+  // border-radius: 20px;
+  margin-right: -10px;
+  margin-top: -10px;
+  padding-right: 100px;
+  padding-left: 100px;
+  border-radius: 20px;
+  padding-top: 20px;
+  padding-bottom: 20px;
+
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+
+.btn_area {
+  padding: 36px 0 0;
+  text-align: center;
+}
+</style>

+ 1 - 1
src/views/manage/manageMain.vue

@@ -458,7 +458,7 @@ export default {
               {
                 id: "44",
                 name: "趋势统计",
-                parentName: "趋势统计",
+                parentName: "报告分析",
                 icon: "el-icon-user-solid",
                 path: "/manage/tendency",
                 showItem: true,

+ 1247 - 13
src/views/manage/tendency.vue

@@ -1,22 +1,1256 @@
 <template>
-  
-  <div class="main">
-  <div style="padding-top:200px;">  努力开发中...</div>
-  
-    <!-- <img style="height: 100%;width:100%" src="../../assets/report/qs.png" alt=""> -->
+  <div class="record-warp">
+    <div class="record-main">
+      <div class="compare_out">
+        <div class="user" @click="isClikcObj(true)">
+          <img style="width: 120px; height: 24px" :src="userImg" /><span
+            style="position: absolute"
+            >个人趋势统计</span
+          >
+        </div>
+        <div class="user" @click="isClikcObj(false)">
+          <img style="width: 120px; height: 24px" :src="planImg" /><span
+            style="position: absolute"
+            >组织趋势统计</span
+          >
+        </div>
+      </div>
+      <!-- <img src="../../../assets/report/lv.png" alt=""> -->
+      <el-row>
+        <el-col :span="24">
+          <div class="search-head">
+            <el-input
+              v-show="isUser"
+              v-model="name"
+              clearable
+              placeholder="请输入姓名"
+            ></el-input>
+            <div v-show="isUser">&nbsp;&nbsp;&nbsp;&nbsp;</div>
+            <el-input
+              v-show="isUser"
+              v-model="studentNumber"
+              clearable
+              placeholder="请输入学号"
+            ></el-input>
+            <div v-show="isUser">&nbsp;&nbsp;&nbsp;&nbsp;</div>
+
+            <div v-show="!isUser">&nbsp;&nbsp;&nbsp;&nbsp;</div>
+            <el-cascader
+              v-show="userInfo.roleType == '5'"
+              @change="banChange"
+              placeholder="请选择组织架构"
+              v-model="group"
+              :options="groupData"
+              :props="{ checkStrictly: true }"
+              clearable
+            ></el-cascader>
+            <el-cascader
+              v-show="userInfo.roleType == '4'"
+              @change="banChange"
+              placeholder="请选择组织架构"
+              v-model="group"
+              :options="groupData"
+              clearable
+            ></el-cascader>
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <el-select
+              :clearable="true"
+              v-model="year"
+              placeholder="请选择年份"
+              v-show="!isUser"
+              @clear="yearChange"
+              @change="yearChange"
+            >
+              <el-option
+                v-for="item in optionsYear"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <el-button
+              type="primary"
+              round
+              icon="el-icon-search"
+              @click="searchTarget"
+              v-show="isUser"
+              >搜索</el-button
+            >
+            <el-button type="info" round @click="clearSearch" v-show="isUser"
+              >清空</el-button
+            >
+          </div>
+        </el-col>
+      </el-row>
+
+      <div class="table-content" v-show="isUser">
+        <el-table
+          height="100%"
+          v-show="isUser"
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+          :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+        >
+          <el-table-column
+            v-if="isUser"
+            show-overflow-tooltip
+            prop="userName"
+            label="姓名"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column
+            v-if="isUser"
+            prop="userNo"
+            label="学号"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column
+            v-if="isUser"
+            prop="gender"
+            label="性别"
+            align="center"
+            width="60px"
+            :formatter="genderFun"
+          >
+          </el-table-column>
+          <el-table-column
+            v-if="isUser"
+            prop="orgName"
+            label="所属组织架构"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column label="操作" width="200px" align="center">
+            <template slot-scope="scope">
+              <div
+                style="display: flex; align-items: center; justify-content: flex-start"
+              >
+                <div class="detail_button_out" v-if="isUser">
+                  <div class="detail_button" @click="addUser(scope.row)">
+                    <img src="../../assets/img/table/search.png" />
+                    <span>个人趋势统计</span>
+                  </div>
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination
+        v-if="isUser"
+        class="pag_class"
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page.sync="pageNum"
+        layout="total, sizes, prev, pager, next"
+        :page-size="pageSize"
+        :page-sizes="[10, 20, 50, 100]"
+        :total="total"
+      >
+      </el-pagination>
+      <div v-show="!isUser">
+        <div
+          style="
+            text-align: center;
+            font-size: 16px;
+            font-weight: 700;
+            margin-bottom: 10px;
+            margin-top: 10px;
+          "
+        >
+          {{ className }}<span v-show='year!=""'>{{year}}年</span> 近10次趋势统计
+        </div>
+        <div style="width: 100%; height: 70vh" class="block_lei">
+          <QSChart
+            :options="qsOptionzz1"
+            name=""
+            refCurrent="qsOptionzz1"
+            v-show="hasData"
+          />
+          <div
+            style="
+              width: 100%;
+              height: 100%;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+            "
+            v-show="!hasData"
+          >
+            <div style="line-height: 100%">暂无数据</div>
+          </div>
+        </div>
+        <!-- 时间选择框 -->
+        <!-- 选择时间
+        <el-date-picker
+        style='margin-top:80px'
+          v-model="year"
+          type="monthrange"
+          range-separator="至"
+          start-placeholder="开始月份"
+          end-placeholder="结束月份"
+        >
+        </el-date-picker> -->
+
+        <!-- <div
+          style="
+            text-align: center;
+            font-size: 16px;
+            font-weight: 700;
+            margin-bottom: 20px;
+          "
+        >
+          趋势统计
+        </div>
+        <div style="width: 100%; height: 70vh" class="block_lei">
+          <QSChart :options="qsOptionzz2" name="" refCurrent="qsOptionzz2" />
+        </div> -->
+      </div>
+    </div>
+
+    <el-dialog title="请选择计划" :visible.sync="choosePlanVisible">
+      <div class="btn_area">
+        <el-button @click="chooseCancel">取消</el-button>
+        <el-button v-if="comparePlanList.length > 0" type="primary" @click="chooseEnsure"
+          >确定</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
+
+<script>
+import QSChart from "../../components/QSChart.vue";
+import { oSessionStorage } from "../../utils/utils";
+import { basePath } from "../../utils/http";
+import userImgActive from "../../assets/report/lv.png";
+import userImgDefault from "../../assets/report/white.png";
+import * as echarts from "echarts";
+export default {
+  name: "userManage",
+  components: { QSChart: QSChart },
+  data() {
+    return {
+      //判断是用户还是计划对比
+      isUser: true,
+      //用户背景图
+      userImg: userImgActive,
+      //计划背景图
+      planImg: userImgDefault,
+
+      basePath: basePath,
+      //上传文件的弹出款的标志
+      fileVisible: false,
+      //判断点击的是重置密码还是点击删除
+      isDelete: false,
+      //重置密码需要调用个userId
+      userId: "",
+      //充值密码使用userName
+      userName: "",
+      //重置密码弹出框
+      resetVisible: false,
+      //根据名称搜索
+      planName: "",
+      name: "",
+      //搜索的用户编号
+      studentNumber: "",
+      //搜索的组织架构
+      // 搜索需要的性别
+      sex: "",
+
+      group: "",
+      ppData: [],
+      groupData: [],
+      options: [
+        {
+          value: "1",
+          label: "选项1",
+          children: [
+            {
+              value: "11",
+              label: "选项11",
+              children: [{ value: "111", label: "选项111" }],
+            },
+          ],
+        },
+      ],
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+      view: {
+        name: "",
+        studentNumber: "",
+        sex: "",
+        orgName: "",
+      },
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
+      choosePlanVisible: false,
+      currentPlanId: "",
+      comparePlanList: [],
+      chooseComparePlanList: [],
+      formInline: {},
+      option_zhu: {},
+      echarts_zhu: "",
+      echarts_zhu_time: "",
+      //选项
+      qsOptionzz1: { nameList: [], scoreList: [] },
+      qsOptionzz2: { nameList: [], scoreList: [] },
+      qsOptiongr1: { nameList: [], scoreList: [] },
+      qsOptiongr2: { nameList: [], scoreList: [] },
+      year: "",
+      optionsYear: [
+        {
+          label: "2021年",
+          value: 2021,
+        },
+        {
+          label: "2022年",
+          value: 2022,
+        },
+        {
+          label: "2023年",
+          value: 2023,
+        },
+      ],
+      hasData: false,
+      className: "",
+      channelTmp: [],
+    };
+  },
+  created() {},
+  async mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+
+    await this.getChannel();
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.isClikcObj(false);
+
+    //初始化最近10条数据的图表
+    this.option_zhu = {
+      title: {
+        text: "",
+      },
+      // tooltip: {
+      //   trigger: "axis",
+      // },
+      tooltip: {
+        trigger: "axis",
+        axisPointer: {
+          type: "shadow",
+        },
+        // formatter: '{b} : {c} % '
+        // formatter: function (params,trigger) {
+        formatter: function (params) {
+          var relVal = params[0].name;
+          for (var i = 0, l = params.length; i < l; i++) {
+            relVal +=
+              "<br/>" +
+              params[i].marker +
+              params[i].seriesName +
+              " : " +
+              params[i].value +
+              "%";
+          }
+          return relVal;
+        },
+        //   return '{a} <br/>{b} : {c} <br/>百分比 : {d}%'
+        // },
+      },
+      legend: {
+        data: ["焦虑", "抑郁", "压力", "视觉整合能力", "心理健康"],
+      },
+      grid: {
+        left: "3%",
+        right: "4%",
+        bottom: "3%",
+        containLabel: true,
+      },
+      toolbox: {
+        feature: {
+          // saveAsImage: {},
+        },
+      },
+      xAxis: {
+        type: "category",
+        boundaryGap: false,
+        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+        axisLabel: {
+          interval: 0,
+          rotate: "-70",
+          formatter: function (value) {
+            return value.substring(0, 8) + "...";
+          },
+        },
+
+        // axisLabel: {
+        //   interval: 0,
+        //   formatter: function (value) {
+        //     return value.substring(0, 4) + "...";
+        //   },
+        // },
+      },
+      yAxis: {
+        type: "value",
+        name: "占比(%)",
+      },
+      series: [
+        {
+          name: "焦虑",
+          type: "line",
+
+          data: [],
+        },
+        {
+          name: "抑郁",
+          type: "line",
+
+          data: [],
+        },
+        {
+          name: "压力",
+          type: "line",
+
+          data: [],
+        },
+        {
+          name: "视觉整合能力",
+          type: "line",
+
+          data: [],
+        },
+      ],
+    };
+
+    //判断当页面是 isUser为false时需要调用判断方法
+    if (!this.isUser) {
+      this.initGroup();
+    }
+  },
+  methods: {
+    banChange(val) {
+      if (!this.isUser) {
+        this.query4Score();
+      }
+    },
+    yearChange(val) {
+      this.query4Score();
+    },
+    //查询4个维度的值
+    async query4Score() {
+      let list = ["抑郁", "焦虑", "躯体化", "视觉能力整合"];
+      //抑郁集合
+      let listDepressed = [];
+      //焦虑组合
+      let listAnxiety = [];
+      //压力集合
+      let listStress = [];
+      //视觉能力整合
+      let listSj = [];
+      for (let i = 0; i < list.length; i++) {
+        //抑郁集合
+        if (list[i] == "抑郁") {
+          listDepressed = await this.queryDetailScore(list[i]);
+        }
+        //焦虑集合
+        if (list[i] == "焦虑") {
+          listAnxiety = await this.queryDetailScore(list[i]);
+        }
+        //躯体化集合
+        if (list[i] == "躯体化") {
+          listStress = await this.queryDetailScore(list[i]);
+        }
+        //视觉能力集合
+        if (list[i] == "视觉能力整合") {
+          listSj = await this.queryDetailScore(list[i]);
+        }
+      }
+      //判断抑郁长度为0是,需要提示暂无数据
+      //焦虑
+      // console.log(listAnxiety);
+      // //抑郁
+      // console.log(listDepressed);
+      // //躯体化
+      // console.log(listStress);
+      // //视觉整合能力
+      // console.log(listSj);
+      //将4个数组转化为 需要渲染的格式
+      //判断现在没数据的话
+      //当返回数据为空数组时--显示暂无数据字样
+      if (listAnxiety.length == 0) {
+        //显示暂无数据字样
+        //显示暂无数据模样
+        this.hasData = false;
+      } else {
+        this.hasData = true;
+        let nameList = [];
+        let scoreList = [];
+
+        // listAnxiety
+        //焦虑数据重组
+        let listAnxietyTmp = [];
+        for (let i = 0; i < listAnxiety.length; i++) {
+          listAnxietyTmp.push((parseFloat(listAnxiety[i].num) * 100).toFixed(2));
+          nameList.push(listAnxiety[i].name);
+        }
+        //抑郁数据重组
+        let listDepressedTmp = [];
+        for (let i = 0; i < listDepressed.length; i++) {
+          listDepressedTmp.push((parseFloat(listDepressed[i].num) * 100).toFixed(2));
+        }
+        //躯体化数据重组
+        let listStressTmp = [];
+        for (let i = 0; i < listStress.length; i++) {
+          listStressTmp.push((parseFloat(listStress[i].num) * 100).toFixed(2));
+        }
+        //视觉整合能力数据重组
+        let listSjTmp = [];
+        for (let i = 0; i < listSj.length; i++) {
+          listSjTmp.push((parseFloat(listSj[i].num) * 100).toFixed(2));
+        }
+        scoreList = [
+          {
+            name: "焦虑",
+            type: "line",
+            stack: "Total",
+            data: listAnxietyTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "抑郁",
+            type: "line",
+
+            data: listDepressedTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "压力",
+            type: "line",
+
+            data: listStressTmp,
+            symbolSize: 6,
+            lineStyle: {
+              // type: "dashed",
+              width: 3,
+            },
+          },
+          {
+            name: "视觉整合能力",
+            type: "line",
+
+            data: listSjTmp,
+            symbolSize: 6,
+            lineStyle: {
+              type: "dashed",
+              width: 3,
+            },
+          },
+        ];
+        //----------------在这里设置显示echarts 图
+        //在这里改变数组状态
+        // this.echarts_zhu = this.$refs.echarts_zhu;
+        // this.option_zhu.xAxis.data = nameList;
+        // this.option_zhu.series = scoreList;
+        // echarts.init(this.echarts_zhu).setOption(this.option_zhu);
+        this.qsOptionzz1 = { nameList: nameList, scoreList: scoreList };
+        //根据时间选择
+        this.qsOptionzz2 = { nameList: nameList, scoreList: scoreList };
+        // this.echarts_zhu_time = this.$refs.echarts_zhu_time;
+        // this.option_zhu.xAxis.data = nameList;
+        // this.option_zhu.series = scoreList;
+        // echarts.init(this.echarts_zhu_time).setOption(this.option_zhu);
+      }
+    },
+    // 查询当前组织的届数----现在只是这个班应该是只有一个级数
+    //拿到这个班的级数
+    //当你查人的时候---你这个级数是固定的--相当于还有还是只有一个
+    //
+    queryDetailScore(val) {
+      //得到最近的
+      //
+
+      for (let i = 0; i < this.channelTmp.length; i++) {
+        if (this.group[this.group.length - 1] == this.channelTmp[i].orgNo) {
+          this.className = this.channelTmp[i].orgName;
+        }
+      }
+      // this.group[this.group.length - 1]
+      return new Promise((solve, reject) => {
+        let url = `/userRecordScore/countOrgTrend?dimName=${val}&orgNo=${
+          this.group[this.group.length - 1]
+        }${this.year != "" ? `&year=${this.year}` : ""}`;
+        this.$http.get(url, {}, (res) => {
+          if (res.code == 200) {
+            solve(res.data);
+          } else {
+            reject([]);
+          }
+        });
+      });
+    },
+    groupCompare(val) {
+      //打开群体报告统计页面
+      this.$refs.groupUser.open(val);
+    },
+    titleFormatter(val) {
+      if (val.planStatus == "1") {
+        return "计划未开始";
+      } else if (val.planStatus == "2") {
+        return "计划进行中";
+      }
+
+      if (val.enable == "0") {
+        return "当前计划未授权";
+      }
+    },
+    isClikcObj(val) {
+      this.isUser = val;
+      //
+      if (val) {
+        this.userImg = userImgActive;
+        this.planImg = userImgDefault;
+      } else {
+        this.planImg = userImgActive;
+        this.userImg = userImgDefault;
+      }
+      if (this.isUser) {
+        this.group = [];
+        this.searchTarget();
+      } else {
+        //组织
+        //默认选择第一个
+        this.initGroup();
+        // this.queryDetailScore();
+      }
+    },
+    initGroup() {
+      if (this.userInfo.roleType == "5") {
+        this.group = [this.groupData[0].orgNo, this.groupData[0].children[0].orgNo];
+        // 最新的级数
+
+        //orgName
+        let ji = parseInt(this.groupData[0].children[0].extend);
+        //获取当前年
+        let currentYear = new Date().getFullYear();
+        //判断级数是和当前年相同吗
+        if (currentYear == ji) {
+          this.optionsYear = [
+            {
+              label: `${currentYear}'年'`,
+              value: ji,
+            },
+          ];
+        } else {
+          let list = [];
+          for (let i = ji; i <= currentYear; i++) {
+            let obj = {
+              label: `${i}年`,
+              value: i,
+            };
+            list.push(obj);
+          }
+          this.optionsYear = list;
+          // this.year = list[0].value;
+        }
+      }
+      if (this.userInfo.roleType == "4" || this.userInfo.roleType == "3") {
+        this.group = [this.groupData[0].orgNo];
+
+        let ji = parseInt(this.groupData[0].extend);
+        //获取当前年
+        let currentYear = new Date().getFullYear();
+        //判断级数是和当前年相同吗
+        if (currentYear == ji) {
+          this.optionsYear = [
+            {
+              label: `${currentYear}'年'`,
+              value: ji,
+            },
+          ];
+        } else {
+          let list = [];
+          for (let i = ji; i <= currentYear; i++) {
+            let obj = {
+              label: `${i}年`,
+              value: i,
+            };
+            list.push(obj);
+          }
+          this.optionsYear = list;
+        }
+      }
+      this.query4Score();
+    },
+    planReport(val) {
+      this.$refs.planProfession.open(val);
+    },
+    forMaPlan(val) {
+      if (val.planStatus == "1") {
+        return "未开始";
+        //
+      } else if (val.planStatus == "2") {
+        //
+        return "进行中";
+      } else if (val.planStatus == "3") {
+        //
+        return "已完成";
+      }
+    },
+    //文件上传成功
+    fileSuccess(res) {
+      if (res.code == 200) {
+        this.searchTarget();
+        this.$message({
+          message: res.msg,
+          type: "success",
+        });
+      } else {
+        this.$message({
+          message: res.msg,
+          type: "error",
+        });
+      }
+      //查询列表
+    },
+    //文件上传失败
+    fileError() {
+      this.$message({
+        message: "上传失败",
+        type: "error",
+      });
+    },
+    cancle() {
+      this.resetVisible = false;
+    },
+    //提交文本
+    submitCom() {
+      //判断当前是否是
+      if (this.isDelete) {
+        this.deleteUser();
+        //调用删除方法
+      } else {
+        this.resetFun();
+        // 调用重置密码方法
+      }
+    },
+    //性别---
+    genderFun(val) {
+      let sex = val.gender;
+      if (sex == "1") {
+        return "男";
+      } else if (sex == "0") {
+        return "女";
+      } else {
+        return sex;
+      }
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.searchTarget();
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    //获取组织架构方法--------------------开始-----------------------
+    getChannel() {
+      return new Promise((resole, reject) => {
+        this.$http.get(
+          `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
+          {},
+          (res) => {
+            //  this.$toast.success({message:'成功'});
+            if (res && res.code == 200) {
+              this.channelTmp = res.data;
+              //将值赋值给list
+              if (res.data.length > 0) {
+                let resAdd = this.addPro(res.data);
+                this.ppData = JSON.parse(JSON.stringify(resAdd));
+                let forRes = this.arrToTree(resAdd);
+
+                let resultRes = this.deleteChildren(forRes);
+
+                this.groupData = resultRes[0].children;
+                resole(1);
+              } else {
+                this.groupData = [];
+              }
+              // this.channelList = res.data;
+            } else {
+              reject(0);
+              this.$message.error(res.msg);
+            }
+          }
+        );
+      });
+    },
+    //z增加
+    addPro(val) {
+      let data = JSON.parse(JSON.stringify(val));
+      for (let i = 0; i < val.length; i++) {
+        data[i].value = val[i].orgNo;
+        data[i].label = val[i].orgName;
+      }
+      return data;
+    },
+    //非递归方式:将平铺数据转换为树形结构数据
+    arrToTree(arr) {
+      let data = arr.filter((item) => {
+        item.children = arr.filter((e) => {
+          return item.orgNo === e.parentOrgNo;
+        });
+        return this.userInfo.orgNo == item.orgNo;
+        // return !item.parentOrgNo;
+      });
+      return data;
+    },
+    //去除转换树形结构数据后存在的空children
+    deleteChildren(arr) {
+      let childs = arr;
+      for (let i = childs.length; i--; i > 0) {
+        if (childs[i].children) {
+          if (childs[i].children.length) {
+            this.deleteChildren(childs[i].children);
+          } else {
+            delete childs[i].children;
+          }
+        }
+      }
+      return arr;
+    },
+    //获取组织架构方法--------------------结束-----------------------
+    formatterDelete(row) {
+      if (row.state == 0) {
+        return "已删除";
+      } else {
+        return "正常";
+      }
+    },
+    resetUser(flag, val) {
+      this.resetVisible = true;
+      this.isDelete = flag;
+      this.userId = val.id;
+      this.userName = val.userName;
+      //当前用户id
+
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.view.name = row.userName;
+      this.view.studentNumber = row.userNo;
+      this.view.sex = row.gender == "0" ? "女" : "男";
+      this.view.orgName = row.orgName;
+      this.centerDialogVisible = true;
+    },
+    planUser(val) {
+      if (this.userInfo.roleType != "5") {
+        if (val.enable == "0") {
+          this.$message({
+            type: "error",
+            message: "暂未授权",
+          });
+          return;
+        }
+      }
+      this.$refs.planUser.open(val);
+    },
+    addUser(val) {
+      this.$router.push({ name: "individualTendency" });
+      sessionStorage.setItem("individualTendency", JSON.stringify(val));
+    },
+    clearSearch() {
+      this.name = "";
+      //搜索的用户编号
+      this.studentNumber = "";
+      //搜索的组织架构
+      // 搜索需要的性别
+      this.planName = "";
+      this.group = "";
+      this.searchTarget();
+    },
+
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      let url;
+      if (this.isUser) {
+        url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
+          this.pageNum
+        }&roleType=1${
+          this.group.length == 0
+            ? `&orgNo=${this.userInfo.orgNo}`
+            : `&orgNo=${this.group[this.group.length - 1]}`
+        }${this.name == "" ? "" : `&userName=${this.name}`}${
+          this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
+        }`;
+      } else {
+        url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}${
+          this.planName == "" ? "" : `&planName=${this.planName}`
+        }${
+          this.group.length == 0
+            ? `&orgNo=${this.userInfo.orgNo}`
+            : `&orgNo=${this.group[this.group.length - 1]}`
+        }`;
+      }
+      this.$http.get(url, {}, (res) => {
+        if (res && res.code == 200) {
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      // this.group
+      //判断是趋势用户
+      if (this.isUser) {
+        this.pageNum = 1;
+        this.searchList();
+      } else {
+        // this.queryDetailScore("躯体化");
+        this.query4Score();
+      }
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+
+    // 专业报告对比
+    compareReport(val) {
+      //查看当前用户---角色
+      //如果当前角色运维管理员
+      if (this.userInfo.roleType != "5") {
+        if (val.enable == "0") {
+          this.$message({
+            type: "error",
+            message: "暂未授权",
+          });
+          return;
+        }
+      }
+      // if(val.enable=='0'){
+      //   this.$message({
+      //     type:'error',
+      //     message:'暂未授权'
+      //   })
+      //   return
+      // }
+      //查看传输参数
+
+      sessionStorage.setItem("comparePlanInfo", JSON.stringify(val));
+      this.$router.push("/manage/comparePlanProfession");
+    },
+
+    // 筛选已完成计划
+    filterComplete() {
+      this.comparePlanList = this.tableData.filter((item) => {
+        return item.planStatus == 3 && item.id != this.currentPlanId;
+      });
+    },
+    selectHandle(selection, row) {
+      this.$refs.multipleTable.clearSelection();
+      this.$refs.multipleTable.toggleRowSelection(row);
+      this.chooseComparePlanList[1] = row;
+    },
+    chooseEnsure() {
+      this.choosePlanVisible = false;
+      this.$refs.planProfession.open(this.chooseComparePlanList);
+    },
+    chooseCancel() {
+      this.choosePlanVisible = false;
+      this.chooseComparePlanList = [];
+    },
+  },
+};
+</script>
+
 <style lang="less" scoped>
-.main{
-  color:rgb(171, 172, 173);
-  background-image: url(../../assets/report/qs.png) ;
-  background-size: 100% 100%;
-  background-repeat: no-repeat;
+@import "../../styles/theme.less";
+
+.pag_class {
+  text-align: end;
+}
+
+.pag_class /deep/.el-input__inner {
+  width: 100% !important;
+}
+
+.pag_class /deep/.el-pagination--small span:not([class*="suffix"]) {
+  height: 22px;
+  line-height: 28px !important;
+}
+
+.record-warp {
+  position: relative;
+  width: 100%;
+  height: 80vh;
+
+  .compare_out {
+    line-height: 40px;
+    position: absolute;
+
+    top: -42px;
+    display: flex;
+
+    // background-color: #00bf78;
+    .user {
+      cursor: pointer;
+      position: relative;
+
+      span {
+        top: -5px;
+        left: 19px;
+        font-weight: 700;
+      }
+
+      // background-image: image("../.");
+      // background-color: #00bf78;
+      // background-image: url("../../../assets/report/lv.png");
+      // background-size: cover;
+      // background-repeat: no-repeat;
+    }
+  }
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+    display: flex;
+    flex-direction: column;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+      flex: 1;
+      overflow-y: auto;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+}
+
+.user_out {
   display: flex;
-  height: 100%;
   width: 100%;
-  justify-content: center;
   align-items: center;
-  font-size: 20px;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+
+.detail_button_out {
+  flex: 1;
+  display: flex;
+  // justify-content: space-around;
+  justify-content: flex-start;
+
+  .detail_button {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+
+    span {
+      color: #00bf78;
+      // font-weight: 600;
+    }
+  }
+}
+
+.detail_button_out_dis {
+  flex: 1;
+  display: flex;
+  // justify-content: space-around;
+  justify-content: flex-start;
+
+  .detail_button_dis {
+    display: flex;
+    align-items: center;
+    cursor: not-allowed;
+    letter-spacing: 2px;
+
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+
+    span {
+      color: #d1d1d1;
+      // font-weight: 600;
+    }
+  }
+}
+
+//弹出框样式
+
+.dig_update /deep/.el-cascader {
+  position: relative;
+  font-size: 14px;
+  line-height: 40px;
+  width: 100%;
+}
+
+.dig_update /deep/.el-dialog {
+  box-shadow: none !important;
+  background: transparent !important;
+}
+
+.demo-ruleForm /deep/ .el-form-item {
+  margin-right: 10px;
+  vertical-align: top;
+  display: flex !important;
+  flex-direction: column;
+}
+
+.demo-ruleForm /deep/.el-dialog__header {
+  background-color: #ffffff;
+  padding-left: 140px !important;
+}
+
+.demo-ruleForm /deep/.el-form-item__label {
+  text-align: left;
+  vertical-align: middle;
+  float: left;
+  font-size: 14px;
+  color: #606266;
+  line-height: 40px;
+  padding: 0 12px 0 0;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.demo-ruleForm /deep/.el-input {
+  width: 100% !important;
+}
+
+.demo-ruleForm /deep/.el-input__inner {
+  width: 100% !important;
+  background-color: #f7f7f7;
+  border: 0px;
+}
+
+.dig_button {
+  margin-top: 40px;
+  display: flex;
+  width: 100%;
+  justify-content: space-around;
+}
+
+.demo-ruleForm {
+  background-color: #ffffff;
+  // border-radius: 20px;
+  margin-right: -10px;
+  margin-top: -10px;
+  padding-right: 100px;
+  padding-left: 100px;
+  border-radius: 20px;
+  padding-top: 20px;
+  padding-bottom: 20px;
+
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+
+.btn_area {
+  padding: 36px 0 0;
+  text-align: center;
 }
 </style>