Browse Source

bug修复/图片问题

master
xuhuajiao 5 months ago
parent
commit
67a42fa677
  1. 22
      src/assets/styles/manage.scss
  2. 2
      src/views/components/bookSwiper.vue
  3. 3
      src/views/components/canvasPreview.vue
  4. 2
      src/views/components/checkSwiper.vue
  5. 1
      src/views/components/hkVideo.vue
  6. 32
      src/views/components/upload.vue
  7. 8
      src/views/visualCheck/bookstore/book/index.vue
  8. 2
      src/views/visualCheck/bookstore/collection/index.vue
  9. 4
      src/views/visualCheck/checkManage/bookSearch/index.vue
  10. 69
      src/views/visualCheck/checkManage/dataScreening/girdList.vue
  11. 46
      src/views/visualCheck/checkManage/dataScreening/index.vue
  12. 47
      src/views/visualCheck/checkManage/dataScreening/regionsList.vue
  13. 30
      src/views/visualCheck/checkManage/dataScreening/shelfList.vue
  14. 110
      src/views/visualCheck/checkManage/paramSetting/index.vue
  15. 2
      src/views/visualCheck/checkManage/positionMixins/index.js
  16. 2
      src/views/visualCheck/checkManage/statistic/reverseShelf/index.vue
  17. 4
      src/views/visualCheck/checkManage/statistic/search.vue
  18. 10
      src/views/visualCheck/venueDevice/area/index.vue
  19. 4
      src/views/visualCheck/venueDevice/bookshelf/index.vue
  20. 4
      src/views/visualCheck/venueDevice/device/index.vue
  21. 6
      src/views/visualCheck/venueDevice/floor/index.vue

22
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;
}
}
}

2
src/views/components/bookSwiper.vue

@ -34,7 +34,7 @@
:cleanup-styles-on-destroy="true"
>
<swiper-slide
v-for="(item, index) of tabListData"
v-for="(item, index) in tabListData"
:key="'content' + index"
class="swiper-slide-content"
>

3
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') {

2
src/views/components/checkSwiper.vue

@ -34,7 +34,7 @@
:cleanup-styles-on-destroy="true"
>
<swiper-slide
v-for="(item, index) of tabListData"
v-for="(item, index) in tabListData"
:key="'content' + index"
class="swiper-slide-content"
>

1
src/views/components/hkVideo.vue

