yujialong 1 year ago
parent cdf6d1de36
commit b3690d0393
  1. 2
      src/layouts/home/index.vue
  2. 41
      src/pages/match/add/step3.vue
  3. 3
      src/pages/match/manage/matchArch.vue
  4. 30
      src/pages/match/manage/matchArchList.vue
  5. 6
      src/pages/match/manage/matchInfo.vue
  6. 2
      src/pages/station/preview/index.vue
  7. 2
      src/setting.js

@ -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);

@ -60,8 +60,7 @@
:label="1"></el-radio>
<template v-if="item.competitionStageContentSetting.whetherToUploadFiles">
<el-upload accept=".jpg,.png,.jpeg,.gif"
:on-remove="(file, fileList) => handleRemove(file, fileList, item)"
<el-upload :on-remove="(file, fileList) => handleRemove(file, fileList, item)"
:on-error="uploadError"
:on-success="res => uploadSuccess(res, item)"
:before-remove="beforeRemove"
@ -235,11 +234,17 @@ export default {
fileList: []
}
}
//
if (form.competitionStageContentSetting.fileUrl) {
form.competitionStageContentSetting.fileList = [{
name: form.competitionStageContentSetting.fileName,
url: form.competitionStageContentSetting.fileUrl,
}]
const urls = form.competitionStageContentSetting.fileUrl.split('|')
const names = form.competitionStageContentSetting.fileName.split('|')
form.competitionStageContentSetting.fileList = []
urls.map((n, i) => {
form.competitionStageContentSetting.fileList.push({
name: names[i],
url: n
})
})
}
form.competitionStageContentSetting.competitionId = this.id
form.competitionStageContentSetting.stageId = e.stageId
@ -314,17 +319,15 @@ export default {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove (file, fileList, item) {
item.fileName = ''
item.fileUrl = ''
const i = item.competitionStageContentSetting.fileList.findIndex(e => e.url === file.url)
item.competitionStageContentSetting.fileList.splice(i, 1)
},
uploadSuccess (res, item) {
const { originalFileName, fileUrl } = res.filesResult
item.competitionStageContentSetting.fileUrl = fileUrl
item.competitionStageContentSetting.fileName = originalFileName
item.competitionStageContentSetting.fileList = [{
item.competitionStageContentSetting.fileList.push({
name: originalFileName,
url: fileUrl
}]
})
},
//
@ -378,11 +381,11 @@ export default {
util.errorMsg('请输入评分规则')
break
}
if (e.competitionStageContentSetting.whetherToUploadFiles && !e.competitionStageContentSetting.stageExplain) {
invalid = 1
util.errorMsg('请输入说明')
break
}
// if (e.competitionStageContentSetting.whetherToUploadFiles && !e.competitionStageContentSetting.stageExplain) {
// invalid = 1
// util.errorMsg('')
// break
// }
} else {
if (e.onlineButton && !e.onlineAddress) {
invalid = 1
@ -407,6 +410,10 @@ export default {
for (const e of form) {
e.offlineButton = e.offlineButton ? 1 : 0
e.onlineButton = e.onlineButton ? 1 : 0
if (e.competitionStageContentSetting && e.competitionStageContentSetting.fileList && e.competitionStageContentSetting.fileList.length) {
e.competitionStageContentSetting.fileName = e.competitionStageContentSetting.fileList.map(n => n.name).join('|')
e.competitionStageContentSetting.fileUrl = e.competitionStageContentSetting.fileList.map(n => n.url).join('|')
}
}
this.$parent.showLoad()
this.$post(this.api[form[0].contentId ? 'editCompetitionContent' : 'addCompetitionContent'], {

@ -16,6 +16,9 @@
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="stageName"
label="阶段名称"
align="center"></el-table-column>
<el-table-column prop="methodName"
label="比赛方式"
align="center"></el-table-column>

@ -59,7 +59,8 @@
</div>
<div v-else>
<el-button type="primary"
@click="exportData1">批量导出</el-button>
:loading="loading"
@click="exportData1">{{ loading ? '正在导出' : '批量导出' }}</el-button>
</div>
</div>
<template v-if="!active">
@ -176,7 +177,7 @@
<el-table-column prop="fileSize"
label="文件大小"
align="center"></el-table-column>
<el-table-column prop="fileFormat"
<el-table-column prop="fileType"
label="文件类型"
align="center"></el-table-column>
<el-table-column prop="fileFormat"
@ -194,7 +195,8 @@
<el-button v-if="!isCompress(scope.row.fileFormat)"
type="text"
@click="preview(scope.row)">预览文件</el-button>
<el-button type="text"
<el-button type="primary"
size="mini"
@click="exportFile(scope.row)">导出文件</el-button>
</template>
</el-table-column>
@ -293,7 +295,8 @@ export default {
},
statData: {},
tabs: ['成绩列表', '文件列表'],
active: 0
active: 0,
loading: false
};
},
watch: {
@ -318,6 +321,22 @@ export default {
stageId: this.stageId,
keyWord: this.keyword,
}).then(({ data }) => {
data.records.forEach(e => {
e.fileType = '其他'
if (util.isVideo(e.fileFormat)) {
e.fileType = '视频'
} else if (util.isAudio(e.fileFormat)) {
e.fileType = '音频'
} else if (util.isImg(e.fileFormat)) {
e.fileType = '图片'
} else if (util.isDoc(e.fileFormat)) {
e.fileType = '文档'
} else if (util.isCompress(e.fileFormat)) {
e.fileType = '压缩包'
} else if (e.fileType === 'pdf') {
e.fileType = 'pdf'
}
})
this.list1 = data.records
this.total1 = data.total
}).catch(res => { })
@ -375,12 +394,13 @@ export default {
stageId: this.stageId,
}
if (ids) data.ids = ids
this.loading = true
axios.post(this.api.derive, data, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
console.log("🚀 ~ file: matchArchList.vue:378 ~ exportData1 ~ res:", res)
util.downloadFileDirect(`批量导出.zip`, new Blob([res.data]))
this.loading = false
}).catch(res => { })
},
handleDelete (row) { //

@ -579,11 +579,6 @@ export default {
selectPar (row) {
const item = this.form.competitionStage.find(e => e.stageId == row.stageId)
if (item) {
//
const now = new Date()
if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) {
return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!')
} else {
const { teamLimit, stages, teamDetail } = this.info
// teamLimit=truestagesparticipantAccountIdsaccountId
if (teamLimit) {
@ -606,7 +601,6 @@ export default {
this.checkedMembers = []
this.chooseVisible = true
}
}
},
//
chooseSubmit () {

@ -943,7 +943,7 @@ export default {
util.cookies.set('token', token)
util.cookies.set('mallId', this.mallId)
util.cookies.set('courseId', this.courseId)
util.cookies.set('curriculumName', escape(this.curriculumName))
util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName))
util.cookies.set('systemId', id)
util.cookies.set('fromManager', 1)
util.cookies.set('isSubmit', '', -1)

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

Loading…
Cancel
Save