瀏覽代碼

样式调整

liushengqiang 2 年之前
父節點
當前提交
a1d1c2d5bd
共有 2 個文件被更改,包括 76 次插入17 次删除
  1. 4 1
      src/views/main/baseinfo/modals/manageOrganAll.vue
  2. 72 16
      src/views/main/baseinfo/modals/operateEcharts.vue

+ 4 - 1
src/views/main/baseinfo/modals/manageOrganAll.vue

@@ -144,8 +144,8 @@
           <el-radio-button label="month">按月</el-radio-button>
         </el-radio-group>
       </div>
-      <!--   v-if="timer == 'day'"     :settings="chartSettings"   DD-->
       <ve-line
+        :loading="dataLoading"
         :data="timer == 'day' ? chartData : chartDataForMoth"
         height="350px"
         :data-empty="dataEmpty"
@@ -295,6 +295,7 @@ export default {
         }
       }
       // console.log(values);
+      this.dataLoading = false;
       return {
         columns: [
           "日期",
@@ -335,6 +336,7 @@ export default {
           }
         }
       }
+      this.dataLoading = false;
       return {
         columns: [
           "月份",
@@ -369,6 +371,7 @@ export default {
       show: true,
       activeName: "first",
       timer: "day",
+      dataLoading: true
     };
   },
   mounted() {

+ 72 - 16
src/views/main/baseinfo/modals/operateEcharts.vue

@@ -14,7 +14,12 @@
           现金总收入: (元)
         </span>
         <span>
-          <count-to :endVal="totalAmount" :duration="300" :decimals="2" class="blod" />
+          <count-to
+            :endVal="totalAmount"
+            :duration="300"
+            :decimals="2"
+            class="blod"
+          />
         </span>
       </statistic-item>
       <statistic-item>
@@ -22,7 +27,12 @@
           管乐迷现金收入: (元)
         </span>
         <span>
-          <count-to :endVal="gymTotal" :duration="300" :decimals="2" :class="'des'" />
+          <count-to
+            :endVal="gymTotal"
+            :duration="300"
+            :decimals="2"
+            :class="'des'"
+          />
         </span>
       </statistic-item>
       <statistic-item>
@@ -30,7 +40,12 @@
           酷乐秀现金收入: (元)
         </span>
         <span>
-          <count-to :endVal="colexiuTotal" :duration="300" :decimals="2" :class="'des'" />
+          <count-to
+            :endVal="colexiuTotal"
+            :duration="300"
+            :decimals="2"
+            :class="'des'"
+          />
         </span>
       </statistic-item>
       <statistic-item>
@@ -38,10 +53,14 @@
           管乐团现金收入: (元)
         </span>
         <span>
-          <count-to :endVal="gytTotal" :duration="300" :decimals="2" :class="'des'" />
+          <count-to
+            :endVal="gytTotal"
+            :duration="300"
+            :decimals="2"
+            :class="'des'"
+          />
         </span>
       </statistic-item>
-      
     </statistic>
     <div></div>
 
@@ -49,7 +68,13 @@
       <div class="eachartTitle">
         <div>
           管乐迷现金收入:
-          <count-to :endVal="gymTotal" :duration="300" :decimals="2" class="des" /> 元
+          <count-to
+            :endVal="gymTotal"
+            :duration="300"
+            :decimals="2"
+            class="des"
+          />
+          元
         </div>
         <el-select
           clearable
@@ -58,6 +83,7 @@
           v-model="organId"
           @change="
             () => {
+              this.isChangeOrgan = true 
               this.getData();
             }
           "
@@ -74,18 +100,29 @@
       <div class="eachartTitle">
         <div>
           酷乐秀现金收入:
-          <count-to :endVal="colexiuTotal" :duration="300" :decimals="2" class="des" /> 元
+          <count-to
+            :endVal="colexiuTotal"
+            :duration="300"
+            :decimals="2"
+            class="des"
+          />
+          元
         </div>
       </div>
       <div class="colexiu-echarts"></div>
       <div class="eachartTitle">
         <div>
           管乐团现金收入:
-          <count-to :endVal="gytTotal" :duration="300" :decimals="2" class="des" /> 元
+          <count-to
+            :endVal="gytTotal"
+            :duration="300"
+            :decimals="2"
+            class="des"
+          />
+          元
         </div>
       </div>
       <div class="gyt-echarts"></div>
-      
     </div>
   </div>
 </template>
@@ -114,7 +151,8 @@ export default {
       gytTotal: 0,
       colexiuEcharts: null,
       colexiuData: [],
-      colexiuTotal: 0
+      colexiuTotal: 0,
+      isChangeOrgan: false,
     };
   },
   mounted() {
@@ -146,6 +184,12 @@ export default {
             this.gymTotal = gym.totalAmount;
             this.gymData = gym.incomeByDates;
           }
+          // 切换分部只更新管乐迷数据
+          if (this.isChangeOrgan){
+            this.isChangeOrgan = false
+            this.createGym();
+            return
+          }
           const gyt = res.data.find(item => item.platform == "gyt");
           if (gyt) {
             this.gytTotal = gyt.totalAmount;
@@ -190,7 +234,11 @@ export default {
           }
         },
         tooltip: {
-          trigger: "axis"
+          trigger: "axis",
+          formatter: function(data) {
+            const item = data[0];
+            return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
+          }
         },
         grid: {
           left: 5,
@@ -216,7 +264,7 @@ export default {
             data: this.gymData.map(item => item.totalAmount),
             type: "bar",
             color: "#00a79d",
-            barWidth: 40
+            barMaxWidth: 40
           }
         ]
       };
@@ -236,7 +284,11 @@ export default {
           containLabel: true
         },
         tooltip: {
-          trigger: "axis"
+          trigger: "axis",
+          formatter: function(data) {
+            const item = data[0];
+            return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
+          }
         },
         xAxis: {
           type: "category",
@@ -255,7 +307,7 @@ export default {
             data: this.gytData.map(item => item.totalAmount),
             type: "bar",
             color: "#00a79d",
-            barWidth: 40
+            barMaxWidth: 40
           }
         ]
       };
@@ -277,7 +329,11 @@ export default {
           containLabel: true
         },
         tooltip: {
-          trigger: "axis"
+          trigger: "axis",
+          formatter: function(data) {
+            const item = data[0];
+            return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
+          }
         },
         xAxis: {
           type: "category",
@@ -296,7 +352,7 @@ export default {
             data: this.colexiuData.map(item => item.totalAmount),
             type: "bar",
             color: "#00a79d",
-            barWidth: 40
+            barMaxWidth: 40
           }
         ]
       };