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

修改跳转到趋势界面

plg 4 місяців тому
батько
коміт
df7563cb17

BIN
src/assets/img/report/downN.png


+ 54 - 9
src/components/GroupCompare.vue

@@ -4,7 +4,7 @@
       title=""
       :visible.sync="centerDialogVisible"
       :close-on-click-modal="false"
-      width="80%"
+      width="90%"
       top="5vh"
       style="border-radius: 40px"
     >
@@ -61,11 +61,19 @@
                   <th class="first">序号</th>
                   <th>班级名称</th>
                   <th>占比</th>
+                  <th>趋势</th>
                 </tr>
                 <tr v-for="(item, index) in yiyuList10" :key="item.name">
                   <td class="first">{{ index + 1 }}</td>
                   <td>{{ item.name }}</td>
                   <td :style="{ color: item.color }">{{ item.score }}%</td>
+                  <td>
+                    <span
+                      style="cursor: pointer; color: #00bf78"
+                      @click="viewPersionFun(item)"
+                      >查看</span
+                    >
+                  </td>
                 </tr>
               </table>
             </div>
@@ -92,11 +100,19 @@
                   <th class="first">序号</th>
                   <th>班级名称</th>
                   <th>占比</th>
+                  <th>趋势</th>
                 </tr>
                 <tr v-for="(item, index) in jlList10" :key="item.name">
                   <td class="first">{{ index + 1 }}</td>
                   <td>{{ item.name }}</td>
                   <td :style="{ color: item.color }">{{ item.score }}%</td>
+                  <td>
+                    <span
+                      style="cursor: pointer; color: #00bf78"
+                      @click="viewPersionFun(item)"
+                      >查看</span
+                    >
+                  </td>
                 </tr>
               </table>
             </div>
@@ -123,11 +139,19 @@
                   <th class="first">序号</th>
                   <th>班级名称</th>
                   <th>占比</th>
+                  <th>趋势</th>
                 </tr>
                 <tr v-for="(item, index) in qthList10" :key="item.name">
                   <td class="first">{{ index + 1 }}</td>
                   <td>{{ item.name }}</td>
-                  <td :style='{color:item.color}'>{{ item.score }}%</td>
+                  <td :style="{ color: item.color }">{{ item.score }}%</td>
+                  <td>
+                    <span
+                      style="cursor: pointer; color: #00bf78"
+                      @click="viewPersionFun(item)"
+                      >查看</span
+                    >
+                  </td>
                 </tr>
               </table>
             </div>
@@ -155,11 +179,19 @@
                   <th class="first">序号</th>
                   <th>班级名称</th>
                   <th>占比</th>
+                  <th>趋势</th>
                 </tr>
                 <tr v-for="(item, index) in sjList10" :key="item.name">
                   <td class="first">{{ index + 1 }}</td>
                   <td>{{ item.name }}</td>
-                  <td :style='{color:item.color}'>{{ item.score }}%</td>
+                  <td :style="{ color: item.color }">{{ item.score }}%</td>
+                  <td>
+                    <span
+                      style="cursor: pointer; color: #00bf78"
+                      @click="viewPersionFun(item)"
+                      >查看</span
+                    >
+                  </td>
                 </tr>
               </table>
             </div>
@@ -219,6 +251,18 @@ export default {
     };
   },
   methods: {
+    viewPersionFun(val) {
+      let url = "/manage/tendency";
+      this.bus.$emit("menuStatusUpdate", url);
+      //跳转到趋势统计的页面
+      //规定好跳转到哪个页面--然后跳转的类型
+      // this.$router.push({path:'/manage/tendency',query:{orgNo:'1212',type:'1'}})
+      this.$router.push({
+        path: "/manage/individualTendency",
+        query: { orgNo: val.orgNo },
+      });
+      //要更改菜单选中的颜色
+    },
     open(val) {
       //将年级清空
       //将首选项改为第一个
@@ -432,6 +476,7 @@ export default {
               name: res.data[i].name,
               score: (parseFloat(res.data[i].num) * 100).toFixed(2),
               color: "#2C3E50",
+              orgNo: res.data[i].orgNo,
             };
             list.push(obj);
           }
@@ -457,7 +502,6 @@ export default {
 
           this.yiyuList10 = list;
           //依次给个颜色
-
           //将0.00过滤出来
           //将去重的过滤出来
         }
@@ -484,6 +528,7 @@ export default {
               name: res.data[i].name,
               score: (parseFloat(res.data[i].num) * 100).toFixed(2),
               color: "#2C3E50",
+              orgNo: res.data[i].orgNo,
             };
             list.push(obj);
           }
