Procházet zdrojové kódy

update NginxLog.vue

reghao před 2 měsíci
rodič
revize
719113467b
1 změnil soubory, kde provedl 8 přidání a 7 odebrání
  1. 8 7
      src/views/devops/srv/NginxLog.vue

+ 8 - 7
src/views/devops/srv/NginxLog.vue

@@ -119,7 +119,7 @@
                     size="mini"
                     type="success"
                     @click="onGetWeekly(scope.$index, scope.row)"
-                  >最近一周</el-button>
+                  >最近分布</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -384,23 +384,24 @@ export default {
     },
     onGetDaily(index, row) {
       this.dateTimeQuery.url = row.name
-      this.showChart4Dialog = true
       this.chart4DialogTitle = row.name + ' 接口 ' + this.queryInfo.dateStr + ' 访问时间分布'
+      this.showChart4Dialog = true
     },
     onGetWeekly(index, row) {
       this.dateTimeQuery.url = row.name
-      this.showChart5Dialog = true
       this.chart5DialogTitle = row.name + ' 接口 ' + this.queryInfo.dateStr + ' 前 7 天访问数量分布'
+      this.showChart5Dialog = true
     },
     handleDialogOpened1() {
       var dateArr = this.queryInfo.dateStr.split('-')
       var end = new Date(dateArr[0], dateArr[1] - 1, dateArr[2], 23, 59, 59)
       var start = new Date(dateArr[0], dateArr[1] - 1, dateArr[2])
       start.setDate(start.getDate() - 7)
-      this.dateTimeQuery.start = this.formatDateTime(start)
-      this.dateTimeQuery.end = this.formatDateTime(end)
+      const dateTimeQuery = {}
+      dateTimeQuery.start = this.formatDateTime(start)
+      dateTimeQuery.end = this.formatDateTime(end)
       this.$nextTick(() => {
-        getNginxLogChart5(this.dateTimeQuery).then(resp => {
+        getNginxLogChart5(dateTimeQuery).then(resp => {
           if (resp.code === 0) {
             const respData = resp.data
             const xData = respData[0]
@@ -580,8 +581,8 @@ export default {
       })
     },
     onRefreshChart1() {
-      this.showChart1Dialog = true
       this.chart1DialogTitle = this.queryInfo.dateStr + ' 前 7 天访问数量分布'
+      this.showChart1Dialog = true
     },
     onRefreshChart2() {
       getNginxLogChart2(this.queryInfo).then(resp => {