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" />
</div>
<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" />
<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" />
@ -56,7 +56,7 @@ export default {
data() {
return {
active: -1,
allowedColor: '#666',
allowedColor: '#000',
disabledColor: '#ccc'
};
},
@ -162,11 +162,12 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
padding-right: 3px;
}
.menu-item {
background: $bg;
// background: $bg;
list-style: none;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
<div class="bigSystemBox">
<div class="title-name">{{ $route.query.stationName }}机电隧道通风</div>
<div class="">
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="700" />
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="700" />
</div>
</div>
</template>
@ -14,8 +14,22 @@ export default {
},
data() {
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() {
this.$refs.iscsPlate.show('28');
},

View File

@ -153,8 +153,9 @@ export default {
this.$nextTick(() => {
// this.width = this.$store.state.config.width;
// 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() {
if (this.$iscs) {

View File

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

View File

@ -1,14 +1,15 @@
<template>
<div class="script-parent">
<!-- <div class="script-card" :style="{width: widthLeft+'px'}"> -->
<!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> -->
<!-- </div> -->
<!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> -->
<!-- <div class="script-display"> -->
<display ref="display" :size="size" />
<!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> -->
<!-- </div> -->
</div>
<!-- <div class="script-parent"> -->
<!-- <div class="script-card" :style="{width: widthLeft+'px'}"> -->
<!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> -->
<!-- </div> -->
<!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> -->
<!-- <div class="script-display"> -->
<display ref="display" :size="size" />
<!-- -->
<!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> -->
<!-- </div> -->
<!-- </div> -->
</template>
<script>
@ -34,20 +35,17 @@ export default {
};
},
watch: {
// canvasSizeCount
'$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) {
// this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
// }
},
methods: {
drapWidth(width) {
this.widthLeft = Number(width);
}
}
};
</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) {
this.backDisabled = val;
},
'$store.state.scriptRecord.simulationPause': function(val) {
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
}
},
beforeDestroy() {
@ -118,8 +121,27 @@ export default {
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) {
let lastData = data;
@ -243,11 +265,10 @@ export default {
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.scriptPanelRight{
display: inline-block;
width: 680px;
vertical-align: top;
}
.scriptRecordNew{
position: absolute;
@ -274,6 +295,7 @@ export default {
padding: 10px;
background: #fff;
border-radius: 5px 5px 0px 0px ;
height: 380px;
box-shadow: -1px -1px 3px #656565;
}
.scriptPanelRight{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB