Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e5852949da
@ -10,6 +10,15 @@ export function getScriptPageListOnline(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 分页查找上线的剧本(新版)*/
|
||||
export function getScriptPageListOnlineNew(params) {
|
||||
return request({
|
||||
url: `/api/scirpt/v1/paging/online`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 通过ID查询发布的剧本的详细信息 */
|
||||
export function getScriptById(id) {
|
||||
return request({
|
||||
@ -17,6 +26,15 @@ export function getScriptById(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 通过ID查询发布的剧本的详细信息(新版) */
|
||||
export function getScriptByIdNew(id) {
|
||||
return request({
|
||||
url: `/api/scirpt/v1/${id}/detail`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 通过group查询未发布剧本的详细信息 */
|
||||
export function getDraftScriptByGroup(group) {
|
||||
return request({
|
||||
|
@ -67,7 +67,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
minimize:false,
|
||||
minimize:true,
|
||||
recordSending:false,
|
||||
currentCoversition:{},
|
||||
seconds:0,
|
||||
|
@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getScriptPageListOnline, getScriptById, getDraftScriptByGroup, getDraftScriptByGroupNew } from '@/api/script';
|
||||
import {getScriptPageListOnlineNew, getScriptByIdNew, getDraftScriptByGroupNew } from '@/api/script';
|
||||
|
||||
// 剧本弹窗
|
||||
export default {
|
||||
@ -148,15 +148,14 @@ export default {
|
||||
},
|
||||
listQuest(params) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
return getScriptPageListOnline(params);
|
||||
return getScriptPageListOnlineNew(params);
|
||||
},
|
||||
async loadInitData() {
|
||||
|
||||
},
|
||||
async handleLoad(index, row) {
|
||||
this.row = row;
|
||||
if (row.drawWay) {
|
||||
const res = this.$route.fullPath.includes('design/displayNew/demon') ? await getDraftScriptByGroupNew(row.group) : await getScriptById(row.id);
|
||||
const res = this.$route.fullPath.includes('design/displayNew/demon') ? await getDraftScriptByGroupNew(row.group) : await getScriptByIdNew(row.id);
|
||||
let newMemberList = [];
|
||||
if (res.code == 200) {
|
||||
if (res.data.playerList && res.data.playerList.length > 0) {
|
||||
@ -168,21 +167,6 @@ export default {
|
||||
this.memberList = newMemberList || [];
|
||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||
}
|
||||
} 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.roleShow = true;
|
||||
},
|
||||
|
||||
|
@ -99,7 +99,7 @@ import Scheduling from './demon/scheduling';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getTrainingStepsDetailNew, getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import { clearSimulation, loadScript, loadScriptNew, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { clearSimulation, loadScriptNew, getSimulationInfoNew, scriptExecuteNew } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
@ -481,14 +481,17 @@ export default {
|
||||
// 选择脚本
|
||||
async selectQuest(row, id, mapLocation, roleName) {
|
||||
try {
|
||||
// const res = await loadScript(row.id, id, this.group);
|
||||
const res = this.$route.query.drawWay == 'true' ? await loadScriptNew(row.id, id, this.group) : await loadScript(row.id, id, this.group);
|
||||
const res = await loadScriptNew(row.id, id, this.group);
|
||||
if (res && res.code == 200) {
|
||||
this.questId = parseInt(row.id);
|
||||
if (mapLocation) {
|
||||
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||
}
|
||||
scriptExecuteNew(this.group).then(data=>{
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
if (this.$refs.menuDemon) {
|
||||
await this.$refs.menuDemon.initLoadPage();
|
||||
|
Loading…
Reference in New Issue
Block a user