Browse Source

修改报告样式

plg 4 months ago
parent
commit
fac406aa1a

+ 0 - 5
src/components/ComparePlanProfession.vue

@@ -349,11 +349,6 @@ export default {
         },
         yAxis: {
           name: "占比(%)",
-
-          // axisLine: {
-          //   show: true,
-          //   lineStyle: {},
-          // },
         },
         series: [
           {

+ 65 - 15
src/components/ComparePlanUser.vue

@@ -190,25 +190,35 @@
               </div>
             </div>
           </div>
+     
           <div
             ref="echarts_ld"
-            style="width: 100%; height: 600px; margin-top: 20px"
+            style="width: 100%; height: 600px; margin-top:20px"
           ></div>
-
+          <div style="text-align: center;font-weight: 700;font-size: 16px;margin-bottom:5px">柱状图维度对比</div>
           <div ref="echarts_zhu" style="width: 100%; height: 600px"></div>
           <div class="cpmpare_all" v-if="userData1.length > 0 && userData2.length > 0">
             <div v-for="(item, index) in userData1" :key="item.id">
-              <div v-show="item.dimensionName != '总分'" style="margin-bottom:40px">
-                <div class="dimensionality_out"  style="margin-bottom:20px">
+              <div v-show="item.dimensionName != '总分'" style="margin-bottom: 40px">
+                <div class="dimensionality_out" style="margin-bottom: 20px">
                   <div class="left">
                     <img
                       style="width: 22px; height: 22px; margin-right: 10px"
                       src="../assets/img/report/wd_left.png"
                       alt=""
                     />
-                    <div style="background-color: #dcebff; flex: 1; line-height: 30px;display:flex">
-                      <span class="totol_all" style="letter-spacing: 3px;">维度:</span>
-                      <span style="display: flex;" >{{userData1[index].dimensionName}}</span>
+                    <div
+                      style="
+                        background-color: #dcebff;
+                        flex: 1;
+                        line-height: 30px;
+                        display: flex;
+                      "
+                    >
+                      <span class="totol_all" style="letter-spacing: 3px">维度:</span>
+                      <span style="display: flex">{{
+                        userData1[index].dimensionName
+                      }}</span>
                     </div>
                   </div>
                   <div class="right">
@@ -217,13 +227,20 @@
                       src="../assets/img/report/wd_right.png"
                       alt=""
                     />
-                    <div style="background-color: #ffdfdb; flex: 1; line-height: 30px;display:flex">
-                      <span class="totol_all"  style="letter-spacing: 3px;">维度:</span>
-                      <span> {{userData2[index].dimensionName}}</span>
+                    <div
+                      style="
+                        background-color: #ffdfdb;
+                        flex: 1;
+                        line-height: 30px;
+                        display: flex;
+                      "
+                    >
+                      <span class="totol_all" style="letter-spacing: 3px">维度:</span>
+                      <span> {{ userData2[index].dimensionName }}</span>
                     </div>
                   </div>
                 </div>
-                <div class="allScore_out"  style="margin-bottom:20px">
+                <div class="allScore_out" style="margin-bottom: 20px">
                   <div class="left">
                     <img
                       style="width: 22px; height: 22px; margin-right: 10px"
@@ -262,7 +279,7 @@
                     >
                   </div>
                 </div>
-                <div class="allScore_out"  style="margin-bottom:20px">
+                <div class="allScore_out" style="margin-bottom: 20px">
                   <div class="left">
                     <img
                       style="width: 22px; height: 22px; margin-right: 10px"
@@ -300,7 +317,7 @@
                     >
                   </div>
                 </div>
-                <div class="allScore_out"  style="margin-bottom:20px">
+                <div class="allScore_out" style="margin-bottom: 20px">
                   <div
                     class="left"
                     style="align-items: flex-start; justify-content: start"
@@ -364,7 +381,10 @@
                     </div>
                     {{ userData1[index].dimensionSuggestion }}
                   </div>
-                  <div class="right"    style="align-items: flex-start; justify-content: start">
+                  <div
+                    class="right"
+                    style="align-items: flex-start; justify-content: start"
+                  >
                     <div style="display: flex">
                       <img
                         style="width: 22px; height: 22px; margin-right: 10px"
@@ -560,12 +580,16 @@ export default {
 
     this.option_z = {
       title: {
-        text: "柱状图维度对比",
+        text: "",
         left: "center",
+
         textStyle: {
           fontSize: 16,
         },
       },
+      legend: {
+        data: [],
+      },
       xAxis: {
         type: "category",
         data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
@@ -579,6 +603,7 @@ export default {
       },
       series: [
         {
+          name: "",
           data: [120, 200, 150, 80, 70, 110, 130],
           type: "bar",
 
@@ -601,8 +626,17 @@ export default {
             //   }
             // }
           },
+          label: {
+            show: true,
+            position: "top",
+            color: "#006FFF",
+            formatter: function (params) {
+              return parseInt(params.value);
+            },
+          },
         },
         {
+          name: "",
           data: [120, 200, 150, 80, 70, 110, 130],
           type: "bar",
           itemStyle: {
@@ -614,6 +648,14 @@ export default {
             borderRadius: [18, 18, 18, 18],
             barWidth: 40,
           },
+          label: {
+            show: true,
+            position: "top",
+            color: "#FE7A28",
+            formatter: function (params) {
+              return parseInt(params.value);
+            },
+          },
         },
       ],
     };
@@ -720,10 +762,18 @@ export default {
         myChart.setOption(this.option_w);
 
         const myChart1 = echarts.init(this.echarts_zhu);
+        this.option_z.series[0].name = this.multipleSelection[0].userName;
         this.option_z.series[0].data = this.echarts_data_list1;
+        this.option_z.series[1].name = this.multipleSelection[1].userName;
         this.option_z.series[1].data = this.echarts_data_list2;
         this.option_z.xAxis.data = this.echarts_zhuname_list; //name
 
+        //multipleSelection[1].userName
+        this.option_z.legend.data = [
+          this.multipleSelection[0].userName,
+          this.multipleSelection[1].userName,
+        ];
+
         myChart1.setOption(this.option_z);
       }
     },

+ 1 - 1
src/components/Report.vue

@@ -423,7 +423,7 @@
                               style="width: 20px; height: 20px"
                               alt=""
                             />
-                            <span class="score_tt">分析:</span>
+                            <span class="score_tt">说明:</span>
                           </div> </span
                         ><span class="scoreAsyDes">{{ item.dimensionDesc }}</span>
                       </div>

+ 3 - 30
src/views/manage/generalSituation.vue

@@ -1,31 +1,4 @@
 
-
-
-
-<style>
-.parent {
-  display: flex;
-  
-}
-.sub1 {
-  display: flex;
-  flex: 1;
-  background: #f6cb00;
-  overflow: hidden;
-  /* overflow: hidden; */
-}
-
-.sub2 {
-  flex: 1;
-  background: red;
-}
-.sub3 {
-  display: flex;
-  flex: 1;
-  background: #f6cb00;
-
-}
-</style>
 <template>
   <div class="pp">
     <!-- <div class="parent">
@@ -925,6 +898,7 @@ export default {
         // font-weight: 700;
       }
       .number_people_yuan {
+        flex: 1;
         // display: flex;
         color: #113a27;
         .out {
@@ -933,7 +907,7 @@ export default {
           // background-color: #7fe2b0;
           display: flex;
           flex-direction: column;
-          flex: 1;
+          height: 100%;
           .yuan_name {
             // text-decoration: underline;
             // text-decoration-color: #113a27;
@@ -971,8 +945,7 @@ export default {
           }
           .yuan_people {
             text-align: right;
-            margin-left: 20px;
-            margin-top: 30px;
+            margin-bottom: 16px;
             margin-right: 20px;
             // color: #ffffff;
             // font-size: 60px;