Browse Source

修改-----用户报告

plg 5 months ago
parent
commit
28e55bbcad
2 changed files with 150 additions and 112 deletions
  1. 147 70
      src/components/Report.vue
  2. 3 42
      src/views/manage/channelInfo/channelUserManage.vue

+ 147 - 70
src/components/Report.vue

@@ -77,6 +77,43 @@
         </div>
       </el-dialog>
     </div>
+    <div>
+      <el-dialog
+        :visible.sync="topicVisible"
+        :close-on-click-modal="false"
+        width="40%"
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div label-width="150px" class="demo-ruleForm">
+            <p v-if="isView" class="dig_title">选择题目</p>
+            <div slot=""></div>
+            <div slot="footer"></div>
+
+            <div class="table-content">
+              <!-- 修改文本 -->
+              <!-- <el-radio-group v-model="radio1" ref="radio_group" @input="radioChange">
+                <el-radio
+                  v-for="item in topPicList"
+                  :label="item.name"
+                  :key="item.name"
+                  :value="item.name"
+                ></el-radio>
+              </el-radio-group> -->
+              <el-button
+                v-for="item in topPicList"
+                :key="item.name"
+                @click="radioClick(item)"
+              >
+                {{ item.name }}
+              </el-button>
+            </div>
+
+            <div class="dig_button"></div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
     <div class="dig_update">
       <el-dialog
         :visible.sync="userVisible"
@@ -117,7 +154,7 @@
                     </div>
                   </div>
                   <div class="out_p">
-                    <div class="echrts_sty" ref="echarts_ld"></div>
+                    <div v-show="currentFlag!='SHAPE_RANDOM'" class="echrts_sty" ref="echarts_ld"></div>
                     <div class="report_echarts_out">
                       <!-- justify-content: space-around; -->
                       <div
@@ -133,6 +170,7 @@
                       >
                         <div
                           class="progress_out"
+                          :style="{width:currentFlag!='SHAPE_RANDOM'?'100%':'50%'}"
                           v-for="(item, index) in echarts_name_list"
                           :key="index"
                         >
@@ -163,12 +201,12 @@
                     :key="index"
                     style="padding-top: 20px"
                   >
-                    <div v-show="reportDataAll.length - 1 != index" class="des_zhishu">
+                    <div class="des_zhishu">
                       {{ item.dimensionName }}
                     </div>
                     <div
                       class="report_des_out"
