Browse Source

书架管理

master
xuhuajiao 2 days ago
parent
commit
665e0e2778
  1. 19
      src/api/shelf/index.js
  2. 1
      src/views/deviceManage/bookshelf/index.vue
  3. 42
      src/views/deviceManage/map3d/map.vue
  4. 60
      src/views/deviceManage/shelfManage/codeRules.vue
  5. 495
      src/views/deviceManage/shelfManage/shelf3dPosition.vue
  6. 3
      src/views/deviceManage/shelfManage/shelfAllSearch.vue
  7. 12
      src/views/digitalScreen/index.vue
  8. 2
      vue.config.js

19
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 }

1
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('此操作将删除当前所选书架<span>你是否还要继续?</span>', '提示', {

42
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)
}
}
}

60
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() {

495
src/views/deviceManage/shelfManage/shelf3dPosition.vue

@ -1,5 +1,5 @@
<template>
<div class="app-container" style="position: relative; height: 784px; background-color: #fff;">
<div class="app-container" style="position: relative; height: 770px; background-color: #fff;">
<div class="position-top" style="display: flex; justify-content: space-between;">
<div class="position-top-left">
<el-select
@ -38,15 +38,16 @@
</el-tree>
</div>
</el-select>
<el-card v-if="bindAllRackList.length !== 0" class="box-card shelf-bind-card">
<!-- v-if="bindAllRackList.length !== 0" -->
<el-card class="box-card shelf-bind-card">
<ul class="shelf-bind-tab">
<li class="active">已绑定136</li>
<li>未绑定2</li>
<li :class="{ active: bindStatus === 'bound' }" @click="switchBindStatus('bound')">已绑定{{ boundShelfList.length }}</li>
<li :class="{ active: bindStatus === 'unbound' }" @click="switchBindStatus('unbound')">未绑定{{ unboundShelfList.length }}</li>
</ul>
<ul class="shelf-bind-list">
<li v-for="(item,index) in 8" :key="index">
<span>{{ index+1 }}</span>
<p>FTZN-03-001-A-01-1</p>
<li v-for="item in (bindStatus === 'bound' ? boundShelfList : unboundShelfList)" :key="item.id">
<span>{{ item.id }}</span>
<p>{{ item.code }}</p>
</li>
</ul>
</el-card>
@ -77,20 +78,12 @@
<el-select v-model="form.shelfVal" size="small" placeholder="架列表" class="filter-item" style="width: 100px;">
<el-option v-for="item in rackOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getInitShelfGridByShelfId()" />
</el-form-item>
</el-form>
<div v-if="filterShelfList.length !== 0" class="filter-shelf-list">
<el-tag v-for="(item,index) in filterShelfList" :key="index" type="success">{{ item.name }}</el-tag>
<!-- <el-tag type="success">FTZN-03-001-A-01-2</el-tag>
<el-tag type="success">FTZN-03-001-A-01-3</el-tag>
<el-tag type="success">FTZN-03-001-A-01-4</el-tag>
<el-tag type="success">FTZN-03-001-A-01-5</el-tag>
<el-tag type="success">FTZN-03-001-A-01-6</el-tag>
<el-tag type="success">FTZN-03-001-A-01-7</el-tag>
<el-tag type="success">FTZN-03-001-A-01-8</el-tag> -->
<el-tag v-for="(item,index) in filterShelfList" :key="index" type="success">{{ item.gridName }}</el-tag>
</div>
<!-- v-if="currentFid && filterShelfList.length!==0" -->
<div class="filter-model-select">
<div class="model-select-style">已选定位模型ID{{ currentFid }}</div>
<div class="model-select-style">已选架位<span>{{ filterShelfList.length }}</span></div>
@ -99,35 +92,101 @@
</el-card>
</div>
<div class="position-top-right">
<el-card v-if="bindAllInquiryList.length !== 0" class="box-card">
<!-- v-if="bindAllInquiryList.length !== 0" -->
<el-card class="box-card">
<div class="inquiry-machine-bind-top">
<h4>查询机绑定</h4>
<div class="inquiry-machine-bind-params">
<span style="color: rgb(3, 72, 243); font-weight: bold;">已绑 1</span>
<span
:style="{ color: inquiryFilterStatus === 'all' || inquiryFilterStatus === 'bound' ? 'rgb(64, 196, 140)' : 'rgb(153, 153, 153)', fontWeight: inquiryFilterStatus === 'all' || inquiryFilterStatus === 'bound' ? 'bold' : 'normal', cursor: 'pointer' }"
@click="inquiryFilterStatus = inquiryFilterStatus === 'bound' ? 'all' : 'bound'"
>已绑 {{ inquiryList.filter(item => item.bound).length }}</span>
<span>/</span>
<span style="color: rgb(237, 74, 65); font-weight: bold;">未绑 1</span>
<span
:style="{ color: inquiryFilterStatus === 'all' || inquiryFilterStatus === 'unbound' ? 'rgb(237, 74, 65)' : 'rgb(153, 153, 153)', fontWeight: inquiryFilterStatus === 'all' || inquiryFilterStatus === 'unbound' ? 'bold' : 'normal', cursor: 'pointer' }"
@click="inquiryFilterStatus = inquiryFilterStatus === 'unbound' ? 'all' : 'unbound'"
>未绑 {{ inquiryList.filter(item => !item.bound).length }}</span>
</div>
</div>
<ul class="shelf-bind-list" style="height: 190px;">
<li v-for="(item,index) in 8" :key="index">
<span>{{ index+1 }}</span>
<p>查询机001</p>
<span style="color: rgb(3, 72, 243); cursor: pointer;">绑定</span>
<!-- <span style="color: #2ecaac; cursor: pointer;">定位</span> -->
<li v-for="item in filteredInquiryList" :key="item.id">
<span>{{ item.id }}</span>
<p>{{ item.name }}</p>
<span
:style="{ color: item.bound ? 'rgb(64, 196, 140)' : 'rgb(3, 72, 243)', cursor: 'pointer' }"
@click="item.bound ? handleInquiryLocate(item) : handleInquiryBind(item)"
>{{ item.bound ? '定位' : '绑定' }}</span>
</li>
</ul>
</el-card>
</div>
</div>
<PreviewMap v-if="is3DMap" ref="map" :map-data="mapData" :to-shlef="true" @refreshAreaFid="handleAreaFid" />
<PreviewMap v-if="is3DMap" ref="map" :map-data="mapData" :to-shlef="true" :area-fid="currentFid" @refreshAreaFid="handleAreaFid" />
<el-empty v-else description="当前区域非3D模式的地图" style="height: 100%;" />
<!-- 模型信息面板 -->
<div v-if="currentFid" class="model-info-panel">
<div class="model-info-content">
<div class="model-info-item">
<span class="model-info-label">当前选中</span>
<span class="model-info-value">模型ID{{ currentFid }}</span>
</div>
<div v-if="bindData.rackCount > 0" class="model-info-item">
<span class="model-info-label">绑定架位</span>
<span class="model-info-value">{{ bindData.rackCount }} / </span>
<el-button type="text" class="model-info-link" @click="showDetail('rack')">查看详情</el-button>
</div>
<div v-if="bindData.inquiryCount > 0" class="model-info-item">
<span class="model-info-label">绑定查询机</span>
<span class="model-info-value">{{ bindData.inquiryCount }} / </span>
<el-button type="text" class="model-info-link" @click="showDetail('inquiry')">查看详情</el-button>
</div>
<div v-if="bindData.areaCount > 0" class="model-info-item">
<span class="model-info-label">绑定区域</span>
<span class="model-info-value">{{ bindData.areaCount }} / </span>
<el-button type="text" class="model-info-link" @click="showDetail('area')">查看详情</el-button>
</div>
</div>
</div>
<!-- 详情对话框 -->
<el-dialog
:visible.sync="dialogVisible"
:title="dialogTitle"
width="500px"
append-to-body
:close-on-click-modal="false"
:modal-append-to-body="false"
>
<el-table :data="dialogType === 'rack' ? rackDetails : dialogType === 'inquiry' ? inquiryDetails : areaDetails" style="width: 100%" height="300px" max-height="300px">
<!-- 绑定架位详情表格 -->
<template v-if="dialogType === 'rack'">
<el-table-column prop="id" label="序号" width="80" />
<el-table-column prop="rack" label="架位" />
<el-table-column prop="name" label="名称" />
</template>
<!-- 绑定查询机详情表格 -->
<template v-else-if="dialogType === 'inquiry'">
<el-table-column prop="id" label="序号" width="80" />
<el-table-column prop="name" label="查询机名称" />
<el-table-column prop="ip" label="设备IP" />
</template>
<!-- 绑定区域详情表格 -->
<template v-else-if="dialogType === 'area'">
<el-table-column prop="id" label="序号" width="80" />
<el-table-column prop="code" label="区域编码" />
<el-table-column prop="name" label="区域名称" />
</template>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { FetchRegionTree } from '@/api/deviceVI/index'
import { FetchMapDetails } from '@/api/map/index'
import { FetchInitBookShelfList, FetchBookShelfDetails } from '@/api/shelf/index'
import { FetchInitBookShelfList, FetchBookShelfDetails, FetchInitShelfGridByShelfId } from '@/api/shelf/index'
import PreviewMap from '../map3d/map'
export default {
name: 'Shelf3dPosition',
@ -162,7 +221,79 @@ export default {
bindAllRackList: [],
bindAllInquiryList: [],
filterShelfList: [],
currentFid: null
currentFid: null,
//
bindStatus: 'bound', // 'bound' | 'unbound'
//
inquiryFilterStatus: 'all', // 'all' | 'bound' | 'unbound'
//
boundShelfList: [
{ id: 1, code: 'FTZN-03-001-A-01-1' },
{ id: 2, code: 'FTZN-03-001-A-01-2' },
{ id: 3, code: 'FTZN-03-001-A-01-3' },
{ id: 4, code: 'FTZN-03-001-A-01-4' },
{ id: 5, code: 'FTZN-03-001-A-01-5' },
{ id: 6, code: 'FTZN-03-001-A-01-6' },
{ id: 7, code: 'FTZN-03-001-A-01-7' },
{ id: 8, code: 'FTZN-03-001-A-01-8' }
],
unboundShelfList: [
{ id: 1, code: 'FTZN-03-001-A-01-9' },
{ id: 2, code: 'FTZN-03-001-A-01-10' }
],
//
inquiryList: [
{ id: 1, name: '查询机001', bound: true, modelId: '7069948641322078208' },
{ id: 2, name: '查询机002', bound: false },
{ id: 3, name: '查询机003', bound: false },
{ id: 4, name: '查询机004', bound: false },
{ id: 5, name: '查询机005', bound: false },
{ id: 6, name: '查询机006', bound: false },
{ id: 7, name: '查询机007', bound: false },
{ id: 8, name: '查询机008', bound: false }
],
bindData: {
rackCount: 0,
inquiryCount: 0,
areaCount: 0
},
modelScreenPosition: null,
//
dialogVisible: false,
dialogType: '', // 'rack' | 'inquiry' | 'area'
dialogTitle: '',
//
rackDetails: [
{ id: 1, rack: 'FTZN-03-001-A-01-1', name: '架位1' },
{ id: 2, rack: 'FTZN-03-001-A-01-2', name: '架位2' },
{ id: 3, rack: 'FTZN-03-001-A-01-3', name: '架位3' },
{ id: 4, rack: 'FTZN-03-001-A-01-4', name: '架位4' },
{ id: 5, rack: 'FTZN-03-001-A-01-5', name: '架位5' },
{ id: 6, rack: 'FTZN-03-001-A-01-6', name: '架位6' },
{ id: 1, rack: 'FTZN-03-001-A-01-1', name: '架位1' },
{ id: 2, rack: 'FTZN-03-001-A-01-2', name: '架位2' },
{ id: 3, rack: 'FTZN-03-001-A-01-3', name: '架位3' },
{ id: 4, rack: 'FTZN-03-001-A-01-4', name: '架位4' },
{ id: 5, rack: 'FTZN-03-001-A-01-5', name: '架位5' },
{ id: 6, rack: 'FTZN-03-001-A-01-6', name: '架位6' }
],
inquiryDetails: [
{ id: 1, name: '查询机001', ip: '192.168.1.100' }
],
areaDetails: [
{ id: 1, code: '03', name: '区域1' }
]
}
},
computed: {
filteredInquiryList() {
if (this.inquiryFilterStatus === 'bound') {
return this.inquiryList.filter(item => item.bound)
} else if (this.inquiryFilterStatus === 'unbound') {
return this.inquiryList.filter(item => !item.bound)
} else {
return this.inquiryList
}
}
},
created() {
@ -170,9 +301,13 @@ export default {
this.regionTreeData = [this.transformData(res)]
console.log(this.regionTreeData)
this.$nextTick(() => {
// localStorage
this.autoSelectFromLocalStorage()
// localStorage
if (!this.regionTreeData[0].children?.length) return
const targetFloor = this.regionTreeData[0].children.find(floor => floor.children?.length > 0)
if (targetFloor?.children?.length) {
if (targetFloor?.children?.length && !this.currentTreeNode) {
const firstRegion = targetFloor.children[0]
this.$refs.treeRef.setCurrentKey(firstRegion.id)
this.handleTreeNodeClick(firstRegion)
@ -185,6 +320,108 @@ export default {
this.changeShelfToModel(this.options1[0]?.value)
},
methods: {
getInitShelfGridByShelfId() {
// rowType 1 2
// toward 1 A 2 B
// shelfType 1 '1S'
// shelfType 2 'A1B1'
// shelfType 3 'B1A1'
// floorType 1 ''
// floorType 2 ''
console.log(' this.form', this.form)
FetchInitShelfGridByShelfId({ 'shelfId': this.form.layerVal.id, 'toward': this.form.toward }).then(res => {
console.log('FetchInitShelfGridByShelfId', res)
this.filterShelfList = res
}).catch(() => {
})
},
// localStorage
autoSelectFromLocalStorage() {
try {
const shelfDataStr = localStorage.getItem('shelf3dPositionRow')
if (!shelfDataStr) return
const shelfData = JSON.parse(shelfDataStr)
console.log('shelf3dPositionRow', shelfData)
// 1.
const targetRegionNode = this.findRegionNodeByShelfData(this.regionTreeData, shelfData)
if (targetRegionNode) {
//
this.$refs.treeRef.setCurrentKey(targetRegionNode.id)
//
this.handleTreeNodeClick(targetRegionNode)
// 2.
this.$nextTick(() => {
this.autoFillForm(shelfData)
})
} else {
console.warn('未找到对应的区域节点', shelfData)
}
} catch (error) {
console.error('自动选择节点失败', error)
}
},
// floorNameregionName
findRegionNodeByShelfData(treeData, shelfData) {
for (const node of treeData) {
//
if (node.floorId && node.raw?.floorName === shelfData.floorName) {
//
if (node.children && node.children.length) {
const regionNode = node.children.find(
region => region.raw?.regionName === shelfData.regionName
)
if (regionNode) {
return regionNode
}
}
}
//
if (node.children && node.children.length) {
const result = this.findRegionNodeByShelfData(node.children, shelfData)
if (result) return result
}
}
return null
},
//
autoFillForm(shelfData) {
//
this.form.toward = shelfData.toward
// rowType
if (shelfData.rowType === 1) {
//
this.form.code1 = shelfData.shelfShelf > 1 ? 0 : 2 // "--""-"
} else if (shelfData.rowType === 2) {
//
this.form.code1 = shelfData.shelfShelf > 1 ? 1 : 3 // "--""-"
this.towardDisabled = true
}
//
this.changeShelfToModel(this.form.code1)
// layerOptions
const timer = setInterval(() => {
if (this.layerOptions.length > 0) {
clearInterval(timer)
//
const targetLayer = this.layerOptions.find(item => item.id === shelfData.shelfId)
if (targetLayer) {
this.form.layerVal = targetLayer
//
this.changeShelfGetGrid(targetLayer)
}
}
}, 100)
},
transformData(data) {
const rootNode = {
id: data.fondsId,
@ -212,8 +449,11 @@ export default {
}
return rootNode
},
handleTreeNodeClick(nodeData) {
this.form.layerVal = null
this.form.shelfVal = null //
this.rackOptions = [] //
this.currentTreeNode = nodeData.raw
console.log('handleTreeNodeClick', nodeData)
const currentNode = this.$refs.treeRef.getNode(nodeData)
@ -239,6 +479,7 @@ export default {
this.getMapDetails(nodeData.raw.mapId)
}
},
getMapDetails(id) {
const params = {
'id': id
@ -257,15 +498,24 @@ export default {
}
if (this.currentTreeNode.fid) {
this.$refs.map.areaFid = this.currentTreeNode.fid
// this.handleAreaFid(this.currentTreeNode.fid)
} else {
this.$refs.map.areaFid = null
this.currentFid = null
}
this.$refs.map.initMap()
})
}).catch(() => {
})
},
changeShelfGetGrid(val) {
if (!val) {
this.rackOptions = []
this.form.shelfVal = null
return
}
FetchBookShelfDetails({ 'shelfId': val.id }).then(res => {
this.rackOptions = []
const start = parseInt(res.startShelf) || 1
@ -276,18 +526,37 @@ export default {
name: `${i.toString().padStart(2, '0')}`
})
}
// 1. rowType/code1
if (val.rowType === 1) { //
//
this.form.code1 = res.shelfShelf > 1 ? 0 : 2
// 0: "--" | 2: "-"
} else if (val.rowType === 2) { //
this.form.code1 = res.shelfShelf > 1 ? 1 : 3
// 1: "--" | 3: "-"
}
this.changeShelfToModel(this.form.code1)
// 4.
if (this.rackOptions.length > 0) {
this.form.shelfVal = this.rackOptions[0].id
} else {
this.form.shelfVal = null
}
}).catch(() => {
this.rackOptions = []
this.form.shelfVal = null
})
},
handleVisibleChange(visible) {
//
},
//
changeShelfToModel(val) {
if (val === 1 || val === 3) {
this.towardDisabled = true
this.abOptions = [
{ value: 0, name: '双面' }
{ value: 1, name: '双面' }
]
} else {
this.towardDisabled = false
@ -296,8 +565,17 @@ export default {
{ value: 2, name: 'B面' }
]
}
this.form.toward = this.abOptions[0]?.value
//
const hasCurrentToward = this.abOptions.some(item => item.value === this.form.toward)
if (!hasCurrentToward) {
this.form.toward = this.abOptions[0]?.value
}
},
handleVisibleChange(visible) {
//
},
getInitBookShelfList(data) {
const params = { 'floorId': data.parentFloorId, 'regionId': data.regionId }
FetchInitBookShelfList(params).then(res => {
@ -313,13 +591,99 @@ export default {
rowType: item.rowType
}
})
// localStorage
const shelfDataStr = localStorage.getItem('shelf3dPositionRow')
if (shelfDataStr) {
this.autoFillForm(JSON.parse(shelfDataStr))
}
}
}).catch(() => {
})
},
handleAreaFid(areaFid) {
this.currentFid = areaFid
console.log('mapAreaFid', areaFid)
//
this.fetchBindData(areaFid)
},
fetchBindData(fid) {
//
setTimeout(() => {
//
this.bindData = {
rackCount: 6, //
inquiryCount: 1, //
areaCount: 1 //
}
}, 300)
},
//
showDetail(type) {
this.dialogType = type
switch (type) {
case 'rack':
this.dialogTitle = `绑定架位详情 - 绑定位置【${this.currentFid}`
break
case 'inquiry':
this.dialogTitle = `绑定查询机详情 - 绑定位置【${this.currentFid}`
break
case 'area':
this.dialogTitle = `绑定区域详情 - 绑定位置【${this.currentFid}`
break
}
this.dialogVisible = true
},
//
switchBindStatus(status) {
this.bindStatus = status
//
//
// if (status === 'bound') {
// this.fetchBoundShelfList()
// } else {
// this.fetchUnboundShelfList()
// }
},
//
handleInquiryBind(item) {
this.$confirm('此操作将绑定所选查询机位置。<br>查询机一般作为3D地图导航的起点!<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
if (!this.currentFid) {
this.$message.warning('请先选择一个模型位置')
return
}
//
console.log('绑定查询机:', item.name, '到位置:', this.currentFid)
//
item.bound = true
item.modelId = this.currentFid
this.$message.success('绑定成功')
}).catch(err => {
console.log(err)
})
},
//
handleInquiryLocate(item) {
if (!item.modelId) {
this.$message.warning('该查询机未绑定模型位置')
return
}
// FID
this.currentFid = item.modelId
//
this.fetchBindData(item.modelId)
// centerOnModel
this.$nextTick(() => {
if (this.$refs.map) {
this.$refs.map.centerOnModel(item.modelId)
}
})
}
}
}
@ -411,6 +775,16 @@ export default {
padding: 10px 10px 0 10px;
height: 96px;
overflow-y: scroll;
.el-tag{
margin-right: 5px;
cursor: pointer;
&:hover,
&.bind-selected{
background-color: #0348f3;
color: #fff;
border: 1px solid #0348f3;
}
}
}
.filter-model-select{
border-top: 1px solid #edeff3;
@ -453,4 +827,57 @@ export default {
font-size: 14px;
}
}
/* 模型信息面板 */
.model-info-panel{
position: absolute;
top: 42%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1000;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 8px;
padding: 20px;
color: #fff;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
min-width: 300px;
}
.model-info-content{
display: flex;
flex-direction: column;
gap: 10px;
}
.model-info-item{
display: flex;
align-items: center;
gap: 10px;
}
.model-info-label{
font-weight: bold;
min-width: 100px;
}
.model-info-value{
flex: 1;
}
.model-info-link{
color: #409EFF !important;
font-size: 12px;
padding: 0 !important;
margin: 0 !important;
border: none !important;
}
.model-info-link:hover{
color: #66B1FF !important;
background-color: transparent !important;
}
.model-info-link:focus{
color: #66B1FF !important;
background-color: transparent !important;
}
</style>

3
src/views/deviceManage/shelfManage/shelfAllSearch.vue

@ -168,6 +168,7 @@ export default {
}
FetchInitLibraryRegionList(params).then(res => {
this.regionOptions = res.content
this.crud.toQuery()
}).catch(() => {
})
@ -176,6 +177,8 @@ export default {
if (val) {
this.selectFloorVal = val
this.crud.query.floorId = val.id
this.selectRegionVal = null
this.crud.query.regionId = null
this.getInitLibraryRegionList(val.id)
}
},

12
src/views/digitalScreen/index.vue

@ -145,10 +145,10 @@
</div>
<div v-if="currentScreenItem.id !== 5" class="config-item">
<div class="config-item-main">
<span class="data-title">图创接口</span>
<!-- 图创接口表单 -->
<span class="data-title">数据接口</span>
<!-- 数据接口表单 -->
<el-form ref="openForm" :model="openForm" size="small" label-width="100px">
<el-form-item label="OpenLib地址" prop="open_lib_http">
<el-form-item label="域名地址" prop="open_lib_http">
<el-tooltip
v-if="!editStatus.openForm.open_lib_http"
class="item"
@ -543,7 +543,7 @@ export default {
return
}
//
//
if (code === 'open_lib_http') {
this.openForm.open_lib_http = context
} else if (code === 'open_lib_appId') {
@ -1021,7 +1021,7 @@ export default {
show5: '欢迎屏播放时长'
},
openForm: {
open_lib_http: 'OpenLib地址',
open_lib_http: '域名地址',
open_lib_appId: 'AppId',
open_lib_secret: 'Secret'
},
@ -1190,7 +1190,7 @@ export default {
// +
.content-area {
height: 510px;
height: 504px;
border-radius: 4px;
width: 100%;
overflow-y: scroll;

2
vue.config.js

@ -6,7 +6,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title // 网址标题
const port = 8018 // 端口配置
const port = 14000 // 端口配置
// All configuration item explanations can be find in https://cli.vuejs.org/config/
// const GenerateAssetPlugin = require('generate-asset-webpack-plugin')

Loading…
Cancel
Save