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