2019-12-30 09:00:16 +08:00
|
|
|
<template>
|
|
|
|
<div v-show="show" class="run-plan-dialog">
|
2020-04-21 15:08:27 +08:00
|
|
|
<plan-schedule ref="planSchedule" :group="group" @back="doClose" />
|
2019-12-30 09:00:16 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-04-21 15:08:27 +08:00
|
|
|
import PlanSchedule from '@/views/planSchedule/index';
|
|
|
|
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
2020-04-21 18:43:10 +08:00
|
|
|
|
2019-12-30 09:00:16 +08:00
|
|
|
// 运行图加载
|
|
|
|
export default {
|
|
|
|
name: 'RunPlanLoad',
|
2020-04-21 15:08:27 +08:00
|
|
|
components: {
|
|
|
|
PlanSchedule
|
|
|
|
},
|
2019-12-30 09:00:16 +08:00
|
|
|
props: {
|
|
|
|
group: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
menus: null,
|
|
|
|
show: false
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
title() {
|
|
|
|
return this.$t('display.runPlan.runDiagramPlanTool');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
2020-04-21 15:08:27 +08:00
|
|
|
'$store.state.socket.runPlanReloadCount': function (val) {
|
2020-04-21 18:43:10 +08:00
|
|
|
getEveryDayRunPlanNew(this.group).then(resp => {
|
|
|
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
|
|
|
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
|
|
|
this.viewDisabled = false;
|
|
|
|
}).catch(error => {
|
|
|
|
this.$store.dispatch('runPlan/setPlanData', []);
|
|
|
|
if (error.code == 30001) {
|
|
|
|
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
|
|
|
} else {
|
|
|
|
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
|
|
|
}
|
|
|
|
});
|
2019-12-30 09:00:16 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2020-04-21 15:08:27 +08:00
|
|
|
// this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
|
2019-12-30 09:00:16 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
doShow() {
|
|
|
|
this.show = true;
|
2020-04-21 15:08:27 +08:00
|
|
|
this.$refs.planSchedule.setPosition();
|
2019-12-30 09:00:16 +08:00
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.show = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.run-plan-dialog {
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-moz-user-select: none;
|
|
|
|
-ms-user-select: none;
|
|
|
|
user-select: none;
|
|
|
|
position: absolute;
|
2020-08-03 19:21:56 +08:00
|
|
|
z-index: 36;
|
2019-12-30 09:00:16 +08:00
|
|
|
top: 0px;
|
|
|
|
left: 0px;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: white;
|
|
|
|
}
|
|
|
|
</style>
|