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

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

View File

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