diff --git a/src/api/configGrowth.js b/src/api/configGrowth.js index 2f010b28..ab3fedbe 100644 --- a/src/api/configGrowth.js +++ b/src/api/configGrowth.js @@ -18,8 +18,8 @@ import { boeRequest } from "@/api/request"; // "application/x-www-form-urlencoded"; axios.defaults.withCredentials = true; const http = axios.create({ - baseURL: '/growth', - // baseURL: process.env.VUE_APP_BASE_API_GROWTH, + // baseURL: '/growth', + baseURL: process.env.VUE_APP_BASE_API_GROWTH, timeout: 1000 * 15, // headers: { "Content-Type": "multipart/form-data" }, headers: { "Content-Type": "application/json" }, diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index aa567b2b..b50be88c 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -1003,6 +1003,12 @@ export default { selectedKeys: "sub25", pagename: "专业力必修", }, + { + href: "/growthaddpath", + openKeys: "sub25", + selectedKeys: "sub25", + pagename: "专业力必修", + }, { href: "/leveladd", openKeys: "sub1", diff --git a/src/components/growthpath/ExportScore.vue b/src/components/growthpath/ExportScore.vue deleted file mode 100644 index 5b368789..00000000 --- a/src/components/growthpath/ExportScore.vue +++ /dev/null @@ -1,689 +0,0 @@ - - - - - diff --git a/src/components/growthpath/GrowthActive.vue b/src/components/growthpath/GrowthActive.vue index 24a65b8a..daa362bc 100644 --- a/src/components/growthpath/GrowthActive.vue +++ b/src/components/growthpath/GrowthActive.vue @@ -267,7 +267,7 @@ const rulesRef = ref({ }, ], }); -let validate = Form.useForm(formData.value.info, rulesRef).validate; +let validate = null; const durationText = computed(() => dateTime.value?.length ? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute") @@ -349,7 +349,7 @@ function openDrawer(row) { dayjs(row.info.activityStartTime, "YYYY-MM-DD HH:mm"), dayjs(row.info.activityEndTime, "YYYY-MM-DD HH:mm"), ]); - row && (validate = Form.useForm(formData.value.info, rulesRef).validate); + validate = Form.useForm(formData.value.info, rulesRef).validate; visible.value = true; } diff --git a/src/components/growthpath/GrowthActiveAttendance.vue b/src/components/growthpath/GrowthActiveAttendance.vue index e7d17197..ebff6934 100644 --- a/src/components/growthpath/GrowthActiveAttendance.vue +++ b/src/components/growthpath/GrowthActiveAttendance.vue @@ -794,11 +794,20 @@ export default { state.tableDataTotalLoading = true; state.currentPage = 1; state.name = null; - state.signStatus = undefined; + state.signStatus = ""; state.username = null; state.tableDataTotal = 0; getTableData(); } + function buildUrl(url, params) { + const searchParams = new URLSearchParams(); + Object.keys(params).forEach((key) => { + if(params[key]){ + searchParams.append(key, params[key]); + } + }); + return `${url}?${searchParams.toString()}`; + } // 导出数据 function exportTaskStu() { @@ -811,8 +820,21 @@ export default { ); console.log("props.datasource", props.datasource); window.open( - `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` - ); + buildUrl( + `${process.env.VUE_APP_BOE_API_URL}${ + process.env.VUE_APP_BASE_API_GROWTH || "" + }/professional/task/attendanceExport`, + { + username: state.username, + taskId: props.datasource.id, + taskType: props.datasource.taskType, + signStatus: state.signStatus, + } + ) + ); + // window.open( + // `${process.env.VUE_APP_BASE_API}/professional/task/attendanceExport?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + // ); // if (props.types == 2) { // window.open( // `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` diff --git a/src/components/growthpath/GrowthDiscuss.vue b/src/components/growthpath/GrowthDiscuss.vue index 645b90b0..91bb7f48 100644 --- a/src/components/growthpath/GrowthDiscuss.vue +++ b/src/components/growthpath/GrowthDiscuss.vue @@ -94,7 +94,7 @@ const props = defineProps({ growId: String, }); const visible = ref(false); -const formData = useResetRef({ +const formData = ref({ info: { discussName: "", discussExplain: "", @@ -118,12 +118,17 @@ const rulesRef = ref({ ], }); -let validate = Form.useForm(formData.value.info, rulesRef).validate +let validate = null; const closeDrawer = () => { visible.value = false; dateTime.value = []; - formData.reset(); - formData.value.info = {}; + formData.value = { + info: { + discussName: "", + discussExplain: "", + discussSettings: true, + }, + }; }; async function confirm() { @@ -161,7 +166,7 @@ function openDrawer(row) { row.info.discussSettings === "false" || row.info.discussSettings === false ? false : true); - row && (validate = Form.useForm(formData.value.info, rulesRef).validate); + validate = Form.useForm(formData.value.info, rulesRef).validate; visible.value = true; } diff --git a/src/components/growthpath/GrowthExamManage.vue b/src/components/growthpath/GrowthExamManage.vue deleted file mode 100644 index c61a522b..00000000 --- a/src/components/growthpath/GrowthExamManage.vue +++ /dev/null @@ -1,786 +0,0 @@ - - - - - - diff --git a/src/components/growthpath/GrowthExternalExamManage.vue b/src/components/growthpath/GrowthExternalExamManage.vue deleted file mode 100644 index 72ec7696..00000000 --- a/src/components/growthpath/GrowthExternalExamManage.vue +++ /dev/null @@ -1,791 +0,0 @@ - - - - - - diff --git a/src/components/growthpath/GrowthHomework.vue b/src/components/growthpath/GrowthHomework.vue index 3b8998a2..2e8cdd33 100644 --- a/src/components/growthpath/GrowthHomework.vue +++ b/src/components/growthpath/GrowthHomework.vue @@ -198,12 +198,13 @@ async function confirm() { } else { message.success("添加成功"); } + closeDrawer(); emit("refresh"); } else { message.error(res.msg); } }); - closeDrawer(); + } let validate = null; function openDrawer(row) { diff --git a/src/components/growthpath/GrowthHomeworkManage.vue b/src/components/growthpath/GrowthHomeworkManage.vue deleted file mode 100644 index 59f58445..00000000 --- a/src/components/growthpath/GrowthHomeworkManage.vue +++ /dev/null @@ -1,985 +0,0 @@ - - - - - diff --git a/src/components/growthpath/GrowthLive.vue b/src/components/growthpath/GrowthLive.vue index 10086a4d..373bbfef 100644 --- a/src/components/growthpath/GrowthLive.vue +++ b/src/components/growthpath/GrowthLive.vue @@ -356,7 +356,7 @@ const props = defineProps({ }); const visible = ref(false); const headers = { token: getCookieForName("token") }; -const formData = useResetRef({ +const formData = ref({ info: { liveName: "", liveLink: "", @@ -436,7 +436,7 @@ const rulesRef = ref({ }, ], }); -let validate = Form.useForm(formData.value.info, rulesRef).validate; +let validate = null; const { resetFields } = Form.useForm(formData.value.info, rulesRef); const durationText = computed(() => dateTime.value?.length @@ -451,8 +451,26 @@ const closeDrawer = () => { imageUrl.value = ""; visible.value = false; dateTime.value = []; - formData.reset(); - formData.value.info = {}; + formData.value = { + info: { + liveName: "", + liveLink: "", + liveStartTime: "", + liveEndTime: "", + liveNotice: "", + liveDuration: "", + liveTeacherId: "", + liveTeacherName: "", + liveCover: "", + beforeSignIn: "", + afterSignIn: "", + isEvaluate: false, + assessmentId: "", + assessmentName: "", + livePlayback: "", + liveExplain: "", + }, + }; resetFields(); } }; @@ -495,11 +513,11 @@ async function confirm() { } else { message.success("添加成功"); } + closeDrawer(); emit("refresh"); } else { message.error(res.msg); } - closeDrawer(); }); } @@ -507,7 +525,7 @@ function openDrawer(row) { row && (formData.value = row); row && (dateTime.value = [row.info.liveStartTime, row.info.liveEndTime]); row && (imageUrl.value = row.info.liveCover); - row && (validate = Form.useForm(formData.value.info, rulesRef).validate); + validate = Form.useForm(formData.value.info, rulesRef).validate; visible.value = true; } diff --git a/src/components/growthpath/GrowthOnlineManage.vue b/src/components/growthpath/GrowthOnlineManage.vue index fffdb292..dd2848d5 100644 --- a/src/components/growthpath/GrowthOnlineManage.vue +++ b/src/components/growthpath/GrowthOnlineManage.vue @@ -18,125 +18,129 @@ @click="closeDrawer" /> -
- - - - -
@@ -615,22 +613,7 @@ v-model:studentId="studentId" v-model:growId="growId" /> - - - - + - -
@@ -743,8 +720,6 @@ import StudentManage from "@/components/growthpath/StudentManage"; import { useRoute, useRouter } from "vue-router"; import { getCookieForName } from "@/api/method"; import seeStu from "@/components/growthpath/StudentSeeStu"; -import GrowthExternalExamManage from "@/components/growthpath/GrowthExternalExamManage"; -import GrowthExamManage from "@/components/growthpath/GrowthExamManage"; import GrowthOnlineManage from "@/components/growthpath/GrowthOnlineManage"; import CommonStudent from "@/components/student/CommonStudent"; import GrowthOpenCourse from "@/components/growthpath/GrowthOpenCourse.vue"; @@ -757,7 +732,6 @@ import TwoDimensionalCode from "@/components/TwoDimensionalCode.vue"; import GrowthFaceStu from "@/components/growthpath/GrowthFaceStu"; import { DownOutlined, CloseCircleOutlined } from "@ant-design/icons-vue"; import GrowthFaceTaskManage from "../../components/growthpath/GrowthFaceTaskManage"; -import GrowthHomeworkManage from "@/components/growthpath/GrowthHomeworkManage"; import { courseData } from "@/api/index1"; import { checkMenu } from "@/utils/utils"; import GrowthActiveAttendance from "@/components/growthpath/GrowthActiveAttendance"; @@ -782,12 +756,9 @@ export default { components: { StudentManage, seeStu, - GrowthExternalExamManage, - GrowthExamManage, GrowthOnlineManage, CommonStudent, TwoDimensionalCode, - GrowthHomeworkManage, Draggable, GrowthFaceTaskManage, GrowthOpenCourse, @@ -864,6 +835,11 @@ export default { query: { growId: state.routerId, pre: state.preId }, }); }; + + // 返回 + const goBack = () => { + router.go(-1); + }; // 列表拖动结束 const draggableOnEnd = () => { // 开启加载弹窗,getListTask请求完成后会关闭弹框 @@ -919,7 +895,6 @@ export default { type: 4, offcourseId: item.taskId, }; - state.spinning = true await courseData(planParams).then((res) => { qrCodeItems.value = res.data.data.map((dataItem) => ({ ...dataItem, @@ -944,7 +919,6 @@ export default { if (qrCodeItems.value.length == 0) { message.info("暂无签到二维码"); } - state.spinning = false }); }; function handleMenuClick({ key }) { @@ -975,7 +949,6 @@ export default { type: 4, offcourseId: item.taskId, }; - state.spinning = true await courseData(planParams).then((res) => { const qrCodeItemspgItem = res.data.data.map((dataItem) => ({ ...dataItem, @@ -1000,7 +973,6 @@ export default { if (qrCodeItemspg.value.length == 0) { message.info("暂无评估二维码"); } - state.spinning = false }); }; @@ -1470,6 +1442,7 @@ export default { qrcodeAssement, handleMenuClickpg, draggableOnEnd, + goBack, handleMenuClick, qrcodeVisible, handlerSuperiors, diff --git a/vue.config.js b/vue.config.js index 5345eb26..4dc6c0d4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -18,16 +18,16 @@ module.exports = defineConfig({ overlay: false,// 解决代码抛出异常 }, proxy: { - // "/professional": { - // target: 'http://192.168.38.211:32002', - // // target: 'http://192.168.50.195:32002', - // // target: 'http://192.168.86.195:32002', - // changeOrigin: true, - // }, - "/growth": { - target: 'https:' + process.env.VUE_APP_BOE_API_URL, + "/professional": { + target: 'http://192.168.31.211:32002', + // target: 'http://192.168.50.195:32002', + // target: 'http://192.168.86.195:32002', changeOrigin: true, }, + // "/growth": { + // target: 'https:' + process.env.VUE_APP_BOE_API_URL, + // changeOrigin: true, + // }, "/manageApi": { target: 'https:' + process.env.VUE_APP_PROXY_URL, changeOrigin: true, //表示是否改变原域名