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
|
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', // 列车车身填充颜色
|
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||||
},
|
},
|
||||||
|
soonerOrLater: {
|
||||||
|
level: 3,
|
||||||
|
earlyColor: '#00FF00',
|
||||||
|
lateColor: '#F4A460',
|
||||||
|
normalColor: '#FFF'
|
||||||
|
},
|
||||||
directionArrow: {
|
directionArrow: {
|
||||||
},
|
},
|
||||||
hsda: {
|
hsda: {
|
||||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
|||||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||||
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
|
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
|
||||||
|
invalidColor: '#B18E38' // 区段ARB故障颜色
|
||||||
},
|
},
|
||||||
axle: {}, // 计轴
|
axle: {}, // 计轴
|
||||||
speedLimit: { // 限速元素
|
speedLimit: { // 限速元素
|
||||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
|||||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||||
|
invalidColor: '#A25100' // 区段ARB故障颜色
|
||||||
},
|
},
|
||||||
axle: {}, // 计轴
|
axle: {}, // 计轴
|
||||||
speedLimit: { // 限速元素
|
speedLimit: { // 限速元素
|
||||||
|
@ -93,7 +93,8 @@ class SkinCode extends defaultStyle {
|
|||||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||||
|
invalidColor: '#A25100' // 区段ARB故障颜色
|
||||||
},
|
},
|
||||||
axle: {}, // 计轴
|
axle: {}, // 计轴
|
||||||
speedLimit: { // 限速元素
|
speedLimit: { // 限速元素
|
||||||
|
@ -559,6 +559,14 @@ class SkinCode extends defaultStyle {
|
|||||||
trainSidelineColor: '#FFFF00',
|
trainSidelineColor: '#FFFF00',
|
||||||
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
|
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
|
||||||
},
|
},
|
||||||
|
soonerOrLater: {
|
||||||
|
level: 5,
|
||||||
|
earlyColor: '#00FF00',
|
||||||
|
severeEarlyColor: '#0000FF',
|
||||||
|
lateColor: '#FF00FF',
|
||||||
|
severeLateColor: '#FF0000',
|
||||||
|
normalColor: '#DADA00'
|
||||||
|
},
|
||||||
directionArrow: {
|
directionArrow: {
|
||||||
},
|
},
|
||||||
hsda: {
|
hsda: {
|
||||||
|
@ -101,7 +101,8 @@ class SkinCode extends defaultStyle {
|
|||||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
|
||||||
|
invalidColor: '#9C5208' // 区段ARB故障颜色
|
||||||
},
|
},
|
||||||
axle: {}, // 计轴
|
axle: {}, // 计轴
|
||||||
speedLimit: { // 限速元素
|
speedLimit: { // 限速元素
|
||||||
@ -232,7 +233,8 @@ class SkinCode extends defaultStyle {
|
|||||||
trainColor: '#E4EF50', // 车站扣车颜色
|
trainColor: '#E4EF50', // 车站扣车颜色
|
||||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||||
|
circle: true // 空心圆环
|
||||||
},
|
},
|
||||||
stopTime: { // 停站时间
|
stopTime: { // 停站时间
|
||||||
position: 1, // 运行时间方向
|
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*/
|
/** 进路锁闭 04*/
|
||||||
routeLock() {
|
routeLock() {
|
||||||
if (this.section) {
|
if (this.section) {
|
||||||
@ -774,6 +780,8 @@ export default class Section extends Group {
|
|||||||
/** 空闲锁闭或者叫进路锁闭 */
|
/** 空闲锁闭或者叫进路锁闭 */
|
||||||
model.routeLock && this.routeLock();
|
model.routeLock && this.routeLock();
|
||||||
/** 轨道封锁 */
|
/** 轨道封锁 */
|
||||||
|
model.invalid && this.invalid();
|
||||||
|
/** 计轴故障 */
|
||||||
model.blockade && this.block();
|
model.blockade && this.block();
|
||||||
/** 非通信车占用状态 */
|
/** 非通信车占用状态 */
|
||||||
model.nctOccupied && this.unCommunicationOccupied();
|
model.nctOccupied && this.unCommunicationOccupied();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||||
|
|
||||||
class EDetain extends Group {
|
class EDetain extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
@ -29,6 +30,24 @@ class EDetain extends Group {
|
|||||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
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);
|
this.add(this.detain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ export default class TrainBody extends Group {
|
|||||||
// this.add(this.atrStatus);
|
// this.add(this.atrStatus);
|
||||||
}
|
}
|
||||||
if (style.Train.common.hasTravelSigns) {
|
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;
|
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
|
||||||
this.travelSigns = new ETextName({
|
this.travelSigns = new ETextName({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
@ -222,7 +222,7 @@ export default class TrainBody extends Group {
|
|||||||
z: model.z + 1,
|
z: model.z + 1,
|
||||||
x: parseInt(model.point.x + style.Train.travelNum.trainTravelNumOffset.x),
|
x: parseInt(model.point.x + style.Train.travelNum.trainTravelNumOffset.x),
|
||||||
y: parseInt(model.point.y + style.Train.travelNum.trainTravelNumOffset.y),
|
y: parseInt(model.point.y + style.Train.travelNum.trainTravelNumOffset.y),
|
||||||
text: 'AA',
|
text: model.destinationCode,
|
||||||
textFill: '#00C300',
|
textFill: '#00C300',
|
||||||
textStroke: style.trainTextColor,
|
textStroke: style.trainTextColor,
|
||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
@ -239,7 +239,7 @@ export default class TrainBody extends Group {
|
|||||||
z: model.z + 1,
|
z: model.z + 1,
|
||||||
x: parseInt(model.point.x + style.Train.delayTime.trainDelayTimeOffset.x),
|
x: parseInt(model.point.x + style.Train.delayTime.trainDelayTimeOffset.x),
|
||||||
y: parseInt(model.point.y + style.Train.delayTime.trainDelayTimeOffset.y),
|
y: parseInt(model.point.y + style.Train.delayTime.trainDelayTimeOffset.y),
|
||||||
text: '0',
|
text: model.dt > 0 ? '+' + model.dt : model.dt,
|
||||||
textFill: '#DADA00',
|
textFill: '#DADA00',
|
||||||
textStroke: style.trainTextColor,
|
textStroke: style.trainTextColor,
|
||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
@ -307,6 +307,34 @@ export default class TrainBody extends Group {
|
|||||||
return new BoundingRect(0, 0, 0, 0);
|
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) {
|
formatChangePosition(model, style) {
|
||||||
if (this.nameFormat) {
|
if (this.nameFormat) {
|
||||||
const arr = this.nameFormat.split(':');
|
const arr = this.nameFormat.split(':');
|
||||||
|
@ -85,6 +85,7 @@ export default class Train extends Group {
|
|||||||
type: model.type,
|
type: model.type,
|
||||||
speed: model.speed,
|
speed: model.speed,
|
||||||
maLen: model.maLen,
|
maLen: model.maLen,
|
||||||
|
dt: model.dt,
|
||||||
model: model
|
model: model
|
||||||
});
|
});
|
||||||
this.trainL = new TrainHead({
|
this.trainL = new TrainHead({
|
||||||
@ -323,7 +324,10 @@ export default class Train extends Group {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 早晚点状态
|
||||||
|
setSoonerOrLater(dt) {
|
||||||
|
this.trainB && this.trainB.setSoonerOrLater(dt);
|
||||||
|
}
|
||||||
// 设置扣车状态
|
// 设置扣车状态
|
||||||
setHoldStatus(status) {
|
setHoldStatus(status) {
|
||||||
if (status) {
|
if (status) {
|
||||||
@ -403,6 +407,7 @@ export default class Train extends Group {
|
|||||||
this.setAlarmStatus(model.alarmStatus);
|
this.setAlarmStatus(model.alarmStatus);
|
||||||
this.setHoldStatus(model.hold);
|
this.setHoldStatus(model.hold);
|
||||||
this.setJumpStatus(model.jump);
|
this.setJumpStatus(model.jump);
|
||||||
|
this.setSoonerOrLater(model.dt);
|
||||||
|
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
if (style.Section.trainPosition.display) {
|
if (style.Section.trainPosition.display) {
|
||||||
|
@ -37,8 +37,7 @@ export default {
|
|||||||
{ label: '课程生成者', value: '03' },
|
{ label: '课程生成者', value: '03' },
|
||||||
{ label: '系统管理员', value: '04' },
|
{ label: '系统管理员', value: '04' },
|
||||||
{ label: '超级管理员', value: '05' },
|
{ label: '超级管理员', value: '05' },
|
||||||
{ label: '销售用户', value: '06' },
|
{ label: '销售用户', value: '06' }
|
||||||
{ label: '裁判员', value: '07' }
|
|
||||||
],
|
],
|
||||||
|
|
||||||
examResultList: [
|
examResultList: [
|
||||||
|
@ -34,7 +34,6 @@ function hasPermission(roles, route, parentsRoles) {
|
|||||||
* @param systemType 项目类型
|
* @param systemType 项目类型
|
||||||
*/
|
*/
|
||||||
function resetAsyncRouter({ systemType }) {
|
function resetAsyncRouter({ systemType }) {
|
||||||
console.log(systemType);
|
|
||||||
let list = publicAsyncRoute;
|
let list = publicAsyncRoute;
|
||||||
if (systemType == projectTrain) {
|
if (systemType == projectTrain) {
|
||||||
list = [...list, ...asyncRouter];
|
list = [...list, ...asyncRouter];
|
||||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.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.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://192.168.3.41:9000'; // 张赛
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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 ref="form" :model="formModel" :rules="rules" label-width="90px">
|
||||||
<el-form-item label="竞赛名称:" prop="name">
|
<el-form-item label="竞赛名称:" prop="name">
|
||||||
<el-input v-model="formModel.name" style="width: 220px;" />
|
<el-input v-model="formModel.name" style="width: 220px;" />
|
||||||
@ -34,7 +34,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<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>
|
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -42,9 +43,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { updateRace, createRace } from '@/api/race';
|
import { updateRace, createRace } from '@/api/race';
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateRace',
|
name: 'CreateRace',
|
||||||
|
props: {
|
||||||
|
mapList: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
var validatePass = (rule, value, callback) => {
|
var validatePass = (rule, value, callback) => {
|
||||||
if (this.formModel.startDate && this.formModel.endDate) {
|
if (this.formModel.startDate && this.formModel.endDate) {
|
||||||
@ -72,7 +80,9 @@ export default {
|
|||||||
return time.getTime() < Date.now();
|
return time.getTime() < Date.now();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
raceId: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
|
isUpdate: false,
|
||||||
mapId: '',
|
mapId: '',
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
@ -98,9 +108,17 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
getPublishMapListOnline().then(response=>{
|
this.loading = false;
|
||||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
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() {
|
doSave() {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
@ -109,8 +127,36 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
createRace(this.formModel).then(resp => {
|
createRace(this.formModel).then(resp => {
|
||||||
this.$message.success('创建竞赛成功!');
|
this.$message.success('创建竞赛成功!');
|
||||||
|
this.$emit('refresh');
|
||||||
}).catch(()=> {
|
}).catch(()=> {
|
||||||
this.$message.error('创建竞赛失败!');
|
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>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRaceList } from '@/api/race';
|
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 CreateRace from './create';
|
||||||
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PublishMap',
|
name: 'PublishMap',
|
||||||
@ -42,36 +40,54 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('global.name'),
|
title: '竞赛名称',
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('publish.city'),
|
title: '竞赛地图',
|
||||||
prop: 'cityCode',
|
prop: 'mapId',
|
||||||
type: 'tag',
|
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'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('publish.lineType'),
|
title: '开始日期',
|
||||||
prop: 'lineCode',
|
prop: 'startDate'
|
||||||
type: 'tag',
|
|
||||||
columnValue: (row) => { return this.$convertField(row.lineCode, this.lineCodeList, ['code', 'name']); },
|
|
||||||
tagType: (row) => { return ''; }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '归属项目',
|
title: '结束日期',
|
||||||
prop: 'projectCode',
|
prop: 'endDate'
|
||||||
type: 'tag',
|
},
|
||||||
columnValue: (row) => { return row.project ? this.$convertField(row.projectCode.toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
{
|
||||||
tagType: (row) => { return ''; }
|
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: [
|
actions: [
|
||||||
{ text: '创建竞赛', handler: this.createRace }
|
{ text: '创建竞赛', handler: this.createRace }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
mapList: [],
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -82,6 +98,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
|
getPublishMapListOnline().then(response=>{
|
||||||
|
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
@ -90,6 +109,18 @@ export default {
|
|||||||
},
|
},
|
||||||
createRace() {
|
createRace() {
|
||||||
this.$refs.createRace.doShow();
|
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 Cookies from 'js-cookie';
|
||||||
import QrcodeVue from 'qrcode.vue';
|
import QrcodeVue from 'qrcode.vue';
|
||||||
import { getUserinfoMobileCode } from '@/api/management/user';
|
import { getUserinfoMobileCode } from '@/api/management/user';
|
||||||
|
import { postSignUp } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: '',
|
||||||
@ -174,7 +175,6 @@ export default {
|
|||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
this.$store.dispatch('GetInfo', getToken()).then(res => {
|
this.$store.dispatch('GetInfo', getToken()).then(res => {
|
||||||
this.userId = res.id;
|
this.userId = res.id;
|
||||||
console.log(this.userId, '用户id');
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
@ -301,6 +301,24 @@ export default {
|
|||||||
handleApply() {
|
handleApply() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
console.log(this.formModel, '内容');
|
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() {
|
async getTelCode() {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// import { getPublishMapDetailList } from '@/api/jmap/map';
|
// import { getPublishMapDetailList } from '@/api/jmap/map';
|
||||||
import {refereeGetCompetitionList} from '@/api/competition';
|
import {refereeGetCompetitionList} from '@/api/competition';
|
||||||
import QuestionList from './questionList';
|
import QuestionList from './questionList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RefereeList',
|
name: 'RefereeList',
|
||||||
components:{
|
components:{
|
||||||
|
@ -110,6 +110,7 @@ import { loginInfo, ProjectIcon, GenerateRouteProjectList} from '@/scripts/Proje
|
|||||||
import { removeToken } from '@/utils/auth';
|
import { removeToken } from '@/utils/auth';
|
||||||
import LangStorage from '@/utils/lang';
|
import LangStorage from '@/utils/lang';
|
||||||
import FloatPart from './floatPart';
|
import FloatPart from './floatPart';
|
||||||
|
import { getIsSignUp } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
@ -334,7 +335,19 @@ 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) {
|
||||||
|
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||||
this.$router.push({ path: this.path });
|
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() {
|
handleLanguage() {
|
||||||
this.$i18n.locale = this.lang;
|
this.$i18n.locale = this.lang;
|
||||||
|
@ -62,18 +62,6 @@ export default {
|
|||||||
data: []
|
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: {
|
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: [
|
actions: [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.handleOriginalForm();
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
@ -224,17 +192,6 @@ export default {
|
|||||||
handleRoleVest(index, row) {
|
handleRoleVest(index, row) {
|
||||||
this.$refs.detail.doShow(row.permissionId);
|
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() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
|
Loading…
Reference in New Issue
Block a user