Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d1f0210b1b
@ -10,6 +10,7 @@
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"test": "vue-cli-service build --mode staging",
|
||||
"local": "vue-cli-service build --mode",
|
||||
"buildas": "vue-cli-service build --mode",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
|
@ -12,7 +12,7 @@
|
||||
>
|
||||
<el-form id="AddDispatcherForm" ref="form" :model="model" label-width="80px" :rules="rules">
|
||||
<el-form-item label="车站:" prop="stationCode" style="width: 100%;">
|
||||
<el-select v-model="model.stationCode" placeholder="" style="width:180px">
|
||||
<el-select v-model="model.stationCode" placeholder="" style="width:180px" @change="changeStation">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
@ -50,7 +50,7 @@
|
||||
<el-form-item label="接车口:" prop="arriveDirectionCode">
|
||||
<el-select v-model="model.arriveDirectionCode" placeholder="" style="width:180px" :disabled="model.startRunPlan">
|
||||
<el-option
|
||||
v-for="item in mapStationDirectionList"
|
||||
v-for="item in filterArrMapStationDirectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
@ -60,7 +60,7 @@
|
||||
<el-form-item label="发车口:" prop="departDirectionCode" style="margin-left:45px;">
|
||||
<el-select v-model="model.departDirectionCode" placeholder="" style="width:180px" :disabled="model.endRunPlan">
|
||||
<el-option
|
||||
v-for="item in mapStationDirectionList"
|
||||
v-for="item in filterDepMapStationDirectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
@ -70,7 +70,7 @@
|
||||
<el-form-item label="接车股道:" prop="arriveSectionCode">
|
||||
<el-select v-model="model.arriveSectionCode" placeholder="" style="width:160px" :disabled="model.startRunPlan">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
v-for="item in filterArrSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
@ -80,7 +80,7 @@
|
||||
<el-form-item label="发车股道:" prop="departSectionCode" style="margin-left: 67px;">
|
||||
<el-select v-model="model.departSectionCode" placeholder="" style="width:160px" :disabled="model.endRunPlan">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
v-for="item in filterDepSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
@ -167,6 +167,10 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
mapStationDirectionList:[],
|
||||
filterArrMapStationDirectionList:[],
|
||||
filterDepMapStationDirectionList:[],
|
||||
filterArrSectionList:[],
|
||||
filterDepSectionList:[],
|
||||
filterSectionList:[],
|
||||
trainTypeList:[
|
||||
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
|
||||
@ -250,6 +254,12 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
changeStation(stationCode) {
|
||||
this.filterArrMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
|
||||
this.filterDepMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
|
||||
this.filterArrSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
|
||||
this.filterDepSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
@ -276,6 +286,8 @@ export default {
|
||||
|
||||
transfinite:'NO' // 超限等级 NO:不超限 TRANSFINITE_SUPER:超级超限 TRANSFINITE_ONE_LEVEL:一级超限 TRANSFINITE_TWO_LEVEL:二级超限
|
||||
};
|
||||
this.filterArrMapStationDirectionList = [];
|
||||
this.filterDepMapStationDirectionList = [];
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
|
||||
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;">调度命令</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" />
|
||||
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;">阶段计划</div>
|
||||
<div id="stageRunplanOut" class="img-box" @click="stageRunplan">阶段计划</div>
|
||||
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div>
|
||||
@ -55,6 +55,8 @@
|
||||
<!-- <dispatcher-loger v-if="isDispStation" ref="dispatcherLoger" /> -->
|
||||
<bottom-table ref="bottomTable" />
|
||||
<menu-panel v-if="isCtc" ref="menuPanel" />
|
||||
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
|
||||
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -70,6 +72,8 @@ import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuButtonCtc from './menuButtonCtc';
|
||||
import RunplanPane from './runplanPane';
|
||||
import StageRunplan from './dialog/stageRunplan';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import DispatcherLoger from './dispatcherLoger';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
@ -113,6 +117,8 @@ export default {
|
||||
PassiveTimeout,
|
||||
MenuButtonCtc,
|
||||
RunplanPane,
|
||||
StageRunplan,
|
||||
NoticeInfo,
|
||||
// DispatcherLoger,
|
||||
BottomTable,
|
||||
MenuPanel
|
||||
@ -127,6 +133,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentRailwaySimulationRunplan:{},
|
||||
alarmMessages: [
|
||||
{ id: 1, message: '这是告警信息一' },
|
||||
{ id: 2, message: '这是告警信息二' },
|
||||
@ -190,6 +197,14 @@ export default {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
},
|
||||
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
|
||||
this.getRailwaySimulationRunplanSend();
|
||||
},
|
||||
'$store.state.training.roleDeviceCode': function (val) {
|
||||
if (this.isCtc) {
|
||||
this.getRailwaySimulationRunplanSend();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -213,6 +228,18 @@ export default {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods: {
|
||||
getRailwaySimulationRunplanSend() {
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
|
||||
if (railwaySimulationRunplanSendMap[stationCode] && railwaySimulationRunplanSendMap[stationCode].dataList.length > 0) {
|
||||
// 阶段计划
|
||||
document.getElementById('stageRunplanOut').classList.add('active');
|
||||
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
|
||||
} else {
|
||||
const sendRunplan = document.getElementById('stageRunplanOut').className;
|
||||
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
@ -225,6 +252,21 @@ export default {
|
||||
},
|
||||
handleRunplan() {
|
||||
this.$refs.runplanPane.doShow();
|
||||
},
|
||||
stageRunplan() {
|
||||
if (document.getElementById('stageRunplanOut').className.includes('active')) {
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
|
||||
}
|
||||
},
|
||||
noticeInfo() {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
},
|
||||
closeStageFlash() {
|
||||
const sendRunplan = document.getElementById('stageRunplanOut').className;
|
||||
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
|
||||
}
|
||||
// goDispatcherLoger() {
|
||||
// this.$refs.dispatcherLoger.doShow();
|
||||
@ -757,4 +799,30 @@ export default {
|
||||
.img-box:hover{
|
||||
border: 2px #ccc inset;
|
||||
}
|
||||
#stageRunplanOut{
|
||||
width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;
|
||||
}
|
||||
#stageRunplanOut.active{
|
||||
animation:changeColor 1s infinite;
|
||||
-moz-animation:changeColor 1s infinite; /* Firefox */
|
||||
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */
|
||||
}
|
||||
@keyframes changeColor
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-moz-keyframes changeColor /* Firefox */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-webkit-keyframes changeColor /* Safari and Chrome */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
</style>
|
||||
|
@ -572,6 +572,9 @@ export default {
|
||||
// 阶段计划
|
||||
document.getElementById('stageRunplan').classList.add('active');
|
||||
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
|
||||
} else {
|
||||
const sendRunplan = document.getElementById('stageRunplan').className;
|
||||
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
|
@ -536,6 +536,7 @@ const socket = {
|
||||
},
|
||||
deleteRailwaySimulationRunplan: (state, stationCode) => {
|
||||
delete state.railwaySimulationRunplanSendMap[stationCode];
|
||||
state.railwaySimulationRunplanSendChange++;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -24,10 +24,10 @@ export function handlerUrl(data) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// const data = null;
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||
BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
@ -44,6 +44,11 @@ export function handlerUrl(data) {
|
||||
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
|
||||
UPLOAD_API = 'http://joylink.club/jlfile';
|
||||
BASE_SITE = 'https://test.joylink.club/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'local-test') {
|
||||
BASE_API = 'http://192.168.3.233:9000';
|
||||
VOICE_API = 'http://192.168.3.233/oss/joylink';
|
||||
UPLOAD_API = 'http://192.168.3.233';
|
||||
BASE_SITE = '/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') {
|
||||
BASE_API = 'http://160.20.60.15:9000';
|
||||
VOICE_API = 'http://160.20.60.15/oss/joylink';
|
||||
|
@ -40,6 +40,7 @@ export default {
|
||||
return {
|
||||
stationCode:'',
|
||||
groupModel: '',
|
||||
hasUnsubscribe:false,
|
||||
buttonList: [
|
||||
{
|
||||
label: '运行图',
|
||||
@ -79,11 +80,11 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
// watch: {
|
||||
// '$store.state.training.prdType': function(prdType, oldPrdType) {
|
||||
// this.changePrdType(prdType, oldPrdType);
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
'$store.state.training.prdType': function(prdType, oldPrdType) {
|
||||
this.changePrdType(prdType, oldPrdType);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// const _that = this;
|
||||
// window.onbeforeunload = () => { _that.clearSubscribe(); };
|
||||
@ -115,31 +116,39 @@ export default {
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
// changePrdType(prdType, oldPrdType) {
|
||||
// if (prdType) {
|
||||
// this.subscribe(prdType);
|
||||
// }
|
||||
// if (oldPrdType) {
|
||||
// this.clearSubscribe(oldPrdType);
|
||||
// }
|
||||
// },
|
||||
// async subscribe(prdType) {
|
||||
// const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
// if (prdType == '02') {
|
||||
// creatSubscribe(getTopic('CTC_RAILWAY', this.$route.query.group), header);
|
||||
// } else if (prdType == '01') {
|
||||
// creatSubscribe(getTopic('CTC', this.$route.query.group), header);
|
||||
// }
|
||||
},
|
||||
changePrdType(prdType, oldPrdType) {
|
||||
// if (prdType) {
|
||||
// this.subscribe(prdType);
|
||||
// }
|
||||
// if (oldPrdType) {
|
||||
// this.clearSubscribe(oldPrdType);
|
||||
// }
|
||||
if (prdType == '01') {
|
||||
this.clearSubscribe();
|
||||
this.hasUnsubscribe = true;
|
||||
} else if (prdType == '02' && this.hasUnsubscribe) {
|
||||
this.subscribe();
|
||||
}
|
||||
},
|
||||
async subscribe(prdType) {
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(getTopic('CTC', this.$route.query.group), header);
|
||||
// if (prdType == '02') {
|
||||
// // creatSubscribe(getTopic('CTC_RAILWAY', this.$route.query.group), header);
|
||||
|
||||
// },
|
||||
// clearSubscribe(prdType) {
|
||||
// if (prdType == '02') {
|
||||
// clearSubscribe(getTopic('CTC_RAILWAY', this.groupModel));
|
||||
// } else if (prdType == '01') {
|
||||
// clearSubscribe(getTopic('CTC', this.groupModel));
|
||||
// }
|
||||
// }
|
||||
// } else if (prdType == '01') {
|
||||
// // creatSubscribe(getTopic('CTC', this.$route.query.group), header);
|
||||
// }
|
||||
|
||||
},
|
||||
clearSubscribe(prdType) {
|
||||
// if (prdType == '02') {
|
||||
// // clearSubscribe(getTopic('CTC_RAILWAY', this.groupModel));
|
||||
// } else if (prdType == '01') {
|
||||
clearSubscribe(getTopic('CTC', this.groupModel));
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user