@ -37,6 +37,7 @@ export default {
mounted() {
// videovideoID
// 127.0.0.1:8000webrtc-streamerIP8000
// eslint-disable-next-line no-undef
this.webRtcServer = new WebRtcStreamer('video', location.protocol + '//' + this.camera_ip)
// rtsp,rtspH264
this.webRtcServer.connect('rtsp://' + this.hkConfig.username + ':' + this.hkConfig.password + '@' + this.hkConfig.ip + ':' + this.hkConfig.port + '/h264/ch1/main/av_stream')

32
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

8
src/views/visualCheck/bookstore/book/index.vue

@ -61,7 +61,7 @@
<el-input v-model="form.publisher" placeholder="请输入" style="width: 586px;" />
</el-form-item>
</div>
<UploadCover :label-name="labelName" :form="form" @childCover="handleCover" />
<UploadCover :label-name="labelName" :form="form" upload-type="book" @childCover="handleCover" />
</div>
<div v-if="form.bookCover" class="preview-cover">
<p>封面预览</p>
@ -91,7 +91,7 @@
<template slot-scope="scope">
<!-- <svg-icon :icon-class="scope.row.icon ? scope.row.icon : ''" /> -->
<img v-if="!scope.row.bookCover" src="~@/assets/images/cover-bg.png" alt="" style="height: 60px;">
<img v-else :src="baseApi + '/api/fileRelevant/getImg?imgId=' + scope.row.bookCover" alt="" style="height: 60px;">
<img v-else :src="baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + scope.row.bookCover" alt="" style="height: 60px;">
</template>
</el-table-column>
<el-table-column label="题名" prop="title" width="300px" :show-overflow-tooltip="true" />
@ -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

2
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')

4
src/views/visualCheck/checkManage/bookSearch/index.vue

@ -168,8 +168,8 @@
<li><span>ISBN</span>{{ detailContent.isbn }}</li>
<li><span>条码号</span>{{ detailContent.barcode }}</li>
<!-- <li><span>馆藏地</span>机构-楼层-馆藏地名称</li> -->
<li class="book-img"><img :src="detailContent.bookCover === null ? defaultImg : detailContent.bookCover" :onerror="defaultImg" alt=""></li>
<!-- :src="baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + scope.row.bookCover" -->
<li class="book-img"><img :src="detailContent.bookCover === null ? defaultImg : baseApi + '/api/fileRelevant/getImg?imgType=2&imgId=' + detailContent.bookCover" :onerror="defaultImg" alt=""></li>
<li class="book-summary"><span>简介</span><p>{{ detailContent.summary ? detailContent.summary :"暂无简介" }}</p></li>
</ul>
<ul v-if="tabIndex===1" class="book-detail book-other">

69
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;
}
</style>

46
src/views/visualCheck/checkManage/dataScreening/index.vue

@ -23,11 +23,17 @@
<div class="container-right tab-content">
<span class="right-top-line" />
<span class="left-bottom-line" />
<ul class="tab-nav">
<!-- <ul class="tab-nav">
<li v-for="(item,index) in floorOptions" :key="index" :class="{ 'active-tab-nav': tabIndex == index }" @click="changeActiveTab(index)">{{ item.floorName }}<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
</ul> -->
<swiper ref="swiperTitle" class="swiper-title" :options="swiperOptionTitle" :auto-update="true" :auto-destroy="true">
<swiper-slide v-for="(item,index) in floorOptions" :key="index" ref="swiperSlideItem" class="swiper-slide-title">
<div class="tab-name" :class="{ active: tabIndex == index }" @click="changeActiveTab(index)">
{{ item.floorName }}
</div>
</swiper-slide>
</swiper>
<div class="total-data">
<span>楼层概况</span>
<p>区域{{ baseData.regionCount }}</p>
@ -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)
}
}
}

47
src/views/visualCheck/checkManage/dataScreening/regionsList.vue

@ -30,11 +30,17 @@
<div class="container-right tab-content">
<span class="right-top-line" />
<span class="left-bottom-line" />
<ul class="tab-nav">
<!-- <ul class="tab-nav">
<li v-for="(item,index) in regionOptions" :key="index" :class="{ 'active-tab-nav': tabIndex == index }" @click="changeActiveTab(index)">{{ item.regionName }}<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
<span class="tab-right-img" />
</ul> -->
<swiper ref="swiperTitle" class="swiper-title" :options="swiperOptionTitle" :auto-update="true" :auto-destroy="true">
<swiper-slide v-for="(item,index) in regionOptions" :key="index" ref="swiperSlideItem" class="swiper-slide-title">
<div class="tab-name" :class="{ active: tabIndex == index }" @click="changeActiveTab(index)">
{{ item.regionName }}
</div>
</swiper-slide>
</swiper>
<CanvasPreview ref="previewRefs" v-loading="prewLoading" page-preview="region" :current-mark-data="currentMarkData" :image-url="imageUrl" />
</div>
</div>
@ -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)
}
}
}

30
src/views/visualCheck/checkManage/dataScreening/shelfList.vue

@ -37,11 +37,17 @@
<div class="container-right tab-content">
<span class="right-top-line" />
<span class="left-bottom-line" />
<ul class="tab-nav">
<!-- <ul class="tab-nav">
<li v-for="(item,index) in tabListData" :key="index" :class="{ 'active-tab-nav': tabIndex == index }" @click="changeActiveTab(index)">{{ item.name }}<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
</ul> -->
<swiper ref="swiperTitle" class="swiper-title" :options="swiperOptionTitle" :auto-update="true" :auto-destroy="true">
<swiper-slide v-for="(item,index) in tabListData" :key="index" ref="swiperSlideItem" class="swiper-slide-title">
<div class="tab-name" :class="{ active: tabIndex == index }" @click="changeActiveTab(index)">
{{ item.name }}
</div>
</swiper-slide>
</swiper>
<div class="tag-info">
<p class="tag-sort">错序<i class="iconfont icon-zhuangtai2" /></p>
<p class="tag-place">错架<i class="iconfont icon-zhuangtai2" /></p>
@ -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
},

