Merge remote-tracking branch 'origin/thailand' into thailand

This commit is contained in:
joylink_zhangsai 2023-07-10 14:17:51 +08:00
commit de0d06c994
5 changed files with 34 additions and 35 deletions

View File

@ -55,16 +55,6 @@ export default {
title: 'Signal Device Control', title: 'Signal Device Control',
operate: '', operate: '',
children: [] children: []
},
{
title: 'Operation Plan',
operate: '',
children: []
},
{
title: 'Plan Details:',
operate: '',
children: []
} }
] ]
}; };

View File

@ -7,6 +7,7 @@
<train-operation ref="trainOperation" /> <train-operation ref="trainOperation" />
<switch-control ref="switchControl" /> <switch-control ref="switchControl" />
<signal-control ref="signalControl" /> <signal-control ref="signalControl" />
<operation-plan-detail ref="operationPlanDetail" />
</div> </div>
</template> </template>
<script> <script>
@ -14,6 +15,7 @@ import { mapGetters } from 'vuex';
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'; import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import TrainFixedPathPane from './menuDialog/trainFixedPathPane'; import TrainFixedPathPane from './menuDialog/trainFixedPathPane';
import OperationPlanDetail from './menuDialog/operationPlanDetail.vue';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation'; import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation';
import ViewName from './menuDialog/viewName'; import ViewName from './menuDialog/viewName';
@ -32,7 +34,8 @@ export default {
StationControlConvert, StationControlConvert,
TrainOperation, TrainOperation,
SwitchControl, SwitchControl,
SignalControl SignalControl,
OperationPlanDetail
}, },
data() { data() {
return { return {
@ -120,14 +123,10 @@ export default {
} }
] ]
}, },
{
title: 'Operation Plan',
operate: '',
children: []
},
{ {
title: 'Plan Details', title: 'Plan Details',
operate: '', operate: '',
click: this.openPlanDetail,
children: [] children: []
} }
] ]
@ -314,6 +313,9 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
openPlanDetail() {
this.$refs.operationPlanDetail.doShow();
} }
} }
}; };

View File

@ -5,7 +5,7 @@
title="Operation Plan Detail" title="Operation Plan Detail"
:visible.sync="show" :visible.sync="show"
width="660px" width="660px"
height="500px" height="500px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
@ -15,6 +15,7 @@
ref="detailTable" ref="detailTable"
class="table" class="table"
:data="detailData" :data="detailData"
:row-class-name="tableRowClassName"
border border
style="width: 100%" style="width: 100%"
size="mini" size="mini"
@ -29,32 +30,43 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getSandTableRunPlanDetail } from '@/api/simulation' import { getSandTableRunPlanDetail } from '@/api/simulation';
export default { export default {
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
detailData: [], detailData: [],
} };
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
}, },
methods: { methods: {
async doShow() { async doShow() {
this.dialogShow = true this.dialogShow = true;
const resp = await getSandTableRunPlanDetail(this.$route.query.group) const resp = await getSandTableRunPlanDetail(this.$route.query.group);
this.detailData = resp.data this.detailData = resp.data;
console.log(resp) console.log(resp);
}, },
doClose() { doClose() {
this.dialogShow = false this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh') this.$store.dispatch('training/emitTipFresh');
},
tableRowClassName({ row }) {
if (row.finished) {
return 'finished';
}
}, },
}, },
} };
</script> </script>
<style scoped></style> <style lang="scss" scoped>
/deep/ {
.el-table .finished {
color: green;
}
}
</style>

View File

@ -43,7 +43,7 @@
</template> </template>
<script> <script>
import { sandTableRunAsPlan, setOccupy } from '@/api/simulation'; import { sandTableRunAsPlan } from '@/api/simulation';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
name: 'SetOperationPlanDialog', name: 'SetOperationPlanDialog',
@ -99,11 +99,6 @@ export default {
const sectionCodes = this.formData.map(_ => _.trackCode); const sectionCodes = this.formData.map(_ => _.trackCode);
const runData = this.formData; const runData = this.formData;
try { try {
const res = await setOccupy(simulationId, sectionCodes.join(','));
if (res.code !== 200) {
console.err(res);
return;
}
await sandTableRunAsPlan(simulationId, runData); await sandTableRunAsPlan(simulationId, runData);
this.doClose(); this.doClose();
} catch (err) { } catch (err) {

View File

@ -29,7 +29,7 @@ export function handlerUrl() {
// BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.47:9000'; // 周寅 // BASE_API = 'http://192.168.3.47:9000'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强 // BASE_API = 'http://192.168.3.94:9000'; // 旭强
BASE_API = 'http://192.168.3.15:9000'; // 张赛 BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';