This commit is contained in:
fan 2020-06-12 16:15:30 +08:00
commit 2e82a362af
15 changed files with 92 additions and 42 deletions

View File

@ -9,7 +9,7 @@
<i class="el-icon-arrow-right" /> <i class="el-icon-arrow-right" />
</div> </div>
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}"> <ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}">
<div class="menu-pop"> <div class="menu-pop pop-menu">
<div v-show="isShow" class="arrow el-icon-arrow-down" /> <div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" /> <pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" />
<div v-show="isShow" class="arrow el-icon-arrow-up" /> <div v-show="isShow" class="arrow el-icon-arrow-up" />
@ -56,7 +56,7 @@ export default {
data() { data() {
return { return {
active: -1, active: -1,
allowedColor: '#666', allowedColor: '#000',
disabledColor: '#ccc' disabledColor: '#ccc'
}; };
}, },
@ -162,11 +162,12 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-direction: row;
padding-right: 3px; padding-right: 3px;
} }
.menu-item { .menu-item {
background: $bg; // background: $bg;
list-style: none; list-style: none;
} }

View File

@ -236,8 +236,10 @@ class Iscs {
} }
resize(opt) { resize(opt) {
// console.log(opt, 'resize');
// debugger;
this.$iscsZr.resize(opt); this.$iscsZr.resize(opt);
this.$painter.updateZrSize(opt); this.$painter.updateZrSize(opt); // 判断元素显示隐藏
} }
refresh() { refresh() {

View File

@ -1,4 +1,4 @@
import deviceType from './constant/deviceType'; // import deviceType from './constant/deviceType';
import {createTransform, createBoundingRect} from './utils/parser'; import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle { class TransformHandle {

View File

@ -148,13 +148,15 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) { scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"]; console.log(scope.stationtexture);
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true; if(scope.stationtexture["stationlist"]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"]; scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true; }
if(scope.stationtexture["pingbimen"]){
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
}
animate(); animate();
}) })
}); });
@ -225,13 +227,14 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
} }
if (data._type == "Psd") { if (data._type == "Psd") {
console.log(data);
scope.modelmanager.standmodel.code = data.code; scope.modelmanager.standmodel.code = data.code;
scope.showmodel = scope.modelmanager.standmodel.mesh; scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
if(scope.stationtexture[psdtexturemap[data.standCode]]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
} }
if(scope.showmodel){ if(scope.showmodel){
@ -272,12 +275,13 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
} }
if (data._type == "Psd") {; if (data._type == "Psd") {
scope.showmodel = scope.modelmanager.standmodel.mesh; scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]]; if(scope.stationtexture[psdtexturemap[data.standCode]]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true; scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
} }
initstatus(data); initstatus(data);
} }

View File

