From 8b00387a90f94350b0a486c829aa9b0b582ffd76 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Wed, 26 Feb 2025 18:12:26 +0800 Subject: [PATCH 1/2] =?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/api/configGrowth.js | 4 +- src/api/growthpath.js | 2 +- src/components/growthpath/GrowthFaceStu.vue | 2 +- src/components/growthpath/StudentSeeStu.vue | 35 ++++++----- src/views/growthpath/GrowthAddPath.vue | 69 ++++++++------------- src/views/growthpath/GrowthPath.vue | 39 ++++-------- src/views/growthpath/PathManage.vue | 2 +- vue.config.js | 16 ++--- 8 files changed, 70 insertions(+), 99 deletions(-) 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/api/growthpath.js b/src/api/growthpath.js index 03849fdc..526ec549 100644 --- a/src/api/growthpath.js +++ b/src/api/growthpath.js @@ -102,7 +102,7 @@ export const batchSendMessage = (data) => http.post('/professional/urgeLearning/ // 删除手动添加的专业力必修 export const delGrowth = (growthId) => http.get('/professional/compulsory/delGrowth/' + growthId) -// 删除手动添加的专业力必修 + export const markComplete = (obj) => http.get('/professional/allocation/markComplete', { params: obj }) diff --git a/src/components/growthpath/GrowthFaceStu.vue b/src/components/growthpath/GrowthFaceStu.vue index 8eba751e..0f42737e 100644 --- a/src/components/growthpath/GrowthFaceStu.vue +++ b/src/components/growthpath/GrowthFaceStu.vue @@ -499,7 +499,7 @@ const columns = ref([
- + @@ -151,6 +152,7 @@ import { message } from "ant-design-vue"; import { TASK_TYPE } from "@/utils/constGrown"; import { checkGrowthPer } from "@/utils/utils"; import { checkMenu } from "@/utils/utils"; +import dialog from "@/utils/dialog"; export default { name: "SeeStu", components: {}, @@ -226,14 +228,13 @@ export default { 0: "未开始", }[completionStatus]), }, - // { - // title: "操作", - // dataIndex: "operation", - // key: "operation", - // width: 50, - // align: "center", - // slots: { customRender: "action" }, - // }, + { + title: "操作", + dataIndex: "operation", + key: "operation", + align: "center", + slots: { customRender: "action" }, + }, ]); const formData = ref(); const openDrawer = (row) => { @@ -258,9 +259,14 @@ export default { }; const setPermissions = (row) => { - markComplete({ id: row.id }).then((res) => { - getData(); - message.success("操作成功"); + dialog({ + content: "确定标记完成该课程吗?", + ok: async () => { + markComplete({ id: row.id }).then((res) => { + getData(); + message.success("操作成功"); + }); + }, }); }; return { @@ -271,6 +277,7 @@ export default { columns, getData, formData, + checkMenu, checkGrowthPer, }; }, diff --git a/src/views/growthpath/GrowthAddPath.vue b/src/views/growthpath/GrowthAddPath.vue index 15b23d36..95d98e5a 100644 --- a/src/views/growthpath/GrowthAddPath.vue +++ b/src/views/growthpath/GrowthAddPath.vue @@ -562,6 +562,7 @@ export default { key: "stdPositionName", align: "center", ellipsis: true, + width: 400, customRender: ({ record }) => { return record.stdPosition ? `${record.stdPositionName}(${record.stdPosition})` @@ -576,27 +577,26 @@ export default { ellipsis: true, }, { - title: "学习人数", - dataIndex: "learnNum", - key: "learnNum", + title: "完成人数/总人数", align: "center", ellipsis: true, - width: 150, + customRender: ({ record }) => { + return `${record.comLearnNum}/${record.learnNum}`; + }, }, { - title: "完成人数", - dataIndex: "comLearnNum", - key: "comLearnNum", + title: "必修|选修", align: "center", ellipsis: true, - width: 150, + customRender: ({ record }) => { + return `${record.requiredTaskNum}|${record.elePublishedNum}`; + }, }, { title: "完成比例", dataIndex: "ratio", key: "ratio", align: "center", - width: 150, ellipsis: true, customRender: ({ record }) => { return `${record.ratio * 100}%`; @@ -617,30 +617,13 @@ export default { dataIndex: "updateTime", key: "updateTime", align: "center", + width: 180, ellipsis: true, }, - - // { - // title: "归属人", - // dataIndex: "createName", - // key: "createName", - // width: 60, - // align: "center", - // ellipsis: true, - // }, - // { - // title: "数据来源", - // dataIndex: "dataSource", - // key: "dataSource", - // align: "center", - // ellipsis: true, - // customRender: ({ record }) => { - // return record.dataSource == 1 ? "AMED" : "手动添加"; - // }, - // }, { title: "操作", align: "right", + width: 200, slots: { customRender: "listData" }, }, ]); @@ -749,23 +732,21 @@ export default { band: state.band, }; if (state.editId) { - updatePostInfomation(params) - .then((res) => { - if (res.data.code == 200) { - message.success("保存成功"); - of_exit(); - listDatas(); - } - }) + updatePostInfomation(params).then((res) => { + if (res.data.code == 200) { + message.success("保存成功"); + of_exit(); + listDatas(); + } + }); } else { - saveGrowth(params) - .then((res) => { - if (res.data.code == 200) { - message.success("保存成功"); - of_exit(); - listDatas(); - } - }) + saveGrowth(params).then((res) => { + if (res.data.code == 200) { + message.success("保存成功"); + of_exit(); + listDatas(); + } + }); } }; const of_exit = () => { diff --git a/src/views/growthpath/GrowthPath.vue b/src/views/growthpath/GrowthPath.vue index 19f331a0..383482f5 100644 --- a/src/views/growthpath/GrowthPath.vue +++ b/src/views/growthpath/GrowthPath.vue @@ -550,6 +550,7 @@ export default { key: "stdPositionName", align: "center", ellipsis: true, + width: 400, customRender: ({ record }) => { return record.stdPosition ? `${record.stdPositionName}(${record.stdPosition})` @@ -564,27 +565,26 @@ export default { ellipsis: true, }, { - title: "学习人数", - dataIndex: "learnNum", - key: "learnNum", + title: "完成人数/总人数", align: "center", ellipsis: true, - width: 150, + customRender: ({ record }) => { + return `${record.comLearnNum}/${record.learnNum}`; + }, }, { - title: "完成人数", - dataIndex: "comLearnNum", - key: "comLearnNum", + title: "必修|选修", align: "center", ellipsis: true, - width: 150, + customRender: ({ record }) => { + return `${record.requiredTaskNum}|${record.elePublishedNum}`; + }, }, { title: "完成比例", dataIndex: "ratio", key: "ratio", align: "center", - width: 150, ellipsis: true, customRender: ({ record }) => { return `${record.ratio * 100}%`; @@ -605,30 +605,13 @@ export default { dataIndex: "updateTime", key: "updateTime", align: "center", + width: 180, ellipsis: true, }, - - // { - // title: "归属人", - // dataIndex: "createName", - // key: "createName", - // width: 60, - // align: "center", - // ellipsis: true, - // }, - // { - // title: "数据来源", - // dataIndex: "dataSource", - // key: "dataSource", - // align: "center", - // ellipsis: true, - // customRender: ({ record }) => { - // return record.dataSource == 1 ? "AMED" : "手动添加"; - // }, - // }, { title: "操作", align: "right", + width: 200, slots: { customRender: "listData" }, }, ]); diff --git a/src/views/growthpath/PathManage.vue b/src/views/growthpath/PathManage.vue index ab7e1f07..a0f1fd7f 100644 --- a/src/views/growthpath/PathManage.vue +++ b/src/views/growthpath/PathManage.vue @@ -852,7 +852,7 @@ export default { // 撤回 const resize = () => { dialog({ - content: "确定撤回?", + content: "确定撤回当前任务?", contentTwo: "撤回后学员进度保留,发布后可继续学习", ok: () => { state.spinning = true; diff --git a/vue.config.js b/vue.config.js index fb18ed6d..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.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, + "/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, //表示是否改变原域名 From 12b8e61a957c26976c2cf4f267a92c1e2286d01a Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Wed, 26 Feb 2025 18:15:25 +0800 Subject: [PATCH 2/2] =?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/components/growthpath/StudentSeeStu.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/growthpath/StudentSeeStu.vue b/src/components/growthpath/StudentSeeStu.vue index b617683b..caeda075 100644 --- a/src/components/growthpath/StudentSeeStu.vue +++ b/src/components/growthpath/StudentSeeStu.vue @@ -123,7 +123,8 @@ @@ -260,7 +261,7 @@ export default { const setPermissions = (row) => { dialog({ - content: "确定标记完成该课程吗?", + content: "确定标记完成该任务?", ok: async () => { markComplete({ id: row.id }).then((res) => { getData();