|
@@ -81,7 +81,8 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="50"> </el-table-column>
|
|
|
- <el-table-column prop="logID" label="日志编号"> </el-table-column>
|
|
|
+ <el-table-column label="序号" type="index" width="60">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="systemTemplate" label="系统模块">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="operationType" label="操作类型">
|
|
@@ -103,16 +104,12 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="operationTime" label="操作时间">
|
|
|
+ <el-table-column prop="operationTime" label="操作时间" width="180">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
- <div style="width: 100%; height: 100%; position: absolute">
|
|
|
- <!-- 逻辑bug,如果选中应该怎么办 -->
|
|
|
- <el-checkbox class="checkbox" v-model="isSelected"
|
|
|
- >已选{{ multipleSelection.length }}项</el-checkbox
|
|
|
- >
|
|
|
+ <!-- <div style="width: 100%; height: 100%; position: absolute">
|
|
|
<el-button
|
|
|
class="check-cancel"
|
|
|
size="mini"
|
|
@@ -133,8 +130,8 @@
|
|
|
<el-button class="export" type="text" @click="exportData"
|
|
|
>导出数据</el-button
|
|
|
>
|
|
|
- </div>
|
|
|
- <page class="page"></page>
|
|
|
+ </div> -->
|
|
|
+ <page class="page" :paginationData="paginationData"></page>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -142,58 +139,59 @@
|
|
|
<script>
|
|
|
import checkbox from "@/components/Checkbox/index";
|
|
|
import page from "@/components/pagination/index";
|
|
|
+import { getLogList } from "@/api/security/logMonitor";
|
|
|
export default {
|
|
|
components: { checkbox, page },
|
|
|
data() {
|
|
|
return {
|
|
|
- isSelected: false,
|
|
|
show: true,
|
|
|
form: {
|
|
|
- moduleName: "全部",
|
|
|
+ moduleName: "",
|
|
|
+ operationType: "",
|
|
|
nameInput: "",
|
|
|
- operationType: "全部",
|
|
|
- operationStatus: "2",
|
|
|
+ operationStatus: "",
|
|
|
timeVal: "",
|
|
|
},
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- logID: "176",
|
|
|
- systemTemplate: "用户登录",
|
|
|
- operationType: "新增",
|
|
|
- requestType: "post",
|
|
|
- operationPerson: "管理员",
|
|
|
- operationAddress: "11.11.11.11",
|
|
|
- operationAddress_desc: "内网IP",
|
|
|
- operationStatus: "true",
|
|
|
- operationTime: "2023-01-01 00:00",
|
|
|
- },
|
|
|
- {
|
|
|
- logID: "176",
|
|
|
- systemTemplate: "用户登录",
|
|
|
- operationType: "新增",
|
|
|
- requestType: "post",
|
|
|
- operationPerson: "管理员",
|
|
|
- operationAddress: "11.11.11.11",
|
|
|
- operationAddress_desc: "内网IP",
|
|
|
- operationStatus: "true",
|
|
|
- operationTime: "2023-01-01 00:00",
|
|
|
- },
|
|
|
- {
|
|
|
- logID: "176",
|
|
|
- systemTemplate: "用户登录",
|
|
|
- operationType: "新增",
|
|
|
- requestType: "post",
|
|
|
- operationPerson: "管理员",
|
|
|
- operationAddress: "11.11.11.11",
|
|
|
- operationAddress_desc: "内网IP",
|
|
|
- operationStatus: "false",
|
|
|
- operationTime: "2023-01-01 00:00",
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
+ // tableData: [
|
|
|
+ // {
|
|
|
+ // logID: "176",
|
|
|
+ // systemTemplate: "用户登录",
|
|
|
+ // operationType: "新增",
|
|
|
+ // requestType: "post",
|
|
|
+ // operationPerson: "管理员",
|
|
|
+ // operationAddress: "11.11.11.11",
|
|
|
+ // operationAddress_desc: "内网IP",
|
|
|
+ // operationStatus: "true",
|
|
|
+ // operationTime: "2023-01-01 00:00",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // logID: "176",
|
|
|
+ // systemTemplate: "用户登录",
|
|
|
+ // operationType: "新增",
|
|
|
+ // requestType: "post",
|
|
|
+ // operationPerson: "管理员",
|
|
|
+ // operationAddress: "11.11.11.11",
|
|
|
+ // operationAddress_desc: "内网IP",
|
|
|
+ // operationStatus: "true",
|
|
|
+ // operationTime: "2023-01-01 00:00",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // logID: "176",
|
|
|
+ // systemTemplate: "用户登录",
|
|
|
+ // operationType: "新增",
|
|
|
+ // requestType: "post",
|
|
|
+ // operationPerson: "管理员",
|
|
|
+ // operationAddress: "11.11.11.11",
|
|
|
+ // operationAddress_desc: "内网IP",
|
|
|
+ // operationStatus: "false",
|
|
|
+ // operationTime: "2023-01-01 00:00",
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
operationTypeOptions: [
|
|
|
{
|
|
|
- value: "全部",
|
|
|
- label: "全部",
|
|
|
+ value: "",
|
|
|
+ label: "不限",
|
|
|
},
|
|
|
{
|
|
|
value: "新增",
|
|
@@ -223,8 +221,8 @@ export default {
|
|
|
],
|
|
|
operationStatusOptions: [
|
|
|
{
|
|
|
- value: "2",
|
|
|
- label: "全部",
|
|
|
+ value: "",
|
|
|
+ label: "不限",
|
|
|
},
|
|
|
{
|
|
|
value: "0",
|
|
@@ -237,8 +235,8 @@ export default {
|
|
|
],
|
|
|
moduleNameOptions: [
|
|
|
{
|
|
|
- value: "全部",
|
|
|
- label: "全部",
|
|
|
+ value: "",
|
|
|
+ label: "不限",
|
|
|
},
|
|
|
{
|
|
|
value: "登入",
|
|
@@ -278,23 +276,68 @@ export default {
|
|
|
children: "children",
|
|
|
label: "label",
|
|
|
},
|
|
|
+ currentPageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ paginationData: {
|
|
|
+ pageSize: 10,
|
|
|
+ pagerCount: 5,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSizes: [5, 10, 20, 30],
|
|
|
+ total: 30,
|
|
|
+ currentChange: (val) => {
|
|
|
+ this.getTableData(val);
|
|
|
+ },
|
|
|
+ handleSizeChange: (val) => {
|
|
|
+ this.handleSizeChange(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
filterText(val) {
|
|
|
this.$refs.search.filter(val);
|
|
|
},
|
|
|
- isSelected(val) {
|
|
|
- if (!val) {
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- }
|
|
|
- },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
- initData() {},
|
|
|
+ initData() {
|
|
|
+ this.getTableData(1);
|
|
|
+ },
|
|
|
+ getTableData(page) {
|
|
|
+ this.tableData = [];
|
|
|
+ getLogList(
|
|
|
+ page,
|
|
|
+ this.currentPageSize,
|
|
|
+ this.form.nameInput,
|
|
|
+ this.form.moduleName,
|
|
|
+ this.form.operationType,
|
|
|
+ this.form.operationStatus
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.data.code === 0 && res.data.data.length > 0) {
|
|
|
+ this.tableData = res.data.data.map((v) => {
|
|
|
+ return {
|
|
|
+ logID: v.id,
|
|
|
+ systemTemplate: v.module,
|
|
|
+ operationType: v.operation_type,
|
|
|
+ requestType: v.request,
|
|
|
+ operationPerson: v.operation_staff,
|
|
|
+ operationAddress: v.operation_address,
|
|
|
+ operationAddress_desc: "内网IP",
|
|
|
+ operationStatus: v.operation_status == "0" ? "true" : "false",
|
|
|
+ operationTime: v.operation_time,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 切换条数
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`);
|
|
|
+ this.currentPageSize = val;
|
|
|
+ this.getTableData(this.currentPage);
|
|
|
+ },
|
|
|
filterNode(value, data) {
|
|
|
if (!value) return true;
|
|
|
return data.label.indexOf(value) !== -1;
|
|
@@ -303,22 +346,18 @@ export default {
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
- if (val.length > 0) {
|
|
|
- this.isSelected = true;
|
|
|
- } else {
|
|
|
- this.isSelected = false;
|
|
|
- }
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
resetEvent() {
|
|
|
- this.form.moduleName = "全部";
|
|
|
+ this.form.moduleName = "";
|
|
|
this.form.nameInput = "";
|
|
|
- this.form.operationType = "全部";
|
|
|
- this.operationStatus = "2";
|
|
|
+ this.form.operationType = "";
|
|
|
+ this.form.operationStatus = "";
|
|
|
this.searchEvent();
|
|
|
},
|
|
|
searchEvent() {
|
|
|
console.log(this.form);
|
|
|
+ this.getTableData(this.currentPage)
|
|
|
},
|
|
|
exportEvent() {
|
|
|
console.log("导出事件");
|