@@ -45,13 +45,13 @@
发令单位:
- {{ signedData.companyOfSender }}
+ {{ signedData.sendCompany ? signedData.sendCompany.name : '' }}
调度员姓名:
- {{ signedData.senderName }}
+ {{ signedData.sender }}
@@ -64,11 +64,7 @@
-
-
- {{ getDeviceName(scope.row.receiverId) }}
-
-
+
@@ -85,8 +81,8 @@
- 拒签
- 签收
+ 拒签
+ 签收
关闭
@@ -100,24 +96,34 @@ export default {
data() {
return {
signedData: {},
+ queryResData: {},
needRead: false,
needprint: false,
dialogShow: false,
- signedId: '',
+ // signedId: '',
signedBy: '',
typeObj: {
- NORMAL: '正常调度命令'
+ Normal: '普通调度命令',
+ Construct: '施工调度命令',
+ Forward: '转发调度命令',
+ Request: '请求调度命令',
+ LongTerm: '长效调度命令',
+ ShiftScheduling: '班计划调度命令',
+ Other: '其他调度命令'
},
signedStatusObj: {
- UNSIGNED: '未签收',
- SIGNED: '签收',
- REFUSE: '拒签'
+ Cache: '缓存',
+ Sent: '已发送',
+ SrmReceived: '自律机接收',
+ Received: '已接收',
+ Signed: '已签收',
+ Reject: '已拒签'
}
};
},
computed: {
...mapState('training', [
- 'memberList', 'simulationUserList', 'initTime'
+ 'memberList', 'memberData', 'simulationUserList', 'initTime'
]),
...mapState('socket', [
'dispatchCommandMsg'
@@ -132,17 +138,32 @@ export default {
return '调度命令管理';
},
commandId() {
- return this.signedData.id || '';
+ 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;
},
currentHasSigned() {
- let hasSigned = false;
- if (this.signedData.receiverInfos) {
- const obj = this.getSignInfo(this.signedData.receiverInfos);
- if (obj && obj.signedStatus != 'UNSIGNED') {
- hasSigned = true;
- }
+ let s = false;
+ const sentArr = ['编辑', '缓存', '已发送'];
+ if (!sentArr.includes(this.currentStatus)) {
+ s = true;
}
- return hasSigned;
+ return s;
},
getActiveUser() {
const userInfo = this.simulationUserList.find(item => {
@@ -152,15 +173,7 @@ export default {
return activeUser;
},
getTableData() {
- const receiverList = Object.values(this.signedData.receiverInfos || {});
- const list = [];
- receiverList.forEach(item => {
- const obj = {
- ...this.signedData,
- ...item
- };
- list.push(obj);
- });
+ const list = this.signedData.rcvCompanies || [];
return list;
}
},
@@ -179,20 +192,19 @@ export default {
getParseTime(val, f) {
return val ? parseTime(val, f) : '';
},
- getSenderName() {
- this.signedBy = '';
- this.signedId = '';
- const activeUser = this.simulationUserList.find(item => {
+ getSignedBy() {
+ const activeUser = Object.values(this.memberData).find(item => {
return item.userId == this.$store.state.user.id;
});
+ let name = '';
if (activeUser) {
- this.signedBy = activeUser.nickName;
- this.signedId = activeUser.memberId;
+ name = activeUser.labelName;
}
+ this.signedBy = name;
},
async doShow() {
await this.searchCmd(); // 补齐剧本指令,同cmdManage
- this.getSenderName();
+ this.getSignedBy();
this.getSignedData();
this.dialogShow = true;
this.hasReadCmd();
@@ -203,31 +215,17 @@ export default {
},
getSignedData() {
this.signedData = {};
- if (this.dispatchCommandMsg.type == 'ADD') {
- this.signedData = this.dispatchCommandMsg.body;
+ if (this.dispatchCommandMsg) {
+ this.signedData = this.dispatchCommandMsg;
}
},
- 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 = {
- commandId: this.commandId,
- title: this.signedData.title
+ cmdId: this.commandId,
+ rcId: this.rcId
};
- sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
+ sendCommandNew(this.group, 'CTC_READ_DIS_COMMAND', data).then((res) => {
console.log(res, '---res');
}).catch(error => {
console.log(error, '---已读命令error');
@@ -235,11 +233,13 @@ export default {
},
signCmd(status) {
if (!this.commandId) { return; }
- 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) => {
+ 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) => {
console.log(res, '---res');
// this.$emit('changeSignedStatus', signInfo);
this.doClose();
@@ -249,8 +249,9 @@ export default {
},
searchCmd() {
return new Promise((resolve, reject) => {
- sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
+ sendCommandNew(this.group, 'CTC_QUERY_DIS_COMMAND', {holderType: 'Station', holderCode: this.getActiveUser.deviceCode}).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 f3204e77a..83a38b40f 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.body) {
+ if (this.dispatchCommandMsg) {
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 0c1a2f477..d43f18941 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.body) {
+ if (this.dispatchCommandMsg) {
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 92ffd9c48..6c5c5e865 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.body) {
+ if (this.dispatchCommandMsg) {
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 e9a32d84f..7f335f6be 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.body) {
+ if (this.dispatchCommandMsg) {
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 77e72e89e..0b5ca6bb0 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.body) {
+ if (this.dispatchCommandMsg) {
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 efe28612b..7f7360e5e 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -277,9 +277,14 @@ function handle(state, data) {
state.railCtcStationManageRpChange++;
break;
// 调度命令信息
- case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
+ case 'SIMULATION_RAIL_CTC_DIS_COMMAND_ADD':
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;
@@ -477,7 +482,8 @@ const socket = {
simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息
loggedOutMsg: '',
railCtcStatusMsg: {}, // 占线板信息
- dispatchCommandMsg: {}, // 调度命令信息
+ dispatchCommandMsg: null, // 调度命令信息
+ dispatchCommandState: null, // 调度命令状态
changedCtcRunplanMap:{}, // 大铁项目 ctc 被修改运行计划的车站信息
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
@@ -499,12 +505,12 @@ const socket = {
firstTrainRemain: '',
firstEndStationName: '',
secondTrainRemain: '',
- secondEndStationName: '',
+ secondEndStationName: ''
},
onboardPisState: {
nextStationName: '',
- endStationName: '',
- },
+ endStationName: ''
+ }
},
getters: {
},
@@ -592,17 +598,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 = {};
+ state.dispatchCommandMsg = null;
},
resetRailCtcRunplanInitMsg: (state) => {
state.railCtcRunplanInitMsg = {};
diff --git a/src/views/dispatcherStationManage/dispatchCmd.vue b/src/views/dispatcherStationManage/dispatchCmd.vue
index a1acc87aa..c6f0ac8c7 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="1300px"
+ width="1500px"
:before-close="doClose"
:z-index="2010"
:modal="false"
@@ -13,7 +13,7 @@
>
-
+
@@ -21,7 +21,6 @@
-
-
-
+
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+ {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
+
+
+
+
+
+ {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
-
-
{{ typeObj[scope.row.type] || '' }}
@@ -72,16 +75,21 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+ {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
+
+
+
+
+
+
+ {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
-
-
{{ typeObj[scope.row.type] || '' }}
@@ -99,17 +107,21 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+ {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
-
-
+
+
+
+ {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -127,17 +139,21 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+ {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
-
-
+
+
+
+ {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -181,12 +197,12 @@
命令号
-
+
发令单位
-
+
受令单位
@@ -213,17 +229,21 @@
-
-
+
+
-
+
- {{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}
+ {{ JoinDeviceNameStr(scope.row.rcvCompanies) || '' }}
-
-
+
+
+
+ {{ scope.row.sendCompany ? scope.row.sendCompany.name: '' }}
+
+
{{ typeObj[scope.row.type] || '' }}
@@ -236,86 +256,113 @@
-