diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index c5a8a26df..17b327c90 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -314,6 +314,23 @@ export default { { label: '半自动闭塞', value: 'StationDirectionSemi' } ], 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'} + ] } }; diff --git a/src/views/system/deviceManage/add.vue b/src/views/system/deviceManage/add.vue index c6895d4ae..4cb019946 100644 --- a/src/views/system/deviceManage/add.vue +++ b/src/views/system/deviceManage/add.vue @@ -13,12 +13,6 @@ import { createDevice, deviceIsExist} from '@/api/project'; import ConstConfig from '@/scripts/ConstConfig'; export default { name: 'DeviceAdd', - props: { - projectCode: { - type: String, - required: true - } - }, data() { return { dialogVisible: false, @@ -40,7 +34,8 @@ export default { labelWidth: '120px', items: [ { 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; @@ -52,6 +47,9 @@ export default { ], type: [ { required: true, message: this.$t('rules.selectDeviceType'), trigger: 'change' } + ], + projectCode: [ + { required: true, message: '请选择所属项目', trigger: 'change' } ] }; return crules; @@ -65,7 +63,6 @@ export default { methods: { show(data) { this.dialogVisible = true; - this.formModel.projectCode = this.projectCode; }, doSave() { const self = this; diff --git a/src/views/system/deviceManage/editConfig.vue b/src/views/system/deviceManage/editConfig.vue index 7b83c8b79..cb854f021 100644 --- a/src/views/system/deviceManage/editConfig.vue +++ b/src/views/system/deviceManage/editConfig.vue @@ -22,6 +22,28 @@ + + + + + + + + + + + + @@ -53,6 +75,16 @@ /> + + + + + @@ -108,6 +140,10 @@ export default { mapList: [], roleList:[], lwList: [], + formIm:{ + roleCode:'', + client:'' + }, formIbp: { part: '', deviceCode: '' @@ -115,17 +151,47 @@ export default { formLw: { mapId: '', stationCode: '', - roleCode:'' + roleCode:'', + client:'' }, formIscs: { deviceCode: '', picture: '', 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: [ { label: '广播系统', value: 'paMain' }, { label: '乘客信息', value: 'pidsMain' } ], + rulesIm:{ + roleCode: [ + { required: true, message: '请选择关联角色', trigger: 'change'} + ], + client: [ + { required: true, message: '请选择关联客户端', trigger: 'change'} + ] + }, rulesIbp: { part: [ { required: true, message: '请选择显示位置', trigger: 'change' } @@ -140,6 +206,9 @@ export default { ], roleCode: [ { required: true, message: '请选择关联角色', trigger: 'change'} + ], + client: [ + { required: true, message: '请选择关联客户端', trigger: 'change'} ] }, rulesIscs: { @@ -228,6 +297,21 @@ export default { 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') { 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) }; diff --git a/src/views/system/deviceManage/index.vue b/src/views/system/deviceManage/index.vue index 9d8327e14..0b62683e9 100644 --- a/src/views/system/deviceManage/index.vue +++ b/src/views/system/deviceManage/index.vue @@ -1,7 +1,7 @@