This commit is contained in:
fan 2020-11-03 18:24:00 +08:00
commit 13913841de
5 changed files with 42 additions and 5 deletions

View File

@ -118,3 +118,11 @@ export function getScriptExport(id) {
method: 'get'
});
}
/** 删除会话动作(新版)*/
export function deleteScriptAction(group, actionId) {
return request({
url: `/api/scriptSimulation/${group}/${actionId}/delete`,
method: 'delete'
});
}

View File

@ -152,7 +152,9 @@ export default {
this.oldDevice = this.selectedObj;
break;
case 'StationStand':
if (this.$store.state.menuOperation.subType == 'trainSetButton') {
this.handleStandMenu();
}
break;
case 'DirectionRod':
this.handleDirectionRodMenu();
@ -432,10 +434,16 @@ export default {
},
handleStandMenu() {
this.clearAllMenuShow();
if (this.$store.state.training.prdType === '02') {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
}
this.centralizedStationList = new Array(15).fill({});
this.standParamList.forEach((stand, index) => {
this.centralizedStationList[index] = stand;
});
this.tempData = [];
const data = Object.assign(this.selectedObj);
const station = this.$store.getters['map/getDeviceByCode'](this.selectedObj.stationCode);

View File

@ -116,11 +116,14 @@ export default {
.settingBtn{
color: #409eff;
cursor: pointer;
padding: 5px 10px;
padding: 2px 10px;
border-radius: 4px;
border: 1px #409eff solid;
}
.hasSetted{
width: 50px;
text-align: center;
display: inline-block;
}
</style>
<style>

View File

@ -46,7 +46,7 @@
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button>
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="danger" size="mini" :loading="deleteLoading" @click="deleteAction(actionInfo.id)">删除</el-button>
</div>
</el-card>
</el-timeline-item>
@ -55,6 +55,7 @@
</template>
<script>
import {getScriptAllAction, modifyScriptActionNew } from '@/api/simulation';
import {deleteScriptAction } from '@/api/script';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
@ -82,6 +83,7 @@ export default {
// isModify:false,
// modifyText:'',
modifyTextLoading:false,
deleteLoading:false,
// behaviorName:"",
memberName: ''
};
@ -257,6 +259,16 @@ export default {
actionInfo.isModify = false;
}
}
},
deleteAction(actionId) {
this.deleteLoading = true;
deleteScriptAction(this.group, actionId).then(res=>{
this.deleteLoading = false;
this.reloadTable();
}).catch(error=>{
this.deleteLoading = false;
this.$messageBox('删除会话/动作失败:' + error.message);
});
}
}
};

View File

@ -583,8 +583,9 @@ export default {
.settingBtn{
color: #409eff;
cursor: pointer;
padding: 5px 10px;
padding: 2px 10px;
border-radius: 4px;
border: 1px #409eff solid;
}
.setGroupOut{
padding: 4px 6px;
@ -592,5 +593,10 @@ export default {
.setGroupOut:hover{
background-color:#ccc;
}
.hasSetted{
width: 50px;
text-align: center;
display: inline-block;
}
</style>