|
|
@@ -6,7 +6,7 @@
|
|
|
<template>
|
|
|
<el-card>
|
|
|
<template v-if="props.role == 'teachers'">
|
|
|
- <el-button color="#597d3b" @click="cleanNewAssignmentInfo(); changeDialog('add')" v-if="props.isShowNewHomework">新建作业</el-button>
|
|
|
+ <el-button color="#597d3b" @click="chooseAssignmentType()" v-if="props.isShowNewHomework">新建作业</el-button>
|
|
|
</template>
|
|
|
<template v-if="props.tableData.length > 0">
|
|
|
<el-table :data="props.tableData" stripe style="width: 100%" height="100%" show-overflow-tooltip>
|
|
|
@@ -32,7 +32,7 @@
|
|
|
<el-table-column :label="role == 'teachers'? '编辑':'开始'" width="60">
|
|
|
<template #default="scope">
|
|
|
<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,scope.row.type)" :disabled="props.disabled || isDisabled(scope.row.teacherId, scope.row.endDate)">
|
|
|
<el-icon :size="18">
|
|
|
<Edit />
|
|
|
</el-icon>
|
|
|
@@ -45,124 +45,41 @@
|
|
|
<div style="text-align: center;">暂无作业</div>
|
|
|
</template>
|
|
|
</el-card>
|
|
|
+
|
|
|
+ <writing-assignment-dialog
|
|
|
+ v-model:writingVisible="writingVisible"
|
|
|
+ :dialogConfig="dialogConfig"
|
|
|
+ :courseId="props.courseId"
|
|
|
+ />
|
|
|
+ <listening-assignment-dialog
|
|
|
+ v-model:listeningVisible="listeningVisible"
|
|
|
+ :dialogConfig="dialogConfig"
|
|
|
+ :courseId="props.courseId"
|
|
|
+ />
|
|
|
|
|
|
- <el-dialog v-model="dialogConfig.visible" :title="dialogConfig.title">
|
|
|
- <el-form :model="newAssignmentInfo" label-width="auto">
|
|
|
- <!-- <el-form-item label="课程图片">-->
|
|
|
- <el-form-item label="作业名称">
|
|
|
- <el-input v-model="newAssignmentInfo.assignmentName" placeholder="请输入名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="作业描述">
|
|
|
- <el-input v-model="newAssignmentInfo.description" placeholder="请输入描述"></el-input>
|
|
|
- </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-date-picker v-model="newAssignmentInfo.startTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="截止时间">
|
|
|
- <el-date-picker v-model="newAssignmentInfo.endTime" type="datetime" placeholder="截止时间" style="width: 180px"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="描述文件" v-if="newAssignmentInfo.type=='写作'">
|
|
|
- <el-upload
|
|
|
- ref="uploadDescribeRef"
|
|
|
- action= "/api/file"
|
|
|
- multiple
|
|
|
- v-model:file-list="describeFileList"
|
|
|
- :limit="1"
|
|
|
- :on-success="handleDescribeSuccess"
|
|
|
- :on-error="handleDescribeError"
|
|
|
- :on-exceed="handleDescribeExceed"
|
|
|
- :on-change="handleDescribeChange"
|
|
|
- accept=".doc, .docx"
|
|
|
- :auto-upload="false"
|
|
|
- >
|
|
|
- <el-button type="primary">点击上传</el-button>
|
|
|
- <template #tip>
|
|
|
- <div class="el-upload__tip">
|
|
|
- doc/docx 文件不大于 500kb
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="附件" v-if="newAssignmentInfo.type=='写作'">
|
|
|
- <el-upload
|
|
|
- ref="uploadPictureRef"
|
|
|
- action= "/api/file"
|
|
|
- multiple
|
|
|
- v-model:file-list="pictureFileList"
|
|
|
- :limit="1"
|
|
|
- :on-success="handlePictureSuccess"
|
|
|
- :on-error="handlePictureError"
|
|
|
- :on-exceed="handlePictureExceed"
|
|
|
- :on-change="handlePictureChange"
|
|
|
- accept=".doc, .docx"
|
|
|
- :auto-upload="false"
|
|
|
- >
|
|
|
- <el-button type="primary">点击上传</el-button>
|
|
|
- <template #tip>
|
|
|
- <div class="el-upload__tip">
|
|
|
- doc/docx 文件不大于 500kb
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <AudioUpload
|
|
|
- v-if="newAssignmentInfo.type=='听力'"
|
|
|
- :newAssignmentInfo="newAssignmentInfo"
|
|
|
- :dialog-config="dialogConfig"
|
|
|
- />
|
|
|
-
|
|
|
-<!-- <el-form-item label="作业图片" v-if="dialogConfig.type == 'edit'">-->
|
|
|
-<!-- <el-upload-->
|
|
|
-<!-- ref="uploadPictureRef"-->
|
|
|
-<!-- drag-->
|
|
|
-<!-- action= "http://127.0.0.1:8080/api/file"-->
|
|
|
-<!-- multiple-->
|
|
|
-<!-- v-model:file-list="pictureFileList"-->
|
|
|
-<!-- :limit="1"-->
|
|
|
-<!-- :on-success="handlePictureSuccess"-->
|
|
|
-<!-- :on-error="handlePictureError"-->
|
|
|
-<!-- :on-exceed="handlePictureExceed"-->
|
|
|
-<!-- :on-change="handlePictureChange"-->
|
|
|
-<!-- list-type="picture-card"-->
|
|
|
-<!-- accept=".png, .jpg"-->
|
|
|
-<!-- :auto-upload="false"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <el-icon class="el-icon--upload"><upload-filled /></el-icon>-->
|
|
|
-<!-- <div class="el-upload__text">-->
|
|
|
-<!-- 拖拽上传或<em>点击此处上传</em>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <template #tip>-->
|
|
|
-<!-- <div class="el-upload__tip">-->
|
|
|
-<!-- jpg/png 文件不大于 500kb-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-upload>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
- </el-form>
|
|
|
- <template #footer v-if="newAssignmentInfo.type=='写作'">
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="dialogConfig.visible = false; cleanNewAssignmentInfo()">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleSubmit">确定</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <!-- 作业类型选择弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ v-model="isTypeDialogVisible"
|
|
|
+ title="选择作业类型"
|
|
|
+ >
|
|
|
+ <el-radio-group v-model="assignmentType">
|
|
|
+ <el-radio label="写作">写作</el-radio>
|
|
|
+ <el-radio label="听力">听力</el-radio>
|
|
|
+ <el-radio label="口语">口语</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <div class="dialog-footer" style="margin-top:40px;margin-left:350px;">
|
|
|
+ <el-button @click="isTypeDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="createAssignmentDialog()">确定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
<ViewsWordEditor :alert="alertProps" :docxInfo="docxInfo"></ViewsWordEditor>
|
|
|
</template>
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
+import {defineProps, inject, onMounted, reactive, ref,watch} from 'vue';
|
|
|
import type {AssignmentVO, IAssignmentTableColumn, IAssignmentTableItem} from "@/types/vo";
|
|
|
import router from "@/router";
|
|
|
- import type {AssignmentDTO} from "@/types/dto";
|
|
|
- import useApis from "@/apis";
|
|
|
import {
|
|
|
ElMessage,
|
|
|
ElNotification,
|
|
|
@@ -171,12 +88,12 @@ import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
type UploadProps,
|
|
|
type UploadUserFile
|
|
|
} from "element-plus";
|
|
|
- import AudioUpload from '@/components/AudioUpload.vue'; // 引入组件
|
|
|
- import {useFormatDate} from "@/hooks/useFormatDate";
|
|
|
import ViewsWordEditor from "@/components/ViewsWordEditor/ViewsWordEditor.vue";
|
|
|
import {useStore} from "@/store";
|
|
|
import {Search, Edit, UploadFilled, Plus} from "@element-plus/icons-vue"
|
|
|
-
|
|
|
+ import ListeningAssignmentDialog from '@/components/AssignmentDialog/ListeningAssignmentDialog.vue';
|
|
|
+ import WritingAssignmentDialog from '@/components/AssignmentDialog/WritingAssignmentDialog.vue';
|
|
|
+
|
|
|
const props = defineProps<{
|
|
|
tableData: IAssignmentTableItem[],
|
|
|
columns: IAssignmentTableColumn[],
|
|
|
@@ -185,122 +102,49 @@ import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
isShowNewHomework: boolean,
|
|
|
disabled: boolean;
|
|
|
}>()
|
|
|
-
|
|
|
- const apis = useApis()
|
|
|
const store = useStore()
|
|
|
- const doRefresh:Function = inject("reload")
|
|
|
- const {formatDate} = useFormatDate()
|
|
|
- let uploadDescribeRef = ref()
|
|
|
- let uploadPictureRef = ref()
|
|
|
+ const writingVisible = ref(false)
|
|
|
+ const listeningVisible = ref(false)
|
|
|
+ const isTypeDialogVisible = ref(false);
|
|
|
+ let assignmentType = ref()
|
|
|
|
|
|
- // 用于编辑课程展示预览图片
|
|
|
- const describeFileList = ref<UploadUserFile[]>([])
|
|
|
- const pictureFileList = ref<UploadUserFile[]>([])
|
|
|
-
|
|
|
- const handleDescribeSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
|
- Object.assign(newAssignmentInfo, {
|
|
|
- assignmentName: newAssignmentInfo.assignmentName,
|
|
|
- description: newAssignmentInfo.description,
|
|
|
- type:newAssignmentInfo.type,
|
|
|
- descriptionFile: response.data,
|
|
|
- attachments: newAssignmentInfo.attachments == null? ['']:newAssignmentInfo.attachments,
|
|
|
- startTime: newAssignmentInfo.startTime,
|
|
|
- endTime: newAssignmentInfo.endTime
|
|
|
- })
|
|
|
- }
|
|
|
- const handlePictureSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
|
- newAssignmentInfo.attachments[0] = response.data
|
|
|
- }
|
|
|
-
|
|
|
- const handleDescribeError: UploadProps['onError'] = (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
|
- console.log(error, uploadFile, uploadFiles)
|
|
|
- }
|
|
|
- const handlePictureError: UploadProps['onError'] = (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
|
- console.log(error, uploadFile, uploadFiles)
|
|
|
- }
|
|
|
-
|
|
|
- const handleDescribeExceed = (files, fileList) => {
|
|
|
- // console.log(files)
|
|
|
- uploadDescribeRef.value.clearFiles() //清空上传文件(限制一个,所以直接清空即可)
|
|
|
- const file = files[0]
|
|
|
- uploadDescribeRef.value.handleStart(file) //重新上传
|
|
|
- }
|
|
|
- const handlePictureExceed = (files, fileList) => {
|
|
|
- // console.log(files)
|
|
|
- uploadPictureRef.value.clearFiles() //清空上传文件(限制一个,所以直接清空即可)
|
|
|
- const file = files[0]
|
|
|
- uploadPictureRef.value.handleStart(file) //重新上传
|
|
|
+ const chooseAssignmentType = ()=>{
|
|
|
+ isTypeDialogVisible.value = true;
|
|
|
}
|
|
|
|
|
|
- //选择文件
|
|
|
- const handleDescribeChange = (file,fileList) => {
|
|
|
- // console.log(file)
|
|
|
- const fileImgType = file.name.match(/\.([^\.]+)$/)[1]; //匹配文件格式(最后一个'.'后的格式)或者匹配file.raw.type
|
|
|
- const isImageType = ['doc','docx'];
|
|
|
- const isLt500KB = file.size / 1024 < 500; //判断图片格式与大小
|
|
|
- if (isImageType.indexOf(fileImgType)==-1) {
|
|
|
- ElMessage.error('文件仅支持png、jpg格式') //限制文件类型
|
|
|
- uploadDescribeRef.value.clearFiles() //清空上传文件
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (!isLt500KB) {
|
|
|
- ElMessage.error('文件不能超过500kb!') //限制文件大小
|
|
|
- uploadDescribeRef.value.clearFiles() //清空上传文件
|
|
|
- return false;
|
|
|
- }
|
|
|
- apis.uploadFile(file.raw)
|
|
|
- .then((res) => {
|
|
|
- newAssignmentInfo.descriptionFile = res.data.data
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
- }
|
|
|
- const handlePictureChange = (file,fileList) => {
|
|
|
- // console.log(file)
|
|
|
- const fileImgType = file.name.match(/\.([^\.]+)$/)[1]; //匹配文件格式(最后一个'.'后的格式)或者匹配file.raw.type
|
|
|
- // const isImageType = ['png','jpg'];
|
|
|
- const isImageType = ['doc','docx'];
|
|
|
- const isLt500KB = file.size / 1024 < 500; //判断图片格式与大小
|
|
|
- if (isImageType.indexOf(fileImgType)==-1) {
|
|
|
- ElMessage.error('文件仅支持png、jpg格式') //限制文件类型
|
|
|
- uploadDescribeRef.value.clearFiles() //清空上传文件
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (!isLt500KB) {
|
|
|
- ElMessage.error('文件不能超过500kb!') //限制文件大小
|
|
|
- uploadDescribeRef.value.clearFiles() //清空上传文件
|
|
|
- return false;
|
|
|
+ const createAssignmentDialog = ()=>{
|
|
|
+ isTypeDialogVisible.value = false;
|
|
|
+ if(assignmentType.value != ''){
|
|
|
+ changeDialog('add', 0, assignmentType.value)
|
|
|
+ if(assignmentType.value === '写作'){
|
|
|
+ writingVisible.value = true;
|
|
|
+ } else if(assignmentType.value ==='听力'){
|
|
|
+ listeningVisible.value = true;
|
|
|
+ }
|
|
|
}
|
|
|
- apis.uploadFile(file.raw)
|
|
|
- .then((res) => {
|
|
|
- newAssignmentInfo.attachments[0] = res.data.data
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
}
|
|
|
+
|
|
|
|
|
|
const dialogConfig = reactive({
|
|
|
type: "",
|
|
|
- visible: false,
|
|
|
title: "",
|
|
|
- disable: false
|
|
|
+ disable: false,
|
|
|
+ assignmentId: 0,
|
|
|
})
|
|
|
-
|
|
|
- const changeDialog = (type:string)=>{
|
|
|
- dialogConfig.visible=true;
|
|
|
+ const changeDialog = (type:string, assignmentId: number, assignmentType: string)=>{
|
|
|
switch (type){
|
|
|
case "add": {
|
|
|
dialogConfig.type="add";
|
|
|
+ dialogConfig.title=`新增${assignmentType}作业`;
|
|
|
dialogConfig.disable=false;
|
|
|
- dialogConfig.title="新增作业";
|
|
|
+ dialogConfig.assignmentId = assignmentId;
|
|
|
break;
|
|
|
}
|
|
|
case "edit": {
|
|
|
dialogConfig.type="edit";
|
|
|
+ dialogConfig.title=`编辑${assignmentType}作业`;
|
|
|
dialogConfig.disable=false;
|
|
|
- dialogConfig.title="编辑作业";
|
|
|
+ dialogConfig.assignmentId = assignmentId;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -320,6 +164,7 @@ import {defineProps, inject, onMounted, reactive, ref} from 'vue';
|
|
|
});
|
|
|
|
|
|
const openEditor = (url: string, title: string) => {
|
|
|
+
|
|
|
open.value = true;
|
|
|
Object.assign(alertProps, {
|
|
|
open: open.value,
|
|
|
@@ -343,41 +188,6 @@ const openEditor = (url: string, title: string) => {
|
|
|
})
|
|
|
};
|
|
|
|
|
|
- let newAssignmentInfo = reactive<AssignmentDTO>({
|
|
|
- assignmentName: '',
|
|
|
- description: '',
|
|
|
- type:'',
|
|
|
- descriptionFile: '',
|
|
|
- attachments: [''],
|
|
|
- startTime: '',
|
|
|
- endTime: ''
|
|
|
- })
|
|
|
-
|
|
|
- const cleanNewAssignmentInfo = () => {
|
|
|
- Object.assign(newAssignmentInfo, {
|
|
|
- assignmentName: '',
|
|
|
- description: '',
|
|
|
- type:'',
|
|
|
- descriptionFile: '',
|
|
|
- attachments: [''],
|
|
|
- startTime: '',
|
|
|
- endTime: ''
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- const setNewAssignmentInfo = (assignment: AssignmentVO) => {
|
|
|
- Object.assign(newAssignmentInfo, {
|
|
|
- assignmentName: assignment.assignmentName,
|
|
|
- description: assignment.description,
|
|
|
- type:assignment.type,
|
|
|
- descriptionFile: assignment.descriptionFile,
|
|
|
- attachments: assignment.attachments == null? ['']:assignment.attachments,
|
|
|
- startTime: assignment.startTime,
|
|
|
- endTime: assignment.endTime
|
|
|
- })
|
|
|
- // console.log("获取作业信息", newAssignmentInfo)
|
|
|
- }
|
|
|
-
|
|
|
/*
|
|
|
鼠标聚焦于功能按钮(写作or编辑)时,显示提示信息
|
|
|
*/
|
|
|
@@ -389,16 +199,8 @@ const openEditor = (url: string, title: string) => {
|
|
|
if(props.disabled || isDisabled(teacherId, endDate)){
|
|
|
if(props.role == 'student'){
|
|
|
ElMessage.error('作业已经超过截止时间')
|
|
|
- // ElMessage({
|
|
|
- // message: '作业已经超过截止时间',
|
|
|
- // type: 'message',
|
|
|
- // })
|
|
|
}else if(props.role == 'teachers'){
|
|
|
ElMessage.error('无权限')
|
|
|
- // ElMessage({
|
|
|
- // message: '无权限',
|
|
|
- // type: 'message',
|
|
|
- // })
|
|
|
}
|
|
|
}
|
|
|
} else if(hover && type == 'leave'){
|
|
|
@@ -407,18 +209,16 @@ const openEditor = (url: string, title: string) => {
|
|
|
}
|
|
|
|
|
|
// 用于记录当前编辑的作业的id
|
|
|
- let IAssignmentId = ref(0)
|
|
|
- const handleFunctionButton = (assignmentId:number) => {
|
|
|
+ const handleFunctionButton = (assignmentId:number, type: string) => {
|
|
|
if(props.role == 'student'){
|
|
|
handleWriting(assignmentId)
|
|
|
} else if(props.role == 'teachers'){
|
|
|
- apis.getAssignmentById(assignmentId)
|
|
|
- .then((res:any) => {
|
|
|
- setNewAssignmentInfo(res.data.data)
|
|
|
- // console.log("功能按钮方法内部",newAssignmentInfo)
|
|
|
- IAssignmentId.value = res.data.data.assignmentId
|
|
|
- })
|
|
|
- changeDialog('edit')
|
|
|
+ changeDialog('edit', assignmentId, type)
|
|
|
+ if(type === '写作'){
|
|
|
+ writingVisible.value = true;
|
|
|
+ } else if(type === '听力'){
|
|
|
+ listeningVisible.value = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -428,60 +228,6 @@ const openEditor = (url: string, title: string) => {
|
|
|
}
|
|
|
|
|
|
|
|
|
- const handleSubmit = async () => {
|
|
|
- // console.log("提交方法最开始",newAssignmentInfo)
|
|
|
- newAssignmentInfo.endTime = formatDate(newAssignmentInfo.endTime);
|
|
|
- newAssignmentInfo.startTime = formatDate(newAssignmentInfo.startTime);
|
|
|
- // console.log("提交方法,请求前",newAssignmentInfo)
|
|
|
- if(dialogConfig.type === 'add'){
|
|
|
- apis.createAssignment(props.courseId, newAssignmentInfo)
|
|
|
- .then((res) => {
|
|
|
- console.log("新增作业请求内部",newAssignmentInfo)
|
|
|
- if(res.data.code===200) {
|
|
|
- ElNotification({
|
|
|
- title: '新增成功',
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
- }else {
|
|
|
- ElNotification({
|
|
|
- title: '新增失败',
|
|
|
- type: 'error',
|
|
|
- })
|
|
|
- }
|
|
|
- dialogConfig.visible = false
|
|
|
- // cleanNewAssignmentInfo()
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
- } else if(dialogConfig.type === 'edit'){
|
|
|
- // console.log("编辑作业请求前一刻",newAssignmentInfo)
|
|
|
- apis.updateAssignment(IAssignmentId.value, newAssignmentInfo)
|
|
|
- .then((res:any) => {
|
|
|
- // console.log("编辑作业请求内部",newAssignmentInfo)
|
|
|
- if(res.data.code===200) {
|
|
|
- ElNotification({
|
|
|
- title: '修改成功',
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
- // console.log("编辑作业请求内部22",newAssignmentInfo)
|
|
|
- // setTimeout(() => apis.updateAssignment(IAssignmentId.value, newAssignmentInfo), 300)
|
|
|
- // console.log("编辑作业请求内部33",newAssignmentInfo)
|
|
|
- }else {
|
|
|
- ElNotification({
|
|
|
- title: '修改失败',
|
|
|
- type: 'error',
|
|
|
- })
|
|
|
- }
|
|
|
- dialogConfig.visible = false
|
|
|
- // cleanNewAssignmentInfo()
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
- }
|
|
|
- doRefresh();
|
|
|
- }
|
|
|
|
|
|
const isDisabled = (teacherId: string, endDate: string) => {
|
|
|
if(props.role == 'teachers'){// 是教师且不是作业发布人则禁用
|