Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
9b8d3b72d6
@ -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() {
|
||||
return this.stationName.getBoundingRect();
|
||||
}
|
||||
|
@ -503,6 +503,7 @@ export default class Station extends Group {
|
||||
// if()
|
||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
|
||||
this.stationText && this.stationText.stopAnimate();
|
||||
// sationEle.controller
|
||||
} else {
|
||||
this.stationText && this.stationText.stopAnimate();
|
||||
@ -529,6 +530,8 @@ export default class Station extends Group {
|
||||
model.preResetValidDuration && this.handlePreResetLamp();
|
||||
model.controller && this.handleComplexControl(model.controller);
|
||||
model.emergencyController && this.handleEmergencyController();
|
||||
// model.controlApplicant
|
||||
model.controlApplicant && this.handleControlApplicant(model);
|
||||
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController) && model.centralized) {
|
||||
model.chargeStationCodeList.forEach(item => {
|
||||
const device = store.getters['map/getDeviceByCode'](item);
|
||||
@ -559,6 +562,16 @@ export default class Station extends Group {
|
||||
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() {
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
this.stationText.setBackground(this.style.Station.stationText.emergencyBackColor);
|
||||
|
@ -186,7 +186,7 @@ export default {
|
||||
let name = section.name;
|
||||
if (section.type == '02') {
|
||||
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) {
|
||||
list.push({ name: name, code: section.code });
|
||||
|
@ -138,6 +138,11 @@ export default {
|
||||
},
|
||||
getDisabled(code, type) {
|
||||
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') {
|
||||
return newStation.controller === this.memberId;
|
||||
} else if (type === 'release') {
|
||||
@ -155,7 +160,11 @@ export default {
|
||||
},
|
||||
applyAll() {
|
||||
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;
|
||||
}
|
||||
});
|
||||
@ -167,7 +176,11 @@ export default {
|
||||
},
|
||||
releaseAll() {
|
||||
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;
|
||||
}
|
||||
});
|
||||
|
@ -1346,6 +1346,9 @@ export default {
|
||||
// if (list && list.length) {
|
||||
this.checkRoleChange(oldval, newval);
|
||||
// }
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
}
|
||||
|
||||
},
|
||||
@ -1361,6 +1364,13 @@ export default {
|
||||
});
|
||||
},
|
||||
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) {
|
||||
this.$nextTick(()=>{
|
||||
const memberData = this.$store.state.training.memberData;
|
||||
@ -1374,7 +1384,7 @@ export default {
|
||||
const oldStation = this.$store.getters['map/getDeviceByCode'](oldMember.deviceCode);
|
||||
const newStation = this.$store.getters['map/getDeviceByCode'](newMember.deviceCode);
|
||||
if (oldStation.controller || newStation.controller) {
|
||||
console.log(9999999999, oldStation.controller, newStation.controller);
|
||||
// console.log(9999999999, oldStation.controller, newStation.controller);
|
||||
if (newStation.controller) {
|
||||
let centerStation;
|
||||
if (newStation.centralized) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm station-control"
|
||||
title="授权转移"
|
||||
title="请求区域控制权"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
@ -196,7 +196,6 @@ export default {
|
||||
over: true,
|
||||
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 = CMD.Station.CMD_STATION_CONTROL_APPLY;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm station-control"
|
||||
title="下放站控"
|
||||
title="授权转移"
|
||||
:visible.sync="show"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
@ -25,18 +25,18 @@
|
||||
<el-col :span="6">
|
||||
<div class="radio-box-title">接收转移</div>
|
||||
<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="status" :label="false" :disabled="status" style="display: block;">否</el-radio>
|
||||
<el-radio v-model="accept" :label="true" style="display: block;margin-bottom: 10px;">是</el-radio>
|
||||
<el-radio v-model="accept" :label="false" style="display: block;">否</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<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 :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 :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
@ -63,6 +63,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
status: true,
|
||||
accept:true,
|
||||
operate: null,
|
||||
loading: false,
|
||||
dialogShow: false,
|
||||
@ -120,12 +121,12 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'selected': function(val) {
|
||||
if (val) {
|
||||
const sationEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
if (this.prdType == '02') {
|
||||
this.status = sationEle && sationEle.controlMode != 'Center';
|
||||
if (val && val.code) {
|
||||
const stationEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
if (stationEle.controlApplicant) {
|
||||
this.status = false;
|
||||
} else {
|
||||
this.status = sationEle && sationEle.controlMode == 'Center';
|
||||
this.status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,10 +138,12 @@ export default {
|
||||
this.$nextTick(e => {
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
})
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.status = true;
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
@ -179,17 +182,18 @@ export default {
|
||||
const steps = {
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
isClose && this.doClose();
|
||||
this.$emit('commandSuccess', val.code);
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-tooltip v-if="item.tip" effect="dark" :content="$t('login.clickSwitchLanguage')" placement="bottom-end">
|
||||
<span style="color: white;">{{ item.name }}</span>
|
||||
</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">
|
||||
<span style="color: white;">
|
||||
{{ $t(item.name) }}
|
||||
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<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-menu>
|
||||
</el-dropdown>
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
handle: this.goEmpty,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('heb')
|
||||
hidden: CaseHideProjectList.includes(getSessionStorage('project'))
|
||||
},
|
||||
{
|
||||
name: 'global.scan', // 扫码
|
||||
@ -75,12 +75,12 @@ export default {
|
||||
handle: this.switchLanguage,
|
||||
hidden: false,
|
||||
tip: true
|
||||
},
|
||||
{
|
||||
name: 'global.help',
|
||||
handle: this.goToHelp,
|
||||
hidden: getSessionStorage('project').endsWith('heb')
|
||||
}
|
||||
// {
|
||||
// name: 'global.help',
|
||||
// handle: this.goToHelp,
|
||||
// hidden: getSessionStorage('project').endsWith('heb')
|
||||
// }
|
||||
|
||||
],
|
||||
caseList: [
|
||||
@ -108,10 +108,6 @@ export default {
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isShown() {
|
||||
const project = getSessionStorage('project');
|
||||
return !CaseHideProjectList.includes(project);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -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 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 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',
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb'];
|
||||
@ -513,9 +513,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
ntyl: '/design/login?project=ntyl',
|
||||
designntyl: '/login?project=ntyl',
|
||||
ntyc: '/design/login?project=ntyc',
|
||||
designntyc: '/login?project=ntyc',
|
||||
cgy: '/design/login?project=cgy',
|
||||
designcgy: '/login?project=cgy'
|
||||
designntyc: '/login?project=ntyc'
|
||||
// cgy: '/design/login?project=cgy',
|
||||
// designcgy: '/login?project=cgy'
|
||||
};
|
||||
export const ProjectList = [
|
||||
{value:'xty', label:'西铁院'},
|
||||
|
Loading…
Reference in New Issue
Block a user