薄册代码调整

This commit is contained in:
dong 2023-02-13 13:45:28 +08:00
parent ab2a68865d
commit 8a8e47e1eb
6 changed files with 106 additions and 75 deletions

View File

@ -926,6 +926,21 @@ export const menuOperate = {
equipmentConstructionQuery:{
operation: OperationEvent.RailCommand.equipmentConstructionQuery.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY
},
// 防洪安全上岗签到表 提交
floodControlSafetyTableSave:{
operation: OperationEvent.FloodSafetyRegister.formInput.submit.operation,
cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_SUBMIT
},
// 防洪安全上岗签到表 更新
floodControlSafetyTableUpdate:{
operation: OperationEvent.FloodSafetyRegister.formInput.update.operation,
cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_UPDATE
},
// 非正常情况接发列车关键环节控制表 提交
abnormalTrainTableSave:{
operation: OperationEvent.AbnormalTrainRegister.formInput.submit.operation,
cmdType: CMD.RAIL.CMD_RAIL_ABNORMAL_TRAIN_SAVE
}
},
Conversation: {

View File

@ -501,7 +501,10 @@ export default {
CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'},
CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'},
CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_SAVE:{value: 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', label: '填写施工登记簿册'},
CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY:{value: 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', label: '查询施工登记簿册'}
CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY:{value: 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', label: '查询施工登记簿册'},
CMD_RAIL_FLOOD_CONTROL_SAFETY_SUBMIT:{value: 'CONTROL_FLOOD_SIGN_SAVE', label: '填写防洪安全上岗签到表'},
CMD_RAIL_FLOOD_CONTROL_SAFETY_UPDATE:{value: 'CONTROL_FLOOD_SIGN_UPDATE', label: '更新防洪安全上岗签到表'},
CMD_RAIL_ABNORMAL_TRAIN_SAVE:{value: 'KEY_LINK_CONTROL_INFO_SAVE', label: '填写非正常情况接发列车关键环节控制表'}
},
Conversation: {
CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'},

View File

@ -158,7 +158,8 @@
<script>
import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
// import { sendCommandNew } from '@/api/jmap/training';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ControlTable',
props: {
@ -268,20 +269,26 @@ export default {
// }
// });
// obj.registerInfoList = list;
const operate = {
operation: this.formInput.submit.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);
});
}
// const operate = {
// operation: this.formInput.submit.operation,
// param: obj
// };
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
// if (valid) {
// sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
// console.log(res, '---res');
// this.$message.success('');
// this.initFormData();
// }).catch(error => {
// this.$messageBox('' + error.message);
// });
// }
// });
commitOperate(menuOperate.Rail.abnormalTrainTableSave, obj, 3).then(({valid, operate})=>{
this.$message.success('提交成功!');
this.initFormData();
}).catch((error)=>{
this.$messageBox('提交失败:' + error.message);
});
},
initFormData() {

View File

@ -89,6 +89,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name:'EquipmentConstructionTable',
data() {
@ -229,21 +230,13 @@ export default {
saveData(data, index) {
// if (this.isAdd) {
const params = Object.assign({stationCode:this.$store.state.training.roleDeviceCode}, data);
const operate = {
operation: this.constructionFillIn.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
this.isEditing = false;
this.isAdd = false;
}).catch(() => {
this.$message.error('保存行车设备施工登记簿失败!');
});
}
commitOperate(menuOperate.Rail.equipmentConstructionFill, params, 3).then(({valid, operate})=>{
this.queryData();
this.isEditing = false;
this.isAdd = false;
this.$message.success('保存成功!');
}).catch(()=>{
this.$message.error('保存行车设备施工登记簿失败!');
});
// }
// }else{

View File

@ -132,7 +132,8 @@
<script>
import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
// import { sendCommandNew } from '@/api/jmap/training';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ControlTable',
props: {
@ -183,6 +184,13 @@ export default {
return sList;
}
},
watch: {
info() {
if (this.active == 'search') {
this.getInfoData();
}
}
},
created() {
if (this.active == 'write') {
this.initFormData();
@ -266,38 +274,50 @@ export default {
submit() {
const obj = deepAssign({}, this.form);
delete obj.id;
const operate = {
operation: this.formInput.submit.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);
});
}
// const operate = {
// operation: this.formInput.submit.operation,
// param: obj
// };
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
// if (valid) {
// sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_SAVE', obj).then((res) => {
// console.log(res, '---res');
// this.$message.success('');
// this.initFormData();
// }).catch(error => {
// this.$messageBox('' + error.message);
// });
// }
// });
commitOperate(menuOperate.Rail.floodControlSafetyTableSave, obj, 3).then(({valid, operate})=>{
this.$message.success('提交成功!');
this.initFormData();
}).catch((error)=>{
this.$messageBox('提交失败:' + error.message);
});
},
update() {
const obj = deepAssign({}, this.form);
const operate = {
operation: this.formInput.update.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_UPDATE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('更新成功!');
this.isEdit = false;
}).catch(error => {
this.$messageBox('更新失败:' + error.message);
});
}
// const operate = {
// operation: this.formInput.update.operation,
// param: obj
// };
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
// if (valid) {
// sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_UPDATE', obj).then((res) => {
// console.log(res, '---res');
// this.$message.success('');
// this.isEdit = false;
// }).catch(error => {
// this.$messageBox('' + error.message);
// });
// }
// });
commitOperate(menuOperate.Rail.floodControlSafetyTableUpdate, obj, 3).then(({valid, operate})=>{
this.$message.success('更新成功!');
this.isEdit = false;
}).catch((error)=>{
this.$messageBox('更新失败:' + error.message);
});
},
changeEdit() {

View File

@ -110,10 +110,12 @@
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import FloodControlSafetyTable from './floodControlSafetyTable/index';
import EquipmentConstructionTable from './equipmentConstructionTable';
import AbnormalTrain from './abnormalTrain/index';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { sendCommandNew } from '@/api/jmap/training';
// key-link-control-table
@ -168,8 +170,7 @@ export default {
this.queryData();
},
queryData() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
sendCommandNew(this.group, 'RAIL_QUERY_REGISTER', params).then((response) => {
sendCommandNew(this.group, CMD.RAIL.CMD_RAIL_QUERY_REGISTER.value, { stationCode: this.$store.state.training.roleDeviceCode}).then(response => {
this.tableData = response.data ? response.data.lines : [];
this.dataIndex = null;
}).catch(() => {
@ -178,19 +179,11 @@ export default {
},
saveData(data) {
const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data };
const operate = {
operation: this.railFillInRegister.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'RAIL_FILL_IN_REGISTER', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
}).catch(() => {
this.$message.error('保存簿册失败!');
});
}
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
this.queryData();
this.$message.success('保存成功!');
}).catch(()=>{
this.$message.error('保存簿册失败!');
});
},
add() {