Browse Source

优化调整借阅报告页面

master
李磊 3 years ago
parent
commit
b68b035631
  1. 19
      src/views/borrow/borrow-history.vue
  2. 6
      src/views/borrow/borrow.vue
  3. 26
      src/views/borrow/returned.vue

19
src/views/borrow/borrow-history.vue

@ -7,6 +7,7 @@
v-model="query.jieyueTime"
type="date"
placeholder="选择借阅日期"
value-format="yyyy-MM-dd"
@change="crud.toQuery"
/>
<el-select
@ -62,7 +63,7 @@ const defaultCrud = presenter(
url: '/borrowing/list',
orderBy: ['id asc'],
query: {
state: false
state: true
}
})
)
@ -114,19 +115,13 @@ export default {
return {
colConfigs: [
{ prop: 'baogaobianhao', label: '报告编号', align: 'center' },
{ prop: 'jieyueren', label: '借阅人', align: 'center', formatter: this.formatter.getChineseName },
{ prop: 'jieyueTime', label: '借阅时间', align: 'center' },
{ prop: 'guihuanTime', 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' },
{ 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' }
],
permission: {
add: ['instrument:add'],

6
src/views/borrow/borrow.vue

@ -53,13 +53,13 @@
<el-table-column slot="operation" align="center" width="100" label="操作">
<template slot-scope="scope">
<el-button v-permission="permission.edit" type="text" icon="edit" @click="editFn(scope.row)">
修改
借阅
</el-button>
</template>
</el-table-column>
</CustomTable>
<pagination />
<el-dialog :before-close="crud.cancelCU" :visible="visible" :title="crud.status.title">
<el-dialog :visible.sync="visible" :title="crud.status.title">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" inline>
<el-form-item label="报告编号:" prop="baogaobianhao">
<el-input v-model="form.baogaobianhao" placeholder="请输入报告编号" clearable type="text" />
@ -134,7 +134,7 @@ export default {
],
permission: {
add: ['instrument:add'],
edit: ['instrument:update'],
edit: ['borrow:jybg-list:update'],
del: ['instrument:delete']
},
options: [],

26
src/views/borrow/returned.vue

@ -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: {

Loading…
Cancel
Save