裁判平台代码调整
This commit is contained in:
parent
4210599f6b
commit
44f5e7a87c
@ -67,6 +67,10 @@
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div class="deviceStatus">
|
||||
<div class="holdTrainStatus">H</div>
|
||||
<div class="jumpStopStatus">S</div>
|
||||
</div>
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
@ -694,7 +698,8 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height: 30px;
|
||||
$lineHeight: 30px;
|
||||
$height:74px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
@ -705,7 +710,7 @@ export default {
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
line-height: $lineHeight;
|
||||
}
|
||||
|
||||
.nav {
|
||||
@ -810,4 +815,21 @@ export default {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.deviceStatus{
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
height: 40px;
|
||||
background: #f0f0f0;
|
||||
width: 300px;
|
||||
}
|
||||
.holdTrainStatus,.jumpStopStatus{
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background: #ccc;
|
||||
font-size:14px;
|
||||
}
|
||||
</style>
|
||||
|
@ -132,8 +132,6 @@ const JsxtExamResult = () => import('@/views/jsxt/competition/result');
|
||||
const JsxtApply = () => import('@/views/jsxt/apply/index');
|
||||
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
||||
const RefereeList = () => import('@/views/jsxt/refereeList/index');
|
||||
const homeJsxt = () => import('@/views/jsxt/home/index');
|
||||
const RecaList = () => import('@/views/jsxt/reca/list');
|
||||
|
||||
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
@ -1020,34 +1018,16 @@ export const JSXT = [
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
// 裁判系统
|
||||
{
|
||||
path: '/refereeJsxt',
|
||||
redirect: '/refereeJsxt/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.homeJsxt',
|
||||
roles: [user, admin]
|
||||
},
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
|
||||
children: [
|
||||
{
|
||||
path: 'preview',
|
||||
component: homeJsxt,
|
||||
meta: {
|
||||
i18n: 'router.homeJsxt',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/referee',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.refereeJManage',
|
||||
roles: [user, admin]
|
||||
},
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
@ -1059,26 +1039,6 @@ 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({
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -1,37 +0,0 @@
|
||||
<template>
|
||||
<div class="content_box">
|
||||
<h4>欢迎进入城市轨道交通裁判平台</h4>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'RefereeList',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.content_box{
|
||||
position: relative;
|
||||
.refresh_box{
|
||||
float: right;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,143 +0,0 @@
|
||||
<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>
|
@ -1,48 +1,140 @@
|
||||
<template>
|
||||
<div class="content_box">
|
||||
<div class="refresh_box_out">
|
||||
<div class="refresh_box">
|
||||
<el-button type="primary" size="small" @click="loadQuestions">加载试题</el-button>
|
||||
<el-button size="small" @click="refresh">刷新列表</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-card class="tableList">
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column prop="name" label="用户名">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="organization" label="公司" />
|
||||
<el-table-column prop="department" label="部门" />
|
||||
<el-table-column prop="position" label="职位" />
|
||||
<el-table-column prop="score" label="评分">
|
||||
<template slot-scope="scope">{{ scope.row.score?scope.row.score:0 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="small" @click="handleClick(scope.row)">进入</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<question-list ref="questionList" />
|
||||
<div class="refereeList">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<!-- <question-list ref="questionList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getPublishMapDetailList } from '@/api/jmap/map';
|
||||
import {refereeGetCompetitionList, refereeEnterSimulation} from '@/api/competition';
|
||||
import {getPermissionJointNew} from '@/api/jointTraining';
|
||||
import QuestionList from './questionList';
|
||||
// import QuestionList from './questionList';
|
||||
|
||||
export default {
|
||||
name: 'RefereeList',
|
||||
components:{
|
||||
QuestionList
|
||||
// QuestionList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
isLeaving:false
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '名字'
|
||||
},
|
||||
organization: {
|
||||
type: 'text',
|
||||
label: '公司'
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
data:[
|
||||
{
|
||||
name:'xxx',
|
||||
mobile:'189xxxx0023',
|
||||
organization:'xx企业',
|
||||
department:'xx部门',
|
||||
status:'01'
|
||||
},
|
||||
{
|
||||
name:'xxx',
|
||||
mobile:'189xxxx0023',
|
||||
organization:'xx企业',
|
||||
department:'xx部门',
|
||||
status:'02'
|
||||
},
|
||||
{
|
||||
name:'xxx',
|
||||
mobile:'189xxxx0023',
|
||||
organization:'xx企业',
|
||||
department:'xx部门',
|
||||
status:'03'
|
||||
},
|
||||
{
|
||||
name:'xxx',
|
||||
mobile:'189xxxx0023',
|
||||
organization:'xx企业',
|
||||
department:'xx部门',
|
||||
status:'04',
|
||||
score:80
|
||||
}
|
||||
],
|
||||
// query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '名字',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: '公司',
|
||||
prop: 'organization'
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
prop: 'department'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.covertStatus(row.status); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '分数',
|
||||
prop: 'score'
|
||||
},
|
||||
// {
|
||||
// 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.handleClick,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '02' || row.status == '03'; }
|
||||
},
|
||||
{
|
||||
name: '回放',
|
||||
handleClick: this.playBack,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '04'; }
|
||||
},
|
||||
{
|
||||
name: '打分',
|
||||
handleClick: this.gradeScore,
|
||||
type: 'success',
|
||||
showControl: (row) => { return row.status == '04'; }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '导入试题', handler: this.handleAdd }
|
||||
]
|
||||
}
|
||||
// isLeaving:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -51,21 +143,35 @@ export default {
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.isLeaving = true;
|
||||
// this.isLeaving = true;
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.getData();
|
||||
// this.getData();
|
||||
},
|
||||
getData() {
|
||||
refereeGetCompetitionList(1).then(response=>{
|
||||
this.tableData = response.data;
|
||||
setTimeout(() => {
|
||||
if (!this.isLeaving) {
|
||||
this.getData();
|
||||
}
|
||||
}, 2000);
|
||||
});
|
||||
covertStatus(status) {
|
||||
const statusDict = {'01':'未考试', '02':'准备中', '03':'考试中', '04':'考试结束'};
|
||||
return statusDict[status];
|
||||
},
|
||||
// getData() {
|
||||
// refereeGetCompetitionList(1).then(response=>{
|
||||
// this.tableData = response.data;
|
||||
// setTimeout(() => {
|
||||
// if (!this.isLeaving) {
|
||||
// this.getData();
|
||||
// }
|
||||
// }, 2000);
|
||||
// });
|
||||
// },
|
||||
handleAdd() {
|
||||
|
||||
},
|
||||
// 查询函数
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.raceId) {
|
||||
params['id'] = this.$route.query.raceId;
|
||||
}
|
||||
return refereeGetCompetitionList(this.$route.query.raceId);
|
||||
},
|
||||
handleClick(row) {
|
||||
const group = row.room.group;
|
||||
@ -76,30 +182,20 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
refresh() {
|
||||
this.loadInitData();
|
||||
playBack() {
|
||||
|
||||
},
|
||||
loadQuestions() {
|
||||
this.$refs.questionList.doShow();
|
||||
gradeScore() {
|
||||
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
}
|
||||
// loadQuestions() {
|
||||
// this.$refs.questionList.doShow();
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.content_box{
|
||||
position: relative;
|
||||
.refresh_box{
|
||||
float: right;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
.tableList{
|
||||
width:94%;
|
||||
margin-left: 3%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.refresh_box_out{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -223,7 +223,7 @@ export default {
|
||||
this.cookiesToken = 'UserDesignToken';
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = '/refereeJsxt/preview';
|
||||
this.path = '/refereeJsxt/home';
|
||||
}
|
||||
|
||||
const nowLang = LangStorage.getLang('zh');
|
||||
@ -336,17 +336,23 @@ export default {
|
||||
this.tipsMsg = '';
|
||||
removeSessionStorage('againEnter');
|
||||
if (this.$route.query.raceId) {
|
||||
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||
if (res.data) {
|
||||
this.$router.push({ path: this.path });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||
});
|
||||
} else if (!this.$route.path.includes('jsxt/login')) {
|
||||
if (this.$route.path.includes('jsxt/login')) {
|
||||
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||
if (res.data) {
|
||||
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
|
||||
} else {
|
||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
|
||||
}
|
||||
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
||||
this.$router.push({ path: this.path });
|
||||
} else {
|
||||
this.$messageBox('请调整路径参数');
|
||||
this.$messageBox('请输入正确的链接地址');
|
||||
}
|
||||
},
|
||||
handleLanguage() {
|
||||
|
Loading…
Reference in New Issue
Block a user