This commit is contained in:
lVAL 2021-02-24 11:09:36 +08:00
commit 9b8d3b72d6
9 changed files with 99 additions and 59 deletions

View File

@ -88,6 +88,11 @@ class EStationText extends Group {
} }
} }
setFlash() {
this.stopAnimate();
this.stationName.animateStyle(true).when(500, {opacity: 1}).when(1000, {opacity: 0}).when(1500, {opacity: 1}).start();
}
getBoundingRect() { getBoundingRect() {
return this.stationName.getBoundingRect(); return this.stationName.getBoundingRect();
} }

View File

@ -503,6 +503,7 @@ export default class Station extends Group {
// if() // if()
this.stationText.setColor(this.style.Station.stationText.noneModeColor); this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor); this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
this.stationText && this.stationText.stopAnimate();
// sationEle.controller // sationEle.controller
} else { } else {
this.stationText && this.stationText.stopAnimate(); this.stationText && this.stationText.stopAnimate();
@ -529,6 +530,8 @@ export default class Station extends Group {
model.preResetValidDuration && this.handlePreResetLamp(); model.preResetValidDuration && this.handlePreResetLamp();
model.controller && this.handleComplexControl(model.controller); model.controller && this.handleComplexControl(model.controller);
model.emergencyController && this.handleEmergencyController(); model.emergencyController && this.handleEmergencyController();
// model.controlApplicant
model.controlApplicant && this.handleControlApplicant(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController) && model.centralized) { if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController) && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {
const device = store.getters['map/getDeviceByCode'](item); const device = store.getters['map/getDeviceByCode'](item);
@ -559,6 +562,16 @@ export default class Station extends Group {
this.controlPreReset && this.controlPreReset.setColor('#f00'); this.controlPreReset && this.controlPreReset.setColor('#f00');
} }
handleControlApplicant(model) {
// const controlApplicant = model.controlApplicant;
if (this.style.Station.stationText.isSpecialType) {
const memberData = store.state.training.memberData;
if (memberData[model.controller].userId == store.state.user.id ) {
this.stationText.setFlash();
}
}
}
handleEmergencyController() { handleEmergencyController() {
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
this.stationText.setBackground(this.style.Station.stationText.emergencyBackColor); this.stationText.setBackground(this.style.Station.stationText.emergencyBackColor);

View File

@ -186,7 +186,7 @@ export default {
let name = section.name; let name = section.name;
if (section.type == '02') { if (section.type == '02') {
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode); const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
name = `${sectionParent.name}${section.name}`; name = `${sectionParent.name}-${section.name}`;
} }
if (section.stationCode == this.selected.stationCode) { if (section.stationCode == this.selected.stationCode) {
list.push({ name: name, code: section.code }); list.push({ name: name, code: section.code });

View File

@ -138,6 +138,11 @@ export default {
}, },
getDisabled(code, type) { getDisabled(code, type) {
const newStation = this.$store.getters['map/getDeviceByCode'](code); const newStation = this.$store.getters['map/getDeviceByCode'](code);
const centralizedStationCode = this.stationCentralizedMap[code];
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
if (this.$store.state.training.prdType === '01' && centralizedStation.controlMode === 'Center') {
return true;
}
if (type === 'apply') { if (type === 'apply') {
return newStation.controller === this.memberId; return newStation.controller === this.memberId;
} else if (type === 'release') { } else if (type === 'release') {
@ -155,7 +160,11 @@ export default {
}, },
applyAll() { applyAll() {
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (item.controller !== this.memberId) { const centralizedStationCode = this.stationCentralizedMap[item.code];
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
if (this.$store.state.training.prdType === '01' && centralizedStation.controlMode === 'Center') {
item.apply = false;
} else if (item.controller !== this.memberId) {
item.apply = true; item.apply = true;
} }
}); });
@ -167,7 +176,11 @@ export default {
}, },
releaseAll() { releaseAll() {
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (item.controller === this.memberId) { const centralizedStationCode = this.stationCentralizedMap[item.code];
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
if (this.$store.state.training.prdType === '01' && centralizedStation.controlMode === 'Center') {
item.apply = false;
} else if (item.controller === this.memberId) {
item.release = true; item.release = true;
} }
}); });

View File

@ -344,7 +344,7 @@ export default {
}, },
{ {
title: '跳停', title: '跳停',
operate: OperationEvent.Command.commandNingBo3.train_operate_jump, operate: OperationEvent.Command.commandNingBo3.train_operate_jump,
click: this.setJumpStop click: this.setJumpStop
}, },
{ {
@ -1346,6 +1346,9 @@ export default {
// if (list && list.length) { // if (list && list.length) {
this.checkRoleChange(oldval, newval); this.checkRoleChange(oldval, newval);
// } // }
},
'$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange();
} }
}, },
@ -1361,6 +1364,13 @@ export default {
}); });
}, },
methods: { methods: {
selectedChange() {
const model = this.$store.state.menuOperation.selected;
if (model && model._type && model._type == 'Station' && model.controlApplicant) {
const item = {operate: OperationEvent.Command.commandNingBo3.line_stand_transfer};
this.authorizeTransfer(item);
}
},
checkRoleChange(oldval, newval) { checkRoleChange(oldval, newval) {
this.$nextTick(()=>{ this.$nextTick(()=>{
const memberData = this.$store.state.training.memberData; const memberData = this.$store.state.training.memberData;
@ -1374,7 +1384,7 @@ export default {
const oldStation = this.$store.getters['map/getDeviceByCode'](oldMember.deviceCode); const oldStation = this.$store.getters['map/getDeviceByCode'](oldMember.deviceCode);
const newStation = this.$store.getters['map/getDeviceByCode'](newMember.deviceCode); const newStation = this.$store.getters['map/getDeviceByCode'](newMember.deviceCode);
if (oldStation.controller || newStation.controller) { if (oldStation.controller || newStation.controller) {
console.log(9999999999, oldStation.controller, newStation.controller); // console.log(9999999999, oldStation.controller, newStation.controller);
if (newStation.controller) { if (newStation.controller) {
let centerStation; let centerStation;
if (newStation.centralized) { if (newStation.centralized) {

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="ningbo-01__systerm station-control" class="ningbo-01__systerm station-control"
title="授权转移" title="请求区域控制权"
:visible.sync="show" :visible.sync="show"
width="500px" width="500px"
:before-close="doClose" :before-close="doClose"
@ -196,7 +196,6 @@ export default {
over: true, over: true,
param: {stationCodes:[val.code]} param: {stationCodes:[val.code]}
}; };
// CMD_STATION_CONTROL_TRANSFER
// steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL; // steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL;
steps.cmdType = CMD.Station.CMD_STATION_CONTROL_APPLY; steps.cmdType = CMD.Station.CMD_STATION_CONTROL_APPLY;

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="ningbo-01__systerm station-control" class="ningbo-01__systerm station-control"
title="下放站控" title="授权转移"
:visible.sync="show" :visible.sync="show"
width="600px" width="600px"
:before-close="doClose" :before-close="doClose"
@ -25,18 +25,18 @@
<el-col :span="6"> <el-col :span="6">
<div class="radio-box-title">接收转移</div> <div class="radio-box-title">接收转移</div>
<div class="radio-box"> <div class="radio-box">
<el-radio v-model="status" :label="true" :disabled="!status" style="display: block;margin-bottom: 10px;"></el-radio> <el-radio v-model="accept" :label="true" style="display: block;margin-bottom: 10px;"></el-radio>
<el-radio v-model="status" :label="false" :disabled="status" style="display: block;"></el-radio> <el-radio v-model="accept" :label="false" style="display: block;"></el-radio>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div> <div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :disabled="status" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdApply" @click="commit(false)">应用(A)</el-button> <el-button :id="domIdApply" :disabled="status" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button> <el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -58,11 +58,12 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
name: 'StationControl', name: 'StationControl',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
status: true, status: true,
accept:true,
operate: null, operate: null,
loading: false, loading: false,
dialogShow: false, dialogShow: false,
@ -120,12 +121,12 @@ export default {
}, },
watch: { watch: {
'selected': function(val) { 'selected': function(val) {
if (val) { if (val && val.code) {
const sationEle = this.$store.getters['map/getDeviceByCode'](val.code); const stationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (this.prdType == '02') { if (stationEle.controlApplicant) {
this.status = sationEle && sationEle.controlMode != 'Center'; this.status = false;
} else { } else {
this.status = sationEle && sationEle.controlMode == 'Center'; this.status = true;
} }
} }
} }
@ -133,15 +134,17 @@ export default {
methods: { methods: {
doShow() { doShow() {
this.message = ''; this.message = '';
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(e => { this.$nextTick(e => {
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}) });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$refs.table.setCurrentRow(); this.status = true;
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('socket/shiftMsgQueue'); this.$store.dispatch('socket/shiftMsgQueue');
}, },
@ -179,17 +182,18 @@ export default {
const steps = { const steps = {
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation, operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
over: true, over: true,
param: {stationCode:val.code} param: {stationCodes:[val.code], agree:this.accept}
}; };
steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL; // steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL;
steps.cmdType = CMD.Station.CMD_STATION_CONTROL_TRANSFER;
this.$store.dispatch('training/nextNew', steps).then(({ valid }) => { this.$store.dispatch('training/nextNew', steps).then(({ valid }) => {
if (valid) { if (valid) {
isClose && this.doClose(); isClose && this.doClose();
this.$emit('commandSuccess', val.code); this.$emit('commandSuccess', val.code);
} }
}).catch((error) => { }).catch(() => {
isClose && this.doClose(); isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });

View File

@ -5,7 +5,7 @@
<el-tooltip v-if="item.tip" effect="dark" :content="$t('login.clickSwitchLanguage')" placement="bottom-end"> <el-tooltip v-if="item.tip" effect="dark" :content="$t('login.clickSwitchLanguage')" placement="bottom-end">
<span style="color: white;">{{ item.name }}</span> <span style="color: white;">{{ item.name }}</span>
</el-tooltip> </el-tooltip>
<el-dropdown v-else-if="isShown && item.isHelp" class="avatar-container" trigger="hover" :show-timeout="100" style="height:58px"> <el-dropdown v-else-if="item.isHelp" class="avatar-container" trigger="hover" :show-timeout="100" style="height:58px">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<span style="color: white;"> <span style="color: white;">
{{ $t(item.name) }} {{ $t(item.name) }}
@ -14,7 +14,7 @@
</div> </div>
<el-dropdown-menu slot="dropdown" class="user-dropdown"> <el-dropdown-menu slot="dropdown" class="user-dropdown">
<el-dropdown-item v-for="(el, i) in caseList" :key="i"> <el-dropdown-item v-for="(el, i) in caseList" :key="i">
<span style="display:block;" @click="goToCaseShow(el)">{{el.name}}</span> <span style="display:block;" @click="goToCaseShow(el)">{{ el.name }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -58,7 +58,7 @@ export default {
handle: this.goEmpty, handle: this.goEmpty,
isHelp:true, isHelp:true,
style:'padding-right:0px;', style:'padding-right:0px;',
hidden:getSessionStorage('project').endsWith('heb') hidden: CaseHideProjectList.includes(getSessionStorage('project'))
}, },
{ {
name: 'global.scan', // name: 'global.scan', //
@ -75,28 +75,28 @@ export default {
handle: this.switchLanguage, handle: this.switchLanguage,
hidden: false, hidden: false,
tip: true tip: true
}
// {
// name: 'global.help',
// handle: this.goToHelp,
// hidden: getSessionStorage('project').endsWith('heb')
// }
],
caseList: [
{
name: '西安铁路职业技术学院',
url: 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf'
}, },
{ {
name: 'global.help', name: '贵州装备制造职业学院',
handle: this.goToHelp, url: 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf'
hidden: getSessionStorage('project').endsWith('heb') },
{
name: '江苏电子信息职业学院',
url: 'https://joylink.club/oss/portal/cases/江苏电子信息职业学院-城市轨道交通行车组织综合实训室.pdf'
} }
],
],
caseList: [
{
name: '西安铁路职业技术学院',
url: 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf'
},
{
name: '贵州装备制造职业学院',
url: 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf'
},
{
name: '江苏电子信息职业学院',
url: 'https://joylink.club/oss/portal/cases/江苏电子信息职业学院-城市轨道交通行车组织综合实训室.pdf'
}
],
stomp: null, stomp: null,
header: null, header: null,
lang: 'zh' lang: 'zh'
@ -108,10 +108,6 @@ export default {
}, },
project() { project() {
return getSessionStorage('project'); return getSessionStorage('project');
},
isShown() {
const project = getSessionStorage('project');
return !CaseHideProjectList.includes(project);
} }
}, },
watch: { watch: {

View File

@ -474,9 +474,9 @@ export const ProjectCode = {
}; };
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号 export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目 export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目 export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示 export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示 export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角主体不展示
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb']; export const NoQrcodeList = ['heb', 'designheb'];
@ -513,9 +513,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
ntyl: '/design/login?project=ntyl', ntyl: '/design/login?project=ntyl',
designntyl: '/login?project=ntyl', designntyl: '/login?project=ntyl',
ntyc: '/design/login?project=ntyc', ntyc: '/design/login?project=ntyc',
designntyc: '/login?project=ntyc', designntyc: '/login?project=ntyc'
cgy: '/design/login?project=cgy', // cgy: '/design/login?project=cgy',
designcgy: '/login?project=cgy' // designcgy: '/login?project=cgy'
}; };
export const ProjectList = [ export const ProjectList = [
{value:'xty', label:'西铁院'}, {value:'xty', label:'西铁院'},