|
|
@ -43,22 +43,13 @@ const defaultCrud = presenter(CRUD({ |
|
|
|
url: '/borrowing/list', |
|
|
|
orderBy: ['id asc'], |
|
|
|
query: { |
|
|
|
state: true |
|
|
|
state: false |
|
|
|
} |
|
|
|
})) |
|
|
|
|
|
|
|
// 设置初始form |
|
|
|
const defaultForm = form({ |
|
|
|
|
|
|
|
}) |
|
|
|
// 自定义模板内容 |
|
|
|
const PrefixPlusText = { |
|
|
|
props: ['value', 'functions'], |
|
|
|
template: ` |
|
|
|
<el-tag v-if="functions(value) === '未归还'" type="danger" effect="dark"><span v-html="functions(value)"></span></el-tag> |
|
|
|
<el-tag v-else type="success" effect="dark"><span v-html="functions(value)"></span></el-tag> |
|
|
|
` |
|
|
|
} |
|
|
|
export default { |
|
|
|
name: 'InstrumentList', |
|
|
|
components: { Pagination, CustomTable }, |
|
|
@ -67,19 +58,12 @@ export default { |
|
|
|
return { |
|
|
|
colConfigs: [ |
|
|
|
{ prop: 'baogaobianhao', label: '报告编号', align: 'center' }, |
|
|
|
{ prop: 'jieyueren', label: '借阅人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ prop: 'jieyueTime', label: '借阅时间', align: 'center' }, |
|
|
|
{ prop: 'createBy', label: '创建人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ prop: 'createTime', label: '创建时间', align: 'center' }, |
|
|
|
{ prop: 'guihuanTime', label: '归还时间', align: 'center' }, |
|
|
|
{ prop: 'jieyueTime', label: '借阅时间', align: 'center' }, |
|
|
|
{ prop: 'jieyueren', label: '借阅人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ prop: 'state', label: '借阅状态', align: 'center', component: PrefixPlusText }, |
|
|
|
{ prop: 'updateBy', label: '修改人', align: 'center' }, |
|
|
|
{ |
|
|
|
prop: 'updateTime', |
|
|
|
label: '更新时间', |
|
|
|
align: 'center', |
|
|
|
formatter: this.formatter.formatterDepartmentName |
|
|
|
}, |
|
|
|
{ prop: 'updateBy', label: '更新人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ prop: 'updateTime', label: '更新时间', align: 'center' }, |
|
|
|
{ slot: 'operation' } |
|
|
|
], |
|
|
|
permission: { |
|
|
|