fix:社招新员工项目配置隐藏部分功能

This commit is contained in:
zxj
2025-11-14 10:25:21 +08:00
parent ec03ab4427
commit d85495a5da
3 changed files with 176 additions and 81 deletions

View File

@@ -24,7 +24,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
--> -->
<a-col v-if="type === 1"> <a-col v-if="type === 1 && !isNewEmployee">
<a-form-item title="部门:"> <a-form-item title="部门:">
<div class="select in" style="width: 270px"> <div class="select in" style="width: 270px">
<OrgClass <OrgClass
@@ -34,7 +34,7 @@
</div> </div>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-if="type === 1"> <a-col v-if="type === 1 && !isNewEmployee">
<a-form-item title="优秀学员:"> <a-form-item title="优秀学员:">
<div class="select"> <div class="select">
<a-select <a-select
@@ -48,7 +48,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-if="isNewEmployee"> <a-col v-if="isNewEmployee">
<a-form-item title="报名及HR审批结果"> <a-form-item title="审核状态">
<div class="select"> <div class="select">
<a-select <a-select
v-model:value="tableParam.approvalResults" v-model:value="tableParam.approvalResults"
@@ -60,6 +60,19 @@
</div> </div>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-if="isNewEmployee">
<a-form-item title="学习状态:">
<div class="select">
<a-select
v-model:value="tableParam.approvalResults"
style="width: 260px; height: 40px"
placeholder="学习状态"
:options="learnStatusList"
allowClear
></a-select>
</div>
</a-form-item>
</a-col>
<a-col> <a-col>
<a-button <a-button
class="cus-btn" class="cus-btn"
@@ -115,7 +128,7 @@
</CommonStudent> </CommonStudent>
</a-col> </a-col>
<!-- 新加导入学员 批量换组 导出学习信息 --> <!-- 新加导入学员 批量换组 导出学习信息 -->
<a-col :span="1.5" v-if="type === 1 || type === 2"> <a-col :span="1.5" v-if="(type === 1 || type === 2) && !isNewEmployee">
<a-button <a-button
class="cus-btn" class="cus-btn"
@click="showImpStu" @click="showImpStu"
@@ -130,7 +143,7 @@
</a-button> </a-button>
</a-col> </a-col>
<a-col :span="1.5" v-if="type === 1"> <a-col :span="1.5" v-if="type === 1 && !isNewEmployee && !isNewEmployee">
<a-button <a-button
class="cus-btn" class="cus-btn"
@click="showChangeGroupModal" @click="showChangeGroupModal"
@@ -260,7 +273,7 @@
</a-row> </a-row>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<a-table <a-table
:columns="tablecolumns" :columns="filterColumns()"
:data-source="tableData.list" :data-source="tableData.list"
:pagination="stuPagination" :pagination="stuPagination"
:loading="tableData.loading" :loading="tableData.loading"
@@ -466,20 +479,20 @@
</a-modal> </a-modal>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {computed, defineProps, onMounted, ref, watch} from "vue"; import { computed, defineProps, onMounted, ref, watch } from "vue";
import {delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch, updateScore} from "@/api/index1"; import { delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch, updateScore } from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue"; import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent"; import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue"; import ChangeLevelModal from "./ChangeLevelModal.vue";
import {message} from "ant-design-vue"; import { message } from "ant-design-vue";
import SeeStu from "../../components/drawers/SeeStu"; import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue"; import EScore from "../drawers/ExportScore.vue";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue"; import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu"; import ImpStu from "../drawers/AddLevelImportStu";
import {checkPer} from "@/utils/utils"; import { checkPer } from "@/utils/utils";
import {useAsyncStu} from "@/utils/useCommon"; import { useAsyncStu } from "@/utils/useCommon";
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
@@ -564,6 +577,24 @@ const hrAuditResultList = ref([
}, },
]); ]);
const learnStatusList = ref([
{
id: 1,
value: 1,
label: "未开始",
},
{
id: 2,
value: 2,
label: "进行中",
},
{
id: 3,
value: 3,
label: "已完成",
},
]);
const tablecolumns = ref([ const tablecolumns = ref([
{ {
title: "姓名", title: "姓名",
@@ -610,7 +641,7 @@ const tablecolumns = ref([
width: "120px", width: "120px",
align: "center", align: "center",
className: "h", className: "h",
customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}}, customCell: () => { return { style: { maxWidth: '200px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', cursor: 'pointer' } } },
customRender: ({ record: { studentOrgName, studentDepartName } }) => customRender: ({ record: { studentOrgName, studentDepartName } }) =>
// <a-tooltip color="white" placement="topLeft" title={allDepartShow(studentOrgName)} >{allDepartShow(studentOrgName)}</a-tooltip> // <a-tooltip color="white" placement="topLeft" title={allDepartShow(studentOrgName)} >{allDepartShow(studentOrgName)}</a-tooltip>
<a-tooltip color="white" placement="topLeft" title={studentOrgName} >{studentDepartName}</a-tooltip> <a-tooltip color="white" placement="topLeft" title={studentOrgName} >{studentDepartName}</a-tooltip>
@@ -628,9 +659,9 @@ const tablecolumns = ref([
title: "报名方式", title: "报名方式",
dataIndex: "source", dataIndex: "source",
key: "source", key: "source",
width: "60px", width: "80px",
align: "center", align: "center",
customRender: ({ record }) =>{ customRender: ({ record }) => {
// ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]), // ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
return ({ return ({
0: "导入", 0: "导入",
@@ -646,42 +677,56 @@ const tablecolumns = ref([
} }
}, },
{ {
title: "HR审批结果", title: "必修进度",
dataIndex: "approvalResults",
key: "approvalResults",
width: "60px",
align: "center",
customRender: ({ record: { hrAuditResult } }) =>
({
1: "报名失败",
2: "审核中",
3: "审核通过",
4: "审核不通过",
}[hrAuditResult]),
},
{
title: "必修课进度",
dataIndex: "required", dataIndex: "required",
key: "required", key: "required",
width: "60px", width: "100px",
align: "center", align: "center",
customRender: ({ record }) => ( customRender: ({ record }) => (
<div> <div>
{ record.requiredFinishTaskNum}/{ record.requiredTotalTaskNum} {record.requiredFinishTaskNum}/{record.requiredTotalTaskNum}
</div> </div>
), ),
}, },
{ {
title: "选修进度", title: "选修进度",
dataIndex: "elective", dataIndex: "elective",
key: "elective", key: "elective",
width: "60px", width: "100px",
align: "center", align: "center",
customRender: ({ record }) => ( customRender: ({ record }) => (
<div> <div>
{ record.electiveFinishTaskNum}/{ record.electiveTotalTaskNum} {record.electiveFinishTaskNum}/{record.electiveTotalTaskNum}
</div> </div>
), ),
},
{
title: "总进度",
dataIndex: "progress",
key: "progress",
width: 80,
align: "center",
className: "h",
ellipsis: true,
customRender: ({ record }) => (
<div>
{record.finishTaskNum || 0}/{record.totalTaskNum || 0}
</div>
),
},
{
title: "审核状态",
dataIndex: "approvalResults",
key: "approvalResults",
width: "80px",
align: "center",
customRender: ({ record: { hrAuditResult } }) =>
({
1: "报名失败",
2: "审核中",
3: "审核通过",
4: "审核不通过",
}[hrAuditResult]),
}, },
...props.columns, ...props.columns,
{ {
@@ -710,6 +755,18 @@ function allDepartShow(a, b) {
return reversedStr; return reversedStr;
} }
function filterColumns() {
let newColums = [...tablecolumns.value];
if (props.isNewEmployee) {
const filterArr = ['所属小组', '岗位', '备注', '证书数量'];
newColums = newColums.filter(item => !(filterArr.includes(item.title)));
}else{
const filterArr = ['必修进度', '选修进度', '备注', '证书数量'];
newColums = newColums.filter(item => !(filterArr.includes(item.title)));
}
return newColums;
}
const tableParam = ref({ const tableParam = ref({
studentName: "", //学员名称 studentName: "", //学员名称
groupName: "", //学员小组 groupName: "", //学员小组
@@ -755,7 +812,7 @@ function showChangeGroupModal() {
checkgroupParam.value.checkBatch = true; checkgroupParam.value.checkBatch = true;
} }
function search(){ function search() {
tableParam.value.pageNo = 1 tableParam.value.pageNo = 1
getStuList() getStuList()
} }
@@ -764,17 +821,15 @@ function search(){
function exportTaskStu() { function exportTaskStu() {
console.log("props.datasource", props); console.log("props.datasource", props);
window.open( window.open(
`${ `${process.env.VUE_APP_BASE_API
process.env.VUE_APP_BASE_API }/admin/student/exportTaskStudent?type=${1}&pid=${props.id}&studentName=${tableParam.value.studentName === null ? '' : tableParam.value.studentName}&studentDepartName=${tableParam.value.studentDepartName === null ? '' : tableParam.value.studentDepartName}&topFlag=${tableParam.value.topFlag === null ? '' : tableParam.value.topFlag}`
}/admin/student/exportTaskStudent?type=${1}&pid=${props.id}&studentName=${tableParam.value.studentName === null ?'':tableParam.value.studentName}&studentDepartName=${tableParam.value.studentDepartName===null?'':tableParam.value.studentDepartName}&topFlag=${tableParam.value.topFlag===null?'':tableParam.value.topFlag}`
); );
} }
function exportTaskStuRouter() { function exportTaskStuRouter() {
console.log("props.datasource", props, props.id); console.log("props.datasource", props, props.id);
window.open( window.open(
`${ `${process.env.VUE_APP_BASE_API
process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${2}&pid=${props.id}` }/admin/student/exportTaskStudent?type=${2}&pid=${props.id}`
); );
} }
@@ -1007,7 +1062,7 @@ const exportHomeWorkShow = () => {
// message.success("导出作业成功"); // message.success("导出作业成功");
exportHomeWorkV.value = true; exportHomeWorkV.value = true;
downloadUrl.value = res.data.data; downloadUrl.value = res.data.data;
}).catch(err=>{ }).catch(err => {
// message.error(err.data.msg) // message.error(err.data.msg)
}) })
}; };
@@ -1024,8 +1079,7 @@ const exportStu = () => {
console.log("props.datasource", props); console.log("props.datasource", props);
if (props.id != undefined) { if (props.id != undefined) {
window.open( window.open(
`${ `${process.env.VUE_APP_BASE_API
process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${3}&pid=${props.id}&thirdType=2` }/admin/student/exportTaskStudent?type=${3}&pid=${props.id}&thirdType=2`
); );
} }
@@ -1091,10 +1145,10 @@ function startLoading() {
/** /**
* 更新列表分数详情 * 更新列表分数详情
*/ */
function handleUpdateScore(){ function handleUpdateScore() {
const pid = props.id const pid = props.id
tableData.value.loading = true tableData.value.loading = true
updateScore({pid}).then(()=>{ updateScore({ pid }).then(() => {
getStuList() getStuList()
}) })
} }

View File

@@ -232,6 +232,44 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<div class="name">
<div class="namebox" style="width: 157px; margin-left: -38px">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">是否允许学员自主报名</div>
</div>
<div class="in">
<a-radio-group
style="width: 108px"
v-model:value="projectInfo.test1"
:disabled="viewDetail ? true : false"
>
<a-radio :style="radioStyle" :value="1"></a-radio>
<a-radio :style="radioStyle" :value="0"></a-radio>
</a-radio-group>
</div>
</div>
<div class="name">
<div class="namebox" style="width: 157px; margin-left: -38px">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">是否走BPM审批流程</div>
</div>
<div class="in">
<a-radio-group
style="width: 108px"
v-model:value="projectInfo.test12"
:disabled="viewDetail ? true : false"
>
<a-radio :style="radioStyle" :value="1"></a-radio>
<a-radio :style="radioStyle" :value="0"></a-radio>
</a-radio-group>
</div>
</div>
<div v-if="isNewEmployee" class="name"> <div v-if="isNewEmployee" class="name">
<div class="namebox" style="width: 157px; margin-left: -38px"> <div class="namebox" style="width: 157px; margin-left: -38px">
<img <img

View File

@@ -186,7 +186,7 @@
:tabBarStyle="{ marginLeft: '10px', marginTop: '5px' }" :tabBarStyle="{ marginLeft: '10px', marginTop: '5px' }"
@change="tabsChange" @change="tabsChange"
> >
<a-tab-pane key="1" tab="概览"> <a-tab-pane v-if="!isNewEmployee" key="1" tab="概览">
<div class="split"></div> <div class="split"></div>
<!-- 概览(无数据) --> <!-- 概览(无数据) -->
<div v-if="!hasTask"> <div v-if="!hasTask">
@@ -943,7 +943,7 @@
v-if="isNewEmployee" v-if="isNewEmployee"
@click="showSignUpRecord(record)" @click="showSignUpRecord(record)"
type="link" type="link"
>查看报名记录</a-button >报名记录</a-button
> >
<!-- 成绩单下载 --> <!-- 成绩单下载 -->
<a-button <a-button
@@ -954,24 +954,32 @@
</a-button> </a-button>
<a-button <a-button
@click="settingTopFlag(record)" @click="settingTopFlag(record)"
v-if="checkPer(permissions, createId)" v-if="checkPer(permissions, createId) && !isNewEmployee"
type="link" type="link"
>{{ record.topFlag ? "取消优秀" : "优秀学员" }} >{{ record.topFlag ? "取消优秀" : "优秀学员" }}
</a-button> </a-button>
<a-button <a-button
type="link" type="link"
v-if="checkPer(permissions, createId)" v-if="checkPer(permissions, createId) && !isNewEmployee"
:disabled="record.isLeader === '1'" :disabled="record.isLeader === '1'"
@click="showChangeGroupModal(record)" @click="showChangeGroupModal(record)"
>换组 >换组
</a-button> </a-button>
<a-button type="link" @click="modifyRemarks(record)" <a-button
type="link"
v-if="!isNewEmployee"
@click="modifyRemarks(record)"
>修改备注 >修改备注
</a-button> </a-button>
</template> </template>
</TableStudent> </TableStudent>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="9" tab="小组管理" force-render> <a-tab-pane
v-if="!isNewEmployee"
key="9"
tab="小组管理"
force-render
>
<div class="group"> <div class="group">
<div class="groupleft"> <div class="groupleft">
<div class="groupname">小组名称:</div> <div class="groupname">小组名称:</div>
@@ -1113,7 +1121,7 @@
</a-tabs> </a-tabs>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="公告"> <a-tab-pane v-if="!isNewEmployee" key="4" tab="公告">
<div class="split"></div> <div class="split"></div>
<a-tabs v-model:activeKey="activeKeyNotice"> <a-tabs v-model:activeKey="activeKeyNotice">
<a-tab-pane key="11" tab="公告"> <a-tab-pane key="11" tab="公告">
@@ -1137,7 +1145,7 @@
:projectId="projectId" :projectId="projectId"
></ProjectScore> ></ProjectScore>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="6" tab="排行榜"> <a-tab-pane v-if="!isNewEmployee" key="6" tab="排行榜">
<div class="split"></div> <div class="split"></div>
<div class="content6"> <div class="content6">
<div class="title">排行榜</div> <div class="title">排行榜</div>
@@ -1263,7 +1271,7 @@
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="7" tab="证书"> <a-tab-pane v-if="!isNewEmployee" key="7" tab="证书">
<div class="split"></div> <div class="split"></div>
<div v-if="!ischeckCertificate"> <div v-if="!ischeckCertificate">
<!-- 没有证书显示的页面 --> <!-- 没有证书显示的页面 -->
@@ -1391,7 +1399,7 @@
> >
</TableCertificateStudent> </TableCertificateStudent>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="8" tab="设置"> <a-tab-pane v-if="!isNewEmployee" key="8" tab="设置">
<div class="split"></div> <div class="split"></div>
<a-tabs v-model:activeKey="activeSetKey"> <a-tabs v-model:activeKey="activeSetKey">
<a-tab-pane key="12" tab="基本信息"> <a-tab-pane key="12" tab="基本信息">
@@ -2663,15 +2671,15 @@ export default {
const showSignUpRecordModal = ref(false); const showSignUpRecordModal = ref(false);
const signupRecordLoading = ref(false); const signupRecordLoading = ref(false);
const signupRecordColumns = [ const signupRecordColumns = [
{ title: "姓名", dataIndex: "name", align: "center" }, // { title: "姓名", dataIndex: "name", align: "center" },
{ title: "工号", dataIndex: "workNo", align: "center" }, // { title: "工号", dataIndex: "workNo", align: "center" },
{ {
title: "状态", title: "状态",
dataIndex: "status", dataIndex: "status",
align: "center", align: "center",
slots: { customRender: "status" }, slots: { customRender: "status" },
}, },
{ title: "报名时间", dataIndex: "applierAtStr", align: "center" }, { title: "时间", dataIndex: "applierAtStr", align: "center" },
{ title: "描述", dataIndex: "desc", align: "left" }, { title: "描述", dataIndex: "desc", align: "left" },
]; ];
const signupRecordList = ref([]); const signupRecordList = ref([]);
@@ -2704,13 +2712,21 @@ export default {
// 将接口返回的数据映射到表格列 // 将接口返回的数据映射到表格列
signupRecordList.value = res.data.data.map((item, index) => ({ signupRecordList.value = res.data.data.map((item, index) => ({
id: index + 1, id: index + 1,
name: record.studentName ||"",
workNo: record.studentUserNo || "",
status: getStatusText(item.enrollStatusCode), status: getStatusText(item.enrollStatusCode),
enrollStatusCode: item.enrollStatusCode, enrollStatusCode: item.enrollStatusCode,
applierAtStr: item.applierAtStr || "", applierAtStr: item.applierAtStr || "",
desc: item.enrollMark || "" desc: item.enrollMark || ""
})); }));
signupRecordList.value = [
{
"pid": "1139",
"stuId": "965342027497607168",
"applierAt": "1762944292267",
"applierAtStr": "2025-11-12 18:44:52", //报名时间
"status": '报名失败', //状态1报名失败、2审核中、3审核通过、4审核不通过
"desc": "报名失败java.lang.NullPointerException" //描述
}
]
} else { } else {
message.error(res.msg || "获取报名记录失败"); message.error(res.msg || "获取报名记录失败");
signupRecordList.value = []; signupRecordList.value = [];
@@ -2830,20 +2846,6 @@ export default {
buttonLoading: false, buttonLoading: false,
stage: [], stage: [],
stuColumns: [ stuColumns: [
{
title: "进度",
dataIndex: "progress",
key: "progress",
width: 80,
align: "center",
className: "h",
ellipsis: true,
customRender: ({ record }) => (
<div>
{record.finishTaskNum || 0}/{record.totalTaskNum || 0}
</div>
),
},
{ {
title: "岗位", title: "岗位",
dataIndex: "studentJobName", dataIndex: "studentJobName",
@@ -2863,7 +2865,7 @@ export default {
ellipsis: true, ellipsis: true,
}, },
{ {
title: "状态", title: "学习状态",
dataIndex: "status", dataIndex: "status",
key: "status", key: "status",
width: 80, width: 80,
@@ -4471,6 +4473,7 @@ export default {
}).then((res) => { }).then((res) => {
if(res.data.data.projectInfo.szxygProjectFlag == "1"){ if(res.data.data.projectInfo.szxygProjectFlag == "1"){
state.isNewEmployee = true; state.isNewEmployee = true;
state.activeKey = '2';
} }
if ( if (
res.data.data.projectAuditLogDtoList && res.data.data.projectAuditLogDtoList &&