diff --git a/src/setting.js b/src/setting.js index 28506aa..b8ddb3a 100644 --- a/src/setting.js +++ b/src/setting.js @@ -13,7 +13,7 @@ if (isDev) { sandPath = `http://${location.hostname}:9520` host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' - host = 'http://192.168.31.217:9000/'// 榕 + // host = 'http://192.168.31.217:9000/'// 榕 // host = 'http://192.168.31.51:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' diff --git a/src/utils/api.js b/src/utils/api.js index bff10a7..812a036 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -415,6 +415,8 @@ export default { cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`, derive: `${host}competition/cCompetitionStageFile/deriveAll`, allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`, + derivedRanking: `${host}competition/competition/rank/derivedRanking`, + individualDerivedRanking: `${host}competition/competition/rank/individualDerivedRanking`, gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, diff --git a/src/utils/core.js b/src/utils/core.js index 96b5d0d..1913a25 100644 --- a/src/utils/core.js +++ b/src/utils/core.js @@ -1,5 +1,3 @@ -import { Loading } from 'element-ui' - const pad2 = str => ('0' + str).substr(-2) function fMoney (s, n) { @@ -205,7 +203,6 @@ function formatDate(fmt,date) { // 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域 function downloadFile(fileName, url) { - const loadIns = Loading.service() var x = new XMLHttpRequest() x.open("GET", url, true) x.responseType = "blob" @@ -215,7 +212,6 @@ function downloadFile(fileName, url) { a.href = url a.download = fileName a.click() - loadIns.close() } x.send() } diff --git a/src/views/course/contentSettings.vue b/src/views/course/contentSettings.vue index 3af73cd..5136d2c 100644 --- a/src/views/course/contentSettings.vue +++ b/src/views/course/contentSettings.vue @@ -162,6 +162,7 @@ @submit.native.prevent> @@ -192,6 +193,7 @@ @close="closeSwitch">
@@ -528,34 +530,6 @@ export default { this.fileUrl = file.url this.fileName = file.name }, - // 自定义上传 - handleRequest (data) { - const param = new FormData() - param.append('file', data.file) - const config = { - timeout: 10000000000, - headers: { - 'Accept': '*/*', - 'Content-Type': 'multipart/form-data' - }, - // 获取上传进度,自带的组件上传进度不准确 - onUploadProgress: progressEvent => { - const per = Number((progressEvent.loaded / progressEvent.total * 100).toFixed(2)) - console.log("🚀 ~ file: contentSettings.vue ~ line 329 ~ handleRequest ~ per", per, this.progressPercent) - if (this.progressPercent <= 80) this.progressPercent = (per > 80) ? (Math.random() * 10 + 80).toFixed(2) : per - } - } - axios.post(this.api.fileupload, param, config).then(res => { - this.progressPercent = 100 - this.showProgress = false - const { fileId, fileType, fileUrl, ossFileName } = res.data.data.filesResult - this.uploading = false - this.fileId = fileId - this.fileType = fileType - this.fileUrl = fileUrl - this.fileName = ossFileName - }) - }, uploadError (err, file, fileList) { this.$message({ message: "上传出错,请重试!", @@ -568,7 +542,8 @@ export default { return this.$confirm(`确定移除 ${file.name}?`); } }, - handleRemove (file, fileList) { + handleRemove () { + Oss.del(this.fileUrl) this.fileUrl = '' }, uploadSure () { diff --git a/src/views/information/addArticle/index.vue b/src/views/information/addArticle/index.vue index c740c3b..6fec251 100644 --- a/src/views/information/addArticle/index.vue +++ b/src/views/information/addArticle/index.vue @@ -1,211 +1,238 @@ @@ -221,7 +248,7 @@ $avatar-width: 104px; overflow: hidden; &:hover { - border-color: #409EFF; + border-color: #409eff; } .uploader-default { @@ -272,7 +299,8 @@ $avatar-width: 104px; /deep/ .d-inline-block { width: 216px; - .el-select, .el-input { + .el-select, + .el-input { width: 100%; } } diff --git a/src/views/match/add/step1.vue b/src/views/match/add/step1.vue index 02cf55e..f43aa50 100644 --- a/src/views/match/add/step1.vue +++ b/src/views/match/add/step1.vue @@ -36,7 +36,6 @@ accept=".jpg,.png,.jpeg,.gif" :on-remove="handleLgRemove" :on-error="uploadError" - :on-success="uploadLgSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" @@ -598,16 +597,6 @@ export default { this.form.carouselUrl = res.url }) }, - uploadSuccess (res) { - const { coverUrl } = this.form - coverUrl && this.$del(`${this.api.fileDeletion}?keys=${coverUrl}`).then(res => { }).catch(res => { }) - this.form.coverUrl = res.data.filesResult.fileUrl - }, - uploadLgSuccess (res) { - const { carouselUrl } = this.form - carouselUrl && this.$del(`${this.api.fileDeletion}?keys=${carouselUrl}`).then(res => { }).catch(res => { }) - this.form.carouselUrl = res.data.filesResult.fileUrl - }, // 附件上传成功 uploadAnnexSuccess (file) { const { id } = this.form diff --git a/src/views/match/add/step3.vue b/src/views/match/add/step3.vue index 34cdfbe..f936c90 100644 --- a/src/views/match/add/step3.vue +++ b/src/views/match/add/step3.vue @@ -62,11 +62,11 @@ @@ -255,7 +251,8 @@ $upload-lg-height: 150px; /deep/ .d-inline-block { width: 216px; - .el-select, .el-input { + .el-select, + .el-input { width: 100%; } } @@ -275,7 +272,7 @@ $upload-lg-height: 150px; .remove { width: 16px; height: 16px; - background: url("../../../assets/img/close.png") 0 0/cover no-repeat; + background: url('../../../assets/img/close.png') 0 0 / cover no-repeat; cursor: pointer; } } diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 0f41ea2..29d0517 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -1498,21 +1498,11 @@ :offset="4" class="flex-start"> - - 上传 - + +
+