diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js
index 0a30adf5c..abfa281ed 100644
--- a/src/jmapNew/theme/components/utils/menuOperate.js
+++ b/src/jmapNew/theme/components/utils/menuOperate.js
@@ -909,11 +909,6 @@ export const menuOperate = {
agreeSwitchControlMode:{
operation: OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.operation,
cmdType: CMD.CTC.CTC_AGREE_OPERATION_MODEL
- },
- // 不同意操作模式转换
- noAgreeSwitchControlMode:{
- operation: OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.operation,
- cmdType: CMD.CTC.CTC_NO_AGREE_OPERATION_MODEL
}
},
Rail: {
diff --git a/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue b/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue
index 7d43e9fe9..019b54cd9 100644
--- a/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue
+++ b/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue
@@ -24,31 +24,31 @@
- 全选
+ 全选
-
- 中心控制
+
+ 中心控制
- 全选
+ 全选
-
- 车站控制
+
+ 车站控制
- 全选
+ 全选
-
- 车站调车
+
+ 车站调车
@@ -108,6 +108,9 @@ export default {
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
+ },
+ operationModeApplyList() {
+ return this.$store.state.socket.operationModeApplyList;
}
},
watch: {
@@ -141,6 +144,18 @@ export default {
}
},
methods:{
+ getTextColor(row, type) {
+ let colorClass = '';
+ if (row.source == type) {
+ colorClass = 'redText';
+ }
+ if (this.isAgreeMode) {
+ if (row.target == type) {
+ colorClass = 'orangeText';
+ }
+ }
+ return colorClass;
+ },
changeAllAgreeChecked() {
this.tableData.forEach(item => {
this.$set(item, 'isAgree', this.allAgreeChecked);
@@ -169,7 +184,15 @@ export default {
getListData() {
this.tableData = [];
if (this.isAgreeMode) {
- console.log('============');
+ this.operationModeApplyList.forEach(item => {
+ const info = this.$store.getters['map/getDeviceByCode'](item.code);
+ const obj = {
+ ...item,
+ name: info ? info.name : '',
+ isAgree: false
+ };
+ this.tableData.push(obj);
+ });
} else {
let list = this.stationList;
if (this.work == 'ctcWork') {
@@ -194,9 +217,38 @@ export default {
}
},
commit() {
- console.log('--commit---');
if (this.isAgreeMode) {
- console.log('==----------===');
+ const list = [];
+ const noList = [];
+ this.tableData.forEach(item => {
+ if (item.isAgree) {
+ list.push(item.code);
+ } else {
+ noList.push(item.code);
+ }
+ });
+ const operate = {
+ over: true,
+ operation: menuOperate.CTC.agreeSwitchControlMode.operation,
+ userOperationType: UserOperationType.LEFTCLICK,
+ cmdType: menuOperate.CTC.agreeSwitchControlMode.cmdType,
+ param: {
+ agreeStationCodes: list,
+ noAgreeStationCodes: noList
+ }
+ };
+ this.loading = true;
+ this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
+ if (valid) {
+ this.loading = false;
+ this.doClose();
+ this.$store.commit('socket/clearOperationModeApplyList', JSON.parse(JSON.stringify(this.tableData)));
+ }
+ }).catch(() => {
+ this.loading = false;
+ this.doClose();
+ this.$refs.noticeInfo.doShow();
+ });
} else {
const list = [];
this.tableData.forEach(item => {
@@ -262,4 +314,7 @@ export default {
.redText {
color: red;
}
+.orangeText {
+ color: orange;
+}
diff --git a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
index 5fc26864d..aeb09a584 100644
--- a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
+++ b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
@@ -102,15 +102,15 @@
选择
-