加载剧本列表数据显示修改

This commit is contained in:
joylink_cuiweidong 2019-08-12 19:30:50 +08:00
parent 5cd6150c16
commit 45d0cb0a12
2 changed files with 22 additions and 12 deletions

View File

@ -1,6 +1,6 @@
import request from '@/utils/request';
/** 分页查找仿真任务*/
/** 分页查找个人录制的仿真任务*/
export function getQuestPageList(params) {
return request({
url: `/api/quest/paging`,
@ -53,3 +53,12 @@ export function updateMapLocation(id, data) {
data
});
}
/** 分页查找上线的仿真任务*/
export function getQuestPageListOnline(params) {
return request({
url: `/api/quest/paging/online`,
method: 'get',
params: params
});
}

View File

@ -45,8 +45,9 @@
</template>
<script>
import { getQuestPageList, getQuestByIdList } from '@/api/quest';
import { getSkinStyleList } from '@/api/management/mapskin';
import { getQuestPageListOnline, getQuestByIdList } from '@/api/quest';
// import { getSkinStyleList } from '@/api/management/mapskin';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'AddQuest',
@ -68,7 +69,7 @@ export default {
return {
show: false,
roleShow: false,
skinCodeList: [],
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -101,10 +102,10 @@ export default {
prop: 'name'
},
{
title: '皮肤类型',
prop: 'skinCode',
title: '地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
@ -144,7 +145,7 @@ export default {
},
listQuest(params) {
params['skinCode'] = this.$route.query.skinStyle;
return getQuestPageList(params);
return getQuestPageListOnline(params);
},
convertList(FromList, ToList, ChecktypeFunction) {
if (FromList) {
@ -158,10 +159,10 @@ export default {
},
async loadInitData() {
//
this.skinCodeList = [];
getSkinStyleList().then(response => {
this.skinCodeList = response.data;
});
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
})
},
convertField(fieldValue, enumList, converFormat) {