浏览代码

'账户报表3'

魏志佳 5 年之前
父节点
当前提交
ca0a82bf05
共有 3 个文件被更改,包括 16 次插入11 次删除
  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: '一周',
     title: '一周',
     key: '3',
     key: '3',
     value: 3,
     value: 3,
-    dateValue: [moment().subtract(7, 'days'), moment().subtract(1, 'days')]
+    dateValue: [moment().subtract(8, 'days'), moment().subtract(1, 'days')]
   },
   },
   {
   {
     title: '一个月',
     title: '一个月',

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

@@ -267,7 +267,7 @@ let sectionOption={
        
        
         axisPointer: {
         axisPointer: {
         // 坐标轴指示器,坐标轴触发有效
         // 坐标轴指示器,坐标轴触发有效
-        type: 'line', // 默认为直线,可选为:'line' | 'shadow',
+          type: 'line', // 默认为直线,可选为:'line' | 'shadow',
         
         
         }, 
         }, 
         
         
@@ -277,7 +277,7 @@ let sectionOption={
     },
     },
     grid: {
     grid: {
         left: '2%',
         left: '2%',
-        right: '0%',
+        right: '2%',
         bottom: '0%',
         bottom: '0%',
         top: '12%',
         top: '12%',
         containLabel: true
         containLabel: true
@@ -501,8 +501,8 @@ export default {
       
       
     },
     },
     dateValue(newName,oldName){
     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{
           }else{
             this.searchgetData();
             this.searchgetData();
@@ -843,7 +843,7 @@ export default {
       if (chart) {
       if (chart) {
         var myChart = echarts.init(document.getElementById(idName))
         var myChart = echarts.init(document.getElementById(idName))
         myChart.clear()
         myChart.clear()
-        myChart.setOption(optionName,true)
+        myChart.setOption(optionName)
         window.addEventListener('resize', function() {
         window.addEventListener('resize', function() {
           myChart.resize()
           myChart.resize()
         })
         })
@@ -1002,7 +1002,7 @@ export default {
          }).then(res => {
          }).then(res => {
               if(res.success){
               if(res.success){
                 this.loading=false;
                 this.loading=false;
-                  console.log(res)                   
+                  // console.log(res)                   
                    res.result.forEach(element => {
                    res.result.forEach(element => {
                      if(this.timeValueString){
                      if(this.timeValueString){
                        element.date=this.dateValue[0].format('YYYY.MM.DD')+'—'+this.timeValueString
                        element.date=this.dateValue[0].format('YYYY.MM.DD')+'—'+this.timeValueString
@@ -1144,9 +1144,14 @@ export default {
   },
   },
   mounted() {
   mounted() {
     this.accountHttp()
     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
       columnType: 5
     }).then(res => {
     }).then(res => {
       // console.log(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.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115: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.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,
         ws: false,
         changeOrigin: true
         changeOrigin: true
       },
       },