|
@@ -1,422 +1,537 @@
|
|
|
<template>
|
|
|
- <div class="class-memoir">
|
|
|
- <Tabs value="name1" v-show="showStatus === false">
|
|
|
- <TabPane :label="$t('jyzx.classRecord.myRecod')" name="name1">
|
|
|
- <Card :bordered="false">
|
|
|
- <div>
|
|
|
- <div class="uploaddiv"><AbilityUpload ref="refFile" :auth="curSas" :acceptTypes="['mp4']" :scope="'school'" mode='video' :prefix="uploadId" @uploadFinish="uploadFinish" singleUpload></AbilityUpload></div>
|
|
|
- <div class="hint" v-show="calssListinfo.length !==0">{{tipText}}</div>
|
|
|
- <Button type="primary" size="large" :long="true" @click="confirm" v-if="!calssListinfo.length" :loading="btnstate">{{ $t('jyzx.classRecord.loadOK') }}</Button>
|
|
|
- <Button type="info" size="large" :long="true" disabled v-else-if="calssListinfo[0].score ==1 ||calssListinfo[0].score ==2">{{ $t('jyzx.classRecord.loadOK') }}</Button>
|
|
|
- <Button type="info" size="large" :long="true" @click="confirm" v-else="calssListinfo[0].score !==1 ||calssListinfo[0].score !==2" :loading="btnstate">重新上传</Button>
|
|
|
- </div>
|
|
|
- <div v-if="calssListinfo.length" style="height: calc(100vh - 255px); overflow: auto; margin-top: 20px">
|
|
|
- <Table :columns="classCol" :data="calssListinfo" height="680">
|
|
|
- <template slot-scope="{ row, index }" slot="action">
|
|
|
- <Button size="small" @click="checkevaluate(row,true)" style="margin-right:2%">{{ $t('jyzx.common.seeEvaluate') }}</Button>
|
|
|
- <Button size="small" @click="delClass(row)" v-if="calssListinfo[0].score !==1 && calssListinfo[0].score !==2" class="delete-btns">{{ $t('jyzx.common.delete') }}</Button>
|
|
|
- </template>
|
|
|
- </Table>
|
|
|
- </div>
|
|
|
- </Card>
|
|
|
- </TabPane>
|
|
|
- <TabPane :label="$t('jyzx.classRecord.groupRecord')" name="name2">
|
|
|
- <div v-if="teamVideo.length" style="height: calc(100vh - 255px); overflow: auto">
|
|
|
- <Table :columns="teamclassCol" :data="teamVideo" height="680">
|
|
|
- <template slot-scope="{ row, index }" slot="actions">
|
|
|
- <Button size="small" @click="checkevaluate(row)">{{ $t('jyzx.classRecord.see') }}</Button>
|
|
|
- </template>
|
|
|
- </Table>
|
|
|
- </div>
|
|
|
- </TabPane>
|
|
|
- </Tabs>
|
|
|
- <div v-show="showStatus === true">
|
|
|
- <p><Icon type="md-arrow-back" size="26" @click="showStatus=false" class="backward"/><span class="teachnames">罗老师</span><span class="coursename">【{{courseName}}】</span></p>
|
|
|
- <Table border :columns="columns1aa" :data="data1"></Table>
|
|
|
- <!--<div class="appraise">
|
|
|
- <div>
|
|
|
- <span>评价结果:</span>
|
|
|
- <RadioGroup v-model="border">
|
|
|
- <Radio label="不合格" border></Radio>
|
|
|
- <Radio label="合格" border></Radio>
|
|
|
- <Radio label="优秀" border></Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span>评价内容:</span>
|
|
|
- <div id="div1"></div>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
+ <div class="class-memoir">
|
|
|
+ <Tabs value="name1" v-show="showStatus === false">
|
|
|
+ <TabPane :label="$t('jyzx.classRecord.myRecod')" name="name1">
|
|
|
+ <VideoReview v-if="showReview" :reviewData="propsData" @reSubmit="reSubmit"></VideoReview>
|
|
|
+ <Card :bordered="false" v-else>
|
|
|
+ <div>
|
|
|
+ <div class="uploaddiv" v-show="!isPreview">
|
|
|
+ <AbilityUpload ref="refFile" :auth="curSas" :acceptTypes="['mp4']" :scope="'school'" mode='video' :prefix="uploadId" @removeFileFinish="removeFileFinish" @selectFinish="selectFinish" @uploadFinish="uploadFinish" classMemoir singleUpload></AbilityUpload>
|
|
|
+ </div>
|
|
|
+ <div class="preview-wrap" v-if="isPreview">
|
|
|
+ <video controls="controls" id="previewVideo" width="100%" height="500"></video>
|
|
|
+ </div>
|
|
|
+ <div class="hint" v-show="calssListinfo.length !==0">* {{tipText}}</div>
|
|
|
+ <p color="orange" class="video-tips">* 建议检查您选择的视频文件满足
|
|
|
+ <span>H.264编码、MP4格式、播放未出现花屏、绿屏、曝光过高、模糊或者无声音等异常状况</span> 再确认上传!
|
|
|
+ </p>
|
|
|
+ <div style="display:flex;justify-content: space-between" v-if="hasFile">
|
|
|
+ <Button size="large" @click="doCancel" v-if="isPreview" style="margin-bottom:10px;width:49%;margin-right: 10px">视频异常,重新选择</Button>
|
|
|
+ <Button type="info" size="large" @click="confirm" style="margin-bottom:10px;flex:1" :loading="btnstate">确认上传</Button>
|
|
|
+ </div>
|
|
|
+ <!-- <div v-if="!isPreview && hasFile">
|
|
|
+ <Button type="primary" size="large" :long="true" @click="confirm" v-if="!calssListinfo.length" :loading="btnstate">{{ $t('jyzx.classRecord.loadOK') }}</Button>
|
|
|
+ <Button type="info" size="large" :long="true" disabled v-else-if="calssListinfo[0].score ==1 ||calssListinfo[0].score ==2">{{ $t('jyzx.classRecord.loadOK') }}</Button>
|
|
|
+ <Button type="info" size="large" :long="true" @click="confirm" v-else="(calssListinfo[0].score !==1 ||calssListinfo[0].score !==2) && !isPreview" :loading="btnstate">确认上传</Button>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div v-if="calssListinfo.length" style="height: calc(100vh - 255px); overflow: auto; margin-top: 20px">
|
|
|
+ <Table :columns="classCol" :data="calssListinfo" height="680">
|
|
|
+ <template slot-scope="{ row, index }" slot="action">
|
|
|
+ <Button size="small" @click="checkevaluate(row,true)" style="margin-right:2%">{{ $t('jyzx.common.seeEvaluate') }}</Button>
|
|
|
+ <Button size="small" @click="delClass(row)" v-if="calssListinfo[0].score !==1 && calssListinfo[0].score !==2" class="delete-btns">{{ $t('jyzx.common.delete') }}</Button>
|
|
|
+ </template>
|
|
|
+ </Table>
|
|
|
+ </div>
|
|
|
+ </Card>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane :label="$t('jyzx.classRecord.groupRecord')" name="name2">
|
|
|
+ <div v-if="teamVideo.length" style="height: calc(100vh - 255px); overflow: auto">
|
|
|
+ <Table :columns="teamclassCol" :data="teamVideo" height="680">
|
|
|
+ <template slot-scope="{ row, index }" slot="actions">
|
|
|
+ <Button size="small" @click="checkevaluate(row)">{{ $t('jyzx.classRecord.see') }}</Button>
|
|
|
+ </template>
|
|
|
+ </Table>
|
|
|
</div>
|
|
|
+ </TabPane>
|
|
|
+ </Tabs>
|
|
|
+ <div v-show="showStatus === true">
|
|
|
+ <p>
|
|
|
+ <Icon type="md-arrow-back" size="26" @click="showStatus=false" class="backward" /><span class="teachnames">罗老师</span><span class="coursename">【{{courseName}}】</span>
|
|
|
+ </p>
|
|
|
+ <Table border :columns="columns1aa" :data="data1"></Table>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import BlobTool from '@/utils/blobTool.js'
|
|
|
import { formatDate } from "../../utils/time.js"
|
|
|
import E from "wangeditor"
|
|
|
+import VideoReview from '@/view/video/VideoReview.vue'
|
|
|
export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- classCol: [
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.videoName"),
|
|
|
- key: "name",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.common.loadTime"),
|
|
|
- key: "time",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.fileSize"),
|
|
|
- key: "size",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.common.action"),
|
|
|
- slot: "action",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- ],
|
|
|
- teamclassCol: [
|
|
|
- { title: this.$t("jyzx.classRecord.videoName"), key: 'vname', align: 'center'},
|
|
|
- { title: this.$t("jyzx.classRecord.loadAuth"), key: 'tmdname', align: 'center' },
|
|
|
- { title: this.$t("jyzx.classRecord.size"), key: 'vsize', align: 'center' },
|
|
|
- { title: this.$t("jyzx.common.loadTime"), key: 'vtime', align: 'center'},
|
|
|
- { title: this.$t("jyzx.common.action"), slot: 'actions', align: 'center' },
|
|
|
- ],
|
|
|
- classList: [
|
|
|
- {
|
|
|
- name: "XXXXXX的视频",
|
|
|
- time: "2021-07-19",
|
|
|
- size: 27,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "第一次上课视频",
|
|
|
- time: "2021-07-20",
|
|
|
- size: 89,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "XXXXXX的视频",
|
|
|
- time: "2021-07-19",
|
|
|
- size: 27,
|
|
|
- },
|
|
|
- ],
|
|
|
- calssListinfo: [],
|
|
|
- curSas: {
|
|
|
- sas: '',
|
|
|
- url: '',
|
|
|
- name: '',
|
|
|
- },//验证证书
|
|
|
- uploadId: '',//上传人ID
|
|
|
- uploadData: {
|
|
|
- blob: '',
|
|
|
- createTime: '',
|
|
|
- extension: '',
|
|
|
- name: '',
|
|
|
- size: '',
|
|
|
- type: '',
|
|
|
- url: '',
|
|
|
- score:'',
|
|
|
- },
|
|
|
- showStatus: false,
|
|
|
- teachName:'',
|
|
|
- courseName: '',
|
|
|
- border: '', //评价
|
|
|
- teamVideo:[],//同组课堂实录
|
|
|
- //虚拟数据
|
|
|
- columns1aa: [
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.evaName"),
|
|
|
- key: 'name'
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.evaType"),
|
|
|
- key: 'type'
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.evaResult"),
|
|
|
- key: 'result'
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.evaContent"),
|
|
|
- key: 'content'
|
|
|
- },
|
|
|
- {
|
|
|
- title: this.$t("jyzx.classRecord.evaTime"),
|
|
|
- key: 'time'
|
|
|
- }
|
|
|
- ],
|
|
|
- data1: [
|
|
|
- // {
|
|
|
- // name: 'John Brown',
|
|
|
- // age: 18,
|
|
|
- // address: 'New York No. 1 Lake Park',
|
|
|
- // date: '2016-10-03'
|
|
|
- // },
|
|
|
- {
|
|
|
- name:'李老师',
|
|
|
- type:'互评',
|
|
|
- result:'合格',
|
|
|
- content:'老师讲的很不错',
|
|
|
- time:'2021-07-22 15:30:22',
|
|
|
- cellClassName:{result:'qualified span'},
|
|
|
- },
|
|
|
- {
|
|
|
- name:'罗老师',
|
|
|
- type:'自评',
|
|
|
- result:'合格',
|
|
|
- content:'还需要努力',
|
|
|
- time:'2021-07-24 18:32:21',
|
|
|
- cellClassName:{result:'qualified span'},
|
|
|
- },
|
|
|
- {
|
|
|
- name:'张老师',
|
|
|
- type:'校评',
|
|
|
- result:'优秀',
|
|
|
- content:'讲的很好',
|
|
|
- time:'2021-07-26 10:32:21',
|
|
|
- cellClassName:{result:'excellent span'},
|
|
|
- },
|
|
|
- ],
|
|
|
- //提示
|
|
|
- tipText: '如重新上传,原视频相关的评价同时也会清除哦~',
|
|
|
- //数据添加或删除后的
|
|
|
- operateData: [],
|
|
|
- btnstate: false,
|
|
|
+ components: { VideoReview },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ classCol: [
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.videoName"),
|
|
|
+ key: "name",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.common.loadTime"),
|
|
|
+ key: "time",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.fileSize"),
|
|
|
+ key: "size",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.common.action"),
|
|
|
+ slot: "action",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ teamclassCol: [
|
|
|
+ { title: this.$t("jyzx.classRecord.videoName"), key: 'vname', align: 'center' },
|
|
|
+ { title: this.$t("jyzx.classRecord.loadAuth"), key: 'tmdname', align: 'center' },
|
|
|
+ { title: this.$t("jyzx.classRecord.size"), key: 'vsize', align: 'center' },
|
|
|
+ { title: this.$t("jyzx.common.loadTime"), key: 'vtime', align: 'center' },
|
|
|
+ { title: this.$t("jyzx.common.action"), slot: 'actions', align: 'center' },
|
|
|
+ ],
|
|
|
+ classList: [
|
|
|
+ {
|
|
|
+ name: "XXXXXX的视频",
|
|
|
+ time: "2021-07-19",
|
|
|
+ size: 27,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "第一次上课视频",
|
|
|
+ time: "2021-07-20",
|
|
|
+ size: 89,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "XXXXXX的视频",
|
|
|
+ time: "2021-07-19",
|
|
|
+ size: 27,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ calssListinfo: [],
|
|
|
+ curSas: {
|
|
|
+ sas: '',
|
|
|
+ url: '',
|
|
|
+ name: '',
|
|
|
+ },//验证证书
|
|
|
+ uploadId: '',//上传人ID
|
|
|
+ uploadData: {
|
|
|
+ blob: '',
|
|
|
+ createTime: '',
|
|
|
+ extension: '',
|
|
|
+ name: '',
|
|
|
+ size: '',
|
|
|
+ type: '',
|
|
|
+ url: '',
|
|
|
+ score: '',
|
|
|
+ },
|
|
|
+ showStatus: false,
|
|
|
+ showReview: false,
|
|
|
+ teachName: '',
|
|
|
+ courseName: '',
|
|
|
+ border: '', //评价
|
|
|
+ teamVideo: [],//同组课堂实录
|
|
|
+ //虚拟数据
|
|
|
+ columns1aa: [
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.evaName"),
|
|
|
+ key: 'name'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.evaType"),
|
|
|
+ key: 'type'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.evaResult"),
|
|
|
+ key: 'result'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.evaContent"),
|
|
|
+ key: 'content'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t("jyzx.classRecord.evaTime"),
|
|
|
+ key: 'time'
|
|
|
}
|
|
|
+ ],
|
|
|
+ data1: [
|
|
|
+ // {
|
|
|
+ // name: 'John Brown',
|
|
|
+ // age: 18,
|
|
|
+ // address: 'New York No. 1 Lake Park',
|
|
|
+ // date: '2016-10-03'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ name: '李老师',
|
|
|
+ type: '互评',
|
|
|
+ result: '合格',
|
|
|
+ content: '老师讲的很不错',
|
|
|
+ time: '2021-07-22 15:30:22',
|
|
|
+ cellClassName: { result: 'qualified span' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '罗老师',
|
|
|
+ type: '自评',
|
|
|
+ result: '合格',
|
|
|
+ content: '还需要努力',
|
|
|
+ time: '2021-07-24 18:32:21',
|
|
|
+ cellClassName: { result: 'qualified span' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '张老师',
|
|
|
+ type: '校评',
|
|
|
+ result: '优秀',
|
|
|
+ content: '讲的很好',
|
|
|
+ time: '2021-07-26 10:32:21',
|
|
|
+ cellClassName: { result: 'excellent span' },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ //提示
|
|
|
+ tipText: '如重新上传,原视频相关的评价同时也会清除哦~',
|
|
|
+ //数据添加或删除后的
|
|
|
+ operateData: [],
|
|
|
+ btnstate: false,
|
|
|
+ readyPreview: false,
|
|
|
+ isPreview: false,
|
|
|
+ checkFile: null,
|
|
|
+ recordFile: true,
|
|
|
+ hasFile: false,
|
|
|
+ propsData: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.uploadVerify()
|
|
|
+ this.getvideo('default');
|
|
|
+ this.getteamvideo();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ let stemEditor = new E("#div1")
|
|
|
+ stemEditor.config.onchange = (html) => {
|
|
|
+ this.stemContent = html
|
|
|
+ }
|
|
|
+ stemEditor.config.uploadImgShowBase64 = true
|
|
|
+ stemEditor.config.zIndex = 500
|
|
|
+ stemEditor.create()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ reSubmit() {
|
|
|
+ this.propsData = null
|
|
|
+ this.showReview = false
|
|
|
+ this.isPreview = false
|
|
|
+ this.readyPreview = false
|
|
|
},
|
|
|
- created() {
|
|
|
- this.uploadVerify()
|
|
|
- this.getvideo('default');
|
|
|
- this.getteamvideo();
|
|
|
+ removeFileFinish(arr) {
|
|
|
+ this.hasFile = arr.length > 0
|
|
|
},
|
|
|
- mounted() {
|
|
|
- let stemEditor = new E("#div1")
|
|
|
- stemEditor.config.onchange = (html) => {
|
|
|
- this.stemContent = html
|
|
|
- }
|
|
|
- stemEditor.config.uploadImgShowBase64 = true
|
|
|
- stemEditor.config.zIndex = 500
|
|
|
- stemEditor.create()
|
|
|
+ doCancel() {
|
|
|
+ this.isPreview = false
|
|
|
+ this.readyPreview = false
|
|
|
+ this.$refs.refFile.fileArr = []
|
|
|
+ this.hasFile = false
|
|
|
},
|
|
|
- methods: {
|
|
|
- delClass(row) {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: this.$t("jyzx.classRecord.message1"),
|
|
|
- okText: this.$t("jyzx.common.delete"),
|
|
|
- cancelText: this.$t("jyzx.common.cancel"),
|
|
|
- onOk: () => {
|
|
|
- this.getvideo('delete', row.id)
|
|
|
- /* this.$Message.success("删除成功")*/
|
|
|
- },
|
|
|
- })
|
|
|
-
|
|
|
+ doConfirmUpload() {
|
|
|
+ this.isPreview = false
|
|
|
+ this.readyPreview = false
|
|
|
+ this.confirm()
|
|
|
+ },
|
|
|
+ selectFinish(file) {
|
|
|
+ console.log(file)
|
|
|
+ this.hasFile = true
|
|
|
+ this.checkFile = file
|
|
|
+ this.readyPreview = true
|
|
|
+ this.doCheckVideo()
|
|
|
|
|
|
+ },
|
|
|
+ doCheckVideo() {
|
|
|
+ this.isPreview = true
|
|
|
+ var video = this.checkFile;
|
|
|
+ var url = URL.createObjectURL(video);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ document.getElementById("previewVideo").src = url;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ delClass(row) {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: this.$t("jyzx.classRecord.message1"),
|
|
|
+ okText: this.$t("jyzx.common.delete"),
|
|
|
+ cancelText: this.$t("jyzx.common.cancel"),
|
|
|
+ onOk: () => {
|
|
|
+ this.getvideo('delete', row.id)
|
|
|
+ /* this.$Message.success("删除成功")*/
|
|
|
},
|
|
|
- //上传课堂实录相关数据
|
|
|
- async uploadVerify() {
|
|
|
- this.curSas = await this.$tools.getSchoolSas()
|
|
|
- var user = this.$store.state.userInfo
|
|
|
- this.uploadId = user.TEAMModelId
|
|
|
- },
|
|
|
- //upload过后
|
|
|
- uploadFinish(res) {
|
|
|
- console.log(res, '回调')
|
|
|
- this.btnstate = false
|
|
|
- if (res[0].blob && res[0].url && res[0].size) {
|
|
|
- this.uploadData = res[0]
|
|
|
- this.getvideo('uploadafter', 11)
|
|
|
- } else {
|
|
|
- this.$Message.error(this.$t("jyzx.classRecord.message2"))
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ //上传课堂实录相关数据
|
|
|
+ async uploadVerify() {
|
|
|
+ this.curSas = await this.$tools.getSchoolSas()
|
|
|
+ var user = this.$store.state.userInfo
|
|
|
+ this.uploadId = user.TEAMModelId
|
|
|
+ },
|
|
|
+ //upload过后
|
|
|
+ uploadFinish(res) {
|
|
|
+ console.log(res, '回调')
|
|
|
+ this.btnstate = false
|
|
|
+ if (res[0].blob && res[0].url && res[0].size) {
|
|
|
+ this.uploadData = res[0]
|
|
|
+ this.getvideo('uploadafter', 11)
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t("jyzx.classRecord.message2"))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //确认上传
|
|
|
+ confirm() {
|
|
|
+ console.log(this.calssListinfo, this.calssListinfo[0], '当时的文件')
|
|
|
+ console.log(this.$refs.refFile, '文件')
|
|
|
+ this.isPreview = false
|
|
|
+ this.readyPreview = false
|
|
|
+ this.$refs.refFile.fileArr.length ? (this.$refs.refFile.onConfirmUpload(), this.btnstate = true) : this.$Message.error('请选择上传文件')
|
|
|
+ },
|
|
|
+ //获取自己上传列表
|
|
|
+ getvideo(action, deleId) {
|
|
|
+ console.log(action, deleId, '传来的数据')
|
|
|
+ let user = this.$store.state.userInfo
|
|
|
+ var uploadafterData = {
|
|
|
+ "tmdid": user.TEAMModelId,
|
|
|
+ "school": user.schoolCode,
|
|
|
+ "opt": action === 'uploadafter' ? 'Upload' : action === 'delete' ? 'Delete' : 'Read',
|
|
|
+ "files": [],
|
|
|
+ "ids": [],
|
|
|
+ }
|
|
|
+ if (action === 'uploadafter') {
|
|
|
+ var datainfo = { "url": this.uploadData.url, "name": this.uploadData.name, "size": this.uploadData.size, "score": '', "hash": this.uploadData.hash }
|
|
|
+ if (this.calssListinfo.length) {
|
|
|
+ this.calssListinfo[0].score === 0 || this.calssListinfo[0].score === -1 || this.calssListinfo[0].score !== -2 ? datainfo.score = -2 : delete datainfo.score
|
|
|
+ } else {
|
|
|
+ delete datainfo.score
|
|
|
+ }
|
|
|
+ delete uploadafterData.ids
|
|
|
+ uploadafterData.files.push(datainfo)
|
|
|
+ console.log(uploadafterData, '查看内容')
|
|
|
+ this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
+ res => {
|
|
|
+ console.log(res, '添加返回的')
|
|
|
+ this.operateData = res.classVideo.files
|
|
|
+ var timeData = []
|
|
|
+ res.classVideo.files.length >= 1 ? timeData.push(res.classVideo.files[res.classVideo.files.length - 1]) : ''
|
|
|
+ for (var u = 0; u < timeData.length; u++) {
|
|
|
+ timeData[u].time = this.formatDate(timeData[u].time)
|
|
|
+ timeData[u].size = this.formatSize(timeData[u].size)
|
|
|
}
|
|
|
- },
|
|
|
- //确认上传
|
|
|
- confirm() {
|
|
|
- console.log(this.calssListinfo, this.calssListinfo[0], '当时的文件')
|
|
|
- console.log(this.$refs.refFile, '文件')
|
|
|
- this.$refs.refFile.fileArr.length ? (this.$refs.refFile.onConfirmUpload(), this.btnstate = true) : this.$Message.error('请选择上传文件')
|
|
|
- },
|
|
|
- //获取自己上传列表
|
|
|
- getvideo(action, deleId) {
|
|
|
- console.log(action, deleId, '传来的数据')
|
|
|
- let user = this.$store.state.userInfo
|
|
|
- var uploadafterData = {
|
|
|
- "tmdid": user.TEAMModelId,
|
|
|
- "school": user.schoolCode,
|
|
|
- "opt": action === 'uploadafter' ? 'Upload' : action === 'delete' ? 'Delete' : 'Read',
|
|
|
- "files": [],
|
|
|
- "ids": [],
|
|
|
+ this.calssListinfo = timeData
|
|
|
+ console.log(this.calssListinfo, '过后的列表')
|
|
|
+ this.$Message.success(this.$t("jyzx.classRecord.message3"))
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$Message.error(this.$t("jyzx.classRecord.message2"))
|
|
|
+ }
|
|
|
+ )
|
|
|
+ } else if (action === 'delete') {
|
|
|
+ delete uploadafterData.files
|
|
|
+ console.log(this.operateData, '删除流程')
|
|
|
+ for (let i in this.operateData) {
|
|
|
+ uploadafterData.ids.push(this.operateData[i].id)
|
|
|
+ }
|
|
|
+ console.log(uploadafterData, 'ids')
|
|
|
+ /*uploadafterData.ids.push(deleId)*/
|
|
|
+ this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
+ res => {
|
|
|
+ console.log(res, '删除返回的')
|
|
|
+ var timeData = res.classVideo.files
|
|
|
+ for (var d = 0; d < timeData.length; d++) {
|
|
|
+ timeData[d].time = this.formatDate(timeData[d].time)
|
|
|
+ timeData[d].size = this.formatSize(timeData[d].size)
|
|
|
}
|
|
|
- if (action === 'uploadafter') {
|
|
|
- var datainfo = { "url": this.uploadData.url, "name": this.uploadData.name, "size": this.uploadData.size, "score": '', "hash": this.uploadData.hash}
|
|
|
- if (this.calssListinfo.length) {
|
|
|
- this.calssListinfo[0].score === 0 || this.calssListinfo[0].score === -1 || this.calssListinfo[0].score !== -2 ? datainfo.score = -2 : delete datainfo.score
|
|
|
- } else {
|
|
|
- delete datainfo.score
|
|
|
- }
|
|
|
- delete uploadafterData.ids
|
|
|
- uploadafterData.files.push(datainfo)
|
|
|
- console.log(uploadafterData,'查看内容')
|
|
|
- this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
- res => {
|
|
|
- console.log(res, '添加返回的')
|
|
|
- this.operateData = res.classVideo.files
|
|
|
- var timeData = []
|
|
|
- res.classVideo.files.length >= 1 ? timeData.push(res.classVideo.files[res.classVideo.files.length-1]):''
|
|
|
- for (var u = 0; u < timeData.length; u++) {
|
|
|
- timeData[u].time = this.formatDate(timeData[u].time)
|
|
|
- timeData[u].size = this.formatSize(timeData[u].size)
|
|
|
- }
|
|
|
- this.calssListinfo = timeData
|
|
|
- console.log(this.calssListinfo,'过后的列表')
|
|
|
- this.$Message.success(this.$t("jyzx.classRecord.message3"))
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$Message.error(this.$t("jyzx.classRecord.message2"))
|
|
|
- }
|
|
|
- )
|
|
|
- } else if (action === 'delete') {
|
|
|
- delete uploadafterData.files
|
|
|
- console.log(this.operateData, '删除流程')
|
|
|
- for (let i in this.operateData) {
|
|
|
- uploadafterData.ids.push(this.operateData[i].id)
|
|
|
- }
|
|
|
- console.log(uploadafterData,'ids')
|
|
|
- /*uploadafterData.ids.push(deleId)*/
|
|
|
- this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
- res => {
|
|
|
- console.log(res, '删除返回的')
|
|
|
- var timeData = res.classVideo.files
|
|
|
- for (var d = 0; d < timeData.length; d++) {
|
|
|
- timeData[d].time = this.formatDate(timeData[d].time)
|
|
|
- timeData[d].size = this.formatSize(timeData[d].size)
|
|
|
- }
|
|
|
- this.calssListinfo = timeData
|
|
|
- /*this.calssListinfo=[]*/
|
|
|
- console.log(timeData)
|
|
|
- this.$Message.success(this.$t("jyzx.classRecord.message4"))
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$Message.success(this.$t("jyzx.classRecord.message5"))
|
|
|
- }
|
|
|
- )
|
|
|
- } else {
|
|
|
- delete uploadafterData.ids
|
|
|
- delete uploadafterData.files
|
|
|
- this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
- res => {
|
|
|
- console.log(res, '普通返回的')
|
|
|
- this.operateData = res.classVideo.files
|
|
|
- var timeData = []
|
|
|
- res.classVideo.files.length >= 1 ? timeData.push(res.classVideo.files[res.classVideo.files.length - 1]) : ''
|
|
|
- for (var p = 0; p < timeData.length; p++) {
|
|
|
- timeData[p].time = this.formatDate(timeData[p].time)
|
|
|
- timeData[p].size = this.formatSize(timeData[p].size)
|
|
|
- }
|
|
|
- this.calssListinfo = timeData
|
|
|
- this.calssListinfo[0].score === 1 || this.calssListinfo[0].score === 2 ? this.tipText = '您上传的课堂实录已通过,请勿重复上传' : ''
|
|
|
- },
|
|
|
- error => {
|
|
|
-
|
|
|
- }
|
|
|
- )
|
|
|
+ this.calssListinfo = timeData
|
|
|
+ /*this.calssListinfo=[]*/
|
|
|
+ console.log(timeData)
|
|
|
+ this.$Message.success(this.$t("jyzx.classRecord.message4"))
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$Message.success(this.$t("jyzx.classRecord.message5"))
|
|
|
+ }
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ delete uploadafterData.ids
|
|
|
+ delete uploadafterData.files
|
|
|
+ this.$api.jyzx.getmemoir(uploadafterData).then(
|
|
|
+ res => {
|
|
|
+ this.recordFile = res.classVideo.files.length ? res.classVideo.files[0] : null
|
|
|
+ console.log(res, '普通返回的')
|
|
|
+ this.operateData = res.classVideo.files
|
|
|
+ var timeData = []
|
|
|
+ res.classVideo.files.length >= 1 ? timeData.push(res.classVideo.files[res.classVideo.files.length - 1]) : ''
|
|
|
+ for (var p = 0; p < timeData.length; p++) {
|
|
|
+ timeData[p].time = this.formatDate(timeData[p].time)
|
|
|
+ timeData[p].size = this.formatSize(timeData[p].size)
|
|
|
}
|
|
|
- },
|
|
|
- //同组课程查看评价
|
|
|
- checkevaluate(data,isSelf){
|
|
|
- console.log(data)
|
|
|
- // this.showStatus=true
|
|
|
- // this.courseName=index.name.substring(0,index.name.lastIndexOf("."));
|
|
|
- this.$router.push({
|
|
|
- name:'video',
|
|
|
- params:{
|
|
|
- data:data,
|
|
|
- isSelf:isSelf
|
|
|
- }
|
|
|
- })
|
|
|
- this.$EventBus.$emit('goVideoAppraise',data)
|
|
|
- },
|
|
|
- //同组课堂实录
|
|
|
- getteamvideo() {
|
|
|
- this.$api.jyzx.getTeamclass(
|
|
|
- {
|
|
|
- "tmdid": this.$store.state.userInfo.TEAMModelId,
|
|
|
- "school": this.$store.state.userInfo.schoolCode
|
|
|
- }
|
|
|
- ).then(
|
|
|
- res => {
|
|
|
- console.log(res, '同组数据')
|
|
|
- if (res.groupMembers) {
|
|
|
- res.groupMembers.forEach((i) => {
|
|
|
- i.vtime = this.formatDate(i.vtime)
|
|
|
- i.vsize = this.formatSize(i.vsize)
|
|
|
- })
|
|
|
- this.teamVideo = res.groupMembers
|
|
|
- } else {
|
|
|
- this.$Message.info(this.$t("jyzx.classRecord.message6"))
|
|
|
- }
|
|
|
+ this.calssListinfo = timeData
|
|
|
+ this.calssListinfo[0].score === 1 || this.calssListinfo[0].score === 2 ? this.tipText = '您上传的课堂实录已通过,请勿重复上传' : ''
|
|
|
+ if (this.recordFile) {
|
|
|
+ this.showReview = true
|
|
|
+ let routerData = this.calssListinfo[0]
|
|
|
+ let data = {
|
|
|
+ name: this.$store.state.userInfo.name,
|
|
|
+ videoName: routerData.name,
|
|
|
+ school: this.$store.state.userInfo.schoolCode,
|
|
|
+ video: {
|
|
|
+ id: routerData.id,
|
|
|
+ name: routerData.name,
|
|
|
+ url: routerData.url
|
|
|
},
|
|
|
- error => {
|
|
|
-
|
|
|
+ teacher: {
|
|
|
+ id: this.$store.state.userInfo.TEAMModelId,
|
|
|
+ name: this.$store.state.userInfo.name
|
|
|
}
|
|
|
- )
|
|
|
- },
|
|
|
- //处理时间戳
|
|
|
- formatDate(date) {
|
|
|
- var date = new Date(date);
|
|
|
- var YY = date.getFullYear() + '-';
|
|
|
- var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
|
|
- var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
|
|
- var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
|
|
- var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
|
|
- var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
|
|
- return YY + MM + DD + " " + hh + mm + ss;
|
|
|
- },
|
|
|
- //处理文件大小
|
|
|
- formatSize(bytes) {
|
|
|
- return bytes / 1024 < 1024 ? (bytes / 1024).toFixed(1) + 'KB' : bytes / 1024 / 1024 < 1024 ? (bytes / 1024 / 1024).toFixed(1) + 'M' : (bytes / 1024 / 1024 / 1024).toFixed(1) + 'G'
|
|
|
+ }
|
|
|
+ this.propsData = data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //同组课程查看评价
|
|
|
+ checkevaluate(data, isSelf) {
|
|
|
+ console.log(data)
|
|
|
+ // this.showStatus=true
|
|
|
+ // this.courseName=index.name.substring(0,index.name.lastIndexOf("."));
|
|
|
+ if (isSelf) {
|
|
|
+ this.showReview = true
|
|
|
+ let routerData = data
|
|
|
+ this.propsData = {
|
|
|
+ name: this.$store.state.userInfo.name,
|
|
|
+ videoName: routerData.name,
|
|
|
+ school: this.$store.state.userInfo.schoolCode,
|
|
|
+ video: {
|
|
|
+ id: routerData.id,
|
|
|
+ name: routerData.name,
|
|
|
+ url: routerData.url
|
|
|
+ },
|
|
|
+ teacher: {
|
|
|
+ id: this.$store.state.userInfo.TEAMModelId,
|
|
|
+ name: this.$store.state.userInfo.name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'video',
|
|
|
+ params: {
|
|
|
+ data: data,
|
|
|
+ isSelf: isSelf
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.$EventBus.$emit('goVideoAppraise', data)
|
|
|
+ },
|
|
|
+ //同组课堂实录
|
|
|
+ getteamvideo() {
|
|
|
+ this.$api.jyzx.getTeamclass(
|
|
|
+ {
|
|
|
+ "tmdid": this.$store.state.userInfo.TEAMModelId,
|
|
|
+ "school": this.$store.state.userInfo.schoolCode
|
|
|
+ }
|
|
|
+ ).then(
|
|
|
+ res => {
|
|
|
+ console.log(res, '同组数据')
|
|
|
+ if (res.groupMembers) {
|
|
|
+ res.groupMembers.forEach((i) => {
|
|
|
+ i.vtime = this.formatDate(i.vtime)
|
|
|
+ i.vsize = this.formatSize(i.vsize)
|
|
|
+ })
|
|
|
+ this.teamVideo = res.groupMembers
|
|
|
+ } else {
|
|
|
+ this.$Message.info(this.$t("jyzx.classRecord.message6"))
|
|
|
+ }
|
|
|
},
|
|
|
- ss(ss) {
|
|
|
- console.log(ss)
|
|
|
+ error => {
|
|
|
+
|
|
|
}
|
|
|
+ )
|
|
|
+ },
|
|
|
+ //处理时间戳
|
|
|
+ formatDate(date) {
|
|
|
+ var date = new Date(date);
|
|
|
+ var YY = date.getFullYear() + '-';
|
|
|
+ var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
|
|
+ var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
|
|
+ var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
|
|
+ var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
|
|
+ var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
|
|
+ return YY + MM + DD + " " + hh + mm + ss;
|
|
|
},
|
|
|
+ //处理文件大小
|
|
|
+ formatSize(bytes) {
|
|
|
+ return bytes / 1024 < 1024 ? (bytes / 1024).toFixed(1) + 'KB' : bytes / 1024 / 1024 < 1024 ? (bytes / 1024 / 1024).toFixed(1) + 'M' : (bytes / 1024 / 1024 / 1024).toFixed(1) + 'G'
|
|
|
+ },
|
|
|
+ ss(ss) {
|
|
|
+ console.log(ss)
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
.class-memoir {
|
|
|
- padding:1%;
|
|
|
- // background-color: #f7f7f7;
|
|
|
- .ivu-card {
|
|
|
- height: 100%;
|
|
|
- margin: 20px;
|
|
|
- border: none;
|
|
|
- box-shadow: none;
|
|
|
- }
|
|
|
-
|
|
|
- .ivu-tabs-nav .ivu-tabs-tab,
|
|
|
- .ivu-tabs-nav .ivu-tabs-tab:hover{
|
|
|
- color: var(--second-text-color);
|
|
|
+ padding: 1%;
|
|
|
+ // background-color: #f7f7f7;
|
|
|
+ .ivu-card {
|
|
|
+ height: 100%;
|
|
|
+ margin: 20px;
|
|
|
+ border: none;
|
|
|
+ box-shadow: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ivu-tabs-tabpane {
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .video-tips {
|
|
|
+ color: rgb(75, 75, 70);
|
|
|
+ margin: 10px 0 30px 0;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ color: orangered;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
|
|
|
- .ivu-tabs-nav .ivu-tabs-tab-active{
|
|
|
- border-color: var(--tabs-bottom-color);
|
|
|
- color: var(--tabs-text-color);
|
|
|
- font-weight: bold;
|
|
|
+ .check-text {
|
|
|
+ text-decoration: underline;
|
|
|
+ color: rgb(47, 149, 233);
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ .ivu-tabs-nav .ivu-tabs-tab,
|
|
|
+ .ivu-tabs-nav .ivu-tabs-tab:hover {
|
|
|
+ color: var(--second-text-color);
|
|
|
+ }
|
|
|
+
|
|
|
+ .ivu-tabs-nav .ivu-tabs-tab-active {
|
|
|
+ border-color: var(--tabs-bottom-color);
|
|
|
+ color: var(--tabs-text-color);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
.teachnames {
|
|
|
- font-size: 26px;
|
|
|
- margin-left:10px;
|
|
|
+ font-size: 26px;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
.coursename {
|
|
|
- font-size:26px;
|
|
|
+ font-size: 26px;
|
|
|
}
|
|
|
-.backward:hover{
|
|
|
- cursor:pointer
|
|
|
+.backward:hover {
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
/* .appraise {
|
|
|
width:100%;
|
|
@@ -425,24 +540,25 @@ export default {
|
|
|
border:1px solid #ccc;
|
|
|
}*/
|
|
|
.short span {
|
|
|
- color: red;
|
|
|
+ color: red;
|
|
|
}
|
|
|
-.qualified span{
|
|
|
- color:orangered
|
|
|
+.qualified span {
|
|
|
+ color: orangered;
|
|
|
}
|
|
|
-.excellent span{
|
|
|
- color:rgb(0, 119, 0)
|
|
|
+.excellent span {
|
|
|
+ color: rgb(0, 119, 0);
|
|
|
+}
|
|
|
+.hint {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ color: #ffa530;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+.uploaddiv {
|
|
|
+ width: 96%;
|
|
|
+ min-height: 42vh;
|
|
|
+ margin: 0 auto;
|
|
|
}
|
|
|
- .hint {
|
|
|
- width: 100%;
|
|
|
- text-align: center;
|
|
|
- color: #FF3030;
|
|
|
- font-size:12px;
|
|
|
- padding:5px;
|
|
|
- }
|
|
|
- .uploaddiv {
|
|
|
- width: 96%;
|
|
|
- min-height: 42vh;
|
|
|
- margin: 0 auto;
|
|
|
- }
|
|
|
</style>
|