From 7222446fdf82e0ee7f4ff8f9d9f1ea288a100073 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Mon, 13 Jan 2025 17:29:21 +0800 Subject: [PATCH] 0113 --- package.json | 2 +- src/layout/components/Sidebar/Logo.vue | 2 +- src/settings.js | 2 +- src/views/components/bookSwiper.vue | 29 +- src/views/home.vue | 11 +- src/views/login.vue | 2 +- .../visualCheck/bookstore/book/index.vue | 3 +- .../bookstore/collectionLocation/index.vue | 6 +- .../checkManage/dataScreening/girdList.vue | 311 ++++++++---------- .../checkManage/dataScreening/index.vue | 81 ++--- .../dataScreening/module/export.vue | 123 +++++++ .../checkManage/dataScreening/module/form.vue | 8 +- .../checkManage/dataScreening/regionsList.vue | 26 +- .../checkManage/dataScreening/shelfList.vue | 16 +- .../checkManage/upDownLog/index.vue | 8 +- 15 files changed, 349 insertions(+), 281 deletions(-) create mode 100644 src/views/visualCheck/checkManage/dataScreening/module/export.vue diff --git a/package.json b/package.json index 5073bd1..c5aabca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "library-management-system", "version": "1.0.0", - "description": "图书馆综合管理系统", + "description": "AI视觉盘点系统", "license": "", "scripts": { "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 166b49e..31a2965 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -2,7 +2,7 @@ diff --git a/src/settings.js b/src/settings.js index 1890d72..8135300 100644 --- a/src/settings.js +++ b/src/settings.js @@ -2,7 +2,7 @@ module.exports = { /** * @description 网站标题 */ - title: '图书馆综合管理系统', + title: 'AI视觉盘点系统', /** * @description 是否显示 tagsView */ diff --git a/src/views/components/bookSwiper.vue b/src/views/components/bookSwiper.vue index 8fe8dca..d53c206 100644 --- a/src/views/components/bookSwiper.vue +++ b/src/views/components/bookSwiper.vue @@ -74,7 +74,6 @@ export default { name: 'BookSwiper', components: { swiper, swiperSlide }, props: { - }, data() { const _this = this @@ -94,7 +93,9 @@ export default { freeMode: true }, tabListData: [{ name: '热门图书' }, { name: '热门架位' }], - bookList: [] + bookList: [], + swiperParams: {}, + swiperShelfParams: {} } }, computed: { @@ -109,11 +110,11 @@ export default { } }, mounted() { - if (this.swiperActiveIndex === 0) { - this.getInitHotBookList() - } else { - this.getInitHotShelfList() - } + // if (this.swiperActiveIndex === 0) { + // this.getInitHotBookList() + // } else { + // this.getInitHotShelfList() + // } }, methods: { handleSlidClickFun(index) { @@ -131,13 +132,15 @@ export default { this.swiperTitle.slideTo(index, 500, false) }, getInitHotBookList() { - FetchInitHotBookList().then(res => { + const params = this.swiperParams + FetchInitHotBookList(params).then(res => { this.bookList = res }).catch(() => { }) }, getInitHotShelfList() { - FetchInitHotShelfList().then(res => { + const params = this.swiperShelfParams + FetchInitHotShelfList(params).then(res => { this.bookList = res }).catch(() => { }) @@ -167,12 +170,4 @@ export default { } } } - -.swiper-content{ - // height: 544px; -} -.swiper-slide-content { - // padding: 0 10px; - // margin: 0 10px 0 0; -} diff --git a/src/views/home.vue b/src/views/home.vue index f82cc8f..ad03f3d 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -93,7 +93,7 @@
2024-11-28 09:46
- +
@@ -190,6 +190,15 @@ export default { this.getSystemInfo() this.getStockLog() this.handleInitStockInfo() + this.$nextTick(() => { + this.$refs.bookSwiperRefs.swiperParams = {} + this.$refs.bookSwiperRefs.swiperShelfParams = {} + if (this.$refs.bookSwiperRefs.swiperActiveIndex === 0) { + this.$refs.bookSwiperRefs.getInitHotBookList() + } else { + this.$refs.bookSwiperRefs.getInitHotShelfList() + } + }) }, mounted() { // const _this = this diff --git a/src/views/login.vue b/src/views/login.vue index cea8323..a48510a 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -9,7 +9,7 @@ label-width="0px" class="login-form" > -

图书馆综合管理系统

+

AI视觉盘点系统

你是否还要继续?', '提示', { + this.$confirm('此操作将删除当前所选图书你是否还要继续?', '提示', { confirmButtonText: '继续', cancelButtonText: '取消', type: 'warning', dangerouslyUseHTMLString: true }).then(() => { this.crud.delAllLoading = true + // bookRecNos const ids = [] datas.forEach(val => { ids.push(val.bookRecNo) diff --git a/src/views/visualCheck/bookstore/collectionLocation/index.vue b/src/views/visualCheck/bookstore/collectionLocation/index.vue index d1ddf44..37d5944 100644 --- a/src/views/visualCheck/bookstore/collectionLocation/index.vue +++ b/src/views/visualCheck/bookstore/collectionLocation/index.vue @@ -142,7 +142,7 @@ export default { [CRUD.HOOK.afterSubmit]() { }, toDelete(datas) { - this.$confirm('此操作将删除当前所选机构你是否还要继续?', '提示', { + this.$confirm('此操作将删除当前所选馆藏地你是否还要继续?', '提示', { confirmButtonText: '继续', cancelButtonText: '取消', type: 'warning', @@ -154,8 +154,8 @@ export default { ids.push(val.id) }) console.log(ids) - crudBookBasice.del(ids).then(() => { - this.$message({ message: '删除成功', type: 'success', offset: 8 }) + crudBookBasice.del(ids).then((res) => { + this.$message({ message: res, type: 'success', offset: 8 }) this.crud.delAllLoading = false this.crud.refresh() }).catch(err => { diff --git a/src/views/visualCheck/checkManage/dataScreening/girdList.vue b/src/views/visualCheck/checkManage/dataScreening/girdList.vue index 260cdd2..b0e8add 100644 --- a/src/views/visualCheck/checkManage/dataScreening/girdList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/girdList.vue @@ -25,7 +25,6 @@
    -
  • {{ item.name }}
  • @@ -35,8 +34,8 @@

    错架:1

    在架:20

--> -
- 最后更新时间: +
+ 最后更新时间: {{ checkDateLine[0].endTime }}
@@ -65,7 +64,8 @@ @@ -79,10 +80,11 @@ import defaultImg from '@/assets/images/system/default-img.jpg' import bookSwiper from '@/views/components/bookSwiper.vue' import CanvasPreview from '@/views/components/canvasPreview.vue' import eForm from './module/form' +import exportForm from './module/export' export default { name: 'DataScreening', - components: { crudOperation, bookSwiper, CanvasPreview, eForm }, + components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm }, cruds() { return CRUD({ title: '数据总览', url: 'api/libraryFloor/initLibraryFloorList', crudMethod: { ...crudStockTaskLog }, sort: [], optShow: { add: false, @@ -126,7 +128,9 @@ export default { add: ['admin', 'floor:add'], edit: ['admin', 'floor:edit'], del: ['admin', 'floor:del'] - } + }, + swiperParams: {}, + swiperShelfParams: {} } }, computed: { @@ -156,63 +160,30 @@ export default { 'floorId': this.floorOptions[this.tabIndex].id } this.handleInitStockInfo(params) + + this.$nextTick(() => { + this.$refs.bookSwiperRefs.swiperParams = { + 'floorId': this.floorOptions[this.tabIndex].id + } + this.$refs.bookSwiperRefs.swiperShelfParams = { + 'floorId': this.floorOptions[this.tabIndex].id + } + if (this.$refs.bookSwiperRefs.swiperActiveIndex === 0) { + this.$refs.bookSwiperRefs.getInitHotBookList() + } else { + this.$refs.bookSwiperRefs.getInitHotShelfList() + } + }) }, toAdd(type) { this.$refs.eform.formVisible = true this.$refs.eform.setData(type) this.$refs.eform.form.stockRegion = '全部区域' }, - // changeActiveTab(index) { - // this.prewLoading = true - // if (this.$refs.previewRefs.canvasPreview.lowerCanvasEl) { - // this.$refs.previewRefs.canvasPreview.clear() - // this.$refs.previewRefs.canvasPreview.dispose() - // } - // this.allCoverData = [] - // this.tabIndex = index - // const params = { - // 'floorId': this.floorOptions[index].id - // } - // FetchInitLibraryRegionList(params).then(res => { - // this.allCoverData = res.content - // if (this.floorOptions[index].floorMap) { - // this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.floorOptions[index].floorMap - // } else { - // this.imageUrl = this.defaultImg - // } - - // if (this.allCoverData.length !== 0) { - // this.currentMarkData = this.allCoverData[0] - // const parsedSignPoints = this.allCoverData.map(item => { - // const signPoint = item.signPoint ? JSON.parse(item.signPoint) : null - // return { - // id: item.id, - // name: item.regionName, - // floorName: item.floorName, - // floorId: item.floorId, - // pointInfo: signPoint ? signPoint.pointInfo[0].pointInfo : null - // } - // }) - // const imgInfo = JSON.parse(this.allCoverData[0].signPoint).imgInfo - - // const result = { - // pointInfo: parsedSignPoints, - // imgInfo: imgInfo - // } - // console.log('result', result) - // this.$nextTick(() => { - // this.$refs.previewRefs.initCanvasPreview(result, this.tabIndex) - // }) - // } else { - // this.currentMarkData = {} - // setTimeout(() => { - // this.prewLoading = false - // }, 500) - // } - // }).catch(() => { - // }) - // }, - + doExport(type) { + this.$refs.exportform.formExportVisible = true + this.$refs.exportform.type = 1 + }, async getInitStockInfo(data) { const promises = data.map(item => { const params = { diff --git a/src/views/visualCheck/checkManage/dataScreening/module/export.vue b/src/views/visualCheck/checkManage/dataScreening/module/export.vue new file mode 100644 index 0000000..a4d9f62 --- /dev/null +++ b/src/views/visualCheck/checkManage/dataScreening/module/export.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/views/visualCheck/checkManage/dataScreening/module/form.vue b/src/views/visualCheck/checkManage/dataScreening/module/form.vue index 79105ea..6323de3 100644 --- a/src/views/visualCheck/checkManage/dataScreening/module/form.vue +++ b/src/views/visualCheck/checkManage/dataScreening/module/form.vue @@ -24,7 +24,7 @@
@@ -44,6 +44,7 @@ export default { ], data() { return { + saveLoading: false, formVisible: false, rules: { stockBill: [ @@ -126,9 +127,9 @@ export default { handleComfiredEditing() { this.$refs['form'].validate((valid) => { if (valid) { + this.saveLoading = true delete this.form.stockGridNumName delete this.form.stockTypeName - console.log('this.form', this.form) crudStockTaskLog.add(this.form).then((res) => { if (res.code !== 500) { this.$message({ message: '新增盘点成功', type: 'success', offset: 8 }) @@ -136,9 +137,10 @@ export default { this.$message({ message: res.message, type: 'error', offset: 8 }) } this.handleCloseForm() - // this.$emit('refresh') + this.saveLoading = false }).catch(err => { console.log(err) + this.saveLoading = false }) } else { return false diff --git a/src/views/visualCheck/checkManage/dataScreening/regionsList.vue b/src/views/visualCheck/checkManage/dataScreening/regionsList.vue index 76952c8..ec9c991 100644 --- a/src/views/visualCheck/checkManage/dataScreening/regionsList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/regionsList.vue @@ -20,7 +20,7 @@ @@ -78,10 +79,11 @@ import defaultImg from '@/assets/images/system/default-img.jpg' import bookSwiper from '@/views/components/bookSwiper.vue' import CanvasPreview from '@/views/components/canvasPreview.vue' import eForm from './module/form' +import exportForm from './module/export' export default { name: 'DataScreening', - components: { crudOperation, bookSwiper, CanvasPreview, eForm }, + components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm }, cruds() { return CRUD({ title: '区域总览', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: { add: false, @@ -130,7 +132,9 @@ export default { edit: ['admin', 'floor:edit'], del: ['admin', 'floor:del'] }, - baseStockDataAllShelf: [] + baseStockDataAllShelf: [], + swiperParams: {}, + swiperShelfParams: {} } }, computed: { @@ -174,6 +178,16 @@ export default { 'regionId': this.regionOptions[this.tabIndex].id } this.handleInitStockInfo(params) + + this.$nextTick(() => { + this.$refs.bookSwiperRefs.swiperParams = params + this.$refs.bookSwiperRefs.swiperShelfParams = params + if (this.$refs.bookSwiperRefs.swiperActiveIndex === 0) { + this.$refs.bookSwiperRefs.getInitHotBookList() + } else { + this.$refs.bookSwiperRefs.getInitHotShelfList() + } + }) }, // 提交前的验证 [CRUD.HOOK.afterValidateCU](crud) { @@ -185,6 +199,10 @@ export default { this.$refs.eform.form.stockRegion = this.regionOptions[this.tabIndex].floorName + this.regionOptions[this.tabIndex].regionName this.$refs.eform.setData(type) }, + doExport(type) { + this.$refs.exportform.formExportVisible = true + this.$refs.exportform.type = 2 + }, async getInitStockInfo(data) { const promises = data.map(item => { const params = { diff --git a/src/views/visualCheck/checkManage/dataScreening/shelfList.vue b/src/views/visualCheck/checkManage/dataScreening/shelfList.vue index d8eda7f..5c42704 100644 --- a/src/views/visualCheck/checkManage/dataScreening/shelfList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/shelfList.vue @@ -27,7 +27,7 @@ @@ -126,10 +127,11 @@ import CRUD, { presenter, header, crud } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' import { mapGetters } from 'vuex' import eForm from './module/form' +import exportForm from './module/export' export default { name: 'DataScreening', - components: { crudOperation, eForm }, + components: { crudOperation, eForm, exportForm }, cruds() { return CRUD({ title: '架位总览', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: { add: false, @@ -316,7 +318,6 @@ export default { }) }, changeShelfGetGrid(val) { - console.log('val', val) this.initData(val) this.getInitStockInfo(val) }, @@ -326,6 +327,10 @@ export default { this.$refs.eform.form.stockRegion = this.floorName + this.regionName + this.bookShelfDetails.shelfName this.$refs.eform.setData(type) }, + doExport(type) { + this.$refs.exportform.formExportVisible = true + this.$refs.exportform.type = 3 + }, removeAreaPrefix(gridNames) { return gridNames.replace(/\d*区|\d*层/g, '') }, @@ -440,8 +445,6 @@ export default { this.getInitShelfGridByShelfId(this.layerVal.id, index + 1) }, handleCellCurrent(item, index) { - console.log('index', index) - console.log('item', item) this.cellIndex = index this.cellInfo = { id: item.id, @@ -483,7 +486,6 @@ export default { for (let i = 0; i < this.booShelfGrid.length; i++) { const columnIndex = i % this.rackNum // 如果是最后一列(第5列) - console.log('this.booShelfGrid.length', this.booShelfGrid.length) if (this.rackNum !== 1) { if (columnIndex === this.rackNum - 1) { lastColumnIndexes.push(i) @@ -510,8 +512,6 @@ export default { 'shelfId': this.bookShelfDetails.id, 'gridShelf': this.booShelfGrid[columnIndex].gridShelf } - console.log(params) - // this.handleInitStockInfo(params) FetchInitStockInfo(params).then(res => { this.itemStockData = res }).catch(() => { diff --git a/src/views/visualCheck/checkManage/upDownLog/index.vue b/src/views/visualCheck/checkManage/upDownLog/index.vue index 6ed6269..db863d6 100644 --- a/src/views/visualCheck/checkManage/upDownLog/index.vue +++ b/src/views/visualCheck/checkManage/upDownLog/index.vue @@ -39,7 +39,9 @@ > @@ -51,8 +53,8 @@ - - + +