|
@ -2,7 +2,7 @@ |
|
|
<div> |
|
|
<div> |
|
|
<div class="head-container"> |
|
|
<div class="head-container"> |
|
|
<!-- <crudOperation /> --> |
|
|
<!-- <crudOperation /> --> |
|
|
<el-button v-permission="permission.download" :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="handleExport">导出</el-button> |
|
|
|
|
|
|
|
|
<el-button v-permission="permission.download" :loading="crud.downloadLoading" :disabled="!selections.length" size="mini" icon="el-icon-download" @click="handleExport">导出</el-button> |
|
|
<el-select v-model="storageType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery"> |
|
|
<el-select v-model="storageType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery"> |
|
|
<el-option v-for="item in storageTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
<el-option v-for="item in storageTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
@ -34,12 +34,13 @@ |
|
|
height="calc(100vh - 357px)" |
|
|
height="calc(100vh - 357px)" |
|
|
:data="crud.data" |
|
|
:data="crud.data" |
|
|
:loading="crud.downloadLoading" |
|
|
:loading="crud.downloadLoading" |
|
|
|
|
|
:row-key="getRowKey" |
|
|
:cell-class-name="cell" |
|
|
:cell-class-name="cell" |
|
|
@row-click="clickRowHandler" |
|
|
@row-click="clickRowHandler" |
|
|
@row-dblclick="handleDbClick" |
|
|
@row-dblclick="handleDbClick" |
|
|
@selection-change="selectionChangeHandler" |
|
|
@selection-change="selectionChangeHandler" |
|
|
> |
|
|
> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
|
|
|
|
<el-table-column type="selection" :reserve-selection="true" width="55" /> |
|
|
<el-table-column type="index" label="序号" align="center" width="80" /> |
|
|
<el-table-column type="index" label="序号" align="center" width="80" /> |
|
|
<el-table-column prop="storageType" label="状态" align="center" width="90"> |
|
|
<el-table-column prop="storageType" label="状态" align="center" width="90"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
@ -73,8 +74,10 @@ import rrOperation from '@crud/RR.operation' |
|
|
import CRUD, { presenter, crud } from '@crud/crud' |
|
|
import CRUD, { presenter, crud } from '@crud/crud' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
// import crudOperation from '@crud/CRUD.operation' |
|
|
// import crudOperation from '@crud/CRUD.operation' |
|
|
import { exportFile } from '@/utils/index' |
|
|
|
|
|
|
|
|
// import { exportFile } from '@/utils/index' |
|
|
import detailDialog from '../module/detailDialog.vue' |
|
|
import detailDialog from '../module/detailDialog.vue' |
|
|
|
|
|
// import { mapGetters } from 'vuex' |
|
|
|
|
|
import { initCaseByArchives } from '@/api/archivesManage/outInStorage' |
|
|
|
|
|
|
|
|
// exportFile内容 |
|
|
// exportFile内容 |
|
|
export default { |
|
|
export default { |
|
@ -97,7 +100,7 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
permission: { |
|
|
permission: { |
|
|
download: ['admin', 'permission:download'] |
|
|
|
|
|
|
|
|
download: ['admin', 'outInHistory:download'] |
|
|
}, |
|
|
}, |
|
|
msgVisible: false, |
|
|
msgVisible: false, |
|
|
selections: [], |
|
|
selections: [], |
|
@ -120,6 +123,11 @@ export default { |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// computed: { |
|
|
|
|
|
// ...mapGetters([ |
|
|
|
|
|
// 'baseApi' |
|
|
|
|
|
// ]) |
|
|
|
|
|
// }, |
|
|
created() { |
|
|
created() { |
|
|
this.getData() |
|
|
this.getData() |
|
|
}, |
|
|
}, |
|
@ -143,9 +151,12 @@ export default { |
|
|
clickRowHandler(row) { |
|
|
clickRowHandler(row) { |
|
|
this.$refs.table.toggleRowSelection(row) // 单击选中 |
|
|
this.$refs.table.toggleRowSelection(row) // 单击选中 |
|
|
}, |
|
|
}, |
|
|
|
|
|
getRowKey(row) { |
|
|
|
|
|
return row.id |
|
|
|
|
|
}, |
|
|
selectionChangeHandler(val) { |
|
|
selectionChangeHandler(val) { |
|
|
this.selections = val |
|
|
this.selections = val |
|
|
// console.log(val, '-----') |
|
|
|
|
|
|
|
|
console.log(this.selections, '-----') |
|
|
}, |
|
|
}, |
|
|
// 单元格样式 |
|
|
// 单元格样式 |
|
|
cell({ row, columnIndex }) { |
|
|
cell({ row, columnIndex }) { |
|
@ -162,7 +173,12 @@ export default { |
|
|
// 导出 |
|
|
// 导出 |
|
|
handleExport() { |
|
|
handleExport() { |
|
|
this.crud.downloadLoading = true |
|
|
this.crud.downloadLoading = true |
|
|
exportFile(this.baseApi + '/api/storage/exportStorageLogList') |
|
|
|
|
|
|
|
|
// exportFile(this.baseApi + '/api/storage/exportStorageLogList') |
|
|
|
|
|
// console.log(this.baseApi) |
|
|
|
|
|
const params = this.selections.map(item => { return item.id }) |
|
|
|
|
|
initCaseByArchives(params).then(res => { |
|
|
|
|
|
console.log(res, '导出成功') |
|
|
|
|
|
}) |
|
|
this.crud.downloadLoading = false |
|
|
this.crud.downloadLoading = false |
|
|
}, |
|
|
}, |
|
|
// 双击 详情 |
|
|
// 双击 详情 |
|
|