@@ -537,6 +582,7 @@ export default {
               name: res.data[i].name,
               score: (parseFloat(res.data[i].num) * 100).toFixed(2),
               color: "#2C3E50",
+              orgNo: res.data[i].orgNo,
             };
             list.push(obj);
           }
@@ -550,8 +596,8 @@ export default {
               scoreListTmp.push(listTmp1[i].score);
             }
           }
-          console.log("scoreListTmp")
-          console.log(scoreListTmp)
+          console.log("scoreListTmp");
+          console.log(scoreListTmp);
           for (let i = 0; i < list.length; i++) {
             //
             for (let j = 0; j < scoreListTmp.length; j++) {
@@ -580,6 +626,7 @@ export default {
               name: res.data[i].name,
               score: (parseFloat(res.data[i].num) * 100).toFixed(2),
               color: "#2C3E50",
+              orgNo: res.data[i].orgNo,
             };
             list.push(obj);
           }
@@ -602,8 +649,6 @@ export default {
             }
           }
           this.sjList10 = list;
-       
-         
         }
       });
     },
@@ -642,7 +687,7 @@ export default {
   .yiyu_left {
     display: flex;
     flex: 8;
-    padding-right:40px
+    padding-right: 40px;
   }
   .yiyu_right {
     flex: 4;

+ 0 - 1
src/components/PlanRegister.vue

@@ -511,7 +511,6 @@ export default {
               });
               console.log(listTMP);
               this.gradeOption = listTMP.reverse();
-              debugger;
               //--------------------------------结束
               let resAdd = this.addPro(res.data);
               this.ppData = JSON.parse(JSON.stringify(resAdd));

+ 28 - 4
src/components/PlanReport.vue

@@ -3,7 +3,7 @@
     <el-dialog
       :visible.sync="dialogVisible"
       :close-on-click-modal="false"
-      width="80%"
+      width="90%"
       style="border-radius: 40px"
     >
       <div slot="title">
@@ -230,13 +230,17 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="auto" align="center">
+            <el-table-column label="操作" width="260px" align="center">
               <template slot-scope="scope">
                 <div class="detail_button_out">
                   <div class="detail_button" @click="selectPlan(scope.row)">
                     <img src="../assets/img/table/search.png" />
                     <span> 个人报告查看 </span>
                   </div>
+                  <div class="detail_button" @click="queryQS(scope.row)">
+                    <img src="../assets/img/table/search.png" />
+                    <span> 趋势查看 </span>
+                  </div>
                 </div>
               </template>
             </el-table-column>
@@ -461,13 +465,17 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="auto" align="center">
+            <el-table-column label="操作" width="260px" align="center">
               <template slot-scope="scope">
                 <div class="detail_button_out">
                   <div class="detail_button" @click="selectPlan(scope.row)">
                     <img src="../assets/img/table/search.png" />
                     <span> 个人报告查看 </span>
                   </div>
+                  <div class="detail_button" @click="queryQS(scope.row)">
+                    <img src="../assets/img/table/search.png" />
+                    <span> 趋势查看 </span>
+                  </div>
                 </div>
               </template>
             </el-table-column>
@@ -522,13 +530,17 @@
               width=""
             >
             </el-table-column>
-            <el-table-column label="操作" width="auto" align="center">
+            <el-table-column label="操作" width="260px" align="center">
               <template slot-scope="scope">
                 <div class="detail_button_out">
                   <div class="detail_button" @click="selectPlan(scope.row)">
                     <img src="../assets/img/table/search.png" />
                     <span> 个人报告查看 </span>
                   </div>
+                  <div class="detail_button" @click="queryQS(scope.row)">
+                    <img src="../assets/img/table/search.png" />
+                    <span> 趋势查看 </span>
+                  </div>
                 </div>
               </template>
             </el-table-column>
@@ -816,6 +828,18 @@ export default {
     window.removeEventListener("resize", this.echartsAllSize);
   },
   methods: {
+    queryQS(val){
+      let url = "/manage/tendency";
+      this.bus.$emit("menuStatusUpdate", url);
+      //跳转到趋势统计的页面
+      //规定好跳转到哪个页面--然后跳转的类型
+      // this.$router.push({path:'/manage/tendency',query:{orgNo:'1212',type:'1'}})
+      sessionStorage.setItem("individualTendency", JSON.stringify(val));
+      this.$router.push({
+        path: "/manage/individualTendency",
+      
+      });
+    },
     selectAllFun() {
       this.getOrgList1().then(() => {
         let params = {

+ 16 - 9
src/components/ZhuChart.vue

@@ -28,7 +28,7 @@ export default {
   mounted() {
     window.addEventListener("resize", this.echartsAllSize);
   },
-  destroyed(){
+  destroyed() {
     window.removeEventListener("resize", this.echartsAllSize);
   },
   //当前监听到数据发生变化就开始渲染
@@ -109,14 +109,14 @@ export default {
             type: "slider",
             xAxisIndex: 0,
             filterMode: "none",
-            bottom:20
+            bottom: 20,
           },
 
           {
             type: "inside",
             xAxisIndex: 0,
             filterMode: "none",
-            bottom:20
+            bottom: 20,
           },
         ],
         series: [
@@ -124,7 +124,7 @@ export default {
             name: this.name,
             type: "bar",
             // barWidth: "60%",\
-            barMaxWidth:40,
+            barMaxWidth: 40,
             data: data.score,
             itemStyle: {
               color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -138,18 +138,25 @@ export default {
                   color: "#00F6E3",
                 },
               ]),
-              borderWidth: 2,
-              // borderColor: "#2EE053",
+              borderWidth: 1,
+              borderColor: "#2EE053",
               barBorderRadius: [10, 10, 10, 10], //修改柱状图圆角
             },
+            // label: {
+            //   show: true,
+            //   position: "top",
+            //   color: "#006FFF",
+            //   formatter: function (params) {
+            //     return params.value + "%";
+            //   },
+            // },
           },
         ],
         //[10, 5, 20, 34, 0, 3, 22]
       };
       myChart.setOption(option);
-    
-        myChart.resize();
-    
+
+      myChart.resize();
     },
   },
 };

+ 4 - 1
src/views/loginNew.vue

@@ -206,7 +206,10 @@ export default {
 };
 </script>
 <style scoped>
-
+/* @font-face {
+  font-family: "Electronic";
+  src: url("../../assets/font/sjxk.ttf") format("truetype");
+} */
 
 .input-account-new>>>.el-input__inner {
   background-color: #f7f7f7 !important;

+ 50 - 10
src/views/manage/channelManagement/channelManagement.vue

@@ -363,10 +363,13 @@
             </el-button>
           </div>
         </div>
-        <div style="margin-left:10%" v-show="downList.length>0">
-          待下载列表
-        </div>
-        <el-table :data="downList" style="width: 80%; margin-left: 10%" max-height="250" v-show="downList.length>0">
+        <div style="margin-left: 10%" v-show="downList.length > 0">待下载列表</div>
+        <el-table
+          :data="downList"
+          style="width: 80%; margin-left: 10%"
+          max-height="250"
+          v-show="downList.length > 0"
+        >
           <el-table-column type="index" align="center" label="序号"> </el-table-column>
           <el-table-column prop="createTime" align="center" label="生成时间">
           </el-table-column>
@@ -387,19 +390,44 @@
         :visible.sync="resetVisible"
         width="30%"
         center
+        :close-on-click-modal="false"
+        :close-on-press-escape="false"
+        :before-close="closeResetFun"
         style="border-radius: 40px"
       >
         <div slot="title">
           <div class="demo-ruleForm">
             <p class="dig_title">提示</p>
+            <!-- <img src="../../../assets/img/report/downN.png" alt=""> -->
+            <p align="center">
+              <img
+                style="width: 60px"
+                src="../../../assets/img/table/xiafaz.gif"
+                alt=""
+              />
+            </p>
 
-            <p>正在下载中,请勿操作</p>
-
+            <p style="margin-bottom: 40px; margin-top: 20px">正在下载中,请勿操作</p>
+          </div>
+        </div>
+      </el-dialog>
+      <el-dialog
+        class="dig_update ts_li"
+        :visible.sync="verifyVisible"
+        width="30%"
+        center
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div class="demo-ruleForm">
+            <p class="dig_title">提示</p>
+            <!-- <img src="../../../assets/img/report/downN.png" alt=""> -->
+            <p style="margin-bottom: 40px; margin-top: 20px">确定离开吗?</p>
             <div class="dig_button">
-              <el-button type="info" round @click="cancle()">关闭</el-button>
-              <!-- <el-button type="success" round @click="submitForm('ruleForm')"
-                >提交</el-button
-              > -->
+              <el-button type="info" round @click="cancleFun()">取消</el-button>
+              <el-button type="success" round @click="verifyVisible = false ;resetVisible=false"
+                >确定</el-button
+              >
             </div>
           </div>
         </div>
@@ -431,6 +459,8 @@ export default {
       userName: "",
       //重置密码弹出框
       resetVisible: false,
+      //个人用户---确认标志
+      verifyVisible: false,
       //根据名称搜索
       name: "",
       //搜索的用户编号
@@ -529,6 +559,16 @@ export default {
     this.searchTarget();
   },
   methods: {
+    closeResetFun() {
+      //关闭
+      // this.resetVisible = false;
+      this.verifyVisible = true;
+    },
+    cancleFun() {
+      this.verifyVisible = false;
+      this.resetVisible = true;
+    },
+
     copySuc() {
       this.$message.success("复制成功");
     },

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

@@ -959,7 +959,7 @@ export default {
           .yuan_name {
             // text-decoration: underline;
             // text-decoration-color: #113a27;
-            height: 80px;
+            // height: 80px;
             // flex: 1;
             margin-right: 100px;
             // flex: 1;

+ 25 - 4
src/views/manage/individualTendency.vue

@@ -33,7 +33,8 @@
             margin-top: 10px;
           "
         >
-          {{userInfoLin.userName}}<span v-show='year!=""'>{{year}}年</span>近10次趋势统计
+          {{ userInfoLin.userName
+          }}<span v-show="year != ''">{{ year }}年</span>近10次趋势统计
         </div>
         <div style="width: 100%; height: 70vh" class="block_lei">
           <PerQSChart
@@ -198,7 +199,8 @@ export default {
   created() {},
   async mounted() {
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
-    this.userInfoLin = JSON.parse(sessionStorage.getItem("individualTendency"));
+
+    //根据用户ID查询用户信息
 
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
@@ -207,10 +209,31 @@ export default {
 
     //判断当页面是 isUser为false时需要调用判断方法
     if (!this.isUser) {
+      let obj = await this.queryUserDetail();
+      if (obj) {
+        this.userInfoLin = obj;
+      }
       this.initGroup();
     }
   },
   methods: {
+    queryUserDetail() {
+      //调用接口访问-----
+      //根据userNo 查询
+      // this.userInfoLin
+      let user = JSON.parse(sessionStorage.getItem("individualTendency"));
+      return new Promise((solve, reject) => {
+        let url = `/user/findUserByUserNo?userNo=${user.userNo}`;
+        this.$http.get(url, {}, (res) => {
+          if (res.code == 200) {
+            //设置变量
+            solve(res.data);
+          } else {
+            reject(0);
+          }
+        });
+      });
+    },
     yearChange(val) {
       this.query4Score();
     },
@@ -623,7 +646,6 @@ export default {
       }
       this.$http.get(url, {}, (res) => {
         if (res && res.code == 200) {
-
           this.tableData = res.data.content;
           this.total = res.data.totalElements;
         } else {
@@ -692,7 +714,6 @@ export default {
     // 筛选已完成计划
     filterComplete() {
       this.comparePlanList = this.tableData.filter((item) => {
-
         return item.planStatus == 3 && item.id != this.currentPlanId;
       });
     },

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

@@ -722,6 +722,7 @@ export default {
     },
     //匹配获取页签名称-2020-03-17 lwl
     selectMenu(param) {
+      
       // console.log("-----------selectMenu");
       // console.log(param);
       this.isTmpPath = param;

+ 46 - 4
src/views/manage/tendency.vue

@@ -348,6 +348,7 @@ export default {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });
     }
+    //获取到当前路径上的参数
     this.isClikcObj(false);
 
     //初始化最近10条数据的图表
@@ -470,7 +471,7 @@ export default {
       //焦虑组合
       let listAnxiety = [];
       //压力集合
-      let listStress = [];              
+      let listStress = [];
       //视觉整合能力
       let listSj = [];
       for (let i = 0; i < list.length; i++) {
@@ -660,12 +661,44 @@ export default {
     initGroup(val) {
       if (this.userInfo.roleType == "5") {
         if (val) {
-          this.group = [this.groupData[0].orgNo, this.groupData[0].children[0].orgNo];
+          //当条件是真的时候----//
+          //需要循环列表
+          //且、路径上有参数的话
+          let params = this.$route.query;
+          if (params.hasOwnProperty("orgNo")) {
+            //当存在该属性时
+            //  this. channelTmp
+            //循环拿到orgNo 等于当前的数据
+
+            let parentOrgNo = "";
+            for (let i = 0; i < this.channelTmp.length; i++) {
+              if (params.orgNo == this.channelTmp[i].orgNo) {
+                parentOrgNo = this.channelTmp[i].parentOrgNo;
+              }
+            }
+            //
+            this.group = [parentOrgNo, params.orgNo];
+            //
+          } else {
+            this.group = [this.groupData[0].orgNo, this.groupData[0].children[0].orgNo];
+          }
         }
         //循环当前级
         let ji = -1;
         if (val) {
-          ji = parseInt(this.groupData[0].children[0].extend);
+          let params = this.$route.query;
+          if (params.hasOwnProperty("orgNo")) {
+            for (let i = 0; i < this.channelTmp.length; i++) {
+              //
+              if (this.channelTmp[i].orgNo == this.group[this.group.length - 1]) {
+                //
+                ji = parseInt(this.channelTmp[i].extend);
+              }
+            }
+          } else {
+            ji = parseInt(this.groupData[0].children[0].extend);
+          }
+          //如果--显示
         } else {
           //循环拿到当前的ji的数据
 
@@ -717,7 +750,15 @@ export default {
       }
       if (this.userInfo.roleType == "4" || this.userInfo.roleType == "3") {
         if (val) {
-          this.group = [this.groupData[0].orgNo];
+          let params = this.$route.query;
+          console.log(params.hasOwnProperty("orgNo"));
+          if (params.hasOwnProperty("orgNo")) {
+            //当存在该属性时
+            this.group = [params.orgNo];
+            //
+          } else {
+            this.group = [this.groupData[0].orgNo];
+          }
         }
 
         let ji = -1;
@@ -961,6 +1002,7 @@ export default {
       this.$refs.planUser.open(val);
     },
     addUser(val) {
+      debugger;
       this.$router.push({ name: "individualTendency" });
       sessionStorage.setItem("individualTendency", JSON.stringify(val));
     },