master V2.3.4
yujialong 12 months ago
parent d9f2543d30
commit 3186dafffb
  1. 3
      src/api/index.js
  2. 2
      src/layouts/home/index.vue
  3. 19
      src/libs/util.js
  4. 1
      src/pages/course/preview/index.vue
  5. 7
      src/pages/match/add/step1.vue
  6. 4
      src/pages/match/add/step2.vue
  7. 38
      src/pages/match/add/step3.vue
  8. 4
      src/pages/match/manage/matchArchList.vue
  9. 35
      src/pages/match/manage/matchRank.vue
  10. 1
      src/pages/station/preview/index.vue
  11. 1
      src/plugins/requests/index.js
  12. 2
      src/setting.js

@ -4,8 +4,6 @@ const uploadURL = Setting.upload.apiURL;
const host2 = 'http://121.37.12.51/'
export default {
queryToken: `liuwanr/userInfo/queryToken`,
logins: `users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片
isClient: `users/users/user/isClient`,// 是否为客户
@ -13,6 +11,7 @@ export default {
getSchoolIdByToken : `users/users/data/user/getSchoolIdByToken`,
deleteProfile : `users/users/userInfo/deleteProfile`,
refreshPageNotification : `nakadai/message/refreshPageNotification`,
getCurrentTime : `competition/competition/management/getCurrentTime`,
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证

@ -144,7 +144,7 @@ export default {
setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
util.errorMsg("由于您已经有个小时没有操作,系统自动登出,请重新登录。页面刷新到登录页。");
util.errorMsg("由于您已经有个小时没有操作,系统自动登出,请重新登录。页面刷新到登录页。");
setTimeout(this.logout, 1500);
}
}, 1000);

@ -172,25 +172,6 @@ const util = {
Message.closeAll();
return Message.error({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, duration });
},
// 登录互踢
getToken() {
if (process.env.NODE_ENV != "production") {
if (store.state.user.dataTime && !logout) {
axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => {
if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) {
logout || Message.error("您已在另一台设备登录,本次登录已下线!");
logout = true;
setTimeout(() => {
_local.remove(Setting.storeKey);
_local.remove(Setting.tokenKey);
location.reload();
}, 1500);
}
}).catch(err => {
});
}
}
},
debounce(fn, delay) { // 防抖
let timeout = null;
return function() {

@ -121,7 +121,6 @@ export default {
data () {
return {
id: this.$route.query.id,
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
videoSrc: "",
videoList: [],
courseName: "",

@ -659,7 +659,7 @@ export default {
* releaseType 发布类型0发布信息1完整比赛
* */
save (status, next = 0, releaseType = 0, cb) {
const { form } = this
const form = JSON.parse(JSON.stringify(this.form))
form.sponsor = this.sponsorList.filter(d => d).join();
form.undertaker = this.undertakerList.filter(d => d).join();
if (!form.name) return util.warningMsg("请填写竞赛名称");
@ -700,12 +700,11 @@ export default {
form.releaseType = releaseType
form.id = this.$route.query.id
this.updateTime = 0
if (form.id) {
this.$post(this.api.editCompetition, form).then(res => {
this.updateTime = 0
this.$parent.hideLoad()
util.successMsg("修改成功");
this.updateTime && util.successMsg("修改成功");
this.updateTime = 0
this.$emit('next', next, cb)
}).catch(err => {
this.$parent.hideLoad()

@ -458,12 +458,12 @@ export default {
if (!e.teamNumLimitOpt) e.teamNumLimit = 0
}
this.$parent.showLoad()
this.updateTime = 0
this.pass = 1
if (form.ruleId) {
this.$post(this.api.editCompetitionRule, form).then(res => {
this.$parent.hideLoad()
util.successMsg("修改成功");
this.updateTime && util.successMsg("修改成功");
this.updateTime = 0
this.$emit('next', next, cb)
}).catch(err => {
this.$parent.hideLoad()

@ -60,22 +60,27 @@
:label="1"></el-radio>
<template v-if="item.competitionStageContentSetting.whetherToUploadFiles">
<el-upload :on-remove="(file, fileList) => handleRemove(file, fileList, item)"
<el-upload class="file-upload"
:on-remove="(file, fileList) => handleRemove(file, fileList, item)"
:on-error="uploadError"
:before-remove="beforeRemove"
:on-preview="handlePreview"
action=""
:file-list="item.competitionStageContentSetting.fileList"
:http-request="res => handleRequest(res, item)">
<el-button size="small"
type="primary">上传文件</el-button>
</el-upload>
<span style="margin: 0 10px 0 30px;">说明</span>
<el-input maxlength="1000"
placeholder="请输入内容"
v-model="item.competitionStageContentSetting.stageExplain"
style="width: calc(80% - 216px);"></el-input>
</template>
</div>
<div style="display: flex;align-items: flex-start;margin-top: 10px">
<span style="margin: 0 10px 0 30px;">说明</span>
<el-input maxlength="1000"
placeholder="请输入内容"
type="textarea"
v-model="item.competitionStageContentSetting.stageExplain"
style="width: calc(80% - 216px);"></el-input>
</div>
</el-form-item>
<el-form-item class="req"
label="比赛内容">
@ -314,13 +319,19 @@ export default {
center: true
})
},
downloadFile () {
// const { name, url } = this.fileList[0]
// util.downloadFile(name, url)
},
handlePreview (file) {
window.open((util.isDoc(util.getFileExt(file.name)) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + file.url)
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove (file, fileList, item) {
Oss.del(file.url)
const i = item.competitionStageContentSetting.fileList.findIndex(e => e.url === file.url)
item.competitionStageContentSetting.fileList.splice(i, 1)
item.competitionStageContentSetting.fileList = fileList
},
//
async handleRequest ({ file }, item) {
@ -460,4 +471,15 @@ export default {
}
}
}
/deep/.file-upload {
width: 500px;
.download {
position: absolute;
bottom: -63px;
right: 0;
font-size: 12px;
color: #007eff;
cursor: pointer;
}
}
</style>

@ -384,7 +384,7 @@ export default {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isNakadai: 0,
isNakadai: 1,
stageId: this.stageId,
}, {
headers: this.headers,
@ -492,7 +492,7 @@ export default {
yAxis: {
name: "人数",
type: "value",
interval: 1
interval: 10
},
series: [{
data,

@ -512,12 +512,43 @@ export default {
},
// ()
exportData () {
async exportData () {
this.loading = true
let { list } = this
if (this.multipleSelection.length) {
list = this.multipleSelection
} else {
// pageSize10000
//
if (this.type) {
const res = await this.$post(this.api.manuallyUploadedRankings, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
stageId: this.active || this.stageId
})
list = res.message.records
} else { //
if (!this.active) {
//
const ids = this.grades.map(e => e.stageId)
const res = await this.$post(this.api.overallStandingsInThePointsRace, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
publicationType: this.type,
locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1)
})
list = res.page
} else { //
const res = await this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=1&pageSize=10000&publicationType=${this.type}`)
list = res.page
}
}
}
this.loading = true
list.forEach((e, i) => {
e.serialNumber = i + 1
if (e.leaderName) e.userName = e.leaderName

@ -456,7 +456,6 @@ export default {
section: this.$route.query.section,
fromAdmin: this.$route.query.admin, // or
type: 1,
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
chapterList: [], //
progressList: [],
coverUrl: "", //

@ -13,7 +13,6 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8"
// 请求拦截器
service.interceptors.request.use(config => {
util.getToken();
let token = util.local.get(Setting.tokenKey);
if (token) config.headers.token = token;
return config;

@ -48,7 +48,7 @@ const Setting = {
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
jumpPath, // 判分点系统前缀
autoLogoutTime: 1000 * 60 * 60, // 长时间未操作,自动退出登录时间
autoLogoutTime: 1000 * 60 * 60 * 3, // 长时间未操作,自动退出登录时间
projectData: "sta_data", // 新增项目跳转判分点数据存储cookie的key
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

Loading…
Cancel
Save