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

6
src/views/borrow/borrow.vue

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

26
src/views/borrow/returned.vue

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

Loading…
Cancel
Save