|
|
@@ -52,6 +52,7 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" >导出</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -211,10 +212,7 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
formatTrafficData(traffic) {
|
|
|
- if (traffic < 1024) return `${traffic} B`;
|
|
|
- if (traffic < 1024 ** 2) return `${(traffic / 1024).toFixed(2)} KB`;
|
|
|
- if (traffic < 1024 ** 3) return `${(traffic / 1024 ** 2).toFixed(2)} MB`;
|
|
|
- return `${(traffic / 1024 ** 3).toFixed(2)} GB`;
|
|
|
+ return `${(traffic / (1024 ** 3)).toFixed(4)} GB`;
|
|
|
},
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.logId);
|
|
|
@@ -228,7 +226,7 @@ export default {
|
|
|
}).finally(() => {
|
|
|
this.exportLoading = false;
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|