mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-14 05:16:47 +08:00
作业提交提示
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
</UploadImg>
|
||||
<div
|
||||
class="uploadDetail"
|
||||
:style="{ display: showFileList ? 'block' : 'none' }"
|
||||
:style="{ display: showFileList && fileList && fileList.length >0 ? 'block' : 'none' }"
|
||||
@mousemove="showFileList = 1"
|
||||
@mouseout="showFileList = 0"
|
||||
style="padding-top: 60px"
|
||||
@@ -150,12 +150,14 @@
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="submitList && submitList.length>0" style="display: flex; justify-content: center">
|
||||
<button class="tijiao" @click="handleClick">再次提交</button>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button class="tijiao" @click="handleClick">{{submitList && submitList.length>0?"再次":""}}提交</button>
|
||||
</div>
|
||||
<div v-else style="display: flex; justify-content: center">
|
||||
<button class="tijiao" @click="handleClick">提交</button>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button class="tijiao" @click="open">提交</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class=""></div>
|
||||
|
||||
@@ -255,6 +257,20 @@
|
||||
</div>
|
||||
<!-- 详细信息 -->
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true">
|
||||
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||
提交成功
|
||||
</span></div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button class="cancel" style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;" @click="centerDialogVisible = false">取消</el-button>
|
||||
<el-button class="back" style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;" type="primary" @click="returnclick">
|
||||
返回
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -271,10 +287,14 @@ import { useRouter } from "vue-router";
|
||||
import UploadImg from "@/components/img/UploadImg.vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import { useRoute } from "vue-router/dist/vue-router";
|
||||
import {ElMessage} from "element-plus";
|
||||
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
||||
|
||||
const fileList = ref([]);
|
||||
const uploadRef = ref();
|
||||
|
||||
const showFileList = ref(0);
|
||||
const centerDialogVisible =ref(false);
|
||||
const sbValue = ref({
|
||||
content: "",
|
||||
attach: "",
|
||||
@@ -288,14 +308,23 @@ const {
|
||||
} = useRoute();
|
||||
|
||||
const { data } = useRequest(TASK_WORK_DETAIL, { workId, taskId });
|
||||
console.log("data", data);
|
||||
|
||||
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
|
||||
workerId: workId,
|
||||
});
|
||||
|
||||
const handleClose=()=> {
|
||||
router.back();
|
||||
};
|
||||
const open=()=>{
|
||||
centerDialogVisible.value = true
|
||||
};
|
||||
const handleClick = () => {
|
||||
console.log(sbValue.value);
|
||||
console.log(fileList);
|
||||
if(!sbValue.value.content){
|
||||
|
||||
return ElMessage.warning("请输入作业内容");
|
||||
}
|
||||
request(TASK_WORK_COMMIT, {
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: sbValue.value.content,
|
||||
@@ -305,7 +334,7 @@ const handleClick = () => {
|
||||
taskId,
|
||||
}).then((res) => {
|
||||
submitList.value.unshift(res.data);
|
||||
message.des
|
||||
open();
|
||||
});
|
||||
sbValue.value.content = "";
|
||||
};
|
||||
@@ -875,5 +904,32 @@ function reUpload(i) {
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-dialog {
|
||||
color:black;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
.title{
|
||||
text-align: center;
|
||||
}
|
||||
.dialog-footer{
|
||||
.back{
|
||||
background: #387DF7;
|
||||
box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);
|
||||
border: 0px;
|
||||
padding: 8px 32px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.cancel{
|
||||
background: #387DF7;
|
||||
border: 0px;
|
||||
padding: 8px 32px;
|
||||
border: 1px solid #387DF7;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user