From f6b97ff114dd215852dc92af0ac71e1d893f52df Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期二, 22 八月 2023 14:50:59 +0800
Subject: [PATCH] 统计图表和统计分析界面样式调整

---
 src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue |   38 ++++---
 /dev/null                                                                  |   84 ----------------
 src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue            |  148 +++++++++++++++++------------
 3 files changed, 109 insertions(+), 161 deletions(-)

diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
index 3810ad6..24c8bbf 100644
--- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
+++ b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
@@ -41,7 +41,7 @@
         <div  class="PowerOnRate_text" style="width: 8%">
           <table width="85px;" align="center">
             <tr>
-              <td align="right"><div style="width: 15px;height: 15px;background-color: #4169E1;position: static;"/></td>
+              <td align="right"><div style="width: 15px;height: 15px;background-color: #6496e9;position: static;"/></td>
               <td align="left">寮�鏈�</td>
             </tr>
             <tr>
@@ -49,7 +49,7 @@
               <td align="left">鍏虫満</td>
             </tr>
             <tr>
-              <td align="right"><div style="width: 15px;height: 15px;background-color: #00ee00"/></td>
+              <td align="right"><div style="width: 15px;height: 15px;background-color: #4ecee1"/></td>
               <td align="left">杩愯</td>
             </tr>
             <tr>
@@ -169,13 +169,13 @@
             top: 60,
             containLabel: true
           },
-          toolbox: {
-            show : true,
-            padding: 15,
-            feature : {
-              saveAsImage : {show: true,title:'淇濆瓨鍥剧墖',name :'璁惧鏁堢巼缁熻鎶ヨ〃'}
-            }
-          },
+          // toolbox: {
+          //   show : true,
+          //   padding: 15,
+          //   feature : {
+          //     saveAsImage : {show: true,title:'淇濆瓨鍥剧墖',name :'璁惧鏁堢巼缁熻鎶ヨ〃'}
+          //   }
+          // },
           xAxis :{
             type : 'category',
             data:['寮�鏈烘椂闀�','鍏虫満鏃堕暱','杩愯鏃堕暱','寰呮満鏃堕暱'],
@@ -266,6 +266,7 @@
               name:'鏌辩姸鍥�',
               type: 'bar',
               data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
+              // data:[22,3,4,5],
               barWidth: 25,
               label:{
                 show:true,
@@ -280,9 +281,10 @@
                   color: function(params) {
                     let colorList = [
                       ["#6496e9","#6bded3"],
-                      ["#ffbb65","#fdc68b"],
+                      ["#849db8","#b4b8cc"],
                       ["#4fe1c5","#4ecee1"],
-                      ["#9978fa","#88a1fa"],
+                      // ["#9978fa","#88a1fa"],
+                      ["#ffbb65","#fdc68b"],
                     ];
                     // return colorList[params.dataIndex];
                     let colorItem = colorList[params.dataIndex];
@@ -332,7 +334,7 @@
             itemStyle: {
               normal: {
                 color: function (params) {
-                  let colorList = ['#4169E1', '#A8A8A8'];
+                  let colorList = ['#849db8', '#6496e9'];
                   return colorList[params.dataIndex]
                 },
                 label: {
@@ -374,7 +376,7 @@
             itemStyle: {
               normal: {
                 color: function (params) {
-                  var colorList = ['#00ee00', '#FCCE10'];
+                  var colorList = ['#4ecee1', '#FCCE10'];
                   return colorList[params.dataIndex]
                 },
                 label: {
@@ -392,7 +394,7 @@
       },
       queryStatistical(){
         getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{
-          if(res.success){
+          if(res.success) {
             // console.log(res);
             this.StatCharOpeningRate = res.result.openRate;
             //鍒╃敤鐜�
@@ -407,6 +409,8 @@
             this.closedLong = this.getTime(res.result.closeLong);
             this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
             this.draw();
+          }else{
+            this.draw()
           }
         })
       },
@@ -420,9 +424,11 @@
         let _this = this
         getAction(this.url.getBaseTree).then((res) => {
           if (res.success) {
+            if(res.result[0]){
+              _this.$set(this.queryParam, 'tierName', res.result[0].title)
+              _this.$set(this.queryParams, 'parentId', res.result[0].key)
+              _this.queryStatistical()            }
             // console.log(res.result[0].entity.tierName)
-            _this.$set(this.queryParam, 'tierName', res.result[0].title)
-            _this.$set(this.queryParams, 'parentId', res.result[0].key)
             _this.queryStatistical()
           } else {
             // this.$message.warn(res.message)
diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
index 51e261c..eec09ae 100644
--- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
+++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -230,25 +230,25 @@
               containLabel: true
             },
           legend:{
-            selected:{
-                "鏇茬嚎":false,
-            },
+            // selected:{
+            //     "鏇茬嚎":false,
+            // },
             top:'0',
             right:'10',
             //璁剧疆鍗曢�夊閫夋ā寮�
-            selectedMode:'single',
+            // selectedMode:'single',
             icon:"pin",
             data:[
-              {
-                name:'鏇茬嚎',
-                textStyle:{
-                  padding:4,
-                  color:'#e957ff',
-                  // borderWidth:1,
-                  fontSize:16,
-                  // borderColor:'#50E6D7'
-                }
-              },
+              // {
+              //   name:'鏇茬嚎',
+              //   textStyle:{
+              //     padding:4,
+              //     color:'#e957ff',
+              //     // borderWidth:1,
+              //     fontSize:16,
+              //     // borderColor:'#50E6D7'
+              //   }
+              // },
               {
                 name:'鏌辩姸鍥�',
                 textStyle:{
@@ -305,52 +305,53 @@
               }
             },
             series:[
-              {
-              name:'鏇茬嚎',
-              type: 'line',
-              smooth:true,
-              symbol: 'circle',
-              symbolSize: 8,
-              label:{
-                show:true,
-                position:"top",
-                textStyle:{
-                  color:'#000',
-                },
-                formatter:"鏃堕暱锛歿c}H"
-              },
-              itemStyle: {
-                color: "rgb(87, 120, 225)",
-                borderColor: "#fff",
-                borderWidth: 2,
-                shadowColor: 'rgba(0, 0, 0, .3)',
-              },
-              lineStyle: {
-                normal: {
-                  color:"rgb(87, 120, 225)",
-                  shadowColor: 'rgba(87, 120, 225, .4)',
-                  shadowBlur: 8,
-                  shadowOffsetY: 10,
-                  shadowOffsetX: 0,
-                },
-              },
-              areaStyle: {
-                normal: {
-                  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-                    offset: 0,
-                    color: 'rgba(87, 120, 225, .6)'
-                  }, {
-                    offset: 1,
-                    color: 'rgba(87, 120, 225, .3)'
-                  }]),
-                }
-              },
-              data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
-            },
+            //   {
+            //   name:'鏇茬嚎',
+            //   type: 'line',
+            //   smooth:true,
+            //   symbol: 'circle',
+            //   symbolSize: 8,
+            //   label:{
+            //     show:true,
+            //     position:"top",
+            //     textStyle:{
+            //       color:'#000',
+            //     },
+            //     formatter:"鏃堕暱锛歿c}H"
+            //   },
+            //   itemStyle: {
+            //     color: "rgb(87, 120, 225)",
+            //     borderColor: "#fff",
+            //     borderWidth: 2,
+            //     shadowColor: 'rgba(0, 0, 0, .3)',
+            //   },
+            //   lineStyle: {
+            //     normal: {
+            //       color:"rgb(87, 120, 225)",
+            //       shadowColor: 'rgba(87, 120, 225, .4)',
+            //       shadowBlur: 8,
+            //       shadowOffsetY: 10,
+            //       shadowOffsetX: 0,
+            //     },
+            //   },
+            //   areaStyle: {
+            //     normal: {
+            //       color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+            //         offset: 0,
+            //         color: 'rgba(87, 120, 225, .6)'
+            //       }, {
+            //         offset: 1,
+            //         color: 'rgba(87, 120, 225, .3)'
+            //       }]),
+            //     }
+            //   },
+            //   data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
+            // },
               {
                 name:'鏌辩姸鍥�',
                 type: 'bar',
                 data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
+                // data:[22,3,5,6],
                 barWidth: 25,
                 label:{
                   show:true,
@@ -365,9 +366,10 @@
                     color: function(params) {
                       let colorList = [
                         ["#6496e9","#6bded3"],
-                        ["#ffbb65","#fdc68b"],
+                        ["#849db8","#b4b8cc"],
                         ["#4fe1c5","#4ecee1"],
-                        ["#9978fa","#88a1fa"],
+                        // ["#9978fa","#88a1fa"],
+                        ["#ffbb65","#fdc68b"],
                       ];
                       // return colorList[params.dataIndex];
                       let colorItem = colorList[params.dataIndex];
@@ -446,13 +448,22 @@
             {
             type: 'bar',
             data: [this.openingLong,this.totalLong],
+              // data:[22,22],
             barWidth: 25,
+              label:{
+                show:true,
+                position:"top",
+                textStyle:{
+                  color:'#000',
+                },
+                formatter:"鏃堕暱锛歿c}H"
+              },
             itemStyle: {
               normal: {
                 color: function(params) {
                   let colorList = [
                     ["#6496e9","#6bded3"],
-                    ["#ffbb65","#fdc68b"],
+                    ["#9978fa","#88a1fa"],
                   ];
                   // return colorList[params.dataIndex];
                   let colorItem = colorList[params.dataIndex];
@@ -530,13 +541,22 @@
           series: [{
             type: 'bar',
             data: [this.processLong,this.openingLong],
+            // data:[22,22],
             barWidth: 25,
+            label:{
+              show:true,
+              position:"top",
+              textStyle:{
+                color:'#000',
+              },
+              formatter:"鏃堕暱锛歿c}H"
+            },
             itemStyle: {
               normal: {
                 color: function(params) {
                   let colorList = [
                     ["#4fe1c5","#4ecee1"],
-                    ["#9978fa","#88a1fa"],
+                    ["#6496e9","#6bded3"],
                   ];
                   // return colorList[params.dataIndex];
                   let colorItem = colorList[params.dataIndex];
@@ -572,6 +592,9 @@
               this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
               this.draw();
             }
+            else{
+              this.draw();
+            }
           })
       },
       dataChange(val) {
@@ -584,8 +607,11 @@
         let _this = this
         getAction(this.url.getBaseTree).then((res) => {
           if (res.success) {
+            if(res.result[0]){
+              _this.$set(this.queryParam, 'tierName', res.result[0].title)
+            }
             // console.log(res.result[0].entity.tierName)
-            _this.$set(this.queryParam, 'tierName', res.result[0].title)
+
           } else {
             // this.$message.warn(res.message)
             this.$notification.warning({
diff --git "a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue" "b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue"
deleted file mode 100644
index 2f53353..0000000
--- "a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue"
+++ /dev/null
@@ -1,84 +0,0 @@
-<template>
-  <a-drawer
-    :title="title"
-    :width="width"
-    placement="right"
-    :closable="false"
-    @close="close"
-    destroyOnClose
-    :visible="visible">
-    <torqueconfiguration-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></torqueconfiguration-form>
-    <div class="drawer-footer">
-      <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button>
-      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button>
-    </div>
-  </a-drawer>
-</template>
-
-<script>
-
-  import TorqueconfigurationForm from './TorqueconfigurationForm'
-
-  export default {
-    name: 'TorqueconfigurationModal',
-    components: {
-      TorqueconfigurationForm
-    },
-    data () {
-      return {
-        title:"鎿嶄綔",
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        });
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button鎸夐挳闂磋窛 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-  .drawer-footer{
-    position: absolute;
-    bottom: -8px;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
-</style>
\ No newline at end of file

--
Gitblit v1.9.3