调整裁判管理报名列表

This commit is contained in:
zyy 2020-05-20 18:32:52 +08:00
parent 43ee4a89ed
commit af26f55e9b
6 changed files with 186 additions and 19 deletions

View File

@ -54,3 +54,12 @@ export function getIsSignUp(raceId) {
}); });
} }
/** 分页查询竞赛报名人员 */
export function getRaceUserList(params) {
return request({
url: `/api/race/${params.raceId}/raceUser`,
method: 'get',
params
});
}

View File

@ -81,5 +81,6 @@ export default {
refereeJManage: '仿真管理', refereeJManage: '仿真管理',
homeJsxt: '首页', homeJsxt: '首页',
examDetail: '考试详情', examDetail: '考试详情',
raceManage: '竞赛管理' raceManage: '竞赛管理',
recaList: '报名列表'
}; };

View File

@ -132,6 +132,7 @@ const JsxtApply = () => import('@/views/jsxt/apply/index');
// const theoryManage = () => import('@/views/jsxt/competition/theory/index'); // const theoryManage = () => import('@/views/jsxt/competition/theory/index');
const RefereeList = () => import('@/views/jsxt/refereeList/index'); const RefereeList = () => import('@/views/jsxt/refereeList/index');
const homeJsxt = () => import('@/views/jsxt/home/index'); const homeJsxt = () => import('@/views/jsxt/home/index');
const RecaList = () => import('@/views/jsxt/reca/list');
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
@ -304,6 +305,16 @@ export const publicAsyncRoute = [
component: Jlmap3d, component: Jlmap3d,
hidden: true hidden: true
}, },
{ // 运行图编辑
path: '/plan/usertool',
component: PlanMonitorEditUserTool,
hidden: true
},
{ // 运行图编辑
path: '/plan/tool',
component: PlanMonitorEditTool,
hidden: true
},
{ {
path: '/displayIscs/system', path: '/displayIscs/system',
component: IscsSystem, component: IscsSystem,
@ -505,20 +516,6 @@ export const asyncRouter = [
} }
] ]
}, },
{ // 运行图编辑
path: '/plan/usertool',
component: PlanMonitorEditUserTool,
meta: {
},
hidden: true
},
{ // 运行图编辑
path: '/plan/tool',
component: PlanMonitorEditTool,
meta: {
},
hidden: true
},
{ // 发布内容管理 { // 发布内容管理
path: '/publish', path: '/publish',
component: Layout, component: Layout,
@ -1058,6 +1055,26 @@ export const JSXT = [
} }
} }
] ]
},
{
path: '/referee',
component: Layout,
meta: {
i18n: 'router.recaList',
roles: [user, admin]
},
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
children: [
{
path: 'recaList',
component: RecaList,
meta: {
i18n: 'router.recaList',
icon: 'design',
hidden: true
}
}
]
} }
]; ];
const createRouter = () => new Router({ const createRouter = () => new Router({

View File

@ -300,7 +300,6 @@ export default {
}, },
handleApply() { handleApply() {
this.$refs.dataform.validateForm(() => { this.$refs.dataform.validateForm(() => {
console.log(this.formModel, '内容');
const param = { const param = {
department: this.formModel.department, department: this.formModel.department,
idNumber: this.formModel.numberId, idNumber: this.formModel.numberId,

View File

@ -0,0 +1,143 @@
<template>
<div class="">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
</template>
<script>
import { getRaceList } from '@/api/race';
import { getRaceUserList } from '@/api/competition';
import localStore from 'storejs';
export default {
name: '',
data() {
return {
raceList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
reset: true,
queryObject: {
raceId: {
type: 'select',
label: '竞赛名称',
config: {
data: []
}
},
reviewed: {
type: 'select',
label: '审核状态',
config: {
data: [
{ label: '通过', value: true },
{ label: '不通过', value: false }
]
}
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '名字',
prop: 'name'
},
{
title: '手机号',
prop: 'mobile'
},
{
title: '身份证号',
prop: 'idNumber'
},
{
title: '所属组织/企业/学校',
prop: 'organization'
},
{
title: '部门/专业',
prop: 'department'
},
{
title: '职位',
prop: 'position'
},
// {
// title: '',
// prop: 'raceId',
// type: 'tag',
// columnValue: (row) => { return this.$convertField(row.raceId, this.raceList, ['value', 'label']); },
// tagType: (row) => { return 'success'; }
// },
{
type: 'button',
title: this.$t('global.operate'),
buttons: [
// {
// name: '',
// handleClick: this.update,
// type: ''
// }
]
}
],
actions: []
}
};
},
created() {
this.loadInitData();
},
methods: {
async loadInitData() {
const params = localStore.get(this.$route.path);
const param = {
pageSize: 9999,
pageIndex: 1
};
this.raceList = [];
const resp = await getRaceList(param);
resp.data.list.forEach(elem => {
this.queryForm.queryObject.raceId.config.data.push({ value: elem.id, label: elem.name });
this.raceList.push({ value: elem.id, label: elem.name });
});
if (resp.data.list.length) {
if (params && params.raceId) {
this.queryForm.queryObject.raceId.value = params.raceId;
} else {
this.queryForm.queryObject.raceId.value = '' + resp.data.list[0].id;
}
}
},
//
queryFunction(params) {
return new Promise(async(resolve, reject) => {
if (params.raceId) {
const res = await getRaceUserList(params);
resolve(res);
} else {
setTimeout(() => {
params.raceId = this.queryForm.queryObject.raceId.value;
resolve(this.queryFunction(params));
}, 500);
}
});
},
refresh() {
this.$refs.queryListPage.refresh(true);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@ -335,12 +335,10 @@ export default {
this.loading = false; this.loading = false;
this.tipsMsg = ''; this.tipsMsg = '';
removeSessionStorage('againEnter'); removeSessionStorage('againEnter');
console.log(this.$route.query, this.$route.query.raceId);
if (this.$route.query.raceId) { if (this.$route.query.raceId) {
getIsSignUp(this.$route.query.raceId).then(res => { getIsSignUp(this.$route.query.raceId).then(res => {
this.$router.push({ path: this.path }); this.$router.push({ path: this.path });
}).catch(error => { }).catch(() => {
console.log(error, '错误');
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统'); this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
}); });
} else if (!this.$route.path.includes('jsxt/login')) { } else if (!this.$route.path.includes('jsxt/login')) {