Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
d89b692b80
@ -1,355 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="head_content content">
|
||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||
<el-col :span="8">
|
||||
<el-button class="status">查询会话状态</el-button>
|
||||
</el-col>
|
||||
<el-col :span="15" :offset="1">
|
||||
<el-input :value="messageText" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="openMessageId" @click="handleMessage('open')"
|
||||
:disabled="isOpenMessage">打开会话</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="closeMessageId" @click="handleMessage('close')"
|
||||
:disabled="!isOpenMessage">关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">操作</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId1" @click="confirm1" :disabled="disabledConfirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">确认</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText2" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId2" @click="confirm2" :disabled="disabledConfirm2">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="body_cont">
|
||||
<el-col :span="7">
|
||||
<div class="text">操作倒计时</div>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
||||
{{timeCountConfirm == -1 ? '' : timeCountConfirm}}</div>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="body_cont">
|
||||
<div class="status_text">状态</div>
|
||||
<div class="textarea_content"></div>
|
||||
</div>
|
||||
|
||||
<el-button class="close_btn" :id="domIdConfirm" type="primary" @click="commit">关闭</el-button>
|
||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
ConfirmTip
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
earlyDepar: false,
|
||||
|
||||
messageText: '',
|
||||
messageText1: '',
|
||||
messageText2: '',
|
||||
isOpenMessage: false,
|
||||
timeCountConfirm: -1,
|
||||
disabledConfirm1: false,
|
||||
disabledConfirm2: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
openMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||
},
|
||||
closeMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
|
||||
},
|
||||
confirmId1() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
|
||||
},
|
||||
confirmId2() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '取消全线临时限速';
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
this.timer = setInterval(() => {
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||
this.timeCountConfirm = -1;
|
||||
this.disabledConfirm2 = true;
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleMessage(message) {
|
||||
if (message == 'open') {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.isOpenMessage = true;
|
||||
this.messageText1 = '取消全线临时限速';
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.isOpenMessage = false;
|
||||
this.messageText1 = '';
|
||||
this.messageText2 = '';
|
||||
this.disabledConfirm1 = false;
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = -1; // 倒计时
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
},
|
||||
confirm1() {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.isOpenMessage = true;
|
||||
this.messageText1 = '**************';
|
||||
this.messageText2 = '取消全线临时限速';
|
||||
this.disabledConfirm1 = true;
|
||||
this.timeCountConfirm = 60; // 倒计时
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.isOpenMessage = true;
|
||||
this.messageText2 = '**************';
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation,
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (!this.isOpenMessage) {
|
||||
this.doClose();
|
||||
} else {
|
||||
let operate = {
|
||||
message: `是否关闭会话,并关闭窗口`,
|
||||
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId,
|
||||
}
|
||||
this.$refs.ConfirmTip.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
},
|
||||
closeMessage() {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.ConfirmTip.doClose();
|
||||
this.isOpenMessage = false;
|
||||
this.messageText1 = '';
|
||||
this.messageText2 = '';
|
||||
this.disabledConfirm1 = false;
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = -1; // 倒计时
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
border: 1px solid lightgray;
|
||||
padding: 18px 5px;
|
||||
position: relative;
|
||||
|
||||
.base-label {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 20px;
|
||||
background-color: #F0F0F0;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 100%;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.status_btn {
|
||||
width: 110px;
|
||||
margin: 15px auto 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.head_content {
|
||||
height: 110px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.cotnent_body {
|
||||
height: 60px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.text {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.status_btn {
|
||||
width: 80px;
|
||||
margin: 0 auto
|
||||
}
|
||||
}
|
||||
|
||||
.close_btn {
|
||||
margin: 0 auto;
|
||||
width: 80px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.body_cont {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 3px;
|
||||
overflow: hidden;
|
||||
|
||||
.text {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.status_text {
|
||||
margin-bottom: 3px;
|
||||
font-size: 14px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.textarea_content {
|
||||
height: 85px;
|
||||
width: 100%;
|
||||
border: 2px solid #E9E9E9;
|
||||
box-shadow: 2px 2px #959595 inset;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -13,7 +13,6 @@
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<!-- <menu-limit ref="menuLimit" :selected="selected" /> -->
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -33,7 +32,6 @@ import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
// import MenuLimit from './menuLimit';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -51,7 +49,6 @@ export default {
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
// MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
|
@ -1,120 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<cancel-all-limit ref="cancelAllLimit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: '',
|
||||
auth: { station: true, center: false }
|
||||
}],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
label: MapDeviceType.LimitControl.label,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -177,7 +177,7 @@
|
||||
if (operate.selection && operate.selection.length) {
|
||||
operate.selection.forEach(elem => {
|
||||
if (operate.commit) {
|
||||
this.updateTableValue(elem.code, { result: `${$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
|
||||
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
|
||||
} else if (operate.cancel) {
|
||||
this.updateTableValue(elem.code, { result: '' }, false);
|
||||
}
|
||||
@ -381,7 +381,7 @@
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
@ -406,7 +406,7 @@
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
@ -431,7 +431,7 @@
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
|
@ -160,7 +160,7 @@
|
||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `${$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}!`
|
||||
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}!`
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
|
@ -3,8 +3,8 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user