config.js
2.7 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
//组件参数数据
export const componentsData = {
};
// 搜索model
export const tshjSearchModel = {
'bookIdList': null,
'createdBy': null
};
// 表格展示配置
export const tableColumns = function() {
return [
{
text: '图书',
field: 'bookId',
minWidth: 200,
render: (h, param) => {
if(param.row.bookId && param.row.bookIdEntity){
const text = param.row.bookIdEntity.code;
return h('elLink', {
props: {
type: 'primary'
},
on: {
click: () => {
this.handleOpt('VIEW', param.row);
}
}
}, text);
}
return '--';
},
align: 'left'
},
{
text: '归还时间',
field: 'returnTime',
width: 160,
sortable: true,
render: (h, param) => {
if(param.row.returnTime){
const text = param.row.returnTime.substr(0,10);
return text;
}
return '--';
},
align: 'left'
},
{
text: '创建人',
field: 'createdByName',
align: 'left',
width: 100
},
{
text: '创建时间',
field: 'createdAt',
width: 160,
sortable: true,
render: (h, param) => {
if(param.row.createdAt){
const text = param.row.createdAt.substr(0,16);
return text;
}
return '--';
},
align: 'left'
},
{
field: 'opt',
fixed: 'right',
text: '操作',
width: 100,
render: (h, param) => {
const row = param.row;
const optArr = [];
const deleteBtn = h('QgButton', {
props: {
toolTip: '还书',
type: 'text',
icon: 'el-icon-delete'
},
on: {
click: () => {
this.handleOpt('DELETE', row);
}
}
});
optArr.push(deleteBtn);
return h('div', optArr, '');
}
}
];
};
// 表单对象
export const tshjModel = {
bookId:null,
returnTime:null
};