Merge branch 'compulsory_professional_skills' into compulsory_professional_skills_copy

This commit is contained in:
gengxin
2025-02-26 10:40:19 +08:00
3 changed files with 51 additions and 48 deletions

View File

@@ -18,8 +18,8 @@ import { boeRequest } from "@/api/request";
// "application/x-www-form-urlencoded"; // "application/x-www-form-urlencoded";
axios.defaults.withCredentials = true; axios.defaults.withCredentials = true;
const http = axios.create({ const http = axios.create({
// baseURL: '/growth', baseURL: '/growth',
baseURL: process.env.VUE_APP_BASE_API_GROWTH, // baseURL: process.env.VUE_APP_BASE_API_GROWTH,
timeout: 1000 * 15, timeout: 1000 * 15,
// headers: { "Content-Type": "multipart/form-data" }, // headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },

View File

@@ -257,7 +257,12 @@ import GrowthCommonImport from "@/components/growthpath/GrowthCommonImport";
import GrowthCommonStudent from "@/components/growthpath/GrowthCommonStudent"; import GrowthCommonStudent from "@/components/growthpath/GrowthCommonStudent";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { delStudentList } from "@/api/index1"; 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 coursePlanIndex = ref(0);
const tableRef = ref(); const tableRef = ref();
const stuTemplateUrl = ref( const stuTemplateUrl = ref(
@@ -342,7 +347,7 @@ const planParams = computed(() => ({
offcourseId: props.datasource?.taskId, offcourseId: props.datasource?.taskId,
})); }));
const columns2 = [ const columns = ref([
{ {
title: "工号", title: "工号",
dataIndex: "studentUserNo", dataIndex: "studentUserNo",
@@ -451,9 +456,6 @@ const columns2 = [
</span> </span>
), ),
}, },
];
const columns = ref();
const columns1 = [
{ {
title: "考勤情况", title: "考勤情况",
ellipsis: true, ellipsis: true,
@@ -463,7 +465,8 @@ const columns1 = [
width: 130, width: 130,
align: "center", align: "center",
customRender: (text) => customRender: (text) =>
data.value[coursePlanIndex.value].type == 4 && ( data.value[coursePlanIndex.value].type == 4 ||
text.record.createId == userInfo.value.userId ? (
<div class="opa"> <div class="opa">
<a-radio <a-radio
checked={text.record.signStatus} checked={text.record.signStatus}
@@ -478,6 +481,8 @@ const columns1 = [
请假 请假
</a-radio> </a-radio>
</div> </div>
) : (
""
), ),
}, },
{ {
@@ -488,20 +493,23 @@ const columns1 = [
key: "opacation", key: "opacation",
width: 130, width: 130,
align: "center", align: "center",
customRender: (text) => customRender: ({ record }) =>
data.value[coursePlanIndex.value].type == 4 && ( data.value[coursePlanIndex.value].type == 4 ||
record.createId == userInfo.value.userId ? (
<div class="opa"> <div class="opa">
<a <a
className="opa" className="opa"
style={{ color: "#666" }} style={{ color: "#666" }}
onClick={() => removeStu(text.record.id)} onClick={() => removeStu(record.id)}
> >
删除 删除
</a> </a>
</div> </div>
) : (
""
), ),
}, },
]; ]);
const { const {
data = [], data = [],
loading, loading,
@@ -513,14 +521,7 @@ watch(
() => { () => {
coursePlanIndex.value = 0; coursePlanIndex.value = 0;
params.value.pid = data.value[coursePlanIndex.value]?.id || 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(); tableRef.value.fetch();
} }
); );
@@ -529,11 +530,7 @@ watch(
const openCourseName = ref(""); const openCourseName = ref("");
const ChoiceCourse = (n) => { const ChoiceCourse = (n) => {
openCourseName.value = data.value[n].name; openCourseName.value = data.value[n].name;
if (data.value[n].type !== 4) {
columns.value = [...columns2];
} else {
columns.value = [...columns2, ...columns1];
}
coursePlanIndex.value = n; coursePlanIndex.value = n;
params.value.pid = data.value[n].id; params.value.pid = data.value[n].id;
tableRef.value.fetch(); tableRef.value.fetch();
@@ -550,7 +547,7 @@ watch(
const removeStu = (id) => const removeStu = (id) =>
dialog({ dialog({
content: "确定删除该学员吗?", content: "确定删除该学员吗?",
ok: () => delStudentList({ ids: [id] }).then(() => fetchData()), ok: () => delStudentList({ ids: [id] }).then(() => tableRef.value.fetch()),
}); });
const closeDrawer = () => { const closeDrawer = () => {

View File

@@ -250,7 +250,6 @@ export default {
title: "工号", title: "工号",
dataIndex: "username", dataIndex: "username",
key: "username", key: "username",
width: 80,
align: "center", align: "center",
className: "h head", className: "h head",
customRender: (text) => { customRender: (text) => {
@@ -268,7 +267,6 @@ export default {
title: "姓名", title: "姓名",
dataIndex: "userNickName", dataIndex: "userNickName",
key: "userNickName", key: "userNickName",
width: 80,
align: "center", align: "center",
className: "h head", className: "h head",
customRender: (text) => { customRender: (text) => {
@@ -286,7 +284,6 @@ export default {
title: "标准岗位", title: "标准岗位",
dataIndex: "stdPositionName", dataIndex: "stdPositionName",
key: "stdPositionName", key: "stdPositionName",
width: 150,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
@@ -307,7 +304,6 @@ export default {
title: "任职资格", title: "任职资格",
dataIndex: "qualsLevelDesr", dataIndex: "qualsLevelDesr",
key: "qualsLevelDesr", key: "qualsLevelDesr",
width: 80,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
@@ -328,7 +324,6 @@ export default {
title: "Band职级", title: "Band职级",
dataIndex: "bandCode", dataIndex: "bandCode",
key: "bandCode", key: "bandCode",
width: 60,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
@@ -347,7 +342,6 @@ export default {
title: "加入方式", title: "加入方式",
dataIndex: "joinMethod", dataIndex: "joinMethod",
key: "joinMethod", key: "joinMethod",
width: 60,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
@@ -358,13 +352,26 @@ export default {
}[joinMethod]), }[joinMethod]),
}, },
{ {
title: "完成时间", title: "完成进度",
dataIndex: "finishTime", dataIndex: "progress",
key: "finishTime", key: "progress",
width: 100,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>{text.record.progress}%</span>
</div>
);
},
},
{
title: "完成时间",
dataIndex: "finishTime",
key: "finishTime",
align: "center",
ellipsis: true,
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
@@ -380,7 +387,6 @@ export default {
title: "任务状态", title: "任务状态",
dataIndex: "completionStatus", dataIndex: "completionStatus",
key: "completionStatus", key: "completionStatus",
width: 50,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
@@ -614,18 +620,18 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="scss" >
// .drawerStyle { .drawerStyle {
// .ant-drawer-content-wrapper { .ant-drawer-content-wrapper {
// // max-width: 1000px; max-width: 1200px;
// .ant-drawer-header { .ant-drawer-header {
// display: none !important; display: none !important;
// } }
// .ant-drawer-body { .ant-drawer-body {
// padding: 0; padding: 0;
// } }
// } }
// } }
.ProjectOnlineManage { .ProjectOnlineManage {
// overflow-x: auto; // overflow-x: auto;
.drawerMain { .drawerMain {