|
@@ -20,6 +20,11 @@
|
|
|
</div>
|
|
|
<div class="journal-content">
|
|
|
<el-table :data="tableData" :row-class-name="tableRowClassName" class="table scrollbar" height="450" style="width: 100%">
|
|
|
+ <el-table-column label="用户名">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div :class="scope.row.isSocket ? 'red' : ''">{{ scope.row.UserName ? scope.row.UserName : "暂无数据" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="应用名称">
|
|
|
<template slot-scope="scope">
|
|
|
<div :class="scope.row.isSocket ? 'red' : ''">{{ scope.row.AppName ? scope.row.AppName : "暂无数据" }}</div>
|
|
@@ -54,6 +59,9 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div class="pager">
|
|
|
+ <el-pagination class="pager_btns" layout="prev, pager, next" background :hide-on-single-page="true" :current-page="page" :page-size="size" :total="total" @current-change="fetchData" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -79,6 +87,9 @@ export default {
|
|
|
Msg: "",
|
|
|
BeginTime: "",
|
|
|
EndTime: "",
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ total: null
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -95,6 +106,8 @@ export default {
|
|
|
Msg: "",
|
|
|
BeginTime: "",
|
|
|
EndTime: "",
|
|
|
+ Page: this.page,
|
|
|
+ PageSize: this.size
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
@@ -110,8 +123,9 @@ export default {
|
|
|
const res = await GetLogList(params);
|
|
|
if (res.code == 0) {
|
|
|
const datas = this.$store.state.app.wsData
|
|
|
- this.tableData = datas.concat(res.returnData);
|
|
|
- this.tableCopy = res.returnData;
|
|
|
+ this.tableData = datas.concat(res.returnData.result);
|
|
|
+ this.tableCopy = res.returnData.result;
|
|
|
+ this.total = res.returnData.total;
|
|
|
} else {
|
|
|
this.tableData = [];
|
|
|
this.$message.error(res.message);
|
|
@@ -131,6 +145,8 @@ export default {
|
|
|
Msg: this.Msg,
|
|
|
BeginTime: this.BeginTime,
|
|
|
EndTime: this.EndTime,
|
|
|
+ Page: this.page,
|
|
|
+ PageSize: this.size
|
|
|
});
|
|
|
},
|
|
|
clearSearch () {
|
|
@@ -138,6 +154,8 @@ export default {
|
|
|
Msg: "",
|
|
|
BeginTime: this.BeginTime,
|
|
|
EndTime: this.EndTime,
|
|
|
+ Page: this.page,
|
|
|
+ PageSize: this.size
|
|
|
});
|
|
|
},
|
|
|
pickerChange (val) {
|
|
@@ -153,9 +171,21 @@ export default {
|
|
|
Msg: this.Msg,
|
|
|
BeginTime: "",
|
|
|
EndTime: "",
|
|
|
+ Page: this.page,
|
|
|
+ PageSize: this.size
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ fetchData (val) {
|
|
|
+ this.page = val;
|
|
|
+ this.getLogList({
|
|
|
+ Msg: this.Msg,
|
|
|
+ BeginTime: this.BeginTime,
|
|
|
+ EndTime: this.EndTime,
|
|
|
+ Page: this.page,
|
|
|
+ PageSize: this.size
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -242,6 +272,15 @@ export default {
|
|
|
color: red;
|
|
|
}
|
|
|
}
|
|
|
+ ::v-deep .pager {
|
|
|
+ text-align: right;
|
|
|
+ &_btns {
|
|
|
+ display: inline-block;
|
|
|
+ .el-pager li.active {
|
|
|
+ background: linear-gradient(0deg, #6983be, #777dba);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|