设备管理代码调整
This commit is contained in:
parent
725708fe34
commit
ece72fb110
@ -314,6 +314,23 @@ export default {
|
|||||||
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
|
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
|
||||||
],
|
],
|
||||||
paperStateArr: ['正在编辑', '封存', '已使用'], // 试卷定义状态
|
paperStateArr: ['正在编辑', '封存', '已使用'], // 试卷定义状态
|
||||||
paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'] // 试卷定义查询状态
|
paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'], // 试卷定义查询状态
|
||||||
|
|
||||||
|
projectList:[
|
||||||
|
{label:'西铁院', value: 'XTY'},
|
||||||
|
{label: '贵州装备', value:'GZB'},
|
||||||
|
{label: '哈尔滨', value:'HEB'},
|
||||||
|
{label: '苏电院', value:'SDY'},
|
||||||
|
{label: '中航锐创(实训室)', value: 'RICHOR_JOINT'},
|
||||||
|
{label: '上饶沙盘', value: 'SR_SANDBOX'},
|
||||||
|
{label: '江西工贸', value: 'JXGM'},
|
||||||
|
{label: '扬州工业', value: 'RICHOR_YGY'},
|
||||||
|
{label: '红河财经', value: 'RICHOR_HHCJ'},
|
||||||
|
{label: '苏安院', value: 'SAY'},
|
||||||
|
{label: '众合-陕铁院', value: 'UNITTEC_STY'},
|
||||||
|
{label: '教学通用', value: 'TEACHING'},
|
||||||
|
{label: '长兴技校', value: 'RICHOR_CXJS'},
|
||||||
|
{label: '京津冀联盟', value: 'JJJLM'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -13,12 +13,6 @@ import { createDevice, deviceIsExist} from '@/api/project';
|
|||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'DeviceAdd',
|
name: 'DeviceAdd',
|
||||||
props: {
|
|
||||||
projectCode: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -40,7 +34,8 @@ export default {
|
|||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'code', label: this.$t('system.deviceCode'), type: 'text', required: true, placeholder: this.$t('rules.enterDeviceCode') },
|
{ prop: 'code', label: this.$t('system.deviceCode'), type: 'text', required: true, placeholder: this.$t('rules.enterDeviceCode') },
|
||||||
{ prop: 'type', label: this.$t('system.deviceType1'), type: 'select', required: true, options: this.deviceTypeList, placeholder: this.$t('rules.selectDeviceType') }
|
{ prop: 'type', label: this.$t('system.deviceType1'), type: 'select', required: true, options: this.deviceTypeList, placeholder: this.$t('rules.selectDeviceType') },
|
||||||
|
{prop: 'projectCode', label:'所属项目', type: 'select', required: true, options:ConstConfig.ConstSelect.projectList }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -52,6 +47,9 @@ export default {
|
|||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: this.$t('rules.selectDeviceType'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectDeviceType'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
projectCode: [
|
||||||
|
{ required: true, message: '请选择所属项目', trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
@ -65,7 +63,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.formModel.projectCode = this.projectCode;
|
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -22,6 +22,28 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-form v-show="['IM','CW'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
|
||||||
|
<el-form-item label="关联角色:" prop="roleCode">
|
||||||
|
<el-select v-model="formIm.roleCode" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in roleList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联客户端:" prop="client">
|
||||||
|
<el-select v-model="formIm.client" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in clientList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
||||||
<el-form-item label="关联地图:" prop="mapId">
|
<el-form-item label="关联地图:" prop="mapId">
|
||||||
<el-select v-model="formLw.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
<el-select v-model="formLw.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
||||||
@ -53,6 +75,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关联客户端:" prop="client">
|
||||||
|
<el-select v-model="formLw.client" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in clientList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form v-show="data.type === 'ISCS_LW' || data.type === 'ISCS_CW'" ref="formIscs" :model="formIscs" label-width="100px" :rules="rulesIscs">
|
<el-form v-show="data.type === 'ISCS_LW' || data.type === 'ISCS_CW'" ref="formIscs" :model="formIscs" label-width="100px" :rules="rulesIscs">
|
||||||
<el-form-item :label="data.type === 'ISCS_LW'?'现地工作站:': '行调工作站'" prop="deviceCode">
|
<el-form-item :label="data.type === 'ISCS_LW'?'现地工作站:': '行调工作站'" prop="deviceCode">
|
||||||
@ -108,6 +140,10 @@ export default {
|
|||||||
mapList: [],
|
mapList: [],
|
||||||
roleList:[],
|
roleList:[],
|
||||||
lwList: [],
|
lwList: [],
|
||||||
|
formIm:{
|
||||||
|
roleCode:'',
|
||||||
|
client:''
|
||||||
|
},
|
||||||
formIbp: {
|
formIbp: {
|
||||||
part: '',
|
part: '',
|
||||||
deviceCode: ''
|
deviceCode: ''
|
||||||
@ -115,17 +151,47 @@ export default {
|
|||||||
formLw: {
|
formLw: {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
roleCode:''
|
roleCode:'',
|
||||||
|
client:''
|
||||||
},
|
},
|
||||||
formIscs: {
|
formIscs: {
|
||||||
deviceCode: '',
|
deviceCode: '',
|
||||||
picture: '',
|
picture: '',
|
||||||
stationCode: ''
|
stationCode: ''
|
||||||
},
|
},
|
||||||
|
clientList: [
|
||||||
|
{ label: '中心ATS工作站', value: 'dispatchWork' },
|
||||||
|
{ label: '中心ATS大屏', value: 'bigScreen' },
|
||||||
|
{ label: '现地ATS工作站', value: 'localWork' },
|
||||||
|
{ label: 'ISCS', value: 'iscsView' },
|
||||||
|
{ label: 'IBP', value: 'ibp' },
|
||||||
|
{ label: 'PSL', value: 'psl' },
|
||||||
|
{ label: '列车驾驶', value: 'drivingPlan' },
|
||||||
|
{ label: 'CCTV', value: 'cctvView' },
|
||||||
|
{ label: '设备视图', value: 'jl3dModle' },
|
||||||
|
{ label: '数字沙盘', value: 'digitalStand' },
|
||||||
|
{ label: '车务终端', value: 'trafficTerminal' },
|
||||||
|
{ label: '车务管理终端', value: 'trafficManageTerminal' },
|
||||||
|
{ label: '调度命令', value: 'dispatchingCommand' },
|
||||||
|
{ label: '调度计划', value: 'schedulingPlan' },
|
||||||
|
{ label: '大客流策略', value: 'largePassengerStrategy' },
|
||||||
|
{ label: '大客流视图', value: 'largePassengerView' },
|
||||||
|
{ label: '行调台', value: 'dispatcherManage' },
|
||||||
|
{ label: '派班工作站', value: 'scheduleWork' },
|
||||||
|
{ label: '应急调度', value: 'emergency' }
|
||||||
|
],
|
||||||
pictureList: [
|
pictureList: [
|
||||||
{ label: '广播系统', value: 'paMain' },
|
{ label: '广播系统', value: 'paMain' },
|
||||||
{ label: '乘客信息', value: 'pidsMain' }
|
{ label: '乘客信息', value: 'pidsMain' }
|
||||||
],
|
],
|
||||||
|
rulesIm:{
|
||||||
|
roleCode: [
|
||||||
|
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||||
|
],
|
||||||
|
client: [
|
||||||
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
]
|
||||||
|
},
|
||||||
rulesIbp: {
|
rulesIbp: {
|
||||||
part: [
|
part: [
|
||||||
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
||||||
@ -140,6 +206,9 @@ export default {
|
|||||||
],
|
],
|
||||||
roleCode: [
|
roleCode: [
|
||||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||||
|
],
|
||||||
|
client: [
|
||||||
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesIscs: {
|
rulesIscs: {
|
||||||
@ -228,6 +297,21 @@ export default {
|
|||||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (['IM', 'CW'].includes(this.data.type)) {
|
||||||
|
this.$refs.formIm.validate(() => {
|
||||||
|
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIm) };
|
||||||
|
setDeviceConfig(data).then(response => {
|
||||||
|
if (self.data.type == 'IM') {
|
||||||
|
self.$message.success('设置教员机配置成功');
|
||||||
|
} else {
|
||||||
|
self.$message.success('设置行调工作站配置成功');
|
||||||
|
}
|
||||||
|
self.handleClose();
|
||||||
|
self.$emit('reloadTable');
|
||||||
|
}).catch(error => {
|
||||||
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
} else if (this.data.type === 'ISCS_LW') {
|
} else if (this.data.type === 'ISCS_LW') {
|
||||||
this.$refs.formIscs.validate(() => {
|
this.$refs.formIscs.validate(() => {
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIscs) };
|
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIscs) };
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<device-add ref="add" :project-code="projectCode" @reloadTable="reloadTable" />
|
<device-add ref="add" @reloadTable="reloadTable" />
|
||||||
<edit-config-gateway ref="editConfigGateway" @reloadTable="reloadTable" />
|
<edit-config-gateway ref="editConfigGateway" @reloadTable="reloadTable" />
|
||||||
<edit-config ref="editConfig" @reloadTable="reloadTable" />
|
<edit-config ref="editConfig" @reloadTable="reloadTable" />
|
||||||
<edit-config-screen ref="editConfigScreen" @reloadTable="reloadTable" />
|
<edit-config-screen ref="editConfigScreen" @reloadTable="reloadTable" />
|
||||||
@ -37,24 +37,9 @@ export default {
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
projectCode:'',
|
// projectCode:'',
|
||||||
deviceTypeList:ConstConfig.ConstSelect.projectDeviceTypeList,
|
deviceTypeList:ConstConfig.ConstSelect.projectDeviceTypeList,
|
||||||
projectList: [
|
projectList: ConstConfig.ConstSelect.projectList,
|
||||||
{label:'西铁院', value: 'XTY'},
|
|
||||||
{label: '贵州装备', value:'GZB'},
|
|
||||||
{label: '哈尔滨', value:'HEB'},
|
|
||||||
{label: '苏电院', value:'SDY'},
|
|
||||||
{label: '中航锐创(实训室)', value: 'RICHOR_JOINT'},
|
|
||||||
{label: '上饶沙盘', value: 'SR_SANDBOX'},
|
|
||||||
{label: '江西工贸', value: 'JXGM'},
|
|
||||||
{label: '扬州工业', value: 'RICHOR_YGY'},
|
|
||||||
{label: '红河财经', value: 'RICHOR_HHCJ'},
|
|
||||||
{label: '苏安院', value: 'SAY'},
|
|
||||||
{label: '众合-陕铁院', value: 'UNITTEC_STY'},
|
|
||||||
{label: '教学通用', value: 'TEACHING'},
|
|
||||||
{label: '长兴技校', value: 'RICHOR_CXJS'},
|
|
||||||
{label: '京津冀联盟', value: 'JJJLM'}
|
|
||||||
],
|
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
@ -70,6 +55,13 @@ export default {
|
|||||||
config: {
|
config: {
|
||||||
data: ConstConfig.ConstSelect.projectDeviceTypeList
|
data: ConstConfig.ConstSelect.projectDeviceTypeList
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
projectCode:{
|
||||||
|
type: 'select',
|
||||||
|
label: '所属项目',
|
||||||
|
config: {
|
||||||
|
data: ConstConfig.ConstSelect.projectList
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,11 +126,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.projectCode = getSessionStorage('project') || '';
|
// this.projectCode = getSessionStorage('project') || '';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeQuery(params) {
|
beforeQuery(params) {
|
||||||
params.projectCode = this.projectCode;
|
// params.projectCode = this.projectCode;
|
||||||
return params;
|
return params;
|
||||||
},
|
},
|
||||||
createProjectDevice() {
|
createProjectDevice() {
|
||||||
@ -187,7 +179,7 @@ export default {
|
|||||||
},
|
},
|
||||||
editConfig(index, row) {
|
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'];
|
||||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW'].includes(row.type)) {
|
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW'].includes(row.type)) {
|
||||||
this.$refs.editConfig.doShow(row);
|
this.$refs.editConfig.doShow(row);
|
||||||
} else if (configGatewayList.includes(row.type)) {
|
} else if (configGatewayList.includes(row.type)) {
|
||||||
this.$refs.editConfigGateway.doShow(row);
|
this.$refs.editConfigGateway.doShow(row);
|
||||||
@ -210,11 +202,17 @@ export default {
|
|||||||
const config = JSON.parse(res.data.config);
|
const config = JSON.parse(res.data.config);
|
||||||
roleCode = config.roleCode;
|
roleCode = config.roleCode;
|
||||||
}
|
}
|
||||||
|
let client = '';
|
||||||
|
if (res.data.config) {
|
||||||
|
const config = JSON.parse(res.data.config);
|
||||||
|
client = config.client;
|
||||||
|
}
|
||||||
let url = '';
|
let url = '';
|
||||||
url = `${window.location.protocol}//${window.location.host}/cbtc/login?project=${row.project.toLowerCase().replace(/_/, '')}&projectDevice=${row.code}&type=${row.type}`;
|
url = `${window.location.protocol}//${window.location.host}/cbtc/login?project=${row.project.toLowerCase().replace(/_/, '')}&projectDevice=${row.code}&type=${row.type}`;
|
||||||
if (roleCode) {
|
if (roleCode) {
|
||||||
url += '&roleCode=' + roleCode;
|
url += '&roleCode=' + roleCode;
|
||||||
}
|
}
|
||||||
|
if (client) { url += '&client=' + client; }
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.$messageBox();
|
this.$messageBox();
|
||||||
this.$confirm(`登录路径:${url}`, '登录路径', {
|
this.$confirm(`登录路径:${url}`, '登录路径', {
|
||||||
@ -233,3 +231,8 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.el-message-box__message p {
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user