mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-18 23:36:48 +08:00
feat:修改bug
This commit is contained in:
@@ -61,7 +61,9 @@
|
||||
<div class="itemtitle" :title="item.workUploadContent">
|
||||
{{ item.workUploadContent }}
|
||||
{{
|
||||
item.workUploadAddress ? "-" + item.workUploadAddress : ""
|
||||
item.workUploadAddress?.slice(
|
||||
item.workUploadAddress.lastIndexOf("/") + 1
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
<img
|
||||
@@ -106,6 +108,7 @@ import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import { useRoute } from "vue-router/dist/vue-router";
|
||||
import { ElMessage, ElLoading } from "element-plus";
|
||||
import ReturnHead from "@/components/ReturnHead.vue";
|
||||
import { toDate } from "@/api/method";
|
||||
const fileList = ref([]);
|
||||
// const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||
const uploadRef = ref();
|
||||
@@ -174,21 +177,17 @@ const state = reactive({
|
||||
});
|
||||
const { hour, minute, seconds } = toRefs(state);
|
||||
|
||||
let timer = setInterval(() => {
|
||||
// console.log("endTime", data.value.submitEndTime);
|
||||
var timer = setInterval(function () {
|
||||
if (data && data.value && data.value.submitEndTime) {
|
||||
let endTime = parseInt(new Date(data.value.submitEndTime).getTime() / 1000);
|
||||
let newEndTime = data.value.submitEndTime.replaceAll("-", "/");
|
||||
let endTime = parseInt(new Date(newEndTime).getTime() / 1000);
|
||||
let nowTime = parseInt(new Date().getTime() / 1000);
|
||||
console.log("endTime222", endTime, nowTime);
|
||||
console.log("endTime222", endTime, nowTime, newEndTime);
|
||||
if (endTime > nowTime) {
|
||||
state.hour = parseInt(
|
||||
dayjs(data.value.submitEndTime).diff(dayjs(), "minute") / 60
|
||||
);
|
||||
state.minute = parseInt(
|
||||
dayjs(data.value.submitEndTime).diff(dayjs(), "minute") % 60
|
||||
);
|
||||
state.hour = parseInt(dayjs(newEndTime).diff(dayjs(), "minute") / 60);
|
||||
state.minute = parseInt(dayjs(newEndTime).diff(dayjs(), "minute") % 60);
|
||||
state.seconds = parseInt(
|
||||
dayjs(data.value.submitEndTime).diff(dayjs(), "seconds") -
|
||||
dayjs(newEndTime).diff(dayjs(), "seconds") -
|
||||
(state.hour * 60 + state.minute) * 60
|
||||
);
|
||||
} else {
|
||||
@@ -199,6 +198,7 @@ let timer = setInterval(() => {
|
||||
|
||||
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
|
||||
workerId: workId,
|
||||
type,
|
||||
});
|
||||
console.log("submitList==----->", submitList);
|
||||
//交作业
|
||||
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
workUploadContent: textarea.value,
|
||||
workUploadAddress:
|
||||
fileList.value && fileList.value.length !== 0
|
||||
? fileList.value[0].name
|
||||
? fileList.value[0].url
|
||||
: "",
|
||||
workId,
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user