|
|
@@ -15,7 +15,7 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.fileType == 1 ? '目录' : '文件' }}
|
|
|
+ {{ scope.row.fileType == 1 ? '文件' : '目录' }}
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
@@ -36,14 +36,14 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit-outline"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
+ @click="transferLog(scope.row)"
|
|
|
>获取日志
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit-outline"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
+ @click="transferLog(scope.row)"
|
|
|
>重新获取
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -67,7 +67,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {mapState, mapMutations} from "vuex";
|
|
|
+import {mapMutations, mapState} from "vuex";
|
|
|
import {getLogList} from "@/api/system/logManagement";
|
|
|
import {getLabel} from "@/views/commonOption";
|
|
|
|
|
|
@@ -82,6 +82,8 @@ export default {
|
|
|
formData: this.reset(),
|
|
|
title: '',
|
|
|
logList: [],
|
|
|
+ serverId: null,
|
|
|
+ serviceId: null,
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -95,7 +97,6 @@ export default {
|
|
|
getLabel,
|
|
|
reset(other = {}) {
|
|
|
return {
|
|
|
- id: null,
|
|
|
fileName: null,
|
|
|
fileSize: null,
|
|
|
fileType: null,
|
|
|
@@ -103,22 +104,27 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async refresh(serverId, serviceId) {
|
|
|
-
|
|
|
if (!serverId || !serviceId) {
|
|
|
this.reset(serverId);
|
|
|
} else {
|
|
|
- getLogList(serverId, serverId).then((response) => {
|
|
|
+ getLogList(serverId, serviceId).then((response) => {
|
|
|
this.logList = response.data;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
async show(server, service, other = {}) {
|
|
|
- this.id = server;
|
|
|
+ this.serverId = server.id;
|
|
|
+ this.serviceId = service.id;
|
|
|
this.title = service.checkName + "日志详情页";
|
|
|
await this.refresh(server.id, service.id);
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
+
|
|
|
+ transferLog(row) {
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
// 事件
|
|
|
onHide() {
|
|
|
this.isShow = false;
|