dev_review
yujialong 1 year ago
parent 85ab452faf
commit 3b6aadbd21
  1. 1
      src/components/quill/index.vue
  2. 2
      src/utils/editor.js
  3. 1
      src/views/course/contentSettings.vue
  4. 5
      src/views/information/addArticle/index.vue
  5. 4
      src/views/match/add/step1.vue
  6. 15
      src/views/match/add/step3.vue
  7. 3
      src/views/match/preview/index.vue
  8. 1
      src/views/theoreticalCourse/add/index.vue

@ -43,7 +43,6 @@ import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import toolbarOptions from './options'
import axios from 'axios'
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import Upload from '@/components/upload';

@ -336,8 +336,6 @@ export default {
input.setAttribute("accept", ".mp4");
input.onchange = function(){
let file = this.files[0];
let fd = new FormData();
fd.append("file", file);
const load = Loading.service()
Oss.upload(file).then(res => {
load.close()

@ -348,7 +348,6 @@ import { Loading } from "element-ui";
import Pdf from "@/components/pdf";
import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js'
import axios from 'axios'
import Util from '@/libs/util'
export default {

@ -174,14 +174,11 @@ export default {
},
//
async handleRequest ({ file }) {
this.form.coverUrl && Oss.del(this.form.coverUrl)
Oss.upload(file).then(res => {
this.form.coverUrl = res.url
})
},
uploadSuccess (res, file, fileList) {
Oss.del(this.form.coverUrl)
this.form.coverUrl = res.data.filesResult.fileUrl;
},
uploadError (err, file, fileList) {
this.$message({
message: "上传出错,请重试!",

@ -271,15 +271,11 @@ import util from "@/libs/util";
import quill from "@/components/quill";
import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js'
import { Loading } from 'element-ui'
export default {
props: ['editing'],
data () {
const that = this
return {
headers: {
token: sessionStorage.getItem('token')
},
form: {
id: this.$route.query.id || '',
platformSource: 0, // (0:1)

@ -64,10 +64,8 @@
:on-error="uploadError"
:before-remove="beforeRemove"
action=""
:headers="headers"
:file-list="item.competitionStageContentSetting.fileList"
:http-request="res => handleRequest(res, item)"
name="file">
:http-request="res => handleRequest(res, item)">
<el-button size="small"
type="primary">上传文件</el-button>
</el-upload>
@ -348,11 +346,11 @@ export default {
this.$emit('next', next)
return
}
//
if (status) {
let invalid = 0
const { playStartTime, playEndTime } = this.step1
for (const e of form) {
//
if (status) {
if (!e.time.length) {
invalid = 1
util.errorMsg('请选择比赛时间')
@ -363,8 +361,6 @@ export default {
util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
break
}
e.startTime = e.time[0]
e.endTime = e.time[1]
if (e.method !== 2 && !e.cid) {
invalid = 1
util.errorMsg('请选择课程')
@ -409,8 +405,11 @@ export default {
}
}
}
if (invalid) return
e.startTime = e.time[0]
e.endTime = e.time[1]
}
if (invalid) return
//
for (const e of form) {
e.offlineButton = e.offlineButton ? 1 : 0

@ -78,7 +78,7 @@
<p>每个团队参赛人数限制{{ rule.teamNumLimit || '不限制' }}</p>
<p>团队成绩计算方式{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p>
</template>
<p v-if="rule.resultAnnouncementTime != 0">阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
<!-- <p v-if="rule.resultAnnouncementTime != 0">阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p> -->
<div v-if="form.rule === 1"
class="flex">
<p>晋级规则</p>
@ -183,6 +183,7 @@ export default {
},
mounted () {
this.handleAnnex()
console.log("🚀 ~ file: index.vue:187 ~ mounted ~ this.form:", this.form)
if (this.form.id) {
this.getProgress()
this.getNotice()

@ -470,6 +470,7 @@ export default {
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
},
handleRequest ({ file }) {
this.form.coverUrl && Oss.del(this.form.coverUrl)
Oss.upload(file).then(res => {
this.form.coverUrl = res.url
})

Loading…
Cancel
Save