sensitiveIdentifyTaskExecLog.vue
3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<route lang="yaml">
name: sensitiveIdentifyTaskExecLog
</route>
<script lang="ts" setup name="sensitiveIdentifyTaskExecLog">
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";
import Table from "@/components/Table/index.vue";
import { ElMessage } from "element-plus";
import { commonPageConfig } from '@/components/PageNav/index';
import {
getSensitiveDataTaskExecLog,
} from '@/api/modules/dataAnonymization';
import { TableColumnWidth } from "@/utils/enum";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
const guid = route.query.guid;
const wordName = route.query.name
const page = ref({
...commonPageConfig
});
const tableInfo = ref({
id: "word-log-table",
loading: false,
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "执行人", field: "createUserName", width: TableColumnWidth.USERNAME },
{ label: "执行时间", field: "execTime", width: TableColumnWidth.DATETIME },
{ label: "执行状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" },
{ label: "确认人", field: "confirmUserName", width: TableColumnWidth.USERNAME },
{ label: "确认时间", field: "confirmTime", width: TableColumnWidth.DATETIME },
{ label: "确认状态", field: "sensitiveIdentifyConfirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" },
],
data: [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
label: "操作",
type: "btn",
width: 100,
fixed: 'right',
btns: (scope) => {
return [{
label: "查看", value: "report", disabled: scope.row['status'] != 'Y', click: (scope) => {
router.push({
name: 'sensitiveIdentifyConfig',
query: {
guid: route.query.guid,
execGuid: scope.row.guid,
taskName: route.query.name,
isLook: '1',
}
});
}
}];
}
}
});
const getTableData = () => {
tableInfo.value.loading = true;
getSensitiveDataTaskExecLog({ pageIndex: page.value.curr, pageSize: page.value.limit, taskGuid: guid }).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
const data = res.data || {}
tableInfo.value.data = data.records?.map(d => {
d.sensitiveIdentifyTaskStatus = d.status;
d.sensitiveIdentifyConfirmStatus = d.confirmStatus;
return d;
}) || []
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
tableInfo.value.page.rows = data.totalRows
} else {
ElMessage.error(res.msg);
}
})
};
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
if (type == 'reportView') {
router.push({
name: 'analysisReport',
query: {
planGuid: row.planGuid,
reportExecGuid: row.guid,
name: wordName
}
});
}
};
onActivated(() => {
getTableData();
});
</script>
<template>
<div class="container_wrap">
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
</div>
</div>
</template>
<style lang="scss" scoped>
.container_wrap {
padding: 0;
.table_panel_wrap {
height: 100%;
padding: 16px 16px 0;
}
}
</style>