mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 19:06:48 +08:00
-- bug
This commit is contained in:
1
.env
1
.env
@@ -1,6 +1,7 @@
|
||||
VITE_BASE=/fe-student
|
||||
VITE_BASE_API=
|
||||
VITE_OUTPUT_DIR=./dist
|
||||
VITE_FILE_PATH=/upload/
|
||||
VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web/
|
||||
VITE_PROXY_URL=http://111.231.196.214/manageApi
|
||||
|
||||
|
||||
3
src/api/CONST.js
Normal file
3
src/api/CONST.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export const PROJECT = 1;
|
||||
export const ROUTER = 2;
|
||||
export const COURSE = 3;
|
||||
@@ -9,7 +9,7 @@
|
||||
export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||
export const USER_INFO = '/admin/CheckUser/userInfo'
|
||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/upload'
|
||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/uploadFile'
|
||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||
export const ROUTER_LIST = '/stu/router/list post'
|
||||
|
||||
@@ -346,12 +346,13 @@ function toSurvery() {
|
||||
router.push({
|
||||
path: "/surveydetail",
|
||||
query: {
|
||||
id:taskId,
|
||||
courseId: data.value.planDto.evaluateId,
|
||||
pName: "面授课",
|
||||
infoId: data.value.planDto.offcoursePlanId,
|
||||
chapterOrStageId: 0,
|
||||
sName: data.value.planDto.name,
|
||||
type: 3
|
||||
type
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
}}提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-else>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button disabled class="tijiao"
|
||||
@@ -158,7 +158,7 @@
|
||||
}}提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-else>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button disabled class="tijiao"
|
||||
@@ -197,10 +197,7 @@
|
||||
</div>
|
||||
<div class="content3">
|
||||
<div><span style="margin-left: 10px">
|
||||
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{
|
||||
value.workUploadAddress?.split(',')[0].split('/').at(-1) ||
|
||||
''
|
||||
}}</el-link>
|
||||
<el-link target="_blank" type="primary" :href="fielPath+value.workUploadAddress?.split(',')[0] || ''">{{value.workUploadAddress?.split(',')[0] }}</el-link>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,6 +278,7 @@ import { ElMessage } from "element-plus";
|
||||
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
||||
|
||||
const fileList = ref([]);
|
||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||
const uploadRef = ref();
|
||||
|
||||
const centerDialogVisible = ref(false);
|
||||
@@ -293,7 +291,7 @@ const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId: workId, type, id: taskId, pName, sName, projectStatus, projectEndTime},
|
||||
query: { courseId: workId, type, id: taskId, pName, sName, projectStatus, projectEndTime,infoId},
|
||||
} = useRoute();
|
||||
|
||||
const { data } = taskId && taskId !== 'undefined' ? useRequest(TASK_WORK_DETAIL, { workId, taskId }) : useRequest(TASK_WORK_DETAIL, { workId });
|
||||
@@ -315,18 +313,17 @@ const showFileList = computed(() => {
|
||||
const handleClick = () => {
|
||||
console.log(fileList.value, uploadRef.value)
|
||||
if (!sbValue.value.content) {
|
||||
if (fileList.value.length == 0) {
|
||||
if (fileList.value.length === 0) {
|
||||
return ElMessage.warning("请输入作业内容");
|
||||
}
|
||||
}
|
||||
|
||||
request(TASK_WORK_COMMIT, {
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: sbValue.value.content,
|
||||
workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
|
||||
workId,
|
||||
type,
|
||||
taskId,
|
||||
taskId:taskId || infoId,
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
submitList.value.unshift(res.data);
|
||||
|
||||
@@ -287,6 +287,7 @@ import {
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import store from "@/store";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {PROJECT} from "@/api/CONST";
|
||||
|
||||
const {
|
||||
query: { courseId, projectId },
|
||||
@@ -505,7 +506,7 @@ function toFinish(d, sName, chapterOrStageId) {
|
||||
d.status!==1 && request(STUDY_RECORD, {
|
||||
studentId: data.value.userInfoBo.userId,
|
||||
targetId: data.value.routerId,
|
||||
logo: 2,
|
||||
logo: PROJECT,
|
||||
stageOrChapterId: chapterOrStageId,
|
||||
taskId: d.projectTaskId,
|
||||
});
|
||||
@@ -521,7 +522,7 @@ function toFinish(d, sName, chapterOrStageId) {
|
||||
path: types.value.path[d.type],
|
||||
query: {
|
||||
id: d.projectTaskId,
|
||||
type: 2,
|
||||
type: PROJECT,
|
||||
infoId: data.value.projectId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
|
||||
@@ -282,6 +282,7 @@ import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import store from "@/store";
|
||||
import {ROUTER} from "@/api/CONST";
|
||||
|
||||
const {
|
||||
query: { routerId, routerName },
|
||||
@@ -445,7 +446,7 @@ function toFinish(d) {
|
||||
d.status!==1 && request(STUDY_RECORD, {
|
||||
studentId: userInfo.value.id,
|
||||
targetId: data.value.routerId,
|
||||
logo: 1,
|
||||
logo: ROUTER,
|
||||
stageOrChapterId: data.value.currentStageId,
|
||||
taskId: d.routerTaskId,
|
||||
});
|
||||
@@ -460,7 +461,7 @@ function toFinish(d) {
|
||||
path: types.value.path[d.type],
|
||||
query: {
|
||||
id: d.routerTaskId,
|
||||
type: 1,
|
||||
type: ROUTER,
|
||||
infoId: routerId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
|
||||
Reference in New Issue
Block a user