薄册代码调整
This commit is contained in:
parent
ab2a68865d
commit
8a8e47e1eb
@ -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: {
|
||||
|
@ -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: '发送文本消息'},
|
||||
|
@ -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,21 +269,27 @@ 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');
|
||||
// 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 => {
|
||||
}).catch((error)=>{
|
||||
this.$messageBox('提交失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
initFormData() {
|
||||
this.form = {
|
||||
|
@ -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,22 +230,14 @@ 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('保存成功!');
|
||||
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{
|
||||
|
||||
|
@ -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,39 +274,51 @@ 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');
|
||||
// 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 => {
|
||||
}).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');
|
||||
// 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 => {
|
||||
}).catch((error)=>{
|
||||
this.$messageBox('更新失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
changeEdit() {
|
||||
if (this.isEdit) {
|
||||
|
@ -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,20 +179,12 @@ 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('保存成功!');
|
||||
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
|
||||
this.queryData();
|
||||
this.$message.success('保存成功!');
|
||||
}).catch(()=>{
|
||||
this.$message.error('保存簿册失败!');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
add() {
|
||||
const operate = {
|
||||
|
Loading…
Reference in New Issue
Block a user