From c1d8f9850fe4271664306717cacd005c42ec5550 Mon Sep 17 00:00:00 2001
From: x_ying <2438792676@qq.com>
Date: Mon, 18 Jul 2022 17:01:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=20=E8=B7=A8=E9=A1=B5=E5=A4=9A=E9=80=89=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/archivesManage/outInStorage.js | 9 +++++-
.../outInStorage/outInHistory/index.vue | 28 +++++++++++++++----
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/src/api/archivesManage/outInStorage.js b/src/api/archivesManage/outInStorage.js
index 39a75e2..a91ac3e 100644
--- a/src/api/archivesManage/outInStorage.js
+++ b/src/api/archivesManage/outInStorage.js
@@ -32,4 +32,11 @@ export function grant(params) {
method: 'post'
})
}
-export default { initCaseByArchives, isOccupy, collect, grant }
+// 出入库记录 导出
+export function exportStorageLogList(params) {
+ return request({
+ url: 'api/storage/exportStorageLogList' + '?' + qs.stringify(params, { indices: false }),
+ method: 'get'
+ })
+}
+export default { initCaseByArchives, isOccupy, collect, grant, exportStorageLogList }
diff --git a/src/views/archivesManage/outInStorage/outInHistory/index.vue b/src/views/archivesManage/outInStorage/outInHistory/index.vue
index 09ae672..f459c09 100644
--- a/src/views/archivesManage/outInStorage/outInHistory/index.vue
+++ b/src/views/archivesManage/outInStorage/outInHistory/index.vue
@@ -2,7 +2,7 @@
- 导出
+ 导出
@@ -34,12 +34,13 @@
height="calc(100vh - 357px)"
:data="crud.data"
:loading="crud.downloadLoading"
+ :row-key="getRowKey"
:cell-class-name="cell"
@row-click="clickRowHandler"
@row-dblclick="handleDbClick"
@selection-change="selectionChangeHandler"
>
-
+
@@ -73,8 +74,10 @@ import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
// import crudOperation from '@crud/CRUD.operation'
-import { exportFile } from '@/utils/index'
+// import { exportFile } from '@/utils/index'
import detailDialog from '../module/detailDialog.vue'
+// import { mapGetters } from 'vuex'
+import { initCaseByArchives } from '@/api/archivesManage/outInStorage'
// exportFile内容
export default {
@@ -97,7 +100,7 @@ export default {
data() {
return {
permission: {
- download: ['admin', 'permission:download']
+ download: ['admin', 'outInHistory:download']
},
msgVisible: false,
selections: [],
@@ -120,6 +123,11 @@ export default {
]
}
},
+ // computed: {
+ // ...mapGetters([
+ // 'baseApi'
+ // ])
+ // },
created() {
this.getData()
},
@@ -143,9 +151,12 @@ export default {
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) // 单击选中
},
+ getRowKey(row) {
+ return row.id
+ },
selectionChangeHandler(val) {
this.selections = val
- // console.log(val, '-----')
+ console.log(this.selections, '-----')
},
// 单元格样式
cell({ row, columnIndex }) {
@@ -162,7 +173,12 @@ export default {
// 导出
handleExport() {
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
},
// 双击 详情