Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
3c9a30a3a2
@ -129,7 +129,7 @@ export default {
|
||||
confirmRunToFrontStation: '确认运行至前方站'
|
||||
},
|
||||
passiveDialog: {
|
||||
alarmDetailInformation: '级告警详细信息',
|
||||
alarmDetailInformation: '级报警详细信息',
|
||||
lineName: '线路名称',
|
||||
unitName: '单位名称',
|
||||
moduleName: '模块名称',
|
||||
|
@ -1,13 +1,12 @@
|
||||
<template>
|
||||
<div id="menuBarFuzhou">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<manage-user ref="manageUser" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<help-about ref="helpAbout" />
|
||||
</div>
|
||||
</template>
|
||||
@ -22,7 +21,6 @@ import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
|
||||
export default {
|
||||
name: 'LocalWorkMenu',
|
||||
@ -34,8 +32,7 @@ export default {
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo
|
||||
HelpAbout
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -271,9 +268,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
}
|
||||
|
@ -155,11 +155,6 @@ export default {
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
},
|
||||
'$store.state.socket.controlTransfer': function(val) {
|
||||
if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') {
|
||||
this.$emit('warningInfoDoShow', val);
|
||||
}
|
||||
},
|
||||
// 深度数据状态
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
|
@ -1,121 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm station-control-convert"
|
||||
title="0级报警详细信息"
|
||||
:visible.sync="show"
|
||||
width="900px"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="font-size: 14px;color: #000;">
|
||||
<el-row>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>线路名称</div>
|
||||
<div style="width: 180px;" class="border-style">{{ $store.state.map.mapName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>单位名称</div>
|
||||
<div style="width: 180px;" class="border-style">{{ stationName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>模块名称</div>
|
||||
<div style="width: 180px;" class="border-style">CMM控制模式转换模块</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>报警时间</div>
|
||||
<div style="width: 180px;" class="border-style">{{ time }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>等  级</div>
|
||||
<div style="width: 180px;" class="border-style">0级告警</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>确认状态</div>
|
||||
<div style="width: 180px;" class="border-style">未确认</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="12" style="display: flex;">
|
||||
<div>类  型</div>
|
||||
<div style="width: 325px;" class="border-style">系统事件</div>
|
||||
</el-col>
|
||||
<el-col :span="12" style="display: flex;">
|
||||
<div>子 类 型</div>
|
||||
<div style="width: 325px;" class="border-style">依据信号设备操作命令设置控制模式</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="display: flex;margin-top: 10px;">
|
||||
<div>事件摘要</div>
|
||||
<div style="width: 760px;" class="border-style">控制模式转换</div>
|
||||
</el-row>
|
||||
<el-row style="display: flex;margin-top: 10px;">
|
||||
<div>推荐操作</div>
|
||||
<div style="width: 760px;" class="border-style" />
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<span>报警详细描述</span>
|
||||
<div style="width: 825px;margin-left: 0;height: 80px;" class="border-style">{{ `控制模式转换:${stationName}由中控模式转为站控模式!` }}</div>
|
||||
</el-row>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-button :id="closeAlarm.domId" @click="doClose">确认</el-button>
|
||||
<span>未确认0级报警数目:1</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '@/utils/index';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'WarningInfo',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
stationName: '',
|
||||
time: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
closeAlarm() {
|
||||
return OperationEvent.StationControl.requestStationControl.awaitAlarm;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
const operate = {
|
||||
cancel: true,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
operation: this.closeAlarm.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(info) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](info.stationCode);
|
||||
this.stationName = station.name;
|
||||
this.time = parseTime(this.$store.state.training.initTime);
|
||||
this.show = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.border-style {
|
||||
border-top: 2px solid #858585;
|
||||
border-left: 2px solid #858585;
|
||||
border-right: 2px solid #F2F2F2;
|
||||
border-bottom: 2px solid #F2F2F2;
|
||||
padding: 0 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
@ -31,7 +31,7 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
|
||||
<el-input v-model="model.alarmDate" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
@ -83,8 +83,9 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
import { parseTime } from '@/utils/index';
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
@ -124,14 +125,13 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.awaitAlarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.success) {
|
||||
const operate = this.$store.state.training.operate;
|
||||
// const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes[0]);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
moduleName: this.$t('menu.passiveDialog.cmmControlModeConversionMode'),
|
||||
level: this.$t('menu.passiveDialog.zeroLevelAlarm'),
|
||||
confirm: this.$t('menu.passiveDialog.confirmStatus'),
|
||||
alarmDate: new Date(),
|
||||
alarmDate: parseTime(this.$store.state.training.initTime),
|
||||
type: this.$t('menu.passiveDialog.systemEvent'),
|
||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||
@ -170,21 +170,11 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationControl.requestStationControl.awaitAlarm.operation
|
||||
cancel: true,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
operation:OperationEvent.StationControl.requestStationControl.awaitAlarm.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
|
@ -20,7 +20,7 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12">
|
||||
<el-button @click="confirm">确定</el-button>
|
||||
<el-button :id="confirmId" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
@ -54,7 +54,7 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
confirmId() {
|
||||
return this.operation.domId;
|
||||
return this.operation === OperationEvent.Station.setPreReset.confirm.operation ? OperationEvent.Station.setPreReset.confirm.domId : OperationEvent.Station.cancelPreReset.confirm.domId;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
setCenterControl() {
|
||||
// 请求中控(遥控)
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCode:this.selected.code}, 0, {code: this.selected.code, subType: 'button'}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
},
|
||||
setStationControl() {
|
||||
// 请求站控
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCode:this.selected.code}, 0, {code: this.selected.code, subType: 'button'}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
},
|
||||
setEmergencyControl() {
|
||||
// 紧急站控
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode: this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode: this.selected.code}, 0, {code: this.selected.code, subType: 'button'}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ export default {
|
||||
},
|
||||
setPreReset() {
|
||||
// 计轴复位
|
||||
commitOperate(menuOperate.Station.setPreReset, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.Station.setPreReset, {stationCode:this.selected.code}, 0, {code: this.selected.code, subType: 'preReset'}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.Station.setPreReset.confirm.operation
|
||||
@ -127,7 +127,7 @@ export default {
|
||||
},
|
||||
cancelPreReset() {
|
||||
// 取消计轴复位
|
||||
commitOperate(menuOperate.Station.cancelPreReset.operation, {stationCode:this.selected.code}, 0, {code: this.selected.code, subType: 'light'}).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.Station.cancelPreReset.operation, {stationCode:this.selected.code}, 0, {code: this.selected.code, subType: 'preReset'}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.Station.cancelPreReset.confirm.operation
|
||||
|
@ -6,7 +6,7 @@
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<menu-system-time ref="menuSystemTime" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work"/>
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
@ -16,7 +16,6 @@
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
@ -25,7 +24,6 @@
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
@ -55,7 +53,6 @@ export default {
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo,
|
||||
MenuSystemTime
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
@ -385,9 +382,6 @@ export default {
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<menu-system-time ref="menuSystemTime" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work"/>
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
@ -16,7 +16,6 @@
|
||||
<train-delete ref="trainDelete" /> -->
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
@ -25,7 +24,6 @@
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
// import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
// import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
@ -55,7 +53,6 @@ export default {
|
||||
// TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo,
|
||||
MenuSystemTime
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
@ -342,9 +339,6 @@ export default {
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
|
@ -163,11 +163,6 @@ export default {
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
},
|
||||
'$store.state.socket.controlTransfer': function(val) {
|
||||
if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') {
|
||||
this.$emit('warningInfoDoShow', val);
|
||||
}
|
||||
},
|
||||
// 深度数据状态
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
|
@ -1,121 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm station-control-convert"
|
||||
title="0级报警详细信息"
|
||||
:visible.sync="show"
|
||||
width="900px"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="font-size: 14px;color: #000;">
|
||||
<el-row>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>线路名称</div>
|
||||
<div style="width: 180px;" class="border-style">{{ $store.state.map.mapName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>单位名称</div>
|
||||
<div style="width: 180px;" class="border-style">{{ stationName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>模块名称</div>
|
||||
<div style="width: 180px;" class="border-style">CMM控制模式转换模块</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>报警时间</div>
|
||||
<div style="width: 180px;" class="border-style">{{ time }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>等  级</div>
|
||||
<div style="width: 180px;" class="border-style">0级告警</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;">
|
||||
<div>确认状态</div>
|
||||
<div style="width: 180px;" class="border-style">未确认</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="12" style="display: flex;">
|
||||
<div>类  型</div>
|
||||
<div style="width: 325px;" class="border-style">系统事件</div>
|
||||
</el-col>
|
||||
<el-col :span="12" style="display: flex;">
|
||||
<div>子 类 型</div>
|
||||
<div style="width: 325px;" class="border-style">依据信号设备操作命令设置控制模式</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="display: flex;margin-top: 10px;">
|
||||
<div>事件摘要</div>
|
||||
<div style="width: 760px;" class="border-style">控制模式转换</div>
|
||||
</el-row>
|
||||
<el-row style="display: flex;margin-top: 10px;">
|
||||
<div>推荐操作</div>
|
||||
<div style="width: 760px;" class="border-style" />
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<span>报警详细描述</span>
|
||||
<div style="width: 825px;margin-left: 0;height: 80px;" class="border-style">{{ `控制模式转换:${stationName}由中控模式转为站控模式!` }}</div>
|
||||
</el-row>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-button :id="closeAlarm.domId" @click="doClose">确认</el-button>
|
||||
<span>未确认0级报警数目:1</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '@/utils/index';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'WarningInfo',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
stationName: '',
|
||||
time: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
closeAlarm() {
|
||||
return OperationEvent.StationControl.requestStationControl.awaitAlarm;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
const operate = {
|
||||
cancel: true,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
operation: this.closeAlarm.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(info) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](info.stationCode);
|
||||
this.stationName = station.name;
|
||||
this.time = parseTime(this.$store.state.training.initTime);
|
||||
this.show = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.border-style {
|
||||
border-top: 2px solid #858585;
|
||||
border-left: 2px solid #858585;
|
||||
border-right: 2px solid #F2F2F2;
|
||||
border-bottom: 2px solid #F2F2F2;
|
||||
padding: 0 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
@ -31,7 +31,7 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
|
||||
<el-input v-model="model.alarmDate" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
@ -84,7 +84,8 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
import { parseTime } from '@/utils/index';
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
@ -120,24 +121,20 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.awaitAlarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.type == 'resp' && elem.agree) {
|
||||
if (elem.agree) {
|
||||
const operate = this.$store.state.training.operate;
|
||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name,
|
||||
currentMode: elem.currentMode
|
||||
};
|
||||
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
if (elem && elem.success) {
|
||||
const operate = this.$store.state.training.operate;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes[0]);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name,
|
||||
currentMode: elem.currentMode
|
||||
};
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -150,7 +147,7 @@ export default {
|
||||
moduleName: this.$t('menu.passiveDialog.cmmControlModeConversionMode'),
|
||||
level: this.$t('menu.passiveDialog.zeroLevelAlarm'),
|
||||
confirm: this.$t('menu.passiveDialog.confirmStatus'),
|
||||
alarmDate: new Date(),
|
||||
alarmDate: parseTime(this.$store.state.training.initTime),
|
||||
type: this.$t('menu.passiveDialog.systemEvent'),
|
||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||
@ -169,21 +166,11 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationControl.requestStationControl.awaitAlarm.operation
|
||||
cancel: true,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
operation:OperationEvent.StationControl.requestStationControl.awaitAlarm.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
|
@ -10,7 +10,8 @@ const ibp = {
|
||||
ibp: null, // 数据
|
||||
updateDeviceData: {}, // 修改的数据
|
||||
rightClickCount: 0, // 右键点击设备
|
||||
ibpBgDevice: {} // ibp背景设备
|
||||
ibpBgDevice: {}, // ibp背景设备
|
||||
moreScreen: false // 切换按钮是否显示
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -42,6 +43,9 @@ const ibp = {
|
||||
setIbpData: (state, ibp) => {
|
||||
state.ibp = ibp;
|
||||
},
|
||||
setMoreScreen: (state, moreScreen) => {
|
||||
state.moreScreen = moreScreen;
|
||||
},
|
||||
setUpdateDeviceData: (state, model) => {
|
||||
state.rightClickCount++;
|
||||
state.updateDeviceData = model;
|
||||
@ -58,6 +62,9 @@ const ibp = {
|
||||
setIbpData: ({ commit }, ibp) => {
|
||||
commit('setIbpData', ibp);
|
||||
},
|
||||
setMoreScreen: ({ commit }, moreScreen) => {
|
||||
commit('setMoreScreen', moreScreen);
|
||||
},
|
||||
updateIbpDevices: ({ commit }, models) => {
|
||||
return new Promise((resolve) => {
|
||||
if (!(models instanceof Array)) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<div :id="ibpId" v-loading="loading" :style="{ width: canvasWidth+'px', height: canvasHeight +'px',background:'#000' }" class="ibp-canvas" />
|
||||
<el-button-group class="ibp-button">
|
||||
<el-button v-if="moreScreen" type="primary" @click="switchOffset">切换</el-button>
|
||||
<!-- <el-button v-if="showBackButton" type="primary" @click="back">{{ $t('global.back') }}</el-button>-->
|
||||
<!-- <el-button v-if="$route.query.noPreLogout" type="primary" @click="quit">退出</el-button>-->
|
||||
</el-button-group>
|
||||
<!-- <el-button-group class="ibp-button"> -->
|
||||
<!-- <el-button v-if="moreScreen" type="primary" @click="switchOffset">切换</el-button> -->
|
||||
<!-- <el-button v-if="showBackButton" type="primary" @click="back">{{ $t('global.back') }}</el-button>-->
|
||||
<!-- <el-button v-if="$route.query.noPreLogout" type="primary" @click="quit">退出</el-button>-->
|
||||
<!-- </el-button-group> -->
|
||||
|
||||
<template v-for="alarm in alarmList">
|
||||
<audio :id="`buzzer_${alarm.code}`" :key="alarm.code" controls loop="loop">
|
||||
@ -28,6 +28,7 @@ import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
|
||||
import BuzzerAudio from '@/assets/buzzer.mp3';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
const pressedKeys = new Set();
|
||||
export default {
|
||||
@ -112,6 +113,7 @@ export default {
|
||||
await this.setMoveInit(false);
|
||||
this.showBackButton = false;
|
||||
}
|
||||
EventBus.$on('switchOffset', this.switchOffset);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.$route.query.noPreLogout) {
|
||||
@ -119,6 +121,8 @@ export default {
|
||||
this.$ibp.setClockStart(false);
|
||||
}
|
||||
this.ibpDestroy();
|
||||
this.$store.dispatch('ibp/setMoreScreen', false);
|
||||
EventBus.$off('switchOffset');
|
||||
},
|
||||
preResetBtn: null,
|
||||
methods: {
|
||||
@ -192,6 +196,7 @@ export default {
|
||||
const data = parser(ibpDatas, {width: this.canvasWidth, height: this.canvasHeight}); // ibp 绘图编译数据
|
||||
this.initIbp(this.offsetX);
|
||||
this.moreScreen = ibpDatas.background && ibpDatas.background.width > 1920;
|
||||
this.$store.dispatch('ibp/setMoreScreen', this.moreScreen);
|
||||
this.setIbp(data, ibpDatas);
|
||||
this.$store.dispatch('ibp/setIbpData', ibpDatas);
|
||||
this.handleBanOpenScreenDoorStatus();
|
||||
|
@ -271,10 +271,11 @@ export default {
|
||||
const group = resp.data;
|
||||
getLoginInfo(getToken()).then(resp => {
|
||||
const deviceVO = resp.data.deviceVO;
|
||||
const accountVO = resp.data.accountVO;
|
||||
if (deviceVO) {
|
||||
const config = JSON.parse(deviceVO.config || '{}');
|
||||
if (config && config.roleCode) {
|
||||
const params = [{userId: res.id, memberId:config.roleCode}];
|
||||
const params = [{userId: accountVO.id, memberId:config.roleCode}];
|
||||
assignUsersPlayRoles(params, group).then(() => {
|
||||
this.enterSimulation(group, mapId, config);
|
||||
}).catch(res=>{
|
||||
|
@ -34,6 +34,7 @@ import DeviceManage from './deviceManage';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import { SimulationUserType } from '@/scripts/ConstDic';
|
||||
import { destroySimulationByAdmin, ranAsPlan} from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'SimulationMenu',
|
||||
@ -56,6 +57,7 @@ export default {
|
||||
deviceif: false,
|
||||
deviceShow: true,
|
||||
allMenuList: [
|
||||
{ label: '切换', name: 'switchOffset', click: this.switchOffset, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.ibp.moreScreen; } },
|
||||
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return true; } },
|
||||
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW'); } },
|
||||
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
|
||||
@ -84,6 +86,9 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.ibp.moreScreen': function (val) {
|
||||
this.handleMenuShow();
|
||||
},
|
||||
'$store.state.training.simulationUserType': function (val) {
|
||||
this.handleMenuShow();
|
||||
},
|
||||
@ -105,6 +110,9 @@ export default {
|
||||
window.removeEventListener('click', this.hideMenuList);
|
||||
},
|
||||
methods: {
|
||||
switchOffset() {
|
||||
EventBus.$emit('switchOffset');
|
||||
},
|
||||
generateQrCode() {
|
||||
this.hideMenuList();
|
||||
getSimulationQrcode(this.$route.query.group).then(resp => {
|
||||
|
@ -158,7 +158,9 @@ export default {
|
||||
this.initMemberUserInfo();
|
||||
this.setCentralizedStationList(map); // 获取集中站列表
|
||||
if (this.$route.query.client) {
|
||||
this.pictureChange(this.$route.query.client);
|
||||
setTimeout(() => {
|
||||
this.pictureChange(this.$route.query.client);
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
@ -111,9 +111,6 @@ export default {
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
||||
// this.$jlmap.updatePicture(deviceList);
|
||||
// this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);
|
||||
setTimeout(() => {
|
||||
this.$jlmap.updatePicture(deviceList);
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
|
@ -59,7 +59,7 @@ export default {
|
||||
operationType: val.cmdType ? val.cmdType.value : '',
|
||||
params: val.param || {}
|
||||
};
|
||||
if (['trainSetButton', 'light'].includes(val.subType)) {
|
||||
if (['trainSetButton', 'light', 'button', 'preReset'].includes(val.subType)) {
|
||||
data.subType = val.subType;
|
||||
}
|
||||
this.stepDetail.operations.push(data);
|
||||
|
@ -42,7 +42,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.trainingNew.stepInfo': function(val) {
|
||||
const awaitOperateFlag = val && val.tipPosition && val.tipPosition.domId === OperationEvent.StationControl.requestStationControl.awaitAlarm.operation;
|
||||
let awaitOperateFlag = false;
|
||||
if (val && val.tipPosition && val.tipPosition.domId === OperationEvent.StationControl.requestStationControl.awaitAlarm.operation) {
|
||||
awaitOperateFlag = !document.getElementById(OperationEvent.StationControl.requestStationControl.awaitAlarm.domId);
|
||||
}
|
||||
if (val && this.trainingDetail && this.trainingDetail.type === 'SINGLE' && val.memberId == this.myMemberId && !awaitOperateFlag) {
|
||||
this.tipInit();
|
||||
} else {
|
||||
@ -79,11 +82,13 @@ export default {
|
||||
}
|
||||
}, 10);
|
||||
},
|
||||
'$store.state.socket.controlTransfer': function(val) {
|
||||
const stepInfo = this.$store.state.trainingNew.stepInfo;
|
||||
const domId = OperationEvent.StationControl.requestStationControl.awaitAlarm.operation;
|
||||
if (val && val.applicantId == this.$store.state.training.myMemberId && stepInfo && stepInfo.tipPosition && stepInfo.tipPosition.domId === domId) {
|
||||
setTimeout(() => { this.tipInit(); }, 10);
|
||||
'$store.state.socket.msgHead': function (val) {
|
||||
if (val && val.success) {
|
||||
const stepInfo = this.$store.state.trainingNew.stepInfo;
|
||||
const domId = OperationEvent.StationControl.requestStationControl.awaitAlarm.operation;
|
||||
if (val && val.sourceMemberId == this.$store.state.training.myMemberId && stepInfo && stepInfo.tipPosition && stepInfo.tipPosition.domId === domId) {
|
||||
setTimeout(() => { this.tipInit(); }, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user