-                      v-show="reportDataAll.length - 1 != index"
+                   
                     >
                       <div class="score">
                         分数:{{ item.dimensionScore
@@ -219,6 +257,7 @@ import md5 from "md5";
 export default {
   data() {
     return {
+      topicVisible: false,
       //接收所属组织结构的词语
       orgName: "",
       userVisible: false,
@@ -268,14 +307,20 @@ export default {
       option: {},
       echarts_ld: "",
       colorPro: "linear-gradient(to right,#FF4E00 ,#ffffff)",
+      //该用户的需要做的题目的列表
+      topPicList: [],
+      radio1: "",
+      currentFlag:''
     };
   },
   mounted() {
     this.echarts_ld = this.$refs.echarts_ld;
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
-  
   },
   methods: {
+    isRadioFun(val) {
+      console.log(val);
+    },
     forMatCom(val) {
       if (val.isComplete == "0") {
         return "未完成";
@@ -285,42 +330,68 @@ export default {
     },
     //查询报告 //根据planId 和用户编号
     queryRport(val) {
+      //打印计划信息
+      //调用接口--根据计划ID查询计划中题目需要显示的个数及名称
+      let url = `/planContent/findAllByPlanId?planId=${val.id}&userNo=${val.userNo}`;
+
+      this.$http.get(url, {}, (res) => {
+        //查询题目列表
+        let list = [];
+        list = res.data;
+        console.log(list);
+        //过滤一下list
+
+        this.topPicList = list.filter((item) => {
+          return item.isDisplayed == "1";
+        });
+      });
+      //出现选择了几个题目//需要显示--需要出现个弹出框进行选择
+      this.topicVisible = true;
+    },
+    radioClick(val) {
+      console.log(val);
+      console.log(this.proDataLin);
+      //在数组中招待
       let params = {
-        planId: val.id,
+        planId: val.planId,
         userNo: this.proDataLin.userNo,
+        flag: val.flag,
       };
+      this.currentFlag =  val.flag
       this.userVisible = true;
-      //调用查询报告的方法
       this.reportDetail(params);
     },
     reportDetail(params) {
-      let url = `/userRecordScore/findAllByPlanIdAndUserNo?planId=${params.planId}&userNo=${params.userNo}`;
+      let url = `/userRecordScore/findByFlagAndUserNo?planId=${params.planId}&userNo=${params.userNo}&flag=${params.flag}`;
+      console.log(url);
       this.$http.get(url, {}, (res) => {
         console.log(res);
         if (res.code == 200) {
           // this.reportData = res.data;
           console.log("res");
           console.log(res);
-          this.reportDataAll = res.data.report;
-          let a = res.data.report.filter((item) => {
-            return item.isIcon == "1";
+          this.reportDataAll = res.data.filter((item) => {
+            return item.dimensionName != "总分";
           });
-          this.orgName = res.data.user.orgName;
-          console.log(a);
-          this.reportData = a;
+
+          this.orgName = res.data[0].orgName;
+
+          this.reportData = res.data;
           // let a =[res.data[0].]
           //修改文本
 
           let scoreList = [];
           let scoreDes = [];
           let nameList = [];
-          for (let i = 0; i < a.length - 1; i++) {
+          for (let i = 0; i < this.reportData.length; i++) {
             //
-            scoreList.push(parseInt(a[i].dimensionScore));
-            scoreDes.push(a[i].dimensionImprovement);
+            if (this.reportData[i].dimensionName != "总分") {
+              scoreList.push(parseInt(this.reportData[i].dimensionScore));
+              scoreDes.push(this.reportData[i].dimensionImprovement);
 
-            let ob = { name: a[i].dimensionName, max: 100 };
-            nameList.push(ob);
+              let ob = { name: this.reportData[i].dimensionName, max: 100 };
+              nameList.push(ob);
+            }
           }
           this.echarts_des_list = scoreDes;
           this.echarts_data_list = scoreList;
@@ -475,61 +546,61 @@ export default {
     open(val) {
       this.proDataLin = val;
       this.dialogVisible = true;
-        //查询用户下边的计划
-    //获取渠道信息
-    // 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",
+      //查询用户下边的计划
+      //获取渠道信息
+      // 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",
+        series: [
+          {
+            type: "radar",
+            symbolSize: 6,
+            data: [
+              {
+                value: this.echarts_data_list,
+                lineStyle: {
+                  normal: {
+                    color: "#FF1E00",
+                  },
                 },
-              },
-              //折线拐点颜色
-              itemStyle: {
-                normal: {
-                  color: "#FF1E00",
-                  borderWidth: 3, //拐点边框大小
+                //折线拐点颜色
+                itemStyle: {
+                  normal: {
+                    color: "#FF1E00",
+                    borderWidth: 3, //拐点边框大小
+                  },
+                  // emphasis: {
+                  //     color: '#000000'//hover拐点颜色定义
+                  // }
+                },
+                // name: 'Actual Spending'
+                areaStyle: {
+                  //阴影区域背景
+                  // color: 'rgba(255, 228, 52, 0.6)'
+                  color: "#F8B4AB",
                 },
-                // emphasis: {
-                //     color: '#000000'//hover拐点颜色定义
-                // }
-              },
-              // name: 'Actual Spending'
-              areaStyle: {
-                //阴影区域背景
-                // color: 'rgba(255, 228, 52, 0.6)'
-                color: "#F8B4AB",
               },
-            },
-          ],
-        },
-      ],
-    };
+            ],
+          },
+        ],
+      };
       this.searchTarget();
     },
     edit(val) {
@@ -571,6 +642,12 @@ export default {
 };
 </script>
 <style>
+input[aria-hidden="true"] {
+  display: none !important;
+}
+.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
+  box-shadow: none;
+}
 .el-dialog {
   border-radius: 20px !important;
   /* background-color: #f7f7f7 !important; */
@@ -600,7 +677,7 @@ export default {
   background: transparent !important;
 }
 .demo-ruleForm /deep/ .el-form-item {
-  margin-right: 10px;
+  // margin-right: 10px;
   vertical-align: top;
   display: flex !important;
   flex-direction: column;
@@ -636,7 +713,7 @@ export default {
 .demo-ruleForm {
   background-color: #ffffff;
   // border-radius: 20px;
-  margin-right: -10px;
+  // margin-right: -10px;
   margin-top: -10px;
   padding-right: 100px;
   padding-left: 100px;

+ 3 - 42
src/views/manage/channelInfo/channelUserManage.vue

@@ -96,7 +96,7 @@
           <el-table-column label="操作" width="auto" align="center">
             <template slot-scope="scope">
               <div class="detail_button_out">
-                <div class="detail_button" @click="addUser(scope.row)">
+                <div class="detail_button" @click="selectPlan(scope.row)">
                   <img src="../../../assets/img/table/search.png" />
                   <span> 选择计划 </span>
                 </div>
@@ -265,16 +265,6 @@ export default {
       this.resetVisible = false;
     },
     //提交文本
-    submitCom() {
-      //判断当前是否是
-      if (this.isDelete) {
-        this.deleteUser();
-        //调用删除方法
-      } else {
-        this.resetFun();
-        // 调用重置密码方法
-      }
-    },
     //性别---
     genderFun(val) {
       let sex = val.gender;
@@ -371,9 +361,7 @@ export default {
 
       //重置密码
     },
-    editUser(row) {
-      this.editRegisterUser(row);
-    },
+
     viewUser(row) {
       this.view.name = row.userName;
       this.view.studentNumber = row.userNo;
@@ -381,7 +369,7 @@ export default {
       this.view.orgName = row.orgName;
       this.centerDialogVisible = true;
     },
-    addUser(val) {
+    selectPlan(val) {
       this.addRegisterUser(val);
     },
     clearSearch() {
@@ -401,31 +389,6 @@ export default {
     editRegisterUser(val) {
       this.$refs.register.edit(val);
     },
-    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("删除失败");
-        }
-      });
-    },
-
     handleCurrentChange(val) {
       this.pageNum = val;
       this.searchList();
@@ -440,9 +403,7 @@ export default {
       }${this.name == "" ? "" : `&userName=${this.name}`}${
         this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
       }`;
-      debugger;
       this.$http.get(url, {}, (res) => {
-        debugger;
         console.log(res);
         if (res && res.code == 200) {
           this.tableData = res.data.content;