ibp布局调整
This commit is contained in:
parent
24a7a0204a
commit
1ee0aeb785
@ -2,7 +2,7 @@
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="mapPaint">
|
||||
<div class="map-view">
|
||||
<ibp-plate ref="ibpPlate" />
|
||||
<ibp-plate ref="ibpPlate" :size="size"/>
|
||||
</div>
|
||||
<div class="map-draft">
|
||||
<ibp-operate ref="ibpOperate" />
|
||||
@ -27,7 +27,11 @@ export default {
|
||||
autoSaveTask: null,
|
||||
selected: null,
|
||||
mapInfo: { name: '' },
|
||||
timeDemon: null
|
||||
timeDemon: null,
|
||||
size: {
|
||||
width: this.$store.state.app.width-521,
|
||||
height: this.$store.state.app.height-60
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -32,9 +32,18 @@ export default {
|
||||
},
|
||||
showBackButton: true,
|
||||
initZrender: false,
|
||||
initTime: ''
|
||||
initTime: '',
|
||||
started: false
|
||||
};
|
||||
},
|
||||
props: {
|
||||
size: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'canvasWidth',
|
||||
@ -51,15 +60,21 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
const width = this.$store.state.app.width;
|
||||
const height = this.$store.state.app.height;
|
||||
this.$store.dispatch('config/resize', { width: width- 521, height: height - 60 });
|
||||
const width = this.size ? this.size.width : this.$store.state.app.width;
|
||||
const height = this.size ? this.size.height :this.$store.state.app.height;
|
||||
this.$store.dispatch('config/resize', { width: width, height: height});
|
||||
},
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
this.initTime = initTime;
|
||||
if (this.$ibp) {
|
||||
this.initClockTime(initTime);
|
||||
}
|
||||
},
|
||||
'$store.state.training.started': function (started) {
|
||||
this.started = started;
|
||||
if (this.$ibp){
|
||||
this.setClockStart(started);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -116,9 +131,9 @@ export default {
|
||||
},
|
||||
setWindowSize() {
|
||||
this.$nextTick(() => {
|
||||
const width = this.$store.state.app.width;
|
||||
const height = this.$store.state.app.height;
|
||||
this.$store.dispatch('config/resize', { width: width- 521, height: height - 60 });
|
||||
const width = this.size ? this.size.width : this.$store.state.app.width;
|
||||
const height = this.size ? this.size.height :this.$store.state.app.height;
|
||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||
});
|
||||
},
|
||||
back() {
|
||||
@ -141,6 +156,10 @@ export default {
|
||||
// 初始化电子表时间
|
||||
initClockTime(initTime) {
|
||||
this.$ibp.initClockTime(initTime);
|
||||
},
|
||||
//设置电子时钟开始或停止
|
||||
setClockStart(started) {
|
||||
this.$ibp.setClockStart(started);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user