Browse Source

3D库房-密集架

master
xuhuajiao 3 years ago
parent
commit
c78367f872
  1. 58
      public/webA/index.js
  2. 19
      public/webTotal/index.js
  3. 11
      src/api/storeManage/deviceManage/device.js
  4. 2
      src/assets/styles/archives-manage.scss
  5. 163
      src/views/storeManage/warehouse3D/deseCabinet/index.vue
  6. 3
      src/views/system/archiveStatistics/module/barEcharts.vue
  7. 2
      src/views/system/archiveStatistics/module/lineEchart.vue

58
public/webA/index.js

@ -878,6 +878,24 @@ BABYLON.DefaultLoadingScreen.prototype.hideLoadingUI = function() {
material3.metallic = 0.87; material3.metallic = 0.87;
material3.roughness = 0; material3.roughness = 0;
scene.getMeshByName("档案架10_primitive3").material = scene.getMaterialByName("01.004");
scene.getMeshByName("档案架09_primitive4").material = scene.getMaterialByName("02.004");
scene.getMeshByName("档案架08_primitive4").material = scene.getMaterialByName("03.004");
scene.getMeshByName("档案架07_primitive4").material = scene.getMaterialByName("04.004");
scene.getMeshByName("档案架06_primitive4").material = scene.getMaterialByName("05.004");
scene.getMeshByName("档案架06_primitive4").material = scene.getMaterialByName("06.004");
scene.getMeshByName("档案架04_primitive4").material = scene.getMaterialByName("07.004");
scene.getMeshByName("档案架03_primitive4").material = scene.getMaterialByName("08.004");
scene.getMeshByName("档案架02_primitive4").material = scene.getMaterialByName("09.004");
scene.getMeshByName("档案架01_primitive3").material = scene.getMaterialByName("10.004");
scene.getTransformNodeByName("档案柜01").setEnabled(false);
scene.getTransformNodeByName("档案柜02").setEnabled(false);
var v1 = scene.getMeshByName("钢轨01");
v1.position = new BABYLON.Vector3(v1.position.x,60.0,v1.position.z);
v1.scaling = new BABYLON.Vector3(1,0.9,1);
// 给vue页面传值,加载完成之后 // 给vue页面传值,加载完成之后
parent.getIframeLoading("false") parent.getIframeLoading("false")
}; };
@ -1029,8 +1047,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js1.size = 0.1; player_balloon_js1.size = 0.1;
player_balloon_js1.name = "1";
player_balloon_js1.nameID = "cabinet01";
player_balloon_js1.name = "10";
player_balloon_js1.nameID = "cabinet10";
player_balloon_js1.cellIndex = 0; player_balloon_js1.cellIndex = 0;
player_balloon_js1.position = new BABYLON.Vector3(-2.5, 3.5, -0.72); player_balloon_js1.position = new BABYLON.Vector3(-2.5, 3.5, -0.72);
player_balloon_js1.isPickable = true; player_balloon_js1.isPickable = true;
@ -1045,8 +1063,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js2.size = 0.1; player_balloon_js2.size = 0.1;
player_balloon_js2.name = "2";
player_balloon_js2.nameID = "cabinet02";
player_balloon_js2.name = "9";
player_balloon_js2.nameID = "cabinet09";
player_balloon_js2.cellIndex = 0; player_balloon_js2.cellIndex = 0;
player_balloon_js2.position = new BABYLON.Vector3(-2.5, 3.5, -0.38); player_balloon_js2.position = new BABYLON.Vector3(-2.5, 3.5, -0.38);
@ -1062,8 +1080,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js3.size = 0.1; player_balloon_js3.size = 0.1;
player_balloon_js3.name = "3";
player_balloon_js3.nameID = "cabinet03";
player_balloon_js3.name = "8";
player_balloon_js3.nameID = "cabinet08";
player_balloon_js3.cellIndex = 0; player_balloon_js3.cellIndex = 0;
player_balloon_js3.position = new BABYLON.Vector3(-2.5, 3.5, -0.03); player_balloon_js3.position = new BABYLON.Vector3(-2.5, 3.5, -0.03);
@ -1079,8 +1097,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js4.size = 0.1; player_balloon_js4.size = 0.1;
player_balloon_js4.name = "4";
player_balloon_js4.nameID = "cabinet04";
player_balloon_js4.name = "7";
player_balloon_js4.nameID = "cabinet07";
player_balloon_js4.cellIndex = 0; player_balloon_js4.cellIndex = 0;
player_balloon_js4.position = new BABYLON.Vector3(-2.5, 3.5, 0.3); player_balloon_js4.position = new BABYLON.Vector3(-2.5, 3.5, 0.3);
@ -1096,8 +1114,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js5.size = 0.1; player_balloon_js5.size = 0.1;
player_balloon_js5.name = "5";
player_balloon_js5.nameID = "cabinet05";
player_balloon_js5.name = "6";
player_balloon_js5.nameID = "cabinet06";
player_balloon_js5.cellIndex = 0; player_balloon_js5.cellIndex = 0;
player_balloon_js5.position = new BABYLON.Vector3(-2.5, 3.5, 0.64); player_balloon_js5.position = new BABYLON.Vector3(-2.5, 3.5, 0.64);
@ -1113,8 +1131,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js6.size = 0.1; player_balloon_js6.size = 0.1;
player_balloon_js6.name = "6";
player_balloon_js6.nameID = "cabinet06";
player_balloon_js6.name = "5";
player_balloon_js6.nameID = "cabinet05";
player_balloon_js6.cellIndex = 0; player_balloon_js6.cellIndex = 0;
player_balloon_js6.position = new BABYLON.Vector3(-2.5, 3.5, 0.98); player_balloon_js6.position = new BABYLON.Vector3(-2.5, 3.5, 0.98);
@ -1130,8 +1148,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js7.size = 0.1; player_balloon_js7.size = 0.1;
player_balloon_js7.name = "7";
player_balloon_js7.nameID = "cabinet07";
player_balloon_js7.name = "4";
player_balloon_js7.nameID = "cabinet04";
player_balloon_js7.cellIndex = 0; player_balloon_js7.cellIndex = 0;
player_balloon_js7.position = new BABYLON.Vector3(-2.5, 3.5, 1.32); player_balloon_js7.position = new BABYLON.Vector3(-2.5, 3.5, 1.32);
@ -1147,8 +1165,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js8.size = 0.1; player_balloon_js8.size = 0.1;
player_balloon_js8.name = "8";
player_balloon_js8.nameID = "cabinet08";
player_balloon_js8.name = "3";
player_balloon_js8.nameID = "cabinet03";
player_balloon_js8.cellIndex = 0; player_balloon_js8.cellIndex = 0;
player_balloon_js8.position = new BABYLON.Vector3(-2.5, 3.5, 1.66); player_balloon_js8.position = new BABYLON.Vector3(-2.5, 3.5, 1.66);
player_balloon_js8.isPickable = true; player_balloon_js8.isPickable = true;
@ -1163,8 +1181,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js9.size = 0.1; player_balloon_js9.size = 0.1;
player_balloon_js9.name = "9";
player_balloon_js9.nameID = "cabinet09";
player_balloon_js9.name = "2";
player_balloon_js9.nameID = "cabinet02";
player_balloon_js9.cellIndex = 0; player_balloon_js9.cellIndex = 0;
player_balloon_js9.position = new BABYLON.Vector3(-2.5, 3.5, 2); player_balloon_js9.position = new BABYLON.Vector3(-2.5, 3.5, 2);
//-2.3895861905112934, 3.402393519214794, z: 0.3225995832152506 //-2.3895861905112934, 3.402393519214794, z: 0.3225995832152506
@ -1179,8 +1197,8 @@ var createScene = function() {
spriteManagerPlayer spriteManagerPlayer
); );
player_balloon_js10.size = 0.1; player_balloon_js10.size = 0.1;
player_balloon_js10.name = "10";
player_balloon_js10.nameID = "cabinet10";
player_balloon_js10.name = "1";
player_balloon_js10.nameID = "cabinet01";
player_balloon_js10.cellIndex = 0; player_balloon_js10.cellIndex = 0;
player_balloon_js10.position = new BABYLON.Vector3(-2.5, 3.5, 2.33); player_balloon_js10.position = new BABYLON.Vector3(-2.5, 3.5, 2.33);
player_balloon_js10.isPickable = true; player_balloon_js10.isPickable = true;

19
public/webTotal/index.js

@ -485,6 +485,25 @@ BABYLON.DefaultLoadingScreen.prototype.hideLoadingUI = function() {
scene.getMaterialByName("Desk.023").roughness = 0.72; scene.getMaterialByName("Desk.023").roughness = 0.72;
scene.getMaterialByName("Desk.024").metallic = 0.8; scene.getMaterialByName("Desk.024").metallic = 0.8;
scene.getMaterialByName("Desk.024").roughness = 0.72; scene.getMaterialByName("Desk.024").roughness = 0.72;
scene.getMeshByName("档案架01_primitive3").material = scene.getMaterialByName("10.002");
scene.getMeshByName("档案架02_primitive4").material = scene.getMaterialByName("09.002");
scene.getMeshByName("档案架03_primitive4").material = scene.getMaterialByName("08.002");
scene.getMeshByName("档案架04_primitive4").material = scene.getMaterialByName("07.002");
scene.getMeshByName("档案架05_primitive4").material = scene.getMaterialByName("06.002");
scene.getMeshByName("档案架06_primitive4").material = scene.getMaterialByName("05.002");
scene.getMeshByName("档案架07_primitive4").material = scene.getMaterialByName("04.002");
scene.getMeshByName("档案架08_primitive4").material = scene.getMaterialByName("03.002");
scene.getMeshByName("档案架09_primitive4").material = scene.getMaterialByName("02.002");
scene.getMeshByName("档案架10_primitive3").material = scene.getMaterialByName("01.002");
scene.getTransformNodeByName("档案柜01").setEnabled(false);
scene.getTransformNodeByName("档案柜02").setEnabled(false);
var v1 = scene.getMeshByName("钢轨01");
v1.position = new BABYLON.Vector3(v1.position.x,60.0,v1.position.z);
v1.scaling = new BABYLON.Vector3(1,0.9,1);
}; };
// createScene function that creates and return the scene // createScene function that creates and return the scene

11
src/api/storeManage/deviceManage/device.js

@ -91,4 +91,13 @@ export function getDeviceList(params) {
}) })
} }
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList }
// 根据区列获取在库已借数
export function FetchInBorrowByQuCol(params) {
return request({
url: 'api/tag/getInBorrowByQuCol',
method: 'get',
params
})
}
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol }

2
src/assets/styles/archives-manage.scss

@ -530,7 +530,7 @@ $arcCyan: #0FBED9;
justify-content: space-between; justify-content: space-between;
} }
.part-packing-item{ .part-packing-item{
width: calc(100%/2);
width: calc(100%/2 - 10px);
.part-packing-title{ .part-packing-title{
padding: 0 30px; padding: 0 30px;
height: 40px; height: 40px;

163
src/views/storeManage/warehouse3D/deseCabinet/index.vue

@ -1,53 +1,62 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="cabinet-top"> <div class="cabinet-top">
<p class="cabinet-info">密集架1号机 - 1 - {{ cabinetNum }} </p>
<p v-if="deviceData" class="cabinet-info">{{ deviceData.deviceName }} - {{ deviceData.areaNo }} - {{ cabinetNum }} </p>
<div class="cabinet-des"> <div class="cabinet-des">
<p>档案总数{{ total }}</p>
<p>档案总数{{ archivesNum }}</p>
<span class="cabinet-on">在库</span> <span class="cabinet-on">在库</span>
<span class="cabinet-out">已借</span> <span class="cabinet-out">已借</span>
<el-button type="primary" class="return-btn" @click="backWarehouse">3D</el-button> <el-button type="primary" class="return-btn" @click="backWarehouse">3D</el-button>
</div> </div>
</div> </div>
<div v-if="deviceData" style="color: #fff;margin-bottom: 10px;">
{{ '节total:'+ deviceData.partNo }}
{{ '层total:'+ deviceData.rowNo }}
</div>
<div class="cabinet-main"> <div class="cabinet-main">
<ul class="cabinet-row">
<li v-for="(item,index) in left" :key="index" class="cabinet-cell">
<!-- 部分借出 -->
<div v-if="item.outNum !== 0 && item.inNum !== 0" class="out-part">
<span>{{ item.outNum }}</span>
<ul v-if="deviceData" class="cabinet-row">
<!-- width: calc(100%/4 - 10px);height: calc(100%/5 - 10px); -->
<li v-for="(item,index) in left" :key="index" class="cabinet-cell" :style="cellStyle">
<div v-if="item.row_No === 5" style="font-size:12px">
<!-- <span>{{ 'index=' + (index+1) + '/借出=' + item.borrow+ '/在库=' + ( item.total - item.borrow) + '/节' + item.part_No + '/层' + item.row_No }}</span> -->
<span>{{ 'index=' + (index+1)%deviceData.rowNo + '/' + item.part_No + '节' + item.row_No + '层' }}</span>
</div> </div>
<!-- 部分借出 -->
<!-- <div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="out-part">
<span>{{ 'index=' + index + '/部分借出=' + item.borrow + '/节' + item.part_No + '/层' + item.row_No }}</span>
</div> -->
<!-- 部分在库 --> <!-- 部分在库 -->
<div v-if="item.outNum !== 0 && item.inNum !== 0" class="in-part">
<span>{{ item.inNum }}</span>
</div>
<!-- <div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="in-part">
<span>{{ 'index=' + index + '/部分在库=' + ( item.total - item.borrow) + '/节' + item.part_No + '/层' + item.row_No }}</span>
</div> -->
<!-- 全部借出 --> <!-- 全部借出 -->
<div v-if="item.outNum !== 0 && item.inNum === 0" class="out-all">
<span>{{ item.outNum }}</span>
</div>
<!-- <div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="out-all">
<span>{{ 'index=' + index + '/全部借出=' + item.borrow + '/节' + item.part_No + '/层' + item.row_No }}</span>
</div> -->
<!-- 全部在库 --> <!-- 全部在库 -->
<div v-if="item.outNum === 0 && item.inNum !== 0" class="in-all">
<span>{{ item.inNum }}</span>
</div>
<!-- <div v-if="item.borrow === 0 && item.total - item.borrow == 0" class="in-all">
<span>{{ 'index=' + index + '/全部在库=' + ( item.total - item.borrow) + '/节' + item.part_No + '/层' + item.row_No }}</span>
</div> -->
</li> </li>
</ul> </ul>
<div :class="['cabinet-panel', isFixed ? 'fixed-panel' : '']" /> <div :class="['cabinet-panel', isFixed ? 'fixed-panel' : '']" />
<ul class="cabinet-row"> <ul class="cabinet-row">
<li v-for="(item,index) in right" :key="index" class="cabinet-cell"> <li v-for="(item,index) in right" :key="index" class="cabinet-cell">
<!-- 部分借出 --> <!-- 部分借出 -->
<div v-if="item.outNum !== 0 && item.inNum !== 0" class="out-part">
<span>{{ item.outNum }}</span>
<div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="out-part">
<span>{{ item.borrow }}</span>
</div> </div>
<!-- 部分在库 --> <!-- 部分在库 -->
<div v-if="item.outNum !== 0 && item.inNum !== 0" class="in-part">
<span>{{ item.inNum }}</span>
<div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="in-part">
<span>{{ item.total - item.borrow }}</span>
</div> </div>
<!-- 全部借出 --> <!-- 全部借出 -->
<div v-if="item.outNum !== 0 && item.inNum === 0" class="out-all">
<span>{{ item.outNum }}</span>
<div v-if="item.borrow !== 0 && item.total - item.borrow !== 0" class="out-all">
<span>{{ item.borrow }}</span>
</div> </div>
<!-- 全部在库 --> <!-- 全部在库 -->
<div v-if="item.outNum === 0 && item.inNum !== 0" class="in-all">
<span>{{ item.inNum }}</span>
<div v-if="item.borrow === 0 && item.total - item.borrow !== 0" class="in-all">
<span>{{ item.total - item.borrow }}</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -62,34 +71,113 @@
</template> </template>
<script> <script>
import { FetchGetArchivesNum } from '@/api/archivesManage/statistics'
import { getDeviceList, FetchInBorrowByQuCol } from '@/api/storeManage/deviceManage/device'
import data from './data.json' import data from './data.json'
export default { export default {
name: 'DeseCabinet', name: 'DeseCabinet',
data() { data() {
return { return {
// D6490DA3D4261E8C26D0E3
// 8F68A6B645B34B00B7ADFE
storeroomId: '8F68A6B645B34B00B7ADFE', // id
deviceData: null, // data
cabinetNum: null, // num cabinetNum: null, // num
isFixed: false, // isFixed: false, //
total: null, //
archivesNum: null, //
left: [], // left: [], //
right: [] // right: [] //
} }
}, },
computed: {
cellStyle: function() {
const w = '100%/' + this.deviceData.partNo
const h = '100%/' + this.deviceData.rowNo
return { width: `calc(${w} - 10px)`, height: `calc(${h}- 10px)` }
}
},
created() { created() {
this.getData() this.getData()
this.handleArchivesNum()
this.getDeviceListAll()
}, },
mounted() { mounted() {
if (parseInt(localStorage.getItem('cabinetNum'))) { if (parseInt(localStorage.getItem('cabinetNum'))) {
this.cabinetNum = parseInt(localStorage.getItem('cabinetNum')) this.cabinetNum = parseInt(localStorage.getItem('cabinetNum'))
this.isFixed = this.cabinetNum === 10
this.isFixed = this.cabinetNum === 1
} else { } else {
this.cabinetNum = 0 this.cabinetNum = 0
} }
}, },
methods: { methods: {
// getDeviceList
getData() { getData() {
this.total = data.totalData this.total = data.totalData
this.left = data.leftData
this.right = data.rightData
// this.left = data.leftData
// this.right = data.rightData
},
//
handleArchivesNum() {
FetchGetArchivesNum().then(data => {
this.archivesNum = data
})
},
getDeviceListAll() {
const params = {
page: 0,
size: 10,
sort: 'sequence,asc',
storeroomId: this.storeroomId
}
getDeviceList(params).then(data => {
data.content.map(item => {
if (item.deviceTypeId.name === '密集架') {
this.deviceData = item
this.getInBorrowByQuCol()
}
})
})
},
async getInBorrowByQuCol() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo,
colNo: this.cabinetNum
}
FetchInBorrowByQuCol(params).then(data => {
console.log(data)
data.forEach(item => {
if (item.direction === '左') {
this.left.push(item)
}
if (item.direction === '右') {
this.right.push(item)
}
})
// console.log('left', this.left)
// console.log('right', this.right)
// this.left = this.sortList(this.left, 5)
// console.log(this.left)
})
},
sortList(list, rows) {
const sortedList = []
let rowIndex = 0
for (var i = 0; i < rows; i++) {
sortedList[i] = []
}
list.forEach(item => {
sortedList[rowIndex++].push(item)
if ((rowIndex + 1) === rows) {
rowIndex = 0
}
})
return sortedList
}, },
// 3D // 3D
backWarehouse() { backWarehouse() {
@ -161,20 +249,19 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
color: #fff; color: #fff;
text-align: center; text-align: center;
margin-left: -10px;
.cabinet-cell{ .cabinet-cell{
width: calc(100%/5 - 10px);
height: calc(100%/6 - 10px);
margin: 0 10px 10px 0;
margin: 0 0 10px 10px;
font-size: 20px; font-size: 20px;
background-color: #02255F; background-color: #02255F;
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
&:nth-last-of-type(-n+5) {
margin-bottom: 0;
}
&:nth-child(5n){
margin-right: 0;
}
// &:nth-last-of-type(-n+4) {
// margin-bottom: 0;
// }
// &:nth-child(4n){
// margin-right: 0;
// }
} }
.in-all, .out-all, .out-part, .in-part{ .in-all, .out-all, .out-part, .in-part{
position: relative; position: relative;
@ -203,7 +290,7 @@ export default {
} }
.cabinet-panel{ .cabinet-panel{
width: 140px; width: 140px;
margin-right: 10px;
margin-left: 10px;
background: url('~@/assets/images/panel-n.png') no-repeat; background: url('~@/assets/images/panel-n.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }

3
src/views/system/archiveStatistics/module/barEcharts.vue

@ -1,7 +1,6 @@
<template> <template>
<!-- 出入库管理情况 -->
<div id="main1" :style="{height:height,width:width}" /> <div id="main1" :style="{height:height,width:width}" />
</template> </template>
<script> <script>

2
src/views/system/archiveStatistics/module/lineEchart.vue

@ -1,5 +1,5 @@
<template> <template>
<!-- 档案检索排名 -->
<!-- 档案实际情况 -->
<div id="main3" :style="{height:height,width:width}" /> <div id="main3" :style="{height:height,width:width}" />
</template> </template>

Loading…
Cancel
Save