dev_202412
yujialong 2 months ago
parent 04c306898f
commit db23e62753
  1. 20
      src/views/course/content/index.vue
  2. 19
      src/views/course/content/source.vue
  3. 5
      src/views/order/AddOrder.vue
  4. 11
      src/views/resourse/upload.vue

@ -96,8 +96,8 @@
:close-on-click-modal="false">
<el-form ref="form" :model="sectionForm" label-width="80px" @submit.native.prevent>
<el-form-item label="资源添加">
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove"
@beforeUpload="beforeUpload" @onSuccess="uploadSuccess">
<template slot="tip">
<p>视频请上传MP4格式大小不超过150Moffice文件大小不要超过10M</p>
</template>
@ -117,8 +117,8 @@
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false"
@close="closeSwitch">
<div style="text-align: center">
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove"
@beforeUpload="beforeUpload" @onSuccess="uploadSuccess">
<div slot="tip"></div>
</Upload>
</div>
@ -387,6 +387,10 @@ export default {
this.fileType = file.format
this.fileUrl = file.url
this.fileName = file.name
this.uploadList = [{
name: file.name,
url: file.url,
}]
},
uploadError (err, file, fileList) {
this.$message({
@ -584,9 +588,13 @@ export default {
},
//
editSection () {
this.sectionForm.sectionName = this.curSection.name
const row = this.curSection
this.sectionForm.sectionName = row.name
this.fileUrl = ''
this.uploadList = []
this.uploadList = [{
name: row.originalFileName,
url: row.fileUrl,
}]
this.isAddSection = false
this.sectionVisible = true
},

@ -63,9 +63,8 @@
<span>资源类型</span>
</div>
<ul class="lines">
<li v-for="(item, i) in sourceType" :key="i" class="line">
<el-checkbox v-model="item.check" :label="item.name" @change="getCourse"></el-checkbox>
</li>
<li v-for="(item, i) in sourceType" :key="i" :class="['line', { active: curType === item.name }]"
@click="checkType(item)">{{ item.name }}</li>
</ul>
</div>
@ -144,6 +143,7 @@ export default {
tab3: '文件素材',
},
sourceType: SourceConst.types,
curType: '',
sources: [],
checkAll: false,
keyword: '',
@ -193,7 +193,7 @@ export default {
platformId: Setting.platformId,
type: 2,
keyword: this.keyword,
displayFileType: this.sourceType.filter(e => e.check).map(e => e.name),
displayFileType: this.curType ? [this.curType] : [],
})
const list = page.records
list.forEach(e => {
@ -316,6 +316,11 @@ export default {
this.sourceChange(e)
})
},
//
checkType ({ name }) {
this.curType = name
this.getCourse()
},
//
sourceChange (row) {
const { check } = row
@ -576,6 +581,12 @@ export default {
.line {
margin-bottom: 10px;
cursor: pointer;
&.active {
font-weight: 600;
color: #062c87;
}
}
}

@ -431,11 +431,11 @@
<template v-if="viewDisabled || isEdit">使用期限</template>
<template v-else>
<el-input class="batch-time" :disabled="viewDisabled || isEdit" maxlength="4"
@change="batchDeadlineChange(1)"
@change="batchDeadlineChange(6)"
@input="productProps[6].deadline = productProps[6].deadline.replace(/[^0-9.]/g, '')"
v-model="productProps[6].deadline" placeholder="批量输入时间" />
<el-select class="batch-unit" v-model="productProps[6].unit" :disabled="viewDisabled || isEdit"
placeholder="请选择" @change="batchUnitChange(1)">
placeholder="请选择" @change="batchUnitChange(6)">
<el-option v-for="(item, i) in units" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</template>
@ -2756,6 +2756,7 @@ export default {
addCourseJurisdiction (type) {
if (!this.form.customerId) return this.$message.warning("请先选择客户");
this.classificationId = type
this.practicalCourseName = ''
this.practicalCourseVisible = true;
this.initCourses();
},

@ -3,9 +3,9 @@
custom-class="source-dia" @closed="closeDia">
<el-form label-width="80px" style="padding: 20px">
<el-form-item prop="userName">
<el-upload name="file" ref="upload" class="import-file" drag :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :before-remove="beforeRemove" :limit="1"
:disabled="uploading" v-loading="uploading" :on-exceed="handleExceed" :file-list="uploadList" action=""
<el-upload name="file" ref="upload" class="import-file" drag :limit="10000" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :before-remove="beforeRemove" :disabled="uploading"
v-loading="uploading" :on-exceed="handleExceed" :file-list="uploadList" action=""
:http-request="handleRequest">
<!-- <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar"> -->
<i class="el-icon-upload"></i>
@ -105,6 +105,11 @@ export default {
this.form.fileUrl = res.url
this.form.fileName = res.name
this.handleType(res.format)
this.uploadList = [{
name: res.name,
url: res.url
}]
})
},
uploadError () {

Loading…
Cancel
Save