فهرست منبع

Merge branch 'master' of git.xiaojukeji.com:jacklijiajia/thoth-frontend

reedliuqing_i 5 سال پیش
والد
کامیت
6757d6a35d
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 1 0
      package.json
  2. 4 1
      src/views/quality/qualityMeasurement.vue

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
   },
   "dependencies": {
     "axios": "0.18.0",
+    "dayjs": "^1.8.17",
     "echarts": "^4.2.1",
     "element-ui": "^2.9.1",
     "file-saver": "^2.0.2",

+ 4 - 1
src/views/quality/qualityMeasurement.vue

@@ -462,6 +462,7 @@
 import axios from 'axios'
 import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount, getClientInfo, getHotpatch, getCompareCount, getCompareCountOnline, getComparatorCount, getComparatorCountOnline } from '@/api/qualityCenter'
 import echarts from 'echarts'
+import dayjs from 'dayjs'
 
 export default {
   filters: {
@@ -526,7 +527,8 @@ export default {
       totalOneEchartsRate: '',
       totalOneEchartsOnline: '',
       dealWithBusinessDate: [],
-      timeInterval: [new Date().getTime() - 7 * 24 * 60 * 60 * 1000, new Date().getTime()]
+      // timeInterval: [new Date().getTime() - 7 * 24 * 60 * 60 * 1000, new Date().getTime()],
+      timeInterval: [dayjs(dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD')).valueOf(), dayjs(dayjs(new Date()).add(1, 'days').format('YYYY-MM-DD')).valueOf() - 1]
     }
   },
   computed: {
@@ -932,6 +934,7 @@ export default {
     },
     // 时间变化刷新页面
     dataSearch() {
+      this.timeInterval[1] = dayjs(dayjs(new Date()).add(1, 'days').format('YYYY-MM-DD')).valueOf() - 1
       if (this.pauseKey === 0) {
         this._initBusinessTreeAndBeginInfo()
       } else if (this.pauseKey === 3) {