剧本代码调整
This commit is contained in:
parent
7b00dac9be
commit
078252b6ac
@ -17,7 +17,7 @@ export function getScriptById(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 通过ID查询未发布剧本的详细信息 */
|
||||
/** 通过group查询未发布剧本的详细信息 */
|
||||
export function getDraftScriptByGroup(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/script/loadedScript`,
|
||||
@ -25,6 +25,14 @@ export function getDraftScriptByGroup(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 通过group查询未发布剧本的详细信息(新版) */
|
||||
export function getDraftScriptByGroupNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/scriptDetail`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 剧本撤销发布 */
|
||||
export function retractScript(id, data) {
|
||||
return request({
|
||||
|
@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getScriptPageListOnline, getScriptById, getDraftScriptByGroup } from '@/api/script';
|
||||
import { getScriptPageListOnline, getScriptById, getDraftScriptByGroup, getDraftScriptByGroupNew } from '@/api/script';
|
||||
|
||||
// 剧本弹窗
|
||||
export default {
|
||||
@ -155,18 +155,34 @@ export default {
|
||||
},
|
||||
async handleLoad(index, row) {
|
||||
this.row = row;
|
||||
const res = this.$route.fullPath.includes('design/display/demon') ? await getDraftScriptByGroup(row.group) : await getScriptById(row.id);
|
||||
let newMemberList = [];
|
||||
if (res.code == 200) {
|
||||
if (res.data.playerVOList && res.data.playerVOList.length > 0) {
|
||||
newMemberList = res.data.playerVOList.filter(item => item.hasPlay === true);
|
||||
if (row.drawWay) {
|
||||
const res = this.$route.fullPath.includes('design/displayNew/demon') ? await getDraftScriptByGroupNew(row.group) : await getScriptById(row.id);
|
||||
let newMemberList = [];
|
||||
if (res.code == 200) {
|
||||
if (res.data.playerList && res.data.playerList.length > 0) {
|
||||
newMemberList = res.data.playerList.filter(item => item.hasPlay === true);
|
||||
}
|
||||
if (res.data.mapLocation) {
|
||||
this.mapLocation = res.data.mapLocation;
|
||||
}
|
||||
this.memberList = newMemberList || [];
|
||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||
}
|
||||
if (res.data.mapLocation) {
|
||||
this.mapLocation = res.data.mapLocation;
|
||||
} else {
|
||||
const res = this.$route.fullPath.includes('design/display/demon') ? await getDraftScriptByGroup(row.group) : await getScriptById(row.id);
|
||||
let newMemberList = [];
|
||||
if (res.code == 200) {
|
||||
if (res.data.playerVOList && res.data.playerVOList.length > 0) {
|
||||
newMemberList = res.data.playerVOList.filter(item => item.hasPlay === true);
|
||||
}
|
||||
if (res.data.mapLocation) {
|
||||
this.mapLocation = res.data.mapLocation;
|
||||
}
|
||||
this.memberList = newMemberList || [];
|
||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||
}
|
||||
this.memberList = newMemberList || [];
|
||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||
}
|
||||
|
||||
this.roleShow = true;
|
||||
},
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
v-if="isDemon"
|
||||
ref="menuDemon"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:group="group"
|
||||
:quest-id="questId"
|
||||
@tryTime="tryTime"
|
||||
@ -25,6 +26,7 @@
|
||||
v-if="isDemon || isScript "
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:group="group"
|
||||
@switchMode="switchMode"
|
||||
@selectQuest="selectQuest"
|
||||
@ -33,7 +35,7 @@
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||
</div>
|
||||
|
||||
<Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" />
|
||||
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
|
||||
<fault-choose ref="faultChoose" :group="group" />
|
||||
@ -66,7 +68,7 @@ import Vue from 'vue';
|
||||
import {loadDraftScript} from '@/api/designPlatform';
|
||||
|
||||
// 三维
|
||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
|
||||
export default {
|
||||
@ -81,7 +83,7 @@ export default {
|
||||
MenuScript,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
Jl3dSimulation,
|
||||
// Jl3dSimulation,
|
||||
Jl3dDrive,
|
||||
Scheduling
|
||||
},
|
||||
@ -100,6 +102,7 @@ export default {
|
||||
timeDemonNum: 0,
|
||||
checkLine: null,
|
||||
offset: 15,
|
||||
offsetBottom: 15,
|
||||
mouseNum: 1,
|
||||
ierval: null,
|
||||
mouseNumTime: 0,
|
||||
@ -272,18 +275,26 @@ export default {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offset = 15;
|
||||
let offsetBottom = 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
const menuBottom = document.getElementById('menuButton');
|
||||
if (menuBar) {
|
||||
offset += (menuBar.offsetHeight || 0);
|
||||
}
|
||||
if (menuTool) {
|
||||
offset += (menuTool.offsetHeight || 0);
|
||||
}
|
||||
if (menuBottom) {
|
||||
offsetBottom += (menuBottom.offsetHeight || 0);
|
||||
}
|
||||
|
||||
if (this.offset != offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
if (this.offsetBottom != offsetBottom) {
|
||||
this.offsetBottom = offsetBottom;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 结束加载状态
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isDesignPlatform() {
|
||||
return this.$route.fullPath.includes('design/display/demon');
|
||||
return this.$route.fullPath.includes('design/displayNew/demon');
|
||||
},
|
||||
isScheduling() {
|
||||
return this.$route.query.prdType === '05';
|
||||
@ -177,7 +177,8 @@ export default {
|
||||
this.$refs.addQuest.doShow();
|
||||
},
|
||||
viewScriptRoles() {
|
||||
const row = {id: this.$route.query.scriptId, group:this.$route.query.group};
|
||||
debugger;
|
||||
const row = {id: this.$route.query.scriptId, group:this.$route.query.group, drawWay:this.$route.query.drawWay};
|
||||
this.$refs.addQuest.handleLoad(1, row);
|
||||
},
|
||||
selectQuest(row, id, mapLocation, roleName) {
|
||||
|
@ -266,7 +266,7 @@ export default {
|
||||
previewScript(index, row) {
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
scriptDraftRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:true};
|
||||
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
@ -274,7 +274,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:false};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
|
Loading…
Reference in New Issue
Block a user