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-col>
-->
<a-col v-if="type === 1">
<a-col v-if="type === 1 && !isNewEmployee">
<a-form-item title="部门:">
<div class="select in" style="width: 270px">
<OrgClass
@@ -34,7 +34,7 @@
</div>
</a-form-item>
</a-col>
<a-col v-if="type === 1">
<a-col v-if="type === 1 && !isNewEmployee">
<a-form-item title="优秀学员:">
<div class="select">
<a-select
@@ -48,7 +48,7 @@
</a-form-item>
</a-col>
<a-col v-if="isNewEmployee">
<a-form-item title="报名及HR审批结果">
<a-form-item title="审核状态">
<div class="select">
<a-select
v-model:value="tableParam.approvalResults"
@@ -60,6 +60,19 @@
</div>
</a-form-item>
</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-button
class="cus-btn"
@@ -115,7 +128,7 @@
</CommonStudent>
</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
class="cus-btn"
@click="showImpStu"
@@ -130,7 +143,7 @@
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 1">
<a-col :span="1.5" v-if="type === 1 && !isNewEmployee && !isNewEmployee">
<a-button
class="cus-btn"
@click="showChangeGroupModal"
@@ -260,7 +273,7 @@
</a-row>
<div style="margin-top: 20px">
<a-table
:columns="tablecolumns"
:columns="filterColumns()"
:data-source="tableData.list"
:pagination="stuPagination"
:loading="tableData.loading"
@@ -466,20 +479,20 @@
</a-modal>
</template>
<script setup lang="jsx">
import {computed, defineProps, onMounted, ref, watch} from "vue";
import {delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch, updateScore} from "@/api/index1";
import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch, updateScore } from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import {message} from "ant-design-vue";
import { message } from "ant-design-vue";
import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue";
import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu";
import {checkPer} from "@/utils/utils";
import {useAsyncStu} from "@/utils/useCommon";
import { checkPer } from "@/utils/utils";
import { useAsyncStu } from "@/utils/useCommon";
const props = defineProps({
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([
{
title: "姓名",
@@ -610,7 +641,7 @@ const tablecolumns = ref([
width: "120px",
align: "center",
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 } }) =>
// <a-tooltip color="white" placement="topLeft" title={allDepartShow(studentOrgName)} >{allDepartShow(studentOrgName)}</a-tooltip>
<a-tooltip color="white" placement="topLeft" title={studentOrgName} >{studentDepartName}</a-tooltip>
@@ -628,9 +659,9 @@ const tablecolumns = ref([
title: "报名方式",
dataIndex: "source",
key: "source",
width: "60px",
width: "80px",
align: "center",
customRender: ({ record }) =>{
customRender: ({ record }) => {
// ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
return ({
0: "导入",
@@ -646,10 +677,48 @@ const tablecolumns = ref([
}
},
{
title: "HR审批结果",
title: "必修进度",
dataIndex: "required",
key: "required",
width: "100px",
align: "center",
customRender: ({ record }) => (
<div>
{record.requiredFinishTaskNum}/{record.requiredTotalTaskNum}
</div>
),
},
{
title: "选修进度",
dataIndex: "elective",
key: "elective",
width: "100px",
align: "center",
customRender: ({ record }) => (
<div>
{record.electiveFinishTaskNum}/{record.electiveTotalTaskNum}
</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: "60px",
width: "80px",
align: "center",
customRender: ({ record: { hrAuditResult } }) =>
({
@@ -659,30 +728,6 @@ const tablecolumns = ref([
4: "审核不通过",
}[hrAuditResult]),
},
{
title: "必修课进度",
dataIndex: "required",
key: "required",
width: "60px",
align: "center",
customRender: ({ record }) => (
<div>
{ record.requiredFinishTaskNum}/{ record.requiredTotalTaskNum}
</div>
),
},
{
title: "选修课进度",
dataIndex: "elective",
key: "elective",
width: "60px",
align: "center",
customRender: ({ record }) => (
<div>
{ record.electiveFinishTaskNum}/{ record.electiveTotalTaskNum}
</div>
),
},
...props.columns,
{
title: "操作",
@@ -710,6 +755,18 @@ function allDepartShow(a, b) {
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({
studentName: "", //学员名称
groupName: "", //学员小组
@@ -755,7 +812,7 @@ function showChangeGroupModal() {
checkgroupParam.value.checkBatch = true;
}
function search(){
function search() {
tableParam.value.pageNo = 1
getStuList()
}
@@ -764,17 +821,15 @@ function search(){
function exportTaskStu() {
console.log("props.datasource", props);
window.open(
`${
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}`
`${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}`
);
}
function exportTaskStuRouter() {
console.log("props.datasource", props, props.id);
window.open(
`${
process.env.VUE_APP_BASE_API
`${process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${2}&pid=${props.id}`
);
}
@@ -1007,7 +1062,7 @@ const exportHomeWorkShow = () => {
// message.success("导出作业成功");
exportHomeWorkV.value = true;
downloadUrl.value = res.data.data;
}).catch(err=>{
}).catch(err => {
// message.error(err.data.msg)
})
};
@@ -1024,8 +1079,7 @@ const exportStu = () => {
console.log("props.datasource", props);
if (props.id != undefined) {
window.open(
`${
process.env.VUE_APP_BASE_API
`${process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${3}&pid=${props.id}&thirdType=2`
);
}
@@ -1091,10 +1145,10 @@ function startLoading() {
/**
* 更新列表分数详情
*/
function handleUpdateScore(){
function handleUpdateScore() {
const pid = props.id
tableData.value.loading = true
updateScore({pid}).then(()=>{
updateScore({ pid }).then(() => {
getStuList()
})
}

View File

@@ -232,6 +232,44 @@
</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 class="namebox" style="width: 157px; margin-left: -38px">
<img

View File

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