代码调整

This commit is contained in:
joylink_cuiweidong 2020-09-28 21:00:14 +08:00
parent 27d4c66c8c
commit dc930dae12

View File

@ -182,22 +182,24 @@ export default {
this.formModel.disposalProcesses = row.disposalProcesses;
this.formModel.operationScore = row.operationScore;
this.formModel.scriptId = row.scriptId;
getCompetitionPracticalSceneById(row.id).then(response=>{
const commandEvaluationRuleVOs = {};
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
});
const stepVOs = {};
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
this.startArray.push(data.startActionId);
this.endArray.push(data.endActionId);
});
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
this.stepVOs = stepVOs;
});
getScriptByIdNew(row.scriptId).then(res=>{
this.actionList = res.data.actionList;
getCompetitionPracticalSceneById(row.id).then(response=>{
const commandEvaluationRuleVOs = {};
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
});
const stepVOs = {};
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
this.stepVOs = stepVOs;
});
//
getPublishMapDetailById(res.data.mapId).then(resp => {
this.$store.dispatch('map/setMapData', resp.data);