|
|
@ -72,7 +72,7 @@ import headSlot from '../components/headSlot.vue' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import CRUD, { presenter } from '@crud/crud' |
|
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
import data1 from '../data1.json' |
|
|
|
import data3 from '../data3.json' |
|
|
|
import archiveDetail from './module/archiveDetail.vue' |
|
|
|
|
|
|
|
export default { |
|
|
@ -105,7 +105,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
this.tableData = data1.rows |
|
|
|
this.tableData = data3.rows |
|
|
|
}, |
|
|
|
selectionChangeHandler(val) { |
|
|
|
this.selections = val |
|
|
@ -122,9 +122,9 @@ export default { |
|
|
|
this.returnAgainVisible = false |
|
|
|
}, |
|
|
|
cell({ row, columnIndex }) { |
|
|
|
if (row.lendStatus === '待借' && columnIndex === 11) { |
|
|
|
if (row.lendStatus === '逾期' && columnIndex === 11) { |
|
|
|
return 'no-lend' |
|
|
|
} else if (row.lendStatus === '已借' && columnIndex === 11) { |
|
|
|
} else if (row.lendStatus === '待还' && columnIndex === 11) { |
|
|
|
return 'have-lend' |
|
|
|
} else if (row.lendStatus === '' && columnIndex === 11) { |
|
|
|
return 'other-lend' |
|
|
@ -133,9 +133,17 @@ export default { |
|
|
|
// 档案详情 |
|
|
|
handleDbClick(row) { |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.$refs.archiveDetailDom.detailVisible = true |
|
|
|
const arr = data1.rows.filter(item => item.docNum === row.docNum) |
|
|
|
this.$refs.archiveDetailDom.rowData = arr |
|
|
|
const archiveDetailDom = this.$refs.archiveDetailDom |
|
|
|
archiveDetailDom.detailVisible = true |
|
|
|
const arr = data3.rows.filter(item => item.docNum === row.docNum) |
|
|
|
archiveDetailDom.rowData = arr |
|
|
|
// 借阅状态样式类名 |
|
|
|
if (arr[0].lendStatus === '待还') { |
|
|
|
archiveDetailDom.classLend = 'have-lend' |
|
|
|
} else if (arr[0].lendStatus === '逾期') { |
|
|
|
archiveDetailDom.classLend = 'no-lend' |
|
|
|
} |
|
|
|
console.log(archiveDetailDom.classLend) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|