修改:剧本调整

This commit is contained in:
fan 2019-08-16 15:02:34 +08:00
parent d16ecfd83c
commit 5f2fc257f5
2 changed files with 21 additions and 7 deletions

View File

@ -32,7 +32,7 @@
<el-option <el-option
v-for="item in memberList" v-for="item in memberList"
:key="item.id" :key="item.id"
:label="item.name" :label="(roleConfig[item.role]?roleConfig[item.role]: '')+(item.name?item.name: '')"
:value="item.id" :value="item.id"
:disabled="checkDisabled(item.role)" :disabled="checkDisabled(item.role)"
/> />
@ -51,6 +51,7 @@
<script> <script>
import { getScriptPageListOnline, getScriptById } from '@/api/script'; import { getScriptPageListOnline, getScriptById } from '@/api/script';
import { listPublishMap } from '@/api/jmap/map'; import { listPublishMap } from '@/api/jmap/map';
import { roleType } from '@/scripts/ConstConfig';
export default { export default {
name: 'AddQuest', name: 'AddQuest',
@ -121,7 +122,16 @@ export default {
] ]
}, },
currentModel: {} currentModel: {},
roleConfig: {
'Admin': '管理员',
'Instructor': '教员',
'Dispatcher': '行调',
'Attendant': '车站',
'Audience': '观众',
'Driver': '列车',
'no':''
}
}; };
}, },
created() { created() {
@ -155,7 +165,7 @@ export default {
newMemberList = res.data.memberVOList.filter(item => item.hasPlay === true); newMemberList = res.data.memberVOList.filter(item => item.hasPlay === true);
} }
this.memberList = newMemberList?newMemberList : []; this.memberList = newMemberList?newMemberList : [];
this.memberList.unshift({ id: '', name: '无', role: 'Dispatcher' }); this.memberList.unshift({ id: '', name: '无', role: 'no' });
} }
this.roleShow = true; this.roleShow = true;
}, },
@ -185,7 +195,11 @@ export default {
} else if (this.$route.query.prdType == '04') { } else if (this.$route.query.prdType == '04') {
return role !== 'Driver'; return role !== 'Driver';
} }
} },
handleName(item){
return this.roleConfig[item.role]?this.roleConfig[item.role]: ''+(item.name?item.name: '');
}
} }
}; };
</script> </script>

View File

@ -9,7 +9,7 @@
<el-button-group> <el-button-group>
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button> <el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<template v-if="questId"> <template v-if="questId">
<el-button type="danger" @click="handleQuitQuest">退出任务</el-button> <el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button> <el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
@ -32,7 +32,7 @@ import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simula
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen'; import { exitFullscreen } from '@/utils/screen';
import { getCountTime } from '@/utils/index'; import { getCountTime } from '@/utils/index';
import { runDiagramIsStart, quitQuest } from '@/api/simulation'; import { runDiagramIsStart, quitScript } from '@/api/simulation';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
@ -167,7 +167,7 @@ export default {
}); });
}, },
handleQuitQuest() { handleQuitQuest() {
quitQuest(this.group).then(resp => { quitScript(this.group).then(resp => {
this.$emit('quitQuest'); this.$emit('quitQuest');
}).catch(() => { }).catch(() => {
this.$messageBox('退出任务失败'); this.$messageBox('退出任务失败');