diff --git a/src/views/system/deviceManage/editConfig.vue b/src/views/system/deviceManage/editConfig.vue
index e85a46359..6ee55c059 100644
--- a/src/views/system/deviceManage/editConfig.vue
+++ b/src/views/system/deviceManage/editConfig.vue
@@ -88,6 +88,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -242,11 +286,31 @@ export default {
client:'',
clientList: []
},
+ formTms: {
+ deviceCode: '',
+ roleCode:'',
+ client:'',
+ clientList: []
+ },
clientList: [],
pictureList: [
{ label: '广播系统', value: 'paMain' },
{ label: '乘客信息', value: 'pidsMain' }
],
+ rulesTms:{
+ deviceCode: [
+ { required: true, message: '请选择归属车站', trigger: 'change'}
+ ],
+ roleCode: [
+ { required: true, message: '请选择关联角色', trigger: 'change'}
+ ],
+ client: [
+ { required: true, message: '请选择关联客户端', trigger: 'change'}
+ ],
+ clientList: [
+ { required: true, message: '请选择客户端列表', trigger: 'change'}
+ ]
+ },
rulesIm:{
roleCode: [
{ required: true, message: '请选择关联角色', trigger: 'change'}
@@ -331,6 +395,10 @@ export default {
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
const form = JSON.parse(resp.data.config);
this.formIscs = Object.assign(this.formIscs, form);
+ } else if (resp.data.config && ['PIS', 'TMS'].includes(resp.data.type)) {
+ this.formTms = {deviceCode: '', roleCode:'', client:'', clientList: []};
+ const form = JSON.parse(resp.data.config);
+ this.formTms = Object.assign(this.formTms, form);
}
}).catch(()=> {
this.$message.error('获取项目设备详情失败!');
@@ -348,7 +416,7 @@ export default {
}).catch(() => {
this.$message.error('获取设备列表失败!');
});
- } else if (this.data.type === 'ISCS_CW') {
+ } else if (this.data.type === 'ISCS_CW' || this.data.type === 'PIS') {
getDevicesByType(row.project, 'CW').then(res => {
if (res.data && res.data.length) {
this.lwList = res.data;
@@ -356,6 +424,14 @@ export default {
}).catch(() => {
this.$message.error('获取设备列表失败!');
});
+ } else if (this.data.type === 'TMS') {
+ getDevicesByType(row.project, 'DRIVE').then(res => {
+ if (res.data && res.data.length) {
+ this.lwList = res.data;
+ }
+ }).catch(() => {
+ this.$message.error('获取设备列表失败!');
+ });
}
getBackProjectConfigByCode(row.project).then(res=>{
const data = res.data;
@@ -435,6 +511,17 @@ export default {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
+ } else if (this.data.type === 'PIS' || this.data.type === 'TMS') {
+ this.$refs.formTms.validate(() => {
+ const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formTms) };
+ setDeviceConfig(data).then(response => {
+ self.$message.success('设置设备配置成功');
+ self.handleClose();
+ self.$emit('reloadTable');
+ }).catch(error => {
+ self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
+ });
+ });
}
},
handleClose() {
diff --git a/src/views/system/deviceManage/index.vue b/src/views/system/deviceManage/index.vue
index cf7b1a263..74a0f5114 100644
--- a/src/views/system/deviceManage/index.vue
+++ b/src/views/system/deviceManage/index.vue
@@ -187,8 +187,8 @@ export default {
});
},
editConfig(index, row) {
- 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)) {
+ const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN', 'PIS'];
+ if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT', 'TMS', 'PIS'].includes(row.type)) {
this.$refs.editConfig.doShow(row);
} else if (configGatewayList.includes(row.type)) {
this.$refs.editConfigGateway.doShow(row);