From c0e9f9e3b7bf19f81515073fb6d09d78a5d96f9c Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Mon, 24 Feb 2025 10:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 77 +++--- src/api/configGrowth.js | 4 +- .../growthpath/GrowthCommonAlert.vue | 211 +++++++++++++++ src/components/growthpath/GrowthFaceStu.vue | 12 +- src/components/growthpath/StudentSeeStu.vue | 16 +- src/utils/gowthDialog.js | 14 + src/views/growthpath/GrowthPath.vue | 33 ++- src/views/growthpath/PathManage.vue | 251 ++++++++++-------- vue.config.js | 16 +- 9 files changed, 457 insertions(+), 177 deletions(-) create mode 100644 src/components/growthpath/GrowthCommonAlert.vue create mode 100644 src/utils/gowthDialog.js diff --git a/src/App.vue b/src/App.vue index 05130012..b06ba671 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,30 +1,32 @@ \ No newline at end of file + 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/growthpath/GrowthCommonAlert.vue b/src/components/growthpath/GrowthCommonAlert.vue new file mode 100644 index 00000000..6bcacda0 --- /dev/null +++ b/src/components/growthpath/GrowthCommonAlert.vue @@ -0,0 +1,211 @@ + + + + diff --git a/src/components/growthpath/GrowthFaceStu.vue b/src/components/growthpath/GrowthFaceStu.vue index 0ad26c45..cafe6417 100644 --- a/src/components/growthpath/GrowthFaceStu.vue +++ b/src/components/growthpath/GrowthFaceStu.vue @@ -551,7 +551,7 @@ const batchSign = () => { ids: courseSelectRows.value?.map((t) => t.studentId), taskId: taskId.value, taskType: props.datasource.taskType, - type: 3, + type: 4, }) .then((res) => { message.success("签到成功"); @@ -626,11 +626,11 @@ function submitCall(flag) { // 导出数据 function exportTaskStu() { window.open( - `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2` + `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=4&pid=${offcoursePlanId.value}&thirdType=2` ); } -const exportAssessment = () => +const exportAssessment = () => { window.open( `${ process.env.VUE_APP_BASE_API @@ -640,13 +640,17 @@ const exportAssessment = () => data.value[coursePlanIndex.value].id }&taskType=11` ); +}; function afterVisibleChange(bool) { bool && fetchData(); } function resetStudentPage() { - tableRef.value.reset({ pid: data.value[coursePlanIndex.value]?.id, type: 3 }); + tableRef.value.reset({ + pid: data.value[coursePlanIndex.value]?.id, + type: 18, + }); } //二维码 diff --git a/src/components/growthpath/StudentSeeStu.vue b/src/components/growthpath/StudentSeeStu.vue index a07091df..824cdbf8 100644 --- a/src/components/growthpath/StudentSeeStu.vue +++ b/src/components/growthpath/StudentSeeStu.vue @@ -171,7 +171,6 @@ export default { title: "类型", dataIndex: "courseType", key: "courseType", - width: 120, align: "center", ellipsis: true, slots: { customRender: "courseType" }, @@ -189,19 +188,24 @@ export default { key: "taskType", align: "center", ellipsis: true, - width: 120, customRender: ({ record: { taskType } }) => ({ 1: "必修", 2: "选修", }[taskType]), }, + { + title: "学习进度", + dataIndex: "progress", + key: "progress", + align: "center", + ellipsis: true, + }, { title: "开始时间", dataIndex: "startTime", key: "startTime", align: "center", - width: 200, ellipsis: true, }, { @@ -209,14 +213,12 @@ export default { dataIndex: "finishTime", key: "finishTime", align: "center", - width: 200, }, { title: "任务状态", dataIndex: "completionStatus", key: "completionStatus", align: "center", - width: 120, customRender: ({ record: { completionStatus } }) => ({ 2: "进行中", @@ -233,10 +235,10 @@ export default { // slots: { customRender: "action" }, // }, ]); - const formData = ref() + const formData = ref(); const openDrawer = (row) => { state.seevisible = true; - formData.value = row + formData.value = row; getData(); }; const getData = () => { diff --git a/src/utils/gowthDialog.js b/src/utils/gowthDialog.js new file mode 100644 index 00000000..17063d18 --- /dev/null +++ b/src/utils/gowthDialog.js @@ -0,0 +1,14 @@ +import { createApp } from 'vue' +import CommonAlert from "@/components/growthpath/GrowthCommonAlert"; +import Antd from "ant-design-vue"; + +function mountContent (option = {}) { + const dom = document.createElement('div') + document.body.appendChild(dom) + const app = createApp(CommonAlert, { + dialogClose: () => { app.unmount(dom); document.body.removeChild(dom) }, + ...option + }) + app.use(Antd).mount(dom) +} +export default mountContent \ No newline at end of file diff --git a/src/views/growthpath/GrowthPath.vue b/src/views/growthpath/GrowthPath.vue index 1b25d799..8ebce3bc 100644 --- a/src/views/growthpath/GrowthPath.vue +++ b/src/views/growthpath/GrowthPath.vue @@ -16,7 +16,7 @@ allowClear > -
+
@@ -562,7 +562,13 @@ export default { align: "center", ellipsis: true, }, - + { + title: "学习人数", + dataIndex: "learnNum", + key: "learnNum", + align: "center", + ellipsis: true, + }, { title: "状态", dataIndex: "isPublished", @@ -573,6 +579,7 @@ export default { return record.isPublished ? "已发布" : "未发布"; }, }, + // { // title: "归属人", // dataIndex: "createName", @@ -581,16 +588,16 @@ export default { // align: "center", // ellipsis: true, // }, - { - title: "数据来源", - dataIndex: "dataSource", - key: "dataSource", - align: "center", - ellipsis: true, - customRender: ({ record }) => { - return record.dataSource == 1 ? "AMED" : "手动添加"; - }, - }, + // { + // title: "数据来源", + // dataIndex: "dataSource", + // key: "dataSource", + // align: "center", + // ellipsis: true, + // customRender: ({ record }) => { + // return record.dataSource == 1 ? "AMED" : "手动添加"; + // }, + // }, { title: "操作", align: "right", diff --git a/src/views/growthpath/PathManage.vue b/src/views/growthpath/PathManage.vue index 869325a0..6c5ae29f 100644 --- a/src/views/growthpath/PathManage.vue +++ b/src/views/growthpath/PathManage.vue @@ -119,6 +119,7 @@
总完成率
+
任务信息
@@ -137,64 +138,67 @@
- -
-
-
- 任务总完成率 - +
+
+
+ 任务总完成率 + -
-
- -
-
-
- 必修任务完成率 - -
-
- -
-
-
- 选修任务完成率 - -
-
- -
+
+
+
@@ -288,6 +292,7 @@ forceFallback="true" group="task" animation="500" + @change="draggableOnEnd" >