From f3bb3527feafc35449d2dca83eacdd1bf2ec0210 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Wed, 26 Feb 2025 10:35:02 +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/api/configGrowth.js | 4 +- src/components/growthpath/GrowthFaceStu.vue | 43 +++++++-------- .../growthpath/GrowthOnlineManage.vue | 52 +++++++++++-------- 3 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/api/configGrowth.js b/src/api/configGrowth.js index ab3fedbe..2f010b28 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/GrowthFaceStu.vue b/src/components/growthpath/GrowthFaceStu.vue index 75bd2377..8eba751e 100644 --- a/src/components/growthpath/GrowthFaceStu.vue +++ b/src/components/growthpath/GrowthFaceStu.vue @@ -257,7 +257,12 @@ import GrowthCommonImport from "@/components/growthpath/GrowthCommonImport"; import GrowthCommonStudent from "@/components/growthpath/GrowthCommonStudent"; import dayjs from "dayjs"; import { delStudentList } from "@/api/index1"; +import { useStore } from "vuex"; +const store = useStore(); + +const userInfo = computed(() => store.state.userInfo); +console.log(userInfo, "userInfouserInfo"); const coursePlanIndex = ref(0); const tableRef = ref(); const stuTemplateUrl = ref( @@ -342,7 +347,7 @@ const planParams = computed(() => ({ offcourseId: props.datasource?.taskId, })); -const columns2 = [ +const columns = ref([ { title: "工号", dataIndex: "studentUserNo", @@ -451,9 +456,6 @@ const columns2 = [ ), }, -]; -const columns = ref(); -const columns1 = [ { title: "考勤情况", ellipsis: true, @@ -463,7 +465,8 @@ const columns1 = [ width: 130, align: "center", customRender: (text) => - data.value[coursePlanIndex.value].type == 4 && ( + data.value[coursePlanIndex.value].type == 4 || + text.record.createId == userInfo.value.userId ? (
+ ) : ( + "" ), }, { @@ -488,20 +493,23 @@ const columns1 = [ key: "opacation", width: 130, align: "center", - customRender: (text) => - data.value[coursePlanIndex.value].type == 4 && ( + customRender: ({ record }) => + data.value[coursePlanIndex.value].type == 4 || + record.createId == userInfo.value.userId ? (
removeStu(text.record.id)} + onClick={() => removeStu(record.id)} > 删除
+ ) : ( + "" ), }, -]; +]); const { data = [], loading, @@ -513,14 +521,7 @@ watch( () => { coursePlanIndex.value = 0; params.value.pid = data.value[coursePlanIndex.value]?.id || 0; - if ( - data.value[coursePlanIndex.value] && - data.value[coursePlanIndex.value].type !== 4 - ) { - columns.value = [...columns2]; - } else { - columns.value = [...columns2, ...columns1]; - } + tableRef.value.fetch(); } ); @@ -529,11 +530,7 @@ watch( const openCourseName = ref(""); const ChoiceCourse = (n) => { openCourseName.value = data.value[n].name; - if (data.value[n].type !== 4) { - columns.value = [...columns2]; - } else { - columns.value = [...columns2, ...columns1]; - } + coursePlanIndex.value = n; params.value.pid = data.value[n].id; tableRef.value.fetch(); @@ -550,7 +547,7 @@ watch( const removeStu = (id) => dialog({ content: "确定删除该学员吗?", - ok: () => delStudentList({ ids: [id] }).then(() => fetchData()), + ok: () => delStudentList({ ids: [id] }).then(() => tableRef.value.fetch()), }); const closeDrawer = () => { diff --git a/src/components/growthpath/GrowthOnlineManage.vue b/src/components/growthpath/GrowthOnlineManage.vue index dd2848d5..edabc208 100644 --- a/src/components/growthpath/GrowthOnlineManage.vue +++ b/src/components/growthpath/GrowthOnlineManage.vue @@ -250,7 +250,6 @@ export default { title: "工号", dataIndex: "username", key: "username", - width: 80, align: "center", className: "h head", customRender: (text) => { @@ -268,7 +267,6 @@ export default { title: "姓名", dataIndex: "userNickName", key: "userNickName", - width: 80, align: "center", className: "h head", customRender: (text) => { @@ -286,7 +284,6 @@ export default { title: "标准岗位", dataIndex: "stdPositionName", key: "stdPositionName", - width: 150, align: "center", ellipsis: true, className: "h", @@ -307,7 +304,6 @@ export default { title: "任职资格", dataIndex: "qualsLevelDesr", key: "qualsLevelDesr", - width: 80, align: "center", ellipsis: true, className: "h", @@ -328,7 +324,6 @@ export default { title: "Band职级", dataIndex: "bandCode", key: "bandCode", - width: 60, align: "center", ellipsis: true, className: "h", @@ -347,7 +342,6 @@ export default { title: "加入方式", dataIndex: "joinMethod", key: "joinMethod", - width: 60, align: "center", ellipsis: true, className: "h", @@ -358,13 +352,26 @@ export default { }[joinMethod]), }, { - title: "完成时间", - dataIndex: "finishTime", - key: "finishTime", - width: 100, + title: "完成进度", + dataIndex: "progress", + key: "progress", align: "center", ellipsis: true, className: "h", + customRender: (text) => { + return ( +
+ {text.record.progress}% +
+ ); + }, + }, + { + title: "完成时间", + dataIndex: "finishTime", + key: "finishTime", + align: "center", + ellipsis: true, customRender: (text) => { return (
@@ -380,7 +387,6 @@ export default { title: "任务状态", dataIndex: "completionStatus", key: "completionStatus", - width: 50, align: "center", ellipsis: true, className: "h", @@ -614,18 +620,18 @@ export default { }; -