修改继电器显示逻辑

This commit is contained in:
sunzhenyu 2020-01-07 10:51:19 +08:00
parent 60e1750611
commit 7acd86d332
3 changed files with 31 additions and 31 deletions

View File

@ -191,6 +191,7 @@ export function Jl3ddevice(dom,serviceid) {
animate();
});
this.sendmsg = function (type,index){
// console.log(index);
let msg = {
// deskId:serviceid,
id:index+1,

View File

@ -164,7 +164,6 @@ function fbxpromise(asset,mixers,model){
}
}
console.log(asset);
object.name = asset.name;
model.mesh = object;

View File

@ -37,10 +37,10 @@
</div>
<div class="statusdiv">JWJXC-1700
</div>
<div class="statusdiv">JPJXC-1000
</div>
<div class="statusdiv">JZJXC-H18
</div>
<div class="statusdiv">JPJXC-1000
</div>
<div class="statusdiv">JPJXC-480
</div>
@ -50,10 +50,10 @@
</div>
<div class="statusdiv">状态:{{statsc1700}}
</div>
<div class="statusdiv">状态:{{stats1000}}
</div>
<div class="statusdiv">状态:{{statsh18}}
</div>
<div class="statusdiv">状态:{{stats1000}}
</div>
<div class="statusdiv">状态:{{stats480}}
</div>
@ -63,10 +63,10 @@
</div>
<div class="statusdiv" @click="switchc1700">{{textc1700}}
</div>
<div class="statusdiv" @click="switch1000">{{text1000}}
</div>
<div class="statusdiv" @click="switchh18">{{texth18}}
</div>
<div class="statusdiv" @click="switch1000">{{text1000}}
</div>
<div class="statusdiv" @click="switch480">{{text480}}
</div>
</div>
@ -237,32 +237,32 @@
this.jl3d.upmodelaction(1,2);
}
}
if(data[3].on != this.on1000){
if(data[3].on != this.onh18){
if(data[3].on == true){
this.text1000 = "开";
this.stats1000 = "on";
this.on1000 = true;
this.jl3d.upmodelaction(0,3);
}
if(data[3].on == false){
this.text1000 = "关";
this.stats1000 = "off";
this.on1000 = false;
this.jl3d.upmodelaction(1,3);
}
}
if(data[4].on != this.onh18){
if(data[4].on == true){
this.texth18 = "开";
this.statsh18 = "on";
this.onh18 = true;
this.jl3d.upmodelaction(0,4);
this.jl3d.upmodelaction(0,3);
}
if(data[4].on == false){
if(data[3].on == false){
this.texth18 = "关";
this.statsh18 = "off";
this.onh18 = false;
this.jl3d.upmodelaction(1,3);
}
}
if(data[4].on != this.on1000){
if(data[4].on == true){
this.text1000 = "开";
this.stats1000 = "on";
this.on1000 = true;
this.jl3d.upmodelaction(0,4);
}
if(data[4].on == false){
this.text1000 = "关";
this.stats1000 = "off";
this.on1000 = false;
this.jl3d.upmodelaction(1,4);
}
}
@ -308,20 +308,20 @@
this.jl3d.sendmsg(1,2);
}
},
switch1000(){
if(this.stats1000 == "off"){
switchh18(){
if(this.statsh18 == "off"){
this.jl3d.sendmsg(0,3);
}else if(this.stats1000 == "on"){
}else if(this.statsh18 == "on"){
this.jl3d.sendmsg(1,3);
}
},
switchh18(){
if(this.statsh18 == "off"){
switch1000(){
if(this.stats1000 == "off"){
this.jl3d.sendmsg(0,4);
}else if(this.statsh18 == "on"){
}else if(this.stats1000 == "on"){
this.jl3d.sendmsg(1,4);
}