-
+
+
![]()
@@ -242,14 +242,13 @@ export default {
},
[CRUD.HOOK.beforeRefresh]() {
this.getLibraryFloorListAll()
- console.log('this.setfloorId', this.setfloorId)
- this.crud.query.floorId = this.setfloorId
- // const formFloor = JSON.parse(localStorage.getItem('formFloor'))
- // if (formFloor) {
- // this.crud.query.floorId = formFloor.id
- // } else {
- // this.crud.query.floorId = null
- // }
+ console.log(this.$route.query)
+ if (this.$route.query.formFloor) {
+ const formFloor = JSON.parse(localStorage.getItem('formFloor'))
+ if (formFloor) {
+ this.crud.query.floorId = formFloor.id
+ }
+ }
},
[CRUD.HOOK.afterRefresh](crud) {
console.log('crud.data', crud.data)
@@ -277,20 +276,34 @@ export default {
console.log(value)
this.crud.form.regionMap = value
},
+ changeInitFloorValue(value) {
+ if (this.$route.query.formFloor) {
+ localStorage.removeItem('formFloor')
+ }
+
+ this.crud.query.floorId = value
+ this.crud.toQuery()
+ console.log('value', value)
+ },
changeFloorValue(value) {
- console.log(value)
},
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
this.currentMarkData = row
+ if (this.canvasPreview.lowerCanvasEl) {
+ this.canvasPreview.clear()
+ this.canvasPreview.dispose()
+ }
if (this.activeIndex === 0) {
if (row.floorMap) {
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + row.floorMap
if (row.signPoint) {
- const drawinfo = JSON.parse(row.signPoint)
- this.initCanvasPreview(drawinfo)
+ this.$nextTick(() => {
+ const drawinfo = JSON.parse(row.signPoint)
+ this.initCanvasPreview(drawinfo)
+ })
}
} else {
this.imageUrl = this.defaultImg
@@ -306,10 +319,6 @@ export default {
changeActiveTab(data) {
this.activeIndex = data
if (this.crud.selections.length === 1) {
- // if (this.canvasPreview) {
- // this.canvasPreview.clear()
- // this.canvasPreview.dispose()
- // }
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
@@ -325,8 +334,10 @@ export default {
if (this.activeIndex === 0) {
if (this.crud.selections[0].signPoint) {
console.log('1111')
- const drawinfo = JSON.parse(this.crud.selections[0].signPoint)
- this.initCanvasPreview(drawinfo)
+ this.$nextTick(() => {
+ const drawinfo = JSON.parse(this.crud.selections[0].signPoint)
+ this.initCanvasPreview(drawinfo)
+ })
}
}
}
@@ -414,15 +425,23 @@ export default {
this.crud.refresh()
},
initCanvasPreview(drawinfo) {
- this.canvasPreview = new fabric.Canvas('canvasPreview', {
+ if (!this.currentMarkData) {
+ console.error('currentMarkData is null or undefined')
+ return
+ }
+
+ const canvasId = `canvasPreview${this.currentMarkData.id}`
+ this.canvasPreview = new fabric.Canvas(canvasId, {
skipTargetFind: false,
selectable: false,
selection: false
})
- this.canvasPreview.selectionColor = 'rgba(0,0,0,0.05)'
- this.loadDrawPreview(drawinfo)
- this.canvasPreview.on('mouse:wheel', this.mouse)
+ this.$nextTick(() => {
+ this.canvasPreview.selectionColor = 'rgba(0,0,0,0.05)'
+ this.loadDrawPreview(drawinfo)
+ this.canvasPreview.on('mouse:wheel', this.mouse)
+ })
},
// 鼠标滚轮放大缩小
mouse(e) {
diff --git a/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue b/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue
index 262575f..7390eca 100644
--- a/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue
+++ b/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue
@@ -21,7 +21,7 @@
导出层位编码
-
+
{{ cellInfo.cameraId ? '摄像头预览' : '未绑定摄像头' }}
@@ -70,7 +70,7 @@
>
-
- {{ item.gridName }}
+ {{ removeAreaPrefix(item.gridName) }}
@@ -147,21 +147,33 @@