fix:更改模型放大倍数限制

This commit is contained in:
shijing 2024-06-27 17:06:49 +08:00
parent 0bf861cac2
commit 9b84b4f991
1 changed files with 48 additions and 22 deletions

View File

@ -2,7 +2,7 @@
<div class="container"> <div class="container">
<header class="pageHeader"> <header class="pageHeader">
<span class="top-line top-line-left"></span> <span class="top-line top-line-left"></span>
{{ factoryName }} 凌源特种水泥数智化管控平台
<span class="top-line top-line-right"></span> <span class="top-line top-line-right"></span>
</header> </header>
<div id="model" class="model"> <div id="model" class="model">
@ -132,10 +132,11 @@
prop="code" prop="code"
label="位号" label="位号"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column label="数值">
prop="value" <template #default="scope">
label="数值" {{ scope.row.last_data.last_val }}
></el-table-column> </template>
</el-table-column>
<el-table-column label="状态" width="50"> <el-table-column label="状态" width="50">
<template #default="scope"> <template #default="scope">
<div <div
@ -407,11 +408,11 @@ export default {
]), ]),
], ],
sectionNames: { sectionNames: {
石灰石破碎筛分生产系统_primitive1: "石灰石破碎", 石灰石破碎筛分生产系统: "石灰石破碎",
原料磨_primitive3: "原料磨", 原料磨: "原料磨",
回转窑: "回转窑", 回转窑: "回转窑",
煤磨_primitive1: "煤磨", 煤磨: "煤磨",
余热发电_primitive2: "余热发电", 余热发电: "余热发电",
}, },
totalData: { totalData: {
total_production: 0, total_production: 0,
@ -426,9 +427,12 @@ export default {
{ name: "余热发电", value: 0 }, { name: "余热发电", value: 0 },
], ],
hotData: { hotData: {
total_production: 0, total_production: "",
production_elec_unit: 0, production_elec_unit: "",
elec_consume: 0, elec_consume: "",
NOx: "",
SO2: "",
klw: "",
}, },
tableData: [], tableData: [],
tezhongData: [], tezhongData: [],
@ -1057,8 +1061,8 @@ export default {
camera.attachControl(canvas, true); camera.attachControl(canvas, true);
camera.maxZ = 1000; // camera.maxZ = 1000; //
// //
camera.lowerRadiusLimit = 10; camera.lowerRadiusLimit = 8;
camera.upperRadiusLimit = 30; camera.upperRadiusLimit = 20;
// //
const light = new BABYLON.HemisphericLight( const light = new BABYLON.HemisphericLight(
@ -1113,7 +1117,7 @@ export default {
mesh_name.color = "white"; mesh_name.color = "white";
mesh_name.fontSize = "14px"; mesh_name.fontSize = "14px";
mesh_rect.addControl(mesh_name); mesh_rect.addControl(mesh_name);
var remoteGlbUrl = config.HOST_URL + "/media/model/ly6.glb"; var remoteGlbUrl = config.HOST_URL + "/media/model/lyx2.glb";
// var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/factory.glb"; // var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/factory.glb";
BABYLON.SceneLoader.Append( BABYLON.SceneLoader.Append(
remoteGlbUrl, remoteGlbUrl,
@ -1125,9 +1129,7 @@ export default {
const value = that.sectionNames[key]; const value = that.sectionNames[key];
const mesh = scene.getMeshByName(key); const mesh = scene.getMeshByName(key);
if (mesh) { if (mesh) {
console.log(value); // that.createImgLabel(value, mesh);
console.log(mesh);
that.createImgLabel(value, mesh);
that.getMgroupChartData(value, mesh); that.getMgroupChartData(value, mesh);
// // panel // // panel
@ -1348,7 +1350,7 @@ export default {
let that = this; let that = this;
let imgUrl = ""; let imgUrl = "";
if (value == "石灰石破碎") { if (value == "石灰石破碎") {
imgUrl = "img/ly/shsps.png"; imgUrl = "img/ly/ps.png";
} else if (value == "原料磨") { } else if (value == "原料磨") {
imgUrl = "img/ly/ylm.png"; imgUrl = "img/ly/ylm.png";
} else if (value == "煤磨") { } else if (value == "煤磨") {
@ -1383,7 +1385,30 @@ export default {
that.$API.enm.enstat.req(query).then((res) => { that.$API.enm.enstat.req(query).then((res) => {
let info = { let info = {
name: value, name: value,
rows: [ rows: [],
};
if (value == "余热发电") {
info.rows = [
{
label: "发电量(t)",
field: "total_production",
value: res[0].total_production,
},
{
label: "运转率(%)",
field: "run_rate",
value: res[0].run_rate,
},
{
label: "吨熟料发电量(kwh)",
field: "elec_consume_unit",
value: res[0].production_elec_unit
? res[0].production_elec_unit
: "0.00",
},
];
} else {
info.rows = [
{ {
label: "产品产量(t)", label: "产品产量(t)",
field: "total_production", field: "total_production",
@ -1399,8 +1424,9 @@ export default {
field: "elec_consume_unit", field: "elec_consume_unit",
value: res[0].elec_consume_unit, value: res[0].elec_consume_unit,
}, },
], ];
}; }
that.createDetailPanel(info, mesh); that.createDetailPanel(info, mesh);
}); });
}, },