110
src/views/visualCheck/checkManage/paramSetting/index.vue

@ -1,6 +1,6 @@
<template>
<div class="app-container row-container">
<div class="container-wrap">
<div class="container-wrap" style="height: calc(100vh - 200px);">
<span class="right-top-line" />
<span class="left-bottom-line" />
<el-form ref="form" :rules="rules" :model="form" size="small" label-width="120px">
@ -55,7 +55,21 @@
<el-dialog class="tip-dialog tip-middle-dialog" title="AI处理终端连接测试" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="serviceContentDialogVisible" :before-close="handleClose">
<div class="setting-dialog service-all">
<div class="service-top-text"><i class="iconfont icon-zhongduanjiankong" />终端连接正常</div>
<!-- <ul>
<li v-for="(item, index) in serviceItems" :key="index" :style="{animationDelay: index * 300 + 'ms'}">
<p :class="item.status === 'running'? 'true-active' : 'false-active' ">{{ item.serviceName }}</p>
<i v-if="item.status === 'running'" class="iconfont icon-shi" />
<i v-else class="iconfont icon-cuowu1" />
</li>
</ul> -->
<ul>
<li v-for="(item, index) in serviceItems" :key="index">
<p :class="index <= currentIndex && item.status === 'running'? 'true-active' : 'false-active' ">{{ item.serviceName }}</p>
<i v-if="index <= currentIndex && item.status === 'running'" class="iconfont icon-shi" />
<i v-else-if="index <= currentIndex" class="iconfont icon-cuowu1" />
</li>
</ul>
<!-- <ul>
<li>
<p :class="service.service_imgCamera.status === 'running' ? 'true-active' : 'false-active' ">图像采集</p>
<i v-if="service.service_imgCamera.status === 'running'" class="iconfont icon-shi" />
@ -81,9 +95,9 @@
<i v-if="service.service_imgResult.status === 'running'" class="iconfont icon-shi" />
<i v-else class="iconfont icon-cuowu1" />
</li>
</ul>
<div v-if="isAllServicesRunning" class="service-bottom-text" style="color: rgb(18, 196, 122);">所有服务均正常运行请放心使用</div>
<div v-else class="service-bottom-text" style="color: #ED4A41;">请尽快联系系统维护人员进行恢复</div>
</ul> -->
<div v-if="servicesDisplayed && isAllServicesRunning" class="service-bottom-text" :class="{ 'fade-in': servicesDisplayed && isAllServicesRunning }" style="color: rgb(18, 196, 122);">所有服务均正常运行请放心使用</div>
<div v-else-if="servicesDisplayed && !isAllServicesRunning" class="service-bottom-text" :class="{ 'fade-in': servicesDisplayed &&!isAllServicesRunning }" style="color: #ED4A41;">请尽快联系系统维护人员进行恢复</div>
</div>
</el-dialog>
</div>
@ -151,7 +165,11 @@ export default {
'service_imgYolo': { 'last_heartbeat': 1736496961.953832, 'status': '' },
'service_imgOcr': { 'last_heartbeat': 1736496961.6238313, 'status': '' },
'service_imgResult': { 'last_heartbeat': 1736496963.4378026, 'status': '' }
}
},
serviceItems: [],
currentIndex: -1,
timer: null,
servicesDisplayed: false
}
},
computed: {
@ -170,8 +188,14 @@ export default {
}).catch(() => {
})
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer)
}
},
methods: {
handleService() {
this.servicesDisplayed = false
FetchAITerminalStatusQuery({ 'ip': this.crud.form.ip }).then(res => {
// {
// "service_imgCamera":{"last_heartbeat":1736496962.2368362,"status":"running"},
@ -181,14 +205,65 @@ export default {
// "service_imgResult":{"last_heartbeat":1736496963.4378026,"status":"running"},
// }
if (res) {
this.service = JSON.parse(res)
this.serviceContentDialogVisible = true
this.service = JSON.parse(res)
this.serviceItems = []
const keysOrder = ['service_imgCamera', 'service_imgProcess', 'service_imgYolo', 'service_imgOcr', 'service_imgResult']
keysOrder.forEach(key => {
let serviceName = ''
switch (key) {
case 'service_imgCamera':
serviceName = '图像采集'
break
case 'service_imgProcess':
serviceName = '图像处理'
break
case 'service_imgYolo':
serviceName = '图像识别'
break
case 'service_imgOcr':
serviceName = '文字识别'
break
case 'service_imgResult':
serviceName = '同步服务'
break
}
this.serviceItems.push({
serviceName: serviceName,
status: this.service[key].status
})
})
this.showServicesSequentially()
} else {
this.serviceDialogVisible = true
}
}).catch(() => {
})
},
showServicesSequentially() {
// let delay = 0
// this.serviceItems.forEach((item, index) => {
// setTimeout(() => {
// this.$set(this.serviceItems, index, {
// ...item,
// opacity: 1
// })
// }, delay)
// delay += 300
// })
let index = 0
const interval = 300
this.timer = setInterval(() => {
this.currentIndex = index
index++
if (index >= this.serviceItems.length) {
clearInterval(this.timer)
setTimeout(() => {
this.servicesDisplayed = true
}, 500)
}
}, interval)
},
[CRUD.HOOK.beforeToCU](crud, form, btn) {
if (this.showVerifyDialog) {
//
@ -351,4 +426,27 @@ export default {
}
}
.fade-enter-active,
.fade-leave-active {
transition: all 0.5s ease;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
transform: translateY(20px);
}
.fade-in {
animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>

2
src/views/visualCheck/checkManage/positionMixins/index.js

@ -95,7 +95,7 @@ export const positionCrud = {
this.currentMarkData = res
if (row.regionMap) {
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + row.regionMap
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + row.regionMap
this.$nextTick(() => {
const drawinfo = JSON.parse(res.signPoint)
this.initCanvasPreview(drawinfo)

2
src/views/visualCheck/checkManage/statistic/reverseShelf/index.vue

@ -79,7 +79,6 @@ export default {
}
return FetchInitSuggestTilting(params)
.then(res => {
console.log('res', res)
return res
})
.catch(error => {
@ -90,7 +89,6 @@ export default {
// orderType 1. 2
Promise.all([sendRequest(1), sendRequest(2)])
.then((results) => {
console.log('所有请求结果:', results)
this.leftData = results[0]
this.rightData = results[1]

4
src/views/visualCheck/checkManage/statistic/search.vue

@ -68,10 +68,8 @@ export default {
created() {
FetchRegionTree().then(res => {
this.regionOptions = [this.transformData(res)]
console.log('regionOptions', this.regionOptions)
const targetNode = this.findRegionNode(this.regionOptions)
if (targetNode) {
console.log('targetNode', targetNode)
this.search = targetNode.id
this.handleSugList(targetNode)
}
@ -144,10 +142,8 @@ export default {
}
},
[CRUD.HOOK.beforeRefresh]() {
console.log('this.search', this.search)
},
treeSelectInput(value) {
console.log(value)
const selectKey = value
this.handleSugList(selectKey)
},

10
src/views/visualCheck/venueDevice/area/index.vue

@ -294,7 +294,7 @@ export default {
clickRowHandler(row) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=f6d3ecea-0456-4429-ba77-1a4921d5c806
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgType=1&imgId=f6d3ecea-0456-4429-ba77-1a4921d5c806
this.currentMarkData = row
if (this.canvasPreview.lowerCanvasEl) {
this.canvasPreview.clear()
@ -302,7 +302,7 @@ export default {
}
if (this.activeIndex === 0) {
if (row.floorMap) {
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + row.floorMap
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + row.floorMap
if (row.signPoint) {
this.$nextTick(() => {
const drawinfo = JSON.parse(row.signPoint)
@ -314,7 +314,7 @@ export default {
}
} else {
if (row.regionMap) {
this.imageRegionUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + row.regionMap
this.imageRegionUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + row.regionMap
} else {
this.imageRegionUrl = this.defaultImg
}
@ -329,12 +329,12 @@ export default {
if (this.crud.selections.length === 1) {
if (this.crud.selections[0].floorMap) {
this.currentMarkData = this.crud.selections[0]
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.crud.selections[0].floorMap
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + this.crud.selections[0].floorMap
} else {
this.imageUrl = this.defaultImg
}
if (this.crud.selections[0].regionMap) {
this.imageRegionUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.crud.selections[0].regionMap
this.imageRegionUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + this.crud.selections[0].regionMap
} else {
this.imageRegionUrl = this.defaultImg
}

4
src/views/visualCheck/venueDevice/bookshelf/index.vue

@ -394,7 +394,7 @@ export default {
[CRUD.HOOK.afterRefresh](crud) {
console.log(crud.data)
if (this.selectRegionVal && this.selectRegionVal.regionMap) {
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.selectRegionVal.regionMap
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + this.selectRegionVal.regionMap
} else {
this.imageUrl = defaultImg
}
@ -527,7 +527,7 @@ export default {
},
setImageUrlBasedOnRegionMap() {
if (this.selectRegionVal && this.selectRegionVal.regionMap) {
this.imageUrl = `${this.baseApi}/api/fileRelevant/getImg?imgId=${this.selectRegionVal.regionMap}`
this.imageUrl = `${this.baseApi}/api/fileRelevant/getImg?imgType=1&imgId=${this.selectRegionVal.regionMap}`
} else {
this.resetImageUrl()
}

4
src/views/visualCheck/venueDevice/device/index.vue

@ -426,7 +426,6 @@ export default {
this.crud.query.deviceType = this.optionVal
},
[CRUD.HOOK.afterRefresh](crud) {
console.log('data', this.crud.data)
},
handleNodeClick(data) {
this.$nextTick(() => {
@ -457,7 +456,6 @@ export default {
}
FetchInitBookShelfList(params).then(res => {
this.bindReigonsTree = res.content
console.log('this.bindReigonsTree', this.bindReigonsTree)
}).catch(() => {
})
}
@ -544,7 +542,6 @@ export default {
},
handleComfirmDevice() {
this.$refs.deviceForm.validate((valid) => {
console.log('valid', valid)
if (valid) {
this.btn = 'add'
this.deviceSelectVisible = false
@ -572,7 +569,6 @@ export default {
// done()
},
changeShelfBind(val) {
console.log('val', val)
this.openBindShelf(val)
},
openBindShelf(shelfId) {

6
src/views/visualCheck/venueDevice/floor/index.vue

@ -93,7 +93,7 @@
<el-form-item label="描述信息" prop="floorDescription">
<el-input v-model="form.floorDescription" placeholder="请输入" type="textarea" rows="3" style="width: 580px;" />
</el-form-item>
<UploadCover :label-name="labelName" :form="form" @childCover="handleCover" />
<UploadCover :label-name="labelName" :form="form" upload-type="other" @childCover="handleCover" />
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
@ -194,9 +194,9 @@ export default {
clickRowHandler(row) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=f6d3ecea-0456-4429-ba77-1a4921d5c806
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgType=1&imgId=f6d3ecea-0456-4429-ba77-1a4921d5c806
if (row.floorMap) {
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + row.floorMap
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + row.floorMap
} else {
this.imageUrl = this.defaultImg
}

Loading…
Cancel
Save