Browse Source

'账户报表3'

魏志佳 5 years ago
parent
commit
ca0a82bf05
3 changed files with 16 additions and 11 deletions
  1. 1 1
      src/components/DatePicker.vue
  2. 13 8
      src/views/modules/Statistics/accountReport.vue
  3. 2 2
      vue.config.js

+ 1 - 1
src/components/DatePicker.vue

@@ -62,7 +62,7 @@ let pickOptions = [
     title: '一周',
     key: '3',
     value: 3,
-    dateValue: [moment().subtract(7, 'days'), moment().subtract(1, 'days')]
+    dateValue: [moment().subtract(8, 'days'), moment().subtract(1, 'days')]
   },
   {
     title: '一个月',

+ 13 - 8
src/views/modules/Statistics/accountReport.vue

@@ -267,7 +267,7 @@ let sectionOption={
        
         axisPointer: {
         // 坐标轴指示器,坐标轴触发有效
-        type: 'line', // 默认为直线,可选为:'line' | 'shadow',
+          type: 'line', // 默认为直线,可选为:'line' | 'shadow',
         
         }, 
         
@@ -277,7 +277,7 @@ let sectionOption={
     },
     grid: {
         left: '2%',
-        right: '0%',
+        right: '2%',
         bottom: '0%',
         top: '12%',
         containLabel: true
@@ -501,8 +501,8 @@ export default {
       
     },
     dateValue(newName,oldName){
-      console.log(newName,oldName)
-          if( newName[0].format('YYYY-MM-DD')==oldName[0].format('YYYY-MM-DD') || newName[0].format('YYYY-MM-DD')==moment().format('YYYY-MM-DD')){
+      // console.log(newName,oldName)
+          if(newName[0].format('YYYY-MM-DD')==oldName[0].format('YYYY-MM-DD') || newName[0].format('YYYY-MM-DD')==moment().format('YYYY-MM-DD')){
                 
           }else{
             this.searchgetData();
@@ -843,7 +843,7 @@ export default {
       if (chart) {
         var myChart = echarts.init(document.getElementById(idName))
         myChart.clear()
-        myChart.setOption(optionName,true)
+        myChart.setOption(optionName)
         window.addEventListener('resize', function() {
           myChart.resize()
         })
@@ -1002,7 +1002,7 @@ export default {
          }).then(res => {
               if(res.success){
                 this.loading=false;
-                  console.log(res)                   
+                  // console.log(res)                   
                    res.result.forEach(element => {
                      if(this.timeValueString){
                        element.date=this.dateValue[0].format('YYYY.MM.DD')+'—'+this.timeValueString
@@ -1144,9 +1144,14 @@ export default {
   },
   mounted() {
     this.accountHttp()
-    this.getEchartData('sectionChart', this.sectionOption)
+    new Promise((resolve, reject) => {
+      this.getEchartData('sectionChart', this.sectionOption)
+      resolve()
+    }).then(()=>{
+      this.myChart.clear()
+    })
     
-     postAction('/toutiao/videoReportDaily/getColumnJson', {
+    postAction('/toutiao/videoReportDaily/getColumnJson', {
       columnType: 5
     }).then(res => {
       // console.log(res)

+ 2 - 2
vue.config.js

@@ -72,8 +72,8 @@ module.exports = {
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // 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:80', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
         ws: false,
         changeOrigin: true
       },