Browse Source

Merge branch 'dev' of http://git.pro.g107.net/guojy/dd_pc into dev

# Conflicts:
#	src/home.vue
347617796@qq.com 4 years ago
parent
commit
c57b2c0095
3 changed files with 1551 additions and 1405 deletions
  1. 1376 1220
      src/home.vue
  2. 58 58
      src/views/ranking/department_statistics.vue
  3. 117 127
      src/views/ranking/individual_statistics.vue

File diff suppressed because it is too large
+ 1376 - 1220
src/home.vue


+ 58 - 58
src/views/ranking/department_statistics.vue

@@ -78,7 +78,7 @@
               <div v-loading="IntegralFormChartLoad">
                 <div
                   class="nopoint_box"
-                  style="height:356px;"
+                  style="height:306px;"
                   v-show="IntegralFormnone"
                 >
                   <div
@@ -97,7 +97,7 @@
                 <div v-show="!IntegralFormnone">
                   <div
                     ref="IntegralFormChart"
-                    :style="{ width: '100%', height: '400px' }"
+                    :style="{ width: '100%', height: '350px' }"
                   ></div>
                 </div>
               </div>
@@ -524,8 +524,8 @@ export default {
     },
     //饼图
     //分为两列展示,多传legendDataTwo
-    drawLine(legendDataOne, legendDataTwo, dadalist) {
-      // drawLine(legendDataOne,dadalist){
+    // drawLine(legendDataOne, legendDataTwo, dadalist) {
+      drawLine(legendDataOne,dadalist){
       const chart = this.$refs.IntegralFormChart;
       //此处可给固定颜色,不给就所有颜色随机
       let colors = [
@@ -544,7 +544,8 @@ export default {
         "#fcb814",
       ];
       // let colors = [];
-      let legendDataLeng = legendDataOne.length + legendDataTwo.length;
+      // let legendDataLeng = legendDataOne.length + legendDataTwo.length;
+      let legendDataLeng = legendDataOne.length;
       if (legendDataLeng > colors.length) {
         //当列表大于固定颜色时,给随机颜色
         let colorsLeng = colors.length;
@@ -563,22 +564,22 @@ export default {
       }
       //只显示 N 条标题,多余隐藏,但是饼图不会隐藏
       let DataLengths = [];
-      for (let i in legendDataTwo) {
-        if (i < 8) {
-          DataLengths.push(legendDataTwo[i]);
-        }
-      }
+      // for (let i in legendDataTwo) {
+      //   if (i < 8) {
+      //     DataLengths.push(legendDataTwo[i]);
+      //   }
+      // }
       let left1 = "45%";
       let left2 = "45%";
       let leftBT = "25%";
-      if (legendDataTwo.length != 0) {
-        left1 = "36%";
-        leftBT = "18%";
-      }
+      // if (legendDataTwo.length != 0) {
+      //   left1 = "36%";
+      //   leftBT = "18%";
+      // }
       if (chart) {
         const myChart = ECharts.init(chart);
         var legendData1 = legendDataOne;
-        var legendData2 = DataLengths;
+        // var legendData2 = DataLengths;
         const option = {
           tooltip: { trigger: "item", formatter: "{b}" },
           legend: [
@@ -594,17 +595,17 @@ export default {
               data: legendData1,
             },
             //分为两列展示
-            {
-              type: "scroll",
-              orient: "vertical",
-              icon: "square",
-              left: "70%",
-              align: "left",
-              top: "10%",
-              itemGap: 20,
-              textStyle: { fontSize: 14, color: "rgb(48, 49, 51)" },
-              data: legendData2,
-            },
+            // {
+            //   type: "scroll",
+            //   orient: "vertical",
+            //   icon: "square",
+            //   left: "70%",
+            //   align: "left",
+            //   top: "10%",
+            //   itemGap: 20,
+            //   textStyle: { fontSize: 14, color: "rgb(48, 49, 51)" },
+            //   data: legendData2,
+            // },
           ],
           color: colors,
           grid: { x: 25, y: 45, x2: 5, y2: 20, borderWidth: 1 },
@@ -654,6 +655,9 @@ export default {
           // let listLeng = Math.ceil((lists.length)/2)
 
           for (let i in lists) {
+            if(lists[i].name.length>15){
+              lists[i].name = lists[i].name.slice(0,15)+'...'
+            }
             //分为两列展示
             // if(i<listLeng){
             //   legendData1.push(lists[i].name+' '+'奖'+lists[i].reward+' '+'扣'+lists[i].deduction+' '+lists[i].ratio+'%')
@@ -709,8 +713,8 @@ export default {
             dadalist.push(dataListDx);
           }
           //分为两列展示,多传legendData2
-          this.drawLine(legendData1, legendData2, dadalist); //图表
-          // this.drawLine(legendData1,dadalist)//图表
+          // this.drawLine(legendData1, legendData2, dadalist); //图表
+          this.drawLine(legendData1,dadalist)//图表
         })
         .finally(() => {
           if (listslength.length == 0) {
@@ -1008,35 +1012,31 @@ export default {
   text-align: center;
   width: 100%;
   margin-bottom: 10px;
-}
-
-.nopoint_box .noimg {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  margin: 22px auto 16px;
-  background: url("../../assets/image/nodata_default.png") no-repeat center;
-  background-size: 99%;
-}
-
-.nopoint_box .noperson {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  margin: 22px auto 16px;
-  background: url("../../assets/image/noperson_default.png") no-repeat center;
-  background-size: 99%;
-}
-
-.nopoint_box .title1 {
-  display: block;
-  text-align: center;
-  font-size: 12px !important;
-  color: #909399 !important;
-  padding: 0;
-}
-
-.nopoint_box a {
-  color: #26a2ff;
+  .noimg {
+    display: inline-block;
+    width: 110px;
+    height: 110px;
+    margin: 22px auto 16px;
+    background: url("../../assets/image/nodata_default.png") no-repeat center;
+    background-size: 99%;
+  }
+  .noperson {
+    display: inline-block;
+    width: 110px;
+    height: 110px;
+    margin: 22px auto 16px;
+    background: url("../../assets/image/noperson_default.png") no-repeat center;
+    background-size: 99%;
+  }
+  .title1 {
+    display: block;
+    text-align: center;
+    font-size: 12px !important;
+    color: #909399 !important;
+    padding: 0;
+  }
+  a {
+    color: #26a2ff;
+  }
 }
 </style>

+ 117 - 127
src/views/ranking/individual_statistics.vue

@@ -158,7 +158,7 @@
               </el-col>
             </div> -->
 			
-			<el-col :span="17" style="margin-top:34px;padding:0;height:58px;" v-loading="authorityManagerHeaderLoad">
+			<el-col :span="17" style="margin-top:34px;padding:0 0 10px 0;height:58px;" v-loading="authorityManagerHeaderLoad">
 				<el-col :gutter="50" style="margin:0;padding:0;" class="quick_button_box">
 				<div style="display:flex;justify-content: space-around;">
 					<p style="text-align:center;cursor:pointer;margin: 0;"><b style="color:#26A2FF;font-size:27px;">{{authorityManagerHeaders.b?authorityManagerHeaders.b:'0'}}</b><br><span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">{{ yearhORmontStr }}度B分</span></p>
@@ -682,8 +682,8 @@ export default {
 
     //饼图
     //分为两列展示,多传legendDataTwo
-    drawLine(legendDataOne, legendDataTwo, dadalist) {
-      // drawLine(legendDataOne,dadalist){
+    // drawLine(legendDataOne, legendDataTwo, dadalist) {
+      drawLine(legendDataOne,dadalist){
       const chart = this.$refs.IntegralFormChart;
       //此处可给固定颜色,不给就所有颜色随机
       let colors = [
@@ -702,7 +702,8 @@ export default {
         "#fcb814",
       ];
       // let colors = [];
-      let legendDataLeng = legendDataOne.length + legendDataTwo.length;
+      // let legendDataLeng = legendDataOne.length + legendDataTwo.length;
+      let legendDataLeng = legendDataOne.length;
       if (legendDataLeng > colors.length) {
         //当列表大于固定颜色时,给随机颜色
         let colorsLeng = colors.length;
@@ -721,22 +722,22 @@ export default {
       }
       //只显示 N 条标题,多余隐藏,但是饼图不会隐藏
       let DataLengths = [];
-      for (let i in legendDataTwo) {
-        if (i < 8) {
-          DataLengths.push(legendDataTwo[i]);
-        }
-      }
+      // for (let i in legendDataTwo) {
+      //   if (i < 8) {
+      //     DataLengths.push(legendDataTwo[i]);
+      //   }
+      // }
       let left1 = "45%";
       let left2 = "45%";
       let leftBT = "25%";
-      if (legendDataTwo.length != 0) {
-        left1 = "36%";
-        leftBT = "18%";
-      }
+      // if (legendDataTwo.length != 0) {
+      //   left1 = "36%";
+      //   leftBT = "18%";
+      // }
       if (chart) {
         const myChart = ECharts.init(chart);
         var legendData1 = legendDataOne;
-        var legendData2 = DataLengths;
+        // var legendData2 = DataLengths;
         const option = {
           tooltip: { trigger: "item", formatter: "{b}" },
           legend: [
@@ -752,17 +753,17 @@ export default {
               data: legendData1,
             },
             //分为两列展示
-            {
-              type: "scroll",
-              orient: "vertical",
-              icon: "square",
-              left: "70%",
-              align: "left",
-              top: "10%",
-              itemGap: 20,
-              textStyle: { fontSize: 14, color: "rgb(48, 49, 51)" },
-              data: legendData2,
-            },
+            // {
+            //   type: "scroll",
+            //   orient: "vertical",
+            //   icon: "square",
+            //   left: "70%",
+            //   align: "left",
+            //   top: "10%",
+            //   itemGap: 20,
+            //   textStyle: { fontSize: 14, color: "rgb(48, 49, 51)" },
+            //   data: legendData2,
+            // },
           ],
           color: colors,
           grid: { x: 25, y: 45, x2: 5, y2: 20, borderWidth: 1 },
@@ -812,6 +813,9 @@ export default {
           // let listLeng = Math.ceil((lists.length)/2)
 
           for (let i in lists) {
+            if(lists[i].name.length>15){
+              lists[i].name = lists[i].name.slice(0,15)+'...'
+            }
             //分为两列展示
             // if(i<listLeng){
             //   legendData1.push(lists[i].name+' '+'奖'+lists[i].reward+' '+'扣'+lists[i].deduction+' '+lists[i].ratio+'%')
@@ -868,8 +872,8 @@ export default {
             dadalist.push(dataListDx);
           }
           //分为两列展示,多传legendData2
-          this.drawLine(legendData1, legendData2, dadalist); //图表
-          // this.drawLine(legendData1,dadalist)//图表
+          // this.drawLine(legendData1, legendData2, dadalist); //图表
+          this.drawLine(legendData1,dadalist)//图表
         })
         .finally(() => {
           if (listslength.length == 0) {
@@ -1121,94 +1125,88 @@ export default {
   text-align: center;
   width: 100%;
   margin-bottom: 10px;
-}
-
-.nopoint_box .noimg {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  margin: 22px auto 16px;
-  background: url("../../assets/image/nodata_default.png") no-repeat center;
-  background-size: 99%;
-}
-
-.nopoint_box .noperson {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  margin: 22px auto 16px;
-  background: url("../../assets/image/noperson_default.png") no-repeat center;
-  background-size: 99%;
-}
-
-.nopoint_box .title1 {
-  display: block;
-  text-align: center;
-  font-size: 12px !important;
-  color: #909399 !important;
-  padding: 0;
-}
-
-.nopoint_box a {
-  color: #26a2ff;
+  .noimg {
+    display: inline-block;
+    width: 110px;
+    height: 110px;
+    margin: 22px auto 16px;
+    background: url("../../assets/image/nodata_default.png") no-repeat center;
+    background-size: 99%;
+  }
+  .noperson {
+    display: inline-block;
+    width: 110px;
+    height: 110px;
+    margin: 22px auto 16px;
+    background: url("../../assets/image/noperson_default.png") no-repeat center;
+    background-size: 99%;
+  }
+  .title1 {
+    display: block;
+    text-align: center;
+    font-size: 12px !important;
+    color: #909399 !important;
+    padding: 0;
+  }
+  a {
+    color: #26a2ff;
+  }
 }
 
 .top_user_info {
   position: relative;
   padding-top: 0;
   background: #fff;
-}
-
-.top_user_info .userinfo_box {
-  border-right: 1px #cecccc solid;
-  margin: 34px 0;
-}
-
-.top_user_info .user_box {
-  padding-left: 0 !important;
-  border-right: 1px #333 solid;
-}
-
-.top_user_info .headimg_box {
-  padding-left: 0 !important;
-}
-
-.top_user_info .headimg_box .headimg {
-  width: 50px;
-  height: 50px;
-  background: #909399;
-  border-radius: 50px;
-}
-
-.top_user_info .user_info {
-  padding: 0 !important;
-  line-height: 25px;
-}
-.top_user_info .user_info .greetings {
-  margin: 4px 0px 0 120px;
-  font-size: 16px;
-  font-weight: bold;
-}
-.top_user_info .user_info .greetings span {
-  font-size: 14px;
-  color: #666;
-  display: inline-block;
-  vertical-align: top;
-}
-
-.top_user_info .user_info span:nth-child(1) {
-  display: block;
-  font-size: 16px;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-}
-
-.top_user_info .person {
-  display: block;
-  font-size: 14px;
-  padding: 32px 0 18px 0;
-  color: #606266;
+  .userinfo_box {
+    border-right: 1px #cecccc solid;
+    margin: 34px 0;
+  }
+  .user_box {
+    padding-left: 0 !important;
+    border-right: 1px #333 solid;
+  }
+  .headimg_box {
+    padding-left: 0 !important;
+  }
+  .headimg_box .headimg {
+    width: 50px;
+    height: 50px;
+    background: #909399;
+    border-radius: 50px;
+  }
+  .user_info {
+    padding: 0 !important;
+    line-height: 25px;
+    .greetings {
+      margin: 4px 0px 0 120px;
+      font-size: 16px;
+      font-weight: bold;
+    }
+    .greetings span {
+      font-size: 14px;
+      color: #666;
+      display: inline-block;
+      vertical-align: top;
+    }
+    span:nth-child(1) {
+      display: block;
+      font-size: 16px;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+    }
+  }
+  .person {
+    display: block;
+    font-size: 14px;
+    padding: 32px 0 18px 0;
+    color: #606266;
+  }
+  .time {
+    font-size: 14px;
+    padding-right: 10px;
+    position: relative;
+  }
 }
 /*
 padding: 18px 0 16px 0;
@@ -1217,12 +1215,6 @@ height: 32px;
 box-sizing: content-box;
 */
 
-.top_user_info .time {
-  font-size: 14px;
-  padding-right: 10px;
-  position: relative;
-}
-
 .pointsevent_box {
   display: block;
   text-align: center;
@@ -1230,19 +1222,17 @@ box-sizing: content-box;
   padding-right: 0 !important;
   border: 1px #e1e4e7 solid;
   box-shadow: 0 2px 4px rgba(140, 140, 140, 0.1);
+  .title {
+    font-family: Microsoft Yahei;
+    display: block;
+    text-align: left;
+    margin-bottom: 20px;
+    padding: 0 0 0 10px;
+    font-size: 16px;
+    font-weight: normal;
+    border-left: 2px solid #409eff;
+  }
 }
-
-.pointsevent_box .title {
-  font-family: Microsoft Yahei;
-  display: block;
-  text-align: left;
-  margin-bottom: 20px;
-  padding: 0 0 0 10px;
-  font-size: 16px;
-  font-weight: normal;
-  border-left: 2px solid #409eff;
-}
-
 .popperSPBOX {
   max-width: calc(100vh - 400px);
   background-color: rgb(255, 255, 255);

Some files were not shown because too many files changed in this diff