mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-09 19:06:47 +08:00
@@ -185,7 +185,7 @@ const postAdd = () => {
|
|||||||
status: 0,
|
status: 0,
|
||||||
title: titleName.value,
|
title: titleName.value,
|
||||||
userAvatar: userInfo.value.avatar,
|
userAvatar: userInfo.value.avatar,
|
||||||
userId: userInfo.value.id,
|
userId: userInfo.value.userId,
|
||||||
userJobName: userInfo.value.jobName,
|
userJobName: userInfo.value.jobName,
|
||||||
userName: userInfo.value.realName,
|
userName: userInfo.value.realName,
|
||||||
userOrgName: userInfo.value.orgName,
|
userOrgName: userInfo.value.orgName,
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ import { toDate } from "@/api/method";
|
|||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
// const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
// const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const uploadRef = ref();
|
const uploadRef = ref();
|
||||||
|
const nowPageTime = toDate(new Date().getTime() / 1000, "Y-M-D h:m:s")
|
||||||
const centerDialogVisible = ref(false);
|
const centerDialogVisible = ref(false);
|
||||||
const sbValue = ref({
|
const sbValue = ref({
|
||||||
content: "",
|
content: "",
|
||||||
@@ -226,7 +226,7 @@ const dohomework = () => {
|
|||||||
console.log("workId", workId, type, taskId);
|
console.log("workId", workId, type, taskId);
|
||||||
router.push({
|
router.push({
|
||||||
path: "/uploadwork",
|
path: "/uploadwork",
|
||||||
query: { type: type, workId: workId, taskId: taskId },
|
query: { type: type, workId: workId, taskId: taskId,nowPageTime:nowPageTime },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// const open = () => {
|
// const open = () => {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref,computed } from "vue";
|
||||||
import ReturnHead from "@/components/ReturnHead.vue";
|
import ReturnHead from "@/components/ReturnHead.vue";
|
||||||
import { request, useRequest } from "@/api/request";
|
import { request, useRequest } from "@/api/request";
|
||||||
import { TASK_WORK_COMMIT } from "@/api/api";
|
import { TASK_WORK_COMMIT } from "@/api/api";
|
||||||
@@ -115,6 +115,7 @@ import { useRoute } from "vue-router/dist/vue-router";
|
|||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { ElMessage, ElLoading } from "element-plus";
|
import { ElMessage, ElLoading } from "element-plus";
|
||||||
import UploadImg from "@/components/img/UploadImg.vue";
|
import UploadImg from "@/components/img/UploadImg.vue";
|
||||||
|
import store from "@/store";
|
||||||
export default {
|
export default {
|
||||||
name: "UploadWork",
|
name: "UploadWork",
|
||||||
components: {
|
components: {
|
||||||
@@ -128,7 +129,7 @@ export default {
|
|||||||
screenHeight: document.body.clientHeight, // 屏幕高度
|
screenHeight: document.body.clientHeight, // 屏幕高度
|
||||||
});
|
});
|
||||||
const {
|
const {
|
||||||
query: { workId, type, taskId, infoId },
|
query: { workId, type, taskId, infoId, nowPageTime },
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const textarea = ref("");
|
const textarea = ref("");
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
@@ -144,6 +145,7 @@ export default {
|
|||||||
const closeLoading = () => {
|
const closeLoading = () => {
|
||||||
loading.value.close();
|
loading.value.close();
|
||||||
};
|
};
|
||||||
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
//发布作业
|
//发布作业
|
||||||
const publishWork = () => {
|
const publishWork = () => {
|
||||||
console.log("点击了发布", workId, type, taskId, fileList);
|
console.log("点击了发布", workId, type, taskId, fileList);
|
||||||
@@ -162,7 +164,10 @@ export default {
|
|||||||
workId,
|
workId,
|
||||||
type,
|
type,
|
||||||
taskId: taskId || infoId,
|
taskId: taskId || infoId,
|
||||||
workScore: -1
|
workScore: -1,
|
||||||
|
submitStartTime:nowPageTime,
|
||||||
|
userId: userInfo.value.userId,
|
||||||
|
realName: userInfo.value.realName,
|
||||||
};
|
};
|
||||||
console.log("obj", obj, fileList.value);
|
console.log("obj", obj, fileList.value);
|
||||||
request(TASK_WORK_COMMIT, obj).then((res) => {
|
request(TASK_WORK_COMMIT, obj).then((res) => {
|
||||||
@@ -193,6 +198,7 @@ export default {
|
|||||||
fileList,
|
fileList,
|
||||||
deleteAll,
|
deleteAll,
|
||||||
deleteFile,
|
deleteFile,
|
||||||
|
userInfo,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user