|
@ -43,22 +43,13 @@ const defaultCrud = presenter(CRUD({ |
|
|
url: '/borrowing/list', |
|
|
url: '/borrowing/list', |
|
|
orderBy: ['id asc'], |
|
|
orderBy: ['id asc'], |
|
|
query: { |
|
|
query: { |
|
|
state: true |
|
|
state: false |
|
|
} |
|
|
} |
|
|
})) |
|
|
})) |
|
|
|
|
|
|
|
|
// 设置初始form |
|
|
// 设置初始form |
|
|
const defaultForm = 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 { |
|
|
export default { |
|
|
name: 'InstrumentList', |
|
|
name: 'InstrumentList', |
|
|
components: { Pagination, CustomTable }, |
|
|
components: { Pagination, CustomTable }, |
|
@ -67,19 +58,12 @@ export default { |
|
|
return { |
|
|
return { |
|
|
colConfigs: [ |
|
|
colConfigs: [ |
|
|
{ prop: 'baogaobianhao', label: '报告编号', align: 'center' }, |
|
|
{ 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: 'createBy', label: '创建人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
{ prop: 'createTime', label: '创建时间', align: 'center' }, |
|
|
{ prop: 'createTime', label: '创建时间', align: 'center' }, |
|
|
{ prop: 'guihuanTime', label: '归还时间', align: 'center' }, |
|
|
{ prop: 'updateBy', label: '更新人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
{ prop: 'jieyueTime', label: '借阅时间', align: 'center' }, |
|
|
{ prop: 'updateTime', 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 |
|
|
|
|
|
}, |
|
|
|
|
|
{ slot: 'operation' } |
|
|
{ slot: 'operation' } |
|
|
], |
|
|
], |
|
|
permission: { |
|
|
permission: { |
|
|