From 665e0e27782bbdc591c5f42d2ea8110325b91ca7 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 27 Mar 2026 15:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=A6=E6=9E=B6=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shelf/index.js | 19 +- src/views/deviceManage/bookshelf/index.vue | 1 + src/views/deviceManage/map3d/map.vue | 42 +- .../deviceManage/shelfManage/codeRules.vue | 60 ++- .../shelfManage/shelf3dPosition.vue | 495 ++++++++++++++++-- .../shelfManage/shelfAllSearch.vue | 3 + src/views/digitalScreen/index.vue | 12 +- vue.config.js | 2 +- 8 files changed, 578 insertions(+), 56 deletions(-) diff --git a/src/api/shelf/index.js b/src/api/shelf/index.js index e21c7b4..2c5d38e 100644 --- a/src/api/shelf/index.js +++ b/src/api/shelf/index.js @@ -118,4 +118,21 @@ export function FetchShelfGridByShelfIdAndGridShelf(params) { }) } -export default { add, edit, del, FetchInitBookShelfList, FetchBookShelfDetails, saveBookShelfSignPoint, FetchInitShelfGridByShelfId, FetcheEditSortmarkByGrid, FetchChangeOrderByGrid, FetchChangeCheckByGrid, FetchShelfGridAllByShelfId, FetchShelfAllByRegionId, FetchFastDownShelf, FetchShelfGridByShelfIdAndGridShelf } +// 根据馆代码查询书架规则 +export function FetchBookShelfSetting(params) { + return request({ + url: 'api/bookShelf/getBookShelfSetting' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 保存书架规则 +export function FetchSaveBookShelfSetting(parameter) { + return request({ + url: 'api/bookShelf/saveBookShelfSetting', + method: 'post', + data: parameter + }) +} + +export default { add, edit, del, FetchInitBookShelfList, FetchBookShelfDetails, saveBookShelfSignPoint, FetchInitShelfGridByShelfId, FetcheEditSortmarkByGrid, FetchChangeOrderByGrid, FetchChangeCheckByGrid, FetchShelfGridAllByShelfId, FetchShelfAllByRegionId, FetchFastDownShelf, FetchShelfGridByShelfIdAndGridShelf, FetchBookShelfSetting, FetchSaveBookShelfSetting } diff --git a/src/views/deviceManage/bookshelf/index.vue b/src/views/deviceManage/bookshelf/index.vue index c7a50ab..042daf4 100644 --- a/src/views/deviceManage/bookshelf/index.vue +++ b/src/views/deviceManage/bookshelf/index.vue @@ -585,6 +585,7 @@ export default { handleShelf3D(row) { console.log('row', row) this.$router.push({ path: '/deviceManage/shelfManage/shelf3dPosition', query: { 'floorName': row.floorName, 'regionName': row.regionName }}) + localStorage.setItem('shelf3dPositionRow', JSON.stringify(row)) }, toDelete(datas) { this.$confirm('此操作将删除当前所选书架你是否还要继续?', '提示', { diff --git a/src/views/deviceManage/map3d/map.vue b/src/views/deviceManage/map3d/map.vue index a15d081..8dcf0f5 100644 --- a/src/views/deviceManage/map3d/map.vue +++ b/src/views/deviceManage/map3d/map.vue @@ -77,7 +77,7 @@ export default { // mapURL: '/fengmap/data/', // themeID: '1574346301450625025', // themeURL: '/fengmap/data/theme/', - level: this.level, + level: this.level ? this.level : 1, mapZoom: this.toShlef ? 19.8 : 19.5, backgroundColor: '#fff' } @@ -201,6 +201,46 @@ export default { console.log('model', model.getData()) model.setColor('red') model.flash('red') + }, + // 根据FID居中显示模型 + centerOnModel(fid) { + if (!this.map) return + + const floor = this.map.getFloor(this.level) + if (!floor) return + + this.marker && this.marker.remove() + this.marker = null + this.areaModel.resetColor() + + // 查找新模型 + const model = floor.getLayers(fengmap.FMType.MODEL_LAYER)[0].getFeatures().find(item => item.FID === fid) + if (model) { + // 设置新模型的颜色 + model.setColor('#FF6633') + this.areaModel = model + this.areaFid = fid + + console.log('this.areaModel2', this.areaModel) + console.log('this.areaFid3', this.areaFid) + console.log('this.marker3', this.marker) + console.log('model', this.areaModel.getData()) + + // 居中显示模型 + this.map.setCenter({ x: model.x, y: model.y }) + this.map.setZoom({ zoom: 50 }) + + // 添加标记 + this.marker = new fengmap.FMImageMarker({ + url: locationIcon, + x: model.x, + y: model.y, + anchor: fengmap.FMMarkerAnchor.BOTTOM + }) + this.marker.addTo(floor) + // 触发事件 + window.vueInstance.$emit('refreshAreaFid', this.areaFid) + } } } diff --git a/src/views/deviceManage/shelfManage/codeRules.vue b/src/views/deviceManage/shelfManage/codeRules.vue index c209836..f100e1b 100644 --- a/src/views/deviceManage/shelfManage/codeRules.vue +++ b/src/views/deviceManage/shelfManage/codeRules.vue @@ -186,6 +186,7 @@ import { mapGetters } from 'vuex' import { encrypt } from '@/utils/rsaEncrypt' import { verifyMaintenance } from '@/api/system/param' +import { FetchBookShelfSetting } from '@/api/shelf/index' import Sortable from 'sortablejs' export default { name: 'CodeRules', @@ -298,9 +299,17 @@ export default { }, mounted() { - + this.getInitBookShelfSetting() }, methods: { + getInitBookShelfSetting() { + const params = { + libcode: this.user.fonds.fondsNo + } + FetchBookShelfSetting(params).then(res => { + console.log('res', res) + }) + }, _formatNumber(value, length) { return value.toString().padStart(length, '0') }, @@ -361,18 +370,43 @@ export default { return true }, handleRulesConfirm() { - this.$refs.form.validate((valid) => { - if (valid) { - const param = { - 'code': 'preview_url', - 'context': this.form.preview_url, - 'remarks': null - } - console.log('param', param) - } else { - console.log('error submit!!') - return false - } + // { + // "id": 0, + // "firstShow": "string", // 第一位 + // "libcode": "string", // 机构 + // "libcodeCnShow": true, // 机构是否中文显示 + // "libcodeShow": true, // 机构是否英文显示 + // "secondShow": "string", // 第二位 + // "thirdShow": "string", // 第三位 + // "fourthShow": "string", // 第四位 + // "fifthShow": "string", // 第五位 + // "sixthShow": "string", // 第6位 + // "floorDigit": 0, // 排-位数 + // "isTowardNum": true, // 面 - 编码是否数字 true数字 false字母 + // "rowDigit": 0, // 层 - 位数 + // "shelfDigit": 0, // 架/列 - 位数 + // "isHyphen": true, // 是否显示连接符 + // } + const params = { + 'id': 0, + 'firstShow': '机构', + 'libcode': this.user.fonds.fondsNo, + 'libcodeCnShow': true, + 'libcodeShow': true, + 'secondShow': '区域', + 'thirdShow': '排', + 'fourthShow': '面', + 'fifthShow': '架/列', + 'sixthShow': '层', + 'floorDigit': this.row, // 排-位数 + 'isTowardNum': this.isNumber, // 面 - 编码是否数字 true数字 false字母 + 'rowDigit': this.layer, // 层 - 位数 + 'shelfDigit': this.line, // 架/列 - 位数 + 'isHyphen': this.isConnector // 是否显示连接符 + } + console.log('params', params) + FetchBookShelfSetting(params).then(res => { + console.log('res', res) }) }, handleClose() { diff --git a/src/views/deviceManage/shelfManage/shelf3dPosition.vue b/src/views/deviceManage/shelfManage/shelf3dPosition.vue index 1171186..9a40cce 100644 --- a/src/views/deviceManage/shelfManage/shelf3dPosition.vue +++ b/src/views/deviceManage/shelfManage/shelf3dPosition.vue @@ -1,5 +1,5 @@