diff --git a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue
index 65b19d733..f19a6d3fa 100644
--- a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue
+++ b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue
@@ -25,38 +25,34 @@
@@ -45,13 +45,13 @@
发令单位:
- {{ signedData.sendCompany ? signedData.sendCompany.name : '' }}
+ {{ signedData.companyOfSender }}
调度员姓名:
- {{ signedData.sender }}
+ {{ signedData.senderName }}
@@ -64,7 +64,11 @@
-
+
+
+ {{ getDeviceName(scope.row.receiverId) }}
+
+
@@ -81,8 +85,8 @@
- 拒签
- 签收
+ 拒签
+ 签收
关闭
@@ -96,34 +100,24 @@ export default {
data() {
return {
signedData: {},
- queryResData: {},
needRead: false,
needprint: false,
dialogShow: false,
- // signedId: '',
+ signedId: '',
signedBy: '',
typeObj: {
- Normal: '普通调度命令',
- Construct: '施工调度命令',
- Forward: '转发调度命令',
- Request: '请求调度命令',
- LongTerm: '长效调度命令',
- ShiftScheduling: '班计划调度命令',
- Other: '其他调度命令'
+ NORMAL: '正常调度命令'
},
signedStatusObj: {
- Cache: '缓存',
- Sent: '已发送',
- SrmReceived: '自律机接收',
- Received: '已接收',
- Signed: '已签收',
- Reject: '已拒签'
+ UNSIGNED: '未签收',
+ SIGNED: '签收',
+ REFUSE: '拒签'
}
};
},
computed: {
...mapState('training', [
- 'memberList', 'memberData', 'simulationUserList', 'initTime'
+ 'memberList', 'simulationUserList', 'initTime'
]),
...mapState('socket', [
'dispatchCommandMsg'
@@ -138,32 +132,17 @@ export default {
return '调度命令管理';
},
commandId() {
- return this.signedData.cmdId || '';
- },
- rcId() {
- const rcArr = this.signedData.rcvCompanies || [];
- const obj = rcArr.find(item => {
- return item.code == this.getActiveUser.deviceCode;
- });
- const id = obj ? obj.id : '';
- return id;
- },
- currentStatus() {
- let s = '编辑';
- const cpId = this.signedData.sendCompany.id;
- if (this.queryResData.companyStateMap && this.queryResData.companyStateMap[cpId]) {
- const state = this.queryResData.companyStateMap[cpId].state;
- s = this.signedStatusObj[state] ? this.signedStatusObj[state] : '编辑';
- }
- return s;
+ return this.signedData.id || '';
},
currentHasSigned() {
- let s = false;
- const sentArr = ['编辑', '缓存', '已发送'];
- if (!sentArr.includes(this.currentStatus)) {
- s = true;
+ let hasSigned = false;
+ if (this.signedData.receiverInfos) {
+ const obj = this.getSignInfo(this.signedData.receiverInfos);
+ if (obj && obj.signedStatus != 'UNSIGNED') {
+ hasSigned = true;
+ }
}
- return s;
+ return hasSigned;
},
getActiveUser() {
const userInfo = this.simulationUserList.find(item => {
@@ -173,7 +152,15 @@ export default {
return activeUser;
},
getTableData() {
- const list = this.signedData.rcvCompanies || [];
+ const receiverList = Object.values(this.signedData.receiverInfos || {});
+ const list = [];
+ receiverList.forEach(item => {
+ const obj = {
+ ...this.signedData,
+ ...item
+ };
+ list.push(obj);
+ });
return list;
}
},
@@ -192,19 +179,20 @@ export default {
getParseTime(val, f) {
return val ? parseTime(val, f) : '';
},
- getSignedBy() {
- const activeUser = Object.values(this.memberData).find(item => {
+ getSenderName() {
+ this.signedBy = '';
+ this.signedId = '';
+ const activeUser = this.simulationUserList.find(item => {
return item.userId == this.$store.state.user.id;
});
- let name = '';
if (activeUser) {
- name = activeUser.labelName;
+ this.signedBy = activeUser.nickName;
+ this.signedId = activeUser.memberId;
}
- this.signedBy = name;
},
async doShow() {
await this.searchCmd(); // 补齐剧本指令,同cmdManage
- this.getSignedBy();
+ this.getSenderName();
this.getSignedData();
this.dialogShow = true;
this.hasReadCmd();
@@ -215,17 +203,31 @@ export default {
},
getSignedData() {
this.signedData = {};
- if (this.dispatchCommandMsg) {
- this.signedData = this.dispatchCommandMsg;
+ if (this.dispatchCommandMsg.type == 'ADD') {
+ this.signedData = this.dispatchCommandMsg.body;
}
},
+ getSignInfo(info) {
+ const obj = info[this.getActiveUser.deviceCode] || {};
+ return obj;
+ },
+ getSignedBy(info) {
+ const signedInfo = this.simulationUserList.find(item => {
+ return item.memberId == info.signedBy;
+ });
+ let name = '';
+ if (signedInfo) {
+ name = signedInfo.nickName;
+ }
+ return name;
+ },
hasReadCmd() {
if (!this.commandId) { return; }
const data = {
- cmdId: this.commandId,
- rcId: this.rcId
+ commandId: this.commandId,
+ title: this.signedData.title
};
- sendCommandNew(this.group, 'CTC_READ_DIS_COMMAND', data).then((res) => {
+ sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
}).catch(error => {
console.log(error, '---已读命令error');
@@ -233,13 +235,11 @@ export default {
},
signCmd(status) {
if (!this.commandId) { return; }
- const data = { cmdId: this.commandId, rcId: this.rcId, proxySign: false };
- let command = 'CTC_SIGN_DIS_COMMAND';
- if (!status) {
- command = 'CTC_SIGN_REJECT_DIS_COMMAND';
- delete data.proxySign;
- }
- sendCommandNew(this.group, command, data).then((res) => {
+ const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status, title: this.signedData.title };
+ const data = {
+ signInfo: signInfo
+ };
+ sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
// this.$emit('changeSignedStatus', signInfo);
this.doClose();
@@ -249,9 +249,8 @@ export default {
},
searchCmd() {
return new Promise((resolve, reject) => {
- sendCommandNew(this.group, 'CTC_QUERY_DIS_COMMAND', {holderType: 'Station', holderCode: this.getActiveUser.deviceCode}).then((res) => {
+ sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
console.log(res, '---res----');
- this.queryResData = res.data;
resolve();
}).catch(error => {
reject(error.message);
diff --git a/src/jmapNew/theme/datie_02/menus/index.vue b/src/jmapNew/theme/datie_02/menus/index.vue
index 83a38b40f..f3204e77a 100644
--- a/src/jmapNew/theme/datie_02/menus/index.vue
+++ b/src/jmapNew/theme/datie_02/menus/index.vue
@@ -33,7 +33,7 @@
与中心通信正常
-
+
提示信息窗
{{ '操控A:主机' + ' ' + dateString + ' ' + time }}
@@ -211,7 +211,7 @@ export default {
]),
hasCommandMsg() {
let status = false;
- if (this.dispatchCommandMsg) {
+ if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
@@ -425,9 +425,9 @@ export default {
}
},
initDate(date) {
- this.time = timestampFormat('HH:mm:ss', date);
- this.dateString = timestampFormat('YYYYMMDD', date);
- this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
+ this.time = timestampFormat('HH:mm:ss', date)
+ this.dateString = timestampFormat('YYYYMMDD', date)
+ this.dateString1 = timestampFormat('YYYY年MM月DD日', date)
},
handleRunplan() {
this.$refs.runplanPane.doShow();
diff --git a/src/jmapNew/theme/datie_02/menus/runplanPane.vue b/src/jmapNew/theme/datie_02/menus/runplanPane.vue
index d43f18941..0c1a2f477 100644
--- a/src/jmapNew/theme/datie_02/menus/runplanPane.vue
+++ b/src/jmapNew/theme/datie_02/menus/runplanPane.vue
@@ -652,7 +652,7 @@ export default {
]),
hasCommandMsg() {
let status = false;
- if (this.dispatchCommandMsg) {
+ if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
@@ -704,9 +704,9 @@ export default {
}
},
initDate(date) {
- this.time = timestampFormat('HH:mm:ss', date);
- this.dateString = timestampFormat('YYYYMMDD', date);
- this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
+ this.time = timestampFormat('HH:mm:ss', date)
+ this.dateString = timestampFormat('YYYYMMDD', date)
+ this.dateString1 = timestampFormat('YYYY年MM月DD日', date)
},
judgeColor({row, rowIndex}) {
if (row.effect) {
diff --git a/src/jmapNew/theme/datie_jd1a/menus/index.vue b/src/jmapNew/theme/datie_jd1a/menus/index.vue
index 6c5c5e865..92ffd9c48 100644
--- a/src/jmapNew/theme/datie_jd1a/menus/index.vue
+++ b/src/jmapNew/theme/datie_jd1a/menus/index.vue
@@ -33,7 +33,7 @@
与中心通信正常
-
+
提示信息窗
{{ '操控A:主机' + ' ' + dateString + ' ' + time }}
@@ -189,7 +189,7 @@ export default {
]),
hasCommandMsg() {
let status = false;
- if (this.dispatchCommandMsg) {
+ if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
@@ -271,9 +271,9 @@ export default {
}
},
initDate(date) {
- this.time = timestampFormat('HH:mm:ss', date);
- this.dateString = timestampFormat('YYYYMMDD', date);
- this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
+ this.time = timestampFormat('HH:mm:ss', date)
+ this.dateString = timestampFormat('YYYYMMDD', date)
+ this.dateString1 = timestampFormat('YYYY年MM月DD日', date)
},
handleRunplan() {
this.$refs.runplanPane.doShow();
diff --git a/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue b/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
index 7f335f6be..e9a32d84f 100644
--- a/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
+++ b/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
@@ -564,7 +564,7 @@ export default {
]),
hasCommandMsg() {
let status = false;
- if (this.dispatchCommandMsg) {
+ if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
diff --git a/src/jmapNew/theme/datie_ksk/menus/index.vue b/src/jmapNew/theme/datie_ksk/menus/index.vue
index 0b5ca6bb0..77e72e89e 100644
--- a/src/jmapNew/theme/datie_ksk/menus/index.vue
+++ b/src/jmapNew/theme/datie_ksk/menus/index.vue
@@ -33,7 +33,7 @@
与中心通信正常
-
+
提示信息窗
{{ '操控A:主机' + ' ' + dateString + ' ' + time }}
@@ -189,7 +189,7 @@ export default {
]),
hasCommandMsg() {
let status = false;
- if (this.dispatchCommandMsg) {
+ if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
@@ -271,9 +271,9 @@ export default {
}
},
initDate(date) {
- this.time = timestampFormat('HH:mm:ss', date);
- this.dateString = timestampFormat('YYYYMMDD', date);
- this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
+ this.time = timestampFormat('HH:mm:ss', date)
+ this.dateString = timestampFormat('YYYYMMDD', date)
+ this.dateString1 = timestampFormat('YYYY年MM月DD日', date)
},
handleRunplan() {
this.$refs.runplanPane.doShow();
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index 7f7360e5e..efe28612b 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -277,14 +277,9 @@ function handle(state, data) {
state.railCtcStationManageRpChange++;
break;
// 调度命令信息
- case 'SIMULATION_RAIL_CTC_DIS_COMMAND_ADD':
+ case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
state.dispatchCommandMsg = msg;
break;
- // 调度命令状态
- case 'SIMULATION_RAIL_CTC_DIS_COMMAND_SYNC':
- state.dispatchCommandState = msg;
- console.log('调度命令状态', msg);
- break;
// 车站发送计划信息
case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND':
state.changedCtcRunplanMap = msg;
@@ -482,8 +477,7 @@ const socket = {
simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息
loggedOutMsg: '',
railCtcStatusMsg: {}, // 占线板信息
- dispatchCommandMsg: null, // 调度命令信息
- dispatchCommandState: null, // 调度命令状态
+ dispatchCommandMsg: {}, // 调度命令信息
changedCtcRunplanMap:{}, // 大铁项目 ctc 被修改运行计划的车站信息
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
@@ -505,12 +499,12 @@ const socket = {
firstTrainRemain: '',
firstEndStationName: '',
secondTrainRemain: '',
- secondEndStationName: ''
+ secondEndStationName: '',
},
onboardPisState: {
nextStationName: '',
- endStationName: ''
- }
+ endStationName: '',
+ },
},
getters: {
},
@@ -598,17 +592,17 @@ const socket = {
state.iscsStatePisMessages = speed;
},
setStandPisMessages: (state, payload) => {
- state.standPisState = payload;
+ state.standPisState = payload
},
setOnboardPisMessages: (state, payload) => {
- state.onboardPisState = payload;
+ state.onboardPisState = payload
},
deleteRailwaySimulationRunplan: (state, stationCode) => {
delete state.railwaySimulationRunplanSendMap[stationCode];
state.railwaySimulationRunplanSendChange++;
},
clearDispatchCommandMsg: (state, data) => {
- state.dispatchCommandMsg = null;
+ state.dispatchCommandMsg = {};
},
resetRailCtcRunplanInitMsg: (state) => {
state.railCtcRunplanInitMsg = {};
diff --git a/src/views/dispatcherStationManage/dispatchCmd.vue b/src/views/dispatcherStationManage/dispatchCmd.vue
index c6f0ac8c7..a1acc87aa 100644
--- a/src/views/dispatcherStationManage/dispatchCmd.vue
+++ b/src/views/dispatcherStationManage/dispatchCmd.vue
@@ -4,7 +4,7 @@
class="dispatcher-cmd chengdou-03__systerm"
:title="title"
:visible.sync="show"
- width="1500px"
+ width="1300px"
:before-close="doClose"
:z-index="2010"
:modal="false"
@@ -13,7 +13,7 @@
>
-
+
@@ -21,6 +21,7 @@
-
-
-
+
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
-
-
-
-
-
- {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
+ {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -75,21 +72,16 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
-
-
-
-
-
-
- {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
+ {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -107,21 +99,17 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
+ {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
-
-
-
- {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
-
-
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -139,21 +127,17 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
+ {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
-
-
-
- {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
-
-
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -197,12 +181,12 @@
命令号
-
+
发令单位
-
+
受令单位
@@ -229,21 +213,17 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
+ {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
-
-
-
- {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
-
-
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -256,113 +236,86 @@
-