From 67a42fa677f266ce27f328e27d5d7fcc731ecbfd Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 17 Jan 2025 16:37:18 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D/=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/manage.scss | 22 ++++ src/views/components/bookSwiper.vue | 2 +- src/views/components/canvasPreview.vue | 3 - src/views/components/checkSwiper.vue | 2 +- src/views/components/hkVideo.vue | 1 + src/views/components/upload.vue | 32 +++-- .../visualCheck/bookstore/book/index.vue | 8 +- .../bookstore/collection/index.vue | 2 +- .../checkManage/bookSearch/index.vue | 4 +- .../checkManage/dataScreening/girdList.vue | 69 +---------- .../checkManage/dataScreening/index.vue | 46 +++----- .../checkManage/dataScreening/regionsList.vue | 47 +++----- .../checkManage/dataScreening/shelfList.vue | 30 ++--- .../checkManage/paramSetting/index.vue | 110 +++++++++++++++++- .../checkManage/positionMixins/index.js | 2 +- .../statistic/reverseShelf/index.vue | 2 - .../checkManage/statistic/search.vue | 4 - .../visualCheck/venueDevice/area/index.vue | 10 +- .../venueDevice/bookshelf/index.vue | 4 +- .../visualCheck/venueDevice/device/index.vue | 4 - .../visualCheck/venueDevice/floor/index.vue | 6 +- 21 files changed, 221 insertions(+), 189 deletions(-) diff --git a/src/assets/styles/manage.scss b/src/assets/styles/manage.scss index 3675065..075963b 100644 --- a/src/assets/styles/manage.scss +++ b/src/assets/styles/manage.scss @@ -769,5 +769,27 @@ } } } +} +.swiper-title{ + font-size: 16px; + color: #545B65; + .swiper-wrapper{ + margin: 10px 0; + border-bottom: 1px solid #EDEFF3; + } +} +.swiper-slide-title { + width: auto !important; + margin-top: -10px; + margin-right: 20px; + cursor: pointer; + .tab-name { + padding: 10px; + &.active { + padding-bottom: 10px; + color: #0348F3; + border-bottom: 3px solid #0348F3; + } + } } \ No newline at end of file diff --git a/src/views/components/bookSwiper.vue b/src/views/components/bookSwiper.vue index 8999905..f60fd5b 100644 --- a/src/views/components/bookSwiper.vue +++ b/src/views/components/bookSwiper.vue @@ -34,7 +34,7 @@ :cleanup-styles-on-destroy="true" > diff --git a/src/views/components/canvasPreview.vue b/src/views/components/canvasPreview.vue index e27fb84..9d0a401 100644 --- a/src/views/components/canvasPreview.vue +++ b/src/views/components/canvasPreview.vue @@ -139,7 +139,6 @@ export default { }) // 处理多边形绘制回显操作 pointGroup.forEach(async(item, index) => { - console.log('item', item) if (item.pointInfo !== '') { const polygon = new fabric.Polygon(item.pointInfo, { id: item.id, @@ -176,7 +175,6 @@ export default { const timeDiff = currentTime - lastClickTime if (timeDiff <= doubleClickInterval) { - console.log('双击事件', e) lastClickTime = 0 const toReigonsData = { id: e.target.id, @@ -188,7 +186,6 @@ export default { regionName: e.target.regionName, floorName: e.target.floorName } - console.log('toReigonsData', toReigonsData) if (self.pagePreview === 'floor') { self.handleToRegions(toReigonsData, tabIndex) } else if (self.pagePreview === 'region') { diff --git a/src/views/components/checkSwiper.vue b/src/views/components/checkSwiper.vue index a4511fc..7dcb9a4 100644 --- a/src/views/components/checkSwiper.vue +++ b/src/views/components/checkSwiper.vue @@ -34,7 +34,7 @@ :cleanup-styles-on-destroy="true" > diff --git a/src/views/components/hkVideo.vue b/src/views/components/hkVideo.vue index 7adeef8..371aaf6 100644 --- a/src/views/components/hkVideo.vue +++ b/src/views/components/hkVideo.vue @@ -37,6 +37,7 @@ export default { mounted() { // video:需要绑定的video控件ID // 127.0.0.1:8000:启动webrtc-streamer的设备IP和端口,默认8000 + // eslint-disable-next-line no-undef this.webRtcServer = new WebRtcStreamer('video', location.protocol + '//' + this.camera_ip) // 需要查看的rtsp地址,根据自己的摄像头传入对应的rtsp地址即可。注意:视频编码格式必须是H264的,否则无法正常显示,编码格式可在摄像头的后台更改 this.webRtcServer.connect('rtsp://' + this.hkConfig.username + ':' + this.hkConfig.password + '@' + this.hkConfig.ip + ':' + this.hkConfig.port + '/h264/ch1/main/av_stream') diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue index 8d622fa..9fb5205 100644 --- a/src/views/components/upload.vue +++ b/src/views/components/upload.vue @@ -29,6 +29,10 @@ export default { labelName: { type: String, default: '' + }, + uploadType: { + type: String, + default: '' } }, data() { @@ -66,15 +70,27 @@ export default { const res = await this.getImgPx(fileBase64) this.imageUrl = fileBase64 this.px = res.width + 'px*' + res.height + 'px' - // 上传附件 - upload(this.baseApi + '/api/fileRelevant/uploadImg', this.file).then(res => { - console.log(res) - if (res.data.code === 200) { - this.filePath = res.data.data - this.$emit('childCover', res.data.data) + if (this.uploadType === 'book') { + // 上传附件 + upload(this.baseApi + '/api/fileRelevant/uploadBookImg', this.file).then(res => { + console.log(res) + if (res.data.code === 200) { + this.filePath = res.data.data + this.$emit('childCover', res.data.data) // this.uploadSave() - } - }) + } + }) + } else { + // 上传附件 + upload(this.baseApi + '/api/fileRelevant/uploadOtherImg', this.file).then(res => { + console.log(res) + if (res.data.code === 200) { + this.filePath = res.data.data + this.$emit('childCover', res.data.data) + // this.uploadSave() + } + }) + } } else { this.$message({ message: '只可上传图片', type: 'error', offset: 8 }) this.imageUrl = null diff --git a/src/views/visualCheck/bookstore/book/index.vue b/src/views/visualCheck/bookstore/book/index.vue index 3a56551..5c37465 100644 --- a/src/views/visualCheck/bookstore/book/index.vue +++ b/src/views/visualCheck/bookstore/book/index.vue @@ -61,7 +61,7 @@ - +

封面预览

@@ -91,7 +91,7 @@ @@ -196,7 +196,7 @@ export default { // 初始化编辑时候 [CRUD.HOOK.beforeToEdit](crud, form) { if (this.crud.form.bookCover) { - this.bookCover = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.crud.form.bookCover + this.bookCover = this.baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + this.crud.form.bookCover } else { this.bookCover = require('@/assets/images/cover-bg.png') } @@ -226,7 +226,7 @@ export default { console.log(value) if (value) { this.form.bookCover = value - this.bookCover = this.baseApi + '/api/fileRelevant/getImg?imgId=' + value + this.bookCover = this.baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + value } else { this.form.bookCover = null this.bookCover = null diff --git a/src/views/visualCheck/bookstore/collection/index.vue b/src/views/visualCheck/bookstore/collection/index.vue index 7b42fad..6f10455 100644 --- a/src/views/visualCheck/bookstore/collection/index.vue +++ b/src/views/visualCheck/bookstore/collection/index.vue @@ -390,7 +390,7 @@ export default { console.log(res) if (res) { this.crud.form.title = res.title - this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + res.bookCover + this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + res.bookCover } else { this.crud.form.title = null this.imageUrl = require('@/assets/images/system/default-img.jpg') diff --git a/src/views/visualCheck/checkManage/bookSearch/index.vue b/src/views/visualCheck/checkManage/bookSearch/index.vue index c1ffffe..c07a4ad 100644 --- a/src/views/visualCheck/checkManage/bookSearch/index.vue +++ b/src/views/visualCheck/checkManage/bookSearch/index.vue @@ -168,8 +168,8 @@
  • ISBN:{{ detailContent.isbn }}
  • 条码号:{{ detailContent.barcode }}
  • -
  • - + +
  • 简介:

    {{ detailContent.summary ? detailContent.summary :"暂无简介" }}

    • diff --git a/src/views/visualCheck/checkManage/dataScreening/girdList.vue b/src/views/visualCheck/checkManage/dataScreening/girdList.vue index b37c1cb..ee23176 100644 --- a/src/views/visualCheck/checkManage/dataScreening/girdList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/girdList.vue @@ -471,13 +471,9 @@ export default { 'grids': ids.join(',') } FetchInitBookDetailsByGrids(params).then(res => { - console.log('res', res) - console.log('666', this.shelfAllGridData) this.shelfAllGridData.forEach((item) => { - console.log('2222', item) const gridId = item.id if (res.hasOwnProperty(gridId)) { - // item.books = res[gridId] this.$set(item, 'books', res[gridId]) } }) @@ -526,12 +522,11 @@ export default { this.handleToGrids(this.cellInfo) }, handleDetail(item) { - console.log('item', item) this.detailVisible = true this.detailTable = item.books this.detailCurrent = item if (this.detailCurrent.onShelfNum) { - this.bigImg = `${this.baseApi}/api/fileRelevant/getImg?imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/result_LSD_compressed.jpg` + this.bigImg = `${this.baseApi}/api/fileRelevant/getImg?imgType=1&imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/result_LSD_compressed.jpg` } else { this.bigImg = '' } @@ -543,10 +538,10 @@ export default { // /PD20250102001/040011011/img_result/result_cut_1.jpg // /PD20250102001/040011011/img_result/result_cut_2.jpg // /PD20250102001/040011011/img_result/result_cut_3.jpg - // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/ceshi111/1_1_book_spine-0.png + // http://192.168.99.67:12010/api/fileRelevant/getImg?imgType=1&imgId=/ceshi111/1_1_book_spine-0.png - // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_LSD.jpg - // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_cut_1_compressed.jpg + // http://192.168.99.67:12010/api/fileRelevant/getImg?imgType=1&imgId=/1501/PD20250108013/010011015/img_result/result_LSD.jpg + // http://192.168.99.67:12010/api/fileRelevant/getImg?imgType=1&imgId=/1501/PD20250108013/010011015/img_result/result_cut_1_compressed.jpg this.bookImgData = [] this.detailImgVisible = true const params = { @@ -555,7 +550,7 @@ export default { } FetchIsGoodcutByBillNoAndGridId(params) .then(res => { - const baseUrl = `${this.baseApi}/api/fileRelevant/getImg?imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/` + const baseUrl = `${this.baseApi}/api/fileRelevant/getImg?imgType=1&imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/` const commonImgs = [ `${baseUrl}result_LSD_compressed.jpg`, `${baseUrl}result_cut_1_compressed.jpg`, @@ -928,7 +923,6 @@ export default { width: 1200px !important; padding: 0 !important; background: none; - // overflow: hidden; box-shadow: none; .el-dialog__header{ display: none; @@ -945,8 +939,6 @@ export default { } .el-carousel__item img{ display: block; - // width: 100%; - // height: 100%; max-width: 100%; max-height: 100%; margin: 0 auto; @@ -1004,55 +996,4 @@ export default { font-style: normal; } } - -.el-timeline { - margin: 0; - font-size: 14px; - list-style: none; -} -.el-timeline-item { - position: relative; - padding-bottom: 20px; -} -.el-timeline-item__tail { - position: absolute; - left: 4px; - height: 100%; - border-left: 2px solid #dfe4ed; -} -.el-timeline-item__node { - position: absolute; - background-color: #dfe4ed; - border-radius: 50%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.el-timeline-item__icon { - color: #fff; - font-size: 13px; -} -.el-timeline-item__wrapper { - position: relative; - padding-left: 28px; - top: -3px; -} -.el-timeline-item__content { - color: #303133; -} -.el-timeline-item__timestamp { - color: #909399; - line-height: 1; - font-size: 13px; -} -.el-timeline-item__timestamp.is-bottom { - margin-top: 8px; -} - diff --git a/src/views/visualCheck/checkManage/dataScreening/index.vue b/src/views/visualCheck/checkManage/dataScreening/index.vue index f4cb0c6..76cde22 100644 --- a/src/views/visualCheck/checkManage/dataScreening/index.vue +++ b/src/views/visualCheck/checkManage/dataScreening/index.vue @@ -23,11 +23,17 @@
      -
        + -
      +
    --> + + +
    + {{ item.floorName }} +
    +
    +
    楼层概况

    区域:{{ baseData.regionCount }}

    @@ -76,6 +82,8 @@ import crudStockTaskLog from '@/api/stockTaskLog/index' import CRUD, { presenter, header, crud } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' import { mapGetters } from 'vuex' +import { swiper, swiperSlide } from 'vue-awesome-swiper' +import 'swiper/dist/css/swiper.css' import defaultImg from '@/assets/images/system/default-img.jpg' import bookSwiper from '@/views/components/bookSwiper.vue' import CanvasPreview from '@/views/components/canvasPreview.vue' @@ -84,7 +92,7 @@ import exportForm from './module/export' export default { name: 'DataScreening', - components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm }, + components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm, swiper, swiperSlide }, cruds() { return CRUD({ title: '数据总览', url: 'api/libraryFloor/initLibraryFloorList', crudMethod: { ...crudStockTaskLog }, sort: [], optShow: { add: false, @@ -97,7 +105,6 @@ export default { }, mixins: [presenter(), header(), crud(), dataScreeningCrud], data() { - const _this = this return { prewLoading: false, floorOptions: [], @@ -109,16 +116,6 @@ export default { allCoverData: [], swiperActiveIndex: 0, rightDataIndex: null, - swiperOptionContent: { - slidesPerView: 'auto', - on: { - slideChangeTransitionStart: function() { - _this.rightDataIndex = null - _this.swiperActiveIndex = this.activeIndex - _this.swiperTitle.slideTo(this.activeIndex, 500, false) - } - } - }, swiperOptionTitle: { slidesPerView: 'auto', freeMode: true @@ -138,8 +135,8 @@ export default { 'user', 'baseApi' ]), - swiperContent() { - return this.$refs.swiperContent.$el.swiper + swiperTitle() { + return this.$refs.swiperTitle.$el.swiper } }, methods: { @@ -213,15 +210,15 @@ export default { } this.allCoverData = [] this.tabIndex = index + this.swiperTitle.slideTo(index, 500, false) const params = { 'floorId': this.floorOptions[index].id } try { const res = await FetchInitLibraryRegionList(params) - console.log(res) this.allCoverData = res.content if (this.floorOptions[index].floorMap) { - this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.floorOptions[index].floorMap + this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + this.floorOptions[index].floorMap } else { this.imageUrl = this.defaultImg } @@ -254,7 +251,6 @@ export default { pointInfo: parsedSignPoints, imgInfo: imgInfo } - console.log('result', result) this.$nextTick(() => { this.$refs.previewRefs.initCanvasPreview(result, this.tabIndex) }) @@ -267,16 +263,6 @@ export default { } catch (error) { console.error(error) } - }, - - handleSlidClickFun(index) { - this.rightDataIndex = null - this.handleSlideToFun(index) - }, - handleSlideToFun(index) { - this.swiperActiveIndex = index - this.swiperContent.slideTo(index, 500, false) - this.swiperTitle.slideTo(index, 500, false) } } } diff --git a/src/views/visualCheck/checkManage/dataScreening/regionsList.vue b/src/views/visualCheck/checkManage/dataScreening/regionsList.vue index fc05538..19cb570 100644 --- a/src/views/visualCheck/checkManage/dataScreening/regionsList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/regionsList.vue @@ -30,11 +30,17 @@
    -
      + - -
    + + --> + + +
    + {{ item.regionName }} +
    +
    +
    @@ -80,10 +86,12 @@ import bookSwiper from '@/views/components/bookSwiper.vue' import CanvasPreview from '@/views/components/canvasPreview.vue' import eForm from './module/form' import exportForm from './module/export' +import { swiper, swiperSlide } from 'vue-awesome-swiper' +import 'swiper/dist/css/swiper.css' export default { name: 'DataScreening', - components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm }, + components: { crudOperation, bookSwiper, CanvasPreview, eForm, exportForm, swiper, swiperSlide }, cruds() { return CRUD({ title: '区域总览', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: { add: false, @@ -97,7 +105,6 @@ export default { }, mixins: [presenter(), header(), crud(), dataScreeningCrud], data() { - const _this = this return { prewLoading: false, regionOptions: [], @@ -112,16 +119,6 @@ export default { allCoverData: [], swiperActiveIndex: 0, rightDataIndex: null, - swiperOptionContent: { - slidesPerView: 'auto', - on: { - slideChangeTransitionStart: function() { - _this.rightDataIndex = null - _this.swiperActiveIndex = this.activeIndex - _this.swiperTitle.slideTo(this.activeIndex, 500, false) - } - } - }, swiperOptionTitle: { slidesPerView: 'auto', freeMode: true @@ -142,8 +139,8 @@ export default { 'user', 'baseApi' ]), - swiperContent() { - return this.$refs.swiperContent.$el.swiper + swiperTitle() { + return this.$refs.swiperTitle.$el.swiper } }, methods: { @@ -230,16 +227,16 @@ export default { async changeActiveTab(index) { this.prewLoading = true this.tabIndex = index + this.swiperTitle.slideTo(index, 500, false) const params = { 'floorId': this.regionOptions[index].floorId, 'regionId': this.regionOptions[index].id } try { const res = await FetchInitBookShelfList(params) - console.log(res) this.allCoverData = res.content if (this.regionOptions[index].regionMap) { - this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.regionOptions[index].regionMap + this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + this.regionOptions[index].regionMap } else { this.imageUrl = this.defaultImg } @@ -276,7 +273,6 @@ export default { pointInfo: parsedSignPoints, imgInfo: imgInfo } - console.log('result', result) this.$nextTick(() => { this.$refs.previewRefs.initCanvasPreview(result, this.tabIndex) }) @@ -289,15 +285,6 @@ export default { } catch (error) { console.error(error) } - }, - handleSlidClickFun(index) { - this.rightDataIndex = null - this.handleSlideToFun(index) - }, - handleSlideToFun(index) { - this.swiperActiveIndex = index - this.swiperContent.slideTo(index, 500, false) - this.swiperTitle.slideTo(index, 500, false) } } } diff --git a/src/views/visualCheck/checkManage/dataScreening/shelfList.vue b/src/views/visualCheck/checkManage/dataScreening/shelfList.vue index c17593c..327ed61 100644 --- a/src/views/visualCheck/checkManage/dataScreening/shelfList.vue +++ b/src/views/visualCheck/checkManage/dataScreening/shelfList.vue @@ -37,11 +37,17 @@
    -
      + -
    + --> + + +
    + {{ item.name }} +
    +
    +

    错序:

    错架:

    @@ -128,10 +134,12 @@ import crudOperation from '@crud/CRUD.operation' import { mapGetters } from 'vuex' import eForm from './module/form' import exportForm from './module/export' +import { swiper, swiperSlide } from 'vue-awesome-swiper' +import 'swiper/dist/css/swiper.css' export default { name: 'DataScreening', - components: { crudOperation, eForm, exportForm }, + components: { crudOperation, eForm, exportForm, swiper, swiperSlide }, cruds() { return CRUD({ title: '架位总览', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: { add: false, @@ -146,7 +154,6 @@ export default { }, mixins: [presenter(), header(), crud(), dataScreeningCrud], data() { - const _this = this return { listLoading: false, tabIndex: 0, @@ -171,16 +178,6 @@ export default { swiperActiveIndex: 0, cellIndex: null, columnIndex: null, - swiperOptionContent: { - slidesPerView: 'auto', - on: { - slideChangeTransitionStart: function() { - _this.cellIndex = null - _this.swiperActiveIndex = this.activeIndex - _this.swiperTitle.slideTo(this.activeIndex, 500, false) - } - } - }, swiperOptionTitle: { slidesPerView: 'auto', freeMode: true @@ -205,9 +202,6 @@ export default { 'user', 'baseApi' ]), - swiperContent() { - return this.$refs.swiperContent.$el.swiper - }, swiperTitle() { return this.$refs.swiperTitle.$el.swiper }, diff --git a/src/views/visualCheck/checkManage/paramSetting/index.vue b/src/views/visualCheck/checkManage/paramSetting/index.vue index 3f9e18f..a0fa896 100644 --- a/src/views/visualCheck/checkManage/paramSetting/index.vue +++ b/src/views/visualCheck/checkManage/paramSetting/index.vue @@ -1,6 +1,6 @@