Browse Source

修改用户对比

plg 8 months ago
parent
commit
123a69872f

+ 1 - 1
package.json

@@ -14,7 +14,7 @@
     "bi-vue-mindmap": "^0.7.8",
     "core-js": "^2.6.5",
     "crypto-js": "^4.1.1",
-    "echarts": "^5.4.2",
+    "echarts": "^5.5.0",
     "element-ui": "^2.15.12",
     "exif-js": "^2.3.0",
     "js-base64": "^2.5.2",

BIN
src/assets/img/table/people.png


BIN
src/assets/img/table/pro.png


BIN
src/assets/img/table/xiafa.png


BIN
src/assets/report/bei.png


BIN
src/assets/report/lv.png


BIN
src/assets/report/man.png


BIN
src/assets/report/report_top.png


BIN
src/assets/report/white.png


+ 621 - 0
src/components/ComparePlanUser.vue

@@ -0,0 +1,621 @@
+<template>
+  <div>
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      width="80%"
+      style="border-radius: 40px"
+    >
+      <div slot="title">
+        <div class="table-content">
+          <el-table
+            :data="tableData"
+            :row-style="{ height: '0px' }"
+            :cell-style="{ padding: '5px' }"
+            :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column type="selection" width="55"> </el-table-column>
+            <el-table-column
+              show-overflow-tooltip
+              prop="planName"
+              label="计划名称"
+              align="center"
+              width=""
+            >
+            </el-table-column>
+            <el-table-column prop="planOrgName" label="所属专业" align="center" width="">
+            </el-table-column>
+            <el-table-column prop="score" label="总分" align="center" width="">
+            </el-table-column>
+            <el-table-column prop="planEndTime" label="结束时间" align="center" width="">
+            </el-table-column>
+
+            <!-- <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="deleteUser(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 移除 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column> -->
+          </el-table>
+        </div>
+        <el-pagination
+          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>
+        <el-button type="success" round class="add_class" @click="isCompare"
+          >对比</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <div>
+      <el-dialog
+        :visible.sync="compareVisible"
+        :close-on-click-modal="false"
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div class="compare_plan">
+            <div class="compare_plan_out1">
+              <span class="compare_plan_name" v-if="multipleSelection[0]"
+                >计划名称:{{ multipleSelection[0].planName }}</span
+              >
+              <span class="compare_plan_time" v-if="multipleSelection[0]"
+                >结束时间:{{ multipleSelection[0].planEndTime }}</span
+              >
+            </div>
+            <div class="compare_plan_out2">
+              <span class="compare_plan_name" v-if="multipleSelection[1]"
+                >计划名称:{{ multipleSelection[1].planName }}</span
+              >
+              <span class="compare_plan_time" v-if="multipleSelection[1]"
+                >结束时间:{{ multipleSelection[1].planEndTime }}</span
+              >
+            </div>
+          </div>
+          <div class="compare_class">
+            <div class="compare_user1">
+              <div class="compare_user1_out">
+                <img src="../assets/report/man.png" />
+                <div class="compare_user1_info">
+                  <div>姓名:{{ userInfo.userName }}</div>
+                  <div>学号:{{ userInfo.userNo }}</div>
+                </div>
+              </div>
+              <div class="compare_group">所属组织架构</div>
+              <div class="compare_group_detail">
+                {{ orgName1 }}
+              </div>
+            </div>
+            <div class="compare_user2">
+              <div class="compare_user1_out">
+                <img src="../assets/report/man.png" />
+                <div class="compare_user1_info">
+                  <div>姓名:{{ userInfo.userName }}</div>
+                  <div>学号:{{ userInfo.userNo }}</div>
+                </div>
+              </div>
+              <div class="compare_group">所属组织架构</div>
+              <div class="compare_group_detail">
+                {{ orgName2 }}
+              </div>
+            </div>
+          </div>
+
+          <div class="compare_score">
+            <div class="compare_score_inner">
+              <div class="compare_score_left" v-if="userData1.length > 0">
+                总分:{{ userData1[userData1.length - 1].dimensionScore }}
+              </div>
+              <div class="compare_result" v-if="userData1.length > 0">
+                结论:{{ userData1[userData1.length - 1].dimensionSymptom }}、{{
+                  userData1[userData1.length - 1].dimensionImprovement
+                }}
+              </div>
+            </div>
+            <div class="compare_score_inner">
+              <div class="compare_score_right" v-if="userData2.length > 0">
+                总分:{{ userData2[userData2.length - 1].dimensionScore }}
+              </div>
+              <div class="compare_result" v-if="userData2.length > 0">
+                结论:{{ userData2[userData2.length - 1].dimensionSymptom }}、{{
+                  userData2[userData2.length - 1].dimensionImprovement
+                }}
+              </div>
+            </div>
+          </div>
+          <div ref="echarts_ld" style="width: 100%; height: 600px"></div>
+          <div ref="echarts_zhu" style="width: 100%; height: 600px"></div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+//引入echarts组件
+import * as echarts from "echarts";
+
+export default {
+  data() {
+    return {
+      userInfo: {},
+      dialogVisible: false,
+      compareVisible: false,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+      //选中的数组
+      multipleSelection: [],
+      echarts_ld: "",
+      echarts_zhu: "",
+      option_w: {},
+      option_z: {},
+      optionTT: {},
+
+      userData1: {},
+      orgName1: "",
+      orgName2: "",
+      echarts_des_list1: [],
+      echarts_data_list1: [],
+      echarts_name_list1: [],
+      echarts_zhuname_list: [],
+      userData2: {},
+      echarts_des_list2: [],
+      echarts_data_list2: [],
+      echarts_name_list2: [],
+    };
+  },
+  mounted() {
+    this.echarts_ld = this.$refs.echarts_ld;
+    this.echarts_zhu = this.$refs.echarts_zhu;
+    this.option_w = {
+      title: {
+        // text: 'Basic Radar Chart'
+      },
+      legend: {
+        // data: ['Allocated Budget', 'Actual Spending']
+      },
+      radar: {
+        // shape: "square", //设置雷达图形状,值有circle、square,默认为方形
+        // splitNumber: 3, // 雷达图圈数设置
+        // shape: 'circle',
+        indicator: this.echarts_name_list1,
+        name: {
+          //修改indicator文字的颜色
+          textStyle: {
+            // color: "#999999",
+          },
+        },
+        // 设置雷达图中间射线的颜色
+
+        splitArea: {
+          //设置图表颜色,show的值为true
+          show: true,
+          // areaStyle: {
+          //   // color:"#c1ddf8", //一般设置方式
+          //   //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
+          //   //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
+          //   //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
+          //   color: new echarts.graphic.LinearGradient(
+          //     0,
+          //     0,
+          //     0,
+          //     0,
+          //     [
+          //       { offset: 1, color: "#F7E1DE" }, // 0% 处的颜色
+          //       { offset: 0, color: "#FF1E00" }, // 100% 处的颜色
+          //     ],
+          //     false
+          //   ),
+          // },
+        },
+        // splitArea: {
+        //   areaStyle: {
+        //     color: {
+        //       type: "radial", // linear 线性渐变  radial径向渐变
+        //       x: 0.4, // 0.5为正中心,如果小于渐变中心靠左
+        //       y: 0.5, // 0.5为正中心,如果小于渐变中心靠上
+        //       r: 1,
+        //       colorStops: [
+        //         {
+        //           offset: 0,
+        //           color: "#f16e6e", // 0% 处的颜色rgba(247, 215, 211, 1)
+        //         },
+        //         {
+        //           offset: 1,
+        //           color: "rgba(247, 225, 222, 1)", // 100% 处的颜色rgba(247, 225, 222, 1)
+        //         },
+        //       ],
+        //     },
+        //   },
+        // },
+
+        //网格颜色设置
+        splitLine: {
+          show: true,
+          lineStyle: {
+            width: 1,
+            // color: "#FFBA92",
+          },
+        },
+      },
+      series: [
+        {
+          // name: "Budget vs spending",
+          type: "radar",
+          // symbolSize: 6,
+          data: [
+            {
+              value: this.echarts_data_list1,
+              //折线的颜色
+              lineStyle: {
+                normal: {
+                  color: "#006FFF",
+                },
+              },
+              //折线拐点颜色
+              itemStyle: {
+                normal: {
+                  color: "#006FFF",
+                  // borderColor:'#000000',//拐点边框颜色
+                  borderWidth: 3, //拐点边框大小
+                },
+                // emphasis: {
+                //     color: '#000000'//hover拐点颜色定义
+                // }
+              },
+              //阴影面积
+              areaStyle: {
+                color: "#ABCDF8",
+              },
+            },
+            {
+              value: this.echarts_data_list2,
+              lineStyle: {
+                normal: {
+                  color: "#FF1E00",
+                },
+              },
+              itemStyle: {
+                normal: {
+                  color: "#FF1E00",
+                  // borderColor:'#000000',//拐点边框颜色
+                  borderWidth: 3, //拐点边框大小
+                },
+                // emphasis: {
+                //     color: '#000000'//hover拐点颜色定义
+                // }
+              },
+              areaStyle: {
+                color: "#F8B4AB",
+              },
+            },
+          ],
+        },
+      ],
+    };
+
+    this.option_z = {
+      xAxis: {
+        type: "category",
+        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+      },
+      yAxis: {
+        type: "value",
+      },
+      series: [
+        {
+          data: [120, 200, 150, 80, 70, 110, 130],
+          type: "bar",
+          itemStyle: {
+            color: "#B2D4FF",
+          },
+        },
+        {
+          data: [120, 200, 150, 80, 70, 110, 130],
+          type: "bar",
+          itemStyle: {
+            color: "#FFBBB2",
+          },
+        },
+      ],
+    };
+  },
+  methods: {
+    open(val) {
+      this.userInfo = val;
+      this.dialogVisible = true;
+      this.searchTarget();
+    },
+    //对比方法
+    isCompare() {
+      //判断是否是选了两个用户
+      if (this.multipleSelection.length != 2) {
+        this.$message({
+          message: "请选两个进行对比",
+          type: "warning",
+        });
+        return;
+      }
+      this.compareVisible = true;
+      this.queryDetail1(this.multipleSelection[0].id);
+      this.queryDetail2(this.multipleSelection[1].id);
+      //开始调用对比的方法
+      //打开对比弹出框、、显示对比结果
+      //调用查询各个报告的方法
+    },
+    queryDetail1(id) {
+      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${id}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.orgName1 = res.data.user.orgName;
+          let a = res.data.report.filter((item) => {
+            return item.isIcon == "1";
+          });
+
+          this.userData1 = a;
+          if (this.userData2.length == 0) {
+            this.formatterDataW(a, false, 1);
+          } else {
+            this.formatterDataW(a, true, 1);
+          }
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    queryDetail2(id) {
+      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${id}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.orgName2 = res.data.user.orgName;
+          let a = res.data.report.filter((item) => {
+            return item.isIcon == "1";
+          });
+
+          this.userData2 = a;
+          if (this.userData1.length == 0) {
+            this.formatterDataW(a, false, 2);
+          } else {
+            this.formatterDataW(a, true, 2);
+          }
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    formatterDataW(a, flag, index) {
+      let scoreList = [];
+      let scoreDes = [];
+      let nameList = [];
+      let zhuNameList = [];
+      for (let i = 0; i < a.length - 1; i++) {
+        //
+        scoreList.push(parseInt(a[i].dimensionScore));
+        scoreDes.push(a[i].dimensionAnalysis);
+
+        let ob = { name: a[i].dimensionName, max: 100 };
+        nameList.push(ob);
+        zhuNameList.push(a[i].dimensionName);
+      }
+      this.echarts_zhuname_list = zhuNameList;
+      if (index == "1") {
+        this.echarts_des_list1 = scoreDes;
+        this.echarts_data_list1 = scoreList;
+        this.echarts_name_list1 = nameList;
+      } else {
+        this.echarts_des_list2 = scoreDes;
+        this.echarts_data_list2 = scoreList;
+        this.echarts_name_list2 = nameList;
+      }
+
+      if (flag) {
+        const myChart = echarts.init(this.echarts_ld);
+        this.option_w.series[0].data[0].value = this.echarts_data_list1;
+        this.option_w.series[0].data[1].value = this.echarts_data_list2;
+        this.option_w.radar.indicator = this.echarts_name_list1; //name
+        myChart.setOption(this.option_w);
+
+        const myChart1 = echarts.init(this.echarts_zhu);
+        this.option_z.series[0].data = this.echarts_data_list1;
+        this.option_z.series[1].data = this.echarts_data_list2;
+        this.option_z.xAxis.data = this.echarts_zhuname_list; //name
+        console.log(this.option_z);
+
+        myChart1.setOption(this.option_z);
+      }
+    },
+    //选择用户进行对比的方法
+    handleSelectionChange(val) {
+      if (val.length > 2) {
+        this.$message({
+          type: "warning",
+          message: "请选两个进行对比",
+        });
+        return;
+      }
+      this.multipleSelection = val;
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/plan/findCompletePlanByUser?pageSize=${this.pageSize}&pageNum=${this.pageNum}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    formaCom(val) {
+      if (val.isComplete == "0") {
+        return "未完成";
+      } else {
+        return "已完成";
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.pag_class /deep/ .el-input__inner {
+  width: 100% !important;
+}
+
+.compare_class {
+  display: flex;
+  flex-direction: row;
+  .compare_user1 {
+    flex: 1;
+    margin-right: 10px;
+    background-color: #f1f7ff;
+    padding: 20px 20px;
+    border-radius: 20px;
+    .compare_user1_out {
+      display: flex;
+      align-items: center;
+      img {
+        width: 100px;
+      }
+      .compare_user1_info {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        height: 100px;
+        margin-left: 30px;
+        font-size: 20px;
+      }
+    }
+    .compare_group {
+      font-size: 20px;
+      margin-top: 20px;
+      color: #999999;
+    }
+    .compare_group_detail {
+      margin-top: 20px;
+      font-size: 20px;
+      color: #006fff;
+    }
+  }
+  .compare_user2 {
+    margin-left: 10px;
+    flex: 1;
+    background-color: #fff4f2;
+    border-radius: 20px;
+    padding: 20px 20px;
+    .compare_user1_out {
+      display: flex;
+      align-items: center;
+      img {
+        width: 100px;
+      }
+      .compare_user1_info {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        height: 100px;
+        margin-left: 30px;
+        font-size: 20px;
+      }
+    }
+    .compare_group {
+      font-size: 20px;
+      margin-top: 20px;
+      color: #999999;
+    }
+    .compare_group_detail {
+      margin-top: 20px;
+      font-size: 20px;
+      color: #ff3014;
+    }
+  }
+}
+
+.compare_plan {
+  margin-top: 40px;
+  margin-bottom: 10px;
+  display: flex;
+  flex-direction: row;
+  .compare_plan_out1 {
+    flex: 1;
+    margin-right: 10px;
+    display: flex;
+    justify-content: space-between;
+    .compare_plan_time {
+      color: #999999;
+    }
+  }
+
+  .compare_plan_out2 {
+    margin-left: 10px;
+    flex: 1;
+    display: flex;
+    justify-content: space-between;
+    .compare_plan_time {
+      color: #999999;
+    }
+  }
+}
+.compare_score {
+  display: flex;
+  flex-direction: row;
+  .compare_score_inner {
+    padding-left: 20px;
+    flex: 1;
+    .compare_score_left {
+      color: #006fff;
+      margin-top: 20px;
+      margin-bottom: 10px;
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+    .compare_score_right {
+      color: #ff3014;
+      margin-top: 20px;
+      margin-bottom: 10px;
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+    .compare_result {
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+  }
+}
+</style>

+ 621 - 0
src/components/CompareUser.vue

@@ -0,0 +1,621 @@
+<template>
+  <div>
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      width="80%"
+      style="border-radius: 40px"
+    >
+      <div slot="title">
+        <div class="table-content">
+          <el-table
+            :data="tableData"
+            :row-style="{ height: '0px' }"
+            :cell-style="{ padding: '5px' }"
+            :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column type="selection" width="55"> </el-table-column>
+            <el-table-column
+              show-overflow-tooltip
+              prop="planName"
+              label="计划名称"
+              align="center"
+              width=""
+            >
+            </el-table-column>
+            <el-table-column prop="planOrgName" label="所属专业" align="center" width="">
+            </el-table-column>
+            <el-table-column prop="score" label="总分" align="center" width="">
+            </el-table-column>
+            <el-table-column prop="planEndTime" label="结束时间" align="center" width="">
+            </el-table-column>
+
+            <!-- <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="deleteUser(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 移除 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column> -->
+          </el-table>
+        </div>
+        <el-pagination
+          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>
+        <el-button type="success" round class="add_class" @click="isCompare"
+          >对比</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <div>
+      <el-dialog
+        :visible.sync="compareVisible"
+        :close-on-click-modal="false"
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div class="compare_plan">
+            <div class="compare_plan_out1">
+              <span class="compare_plan_name" v-if="multipleSelection[0]"
+                >计划名称:{{ multipleSelection[0].planName }}</span
+              >
+              <span class="compare_plan_time" v-if="multipleSelection[0]"
+                >结束时间:{{ multipleSelection[0].planEndTime }}</span
+              >
+            </div>
+            <div class="compare_plan_out2">
+              <span class="compare_plan_name" v-if="multipleSelection[1]"
+                >计划名称:{{ multipleSelection[1].planName }}</span
+              >
+              <span class="compare_plan_time" v-if="multipleSelection[1]"
+                >结束时间:{{ multipleSelection[1].planEndTime }}</span
+              >
+            </div>
+          </div>
+          <div class="compare_class">
+            <div class="compare_user1">
+              <div class="compare_user1_out">
+                <img src="../assets/report/man.png" />
+                <div class="compare_user1_info">
+                  <div>姓名:{{ userInfo.userName }}</div>
+                  <div>学号:{{ userInfo.userNo }}</div>
+                </div>
+              </div>
+              <div class="compare_group">所属组织架构</div>
+              <div class="compare_group_detail">
+                {{ orgName1 }}
+              </div>
+            </div>
+            <div class="compare_user2">
+              <div class="compare_user1_out">
+                <img src="../assets/report/man.png" />
+                <div class="compare_user1_info">
+                  <div>姓名:{{ userInfo.userName }}</div>
+                  <div>学号:{{ userInfo.userNo }}</div>
+                </div>
+              </div>
+              <div class="compare_group">所属组织架构</div>
+              <div class="compare_group_detail">
+                {{ orgName2 }}
+              </div>
+            </div>
+          </div>
+
+          <div class="compare_score">
+            <div class="compare_score_inner">
+              <div class="compare_score_left" v-if="userData1.length > 0">
+                总分:{{ userData1[userData1.length - 1].dimensionScore }}
+              </div>
+              <div class="compare_result" v-if="userData1.length > 0">
+                结论:{{ userData1[userData1.length - 1].dimensionSymptom }}、{{
+                  userData1[userData1.length - 1].dimensionImprovement
+                }}
+              </div>
+            </div>
+            <div class="compare_score_inner">
+              <div class="compare_score_right" v-if="userData2.length > 0">
+                总分:{{ userData2[userData2.length - 1].dimensionScore }}
+              </div>
+              <div class="compare_result" v-if="userData2.length > 0">
+                结论:{{ userData2[userData2.length - 1].dimensionSymptom }}、{{
+                  userData2[userData2.length - 1].dimensionImprovement
+                }}
+              </div>
+            </div>
+          </div>
+          <div ref="echarts_ld" style="width: 100%; height: 600px"></div>
+          <div ref="echarts_zhu" style="width: 100%; height: 600px"></div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+//引入echarts组件
+import * as echarts from "echarts";
+
+export default {
+  data() {
+    return {
+      userInfo: {},
+      dialogVisible: false,
+      compareVisible: false,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+      //选中的数组
+      multipleSelection: [],
+      echarts_ld: "",
+      echarts_zhu: "",
+      option_w: {},
+      option_z: {},
+      optionTT: {},
+
+      userData1: {},
+      orgName1: "",
+      orgName2: "",
+      echarts_des_list1: [],
+      echarts_data_list1: [],
+      echarts_name_list1: [],
+      echarts_zhuname_list: [],
+      userData2: {},
+      echarts_des_list2: [],
+      echarts_data_list2: [],
+      echarts_name_list2: [],
+    };
+  },
+  mounted() {
+    this.echarts_ld = this.$refs.echarts_ld;
+    this.echarts_zhu = this.$refs.echarts_zhu;
+    this.option_w = {
+      title: {
+        // text: 'Basic Radar Chart'
+      },
+      legend: {
+        // data: ['Allocated Budget', 'Actual Spending']
+      },
+      radar: {
+        // shape: "square", //设置雷达图形状,值有circle、square,默认为方形
+        // splitNumber: 3, // 雷达图圈数设置
+        // shape: 'circle',
+        indicator: this.echarts_name_list1,
+        name: {
+          //修改indicator文字的颜色
+          textStyle: {
+            // color: "#999999",
+          },
+        },
+        // 设置雷达图中间射线的颜色
+
+        splitArea: {
+          //设置图表颜色,show的值为true
+          show: true,
+          // areaStyle: {
+          //   // color:"#c1ddf8", //一般设置方式
+          //   //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
+          //   //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
+          //   //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
+          //   color: new echarts.graphic.LinearGradient(
+          //     0,
+          //     0,
+          //     0,
+          //     0,
+          //     [
+          //       { offset: 1, color: "#F7E1DE" }, // 0% 处的颜色
+          //       { offset: 0, color: "#FF1E00" }, // 100% 处的颜色
+          //     ],
+          //     false
+          //   ),
+          // },
+        },
+        // splitArea: {
+        //   areaStyle: {
+        //     color: {
+        //       type: "radial", // linear 线性渐变  radial径向渐变
+        //       x: 0.4, // 0.5为正中心,如果小于渐变中心靠左
+        //       y: 0.5, // 0.5为正中心,如果小于渐变中心靠上
+        //       r: 1,
+        //       colorStops: [
+        //         {
+        //           offset: 0,
+        //           color: "#f16e6e", // 0% 处的颜色rgba(247, 215, 211, 1)
+        //         },
+        //         {
+        //           offset: 1,
+        //           color: "rgba(247, 225, 222, 1)", // 100% 处的颜色rgba(247, 225, 222, 1)
+        //         },
+        //       ],
+        //     },
+        //   },
+        // },
+
+        //网格颜色设置
+        splitLine: {
+          show: true,
+          lineStyle: {
+            width: 1,
+            // color: "#FFBA92",
+          },
+        },
+      },
+      series: [
+        {
+          // name: "Budget vs spending",
+          type: "radar",
+          // symbolSize: 6,
+          data: [
+            {
+              value: this.echarts_data_list1,
+              //折线的颜色
+              lineStyle: {
+                normal: {
+                  color: "#006FFF",
+                },
+              },
+              //折线拐点颜色
+              itemStyle: {
+                normal: {
+                  color: "#006FFF",
+                  // borderColor:'#000000',//拐点边框颜色
+                  borderWidth: 3, //拐点边框大小
+                },
+                // emphasis: {
+                //     color: '#000000'//hover拐点颜色定义
+                // }
+              },
+              //阴影面积
+              areaStyle: {
+                color: "#ABCDF8",
+              },
+            },
+            {
+              value: this.echarts_data_list2,
+              lineStyle: {
+                normal: {
+                  color: "#FF1E00",
+                },
+              },
+              itemStyle: {
+                normal: {
+                  color: "#FF1E00",
+                  // borderColor:'#000000',//拐点边框颜色
+                  borderWidth: 3, //拐点边框大小
+                },
+                // emphasis: {
+                //     color: '#000000'//hover拐点颜色定义
+                // }
+              },
+              areaStyle: {
+                color: "#F8B4AB",
+              },
+            },
+          ],
+        },
+      ],
+    };
+
+    this.option_z = {
+      xAxis: {
+        type: "category",
+        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+      },
+      yAxis: {
+        type: "value",
+      },
+      series: [
+        {
+          data: [120, 200, 150, 80, 70, 110, 130],
+          type: "bar",
+          itemStyle: {
+            color: "#B2D4FF",
+          },
+        },
+        {
+          data: [120, 200, 150, 80, 70, 110, 130],
+          type: "bar",
+          itemStyle: {
+            color: "#FFBBB2",
+          },
+        },
+      ],
+    };
+  },
+  methods: {
+    open(val) {
+      this.userInfo = val;
+      this.dialogVisible = true;
+      this.searchTarget();
+    },
+    //对比方法
+    isCompare() {
+      //判断是否是选了两个用户
+      if (this.multipleSelection.length != 2) {
+        this.$message({
+          message: "请选两个进行对比",
+          type: "warning",
+        });
+        return;
+      }
+      this.compareVisible = true;
+      this.queryDetail1(this.multipleSelection[0].id);
+      this.queryDetail2(this.multipleSelection[1].id);
+      //开始调用对比的方法
+      //打开对比弹出框、、显示对比结果
+      //调用查询各个报告的方法
+    },
+    queryDetail1(id) {
+      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${id}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.orgName1 = res.data.user.orgName;
+          let a = res.data.report.filter((item) => {
+            return item.isIcon == "1";
+          });
+
+          this.userData1 = a;
+          if (this.userData2.length == 0) {
+            this.formatterDataW(a, false, 1);
+          } else {
+            this.formatterDataW(a, true, 1);
+          }
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    queryDetail2(id) {
+      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${id}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.orgName2 = res.data.user.orgName;
+          let a = res.data.report.filter((item) => {
+            return item.isIcon == "1";
+          });
+
+          this.userData2 = a;
+          if (this.userData1.length == 0) {
+            this.formatterDataW(a, false, 2);
+          } else {
+            this.formatterDataW(a, true, 2);
+          }
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    formatterDataW(a, flag, index) {
+      let scoreList = [];
+      let scoreDes = [];
+      let nameList = [];
+      let zhuNameList = [];
+      for (let i = 0; i < a.length - 1; i++) {
+        //
+        scoreList.push(parseInt(a[i].dimensionScore));
+        scoreDes.push(a[i].dimensionAnalysis);
+
+        let ob = { name: a[i].dimensionName, max: 100 };
+        nameList.push(ob);
+        zhuNameList.push(a[i].dimensionName);
+      }
+      this.echarts_zhuname_list = zhuNameList;
+      if (index == "1") {
+        this.echarts_des_list1 = scoreDes;
+        this.echarts_data_list1 = scoreList;
+        this.echarts_name_list1 = nameList;
+      } else {
+        this.echarts_des_list2 = scoreDes;
+        this.echarts_data_list2 = scoreList;
+        this.echarts_name_list2 = nameList;
+      }
+
+      if (flag) {
+        const myChart = echarts.init(this.echarts_ld);
+        this.option_w.series[0].data[0].value = this.echarts_data_list1;
+        this.option_w.series[0].data[1].value = this.echarts_data_list2;
+        this.option_w.radar.indicator = this.echarts_name_list1; //name
+        myChart.setOption(this.option_w);
+
+        const myChart1 = echarts.init(this.echarts_zhu);
+        this.option_z.series[0].data = this.echarts_data_list1;
+        this.option_z.series[1].data = this.echarts_data_list2;
+        this.option_z.xAxis.data = this.echarts_zhuname_list; //name
+        console.log(this.option_z);
+
+        myChart1.setOption(this.option_z);
+      }
+    },
+    //选择用户进行对比的方法
+    handleSelectionChange(val) {
+      if (val.length > 2) {
+        this.$message({
+          type: "warning",
+          message: "请选两个进行对比",
+        });
+        return;
+      }
+      this.multipleSelection = val;
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/plan/findCompletePlanByUser?pageSize=${this.pageSize}&pageNum=${this.pageNum}&userNo=${this.userInfo.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    formaCom(val) {
+      if (val.isComplete == "0") {
+        return "未完成";
+      } else {
+        return "已完成";
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.pag_class /deep/ .el-input__inner {
+  width: 100% !important;
+}
+
+.compare_class {
+  display: flex;
+  flex-direction: row;
+  .compare_user1 {
+    flex: 1;
+    margin-right: 10px;
+    background-color: #f1f7ff;
+    padding: 20px 20px;
+    border-radius: 20px;
+    .compare_user1_out {
+      display: flex;
+      align-items: center;
+      img {
+        width: 100px;
+      }
+      .compare_user1_info {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        height: 100px;
+        margin-left: 30px;
+        font-size: 20px;
+      }
+    }
+    .compare_group {
+      font-size: 20px;
+      margin-top: 20px;
+      color: #999999;
+    }
+    .compare_group_detail {
+      margin-top: 20px;
+      font-size: 20px;
+      color: #006fff;
+    }
+  }
+  .compare_user2 {
+    margin-left: 10px;
+    flex: 1;
+    background-color: #fff4f2;
+    border-radius: 20px;
+    padding: 20px 20px;
+    .compare_user1_out {
+      display: flex;
+      align-items: center;
+      img {
+        width: 100px;
+      }
+      .compare_user1_info {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        height: 100px;
+        margin-left: 30px;
+        font-size: 20px;
+      }
+    }
+    .compare_group {
+      font-size: 20px;
+      margin-top: 20px;
+      color: #999999;
+    }
+    .compare_group_detail {
+      margin-top: 20px;
+      font-size: 20px;
+      color: #ff3014;
+    }
+  }
+}
+
+.compare_plan {
+  margin-top: 40px;
+  margin-bottom: 10px;
+  display: flex;
+  flex-direction: row;
+  .compare_plan_out1 {
+    flex: 1;
+    margin-right: 10px;
+    display: flex;
+    justify-content: space-between;
+    .compare_plan_time {
+      color: #999999;
+    }
+  }
+
+  .compare_plan_out2 {
+    margin-left: 10px;
+    flex: 1;
+    display: flex;
+    justify-content: space-between;
+    .compare_plan_time {
+      color: #999999;
+    }
+  }
+}
+.compare_score {
+  display: flex;
+  flex-direction: row;
+  .compare_score_inner {
+    padding-left: 20px;
+    flex: 1;
+    .compare_score_left {
+      color: #006fff;
+      margin-top: 20px;
+      margin-bottom: 10px;
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+    .compare_score_right {
+      color: #ff3014;
+      margin-top: 20px;
+      margin-bottom: 10px;
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+    .compare_result {
+      font-size: 20px;
+      letter-spacing: 3px;
+    }
+  }
+}
+</style>

+ 36 - 10
src/components/PlanRegister.vue

@@ -26,11 +26,17 @@
               <el-input v-model="ruleForm.planName"></el-input>
             </el-form-item>
             <el-form-item label="开始时间" prop="endTime">
-              <el-input v-model="ruleForm.endTime"></el-input>
+              <el-date-picker
+                v-model="ruleForm.endTime"
+                type="date"
+                placeholder="选择日期"
+                @change="timeChange"
+              >
+              </el-date-picker>
             </el-form-item>
 
             <div class="dig_button">
-              <el-button type="info" round @click="resetForm('ruleForm')">重置</el-button>
+              <el-button type="info" round @click="resetData()">重置</el-button>
               <!-- <el-button type="success" round @click="submitForm('ruleForm')"
                 >提交</el-button
               > -->
@@ -70,21 +76,25 @@ export default {
         planName: [{ required: true, message: "请输入计划名称", trigger: "blur" }],
         endTime: [{ required: true, message: "请输结束时间", trigger: "blur" }],
       },
+      userInfo:{}
     };
   },
   mounted() {
-    let userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
-    this.ruleForm.parentCode = userInfo.invitationCode;
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+   
 
     //获取渠道信息
 
     // this.ruleForm.type = "3";
   },
   methods: {
+    resetForm(val){
+      this.cancle()
+    },
     timeChange(val) {
       if (val !== null) {
         //根据时间得到格式化的数据
-        this.ruleForm.birthDate = this.formatterTime(val);
+        this.ruleForm.endTime = this.formatterTime(val);
       }
     },
     formatterTime(val) {
@@ -114,13 +124,21 @@ export default {
       });
     },
     edit(val) {
+      debugger;
       this.dialogVisible = true;
       this.isView = false;
-      this.userDetailData=val
+      this.ruleForm.planName = val.planName;
+      this.ruleForm.endTime = val.planEndTime;
+      this.userDetailData = val;
       //调用查询详情的接口
     },
     //调用查询详情的接口
-
+    resetData(){
+      this.$refs["ruleForm"].clearValidate();
+      //清空表单
+      this.ruleForm.planName = "";
+      this.ruleForm.endTime = "";
+    },
     cancle() {
       this.$refs["ruleForm"].clearValidate();
       //清空表单
@@ -171,13 +189,21 @@ export default {
       });
     },
     register() {
+      console.log(this.ruleForm.endTime);
       let that = this;
+      console.log(this.userInfo)
+      debugger;
+
       // this.ruleForm.password = md5(this.ruleForm.password);
       this.$http.post(
         `/plan/addOrUpdate`,
         {
           planName: this.ruleForm.planName,
-          taskEndTime: this.ruleForm.taskEndTime,
+          planEndTime: this.ruleForm.endTime,
+          createUserId:this.userInfo.id,
+          createUserName:this.userInfo.userName,
+          planOrgNo:this.userInfo.orgNo,
+          planOrgName:this.userInfo.orgName,
         },
         (res) => {
           this.disableFlagStatus();
@@ -200,8 +226,8 @@ export default {
     editUserFun() {
       let that = this;
 
-      this.userDetailData.orgNo = this.ruleForm.group[this.ruleForm.group.length - 1];
-      this.userDetailData.orgName = this.groupName;
+      this.userDetailData.planEndTime = this.ruleForm.endTime;
+      this.userDetailData.planName = this.ruleForm.planName;
       this.$http.post(
         `/plan/addOrUpdate`,
         {

+ 240 - 0
src/components/PlanReport.vue

@@ -0,0 +1,240 @@
+<template>
+  <div>
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      width="80%"
+      style="border-radius: 40px"
+    >
+      <div slot="title">
+        <div>
+          <div ref="echarts_bing" style="width: 500px; height: 600px"></div>
+          <div ref="echarts_zhu" style="width: 500; height: 600px"></div>
+        </div>
+        <div class="table-content">
+              <el-table
+                :data="tableData"
+                :row-style="{ height: '0px' }"
+                :cell-style="{ padding: '5px' }"
+                :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+              >
+                <el-table-column
+                  show-overflow-tooltip
+                  prop="userName"
+                  label="姓名"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column prop="userNo" label="学号" align="center" width="">
+                </el-table-column>
+                <el-table-column prop="isComplete" label="是否已完成" :formatter="formaCom" align="center" width="">
+                </el-table-column>
+                <el-table-column
+                  prop="orgName"
+                  label="所属组织架构"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <!-- <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="deleteUser(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 移除 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column> -->
+              </el-table>
+            </div>
+            <el-pagination
+              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>
+    </el-dialog>
+
+    <div></div>
+  </div>
+</template>
+<script>
+//引入echarts组件
+import * as echarts from "echarts";
+
+export default {
+  data() {
+    return {
+      planId: {},
+      dialogVisible: false,
+      echarts_bing: "",
+      option_bing: {},
+
+      echarts_zhu: "",
+      option_zhu: {},
+
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+    };
+  },
+  mounted() {
+    this.echarts_bing = this.$refs.echarts_bing;
+
+    this.option_bing = {
+      title: {
+        text: "完成情况统计图",
+        left: "center",
+      },
+      tooltip: {
+        trigger: "item",
+      },
+      series: [
+        {
+          name: "完成情况",
+          type: "pie",
+          radius: "50%",
+          data: [
+            { value: 1, name: "未完成" },
+            { value: 2, name: "已完成" },
+          ],
+          emphasis: {
+            itemStyle: {
+              shadowBlur: 10,
+              shadowOffsetX: 0,
+              shadowColor: "rgba(0, 0, 0, 0.5)",
+            },
+          },
+        },
+      ],
+    };
+
+    this.echarts_zhu = this.$refs.echarts_zhu;
+
+    this.option_zhu = {
+      title: {
+        text: "得分情况统计图",
+        left: "center",
+      },
+      xAxis: {
+        type: "category",
+        data: ["Mon"],
+        // axisLabel:{
+        //     interval:0,
+        //     rotate:-90
+        // }
+      },
+      yAxis: {
+        type: "value",
+      },
+      radar: {
+        //
+        radius: 50,
+      },
+      series: [
+        {
+          data: [120],
+          type: "bar",
+          barWidth: 20,
+        },
+      ],
+    };
+    // myChart.setOption(option_bing);
+  },
+  methods: {
+    open(val) {
+      this.planId = val.id;
+      this.dialogVisible = true;
+      this.isFin();
+      this.isScore();
+      this.searchTarget();
+    },
+
+    //管理端统计完成情况
+    isFin() {
+      //调用接口返回信息
+      let url = `/plan/countComplete?planId=${this.planId}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res.code == 200) {
+          //
+          let myChart = echarts.init(this.echarts_bing);
+          myChart.setOption(this.option_bing);
+        }
+      });
+    },
+    isScore() {
+      let url = `/plan/countTotalNumber?planId=${this.planId}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res.code == 200) {
+          let nameList = [];
+          let scoreList = [];
+          for (const item in res.data) {
+            //
+            nameList.push(item);
+            scoreList.push(res.data[item]);
+          }
+          this.option_zhu.xAxis.data = nameList;
+          this.option_zhu.series[0].data = scoreList;
+
+          console.log(this.option_zhu);
+          let myChart1 = echarts.init(this.echarts_zhu);
+          myChart1.setOption(this.option_zhu);
+          //
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.planId}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    formaCom(val){
+      if(val.isComplete=='0'){
+        return '未完成'
+      }else{
+        return '已完成'
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.pag_class /deep/ .el-input__inner {
+  width: 100% !important;
+}
+</style>

+ 441 - 0
src/components/PlanUser.vue

@@ -0,0 +1,441 @@
+<template>
+  <div>
+    <!---lxh-修改密码-->
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div label-width="150px" class="demo-ruleForm">
+            <p v-if="isView" class="dig_title">人员配置</p>
+            <p v-if="!isView" class="dig_title">编辑计划</p>
+            <div slot=""></div>
+            <div slot="footer"></div>
+            <el-button
+              type="success"
+              round
+              class="add_class"
+              icon="el-icon-plus"
+              @click="addUser"
+              >添加用户</el-button
+            >
+            <div class="table-content">
+              <el-table
+                :data="tableData"
+                :row-style="{ height: '0px' }"
+                :cell-style="{ padding: '5px' }"
+                :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+              >
+                <el-table-column
+                  show-overflow-tooltip
+                  prop="userName"
+                  label="姓名"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column prop="userNo" label="学号" align="center" width="">
+                </el-table-column>
+                <el-table-column
+                  prop="orgName"
+                  label="所属组织架构"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="deleteUser(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 移除 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <el-pagination
+              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 class="dig_button"></div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="userVisible"
+        append-to-body
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div label-width="150px" class="demo-ruleForm">
+            <div slot=""></div>
+            <el-button
+              type="success"
+              round
+              class="add_class"
+              icon="el-icon-plus"
+              @click="isComUser(1, 1)"
+              >添加已选</el-button
+            >
+            <div slot="footer"></div>
+            <div class="table-content">
+              <el-table
+                :data="userTableData"
+                :row-style="{ height: '0px' }"
+                :cell-style="{ padding: '5px' }"
+                :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+                @selection-change="handleSelectionChange"
+              >
+                <el-table-column type="selection" width="55"> </el-table-column>
+                <el-table-column
+                  show-overflow-tooltip
+                  prop="userName"
+                  label="姓名"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column prop="userNo" label="学号" align="center" width="">
+                </el-table-column>
+                <el-table-column
+                  prop="orgName"
+                  label="所属组织架构"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="isComUser(2, scope.row)">
+                        <!-- <img style="width: 20px" src="../assets/img/table/delete.png" /> -->
+                        <span> 添加 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <el-pagination
+              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 class="dig_button"></div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import md5 from "md5";
+export default {
+  data() {
+    return {
+      userVisible: false,
+      //编辑返回的值
+      userDetailData: {},
+      //组织架构名字
+      groupName: "",
+
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+
+      isView: true,
+      //当前计划ID
+      planId: "",
+      userInfo: {},
+
+      proDataLin: [],
+
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+
+      userTotal: 0,
+      userpageSize: 10,
+      userPageNum: 1,
+      userTableData: [],
+      multipleSelection: [],
+    };
+  },
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    this.searchTarget();
+    //获取渠道信息
+
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    deleteUser(val) {
+      let data = [val.id];
+      //调用接口开始添加
+      let url = `/planUser/deletePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    addUser() {
+      this.userVisible = true;
+      //调用待添加的用户
+      this.userSearchTarget();
+    },
+    isComUser(val, row) {
+      console.log(this.multipleSelection);
+      //添加已选用户
+
+      let data = [];
+      if (val == 1) {
+        for (let i = 0; i < this.multipleSelection.length; i++) {
+          //
+          let obj = {
+            orgName: this.multipleSelection[i].orgName,
+            orgNo: this.multipleSelection[i].orgNo,
+            planId: this.proDataLin.id,
+            userName: this.multipleSelection[i].userName,
+            userNo: this.multipleSelection[i].userNo,
+          };
+          data.push(obj);
+        }
+      } else {
+        let obj = {
+          orgName: row.orgName,
+          orgNo: row.orgNo,
+          planId: this.proDataLin.id,
+          userName: row.userName,
+          userNo: row.userNo,
+        };
+        data.push(obj);
+      }
+
+      //调用接口开始添加
+      let url = `/planUser/savePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.userSearchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    userSearchTarget() {
+      this.userPageNum = 1;
+      this.userSearchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/planUser/findPlanUserByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+
+    userSearchList() {
+      let url = `/plan/planAddUser?pageSize=${this.userpageSize}&pageNum=${this.userPageNum}&planId=${this.proDataLin.id}&orgNo=${this.proDataLin.planOrgNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.userTableData = res.data.content;
+          this.userTotalotal = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //已选选项
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    resetForm(val) {
+      this.cancle();
+    },
+
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      this.proDataLin = val;
+      this.dialogVisible = true;
+      this.searchTarget();
+    },
+    edit(val) {
+      this.dialogVisible = true;
+      this.isView = false;
+
+      this.userDetailData = val;
+      //调用查询详情的接口
+    },
+    //调用查询详情的接口
+
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
+
+    register() {
+      let that = this;
+      console.log(this.userInfo);
+      this.$http.post(`/plan/addOrUpdate`, {}, (res) => {
+        this.disableFlagStatus();
+        // this.disableFlag = false;
+        if (res && res.code == 200) {
+          this.dialogVisible = false;
+
+          // this.$toast.success({ message: "成功" });
+          //调用父组件的查询方法
+          that.$emit("search");
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
+        }
+        //清空缓存
+        this.cancle();
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.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-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 {
+  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: 40px;
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+</style>

+ 369 - 0
src/components/PlanUserStatus.vue

@@ -0,0 +1,369 @@
+<template>
+  <div>
+    <!---lxh-修改密码-->
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div label-width="150px" class="demo-ruleForm">
+            <p v-if="isView" class="dig_title">人员配置</p>
+            <p v-if="!isView" class="dig_title">编辑计划</p>
+            <div slot=""></div>
+            <div slot="footer"></div>
+           
+            <div class="table-content">
+              <el-table
+                :data="tableData"
+                :row-style="{ height: '0px' }"
+                :cell-style="{ padding: '5px' }"
+                :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+              >
+                <el-table-column
+                  show-overflow-tooltip
+                  prop="userName"
+                  label="姓名"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column prop="userNo" label="学号" align="center" width="">
+                </el-table-column>
+                <el-table-column prop="isComplete" label="是否已完成" :formatter="formaCom" align="center" width="">
+                </el-table-column>
+                <el-table-column
+                  prop="orgName"
+                  label="所属组织架构"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <!-- <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="deleteUser(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 移除 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column> -->
+              </el-table>
+            </div>
+            <el-pagination
+              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 class="dig_button"></div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import md5 from "md5";
+export default {
+  data() {
+    return {
+      userVisible: false,
+      //编辑返回的值
+      userDetailData: {},
+      //组织架构名字
+      groupName: "",
+
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+
+      isView: true,
+      //当前计划ID
+      planId: "",
+      userInfo: {},
+
+      proDataLin: [],
+
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+
+      userTotal: 0,
+      userpageSize: 10,
+      userPageNum: 1,
+      userTableData: [],
+      multipleSelection: [],
+    };
+  },
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    this.searchTarget();
+    //获取渠道信息
+
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    formaCom(val){
+      if(val.isComplete=='0'){
+        return '未完成'
+      }else{
+        return '已完成'
+      }
+    },
+    deleteUser(val) {
+      let data = [val.id];
+      //调用接口开始添加
+      let url = `/planUser/deletePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    addUser() {
+      this.userVisible = true;
+      //调用待添加的用户
+      this.userSearchTarget();
+    },
+    isComUser(val, row) {
+      console.log(this.multipleSelection);
+      //添加已选用户
+
+      let data = [];
+      if (val == 1) {
+        for (let i = 0; i < this.multipleSelection.length; i++) {
+          //
+          let obj = {
+            orgName: this.multipleSelection[i].orgName,
+            orgNo: this.multipleSelection[i].orgNo,
+            planId: this.proDataLin.id,
+            userName: this.multipleSelection[i].userName,
+            userNo: this.multipleSelection[i].userNo,
+          };
+          data.push(obj);
+        }
+      } else {
+        let obj = {
+          orgName: row.orgName,
+          orgNo: row.orgNo,
+          planId: this.proDataLin.id,
+          userName: row.userName,
+          userNo: row.userNo,
+        };
+        data.push(obj);
+      }
+
+      //调用接口开始添加
+      let url = `/planUser/savePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.userSearchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    userSearchTarget() {
+      this.userPageNum = 1;
+      this.userSearchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+
+    userSearchList() {
+      let url = `/plan/planAddUser?pageSize=${this.userpageSize}&pageNum=${this.userPageNum}&planId=${this.proDataLin.id}&orgNo=${this.proDataLin.planOrgNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.userTableData = res.data.content;
+          this.userTotalotal = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //已选选项
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    resetForm(val) {
+      this.cancle();
+    },
+
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      debugger;
+      this.proDataLin = val;
+      this.dialogVisible = true;
+      this.searchTarget();
+    },
+    edit(val) {
+      this.dialogVisible = true;
+      this.isView = false;
+
+      this.userDetailData = val;
+      //调用查询详情的接口
+    },
+    //调用查询详情的接口
+
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
+
+    register() {
+      let that = this;
+      console.log(this.userInfo);
+      this.$http.post(`/plan/addOrUpdate`, {}, (res) => {
+        this.disableFlagStatus();
+        // this.disableFlag = false;
+        if (res && res.code == 200) {
+          this.dialogVisible = false;
+
+          // this.$toast.success({ message: "成功" });
+          //调用父组件的查询方法
+          that.$emit("search");
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
+        }
+        //清空缓存
+        this.cancle();
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.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-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 {
+  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: 40px;
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+</style>

+ 12 - 1
src/components/Register.vue

@@ -64,7 +64,7 @@
               ></el-input>
             </el-form-item>
             <div class="dig_button">
-              <el-button type="info" round @click="resetForm('ruleForm')">重置</el-button>
+              <el-button type="info" round @click="resetData()">重置</el-button>
               <!-- <el-button type="success" round @click="submitForm('ruleForm')"
                 >提交</el-button
               > -->
@@ -174,6 +174,17 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+
+    resetData(){
+      this.$refs["ruleForm"].clearValidate();
+      //清空表单
+      this.ruleForm.group = "";
+      this.ruleForm.name = "";
+      this.ruleForm.studentNumber = "";
+      this.ruleForm.password = "";
+      this.ruleForm.comPassword = "";
+      this.ruleForm.sex = "";
+    },
     //获取组织架构方法--------------------开始-----------------------
     getChannel() {
       this.$http.get(`/org/findAllOrgByPOrgNo`, {}, (res) => {

+ 770 - 0
src/components/Report.vue

@@ -0,0 +1,770 @@
+<template>
+  <div>
+    <!---lxh-修改密码-->
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div label-width="150px" class="demo-ruleForm">
+            <p v-if="isView" class="dig_title">人员配置</p>
+            <p v-if="!isView" class="dig_title">编辑计划</p>
+            <div slot=""></div>
+            <div slot="footer"></div>
+
+            <div class="table-content">
+              <el-table
+                :data="tableData"
+                :row-style="{ height: '0px' }"
+                :cell-style="{ padding: '5px' }"
+                :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
+              >
+                <el-table-column
+                  show-overflow-tooltip
+                  prop="planName"
+                  label="计划名称"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column prop="userNo" label="学号" align="center" width="">
+                </el-table-column>
+                <el-table-column
+                  prop="isComplete"
+                  :formatter="forMatCom"
+                  label="状态"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="createTime"
+                  label="创建时间"
+                  align="center"
+                  width=""
+                >
+                </el-table-column>
+                <el-table-column label="操作" width="510px" align="center">
+                  <template slot-scope="scope">
+                    <div class="detail_button_out">
+                      <div class="detail_button" @click="queryRport(scope.row)">
+                        <img style="width: 20px" src="../assets/img/table/delete.png" />
+                        <span> 查看报告 </span>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <el-pagination
+              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 class="dig_button"></div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="userVisible"
+        append-to-body
+        width="80%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <p style="text-align: center">查看报告</p>
+          <div class="kply">
+            <div class="kply_inner">
+              <div style="padding: 20px 40px">
+                <div>
+                  <div class="report_info_out">
+                    <img src="../assets/report/man.png" />
+                    <div class="report_info_user">
+                      <span class="info">姓名:{{ proDataLin.userName }}</span>
+                      <span class="info">学号:{{ proDataLin.userNo }}</span>
+                      <span class="info"
+                        >所属组织结构:<span style="color: #00bf78">{{
+                          orgName
+                        }}</span></span
+                      >
+                    </div>
+                  </div>
+
+                  <div class="report_totol_score">
+                    <div class="report_bei">
+                      <img height="200px !impotent" src="../assets/report/bei.png" />
+                      <div class="score" v-if="reportData.length > 0">
+                        {{ reportData[0].dimensionScore }}
+                      </div>
+                    </div>
+                    <div class="totol_result_des" v-if="reportData.length > 0">
+                      结论:{{ reportData[reportData.length - 1].dimensionSymptom }},{{
+                        reportData[reportData.length - 1].dimensionImprovement
+                      }}
+                    </div>
+                  </div>
+                  <div ref="echarts_ld" style="width: 100%; height: 600px"></div>
+                  <div class="report_echarts_out">
+                    <!-- justify-content: space-around; -->
+                    <div
+                      style="
+                        display: flex;
+                        flex-direction: row;
+                     
+                        width: 100%;
+                        flex-wrap:wrap;
+                        padding-top: 40px;
+                        padding-bottom: 40px;
+                      "
+                    >
+                      <div
+                        class="progress_out"
+                        v-for="(item, index) in echarts_name_list"
+                        :key="index"
+                      >
+                        <span class="progress_out_name" style="width: 150px">
+                          {{ item.name }}
+                        </span>
+
+                        <el-progress
+                          :percentage="echarts_data_list[index]"
+                          style="width: 100%"
+                          :stroke-width="18"
+                          :show-text="false"
+                          :color="colorPro"
+                        />
+                        <span class="progress_out_score"
+                          >{{ echarts_data_list[index]
+                          }}<span style="color: #000000; font-size: 12px; opacity: 0.4"
+                            >/100</span
+                          ></span
+                        >
+                      </div>
+                    </div>
+                  </div>
+
+                  <div
+                    v-for="(item, index) in echarts_name_list"
+                    :key="index"
+                    style="padding-top: 60px"
+                  >
+                    <div class="des_zhishu">{{ item.name }}</div>
+                    <div class="report_des_out">
+                      <div class="score">分数:{{ echarts_data_list[index] }}</div>
+                      <div class="score">分析报告:</div>
+                      <div class="des">{{ echarts_des_list[index] }}</div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import * as echarts from "echarts";
+import md5 from "md5";
+export default {
+  data() {
+    return {
+      //接收所属组织结构的词语
+      orgName:'',
+      userVisible: false,
+      //编辑返回的值
+      userDetailData: {},
+      //组织架构名字
+      groupName: "",
+
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+
+      isView: true,
+      //当前计划ID
+      planId: "",
+      userInfo: {},
+
+      proDataLin: [],
+
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      tableData: [],
+
+      userTotal: 0,
+      userpageSize: 10,
+      userPageNum: 1,
+      userTableData: [],
+      multipleSelection: [],
+
+      //获取报告总数据
+      reportData: [],
+      //
+      echarts_des_list: ["", "", "", "", "", ""],
+      echarts_data_list: [10, 20, 30, 40, 0, 0],
+      echarts_name_list: [
+        { name: "阳光指数", max: 100 },
+        { name: "情绪稳定指数", max: 100 },
+        { name: "社交能力", max: 100 },
+        { name: "自律能力", max: 100 },
+        { name: "爱情观", max: 100 },
+        { name: "人生观", max: 100 },
+      ],
+      option: {},
+      echarts_ld: "",
+      colorPro: "linear-gradient(to right,#FF4E00 ,#ffffff)",
+    };
+  },
+  mounted() {
+    this.echarts_ld = this.$refs.echarts_ld;
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    //查询用户下边的计划
+    this.searchTarget();
+    //获取渠道信息
+    // this.option.radar.indicator=[] //name
+    this.option = {
+      title: {
+        // text: 'Basic Radar Chart'
+      },
+      legend: {
+        // data: ['Allocated Budget', 'Actual Spending']
+      },
+      radar: {
+        shape: "square", //设置雷达图形状,值有circle、square,默认为方形
+        splitNumber: 3, // 雷达图圈数设置
+        // shape: 'circle',
+        indicator: this.echarts_name_list,
+        name: {
+          //修改indicator文字的颜色
+          textStyle: {
+            // color: "#999999",
+          },
+        },
+      },
+      series: [
+        {
+          type: "radar",
+          symbolSize: 6,
+          data: [
+            {
+              value: this.echarts_data_list,
+              lineStyle: {
+                normal: {
+                  color: "#FF1E00",
+                },
+              },
+              //折线拐点颜色
+              itemStyle: {
+                normal: {
+                  color: "#FF1E00",
+                  borderWidth: 3, //拐点边框大小
+                },
+                // emphasis: {
+                //     color: '#000000'//hover拐点颜色定义
+                // }
+              },
+              // name: 'Actual Spending'
+              areaStyle: {
+                //阴影区域背景
+                // color: 'rgba(255, 228, 52, 0.6)'
+                color: "#F8B4AB",
+              },
+            },
+          ],
+        },
+      ],
+    };
+  },
+  methods: {
+    forMatCom(val) {
+      if (val.isComplete == "0") {
+        return "未完成";
+      } else {
+        return "已完成";
+      }
+    },
+    //查询报告 //根据planId 和用户编号
+    queryRport(val) {
+      let params = {
+        planId: val.id,
+        userNo: this.proDataLin.userNo,
+      };
+      this.userVisible = true;
+      //调用查询报告的方法
+      this.reportDetail(params);
+    },
+    reportDetail(params) {
+      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${params.planId}&userNo=${params.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res.code == 200) {
+          // this.reportData = res.data;
+
+          let a = res.data.report.filter((item) => {
+            return item.isIcon == "1";
+          });
+          this.orgName=res.data.user.orgName
+          console.log(a);
+          this.reportData = a;
+          // let a =[res.data[0].]
+          //修改文本
+
+          let scoreList = [];
+          let scoreDes = [];
+          let nameList = [];
+          for (let i = 0; i < a.length - 1; i++) {
+            //
+            scoreList.push(parseInt(a[i].dimensionScore));
+            scoreDes.push(a[i].dimensionImprovement);
+
+            let ob = { name: a[i].dimensionName, max: 100 };
+            nameList.push(ob);
+          }
+          this.echarts_des_list = scoreDes;
+          this.echarts_data_list = scoreList;
+          this.echarts_name_list = nameList;
+          const myChart = echarts.init(this.echarts_ld);
+          // this.option.series[0].data[0] = a;
+          this.option.series[0].data[0].value = this.echarts_data_list;
+          this.option.radar.indicator = this.echarts_name_list; //name
+
+          myChart.setOption(this.option);
+        } else {
+          ElMessage({
+            message: res.msg,
+            type: "error",
+          });
+        }
+      });
+    },
+    deleteUser(val) {
+      let data = [val.id];
+      //调用接口开始添加
+      let url = `/planUser/deletePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    addUser() {
+      this.userVisible = true;
+      //调用待添加的用户
+      this.userSearchTarget();
+    },
+    isComUser(val, row) {
+      console.log(this.multipleSelection);
+      //添加已选用户
+
+      let data = [];
+      if (val == 1) {
+        for (let i = 0; i < this.multipleSelection.length; i++) {
+          //
+          let obj = {
+            orgName: this.multipleSelection[i].orgName,
+            orgNo: this.multipleSelection[i].orgNo,
+            planId: this.proDataLin.id,
+            userName: this.multipleSelection[i].userName,
+            userNo: this.multipleSelection[i].userNo,
+          };
+          data.push(obj);
+        }
+      } else {
+        let obj = {
+          orgName: row.orgName,
+          orgNo: row.orgNo,
+          planId: this.proDataLin.id,
+          userName: row.userName,
+          userNo: row.userNo,
+        };
+        data.push(obj);
+      }
+
+      //调用接口开始添加
+      let url = `/planUser/savePlanUsers`;
+      this.$http.post(url, data, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.searchTarget();
+          this.userSearchTarget();
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    userSearchTarget() {
+      this.userPageNum = 1;
+      this.userSearchList();
+    },
+    //进来调用已选列表接口
+    searchList() {
+      let url = `/plan/findAllByUserNo?pageSize=${this.pageSize}&pageNum=${this.pageNum}&userNo=${this.proDataLin.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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);
+        }
+      });
+    },
+
+    userSearchList() {
+      let url = `/plan/planAddUser?pageSize=${this.userpageSize}&pageNum=${this.userPageNum}&planId=${this.proDataLin.id}&orgNo=${this.proDataLin.planOrgNo}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          this.userTableData = res.data.content;
+          this.userTotalotal = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //已选选项
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    resetForm(val) {
+      this.cancle();
+    },
+
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      this.proDataLin = val;
+      this.dialogVisible = true;
+      this.searchTarget();
+    },
+    edit(val) {
+      this.dialogVisible = true;
+      this.isView = false;
+
+      this.userDetailData = val;
+      //调用查询详情的接口
+    },
+    //调用查询详情的接口
+
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
+
+    register() {
+      let that = this;
+      console.log(this.userInfo);
+      this.$http.post(`/plan/addOrUpdate`, {}, (res) => {
+        this.disableFlagStatus();
+        // this.disableFlag = false;
+        if (res && res.code == 200) {
+          this.dialogVisible = false;
+
+          // this.$toast.success({ message: "成功" });
+          //调用父组件的查询方法
+          that.$emit("search");
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
+        }
+        //清空缓存
+        this.cancle();
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.progress_out/deep/ .el-progress-bar__inner {
+  background-image: linear-gradient(to right, #ff4e00, #ffffff);
+}
+.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-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 {
+  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: 40px;
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+
+.kply {
+  width: 100%;
+  margin-top: 100px;
+  // background-color: #FAFAFA;
+
+  .kply_inner {
+    // padding: 20px 20px;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 1200px;
+    min-height: 500px;
+
+    background-color: #ffffff;
+    border-radius: 40px;
+
+    .report_totol_score {
+      margin-top: 60px;
+      display: flex;
+      flex-direction: row;
+      // justify-content: space-between;
+      align-items: center;
+
+      .report_bei {
+        position: relative;
+        img {
+          height: 200px !important;
+          width: 260px !important;
+        }
+        // background-color: #111111;
+
+        .score {
+          width: 100%;
+          height: 40px;
+          text-align: center;
+          // height: 120px;
+          // background-color: #ffffff;
+          // width: 10px;
+          position: absolute;
+          left: 0;
+          right: 0;
+          top: -40px;
+          bottom: 0;
+          margin: auto;
+          color: #ffffff;
+          font-size: 40px;
+        }
+      }
+
+      .totol_result_des {
+        font-size: 30px;
+        margin-left: 50px;
+        letter-spacing: 3px;
+        line-height: 50px;
+      }
+    }
+
+    .report_echarts_out {
+      margin-top: 100px;
+      // background-color: #f7f7f7;
+      border-radius: 40px;
+      display: flex;
+      flex-direction: row;
+      // justify-content: space-between;
+
+      // height: 200px;
+      .progress_out {
+        margin-bottom: 40px;
+        width: 50%;
+        display: flex;
+        justify-content: start;
+        flex-direction: row;
+        // align-items: center;
+        // padding-right: 40px;
+
+        .progress_out_name {
+          color: #000000;
+          font-weight: 600;
+          padding-left: 20px;
+        }
+
+        .progress_out_score {
+          color: #ff1e00;
+          font-weight: 600;
+          margin-right: 5px;
+          margin-left: 15px;
+        }
+      }
+    }
+
+    .des_zhishu {
+      color: #222222;
+      font-size: 49px;
+      letter-spacing: 3px;
+    }
+
+    .report_des_out {
+      margin-top: 40px;
+      background-color: #f7f7f7;
+      padding: 20px 40px;
+      border-radius: 40px;
+
+      .score {
+        color: #48d68e;
+        font-size: 30px;
+        line-height: 60px;
+        letter-spacing: 3px;
+      }
+
+      .des {
+        color: #000000;
+        font-size: 24px;
+        line-height: 40px;
+        letter-spacing: 3px;
+      }
+    }
+
+    .start_button_out {
+      margin-top: 100px;
+      margin-bottom: 40px;
+      display: flex;
+      flex-direction: row;
+      justify-content: center;
+
+      .start_button_self {
+        cursor: pointer;
+        // width: 100px;
+        border-radius: 12px;
+        border: 3px solid #48d68e;
+        color: #ffffff;
+        background-color: #000000;
+        margin-right: 20px;
+        padding: 8px 60px;
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+      }
+    }
+  }
+}
+
+.report_info_out {
+  background-color: #f8f8f8;
+  border-radius: 40px;
+  padding-top: 40px;
+  padding-left: 40px;
+  padding-bottom: 40px;
+  display: flex;
+  align-items: center;
+
+  img {
+    width: 100px !important;
+    height: 100px !important;
+  }
+  .report_info_user {
+    display: flex;
+    flex-direction: column;
+    margin-left: 20px;
+    justify-content: space-around;
+    color: #000000;
+    font-size: 20px;
+    .info {
+      margin-bottom: 10px;
+    }
+    // font-weight: 700;
+  }
+}
+</style>

+ 11 - 1
src/components/manageRegister.vue

@@ -66,7 +66,7 @@
               ></el-input>
             </el-form-item>
             <div class="dig_button">
-              <el-button type="info" round @click="resetForm('ruleForm')">重置</el-button>
+              <el-button type="info" round @click="resetData()">重置</el-button>
               <!-- <el-button type="success" round @click="submitForm('ruleForm')"
                 >提交</el-button
               > -->
@@ -176,6 +176,16 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    resetData(){
+      this.$refs["ruleForm"].clearValidate();
+      //清空表单
+      this.ruleForm.group = "";
+      this.ruleForm.name = "";
+      this.ruleForm.studentNumber = "";
+      this.ruleForm.password = "";
+      this.ruleForm.comPassword = "";
+      this.ruleForm.sex = "";
+    },
     //获取组织架构方法--------------------开始-----------------------
     getChannel() {
       this.$http.get(`/org/findAllOrgByPOrgNo`, {}, (res) => {

+ 412 - 234
src/views/manage/channelInfo/channelUserManage.vue

@@ -2,25 +2,59 @@
   <div class="record-warp">
     <div class="record-main">
       <el-row>
-        <!-- <el-col :span="24">
+        <el-col :span="24">
           <div class="search-head">
-            <span>公司名称:</span>
-            <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
-            <el-button type="primary" icon="el-icon-search" @click="searchTarget">搜索</el-button>
-            <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch">清空</el-button>
+            <el-input v-model="name" clearable placeholder="请输入姓名"></el-input
+            >&nbsp;&nbsp;&nbsp;&nbsp;
+
+            <el-input
+              v-model="studentNumber"
+              clearable
+              placeholder="请输入学号"
+            ></el-input
+            >&nbsp;&nbsp;&nbsp;&nbsp;
+            <el-cascader
+              placeholder="请选择组织架构"
+              v-model="group"
+              :options="groupData"
+              :props="{ checkStrictly: true }"
+              clearable
+            ></el-cascader>
+            <!-- <el-select v-model="channel" placeholder="请选择所属组织架构">
+              <el-option
+                :label="item.name"
+                :value="item.id"
+                v-for="item in channelList"
+                :key="item.id"
+              ></el-option> 
+            </el-select> -->
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <!-- <span style="font-size: 16px;">性别:</span>&nbsp;&nbsp; -->
+            <div style="display: flex; flex-direction: row; align-items: center">
+              <span
+                style="
+                  font-size: 16px;
+                  margin-right: 10px;
+                  line-height: 20px;
+                  min-width: 40px;
+                "
+                >性别:</span
+              >
+              <el-radio v-model="sex" label="1">男</el-radio>
+              <el-radio v-model="sex" label="0">女</el-radio>
+            </div>
+            &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>
-        </el-col> -->
+        </el-col>
       </el-row>
       <el-row class="add_user_class">
         <el-col :span="24">
-          <div class="search-head">
-            <!-- <el-button type="primary" round icon="el-icon-plus" @click="addUser"
-              >新增</el-button
-            > -->
-            <!-- <el-button type="primary" round icon="el-icon-back" @click="goBack"
-              >返回</el-button
-            > -->
-          </div>
+          <div class="search-head"></div>
         </el-col>
       </el-row>
 
@@ -29,156 +63,142 @@
           :data="tableData"
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
+          :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
         >
           <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
-            </el-table-column> -->
-          <el-table-column label="头像" align="center" width="">
-            <template slot-scope="scope">
-              <el-image :src="scope.row.avatar" />
-            </template>
-          </el-table-column>
-          <el-table-column prop="name" label="姓名" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="description" label="个人描述" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="job" label="岗位" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="mail" label="邮箱" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="phone" label="手机号" align="center" width="">
-          </el-table-column>
-
+          </el-table-column> -->
           <el-table-column
-            prop="state"
-            label="状态"
+            show-overflow-tooltip
+            prop="userName"
+            label="姓名"
             align="center"
-            :formatter="formatterState"
             width=""
           >
           </el-table-column>
-          <el-table-column prop="reportNum" label="报告数量" align="center" width="">
+          <el-table-column prop="userNo" label="学号" align="center" width="">
           </el-table-column>
-          <!-- <el-table-column
-            prop="isDelete"
-            label="删除状态"
+          <el-table-column prop="totalScore" label="总分" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="gender"
+            label="性别"
             align="center"
-            :formatter="formatterIsDelete"
             width=""
+            :formatter="genderFun"
           >
-          </el-table-column> -->
-          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
-                    </el-table-column> -->
-          <el-table-column label="操作" width="200px" align="center" fixed="right">
+          </el-table-column>
+          <el-table-column prop="orgName" label="所属组织架构" align="center" width="">
+          </el-table-column>
+          <el-table-column label="操作" width="510px" align="center">
             <template slot-scope="scope">
-              <el-button @click="viewUser(scope.row)" type="text" size="small"
-                >查看</el-button
+              <div class="detail_button_out">
+                <div class="detail_button" @click="addUser(scope.row)">
+                  <img src="../../../assets/img/table/search.png" />
+                  <span> 选择计划 </span>
+                </div>
+    
+            
+              </div>
+              <!-- <el-popconfirm
+                v-if="scope.row.state != 0"
+                title="确定删除吗?"
+                placement="top"
+                @confirm="deleteUser(scope.$index, scope.row)"
+              >
+                <el-button
+                  size="small"
+                  style="margin-left: 10px"
+                  type="text"
+                  slot="reference"
+                  >删除</el-button
+                >
+              </el-popconfirm>
+              <el-popconfirm
+                v-if="scope.row.state != 0"
+                title="密码将重置为123456"
+                placement="top"
+                @confirm="resetUser(scope.$index, scope.row)"
               >
+                <el-button
+                  size="small"
+                  style="margin-left: 10px"
+                  type="text"
+                  slot="reference"
+                  >重置密码</el-button
+                >
+              </el-popconfirm> -->
             </template>
           </el-table-column>
         </el-table>
       </div>
-
+      <!-- small -->
       <el-pagination
-        small
+        class="pag_class"
         background
+        @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page.sync="pageNum"
-        layout="total, prev, pager, next"
+        layout="total, sizes, prev, pager, next"
         :page-size="pageSize"
+        :page-sizes="[10, 20, 50, 100]"
         :total="total"
       >
       </el-pagination>
       <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
-        </el-pagination> -->
+      </el-pagination> -->
     </div>
-    <StaffRegister ref="register" @search="searchTarget" />
-    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
-      <div>
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub" style="height: 200px">头像</div>
-              <div class="user_out_subNext">
-                <el-image :src="detailObj.avatar" style="width: 150px; height: 150px" />
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub" style="height: 200px">姓名</div>
-              <div class="user_out_subNext" style="height: 200px">
-                {{ detailObj.name }}
-              </div>
-            </div>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">个人描述</div>
-              <div class="user_out_subNext">
-                {{ detailObj.description }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">岗位</div>
-              <div class="user_out_subNext">
-                {{ detailObj.job }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">邮箱</div>
-              <div class="user_out_subNext">
-                {{ detailObj.mail }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">手机号</div>
-              <div class="user_out_subNext">
-                {{ detailObj.phone }}
-              </div>
-            </div>
-          </el-col>
-
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">状态</div>
-              <div class="user_out_subNext">
-                {{ detailObj.state == "1" ? "签约" : "解约" }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">报告数量</div>
-              <div class="user_out_subNext">
-                {{ detailObj.reportNum}}
-              </div>
-            </div>
-          </el-col>
-          
-        </el-row>
-      </div>
-    </el-dialog>
+    <Report ref="register" @search="searchTarget" />
   </div>
 </template>
 
 <script>
 import { oSessionStorage } from "../../../utils/utils";
-import staffRegister from "../../../components/StaffRegister.vue";
+import report from "../../../components/Report.vue";
+import { basePath } from "../../../utils/http";
+
 export default {
-  name: "channelManagement",
+  name: "userManage",
   components: {
-    StaffRegister: staffRegister,
+    Report: report,
   },
   data() {
     return {
+      basePath: basePath,
+      //上传文件的弹出款的标志
+      fileVisible: false,
+      //判断点击的是重置密码还是点击删除
+      isDelete: false,
+      //重置密码需要调用个userId
+      userId: "",
+      //充值密码使用userName
+      userName: "",
+      //重置密码弹出框
+      resetVisible: false,
+      //根据名称搜索
+      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: "",
@@ -190,34 +210,25 @@ export default {
       keyword: "",
       tableData: [],
       userInfo: {}, //用户信息
-      userId: "", //用户id
-      name: "", //根据名称搜索
-      userName: "", //根据昵称搜索
-      hospitalOrDepartment: "", //医院科室
 
       invitationCode: "",
       roleType: "0",
       type: 0,
-
-      channel:'',
-      detailObj: {},
+      view: {
+        name: "",
+        studentNumber: "",
+        sex: "",
+        orgName: "",
+      },
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
     };
   },
   created() {},
   mounted() {
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
 
-
-    if (this.userInfo.type == "1") {
-      this.channel = "";
-    } else if (this.userInfo.type == "0") {
-      this.channel = this.userInfo.channelId;
-    }
-
-    //判断是超级管理员吗
-  
-
- 
+    this.getChannel();
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });
@@ -225,90 +236,185 @@ export default {
     this.searchTarget();
   },
   methods: {
-    goBack(){
-        this.$router.go(-1)
-    },
-    //格式化状态
-    formatterIsDelete(row) {
-      if ((row.isDelete == "0")) {
-        return "正常";
-      } else if ((row.isDelete == "1")) {
-        return "已删除";
+    //文件上传成功
+    fileSuccess(res) {
+  
+
+      if (res.code == 200) {
+        this.searchTarget();
+        this.$message({
+          message:res.msg,
+          type: "success",
+        });
       }else{
-        return ''
+        this.$message({
+          message:res.msg,
+          type: 'error',
+        });
       }
+      //查询列表
+    },
+    //文件上传失败
+    fileError() {
+      this.$message({
+        message: "上传失败",
+        type: "error",
+      });
+    },
+    cancle() {
+      this.resetVisible = false;
     },
-    //格式化状态
-    formatterState(row) {
-      if (row.state == "1") {
-        return "签约";
-      } else if (row.state == "0") {
-        return "解约";
+    //提交文本
+    submitCom() {
+      //判断当前是否是
+      if (this.isDelete) {
+        this.deleteUser();
+        //调用删除方法
       } else {
-        return "";
+        this.resetFun();
+        // 调用重置密码方法
       }
     },
-    formatterDelete(row) {
-      if (row.isDelete == 0) {
-        return "正常";
+    //性别---
+    genderFun(val) {
+      let sex = val.gender;
+      if (sex == "1") {
+        return "男";
+      } else if (sex == "0") {
+        return "女";
       } else {
-        return "已删除";
+        return sex;
       }
     },
-    resetUser(index, val) {
-      console.log(val);
-      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    //获取组织架构方法--------------------开始-----------------------
+    getChannel() {
+      this.$http.get(`/org/findAllOrgByPOrgNo`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
-          this.$message.success("重置成功");
-          this.searchTarget();
+          //将值赋值给list
+          if (res.data.length > 0) {
+            let resAdd = this.addPro(res.data);
+            this.ppData = JSON.parse(JSON.stringify(resAdd));
+            let forRes = this.arrToTree(resAdd);
+            // console.log('格式化的结构')
+            // console.log(forRes)
+            let resultRes = this.deleteChildren(forRes);
+            console.log("格式化的结构且去掉children");
+            console.log(resultRes);
+            this.groupData = resultRes;
+          } else {
+            this.groupData = [];
+          }
+          // this.channelList = res.data;
         } else {
           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 !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.detailObj = 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;
     },
-    addUser() {
-      this.addRegisterUser(true);
+    addUser(val) {
+      this.addRegisterUser(val);
     },
     clearSearch() {
       this.name = "";
-      this.userName = "";
+      //搜索的用户编号
+      this.studentNumber = "";
+      //搜索的组织架构
+      // 搜索需要的性别
+      this.sex = "";
+      this.group = "";
       this.searchTarget();
     },
-    formatterRole(val) {
-      if (val.type == "1") {
-        return "超级管理员";
-      } else {
-        return "渠道用户";
-      }
-    },
 
-    forma(val) {
-      if (val.gender == "0") {
-        return "男";
-      } else {
-        return "女";
-      }
-    },
     addRegisterUser(val) {
       this.$refs.register.open(val);
     },
     editRegisterUser(val) {
       this.$refs.register.edit(val);
     },
-    deleteStaff(index, row) {
-      this.$http.delete(`/staff/delete/${row.id}`, {}, (res) => {
+    resetFun() {
+      this.$http.get(`/user/resetPassword?userId=${this.userId}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.resetVisible = false;
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    deleteUser() {
+      this.$http.get(`/user/delete?userId=${this.userId}`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           this.$message.success("删除成功");
+          this.resetVisible = false;
           this.searchTarget();
         } else {
           this.$message.error("删除失败");
@@ -322,27 +428,23 @@ export default {
     },
     //根据现有情况进行搜索
     searchList() {
-      //  let url =``
-      this.$http.post(
-        `/staff/find`,
-        {
-          pageNum: this.pageNum,
-          pageSize: this.pageSize,
-          channelId: this.channel,
-          // name: this.name,
-          // isDelete: 0,
-        },
-        (res) => {
-          // console.log(res,'用户测试记录')
-          if (res && res.code == 200) {
-            this.tableData = res.data.data;
-            this.total = res.data.totalElements;
-          } else {
-            // this.$toast.fail(res.msg);
-            this.$message.error(res.msg);
-          }
+      let url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
+        this.pageNum
+      }${this.sex == "" ? "" : `&gender=${this.sex}`}${
+        this.group.length == 0 ? "" : `&orgNo=${this.group[this.group.length - 1]}`
+      }${this.name == "" ? "" : `&userName=${this.name}`}${
+        this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
+      }`;
+      this.$http.get(url, {}, (res) => {
+        console.log(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.pageNum = 1;
@@ -362,42 +464,33 @@ export default {
       oSessionStorage.removeItem("token");
       this.$router.push({ path: "/" });
     },
-    //点击日历获取日期
-    getDate(param) {
-      // console.log(param,"日期。。。")
-      this.userRecord(param.dateStr);
-    },
+
     //点击获取月出勤次数
     getTimes(param) {
       this.monthTimes = param;
     },
-    // 用户测试记录显示
-    userRecord(date) {
-      this.$http.get(
-        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
-        {},
-        (res) => {
-          // console.log(res,'用户测试记录')
-          if (res && res.code == 200) {
-            this.listData = res.data;
-          } else {
-            this.$toast.fail(res.msg);
-          }
-        }
-      );
-    },
   },
 };
 </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 {
   width: 100%;
   height: 80vh;
-  //background: url(../../assets/img/index/19.png) no-repeat center;
-  //background-size: 100% 100%;
+
   position: relative;
 
   .record-main {
@@ -427,7 +520,6 @@ export default {
 
 .add_user_class {
   margin-top: 10px;
-  display: flex;
 }
 
 .user_out {
@@ -450,4 +542,90 @@ export default {
   padding-left: 10px;
   flex: 3;
 }
+.detail_button_out {
+  display: flex;
+  justify-content: space-around;
+  .detail_button {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+    span {
+      color: #00bf78;
+      // 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;
+  }
+}
 </style>

+ 138 - 76
src/views/manage/channelInfo/invite.vue

@@ -4,7 +4,7 @@
       <el-row>
         <el-col :span="24">
           <div class="search-head">
-            <el-input v-model="name" clearable placeholder="请输入名称"></el-input
+            <el-input v-model="planName" clearable placeholder="请输入名称"></el-input
             >&nbsp;&nbsp;&nbsp;&nbsp;
 
             <el-select v-model="planStatus" clearable placeholder="请选择状态">
@@ -26,14 +26,21 @@
                 :key="item.id"
               ></el-option> 
             </el-select> -->
-   
+
             &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>
-          
-            <el-button type="success"  round class="add_class" icon="el-icon-plus"  @click="addPlan">添加计划</el-button>
+
+            <el-button
+              type="success"
+              round
+              class="add_class"
+              icon="el-icon-plus"
+              @click="addPlan"
+              >添加计划</el-button
+            >
           </div>
         </el-col>
       </el-row>
@@ -54,43 +61,59 @@
           </el-table-column> -->
           <el-table-column
             show-overflow-tooltip
-            prop="userName"
-            label="姓名"
+            prop="planName"
+            label="计划名称"
             align="center"
             width=""
           >
           </el-table-column>
-          <el-table-column prop="userNo" label="学号" align="center" width="">
+          <el-table-column prop="createDate" label="创建时间" align="center" width="">
           </el-table-column>
           <el-table-column
-            prop="gender"
-            label="性别"
+            prop="planEndTime"
+            label="结束时间"
+            align="center"
+            width=""
+          ></el-table-column>
+          <el-table-column
+            prop="createUserName"
+            label="创建人"
             align="center"
             width=""
-            :formatter="genderFun"
+          ></el-table-column>
+
+          <el-table-column
+            prop="planStatus"
+            label="状态"
+            align="center"
+            width=""
+            :formatter="planStatusFun"
           >
           </el-table-column>
-          <el-table-column prop="orgName" label="所属组织架构" align="center" width="">
-          </el-table-column>
           <el-table-column label="操作" width="510px" align="center">
             <template slot-scope="scope">
               <div class="detail_button_out">
-                <div class="detail_button" @click="viewUser(scope.row)">
+                <div class="detail_button" @click="viewPlan(scope.row)">
                   <img src="../../../assets/img/table/search.png" />
-                  <span> 查看个人详情 </span>
+                  <span> 查看 </span>
                 </div>
                 <div class="detail_button" @click="editUser(scope.row)">
                   <img src="../../../assets/img/table/edit.png" />
-                  <span> 编辑编辑个人详情 </span>
+                  <span> 编辑 </span>
                 </div>
-                <!-- 弹出提示框 提示是否确认重置-->
-                <div class="detail_button" @click="resetUser(false, scope.row)">
-                  <img src="../../../assets/img/table/reset.png" />
-                  <span> 重置密码 </span>
+                <div class="detail_button" v-show="scope.row.status=='1'" @click="resetPlan(false, scope.row)">
+                  <img src="../../../assets/img/table/xiafa.png" />
+                  <span> 下发 </span>
                 </div>
-                <!-- 弹出提示框 提示是否确认删除-->
-
-                <div class="detail_button" @click="resetUser(true, scope.row)">
+                <div class="detail_button" @click="userOp( scope.row)">
+                  <img src="../../../assets/img/table/people.png" />
+                  <span> 人员配置 </span>
+                </div>
+                <div class="detail_button" @click="userPlanStatusFun( scope.row)">
+                  <img src="../../../assets/img/table/pro.png" />
+                  <span> 进度查看 </span>
+                </div>
+                <div class="detail_button" v-show="scope.row.status=='1'" @click="resetPlan(true, scope.row)">
                   <img src="../../../assets/img/table/delete.png" />
                   <span> 删除 </span>
                 </div>
@@ -116,6 +139,8 @@
       </el-pagination> -->
     </div>
     <PlanRegister ref="register" @search="searchTarget" />
+    <PlanUser ref="planUserAdd"/>
+    <PlanUserStatus  ref="userStatus" />
     <el-dialog
       class="dig_update"
       :visible.sync="centerDialogVisible"
@@ -127,27 +152,33 @@
         <div class="demo-ruleForm">
           <p class="dig_title">详情</p>
           <div class="user_out">
-            <div class="user_out_sub">姓名</div>
+            <div class="user_out_sub">计划名称</div>
             <div class="user_out_subNext">
-              {{ view.name }}
+              {{ view.planName }}
             </div>
           </div>
           <div class="user_out">
-            <div class="user_out_sub">学号</div>
+            <div class="user_out_sub">创建时间</div>
             <div class="user_out_subNext">
-              {{ view.studentNumber }}
+              {{ view.creatTime }}
             </div>
           </div>
           <div class="user_out">
-            <div class="user_out_sub">性别</div>
+            <div class="user_out_sub">结束时间</div>
             <div class="user_out_subNext">
-              {{ view.sex }}
+              {{ view.endTime }}
             </div>
           </div>
           <div class="user_out">
-            <div class="user_out_sub">组织架构</div>
+            <div class="user_out_sub">创建人</div>
             <div class="user_out_subNext">
-              {{ view.orgName }}
+              {{ view.creatUser }}
+            </div>
+          </div>
+          <div class="user_out">
+            <div class="user_out_sub">状态</div>
+            <div class="user_out_subNext">
+              {{ view.status }}
             </div>
           </div>
         </div>
@@ -163,10 +194,10 @@
     >
       <div slot="title">
         <div class="demo-ruleForm">
-          <p v-show="!isDelete" class="dig_title">重置密码</p>
-          <p v-show="isDelete" class="dig_title">删除用户</p>
-          <p v-show="!isDelete">重置密码后密码为123456</p>
-          <p v-show="isDelete">确认将删除{{ userName }}用户?</p>
+          <p v-show="!isDelete" class="dig_title">下发计划</p>
+          <p v-show="isDelete" class="dig_title">删除计划</p>
+          <p v-show="!isDelete">将下发{{opPlanName}}计划吗</p>
+          <p v-show="isDelete">确认将删除{{ opPlanName }}计划?</p>
           <div class="dig_button">
             <el-button type="info" round @click="cancle()">取消</el-button>
             <!-- <el-button type="success" round @click="submitForm('ruleForm')"
@@ -225,11 +256,15 @@
 <script>
 import { oSessionStorage } from "../../../utils/utils";
 import planRegister from "../../../components/PlanRegister.vue";
+import planUser from "../../../components/PlanUser.vue";
+import planUserStatus from "../../../components/PlanUserStatus.vue";
 import { basePath } from "../../../utils/http";
 export default {
   name: "userManage",
   components: {
     PlanRegister: planRegister,
+    PlanUser:planUser,
+    PlanUserStatus:planUserStatus
   },
   data() {
     return {
@@ -256,7 +291,6 @@ export default {
       ppData: [],
       groupData: [],
 
-
       centerDialogVisible: false,
       editUserFlag: false,
       startTime: "",
@@ -273,24 +307,35 @@ export default {
       roleType: "0",
       type: 0,
       view: {
-        name: "",
-        studentNumber: "",
-        sex: "",
-        orgName: "",
+        planName: "",
+        creatTime: "",
+        endTime: "",
+        creatUser: "",
+        status: "",
       },
       channel: "",
       channelList: [{ name: "渠道天成", id: "1" }],
-      options: [{
-          value: '1',
-          label: '未开始'
-        }, {
-          value: '2',
-          label: '进行中'
-        }, {
-          value: '3',
-          label: '已完成'
-        }],
-        planStatus:''
+      options: [
+        {
+          value: "1",
+          label: "未开始",
+        },
+        {
+          value: "2",
+          label: "进行中",
+        },
+        {
+          value: "3",
+          label: "已完成",
+        },
+      ],
+      planStatus: "",
+      planName: "",
+      
+      //删除时用的planId
+      opPlanId :'',
+        //删除时用的planName
+      opPlanName :''
     };
   },
   created() {},
@@ -305,6 +350,13 @@ export default {
     this.searchTarget();
   },
   methods: {
+    //打开用户列表弹出框
+    userOp(val){
+      this.$refs.planUserAdd.open(val);
+    },
+    userPlanStatusFun(val){
+      this.$refs.userStatus.open(val);
+    },
     //文件上传成功
     fileSuccess(res) {
       if (res.code == 200) {
@@ -335,7 +387,7 @@ export default {
     submitCom() {
       //判断当前是否是
       if (this.isDelete) {
-        this.deleteUser();
+        this.deletePlan();
         //调用删除方法
       } else {
         this.resetFun();
@@ -343,14 +395,16 @@ export default {
       }
     },
     //性别---
-    genderFun(val) {
-      let sex = val.gender;
-      if (sex == "1") {
-        return "男";
-      } else if (sex == "0") {
-        return "女";
+    planStatusFun(val) {
+      let planStatus = val.planStatus;
+      if (planStatus == "1") {
+        return "未开始";
+      } else if (planStatus == "2") {
+        return "进行中";
+      } else if (planStatus == "3") {
+        return "已完成";
       } else {
-        return sex;
+        return "";
       }
     },
     //每页多少条
@@ -425,11 +479,12 @@ export default {
         return "正常";
       }
     },
-    resetUser(flag, val) {
+    resetPlan(flag, val) {
+      this.isDelete=flag
       this.resetVisible = true;
-      this.isDelete = flag;
-      this.userId = val.id;
-      this.userName = val.userName;
+      this.opPlanId = val.id;
+      this.opPlanName = val.planName;
+ 
       //当前用户id
 
       //重置密码
@@ -437,11 +492,20 @@ export default {
     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;
+    viewPlan(row) {
+      this.view.planName = row.planName;
+      this.view.creatTime = row.createDate;
+      this.view.endTime = row.planEndTime;
+      this.view.creatUser = row.createUserName;
+      let st = "";
+      if (row.planStatus == "1") {
+        st = "未开始";
+      } else if (row.planStatus == "2") {
+        st = "进行中";
+      } else if (row.planStatus == "3") {
+        st = "已完成";
+      }
+      this.view.status = st;
       this.centerDialogVisible = true;
     },
     addPlan() {
@@ -461,19 +525,19 @@ export default {
       this.$refs.register.edit(val);
     },
     resetFun() {
-      this.$http.get(`/user/resetPassword?userId=${this.userId}`, {}, (res) => {
+      this.$http.get(`/plan/issuedPlanById?id=${this.opPlanId}`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           this.resetVisible = false;
-          this.$message.success("重置成功");
+          this.$message.success("下发成功");
           this.searchTarget();
         } else {
           this.$message.error(res.msg);
         }
       });
     },
-    deleteUser() {
-      this.$http.get(`/user/delete?userId=${this.userId}`, {}, (res) => {
+    deletePlan() {
+      this.$http.get(`/plan/deletePlanById?id=${this.opPlanId}`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           this.$message.success("删除成功");
@@ -491,11 +555,9 @@ export default {
     },
     //根据现有情况进行搜索
     searchList() {
-      let url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${
-        this.pageNum
-      }${this.name == "" ? "" : `&userName=${this.name}`}${
-        this.planStatus == "" ? "" : `&planStatus=${this.planStatus}`
-      }`;
+      let url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}${
+        this.planName == "" ? "" : `&planName=${this.planName}`
+      }${this.planStatus == "" ? "" : `&planStatus=${this.planStatus}`}`;
       this.$http.get(url, {}, (res) => {
         console.log(res);
         if (res && res.code == 200) {

+ 409 - 266
src/views/manage/channelManagement/channelManagement.vue

@@ -1,88 +1,105 @@
 <template>
   <div class="record-warp">
     <div class="record-main">
-      <el-row style="display:flex">
+      <el-row>
         <el-col :span="24">
           <div class="search-head">
-            <span>公司名称:</span>
-            <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input
+            <el-input v-model="name" clearable placeholder="请输入姓名"></el-input
             >&nbsp;&nbsp;&nbsp;&nbsp;
+
+            <el-input
+              v-model="studentNumber"
+              clearable
+              placeholder="请输入学号"
+            ></el-input
+            >&nbsp;&nbsp;&nbsp;&nbsp;
+            <el-cascader
+              placeholder="请选择组织架构"
+              v-model="group"
+              :options="groupData"
+              :props="{ checkStrictly: true }"
+              clearable
+            ></el-cascader>
+            <!-- <el-select v-model="channel" placeholder="请选择所属组织架构">
+              <el-option
+                :label="item.name"
+                :value="item.id"
+                v-for="item in channelList"
+                :key="item.id"
+              ></el-option> 
+            </el-select> -->
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <!-- <span style="font-size: 16px;">性别:</span>&nbsp;&nbsp; -->
+            <div style="display: flex; flex-direction: row; align-items: center">
+              <span
+                style="
+                  font-size: 16px;
+                  margin-right: 10px;
+                  line-height: 20px;
+                  min-width: 40px;
+                "
+                >性别:</span
+              >
+              <el-radio v-model="sex" label="1">男</el-radio>
+              <el-radio v-model="sex" label="0">女</el-radio>
+            </div>
+            &nbsp;&nbsp;&nbsp;&nbsp;
             <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
             >
-            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch"
-              >清空</el-button
-            >
-            
-            <el-button type="success" class="add_class"   round icon="el-icon-plus" @click="addUser"
-              >新增</el-button
-            >
+            <el-button type="info" round @click="clearSearch">清空</el-button>
+           
           </div>
         </el-col>
       </el-row>
-      <!-- height="600px" -->
-      <div class="table-content" style="display: flex;">
+      <el-row class="add_user_class">
+        <el-col :span="24">
+          <div class="search-head"></div>
+        </el-col>
+      </el-row>
+
+      <div class="table-content">
         <el-table
           :data="tableData"
-          
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
+          :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
         >
           <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
-            </el-table-column> -->
-          <el-table-column label="头像" align="center" width="">
-            <template slot-scope="scope">
-              <el-image :src="scope.row.avatar" />
-            </template>
-          </el-table-column>
-          <el-table-column prop="name" label="公司名称" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="province" label="所在省" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="city" label="所在市" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="address" label="地址" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="taxId" label="税号" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="corporate" label="法人" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="phone" label="手机号" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="idNumber" label="身份证号" align="center" width="">
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
-            prop="status"
-            label="状态"
+            show-overflow-tooltip
+            prop="planName"
+            label="计划名称"
             align="center"
-            :formatter="formatterStatus"
             width=""
           >
           </el-table-column>
-          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
-                    </el-table-column> -->
-          <el-table-column label="操作" width="200px" align="center" fixed="right">
+          <el-table-column prop="createDate" label="创建时间" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="planEndTime" label="结束时间" align="center" width="">
+          </el-table-column>
+          <!-- <el-table-column prop="userNo" label="测试人数" align="center" width="">
+          </el-table-column> -->
+          <el-table-column prop="createUserName" label="创建人" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="planStatus" label="状态" :formatter="forMaPlan" align="center" width="">
+          </el-table-column>
+          <el-table-column label="操作" width="510px" align="center">
             <template slot-scope="scope">
-              <el-button
-                @click="viewUser(scope.row)"
-                v-if="scope.row.state != 0"
-                type="text"
-                size="small"
-                >查看</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                v-if="scope.row.state != 0"
-                @click="editUser(scope.row)"
-                >编辑</el-button
-              >
-
-              <el-popconfirm
+              <div class="detail_button_out">
+                <div class="detail_button" @click="addUser(scope.row)">
+                  <img src="../../../assets/img/table/search.png" />
+                  <span> 查看报告 </span>
+                </div>
+    
+            
+              </div>
+              <!-- <el-popconfirm
                 v-if="scope.row.state != 0"
                 title="确定删除吗?"
                 placement="top"
-                @confirm="deleteChannel(scope.$index, scope.row)"
+                @confirm="deleteUser(scope.$index, scope.row)"
               >
                 <el-button
                   size="small"
@@ -92,134 +109,91 @@
                   >删除</el-button
                 >
               </el-popconfirm>
-              <el-button
-                type="text"
-                size="small"
+              <el-popconfirm
                 v-if="scope.row.state != 0"
-                @click="userManage(scope.row)"
-                >员工管理</el-button
+                title="密码将重置为123456"
+                placement="top"
+                @confirm="resetUser(scope.$index, scope.row)"
               >
+                <el-button
+                  size="small"
+                  style="margin-left: 10px"
+                  type="text"
+                  slot="reference"
+                  >重置密码</el-button
+                >
+              </el-popconfirm> -->
             </template>
           </el-table-column>
         </el-table>
       </div>
-
+      <!-- small -->
       <el-pagination
-      style="display:flex"
-        small
+        class="pag_class"
         background
+        @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page.sync="pageNum"
-        layout="total, prev, pager, next"
+        layout="total, sizes, prev, pager, next"
         :page-size="pageSize"
+        :page-sizes="[10, 20, 50, 100]"
         :total="total"
       >
       </el-pagination>
       <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
-        </el-pagination> -->
+      </el-pagination> -->
     </div>
-    <ChannelRegister ref="register" @search="searchTarget" />
-    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
-      <div>
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub" style="height: 200px">头像</div>
-              <div class="user_out_subNext">
-                <el-image :src="detailObj.avatar" style="width: 150px; height: 150px" />
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub" style="height: 200px">公司名称</div>
-              <div class="user_out_subNext" style="height: 200px">
-                {{ detailObj.name }}
-              </div>
-            </div>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">所在省</div>
-              <div class="user_out_subNext">
-                {{ detailObj.province }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">所在市</div>
-              <div class="user_out_subNext">
-                {{ detailObj.city }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">所在市</div>
-              <div class="user_out_subNext">
-                {{ detailObj.address }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">税号</div>
-              <div class="user_out_subNext">
-                {{ detailObj.taxId }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">法人</div>
-              <div class="user_out_subNext">
-                {{ detailObj.corporate }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">手机号</div>
-              <div class="user_out_subNext">
-                {{ detailObj.phone }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">身份证号</div>
-              <div class="user_out_subNext">
-                {{ detailObj.idNumber }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">状态</div>
-              <div class="user_out_subNext">
-                {{ detailObj.status == "1" ? "签约" : "解约" }}
-              </div>
-            </div>
-          </el-col>
-        </el-row>
-      </div>
-    </el-dialog>
+    <PlanReport ref="register" @search="searchTarget" />
   </div>
 </template>
 
 <script>
 import { oSessionStorage } from "../../../utils/utils";
-import channelRegister from "../../../components/ChannelRegister.vue";
+import planReport from "../../../components/PlanReport.vue";
+import { basePath } from "../../../utils/http";
 export default {
-  name: "channelManagement",
+  name: "userManage",
   components: {
-    ChannelRegister: channelRegister,
+    PlanReport: planReport,
   },
   data() {
     return {
+      basePath: basePath,
+      //上传文件的弹出款的标志
+      fileVisible: false,
+      //判断点击的是重置密码还是点击删除
+      isDelete: false,
+      //重置密码需要调用个userId
+      userId: "",
+      //充值密码使用userName
+      userName: "",
+      //重置密码弹出框
+      resetVisible: false,
+      //根据名称搜索
+      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: "",
@@ -231,41 +205,25 @@ export default {
       keyword: "",
       tableData: [],
       userInfo: {}, //用户信息
-      userId: "", //用户id
-      name: "", //根据名称搜索
-      userName: "", //根据昵称搜索
-      hospitalOrDepartment: "", //医院科室
 
       invitationCode: "",
       roleType: "0",
       type: 0,
       view: {
         name: "",
-        userName: "",
-        channelId: "",
-        role: "",
+        studentNumber: "",
+        sex: "",
+        orgName: "",
       },
-      detailObj: {},
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
     };
   },
   created() {},
   mounted() {
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
-    this.invitationCode = this.userInfo.invitationCode;
-    //判断是超级管理员吗
-    if (this.userInfo.roleType == "1") {
-      this.type = 0;
-    } else if (this.userInfo.roleType == "3") {
-      //如果登录的是代理用户
-      this.type = 4;
-    } else if (this.userInfo.roleType == "2") {
-      this.type = 5;
-    }
 
-    if (this.$route.query.invitationCode) {
-      this.invitationCode = this.$route.query.invitationCode;
-      this.type = this.$route.query.type;
-    }
+    this.getChannel();
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });
@@ -273,81 +231,197 @@ export default {
     this.searchTarget();
   },
   methods: {
-    //员工管理
-    userManage(row) {
-      this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
+    forMaPlan(val){
+      if(val.planStatus=='1'){
+        return '未开始'
+          //  
+      }else  if(val.planStatus=='2'){
+          //
+          return '进行中'
+      }else  if(val.planStatus=='3'){
+          //
+          return '已完成'
+      }
     },
-    //格式化状态
-    formatterStatus(row) {
-      if (row.status == "1") {
-        return "签约";
-      } else if (row.status == "0") {
-        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 {
-        return "";
+        this.resetFun();
+        // 调用重置密码方法
       }
     },
-    formatterDelete(row) {
-      if (row.isDelete == 0) {
-        return "正常";
+    //性别---
+    genderFun(val) {
+      let sex = val.gender;
+      if (sex == "1") {
+        return "男";
+      } else if (sex == "0") {
+        return "女";
       } else {
-        return "已删除";
+        return sex;
       }
     },
-    resetUser(index, val) {
-  
-      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+    //每页多少条
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    //获取组织架构方法--------------------开始-----------------------
+    getChannel() {
+      this.$http.get(`/org/findAllOrgByPOrgNo`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
-          this.$message.success("重置成功");
-          this.searchTarget();
+          //将值赋值给list
+          if (res.data.length > 0) {
+            let resAdd = this.addPro(res.data);
+            this.ppData = JSON.parse(JSON.stringify(resAdd));
+            let forRes = this.arrToTree(resAdd);
+            // console.log('格式化的结构')
+            // console.log(forRes)
+            let resultRes = this.deleteChildren(forRes);
+            console.log("格式化的结构且去掉children");
+            console.log(resultRes);
+            this.groupData = resultRes;
+          } else {
+            this.groupData = [];
+          }
+          // this.channelList = res.data;
         } else {
           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 !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.detailObj = 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;
     },
-    addUser() {
-      this.addRegisterUser(true);
+    addUser(val) {
+      this.addRegisterUser(val);
     },
     clearSearch() {
       this.name = "";
-      this.userName = "";
+      //搜索的用户编号
+      this.studentNumber = "";
+      //搜索的组织架构
+      // 搜索需要的性别
+      this.sex = "";
+      this.group = "";
       this.searchTarget();
     },
-    formatterRole(val) {
-      if (val.type == "1") {
-        return "超级管理员";
-      } else {
-        return "渠道用户";
-      }
-    },
 
-    forma(val) {
-      if (val.gender == "0") {
-        return "男";
-      } else {
-        return "女";
-      }
-    },
     addRegisterUser(val) {
       this.$refs.register.open(val);
     },
     editRegisterUser(val) {
       this.$refs.register.edit(val);
     },
-    deleteChannel(index, row) {
-      this.$http.delete(`/channel/delete/${row.id}`, {}, (res) => {
+    resetFun() {
+      this.$http.get(`/user/resetPassword?userId=${this.userId}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.resetVisible = false;
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    deleteUser() {
+      this.$http.get(`/user/delete?userId=${this.userId}`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           this.$message.success("删除成功");
+          this.resetVisible = false;
           this.searchTarget();
         } else {
           this.$message.error("删除失败");
@@ -361,26 +435,18 @@ export default {
     },
     //根据现有情况进行搜索
     searchList() {
-      //  let url =``
-      this.$http.post(
-        `/channel/find`,
-        {
-          pageNum: this.pageNum,
-          pageSize: this.pageSize,
-          name: this.name,
-          // isDelete: 0,
-        },
-        (res) => {
-          // console.log(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);
-          }
+      let url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}`;
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
+        if (res && res.code == 200) {
+          console.log(res.data.content)
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
         }
-      );
+      });
     },
     searchTarget() {
       this.pageNum = 1;
@@ -400,48 +466,40 @@ export default {
       oSessionStorage.removeItem("token");
       this.$router.push({ path: "/" });
     },
-    //点击日历获取日期
-    getDate(param) {
-      // console.log(param,"日期。。。")
-      this.userRecord(param.dateStr);
-    },
+
     //点击获取月出勤次数
     getTimes(param) {
       this.monthTimes = param;
     },
-    // 用户测试记录显示
-    userRecord(date) {
-      this.$http.get(
-        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
-        {},
-        (res) => {
-          // console.log(res,'用户测试记录')
-          if (res && res.code == 200) {
-            this.listData = res.data;
-          } else {
-            this.$toast.fail(res.msg);
-          }
-        }
-      );
-    },
   },
 };
 </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 {
   width: 100%;
-  display: flex;
-  flex-direction: column;
+  height: 80vh;
+
+  position: relative;
+
   .record-main {
     width: 100%;
-    // height: 100%;
-    
+    height: 100%;
+    box-sizing: border-box;
     overflow-y: auto;
-    display: flex;
-  flex-direction: column;
 
     .search-head {
       width: 100%;
@@ -486,5 +544,90 @@ export default {
   padding-left: 10px;
   flex: 3;
 }
+.detail_button_out {
+  display: flex;
+  justify-content: space-around;
+  .detail_button {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+    span {
+      color: #00bf78;
+      // 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;
+  }
+}
 </style>

+ 456 - 359
src/views/manage/channelManagement/contract.vue

@@ -1,281 +1,234 @@
 <template>
   <div class="record-warp">
     <div class="record-main">
+      <div class="compare_out">
+        <div class="user" @click="isClikcObj(true)">
+          <img style="width: 100px" :src="userImg" /><span style="position: absolute"
+            >用户对比</span
+          >
+        </div>
+        <div class="user" @click="isClikcObj(false)">
+          <img style="width: 100px" :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">
-            <span>渠道:</span>
-            <el-select v-model="channel" placeholder="请选择渠道">
-              <el-option
-                :label="item.name"
-                :value="item.id"
-                v-for="item in channelList"
-                :key="item.id"
-              ></el-option> </el-select
+            <el-input v-model="name" clearable placeholder="请输入姓名"></el-input
             >&nbsp;&nbsp;&nbsp;&nbsp;
+
+            <el-input
+              v-model="studentNumber"
+              clearable
+              placeholder="请输入学号"
+            ></el-input
+            >&nbsp;&nbsp;&nbsp;&nbsp;
+            <el-cascader
+              placeholder="请选择组织架构"
+              v-model="group"
+              :options="groupData"
+              :props="{ checkStrictly: true }"
+              clearable
+            ></el-cascader>
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <!-- <span style="font-size: 16px;">性别:</span>&nbsp;&nbsp; -->
+            <div style="display: flex; flex-direction: row; align-items: center">
+              <span
+                style="
+                  font-size: 16px;
+                  margin-right: 10px;
+                  line-height: 20px;
+                  min-width: 40px;
+                "
+                >性别:</span
+              >
+              <el-radio v-model="sex" label="1">男</el-radio>
+              <el-radio v-model="sex" label="0">女</el-radio>
+            </div>
+            &nbsp;&nbsp;&nbsp;&nbsp;
             <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
             >
-            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch"
-              >清空</el-button
-            >
-            <el-button type="success" class="add_class" round icon="el-icon-plus" @click="addUser"
-              >新增</el-button
-            >
+            <el-button type="info" round @click="clearSearch">清空</el-button>
           </div>
         </el-col>
       </el-row>
+      <el-row class="add_user_class">
+        <el-col :span="24">
+          <div class="search-head"></div>
+        </el-col>
+      </el-row>
 
       <div class="table-content">
         <el-table
+          
           :data="tableData"
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
+          :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
         >
-          <el-table-column prop="channelName" label="渠道" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="used" label="已使用次数" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="singlePrice" label="单次价格" align="center" width="">
-          </el-table-column>
-          <el-table-column prop="rechargeUsed" label="充值使用次数" align="center" width="">
+          <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
+          </el-table-column> -->
+          <el-table-column
+           v-if="isUser"
+            show-overflow-tooltip
+            prop="userName"
+            label="姓名"
+            align="center"
+            width=""
+          >
           </el-table-column>
-          <el-table-column prop="unuse" label="剩余次数" align="center" width="">
+          <el-table-column v-if="isUser" prop="userNo" label="学号" align="center" width="">
           </el-table-column>
-          <el-table-column prop="rechargeCount" label="累计充值次数" align="center" width="">
-        </el-table-column>
-        <el-table-column prop="signAmount" label="签约单次金额" align="center" width="">
-        </el-table-column>
-          <el-table-column prop="effectiveDate" label="有效时间起" align="center" width="">
+          <el-table-column v-if="isUser" prop="totalScore" label="总分" align="center" width="">
           </el-table-column>
-          <el-table-column prop="expirationDate" label="有效时间止" align="center" width="">
+          <el-table-column
+          v-if="isUser"
+            prop="gender"
+            label="性别"
+            align="center"
+            width=""
+            :formatter="genderFun"
+          >
           </el-table-column>
-        
           <el-table-column
-            prop="status"
-            label="状态"
+          v-if="isUser"
+            prop="orgName"
+            label="所属组织架构"
             align="center"
-            :formatter="formatterStatus"
             width=""
+         
           >
           </el-table-column>
           <el-table-column
-            prop="selfPage"
-            label="自定义首尾页"
+           v-if="!isUser"
+            show-overflow-tooltip
+            prop="planName"
+            label="计划名称"
             align="center"
-            :formatter="formatterSelfPage"
             width=""
           >
           </el-table-column>
-          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
-                    </el-table-column> -->
-          <el-table-column label="操作" width="200px" align="center" fixed="right">
+          <el-table-column  v-if="!isUser" prop="createDate" label="创建时间" align="center" width="">
+          </el-table-column>
+          <el-table-column  v-if="!isUser" prop="planEndTime" label="结束时间" align="center" width="">
+          </el-table-column>
+          <el-table-column  v-if="!isUser" prop="createUserName" label="创建人" align="center" width="">
+          </el-table-column>
+          <el-table-column  v-if="!isUser"
+            prop="planStatus"
+            label="状态"
+            :formatter="forMaPlan"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column label="操作" width="510px" align="center">
             <template slot-scope="scope">
-              <el-button
-                @click="viewUser(scope.row)"
-                v-if="scope.row.state != 0"
-                type="text"
-                size="small"
-                >查看</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                v-if="scope.row.state != 0"
-                @click="editUser(scope.row)"
-                >编辑</el-button
-              >
-
-              <el-popconfirm
-                v-if="scope.row.state != 0"
-                title="确定删除吗?"
-                placement="top"
-                @confirm="deleteChannel(scope.$index, scope.row)"
-              >
-                <el-button
-                  size="small"
-                  style="margin-left: 10px"
-                  type="text"
-                  slot="reference"
-                  >删除</el-button
-                >
-              </el-popconfirm>
-              <el-button
-                type="text"
-                size="small"
-                v-if="scope.row.state != 0"
-                @click="viewPoster(scope.row)"
-                >查看海报</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                v-if="scope.row.state != 0"
-                @click="editHomeFun(scope.row)"
-                >PDF设置</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                v-if="scope.row.state != 0"
-                @click="topUpCount(scope.row)"
-                >充值次数</el-button
-              >
+              <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 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 class="detail_button_out" v-if="!isUser">
+                <div class="detail_button" @click="planUser(scope.row)">
+                  <img src="../../../assets/img/table/search.png" />
+                  <span> 个人报告列表 </span>
+                </div>
+              </div>
             </template>
-            
           </el-table-column>
         </el-table>
       </div>
-
+      <!-- small -->
       <el-pagination
-        small
+        class="pag_class"
         background
+        @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page.sync="pageNum"
-        layout="total, prev, pager, next"
+        layout="total, sizes, prev, pager, next"
         :page-size="pageSize"
+        :page-sizes="[10, 20, 50, 100]"
         :total="total"
       >
       </el-pagination>
       <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
-        </el-pagination> -->
+      </el-pagination> -->
     </div>
-    <ContractRegister ref="register" @search="searchTarget" />
-    <ContractPoster ref="poster" @search="searchTarget" />
-    <ContractTopUp ref="topUp" @search="searchTarget" />
-    
-    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
-      <div>
-       
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">渠道</div>
-              <div class="user_out_subNext">
-                {{ detailObj.channelName }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">已使用次数</div>
-              <div class="user_out_subNext">
-                {{ detailObj.used }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">单次价格</div>
-              <div class="user_out_subNext">
-                {{ detailObj.singlePrice }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">充值使用次数</div>
-              <div class="user_out_subNext">
-                {{ detailObj.rechargeUsed }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">剩余次数</div>
-              <div class="user_out_subNext">
-                {{ detailObj.unuse }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">累计充值次数</div>
-              <div class="user_out_subNext">
-                {{ detailObj.rechargeCount }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">签约单次金额</div>
-              <div class="user_out_subNext">
-                {{ detailObj.signAmount }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">有效时间起</div>
-              <div class="user_out_subNext">
-                {{ detailObj.effectiveDate }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">有效时间止</div>
-              <div class="user_out_subNext">
-                {{ detailObj.expirationDate }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">状态</div>
-              <div class="user_out_subNext">
-                {{ detailObj.status == "1" ? "签约" : "解约" }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">自定义首尾页</div>
-              <div class="user_out_subNext">
-                {{ detailObj.selfPage == "1" ? "是" : "否" }}
-              </div>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub">备注</div>
-              <div class="user_out_subNext">
-                {{ detailObj.remarks}}
-              </div>
-            </div>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <div class="user_out">
-              <div class="user_out_sub" style="height: 200px">海报背景图</div>
-              <div class="user_out_subNext">
-                <el-image :src="detailObj.background" style="width: 150px; height: 150px" />
-              </div>
-            </div>
-          </el-col>
-        
-        </el-row>
-      </div>
-    </el-dialog>
+    <CompareUser ref="register" @search="searchTarget" />
+    <ComparePlanUser ref="planUser" @search="searchTarget" />
   </div>
 </template>
 
 <script>
 import { oSessionStorage } from "../../../utils/utils";
-import contractRegister from "../../../components/ContractRegister.vue";
-
-import contractPoster from "../../../components/ContractPoster.vue";
-import contractTopUp from "../../../components/ContractTopUp.vue";
+import compareUser from "../../../components/CompareUser.vue";
+import comparePlanUser from "../../../components/ComparePlanUser.vue";
+import { basePath } from "../../../utils/http";
+import userImgActive from "../../../assets/report/lv.png";
+import userImgDefault from "../../../assets/report/white.png";
 export default {
-  name: "channelManagement",
+  name: "userManage",
   components: {
-    ContractRegister:contractRegister,
-    ContractPoster: contractPoster,
-    ContractTopUp:contractTopUp
+    CompareUser: compareUser,
+    ComparePlanUser:comparePlanUser
   },
   data() {
     return {
+      //判断是用户还是计划对比
+      isUser: true,
+      //用户背景图
+      userImg: userImgActive,
+      //计划背景图
+      planImg: userImgDefault,
+
+      basePath: basePath,
+      //上传文件的弹出款的标志
+      fileVisible: false,
+      //判断点击的是重置密码还是点击删除
+      isDelete: false,
+      //重置密码需要调用个userId
+      userId: "",
+      //充值密码使用userName
+      userName: "",
+      //重置密码弹出框
+      resetVisible: false,
+      //根据名称搜索
+      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: "",
@@ -287,21 +240,16 @@ export default {
       keyword: "",
       tableData: [],
       userInfo: {}, //用户信息
-      userId: "", //用户id
-      name: "", //根据名称搜索
-      userName: "", //根据昵称搜索
-      hospitalOrDepartment: "", //医院科室
 
       invitationCode: "",
       roleType: "0",
       type: 0,
       view: {
         name: "",
-        userName: "",
-        channelId: "",
-        role: "",
+        studentNumber: "",
+        sex: "",
+        orgName: "",
       },
-      detailObj: {},
       channel: "",
       channelList: [{ name: "渠道天成", id: "1" }],
     };
@@ -310,28 +258,7 @@ export default {
   mounted() {
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
 
-
-    if (this.userInfo.type == "1") {
-      this.channel = "";
-    } else if (this.userInfo.type == "0") {
-      this.channel = this.userInfo.channelId;
-    }
-    this.invitationCode = this.userInfo.invitationCode;
     this.getChannel();
-    //判断是超级管理员吗
-    if (this.userInfo.roleType == "1") {
-      this.type = 0;
-    } else if (this.userInfo.roleType == "3") {
-      //如果登录的是代理用户
-      this.type = 4;
-    } else if (this.userInfo.roleType == "2") {
-      this.type = 5;
-    }
-
-    if (this.$route.query.invitationCode) {
-      this.invitationCode = this.$route.query.invitationCode;
-      this.type = this.$route.query.type;
-    }
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });
@@ -339,120 +266,193 @@ export default {
     this.searchTarget();
   },
   methods: {
-    //编辑首页
-    editHomeFun(row){
-      debugger;
-      this.$router.push({path:'/manage/editHomePage',query:{channelId:row.channelId}})
+    isClikcObj(val) {
+      this.isUser = val;
+
+      if (val) {
+       
+        this.userImg = userImgActive;
+        this.planImg = userImgDefault;
+      } else {
+        this.planImg = userImgActive;
+        this.userImg = userImgDefault;
+      }
+      this.searchTarget()
+    },
+    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",
+        });
+      }
+      //查询列表
     },
-    //充值次数
-    topUpCount(row){
-        // console.log(this.$refs.topUp)
-        this.$refs.topUp.open(row.id)
+    //文件上传失败
+    fileError() {
+      this.$message({
+        message: "上传失败",
+        type: "error",
+      });
     },
-    //查看海报
-    viewPoster(row){
-        this.$refs.poster.open(row)
+    cancle() {
+      this.resetVisible = false;
     },
-    //格式化自定义首尾页
-    formatterSelfPage(row){
-        if(row.selfPage=='0'){
-            return '否'
-        }else{
-            return '是'
-        }
+    //提交文本
+    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) {
+      console.log(`每页 ${val} 条`);
+      //将首页重置为1时---且总条数变化
+      //设置为当前总条数
+    },
+    //获取组织架构方法--------------------开始-----------------------
     getChannel() {
-      this.$http.get(`/channel/findAll`, {}, (res) => {
+      this.$http.get(`/org/findAllOrgByPOrgNo`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           //将值赋值给list
-          this.channelList = res.data;
+          if (res.data.length > 0) {
+            let resAdd = this.addPro(res.data);
+            this.ppData = JSON.parse(JSON.stringify(resAdd));
+            let forRes = this.arrToTree(resAdd);
+            // console.log('格式化的结构')
+            // console.log(forRes)
+            let resultRes = this.deleteChildren(forRes);
+            console.log("格式化的结构且去掉children");
+            console.log(resultRes);
+            this.groupData = resultRes;
+          } else {
+            this.groupData = [];
+          }
+          // this.channelList = res.data;
         } else {
           this.$message.error(res.msg);
         }
       });
     },
-    //员工管理
-    userManage(row) {
-      this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
+    //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;
     },
-    //格式化状态
-    formatterStatus(row) {
-      if (row.status == "1") {
-        return "签约";
-      } else if (row.status == "0") {
-        return "解约";
-      } else {
-        return "";
+    //非递归方式:将平铺数据转换为树形结构数据
+    arrToTree(arr) {
+      let data = arr.filter((item) => {
+        item.children = arr.filter((e) => {
+          return item.orgNo === e.parentOrgNo;
+        });
+        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.isDelete == 0) {
-        return "正常";
-      } else {
+      if (row.state == 0) {
         return "已删除";
+      } else {
+        return "正常";
       }
     },
-    resetUser(index, val) {
+    resetUser(flag, val) {
+      this.resetVisible = true;
+      this.isDelete = flag;
+      this.userId = val.id;
+      this.userName = val.userName;
+      //当前用户id
 
-      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
-        //  this.$toast.success({message:'成功'});
-        if (res && res.code == 200) {
-          this.$message.success("重置成功");
-          this.searchTarget();
-        } else {
-          this.$message.error(res.msg);
-        }
-      });
       //重置密码
     },
     editUser(row) {
       this.editRegisterUser(row);
     },
     viewUser(row) {
-      this.detailObj = 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;
     },
-    addUser() {
-      this.addRegisterUser(true);
+    planUser(val){
+      this.$refs.planUser.open(val)
+    },
+    addUser(val) {
+      this.addRegisterUser(val);
     },
     clearSearch() {
-      this.channel = "";
+      this.name = "";
+      //搜索的用户编号
+      this.studentNumber = "";
+      //搜索的组织架构
+      // 搜索需要的性别
+      this.sex = "";
+      this.group = "";
       this.searchTarget();
     },
-    formatterRole(val) {
-      if (val.type == "1") {
-        return "超级管理员";
-      } else {
-        return "渠道用户";
-      }
-    },
 
-    forma(val) {
-      if (val.gender == "0") {
-        return "男";
-      } else {
-        return "女";
-      }
-    },
     addRegisterUser(val) {
       this.$refs.register.open(val);
     },
     editRegisterUser(val) {
       this.$refs.register.edit(val);
     },
-    deleteChannel(index, row) {
-      this.$http.delete(`/sign/delete/${row.id}`, {}, (res) => {
-        //  this.$toast.success({message:'成功'});
-        if (res && res.code == 200) {
-          this.$message.success("删除成功");
-          this.searchTarget();
-        } else {
-          this.$message.error("删除失败");
-        }
-      });
-    },
 
     handleCurrentChange(val) {
       this.pageNum = val;
@@ -460,23 +460,22 @@ export default {
     },
     //根据现有情况进行搜索
     searchList() {
-      //  let url =``
-      let data = {};
-      if (this.channel == "" || this.channel == null) {
-        data = {
-          pageNum: this.pageNum,
-          pageSize: this.pageSize,
-        };
+      let url;
+      if (this.isUser) {
+        url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
+          this.pageNum
+        }${this.sex == "" ? "" : `&gender=${this.sex}`}${
+          this.group.length == 0 ? "" : `&orgNo=${this.group[this.group.length - 1]}`
+        }${this.name == "" ? "" : `&userName=${this.name}`}${
+          this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
+        }`;
       } else {
-        data = {
-          pageNum: this.pageNum,
-          pageSize: this.pageSize,
-          channelId: this.channel,
-        };
+        url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}`;
       }
-      this.$http.post(`/sign/find`, data, (res) => {
-        // console.log(res,'用户测试记录')
+      this.$http.get(url, {}, (res) => {
+        console.log(res);
         if (res && res.code == 200) {
+          console.log(res.data.content);
           this.tableData = res.data.content;
           this.total = res.data.totalElements;
         } else {
@@ -503,43 +502,55 @@ export default {
       oSessionStorage.removeItem("token");
       this.$router.push({ path: "/" });
     },
-    //点击日历获取日期
-    getDate(param) {
-      // console.log(param,"日期。。。")
-      this.userRecord(param.dateStr);
-    },
+
     //点击获取月出勤次数
     getTimes(param) {
       this.monthTimes = param;
     },
-    // 用户测试记录显示
-    userRecord(date) {
-      this.$http.get(
-        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
-        {},
-        (res) => {
-          // console.log(res,'用户测试记录')
-          if (res && res.code == 200) {
-            this.listData = res.data;
-          } else {
-            this.$toast.fail(res.msg);
-          }
-        }
-      );
-    },
   },
 };
 </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;
-  //background: url(../../assets/img/index/19.png) no-repeat center;
-  //background-size: 100% 100%;
-  position: relative;
+  .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%;
@@ -590,4 +601,90 @@ export default {
   padding-left: 10px;
   flex: 3;
 }
+.detail_button_out {
+  display: flex;
+  justify-content: space-around;
+  .detail_button {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+    span {
+      color: #00bf78;
+      // 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;
+  }
+}
 </style>