|
@@ -42,7 +42,8 @@ const header = (props) => {
|
42
|
42
|
// content = data.records[0]
|
43
|
43
|
console.log('json: ', eval('(' + data.records[0].content + ')'))
|
44
|
44
|
setContent(eval('(' + data.records[0].content + ')'))
|
45
|
|
- setColumns(tableTitle(eval('(' + data.records[0].content + ')')))
|
|
45
|
+ setColumns(tableTitle(eval('(' + data.records[0].content + ')'), data.records[0].createDate))
|
|
46
|
+
|
46
|
47
|
}
|
47
|
48
|
else {
|
48
|
49
|
setDatas([])
|
|
@@ -71,8 +72,8 @@ const header = (props) => {
|
71
|
72
|
})
|
72
|
73
|
}
|
73
|
74
|
|
74
|
|
- function tableTitle (data) {
|
75
|
|
- return data.map((item) => {
|
|
75
|
+ function tableTitle (data, createDate) {
|
|
76
|
+ const tempData = data.map((item) => {
|
76
|
77
|
const col = {
|
77
|
78
|
title: item.label,
|
78
|
79
|
dataIndex: item.key,
|
|
@@ -80,6 +81,13 @@ const header = (props) => {
|
80
|
81
|
}
|
81
|
82
|
return col
|
82
|
83
|
})
|
|
84
|
+
|
|
85
|
+ return tempData.concat({
|
|
86
|
+ title: '提交时间',
|
|
87
|
+ dataIndex: 'createDate',
|
|
88
|
+ key: 'createDate',
|
|
89
|
+ render: () => moment(createDate).format('YYYY-MM-DD HH:mm:ss'),
|
|
90
|
+ })
|
83
|
91
|
}
|
84
|
92
|
|
85
|
93
|
|