Merge remote-tracking branch 'origin/thailand' into thailand
This commit is contained in:
commit
de0d06c994
@ -55,16 +55,6 @@ export default {
|
||||
title: 'Signal Device Control',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: 'Operation Plan',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: 'Plan Details:',
|
||||
operate: '',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
<train-operation ref="trainOperation" />
|
||||
<switch-control ref="switchControl" />
|
||||
<signal-control ref="signalControl" />
|
||||
<operation-plan-detail ref="operationPlanDetail" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -14,6 +15,7 @@ import { mapGetters } from 'vuex';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import TrainFixedPathPane from './menuDialog/trainFixedPathPane';
|
||||
import OperationPlanDetail from './menuDialog/operationPlanDetail.vue';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
@ -32,7 +34,8 @@ export default {
|
||||
StationControlConvert,
|
||||
TrainOperation,
|
||||
SwitchControl,
|
||||
SignalControl
|
||||
SignalControl,
|
||||
OperationPlanDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -120,14 +123,10 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Operation Plan',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: 'Plan Details',
|
||||
operate: '',
|
||||
click: this.openPlanDetail,
|
||||
children: []
|
||||
}
|
||||
]
|
||||
@ -314,6 +313,9 @@ export default {
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
openPlanDetail() {
|
||||
this.$refs.operationPlanDetail.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -15,6 +15,7 @@
|
||||
ref="detailTable"
|
||||
class="table"
|
||||
:data="detailData"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
@ -29,32 +30,43 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { getSandTableRunPlanDetail } from '@/api/simulation'
|
||||
import { getSandTableRunPlanDetail } from '@/api/simulation';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
detailData: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async doShow() {
|
||||
this.dialogShow = true
|
||||
const resp = await getSandTableRunPlanDetail(this.$route.query.group)
|
||||
this.detailData = resp.data
|
||||
console.log(resp)
|
||||
this.dialogShow = true;
|
||||
const resp = await getSandTableRunPlanDetail(this.$route.query.group);
|
||||
this.detailData = resp.data;
|
||||
console.log(resp);
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false
|
||||
this.$store.dispatch('training/emitTipFresh')
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
tableRowClassName({ row }) {
|
||||
if (row.finished) {
|
||||
return 'finished';
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ {
|
||||
.el-table .finished {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sandTableRunAsPlan, setOccupy } from '@/api/simulation';
|
||||
import { sandTableRunAsPlan } from '@/api/simulation';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'SetOperationPlanDialog',
|
||||
@ -99,11 +99,6 @@ export default {
|
||||
const sectionCodes = this.formData.map(_ => _.trackCode);
|
||||
const runData = this.formData;
|
||||
try {
|
||||
const res = await setOccupy(simulationId, sectionCodes.join(','));
|
||||
if (res.code !== 200) {
|
||||
console.err(res);
|
||||
return;
|
||||
}
|
||||
await sandTableRunAsPlan(simulationId, runData);
|
||||
this.doClose();
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user