@ -96,6 +96,9 @@ export default {
padding: 0; padding: 0;
padding-left: 20px; padding-left: 20px;
} }
.xian-01__systerm.pop-menu .container{
border-left: 1px solid #ccc;
}
.xian-01__systerm.pop-menu .dsp-block { .xian-01__systerm.pop-menu .dsp-block {
display: block; display: block;
text-align: left; text-align: left;

View File

@ -2,7 +2,7 @@
<div class="bigSystemBox"> <div class="bigSystemBox">
<div class="title-name">{{ $route.query.stationName }}机电隧道通风</div> <div class="title-name">{{ $route.query.stationName }}机电隧道通风</div>
<div class=""> <div class="">
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="700" /> <iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="700" />
</div> </div>
</div> </div>
</template> </template>
@ -14,8 +14,22 @@ export default {
}, },
data() { data() {
return { return {
width: 1300
}; };
}, },
watch: {
'$store.state.iscs.selectedCount': function() {
const device = this.$store.state.iscs.selected;
if (device && device._type === 'IscsButton' && device.function === 'OperatingButton') {
this.width = 1300;
this.$refs.iscsPlate.show('29');
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
this.width = 1300;
this.$refs.iscsPlate.show('28');
}
// console.log(this.width, '');
}
},
mounted() { mounted() {
this.$refs.iscsPlate.show('28'); this.$refs.iscsPlate.show('28');
}, },

View File

@ -153,8 +153,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// this.width = this.$store.state.config.width; // this.width = this.$store.state.config.width;
// this.height = this.$store.state.config.height; // this.height = this.$store.state.config.height;
this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight }); // this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight });
}); });
this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight });
}, },
iscsDestroy() { iscsDestroy() {
if (this.$iscs) { if (this.$iscs) {

View File

@ -1,4 +1,5 @@
<template> <template>
<!-- -->
<div class="main" :style="{width: canvasWidth+'px'}"> <div class="main" :style="{width: canvasWidth+'px'}">
<div v-show="panelShow" :panelShow="panelShow"> <div v-show="panelShow" :panelShow="panelShow">
<transition name="el-zoom-in-bottom"> <transition name="el-zoom-in-bottom">
@ -311,6 +312,9 @@ export default {
'size.width': function(val) { 'size.width': function(val) {
this.setWindowSize(); this.setWindowSize();
}, },
'size.height': function(val) {
this.setWindowSize();
},
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.setWindowSize(); this.setWindowSize();
}, },
@ -679,6 +683,7 @@ export default {
} }
}, },
switchStationMode(val) { switchStationMode(val) {
debugger;
if (this.stationList.length > 0) { if (this.stationList.length > 0) {
if (val == null) { if (val == null) {
this.showStation = this.stationList[0].value; this.showStation = this.stationList[0].value;

View File

@ -1,14 +1,15 @@
<template> <template>
<div class="script-parent"> <!-- <div class="script-parent"> -->
<!-- <div class="script-card" :style="{width: widthLeft+'px'}"> --> <!-- <div class="script-card" :style="{width: widthLeft+'px'}"> -->
<!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> --> <!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> -->
<!-- </div> --> <!-- </div> -->
<!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> --> <!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> -->
<!-- <div class="script-display"> --> <!-- <div class="script-display"> -->
<display ref="display" :size="size" /> <display ref="display" :size="size" />
<!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> --> <!-- -->
<!-- </div> --> <!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> -->
</div> <!-- </div> -->
<!-- </div> -->
</template> </template>
<script> <script>
@ -34,20 +35,17 @@ export default {
}; };
}, },
watch: { watch: {
// canvasSizeCount
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width, height: this.$store.state.app.height}; this.$nextTick(function() {
this.size = { width: this.$store.state.app.width, height: this.$store.state.app.height};
});
} }
// widthLeft: function(val) { // widthLeft: function(val) {
// this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height}; // this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
// } // }
}, },
methods: { methods: {
drapWidth(width) {
this.widthLeft = Number(width);
}
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -85,6 +85,9 @@ export default {
}, },
'$store.state.scriptRecord.bgSet': function (val) { '$store.state.scriptRecord.bgSet': function (val) {
this.backDisabled = val; this.backDisabled = val;
},
'$store.state.scriptRecord.simulationPause': function(val) {
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
} }
}, },
beforeDestroy() { beforeDestroy() {
@ -118,8 +121,27 @@ export default {
this.isShow = true; this.isShow = true;
} }
}, },
changeRole() { changeRole(member) {
if (member) {
// this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
this.switchMode(member);
}
},
switchMode(role) {
let prdType = '';
const memberInfo = this.memberList.find(member=>{
return member.id == role;
});
if (memberInfo) {
if (memberInfo.role == '行值') {
prdType = '01';
} else if (memberInfo.role == '行调') {
prdType = '02';
} else if (memberInfo.role == '司机') {
prdType = '04';
}
}
this.$store.dispatch('training/setPrdType', prdType);
}, },
covert(data, roleTypeList) { covert(data, roleTypeList) {
let lastData = data; let lastData = data;
@ -243,11 +265,10 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
z-index: 2;
} }
.scriptPanelRight{ .scriptPanelRight{
display: inline-block;
width: 680px; width: 680px;
vertical-align: top;
} }
.scriptRecordNew{ .scriptRecordNew{
position: absolute; position: absolute;
@ -274,6 +295,7 @@ export default {
padding: 10px; padding: 10px;
background: #fff; background: #fff;
border-radius: 5px 5px 0px 0px ; border-radius: 5px 5px 0px 0px ;
height: 380px;
box-shadow: -1px -1px 3px #656565; box-shadow: -1px -1px 3px #656565;
} }
.scriptPanelRight{ .scriptPanelRight{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB