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