mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
fix:社招新员工项目配置隐藏部分功能
This commit is contained in:
@@ -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,42 +677,56 @@ const tablecolumns = ref([
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "HR审批结果",
|
||||
dataIndex: "approvalResults",
|
||||
key: "approvalResults",
|
||||
width: "60px",
|
||||
align: "center",
|
||||
customRender: ({ record: { hrAuditResult } }) =>
|
||||
({
|
||||
1: "报名失败",
|
||||
2: "审核中",
|
||||
3: "审核通过",
|
||||
4: "审核不通过",
|
||||
}[hrAuditResult]),
|
||||
},
|
||||
{
|
||||
title: "必修课进度",
|
||||
title: "必修进度",
|
||||
dataIndex: "required",
|
||||
key: "required",
|
||||
width: "60px",
|
||||
width: "100px",
|
||||
align: "center",
|
||||
customRender: ({ record }) => (
|
||||
<div>
|
||||
{ record.requiredFinishTaskNum}/{ record.requiredTotalTaskNum}
|
||||
</div>
|
||||
),
|
||||
<div>
|
||||
{record.requiredFinishTaskNum}/{record.requiredTotalTaskNum}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "选修课进度",
|
||||
title: "选修进度",
|
||||
dataIndex: "elective",
|
||||
key: "elective",
|
||||
width: "60px",
|
||||
width: "100px",
|
||||
align: "center",
|
||||
customRender: ({ record }) => (
|
||||
<div>
|
||||
{ record.electiveFinishTaskNum}/{ record.electiveTotalTaskNum}
|
||||
</div>
|
||||
),
|
||||
<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: "80px",
|
||||
align: "center",
|
||||
customRender: ({ record: { hrAuditResult } }) =>
|
||||
({
|
||||
1: "报名失败",
|
||||
2: "审核中",
|
||||
3: "审核通过",
|
||||
4: "审核不通过",
|
||||
}[hrAuditResult]),
|
||||
},
|
||||
...props.columns,
|
||||
{
|
||||
@@ -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()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user