Commit a07e350e39d63b4519c86e7b50c5e65ea7b53765

Authored by xp.Huang
2 parents b2cdfde9 1e08b649

Merge branch 'perf/log' into 'main_dev'

perf: 优化日志管理 异常日志,移除客户名称、资源类型、操作类型这三列

See merge request yunteng/thingskit-front!1287
1 1 import { BasicColumn, FormSchema } from '/@/components/Table';
2 2 import moment from 'moment';
3   -import { findDictItemByCode } from '/@/api/system/dict';
4 3 import { format } from '../util';
5 4 import { h } from 'vue';
6 5 import { Tag } from 'ant-design-vue';
7 6
8   -//格式化资源类型和操作类型
9   -let formatText;
10   -let actionTypeText;
11   -async function formatTextFunc() {
12   - formatText = await findDictItemByCode({ dictCode: 'operate_log' });
13   - actionTypeText = await findDictItemByCode({ dictCode: 'exception_log' });
14   -}
15   -formatTextFunc();
16 7 // 表格数据
17 8 export const columns: BasicColumn[] = [
18 9 {
... ... @@ -21,24 +12,6 @@ export const columns: BasicColumn[] = [
21 12 width: 120,
22 13 },
23 14 {
24   - title: '客户名称',
25   - dataIndex: 'customerName',
26   - width: 120,
27   - },
28   - {
29   - title: '资源类型',
30   - dataIndex: 'entityType',
31   - width: 180,
32   - format: (_, record) => {
33   - const text = formatText.find((f) => {
34   - if (f.itemValue == record.entityType) {
35   - return f.itemText;
36   - }
37   - });
38   - return text?.itemText;
39   - },
40   - },
41   - {
42 15 title: '资源名称',
43 16 dataIndex: 'entityName',
44 17 width: 180,
... ... @@ -49,19 +22,6 @@ export const columns: BasicColumn[] = [
49 22 width: 180,
50 23 },
51 24 {
52   - title: '操作类型',
53   - dataIndex: 'actionType',
54   - width: 180,
55   - format: (_, record) => {
56   - const text = actionTypeText.find((f) => {
57   - if (f.itemValue == record.actionType) {
58   - return f.itemText;
59   - }
60   - });
61   - return text?.itemText;
62   - },
63   - },
64   - {
65 25 title: '操作状态',
66 26 dataIndex: 'actionStatus',
67 27 width: 180,
... ... @@ -116,22 +76,7 @@ export const formSchema: FormSchema[] = [
116 76 disabled: true,
117 77 },
118 78 },
119   - {
120   - field: 'customerName',
121   - label: '客户名称',
122   - component: 'Input',
123   - componentProps: {
124   - disabled: true,
125   - },
126   - },
127   - {
128   - field: 'entityType',
129   - label: '资源类型',
130   - component: 'Input',
131   - componentProps: {
132   - disabled: true,
133   - },
134   - },
  79 +
135 80 {
136 81 field: 'entityName',
137 82 label: '资源名称',
... ... @@ -150,14 +95,6 @@ export const formSchema: FormSchema[] = [
150 95 },
151 96 },
152 97 {
153   - field: 'actionType',
154   - label: '操作类型',
155   - component: 'Input',
156   - componentProps: {
157   - disabled: true,
158   - },
159   - },
160   - {
161 98 field: 'actionStatus',
162 99 label: '操作状态',
163 100 component: 'Input',
... ...