From cb5da8a7b240eabfa611a53f61d8ab7c0f8f52c1 Mon Sep 17 00:00:00 2001
From: dong <58670809@qq.com>
Date: Thu, 3 Nov 2022 18:32:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/scripts/cmdPlugin/OperationHandler.js | 54 +++++++++
.../newMap/display/terminals/dispatchCmd.vue | 114 +++++++++++++-----
.../display/terminals/dispatcherManage.vue | 16 ++-
3 files changed, 152 insertions(+), 32 deletions(-)
diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js
index 04262930b..2337be926 100644
--- a/src/scripts/cmdPlugin/OperationHandler.js
+++ b/src/scripts/cmdPlugin/OperationHandler.js
@@ -4216,6 +4216,60 @@ export const OperationEvent = {
domId: '_Tips-TrainingDesign-menuButton-faultMode'
}
}
+ },
+ // 调度台
+ DispatcherManage: {
+ menu: {
+ schedulingPlan: {
+ operation: '1601',
+ domId: '_Tips-DispatcherManage-menu-schedulingPlan'
+ },
+ dispatchingCommand: {
+ operation: '1602',
+ domId: '_Tips-DispatcherManage-menu-dispatchingCommand'
+ },
+ dispatchWork: {
+ operation: '1603',
+ domId: '_Tips-DispatcherManage-menu-dispatchWork'
+ },
+ dataUpdate: {
+ operation: '1604',
+ domId: '_Tips-DispatcherManage-menu-dataUpdate'
+ },
+ timeLock: {
+ operation: '1605',
+ domId: '_Tips-DispatcherManage-menu-timeLock'
+ }
+ }
+ },
+ // 调度命令
+ DispatchCmd: {
+ menuButton: {
+ refreshSearch: {
+ operation: '1701',
+ domId: '_Tips-DispatchCmd-menuButton-refreshSearch'
+ },
+ createCmd: {
+ operation: '1702',
+ domId: '_Tips-DispatchCmd-menuButton-createCmd'
+ },
+ search: {
+ operation: '1703',
+ domId: '_Tips-DispatchCmd-menuButton-search'
+ },
+ allographCmd: {
+ operation: '1704',
+ domId: '_Tips-DispatchCmd-menuButton-allographCmd{TOP}'
+ },
+ sendCmd: {
+ operation: '1705',
+ domId: '_Tips-DispatchCmd-menuButton-sendCmd{TOP}'
+ },
+ saveCacheData: {
+ operation: '1706',
+ domId: '_Tips-DispatchCmd-menuButton-saveCacheData{TOP}'
+ }
+ }
}
};
diff --git a/src/views/newMap/display/terminals/dispatchCmd.vue b/src/views/newMap/display/terminals/dispatchCmd.vue
index 252566852..614014830 100644
--- a/src/views/newMap/display/terminals/dispatchCmd.vue
+++ b/src/views/newMap/display/terminals/dispatchCmd.vue
@@ -19,8 +19,8 @@
- 刷新
- 新建调度命令
+ 刷新
+ 新建调度命令
- 查询
+ 查询
清除
@@ -403,9 +403,9 @@
- 代签
- 下达
- 缓存
+ 代签
+ 下达
+ 缓存
@@ -421,6 +421,7 @@
import { sendCommandNew } from '@/api/jmap/training';
import { mapState } from 'vuex';
import { parseTime } from '@/utils/index';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name:'DispatcherCmd',
data() {
@@ -645,6 +646,9 @@ export default {
this.getTableHeight();
},
methods:{
+ getDomObj(key) {
+ return OperationEvent.DispatchCmd.menuButton[key];
+ },
activeChange(key) {
this[key] = !this[key];
this.getOperateTableHeight();
@@ -749,9 +753,18 @@ export default {
});
},
search() {
- this.searchTable = [];
- this.searchCmd().then(res => {
- this.getSearchTable();
+ const operate = {
+ operation: this.getDomObj('search').operation,
+ param: this.searchObj,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ if (valid) {
+ this.searchTable = [];
+ this.searchCmd().then(res => {
+ this.getSearchTable();
+ });
+ }
});
},
getSearchTable() {
@@ -868,6 +881,11 @@ export default {
},
refreshSearch() {
console.log('刷新');
+ const operate = {
+ operation: this.getDomObj('refreshSearch').operation,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate);
this.searchCmd();
},
clearCondition() {
@@ -913,6 +931,11 @@ export default {
resolve();
}
}).then(() => {
+ const operate = {
+ operation: this.getDomObj('createCmd').operation,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate);
this.initData();
this.getSenderName();
sendCommandNew(this.group, 'CTC_NEW_DIS_COMMAND', {}).then((res) => {
@@ -979,7 +1002,7 @@ export default {
};
if (obj) {
data = {
- name: obj.label,
+ name: obj.label || '',
rsCompany: false,
cpType: this.typeTransition[obj.type] || obj.type,
code: obj.deviceCode || this.DisStationId
@@ -1037,9 +1060,18 @@ export default {
this.$messageBox('请选择受令单位');
return;
}
- this.cacheCmd(showMsg).then(suc => {
- this.searchCmd();
- this.initData();
+ const operate = {
+ operation: this.getDomObj('saveCacheData').operation,
+ param: this.command,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ if (valid) {
+ this.cacheCmd(showMsg).then(suc => {
+ this.searchCmd();
+ this.initData();
+ });
+ }
});
}
});
@@ -1088,13 +1120,23 @@ export default {
type: 'warning'
}).then(() => {
console.log('代签');
- sendCommandNew(this.group, 'CTC_SIGN_DIS_COMMAND', {cmdId: this.command.cmdId, rcId: this.allographRow.cpId, proxySign: true}).then((res) => {
- console.log(res, '---res');
- this.$message.success('代签成功!');
- this.searchCmd();
- this.initData();
- }).catch(error => {
- this.$messageBox('代签令失败:' + error.message);
+ const params = {cmdId: this.command.cmdId, rcId: this.allographRow.cpId, proxySign: true};
+ const operate = {
+ operation: this.getDomObj('allographCmd').operation,
+ param: params,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ if (valid) {
+ sendCommandNew(this.group, 'CTC_SIGN_DIS_COMMAND', params).then((res) => {
+ console.log(res, '---res');
+ this.$message.success('代签成功!');
+ this.searchCmd();
+ this.initData();
+ }).catch(error => {
+ this.$messageBox('代签令失败:' + error.message);
+ });
+ }
});
}).catch(() => {
console.log('取消代签');
@@ -1125,17 +1167,27 @@ export default {
this.$messageBox('请选择受令单位');
return;
}
- this.cacheCmd().then(suc => {
- sendCommandNew(this.group, 'CTC_SEND_DIS_COMMAND', {cmdId: this.command.cmdId}).then((res) => {
- console.log(res, '---res');
- this.$message.success('发送调度命令成功!');
- this.searchCmd();
- this.initData();
- }).catch(error => {
- this.$messageBox('发送调度命令失败:' + error.message);
- });
- }).catch(err => {
- console.log('缓存调度命令失败', err);
+ const params = {cmdId: this.command.cmdId};
+ const operate = {
+ operation: this.getDomObj('sendCmd').operation,
+ param: params,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ if (valid) {
+ this.cacheCmd().then(suc => {
+ sendCommandNew(this.group, 'CTC_SEND_DIS_COMMAND', params).then((res) => {
+ console.log(res, '---res');
+ this.$message.success('发送调度命令成功!');
+ this.searchCmd();
+ this.initData();
+ }).catch(error => {
+ this.$messageBox('发送调度命令失败:' + error.message);
+ });
+ }).catch(err => {
+ console.log('缓存调度命令失败', err);
+ });
+ }
});
}
});
diff --git a/src/views/newMap/display/terminals/dispatcherManage.vue b/src/views/newMap/display/terminals/dispatcherManage.vue
index d3f9a27da..e049331dd 100644
--- a/src/views/newMap/display/terminals/dispatcherManage.vue
+++ b/src/views/newMap/display/terminals/dispatcherManage.vue
@@ -13,7 +13,7 @@
:src="item.imgUrl"
/>
- {{ item.label }}
+ {{ item.label }}
@@ -24,6 +24,7 @@
import ZhanchangIcon from '@/assets/dispatcherStation/zhanchang.png';
import YunxingIcon from '@/assets/dispatcherStation/yunxing.png';
import CmdIcon from '@/assets/dispatcherStation/cmd.png';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'DispatcherManage',
components: {
@@ -37,26 +38,31 @@ export default {
{
label: '运行图',
refPath: 'schedulingPlan',
+ domId: 'schedulingPlan',
imgUrl: YunxingIcon
},
{
label: '调度命令',
refPath: 'dispatchingCommand',
+ domId: 'dispatchingCommand',
imgUrl: CmdIcon
},
{
label: '站场图',
refPath: 'dispatchWork',
+ domId: 'dispatchWork',
imgUrl: ZhanchangIcon
},
{
label: '数据更新',
refPath: '',
+ domId: 'dataUpdate',
imgUrl: CmdIcon
},
{
label: '时间同步',
refPath: '',
+ domId: 'timeLock',
imgUrl: CmdIcon
}
],
@@ -75,6 +81,9 @@ export default {
computed: {
group() {
return this.$route.query.group;
+ },
+ DispatcherManageDomObj() {
+ return OperationEvent.DispatcherManage.menu || {};
}
},
mounted() {
@@ -95,6 +104,11 @@ export default {
this.$emit('pictureChange', refPath);
}, 100);
}
+ const operate = {
+ operation: this.DispatcherManageDomObj[refPath].operation,
+ userOperationType: 'leftClick'
+ };
+ this.$store.dispatch('training/nextNew', operate);
},
clickMenu(refPath) {
this.$alert('实现中......', '提示', {