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