浏览代码

'改穿山甲'

魏志佳 5 年之前
父节点
当前提交
9d283ebc20

+ 12 - 3
src/views/modules/Statistics/chuanshanjia/activateSta.vue

@@ -15,7 +15,7 @@
                 />
              </div>
             <span>应用选择:</span>
-            <a-select default-value="0" style="width: 150px" @change="APPChange">
+            <a-select v-model="defalutAPP" style="width: 150px" @change="APPChange" >
                     <a-select-option value="0">全部</a-select-option>
                     <a-select-option v-for="(item,index) in optionArr" :key='index' :value='item.id'>{{item.name}}</a-select-option>                  
             </a-select>
@@ -28,7 +28,7 @@
             v-model="dateRange"
             />
             <span class="caozuoxitong">操作系统:</span>
-             <a-select default-value="all" style="width: 150px" @change="handleChange">
+             <a-select v-model="selectValue" style="width: 150px" @change="handleChange">
                     <a-select-option value="all">全部</a-select-option>
                     <a-select-option value="android">Android</a-select-option>
                     <a-select-option value="ios">IOS</a-select-option>        
@@ -47,7 +47,7 @@
            
         </a-table>
         <div class="fenye">
-            <a-pagination v-model="currentPage" :total="totalItem" show-less-items style="float:right" />
+            <a-pagination v-model="currentPage" :total="totalItem" show-less-items style="float:right" size="small" />
         </div>
     </div>
 </template>
@@ -111,6 +111,7 @@ export default {
             //应用下拉选择框的
             optionArr:[],
             APPID:0,
+            defalutAPP:'0',
             //日期选择器的值
             dateRange:[],
             dateStr:[],
@@ -132,6 +133,7 @@ export default {
             treeData:[],
             SHOW_PARENT,
 
+
         }
     },
     
@@ -149,6 +151,13 @@ export default {
                     this.accountName.push(item)
                 }
             })
+            this.optionArr=[]
+            
+            this.defalutAPP='0'
+            this.selectValue='all'
+            if(this.treeValue.length==0){
+                this.optionArr=[]
+            }
            postAction('/pangolin/api/app/list',{
                 projectId:this.projectId,
                 accountName:this.accountName

+ 11 - 3
src/views/modules/Statistics/chuanshanjia/checkBill.vue

@@ -15,7 +15,7 @@
                 />
             </div>
             <span>应用选择:</span>
-            <a-select default-value="0" style="width: 150px" @change="APPChange">
+            <a-select v-model="defalutAPP" style="width: 150px" @change="APPChange">
                     <a-select-option value="0">全部</a-select-option>
                     <a-select-option v-for="(item,index) in optionArr" :key='index' :value='item.id'>{{item.name}}</a-select-option>                  
             </a-select>
@@ -31,7 +31,7 @@
                 :loading="loading"     
             />
             <span class="caozuoxitong">操作系统:</span>
-             <a-select default-value="all" style="width: 150px" @change="handleChange">
+             <a-select v-model="selectValue" style="width: 150px" @change="handleChange">
                     <a-select-option value="all">全部</a-select-option>
                     <a-select-option value="android">Android</a-select-option>
                     <a-select-option value="ios">IOS</a-select-option>        
@@ -45,7 +45,7 @@
            
         </a-table>
         <div class="fenye">
-            <a-pagination v-model="currentPage" :total="totalItem" show-less-items style="float:right" />
+            <a-pagination v-model="currentPage" :total="totalItem" show-less-items style="float:right"  size="small"/>
         </div>
         
     </div>
@@ -109,6 +109,7 @@ export default {
             //应用下拉选择框的
             optionArr:[],
             APPID:'',
+            defalutAPP:'0',
             //table的值
             columns,
             dataSource:[],
@@ -148,6 +149,13 @@ export default {
                     this.accountName.push(item)
                 }
             });
+            this.APPID=''
+            this.defalutAPP='0'
+            this.selectValue='all'
+            if(this.treeValue.length==0){
+                this.optionArr=[]
+            }
+            this.optionArr=[];
             postAction('/pangolin/api/app/list',{
                 projectId:this.projectId,
                 accountName:this.accountName

+ 7 - 2
src/views/modules/Statistics/chuanshanjia/realTimeData.vue

@@ -13,7 +13,7 @@
                     @change="treeChange"
                 />
             <span>应用选择:</span>
-            <a-select default-value="0" style="width: 150px" @change="APPChange">
+            <a-select v-model="defalutAPP" style="width: 150px" @change="APPChange">
                     <a-select-option value="0">全部</a-select-option>
                     <a-select-option v-for="(item,index) in optionArr" :key='index' :value='item.id'>{{item.name}}</a-select-option>                  
             </a-select>
@@ -35,7 +35,7 @@
         <a-button type="primary" @click="openDate" v-clickoutside="handleClose" >对比时段</a-button>
       </p>
       <div class="dateDiv">
-        <a-date-picker @change="dateChange" v-show="dateOpen" :open='dateOpen' :disabled-date="disabledDate"  />
+        <a-date-picker @change="dateChange" v-show="dateOpen" :open='dateOpen' :disabled-date="disabledDate" size="small"  />
       </div>
     </div>
 
@@ -183,6 +183,7 @@ export default {
         //应用下拉选择框的
         optionArr:[],
         APPID:'', 
+        defalutAPP:'0',
       //表格参数
       dataSource: [],
       loading: false,
@@ -220,6 +221,10 @@ export default {
                     this.accountName.push(item)
                 }
             })
+            this.APPID=''
+            this.defalutAPP='0'
+            this.selectValue='all'
+            this.optionArr=[]
             if(this.treeValue.length==0){
                 this.optionArr=[]
             }

+ 49 - 19
src/views/modules/Statistics/newHome.vue

@@ -2,21 +2,7 @@
   <div class="homePage">
     <div >
       <a-row :gutter="16">
-        <a-col :sm="24" :md="12" :xl="6" :xxl="6" class="topBox">
-          <div class="showBox">
-            <div class="title">
-              Top7项目消耗
-              <a-tooltip>
-                <template slot="title">最近七天的top7项目消耗</template>
-                <span class="icon">
-                  <a-icon type="exclamation-circle" />
-                </span>
-              </a-tooltip>
-            </div>
-            <div id="topChart" style="width:100%;height:100px" ref="topChart"></div>
-            <div class="footerInfo">TOP1: <span class="num">¥{{this.topOption.series[0].data[0] | decimalsHandle}}</span> </div>
-          </div>
-        </a-col>
+       
         <a-col :sm="24" :md="12" :xl="6" :xxl="6" class="topBox">
           <div class="showBox">
             <div class="title">
@@ -100,6 +86,21 @@
             </div>
           </div>
         </a-col>
+         <a-col :sm="24" :md="12" :xl="6" :xxl="6" class="topBox">
+          <div class="showBox">
+            <div class="title">
+              Top7项目消耗
+              <a-tooltip>
+                <template slot="title">最近七天的top7项目消耗</template>
+                <span class="icon">
+                  <a-icon type="exclamation-circle" />
+                </span>
+              </a-tooltip>
+            </div>
+            <div id="topChart" style="width:100%;height:100px" ref="topChart"></div>
+            <div class="footerInfo">TOP1: <span class="num">¥{{this.topOption.series[0].data[0] | decimalsHandle}}</span> </div>
+          </div>
+        </a-col>
       </a-row>
     </div>
     <!-- 折线图模块 -->
@@ -239,11 +240,14 @@ let lineStyle= {
 }
 let sectionOption={
     tooltip: {
-        trigger: 'axis',
+        trigger: 'item',
+       
             axisPointer: {
             // 坐标轴指示器,坐标轴触发有效
-            type: 'line' // 默认为直线,可选为:'line' | 'shadow'
-            }
+            type: 'line', // 默认为直线,可选为:'line' | 'shadow',
+            
+            },
     },
     legend: {
         data: ['总消耗']
@@ -285,6 +289,13 @@ let sectionOption={
             data:  [],
             color:'#8A2BE2'
         },
+        {
+            name: '',
+            type: 'line',
+            // smooth: true,
+            data:  [],
+            color:'rgba(0,0,0,0)'
+        }
     ]
 }
 
@@ -298,6 +309,10 @@ let init={
         x:['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00','07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00','19:00', '20:00', '21:00', '22:00', '23:00'],
         y:[],
         name:"昨天"
+    },
+    huanbi:{
+      name:'环比',
+      y:[]
     }
 }
 
@@ -508,13 +523,28 @@ export default {
                     }
                     
                 });
-
+                res.result.list.forEach((item)=>{
+                    if(!item.costProportion){
+                      // console.log(item.costProportion)
+                       this.tabCost.huanbi.y.push('-') 
+                        
+                        
+                    }else{
+                      
+                       let huanbi=(item.costProportion*100).toFixed(2)+'%'
+                        
+                        this.tabCost.huanbi.y.push(huanbi) 
+                       
+                    }
+                })
                 this.sectionOption.legend.data=['今天','昨天'];
                 this.sectionOption.xAxis[0].data=this.tabCost.today.x;
                 this.sectionOption.series[0].data=this.tabCost.today.y;
                 this.sectionOption.series[0].name=this.tabCost.today.name;
                 this.sectionOption.series[1].data=this.tabCost.yesterday.y;
                 this.sectionOption.series[1].name=this.tabCost.yesterday.name;
+                this.sectionOption.series[2].data=this.tabCost.huanbi.y;
+                this.sectionOption.series[2].name=this.tabCost.huanbi.name;
                 
 
             }else if(res.result.chart[0].afterData&& res.result.chart[0].afterData.statDate==moment().subtract(1,'days').format('YYYY-MM-DD')){

+ 1 - 1
vue.config.js

@@ -73,7 +73,7 @@ module.exports = {
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.54:8080', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.251:8088', //请求本地 需要jeecg-boot后台项目 
+        target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
         ws: false,
         changeOrigin: true
       },