Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
4da53f69e5
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" :loginActive="loginActive" @login="login" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" :loginActive="loginActive" :inputStr="inputStr" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -50,7 +50,13 @@ export default {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginActive: false,
|
||||
inputStr: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
@ -68,7 +74,13 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
login(inputStr) {
|
||||
this.loginActive = !!inputStr
|
||||
this.inputStr = inputStr;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
<div class="haerbin-01__systerm nav">
|
||||
<el-row v-if="$store.state.training.prdType === '01'">
|
||||
<el-col :span="2">
|
||||
<div class="nav-border">
|
||||
<div class="nav-border login">
|
||||
<el-row>
|
||||
<el-button v-if="loginActive" style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
|
||||
<el-button v-if="isLogin" style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
|
||||
<div v-else class="loginClass" style="width: 100px;height:20px;text-align:center;border:1px #ccc solid">{{ loginText }}</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<input v-model="loginParam" :type="modelType" style="width: 100px;height:20px;" :disabled="loginActive" @keyup.enter="validateData">
|
||||
<input v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="isLogin" @keyup.enter="validateData">
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -17,16 +17,16 @@
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList1">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList2">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -34,16 +34,16 @@
|
||||
<el-col :span="10">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" plain>C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('A')">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('B')">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" :class="{'fake-button-disabled': !isLogin}" plain>C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">记录</el-button></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="controlAudio(false)">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(controlAudio)(false)" :class="{'fake-button-disabled': !isLogin}">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">管理</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -170,15 +170,21 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
loginActive: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginActive:true,
|
||||
loginText:'登录',
|
||||
modelType:'text',
|
||||
modelType:'text',
|
||||
inputStr: '',
|
||||
station: {},
|
||||
keydownTimes:0,
|
||||
loginParam:'',
|
||||
classA: -1,
|
||||
classB: -1,
|
||||
tempClassA: -1,
|
||||
@ -236,7 +242,10 @@ export default {
|
||||
},
|
||||
isNoRecoverLevelC() {
|
||||
return this.confirmNoRecoverMapCString !== '{}';
|
||||
}
|
||||
},
|
||||
isLogin() {
|
||||
return this.loginActive
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
@ -321,6 +330,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
interceptLogin(cb) {
|
||||
return (args) => {
|
||||
if (this.isLogin) {
|
||||
cb(args)
|
||||
}
|
||||
}
|
||||
},
|
||||
handleAlarm(val) {
|
||||
if (val.level === 'A' || val.level === 'B') {
|
||||
this.controlAudio(true);
|
||||
@ -357,9 +373,9 @@ export default {
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
this.stationCode = stationCode;
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
@ -373,27 +389,28 @@ export default {
|
||||
this.$refs.logDetail.doShow();
|
||||
},
|
||||
login() {
|
||||
if (this.loginActive) {
|
||||
if (this.loginText === '退出') {
|
||||
this.loginText = '登录';
|
||||
} else {
|
||||
this.loginText = '用户';
|
||||
this.loginActive = false;
|
||||
}
|
||||
}
|
||||
this.loginText = this.loginText == '退出' ? '登录': '用户';
|
||||
this.inputStr = '';
|
||||
this.$emit('login', '');
|
||||
},
|
||||
validateData() {
|
||||
if (this.keydownTimes === 0 && this.loginParam == 'admin') {
|
||||
this.loginText = '密码';
|
||||
this.modelType = 'password';
|
||||
this.keydownTimes++;
|
||||
this.loginParam = '';
|
||||
} else if (this.keydownTimes === 1 && this.loginParam == '123456') {
|
||||
if (this.keydownTimes === 0) {
|
||||
const station = this.stationList.find(el => el.depot ? false: el.jp == this.inputStr );
|
||||
if (station) {
|
||||
this.loginText = '密码';
|
||||
this.modelType = 'password';
|
||||
this.inputStr = '';
|
||||
this.$emit('login', '');
|
||||
this.keydownTimes++;
|
||||
this.station = station;
|
||||
}
|
||||
} else if (this.keydownTimes === 1 && this.inputStr == '123456') {
|
||||
this.loginText = '退出';
|
||||
this.keydownTimes = 0;
|
||||
this.loginParam = '';
|
||||
this.modelType = 'text';
|
||||
this.loginActive = true;
|
||||
this.modelType = 'text';
|
||||
this.inputStr = this.station.jp;
|
||||
this.$emit('login', this.inputStr);
|
||||
EventBus.$emit('switchStationMode', this.station.code);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
@ -412,21 +429,21 @@ export default {
|
||||
this.$refs.alarmTableHmi.doShow(level);
|
||||
},
|
||||
showLowAlarm(level) {
|
||||
this.$refs.alarmTableLow.doShow(level);
|
||||
this.$refs.alarmTableLow.doShow(level);
|
||||
},
|
||||
trainControlShow() {
|
||||
this.$refs.trainControl.doShow();
|
||||
},
|
||||
controlAudio(val) {
|
||||
const audio = document.getElementById('buzzer');
|
||||
this.sound = val;
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
const audio = document.getElementById('buzzer');
|
||||
this.sound = val;
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -446,6 +463,13 @@ export default {
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.login {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.nav-border {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
@ -570,6 +594,28 @@ export default {
|
||||
background: #DDD;
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.fake-button-disabled {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F !important;
|
||||
font-size: 12px;
|
||||
border-radius: 1px !important;
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
margin: 5px auto;
|
||||
&:hover {
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
}
|
||||
&:disabled {
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
}
|
||||
}
|
||||
|
||||
.fake-button-active{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
|
@ -34,8 +34,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -45,11 +45,11 @@
|
||||
<el-col v-if="!trainOperationShow" :span="10">
|
||||
<div class="nav-border">
|
||||
<div class="nav-border-top">
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin||canCommand||secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin||canCommand||secondConfirm" @click="interceptLogin(command)()">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
|
||||
</div>
|
||||
<div class="el-print">
|
||||
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="selectRouteParam(el.code)">
|
||||
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="interceptLogin(selectRouteParam)(el.code)">
|
||||
{{ el.name }}
|
||||
</div>
|
||||
</div>
|
||||
@ -99,15 +99,15 @@
|
||||
<div class="nav-border">
|
||||
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainModel.groupNumber" @click="trainCommit">执 行</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose">取 消</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border flex-box">
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(false)">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain>时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(true)">ATS操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(false)">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin">时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(true)">ATS操作</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -157,8 +157,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[(isLogin && stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -166,8 +166,8 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="separator">
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin || canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin || canCommand || secondConfirm" @click="interceptLogin(command)()">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="handleClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -208,8 +208,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -237,7 +237,17 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
loginActive: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
},
|
||||
inputStr: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -316,13 +326,19 @@ export default {
|
||||
},
|
||||
cr2ConfirmId() {
|
||||
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
},
|
||||
centerStation() {
|
||||
return this.getCentralizedStationByInputStr(this.inputStr) || {};
|
||||
},
|
||||
stationContorl() {
|
||||
return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
|
||||
},
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
isLogin() {
|
||||
return this.isLocal ? this.loginActive && this.centerStation.code == this.stationContorl.code: true
|
||||
},
|
||||
menuPosition() {
|
||||
return this.$store.state.menuOperation.menuPosition;
|
||||
}
|
||||
@ -340,8 +356,8 @@ export default {
|
||||
if (!val) {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'selected': function (val) {
|
||||
},
|
||||
'selected': function (val) {
|
||||
this.initMenus();// 初始化菜单数据
|
||||
this.pushTempData([]); // 清空执行栏
|
||||
this.selectedObj = this.selected;
|
||||
@ -376,7 +392,8 @@ export default {
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
if (!this.oldSelected) {
|
||||
this.handleBasicMenu();
|
||||
this.handleBasicMenu();
|
||||
this.cancle();
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapStationStateUpdateCount': function() {
|
||||
@ -390,6 +407,19 @@ export default {
|
||||
this.handleBasicMenu();
|
||||
},
|
||||
methods: {
|
||||
getCentralizedStationByInputStr(inputStr) {
|
||||
const station = this.stationList.find(el => el.depot ? false: el.jp == this.inputStr );
|
||||
if (station) {
|
||||
return this.getStationControl(station);
|
||||
}
|
||||
},
|
||||
interceptLogin(cb) {
|
||||
return (args) => {
|
||||
if (this.isLogin) {
|
||||
cb(args)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 高亮设备
|
||||
deviceHighLight(device, flag) {
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
|
@ -134,7 +134,7 @@ export default {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
|
@ -6,6 +6,8 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name:'SelectStation',
|
||||
props:{
|
||||
@ -55,7 +57,17 @@ export default {
|
||||
});
|
||||
this.switchStationMode( this.showMemberId);
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('switchStationMode', (stationCode) => {
|
||||
this.$store.state.training.memberList.filter(el => el.type == 'STATION_SUPERVISOR').find(el => {
|
||||
if (el.deviceCode == stationCode) {
|
||||
this.oldShowMemberId = el.id;
|
||||
this.switchStationMode(el.id)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
switchStationMode(val) {
|
||||
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {
|
||||
|
Loading…
Reference in New Issue
Block a user