提交专业力必修

This commit is contained in:
Pengxiansen
2025-01-23 14:51:49 +08:00
parent d0176acb45
commit 990380ac1a
23 changed files with 2226 additions and 2238 deletions

View File

@@ -5,32 +5,20 @@
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="部门:">
<div class="select in" style="width: 270px">
<OrgClass v-model:value="tableParam.studentDepartId"></OrgClass>
</div>
</a-form-item>
</a-col>
<a-col>
<a-form-item title="选择岗位" style="min-width: 170px">
<div class="select in">
<PostSelect
v-model:value="statusPost"
v-model:postList="statusPostMaps"
multiple="multiple"
>
</PostSelect>
<PostSelect v-model:value="tableParam.qualsLevelCode"> </PostSelect>
</div>
</a-form-item>
</a-col>
<a-col>
<a-form-item title="选择职级" style="min-width: 170px">
<div class="select in">
<RankSelect
v-model:value="statusRanks"
v-model:rankList="statusRank"
></RankSelect>
<OfficeSelect
v-model:value="tableParam.stdPosition"
:searchData="tableParam.qualsLevelCode"
></OfficeSelect>
</div>
</a-form-item>
</a-col>
@@ -38,7 +26,7 @@
<a-form-item title="加入方式" style="width: 193px">
<div class="select in">
<a-select
v-model:value="tableParam.source"
v-model:value="tableParam.joinMethod"
placeholder="请选择加入方式"
:options="statusValues"
@change="selectstatusValue"
@@ -103,7 +91,7 @@
<GrowthCommonStudent
:type="type"
:id="id"
@finash="submitCall"
@confirm="submitCall"
:stage="stage"
:coulmsList="coulmsList"
:selectStu="true"
@@ -158,11 +146,11 @@
style="margin-right: 10px"
src="../../assets/images/coursewareManage/export.png"
/></template>
导出学信息
导出学信息
</a-button>
</a-col>
<a-col :span="1.5">
<!-- <a-col :span="1.5">
<a-button
class="cus-btn"
@click="showTexts"
@@ -173,9 +161,9 @@
style="margin-right: 10px"
src="../../assets/images/projectadd/edit.png"
/></template>
报名记录
导入记录
</a-button>
</a-col>
</a-col> -->
</a-row>
<div class="tips">
@@ -188,14 +176,14 @@
:pagination="stuPagination"
:loading="tableData.loading"
:scroll="{ x: 1000 }"
row-key="sid"
row-key="id"
:row-selection="stuRowSelection"
:row-class-name="getRowClass"
>
<template #studyNames="{ record }">
<div class="stuName">
<span class="name" :title="record.studentName">{{
record.studentName
<span class="name" :title="record.userNickName">{{
record.userNickName
}}</span>
<a-popover
v-if="record.moveStatus"
@@ -239,34 +227,29 @@
</template>
<template #action="{ record }">
<div
@click="seeStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
style="display: flex; justify-content: center; align-items: center"
>
查看
<a-button
@click="seeStudent(record)"
type="link"
style="margin-right: 16px"
>
查看
</a-button>
<a-button
v-if="checkGrowthPer(permissions)"
:disabled="record.isLeader === '1'"
@click="del(record)"
type="link"
>删除
</a-button>
</div>
<a-button
v-if="checkGrowthPer(permissions)"
:disabled="record.isLeader === '1'"
@click="del(record.sid, record)"
type="link"
>删除
</a-button>
</template>
</a-table>
</div>
</div>
<!-- 查看学员 传入查看学员的id-->
<see-stu
v-model:Seevisible="Seevisible"
v-model:checkStuId="checkStuId"
v-model:projectId="projectId"
/>
<see-stu :permissions="permissions" ref="seeStuRef" />
<!-- 导入学员抽屉 -->
<!-- :courseId="projectTaskInfo.courseId"
@@ -277,58 +260,30 @@
:courseId="id"
:courseType="type"
/>
<!-- 删除弹窗 -->
<a-modal
v-model:visible="deleteModalVisible"
:footer="null"
wrapClassName="deleteModal1"
centered="true"
>
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
<div class="header">
<div class="icon"></div>
<span>提示</span>
<div class="close_exit" @click="closeSameModal"></div>
</div>
<div class="body">
<span>确定删除?</span>
<span style="margin-top: 20px">数据删除后不可恢复</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="closeSameModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="sureSameModal">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
<GrowShowText
<!-- <GrowShowText
:permissions="permissions"
@isSearchList="isSearchLists"
v-model:showText="showText"
/>
/> -->
</template>
<script setup lang="jsx">
import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage } from "@/api/index1";
import { getGrowStudent, delGrowStudent } from "@/api/growthpath";
import {
getGrowStudent,
delGrowStudent,
batchDelStudents,
allocationList,
addLearners,
} from "@/api/growthpath";
import GrowthCommonStudent from "./GrowthCommonStudent";
import { message } from "ant-design-vue";
import SeeStu from "./StudentSeeStu";
import OrgClass from "@/components/growthpath/OrgClass";
import * as api from "../../api/index1";
import ImportStu from "./ImportStu";
import { checkGrowthPer } from "@/utils/utils";
import { useAsyncStu } from "@/utils/useCommon";
import dialog from "@/utils/dialog";
import PostSelect from "@/components/growthpath/PostSelect";
import RankSelect from "@/components/growthpath/RankSelect";
import OfficeSelect from "@/components/growthpath/OfficeSelect";
import GrowShowText from "@/components/growthpath/GrowShowText";
const props = defineProps({
type: Number,
@@ -393,8 +348,8 @@ const getRowClass = (record) => {
const tablecolumns = ref([
{
title: "姓名",
dataIndex: "studentName",
key: "studentName",
dataIndex: "userNickName",
key: "userNickName",
width: 100,
align: "left",
className: "h",
@@ -403,8 +358,8 @@ const tablecolumns = ref([
},
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
dataIndex: "username",
key: "username",
width: 100,
align: "center",
className: "h",
@@ -441,21 +396,17 @@ const tablecolumns = ref([
},
{
title: "加入方式",
dataIndex: "source",
key: "source",
dataIndex: "joinMethod",
key: "joinMethod",
width: 100,
align: "center",
customRender: ({ record: { source } }) =>
customRender: ({ record: { joinMethod } }) =>
({
0: "岗位匹配",
1: "手动加",
2: "组织添加",
3: "受众添加",
4: "导入",
5: "报名",
6: "签到添加",
7: "岗位匹配",
}[source]),
1: "自动匹配",
2: "手动加",
3: "导入",
4: "添加",
}[joinMethod]),
},
{
title: "进度",
@@ -532,18 +483,17 @@ const coulmsList = ref([
},
]);
const tableParam = ref({
source: null,
joinMethod: null,
keyword: "", //学员名称
// groupName: "", //学员小组
studentDepartId: null, //部门
// studentDepartName: null, //部门名称
topFlag: null, //是否是优秀学员
pageNo: 1,
pageNum: 1,
status: 1,
pageSize: 10,
type: props.type,
// pid: props.id,
growId: props.growId,
growthId: props.growId,
...props.params,
bandCodeList: "",
positionNameList: "",
@@ -564,21 +514,7 @@ const stuRowSelection = computed(() => ({
}));
function search() {
tableParam.value.pageNo = 1;
if (statusRank.value && statusRank.value.length != 0) {
tableParam.value.bandCodeList = statusRank.value
.map((item) => item.label)
.join(",");
} else {
tableParam.value.bandCodeList = "";
}
if (statusPost.value && statusPost.value.length != 0) {
tableParam.value.positionNameList = statusPostMaps.value
.map((item) => item.value)
.join(",");
} else {
tableParam.value.positionNameList = "";
}
tableParam.value.pageNum = 1;
getStuList();
}
@@ -624,24 +560,21 @@ const stuPagination = computed(() => ({
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
current: tableParam.value.pageNo,
current: tableParam.value.pageNum,
pageSize: tableParam.value.pageSize,
onChange: changePagination,
}));
function changePagination(page, pageSize) {
tableParam.value.pageNo = page;
tableParam.value.pageNum = page;
tableParam.value.pageSize = pageSize;
getStuList();
}
const statusPost = ref([]);
const statusPostMaps = ref([]);
const statusRank = ref([]);
const statusRanks = ref([]);
function getStuList() {
tableData.value.loading = true;
console.log("tableParam.value", tableParam.value);
getGrowStudent(tableParam.value)
allocationList(tableParam.value)
.then((res) => {
console.log("学员管理-获取学员", res.data);
tableData.value.total = res.data.data.total;
@@ -656,16 +589,12 @@ function getStuList() {
function reset() {
tableParam.value.keyword = "";
// tableParam.value.groupName = ""; //学员小组
tableParam.value.studentDepartId = null; //部门
// tableParam.value.studentDepartName = null; //部门
tableParam.value.topFlag = null; //是否是优秀学员
tableParam.value.bandCodeList = "";
tableParam.value.positionNameList = "";
tableParam.value.source = null;
statusRank.value = [];
statusRanks.value = [];
statusPost.value = [];
statusPostMaps.value = [];
tableParam.value.joinMethod = null;
tableParam.value.qualsLevelCode = null;
tableParam.value.stdPosition = null;
getStuList();
}
@@ -680,93 +609,61 @@ function bathDel() {
// .filter((item) => item.isLeader === "1");
// if (arr.length > 0) {
// return message.warning(
// "选择人员中:" + arr[0].studentName + "是小组长,请勿删除!"
// "选择人员中:" + arr[0].userNickName + "是小组长,请勿删除!"
// );
// }
dialog({
content: "确定删除吗?",
ok: () => {
tableData.value.loading = true;
delGrowStudent({
ids: stuSelectKeys.value,
type: props.type,
targetId: props.id,
}).then((res) => {
batchDelStudents(stuSelectKeys.value.toString()).then((res) => {
if (res.data.code == 200) {
message.success("删除成功");
}
stuSelectKeys.value = [];
tableParam.value.pageNo = 1;
tableParam.value.pageNum = 1;
getStuList();
});
},
});
}
const deleteModalVisible = ref(false);
const deleteId = ref(null);
const deleteTargetId = ref(null);
const deleteType = ref(null);
function del(id, row) {
function del(row) {
// if (row.isLeader === "1") {
// return message.warning("" + row.name + "是小组长,请勿删除!");
// }
deleteModalVisible.value = true;
deleteId.value = id;
deleteTargetId.value = row.pid;
deleteType.value = row.type;
dialog({
content: "确定删除吗?",
ok: () => {
tableData.value.loading = true;
batchDelStudents(row.id).then((res) => {
if (res.data.code == 200) {
message.success("删除成功");
}
getStuList();
});
},
});
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
tableData.value.loading = true;
delGrowStudent({
ids: [deleteId.value],
targetId: deleteTargetId.value,
type: deleteType.value,
}).then((res) => {
if (res.data.code == 200) {
message.success("删除成功");
}
tableParam.value.pageNo = 1;
getStuList();
});
deleteModalVisible.value = false;
}
};
//取消
const closeSameModal = () => {
deleteModalVisible.value = false;
deleteId.value = null;
deleteTargetId.value = null;
deleteType.value = null;
};
function submitCall(flag) {
function submitCall(selectList) {
tableData.value.loading = true;
if (!flag) {
addLearners({
growthId: props.id,
studentIds: selectList.map((item) => item.userNo),
}).then((res) => {
tableData.value.loading = false;
}
flag && getStuList();
// flag && start();
message.success("添加成功");
getStuList();
});
}
// 查看学员
const Seevisible = ref(false);
const checkStuId = ref(null);
const projectId = ref(null);
const seeStuRef = ref(false);
function seeStudent(record) {
console.log(record);
checkStuId.value = record.id;
projectId.value = props.id;
Seevisible.value = true;
console.log(props.type);
console.log(checkStuId.value, projectId.value);
seeStuRef.value.openDrawer(record);
}
//导入学员