|
@@ -29,7 +29,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column :label="role == 'teachers'? '编辑':'写作'" width="60">
|
|
|
|
|
|
|
+ <el-table-column :label="role == 'teachers'? '编辑':'开始'" width="60">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button @mouseover="handleMouse('over', scope.row.teacherId, scope.row.endDate)" @mouseleave="handleMouse('leave', scope.row.teacherId, scope.row.endDate)"
|
|
<el-button @mouseover="handleMouse('over', scope.row.teacherId, scope.row.endDate)" @mouseleave="handleMouse('leave', scope.row.teacherId, scope.row.endDate)"
|
|
|
color="#597d3b" circle @click="handleFunctionButton(scope.row.assignmentId)" :disabled="props.disabled || isDisabled(scope.row.teacherId, scope.row.endDate)">
|
|
color="#597d3b" circle @click="handleFunctionButton(scope.row.assignmentId)" :disabled="props.disabled || isDisabled(scope.row.teacherId, scope.row.endDate)">
|
|
@@ -55,13 +55,20 @@
|
|
|
<el-form-item label="作业描述">
|
|
<el-form-item label="作业描述">
|
|
|
<el-input v-model="newAssignmentInfo.description" placeholder="请输入描述"></el-input>
|
|
<el-input v-model="newAssignmentInfo.description" placeholder="请输入描述"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="作业类型">
|
|
|
|
|
+ <el-select v-model="newAssignmentInfo.type" placeholder="请选择作业类型" :disabled="dialogConfig.type === 'edit'">
|
|
|
|
|
+ <el-option label="写作" value="写作"></el-option>
|
|
|
|
|
+ <el-option label="听力" value="听力"></el-option>
|
|
|
|
|
+ <el-option label="口语" value="口语"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="开始时间">
|
|
<el-form-item label="开始时间">
|
|
|
<el-date-picker v-model="newAssignmentInfo.startTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
<el-date-picker v-model="newAssignmentInfo.startTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="截止时间">
|
|
<el-form-item label="截止时间">
|
|
|
<el-date-picker v-model="newAssignmentInfo.endTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
<el-date-picker v-model="newAssignmentInfo.endTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="描述文件" v-if="dialogConfig.type == 'edit'">
|
|
|
|
|
|
|
+ <el-form-item label="描述文件" v-if="newAssignmentInfo.type=='写作'">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
ref="uploadDescribeRef"
|
|
ref="uploadDescribeRef"
|
|
|
action= "/api/file"
|
|
action= "/api/file"
|
|
@@ -83,7 +90,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="附件" v-if="dialogConfig.type == 'edit'">
|
|
|
|
|
|
|
+ <el-form-item label="附件" v-if="newAssignmentInfo.type=='写作'">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
ref="uploadPictureRef"
|
|
ref="uploadPictureRef"
|
|
|
action= "/api/file"
|
|
action= "/api/file"
|
|
@@ -105,6 +112,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <AudioUpload
|
|
|
|
|
+ v-if="newAssignmentInfo.type=='听力'"
|
|
|
|
|
+ :newAssignmentInfo="newAssignmentInfo"
|
|
|
|
|
+ :dialog-config="dialogConfig"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
<!-- <el-form-item label="作业图片" v-if="dialogConfig.type == 'edit'">-->
|
|
<!-- <el-form-item label="作业图片" v-if="dialogConfig.type == 'edit'">-->
|
|
|
<!-- <el-upload-->
|
|
<!-- <el-upload-->
|
|
|
<!-- ref="uploadPictureRef"-->
|
|
<!-- ref="uploadPictureRef"-->
|
|
@@ -133,7 +146,7 @@
|
|
|
<!-- </el-upload>-->
|
|
<!-- </el-upload>-->
|
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-form-item>-->
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <template #footer>
|
|
|
|
|
|
|
+ <template #footer v-if="newAssignmentInfo.type=='写作'">
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="dialogConfig.visible = false; cleanNewAssignmentInfo()">取消</el-button>
|
|
<el-button @click="dialogConfig.visible = false; cleanNewAssignmentInfo()">取消</el-button>
|
|
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
|
@@ -158,6 +171,7 @@ import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
type UploadProps,
|
|
type UploadProps,
|
|
|
type UploadUserFile
|
|
type UploadUserFile
|
|
|
} from "element-plus";
|
|
} from "element-plus";
|
|
|
|
|
+ import AudioUpload from '@/components/AudioUpload.vue'; // 引入组件
|
|
|
import {useFormatDate} from "@/hooks/useFormatDate";
|
|
import {useFormatDate} from "@/hooks/useFormatDate";
|
|
|
import ViewsWordEditor from "@/components/ViewsWordEditor/ViewsWordEditor.vue";
|
|
import ViewsWordEditor from "@/components/ViewsWordEditor/ViewsWordEditor.vue";
|
|
|
import {useStore} from "@/store";
|
|
import {useStore} from "@/store";
|
|
@@ -187,6 +201,7 @@ import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
Object.assign(newAssignmentInfo, {
|
|
Object.assign(newAssignmentInfo, {
|
|
|
assignmentName: newAssignmentInfo.assignmentName,
|
|
assignmentName: newAssignmentInfo.assignmentName,
|
|
|
description: newAssignmentInfo.description,
|
|
description: newAssignmentInfo.description,
|
|
|
|
|
+ type:newAssignmentInfo.type,
|
|
|
descriptionFile: response.data,
|
|
descriptionFile: response.data,
|
|
|
attachments: newAssignmentInfo.attachments == null? ['']:newAssignmentInfo.attachments,
|
|
attachments: newAssignmentInfo.attachments == null? ['']:newAssignmentInfo.attachments,
|
|
|
startTime: newAssignmentInfo.startTime,
|
|
startTime: newAssignmentInfo.startTime,
|
|
@@ -331,6 +346,7 @@ const openEditor = (url: string, title: string) => {
|
|
|
let newAssignmentInfo = reactive<AssignmentDTO>({
|
|
let newAssignmentInfo = reactive<AssignmentDTO>({
|
|
|
assignmentName: '',
|
|
assignmentName: '',
|
|
|
description: '',
|
|
description: '',
|
|
|
|
|
+ type:'',
|
|
|
descriptionFile: '',
|
|
descriptionFile: '',
|
|
|
attachments: [''],
|
|
attachments: [''],
|
|
|
startTime: '',
|
|
startTime: '',
|
|
@@ -341,6 +357,7 @@ const openEditor = (url: string, title: string) => {
|
|
|
Object.assign(newAssignmentInfo, {
|
|
Object.assign(newAssignmentInfo, {
|
|
|
assignmentName: '',
|
|
assignmentName: '',
|
|
|
description: '',
|
|
description: '',
|
|
|
|
|
+ type:'',
|
|
|
descriptionFile: '',
|
|
descriptionFile: '',
|
|
|
attachments: [''],
|
|
attachments: [''],
|
|
|
startTime: '',
|
|
startTime: '',
|
|
@@ -352,6 +369,7 @@ const openEditor = (url: string, title: string) => {
|
|
|
Object.assign(newAssignmentInfo, {
|
|
Object.assign(newAssignmentInfo, {
|
|
|
assignmentName: assignment.assignmentName,
|
|
assignmentName: assignment.assignmentName,
|
|
|
description: assignment.description,
|
|
description: assignment.description,
|
|
|
|
|
+ type:assignment.type,
|
|
|
descriptionFile: assignment.descriptionFile,
|
|
descriptionFile: assignment.descriptionFile,
|
|
|
attachments: assignment.attachments == null? ['']:assignment.attachments,
|
|
attachments: assignment.attachments == null? ['']:assignment.attachments,
|
|
|
startTime: assignment.startTime,
|
|
startTime: assignment.startTime,
|