学时,学分计算更改

This commit is contained in:
18571350067 2022-02-21 12:02:10 +08:00
parent 9d51a3a31e
commit 5597f5c8bf
1 changed files with 24 additions and 45 deletions

View File

@ -54,11 +54,11 @@
<a-tree-select v-model="fileUpload.textForm.classify" style="width: 300px" :tree-data="coursewareClassfiy" placeholder="请选择课程分类"></a-tree-select>
</div>
<div>课件学时&nbsp;
<a-input-number :min="0" :max="10" :step="0.1" :defaultValue=0 v-model="fileUpload.textForm.learnHours" style="width: 140px" />
<a-input-number :min="0" :max="10" :step="0.1" v-model="fileUpload.textForm.learnHours" style="width: 140px" />
</div>
<br />
<div>课件学分&nbsp;
<a-input-number :min="0" :max="10" :step="0.1" :defaultValue=0 v-model="fileUpload.textForm.learnScore" style="width: 140px" />
<a-input-number :min="0" :max="10" :step="0.1" v-model="fileUpload.textForm.learnScore" style="width: 140px" />
</div>
<br />
<div>课件大小&nbsp;
@ -120,32 +120,6 @@
</a-select-option>
</a-select>
<a-button type="primary" @click="showModal" style="margin-left: 20px"> 添加分类 </a-button>
<!-- 课件分类弹框 -->
<!-- <a-modal v-model="fileUpload.visible" title="模板下载" cancelText="关闭" :ok-button-props="{ style: { display: 'none' } }">
<s-table ref="table" :rowKey="(record) => record.id" :columns="fileUpload.columns" :alert="false" :data="loadData" :showPagination="false" :expandRowByClick="true">
<span slot="type" slot-scope="text, record">
<a-tag color="cyan" v-if="text === 0">
{{ record.type | typeFilter }}
</a-tag>
<a-tag color="blue" v-if="text === 1">
{{ record.type | typeFilter }}
</a-tag>
<a-tag color="purple" v-if="text === 2">
{{ record.type | typeFilter }}
</a-tag>
</span>
<span slot="action" slot-scope="text, record">
<template>
<a v-if="hasPerm('sys:menu:edit')" @click="$refs.menuForm.edit(record)">编辑</a>
<a-divider type="vertical" v-if="hasPerm('sys:menu:edit')" />
<a-popconfirm v-if="hasPerm('sys:menu:delete')" placement="topRight" title="删除本菜单与下级?" @confirm="() => handleDel(record)">
<a>删除</a>
</a-popconfirm>
</template>
</span>
</s-table>
</a-modal> -->
</div>
<div style="margin-bottom: 30px">课件大小&nbsp;
<a-time-picker placeholder="课件时长" :minute-step="1" :second-step="1" v-model="thirdAddress.sizeStr" />
@ -199,15 +173,16 @@ export default {
sizeStr: '0', //
type: '1',
videoPath: [],
learnHours:0,
learnScore:0
// learnHours:0.0,
// learnScore:0.0
},
textForm: {
//
sizeStr: '0',
type: '2', // tabkey 1- 2- 3- 4-
videoPath: [],
learnHours:0,
learnScore:0
// learnHours:0.0,
// learnScore:0.0
},
},
videoServerLink: {
@ -267,6 +242,8 @@ export default {
callback(key) {
this.fileUpload.videoForm = {};
this.fileUpload.textForm = {};
console.log("aaaaaaa ",this.fileUpload.videoForm);
console.log("aaaaaaa ",this.fileUpload.textForm);
this.videoPath = []; //
this.successOssFile = this.successOssFile.splice(this.successOssFile.length, 0); //
@ -274,7 +251,7 @@ export default {
this.fileUpload.tabkey = key; //Key
//
this.initialize(key)
// this.initialize(key)
},
//Tonken
@ -446,6 +423,7 @@ export default {
}
//ID
this.fileUpload.videoForm.type = "1"
this.fileUpload.videoForm.courseId = this.$route.query.courseId;
this.fileUpload.videoForm.videoPath = this.videoPath;
this.fileUpload.videoForm.ifResources = this.$route.query.ifResources || 0;
@ -463,6 +441,7 @@ export default {
}
//ID
this.fileUpload.textForm.type = "2"
this.fileUpload.textForm.courseId = this.$route.query.courseId;
this.fileUpload.textForm.type = this.fileUpload.tabkey;
this.fileUpload.textForm.videoPath = this.videoPath;
@ -571,18 +550,18 @@ export default {
},
//
initialize(key){
if(key == 1) {
this.fileUpload.videoForm.sizeStr = 0.0
this.fileUpload.videoForm.learnHours = 0.0
this.fileUpload.videoForm.learnScore= 0.0
}
if(key == 2){
this.fileUpload.textForm.sizeStr = 0.0
this.fileUpload.textForm.learnHours = 0.0
this.fileUpload.textForm.learnScore= 0.0
}
},
// initialize(key){
// if(key == 1) {
// this.fileUpload.videoForm.sizeStr = 0
// this.fileUpload.videoForm.learnHours == 0
// this.fileUpload.videoForm.learnScore= 0
// }
// if(key == 2){
// this.fileUpload.textForm.sizeStr = 0
// this.fileUpload.textForm.learnHours = 0
// this.fileUpload.textForm.learnScore= 0.0
// }
// },
},
};