实训管理和项目设备登录调整
This commit is contained in:
parent
3fcf066e66
commit
bd310dbc28
@ -32,14 +32,21 @@ export function updateTraining(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 更新实训标签 */
|
||||
export function updateTrainingLabel(data) {
|
||||
/** 更新发布实训信息(标签, 描述, 标题) */
|
||||
export function updateTrainingInfo(data) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/update/label`,
|
||||
url: `/api/v2/training/published/update`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 已发布实训转为草稿 */
|
||||
export function saveAsTrainingDraft(trainingId) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/${trainingId}/saveAsDraft`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
/** 查询步骤列表 */
|
||||
export function getTrainingStepList(trainingId) {
|
||||
return request({
|
||||
|
BIN
src/assets/bg_pis.png
Normal file
BIN
src/assets/bg_pis.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
src/assets/bg_tms.png
Normal file
BIN
src/assets/bg_tms.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
@ -234,7 +234,9 @@ export default {
|
||||
{ label: '列车', value: 'TRAIN' },
|
||||
{ label: 'UDP客户端', value: 'UDP_CLIENT' },
|
||||
{ label: '站台PIS', value: 'PIS_STAND' },
|
||||
{ label: '列车PIS', value: 'PIS_TRAIN' }
|
||||
{ label: '列车PIS', value: 'PIS_TRAIN' },
|
||||
{ label: '乘客PIS', value: 'PIS' },
|
||||
{ label: 'TMS', value: 'TMS' }
|
||||
],
|
||||
ossList: [
|
||||
{ name: '场景1', url: '场景1—桂花园道岔故障(配分版60分).pdf' },
|
||||
|
@ -33,10 +33,10 @@ export function getTopic(type, group, param) {
|
||||
break;
|
||||
case 'ISCSGATE':
|
||||
topic = `/queue/simulation/${group}/iscs/gate/${param.stationCode}`;
|
||||
break;
|
||||
case 'TMS':
|
||||
topic = `/queue/simulation/${group}/train/001/tms`
|
||||
break;
|
||||
break;
|
||||
case 'TMS':
|
||||
topic = `/queue/simulation/${group}/train/001/tms`;
|
||||
break;
|
||||
case 'PIS_STAND':
|
||||
topic = `/queue/simulation/${group}/standPis/${param.standCode}`;
|
||||
break;
|
||||
|
@ -22,7 +22,7 @@
|
||||
<div class="left-logo-box">
|
||||
<img class="logo" :src="loginProLogo ? $store.state.user.ossUrl + '/logo/' + loginProLogo:''" :style="{ width: loginProLogoWidth+'px'}">
|
||||
<span>{{ loginOrgTitle }}</span>
|
||||
<img v-if="project === 'cdgxy'" class="logo" :src="zhIcon" >
|
||||
<img v-if="project === 'cdgxy'" class="logo" :src="zhIcon">
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="text-box">{{ loginProtitle }}</div>
|
||||
@ -57,6 +57,8 @@ import bgIscsImg from '@/assets/bg_iscs.jpg';
|
||||
import bgCctvImg from '@/assets/bg_cctv.jpg';
|
||||
import bgLswImg from '@/assets/bg_lsw.jpg';
|
||||
import bgPsdImg from '@/assets/bg_psd.png';
|
||||
import bgPisImg from '@/assets/bg_pis.png';
|
||||
import bgTmsImg from '@/assets/bg_tms.png';
|
||||
import ZongheIcon from '@/assets/icon/icon_zonghe.png';
|
||||
import { getLoginWmurl, checkLoginStatus, getLoginInfo } from '@/api/login';
|
||||
import { getToken} from '@/utils/auth';
|
||||
@ -97,7 +99,7 @@ export default {
|
||||
return this.$route.query.type;
|
||||
},
|
||||
syncLogin() {
|
||||
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX', 'ILW', 'PIS_STAND', 'PIS_TRAIN'];
|
||||
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX', 'ILW', 'PIS_STAND', 'PIS_TRAIN', 'PIS', 'TMS'];
|
||||
return this.type ? synchronousLogin.includes(this.type) : false;
|
||||
},
|
||||
bgImg() {
|
||||
@ -142,7 +144,9 @@ export default {
|
||||
ILW:{text:'检测教员机登录中', Img:bgLswImg},
|
||||
PIS_TRAIN:{text:'检测教员机登录中'},
|
||||
PIS_STAND:{text:'检测教员机登录中'},
|
||||
SANDBOX:{Img:bgLswImg, text:'检测教员机登录中'}
|
||||
SANDBOX:{Img:bgLswImg, text:'检测教员机登录中'},
|
||||
PIS:{text:'检测教员机登录中', Img: bgPisImg},
|
||||
TMS:{text:'检测列车驾驶终端登录中', Img: bgTmsImg}
|
||||
};
|
||||
this.loadingText = deviceMap[this.type].text;
|
||||
this.deviceImg = deviceMap[this.type].Img;
|
||||
|
@ -24,7 +24,7 @@ import { loadTrainingBg } from '@/api/jmap/training';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { loadDraftTraining } from '@/api/jmap/training';
|
||||
import { deleteTraining, publishTraining } from '@/api/trainingManage';
|
||||
import { deleteTraining, publishTraining, jumpToTraining } from '@/api/trainingManage';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
@ -206,6 +206,18 @@ export default {
|
||||
this.$jlmap && this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
|
||||
}
|
||||
this.$emit('updateDetails', resp.data);
|
||||
if (resp.data && resp.data.needRunToFinalStep) {
|
||||
this.$confirm('此草稿实训为转存后实训且未保存步骤背景,如需编辑则需快速仿真到最后一步!', this.$t('global.tips'), {
|
||||
confirmButtonText: '快速仿真',
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
const stepList = JSON.parse(resp.data.stepJson);
|
||||
jumpToTraining(this.$route.query.group, stepList[stepList.length - 1].id).then(()=>{
|
||||
this.$message.success('开始快速仿真!');
|
||||
}).catch(e => this.$message.error('开始快速仿真失败!'));
|
||||
});
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
this.$emit('updateDetails', {});
|
||||
|
@ -53,7 +53,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateTrainingLabel } from '@/api/trainingManage';
|
||||
import { updateTrainingInfo } from '@/api/trainingManage';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
export default {
|
||||
@ -87,8 +87,8 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '90px',
|
||||
items: [
|
||||
{ prop: 'name', label: '名称', type: 'text', required: true, disabled: true },
|
||||
{ prop: 'description', label: '描述', type: 'textarea', isAutoSize: true, required: true, disabled: true },
|
||||
{ prop: 'name', label: '名称', type: 'text', required: true },
|
||||
{ prop: 'description', label: '描述', type: 'textarea', isAutoSize: true, required: true },
|
||||
{ prop: 'type', label: '类型', type: 'select', options: ConstConfig.ConstSelect.trainingType, required: true, disabled: true }
|
||||
]
|
||||
};
|
||||
@ -168,8 +168,9 @@ export default {
|
||||
const cpData = Object.assign({}, this.formModel);
|
||||
cpData.client = this.formModel.type === 'SINGLE' ? this.tagForm.client : '';
|
||||
cpData.labelJson = JSON.stringify(this.tagForm.dynamicTags);
|
||||
const api = updateTrainingLabel;
|
||||
const api = updateTrainingInfo;
|
||||
const mes = '编辑标签';
|
||||
console.log(cpData, 'cpData');
|
||||
api(cpData).then(res => {
|
||||
this.$message.success(`${mes}成功!`);
|
||||
this.$emit('editLabel');
|
||||
|
@ -14,7 +14,7 @@ import { launchFullscreen } from '@/utils/screen';
|
||||
import editTraining from './editTraining';
|
||||
import { superAdmin, admin } from '@/router/index';
|
||||
import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training';
|
||||
import { exportTrainingData, importTrainingData } from '@/api/trainingManage';
|
||||
import { exportTrainingData, importTrainingData, saveAsTrainingDraft } from '@/api/trainingManage';
|
||||
export default {
|
||||
name:'TrainingManage',
|
||||
components: {
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('trainingManage.operate'),
|
||||
width: '240',
|
||||
width: '330',
|
||||
buttons: [
|
||||
// {
|
||||
// name: '加载',
|
||||
@ -111,11 +111,17 @@ export default {
|
||||
// showControl:(row) => { return row.mapSystem; }
|
||||
// }
|
||||
{
|
||||
name: '修改标签',
|
||||
name: '修改信息',
|
||||
handleClick: this.handlerEditLabel,
|
||||
type: 'primary',
|
||||
showControl: row => { return this.isAdmin; }
|
||||
},
|
||||
{
|
||||
name: '存为草稿',
|
||||
handleClick: this.handlerSaveDraft,
|
||||
type: 'primary',
|
||||
showControl: row => { return this.isAdmin; }
|
||||
},
|
||||
{
|
||||
name: '上架',
|
||||
handleClick: this.handlerShelf,
|
||||
@ -226,6 +232,17 @@ export default {
|
||||
handlerEditLabel(index, data) {
|
||||
this.$refs.editTraining.doShow(data);
|
||||
},
|
||||
handlerSaveDraft(index, data) {
|
||||
this.$confirm('此操作将实训转存为草稿, 是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
saveAsTrainingDraft(data.id).then(resp=>{
|
||||
this.$message.success('转存为草稿成功!');
|
||||
}).catch(e => this.$message.error('转存为草稿失败!'));
|
||||
});
|
||||
},
|
||||
handlerShelf(index, data) {
|
||||
publishTrainingPutOn({ids: [data.id]}).then(resp=>{
|
||||
this.queryList.reload();
|
||||
|
@ -484,7 +484,6 @@ export default {
|
||||
handleMember(member, stationList) {
|
||||
const data = { value: member.id, label: '', memberType: member.type };
|
||||
const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
console.log(member, '====');
|
||||
switch (member.type) {
|
||||
case 'DISPATCHER':
|
||||
data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
|
@ -82,7 +82,9 @@ export default {
|
||||
UDP_CLIENT: 'UDP客户端',
|
||||
PIS_STAND: '站台PIS',
|
||||
PIS_TRAIN: '列车PIS',
|
||||
UDP_LOW:'UDP下位机'
|
||||
UDP_LOW:'UDP下位机',
|
||||
PIS: '乘客PIS',
|
||||
TMS: 'TMS'
|
||||
},
|
||||
mapList: [],
|
||||
roleList:[],
|
||||
@ -115,7 +117,6 @@ export default {
|
||||
this.jsonConfig = JSON.stringify(JSON.parse(resp.data.config), null, 4);
|
||||
}
|
||||
}).catch((e)=> {
|
||||
console.error(e, '======');
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
});
|
||||
// if (row.type === 'PSL' || row.type === 'PSC') {
|
||||
@ -153,7 +154,7 @@ export default {
|
||||
// } else {
|
||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: this.jsonConfig };
|
||||
flag && setDeviceConfig(data).then(response => {
|
||||
self.$message.success('设置设备网关映射配置成功');
|
||||
self.$message.success('设置设备配置成功');
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
@ -173,7 +174,7 @@ export default {
|
||||
// this.standCode = '';
|
||||
this.dialogVisible = false;
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
},
|
||||
}
|
||||
// mapIdChange(mapId, functionId) {
|
||||
// if (mapId) {
|
||||
// querySimulationStationsByMapId(mapId).then(resp => {
|
||||
@ -236,76 +237,76 @@ export default {
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
handleMember(member, stationList) {
|
||||
const data = { value: member.id, label: '', memberType: member.type };
|
||||
const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
switch (member.type) {
|
||||
case 'DISPATCHER':
|
||||
data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
data.label = '行值-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DRIVER':
|
||||
data.label = '司机-' + member.deviceCode;
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
data.label = '通号' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
data.label = '调度-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SIGNAL_BUILDING':
|
||||
data.label = '信号楼-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
data.label = '助理-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
data.label = '站长-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
data.label = '信号员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
data.label = '客运员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
data.label = '扳道员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
data.label = '引导员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
data.label = '工务工-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
data.label = '设备管理员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
data.label = '车务段段长' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
data.label = '工电调度' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
data.label = '上级部分' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SCHEDULING':
|
||||
data.label = '派班员' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SHIFT_MANAGER':
|
||||
data.label = '值班主任' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ENVIRONMENT_DISPATCHER':
|
||||
data.label = '环控调度' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
case 'STATION_ELECTRIC_WORKER':
|
||||
data.label = '电力工务 ' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
// handleMember(member, stationList) {
|
||||
// const data = { value: member.id, label: '', memberType: member.type };
|
||||
// const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
// switch (member.type) {
|
||||
// case 'DISPATCHER':
|
||||
// data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_SUPERVISOR':
|
||||
// data.label = '行值-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'DRIVER':
|
||||
// data.label = '司机-' + member.deviceCode;
|
||||
// break;
|
||||
// case 'MAINTAINER':
|
||||
// data.label = '通号' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'DEPOT_DISPATCHER':
|
||||
// data.label = '调度-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'SIGNAL_BUILDING':
|
||||
// data.label = '信号楼-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_ASSISTANT':
|
||||
// data.label = '助理-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_MASTER':
|
||||
// data.label = '站长-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_SIGNALER':
|
||||
// data.label = '信号员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_PASSENGER':
|
||||
// data.label = '客运员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_SWITCH_MAN':
|
||||
// data.label = '扳道员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_FACILITATOR':
|
||||
// data.label = '引导员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'STATION_WORKER':
|
||||
// data.label = '工务工-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'DEVICE_MANAGER':
|
||||
// data.label = '设备管理员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'TRAIN_MASTER':
|
||||
// data.label = '车务段段长' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'ELECTRIC_DISPATCHER':
|
||||
// data.label = '工电调度' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'PARENT_DEPARTMENT':
|
||||
// data.label = '上级部分' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'SCHEDULING':
|
||||
// data.label = '派班员' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'SHIFT_MANAGER':
|
||||
// data.label = '值班主任' + (member.name ? `-${member.name }` : '');
|
||||
// break;
|
||||
// case 'ENVIRONMENT_DISPATCHER':
|
||||
// data.label = '环控调度' + (member.name ? `-${member.name}` : '');
|
||||
// break;
|
||||
// case 'STATION_ELECTRIC_WORKER':
|
||||
// data.label = '电力工务 ' + (member.name ? `-${member.name}` : '');
|
||||
// break;
|
||||
// }
|
||||
// return data;
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -187,7 +187,7 @@ export default {
|
||||
});
|
||||
},
|
||||
editConfig(index, row) {
|
||||
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN'];
|
||||
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN', 'PIS', 'TMS'];
|
||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT'].includes(row.type)) {
|
||||
this.$refs.editConfig.doShow(row);
|
||||
} else if (configGatewayList.includes(row.type)) {
|
||||
|
Loading…
Reference in New Issue
Block a user