Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/api/competition.js # src/views/jsxt/refereeList/index.vue
This commit is contained in:
commit
4132eba1ca
@ -54,3 +54,20 @@ export function loadQuestionList(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 竞赛报名 */
|
||||
export function postSignUp(id, data) {
|
||||
return request({
|
||||
url: `/api/race/${id}/signUp`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询用户是否已经报名该竞赛 */
|
||||
export function getIsSignUp(raceId) {
|
||||
return request({
|
||||
url: `/api/race/${raceId}/isSignUp`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
40
src/api/practical.js
Normal file
40
src/api/practical.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 创建实操 */
|
||||
export function createPractical(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 加载实操及内容 */
|
||||
export function loadingPractical(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/distribute`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 查询地图下的实操列表 */
|
||||
export function getPracticalListByMapId(mapId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/map/${mapId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 删除实操 */
|
||||
export function deletePractical(practicalId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${practicalId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 更新实操 */
|
||||
export function updatePractical(practicalId, data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/{practicalId}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
@ -559,6 +559,12 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
soonerOrLater: {
|
||||
level: 3,
|
||||
earlyColor: '#00FF00',
|
||||
lateColor: '#F4A460',
|
||||
normalColor: '#FFF'
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
|
||||
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
|
||||
invalidColor: '#B18E38' // 区段ARB故障颜色
|
||||
},
|
||||
axle: {}, // 计轴
|
||||
speedLimit: { // 限速元素
|
||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||
invalidColor: '#A25100' // 区段ARB故障颜色
|
||||
},
|
||||
axle: {}, // 计轴
|
||||
speedLimit: { // 限速元素
|
||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||
invalidColor: '#A25100' // 区段ARB故障颜色
|
||||
},
|
||||
axle: {}, // 计轴
|
||||
speedLimit: { // 限速元素
|
||||
|
@ -559,6 +559,14 @@ class SkinCode extends defaultStyle {
|
||||
trainSidelineColor: '#FFFF00',
|
||||
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
|
||||
},
|
||||
soonerOrLater: {
|
||||
level: 5,
|
||||
earlyColor: '#00FF00',
|
||||
severeEarlyColor: '#0000FF',
|
||||
lateColor: '#FF00FF',
|
||||
severeLateColor: '#FF0000',
|
||||
normalColor: '#DADA00'
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
|
@ -101,7 +101,8 @@ class SkinCode extends defaultStyle {
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||
invalidColor: '#9C5208' // 区段ARB故障颜色
|
||||
},
|
||||
axle: {}, // 计轴
|
||||
speedLimit: { // 限速元素
|
||||
@ -232,7 +233,8 @@ class SkinCode extends defaultStyle {
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
circle: true // 空心圆环
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
|
@ -602,7 +602,13 @@ export default class Section extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** ARB故障 */
|
||||
invalid() {
|
||||
this.section && this.section.setStyle({
|
||||
stroke: this.style.Section.line.invalidColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
}
|
||||
/** 进路锁闭 04*/
|
||||
routeLock() {
|
||||
if (this.section) {
|
||||
@ -774,6 +780,8 @@ export default class Section extends Group {
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock();
|
||||
/** 轨道封锁 */
|
||||
model.invalid && this.invalid();
|
||||
/** 计轴故障 */
|
||||
model.blockade && this.block();
|
||||
/** 非通信车占用状态 */
|
||||
model.nctOccupied && this.unCommunicationOccupied();
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
class EDetain extends Group {
|
||||
constructor(model) {
|
||||
@ -29,6 +30,24 @@ class EDetain extends Group {
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
if (style.StationStand.detainCar.circle) {
|
||||
const offsetX = model.right ? 8 : -8;
|
||||
this.circleDetain = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
cx: model.x + offsetX,
|
||||
cy: model.y - 3,
|
||||
r: 2
|
||||
},
|
||||
style: {
|
||||
fill: '#000',
|
||||
lineWidth: 1,
|
||||
stroke: '#FFf'
|
||||
}
|
||||
});
|
||||
this.add(this.circleDetain);
|
||||
}
|
||||
this.add(this.detain);
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ export default class TrainBody extends Group {
|
||||
// this.add(this.atrStatus);
|
||||
}
|
||||
if (style.Train.common.hasTravelSigns) {
|
||||
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
|
||||
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x + 4 : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
|
||||
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
|
||||
this.travelSigns = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
@ -222,7 +222,7 @@ export default class TrainBody extends Group {
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.travelNum.trainTravelNumOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.travelNum.trainTravelNumOffset.y),
|
||||
text: 'AA',
|
||||
text: model.destinationCode,
|
||||
textFill: '#00C300',
|
||||
textStroke: style.trainTextColor,
|
||||
textStrokeWidth: 0,
|
||||
@ -239,7 +239,7 @@ export default class TrainBody extends Group {
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.delayTime.trainDelayTimeOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.delayTime.trainDelayTimeOffset.y),
|
||||
text: '0',
|
||||
text: model.dt > 0 ? '+' + model.dt : model.dt,
|
||||
textFill: '#DADA00',
|
||||
textStroke: style.trainTextColor,
|
||||
textStrokeWidth: 0,
|
||||
@ -307,6 +307,34 @@ export default class TrainBody extends Group {
|
||||
return new BoundingRect(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
setSoonerOrLater(dt) {
|
||||
if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5) {
|
||||
if (dt > 120) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.severeEarlyColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.severeEarlyColor});
|
||||
} else if (dt >= 15 && dt <= 120) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.earlyColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
|
||||
} else if (dt <= -15 && dt >= -120) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.lateColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
|
||||
} else if (dt < -120) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.severeLateColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.severeLateColor});
|
||||
} else {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.normalColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.normalColor});
|
||||
}
|
||||
} else if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 3) {
|
||||
if (dt > 0) {
|
||||
|
||||
} else if (dt < 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
formatChangePosition(model, style) {
|
||||
if (this.nameFormat) {
|
||||
const arr = this.nameFormat.split(':');
|
||||
|
@ -85,6 +85,7 @@ export default class Train extends Group {
|
||||
type: model.type,
|
||||
speed: model.speed,
|
||||
maLen: model.maLen,
|
||||
dt: model.dt,
|
||||
model: model
|
||||
});
|
||||
this.trainL = new TrainHead({
|
||||
@ -323,7 +324,10 @@ export default class Train extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 早晚点状态
|
||||
setSoonerOrLater(dt) {
|
||||
this.trainB && this.trainB.setSoonerOrLater(dt);
|
||||
}
|
||||
// 设置扣车状态
|
||||
setHoldStatus(status) {
|
||||
if (status) {
|
||||
@ -403,6 +407,7 @@ export default class Train extends Group {
|
||||
this.setAlarmStatus(model.alarmStatus);
|
||||
this.setHoldStatus(model.hold);
|
||||
this.setJumpStatus(model.jump);
|
||||
this.setSoonerOrLater(model.dt);
|
||||
|
||||
const style = this.style;
|
||||
if (style.Section.trainPosition.display) {
|
||||
|
@ -37,8 +37,7 @@ export default {
|
||||
{ label: '课程生成者', value: '03' },
|
||||
{ label: '系统管理员', value: '04' },
|
||||
{ label: '超级管理员', value: '05' },
|
||||
{ label: '销售用户', value: '06' },
|
||||
{ label: '裁判员', value: '07' }
|
||||
{ label: '销售用户', value: '06' }
|
||||
],
|
||||
|
||||
examResultList: [
|
||||
|
@ -34,7 +34,6 @@ function hasPermission(roles, route, parentsRoles) {
|
||||
* @param systemType 项目类型
|
||||
*/
|
||||
function resetAsyncRouter({ systemType }) {
|
||||
console.log(systemType);
|
||||
let list = publicAsyncRoute;
|
||||
if (systemType == projectTrain) {
|
||||
list = [...list, ...asyncRouter];
|
||||
|
@ -2,9 +2,9 @@ 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.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="创建竞赛" :visible.sync="dialogVisible" width="350px" center>
|
||||
<el-dialog v-dialogDrag title="创建竞赛" :visible.sync="dialogVisible" width="500px" center>
|
||||
<el-form ref="form" :model="formModel" :rules="rules" label-width="90px">
|
||||
<el-form-item label="竞赛名称:" prop="name">
|
||||
<el-input v-model="formModel.name" style="width: 220px;" />
|
||||
@ -34,7 +34,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">创建</el-button>
|
||||
<el-button v-if="!isUpdate" v-loading="loading" type="primary" @click="doSave">创建</el-button>
|
||||
<el-button v-if="isUpdate" v-loading="loading" type="primary" @click="doUpdate">修改</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -42,9 +43,16 @@
|
||||
|
||||
<script>
|
||||
import { updateRace, createRace } from '@/api/race';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
export default {
|
||||
name: 'CreateRace',
|
||||
props: {
|
||||
mapList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var validatePass = (rule, value, callback) => {
|
||||
if (this.formModel.startDate && this.formModel.endDate) {
|
||||
@ -72,7 +80,9 @@ export default {
|
||||
return time.getTime() < Date.now();
|
||||
}
|
||||
},
|
||||
raceId: '',
|
||||
loading: false,
|
||||
isUpdate: false,
|
||||
mapId: '',
|
||||
rules: {
|
||||
name: [
|
||||
@ -98,9 +108,17 @@ export default {
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.dialogVisible = true;
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
});
|
||||
this.loading = false;
|
||||
this.isUpdate = false;
|
||||
this.raceId = '';
|
||||
if (row) {
|
||||
this.isUpdate = true;
|
||||
this.raceId = row.id;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.startDate = row.startDate;
|
||||
this.formModel.endDate = row.endDate;
|
||||
this.formModel.mapId = row.mapId + '';
|
||||
}
|
||||
},
|
||||
doSave() {
|
||||
if (this.loading) {
|
||||
@ -109,8 +127,36 @@ export default {
|
||||
this.loading = true;
|
||||
createRace(this.formModel).then(resp => {
|
||||
this.$message.success('创建竞赛成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(()=> {
|
||||
this.$message.error('创建竞赛失败!');
|
||||
}).finally(()=> {
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
},
|
||||
doUpdate() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
const params = {
|
||||
id: this.raceId,
|
||||
name: this.formModel.name,
|
||||
startDate: this.formModel.startDate,
|
||||
endDate: this.formModel.endDate,
|
||||
mapId: this.formModel.mapId
|
||||
};
|
||||
updateRace(this.raceId, params).then(resp => {
|
||||
this.$message.success('修改竞赛成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(()=> {
|
||||
this.$message.error('修改竞赛失败!');
|
||||
}).finally(() => {
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<create-race ref="createRace" />
|
||||
<create-race ref="createRace" :map-list="mapList" @refresh="refresh" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRaceList } from '@/api/race';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
||||
import CreateRace from './create';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'PublishMap',
|
||||
@ -42,36 +40,54 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('global.name'),
|
||||
title: '竞赛名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.city'),
|
||||
prop: 'cityCode',
|
||||
title: '竞赛地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.lineType'),
|
||||
prop: 'lineCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.lineCode, this.lineCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
title: '开始日期',
|
||||
prop: 'startDate'
|
||||
},
|
||||
{
|
||||
title: '归属项目',
|
||||
prop: 'projectCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.project ? this.$convertField(row.projectCode.toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
||||
tagType: (row) => { return ''; }
|
||||
title: '结束日期',
|
||||
prop: 'endDate'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
buttons: [
|
||||
{
|
||||
name: '修改',
|
||||
handleClick: this.update,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '报名地址',
|
||||
handleClick: this.showApplyUrl,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '参赛地址',
|
||||
handleClick: this.showJoinUrl
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '创建竞赛', handler: this.createRace }
|
||||
]
|
||||
},
|
||||
|
||||
mapList: [],
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
@ -82,6 +98,9 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
@ -90,6 +109,18 @@ export default {
|
||||
},
|
||||
createRace() {
|
||||
this.$refs.createRace.doShow();
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
update(index, row) {
|
||||
this.$refs.createRace.doShow(row);
|
||||
},
|
||||
showJoinUrl(index, row) {
|
||||
this.$messageBox(`${row.name}参赛路径:${window.location.protocol}//${window.location.host}/jsxt/login?raceId=${row.id}`);
|
||||
},
|
||||
showApplyUrl(index, row) {
|
||||
this.$messageBox(`${row.name}报名路径:${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -62,6 +62,7 @@ import md5 from 'js-md5';
|
||||
import Cookies from 'js-cookie';
|
||||
import QrcodeVue from 'qrcode.vue';
|
||||
import { getUserinfoMobileCode } from '@/api/management/user';
|
||||
import { postSignUp } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
@ -174,7 +175,6 @@ export default {
|
||||
if (getToken()) {
|
||||
this.$store.dispatch('GetInfo', getToken()).then(res => {
|
||||
this.userId = res.id;
|
||||
console.log(this.userId, '用户id');
|
||||
});
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
@ -301,6 +301,24 @@ export default {
|
||||
handleApply() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
console.log(this.formModel, '内容');
|
||||
const param = {
|
||||
department: this.formModel.department,
|
||||
idNumber: this.formModel.numberId,
|
||||
mobile: this.formModel.phone,
|
||||
name: this.formModel.name,
|
||||
organization: this.formModel.company,
|
||||
position: this.formModel.job,
|
||||
vdCode: this.formModel.phoneCode
|
||||
};
|
||||
if (this.$route.query.raceId) {
|
||||
postSignUp(this.$route.query.raceId, param).then(res => {
|
||||
this.$messageBox('报名成功!');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('报名地址有问题,请检查');
|
||||
}
|
||||
});
|
||||
},
|
||||
async getTelCode() {
|
||||
|
@ -26,6 +26,7 @@
|
||||
// import { getPublishMapDetailList } from '@/api/jmap/map';
|
||||
import {refereeGetCompetitionList} from '@/api/competition';
|
||||
import QuestionList from './questionList';
|
||||
|
||||
export default {
|
||||
name: 'RefereeList',
|
||||
components:{
|
||||
|
@ -110,6 +110,7 @@ import { loginInfo, ProjectIcon, GenerateRouteProjectList} from '@/scripts/Proje
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
import { getIsSignUp } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
@ -334,7 +335,19 @@ export default {
|
||||
this.loading = false;
|
||||
this.tipsMsg = '';
|
||||
removeSessionStorage('againEnter');
|
||||
console.log(this.$route.query, this.$route.query.raceId);
|
||||
if (this.$route.query.raceId) {
|
||||
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||
this.$router.push({ path: this.path });
|
||||
}).catch(error => {
|
||||
console.log(error, '错误');
|
||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||
});
|
||||
} else if (!this.$route.path.includes('jsxt/login')) {
|
||||
this.$router.push({ path: this.path });
|
||||
} else {
|
||||
this.$messageBox('请调整路径参数');
|
||||
}
|
||||
},
|
||||
handleLanguage() {
|
||||
this.$i18n.locale = this.lang;
|
||||
|
@ -62,18 +62,6 @@ export default {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
// sortOrder:{
|
||||
// type: 'select',
|
||||
// label: this.$t('permission.sortType'),
|
||||
// default:'id desc',
|
||||
// noClearable:true,
|
||||
// config: {
|
||||
// data: [
|
||||
// {value:'id desc', label:'ID倒序'},
|
||||
// {value:'userName', label:'用户名正序'}
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
@ -192,31 +180,11 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
// sortChange:function(data) {
|
||||
// switch (data.order) {
|
||||
// case 'ascending': {
|
||||
// this.data=[];
|
||||
// break;
|
||||
// }
|
||||
// case 'descending': {
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// // sortOrder
|
||||
// debugger;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleOriginalForm();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
@ -224,17 +192,6 @@ export default {
|
||||
handleRoleVest(index, row) {
|
||||
this.$refs.detail.doShow(row.permissionId);
|
||||
},
|
||||
handleOriginalForm() {
|
||||
if (this.$route.query.distributeId) {
|
||||
const form = localStore.get(this.$route.path);
|
||||
form['distributeId'] = this.$route.query.distributeId;
|
||||
localStore.set(this.$route.path, form);
|
||||
} else {
|
||||
const form = localStore.get(this.$route.path);
|
||||
form['distributeId'] = '';
|
||||
localStore.set(this.$route.path, form);
|
||||
}
|
||||
},
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
list.forEach(elem => {
|
||||
|
Loading…
Reference in New Issue
Block a user