专业力必修提交

This commit is contained in:
Pengxiansen
2025-01-23 23:27:54 +08:00
parent f1956e6249
commit 1bab523091
13 changed files with 1028 additions and 1020 deletions

View File

@@ -5,10 +5,20 @@
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="归属组织" style="min-width: 170px">
<div class="select in">
<OrgClass
v-model:value="tableParam.organizationId"
:placeName="'请选择归属组织'"
></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="tableParam.qualsLevelCode"> </PostSelect>
<PostSelect v-model:value="tableParam.stdPosition"> </PostSelect>
</div>
</a-form-item>
</a-col>
@@ -16,20 +26,21 @@
<a-form-item title="选择职级" style="min-width: 170px">
<div class="select in">
<OfficeSelect
v-model:value="tableParam.stdPosition"
:searchData="tableParam.qualsLevelCode"
v-model:value="tableParam.qualsLevelCode"
:searchData="tableParam.stdPosition"
@change="officeSelectChange"
></OfficeSelect>
</div>
</a-form-item>
</a-col>
<a-col>
<a-form-item title="加入方式" style="width: 193px">
<a-form-item title="Band职级" style="width: 193px">
<div class="select in">
<a-select
v-model:value="tableParam.joinMethod"
placeholder="请选择加入方式"
:options="statusValues"
@change="selectstatusValue"
v-model:value="tableParam.bandCode"
placeholder="请选择Band职级"
:options="bandOption"
notFoundContent="请先选择任职资格"
allowClear
></a-select>
</div>
@@ -39,11 +50,23 @@
<a-form-item title="姓名:" style="width: 170px">
<a-input
class="cus-input"
v-model:value="tableParam.keyword"
placeholder="请输入姓名"
v-model:value="tableParam.username"
placeholder="请输入姓名/工号"
/>
</a-form-item>
</a-col>
<a-col>
<a-form-item title="加入方式" style="width: 193px">
<div class="select in">
<a-select
v-model:value="tableParam.joinMethod"
placeholder="请选择加入方式"
:options="statusValues"
allowClear
></a-select>
</div>
</a-form-item>
</a-col>
<a-col>
<a-button
class="cus-btn"
@@ -93,7 +116,6 @@
:id="id"
@confirm="submitCall"
:stage="stage"
:coulmsList="coulmsList"
:selectStu="true"
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
@@ -102,7 +124,7 @@
style="margin-right: 10px"
src="../../assets/images/courseManage/add0.png"
/></template>
添加学员
新增学员
</a-button>
</GrowthCommonStudent>
</a-col>
@@ -132,7 +154,7 @@
style="margin-right: 10px"
src="../../assets/images/projectadd/delete.png"
/></template>
批量删除
批量删除学员
</a-button>
</a-col>
<a-col :span="1.5">
@@ -149,21 +171,6 @@
导出学员信息
</a-button>
</a-col>
<!-- <a-col :span="1.5">
<a-button
class="cus-btn"
@click="showTexts"
style="background: #ffffff; color: #578afc; border: 1px solid #578afc"
>
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/projectadd/edit.png"
/></template>
导入记录
</a-button>
</a-col> -->
</a-row>
<div class="tips">
@@ -260,11 +267,6 @@
:courseId="id"
:courseType="type"
/>
<!-- <GrowShowText
:permissions="permissions"
@isSearchList="isSearchLists"
v-model:showText="showText"
/> -->
</template>
<script setup lang="jsx">
import { computed, defineProps, onMounted, ref, watch } from "vue";
@@ -275,6 +277,7 @@ import {
batchDelStudents,
allocationList,
addLearners,
getBandList,
} from "@/api/growthpath";
import GrowthCommonStudent from "./GrowthCommonStudent";
import { message } from "ant-design-vue";
@@ -284,7 +287,7 @@ import { checkGrowthPer } from "@/utils/utils";
import dialog from "@/utils/dialog";
import PostSelect from "@/components/growthpath/PostSelect";
import OfficeSelect from "@/components/growthpath/OfficeSelect";
import GrowShowText from "@/components/growthpath/GrowShowText";
import OrgClass from "@/components/growthpath/OrgClass";
const props = defineProps({
type: Number,
permissions: {
@@ -316,35 +319,41 @@ const props = defineProps({
type: Array,
default: () => [],
},
params: {
type: Object,
default: () => ({}),
},
growId: String,
});
// const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
const topFlagList = ref([
{
id: 0,
value: 0,
label: "普通学员",
},
{
id: 1,
value: 1,
label: "优秀学员",
},
]);
const visibleName = ref([]);
// band职级选项
const bandOption = ref([]);
// 加入方式选项
const statusValues = ref([
{ value: "0", label: "岗位匹配" },
{ value: "1", label: "手动加入" },
{ value: "1", label: "自动匹配" },
{ value: "2", label: "手动匹配" },
{ value: "3", label: "导入" },
{ value: "4", label: "添加" },
]);
const getRowClass = (record) => {
return record.moveStatus ? "row-moveStatus-true" : "";
};
// 职级change
const officeSelectChange = () => {
getBandList({
stdPosition: tableParam.value.stdPosition,
qualsLevelCode: tableParam.value.qualsLevelCode,
}).then((res) => {
// 清空筛选band职级的值
tableParam.value.bandCode = null;
bandOption.value = res.data.data.map((item) => {
return {
value: item,
lable: item,
};
});
});
};
const tablecolumns = ref([
{
title: "姓名",
@@ -367,32 +376,39 @@ const tablecolumns = ref([
},
{
title: "归属组织",
dataIndex: "studentOrgName",
key: "studentOrgName",
dataIndex: "orgName",
key: "orgName",
width: 230,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "岗位",
dataIndex: "studentJobName",
key: "studentJobName",
title: "标准岗位",
dataIndex: "stdPositionName",
key: "stdPositionName",
width: 170,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "Band",
dataIndex: "studentBandCode",
key: "studentBandCode",
title: "任职资格等级",
dataIndex: "qualsLevelDesr",
key: "qualsLevelDesr",
width: 100,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "Band职级",
dataIndex: "bandName",
key: "bandName",
width: 100,
align: "center",
className: "h",
ellipsis: true,
// customRender: ({ record: { studentOrgName, studentDepartName } }) =>
// allDepartShow(studentOrgName, studentDepartName),
},
{
title: "加入方式",
@@ -403,7 +419,7 @@ const tablecolumns = ref([
customRender: ({ record: { joinMethod } }) =>
({
1: "自动匹配",
2: "手动添加",
2: "手动匹配",
3: "导入",
4: "添加",
}[joinMethod]),
@@ -412,17 +428,15 @@ const tablecolumns = ref([
title: "进度",
width: 100,
align: "center",
dataIndex: "finishNeedfinish",
key: "finishNeedfinish",
dataIndex: "progress",
key: "progress",
className: "h",
customRender: ({ record }) => (
<div class="text">
{record.finishTaskNum || 0}/{record.needFinishTaskNum || 0}
</div>
<div class="text">{record.progress || 0}%</div>
),
},
{
title: "状态",
title: "完成状态",
dataIndex: "finishStatus",
key: "finishStatus",
width: 100,
@@ -447,56 +461,12 @@ const tablecolumns = ref([
},
]);
function allDepartShow(a, b) {
let org =
a == "" || a == null || a == undefined
? (a = "")
: a.slice(0, 1) == "/"
? a.slice(1, a.length)
: a;
let depart = b == "" || b == null || b == undefined ? (b = "") : b;
let allname = org == "" && depart == "" ? "-" : org + depart;
return allname;
}
const isSearchLists = (item) => {
console.log(item, "item");
getStuList();
};
const coulmsList = ref([
{
title: "岗位",
dataIndex: "jobName",
key: "jobName",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "职级",
dataIndex: "bandCode",
key: "bandCode",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
]);
const tableParam = ref({
joinMethod: null,
keyword: "", //学员名称
// groupName: "", //学员小组
// studentDepartName: null, //部门名称
topFlag: null, //是否是优秀学员
username: "", //学员名称
pageNum: 1,
status: 1,
pageSize: 10,
type: props.type,
// pid: props.id,
growthId: props.growId,
...props.params,
bandCodeList: "",
positionNameList: "",
});
const stuSelectKeys = ref([]);
@@ -520,19 +490,26 @@ function search() {
// 导出数据
function exportTaskStu() {
console.log("props.datasource", props);
window.open(
`${
process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${14}&pid=${props.id}`
buildUrl(
`${process.env.VUE_APP_BOE_API_URL}${process.env.VUE_APP_BASE_API_GROWTH}/professional/allocation/export`,
tableParam.value
)
);
// window.open(
// buildUrl(
// "http://192.168.18.141:32002/professional/allocation/export",
// tableParam.value
// )
// );
}
function buildUrl(url, params) {
const searchParams = new URLSearchParams();
Object.keys(params).forEach((key) => {
searchParams.append(key, params[key]);
});
return `${url}?${searchParams.toString()}`;
}
const showText = ref(false);
const showTexts = () => {
showText.value = true;
};
onMounted(() => {
// debugger
console.log("props.activeKey1" + props.activeKey1);
@@ -587,14 +564,14 @@ function getStuList() {
}
function reset() {
tableParam.value.keyword = "";
tableParam.value.username = "";
// tableParam.value.groupName = ""; //学员小组
tableParam.value.topFlag = null; //是否是优秀学员
tableParam.value.bandCodeList = "";
tableParam.value.positionNameList = "";
tableParam.value.joinMethod = null;
tableParam.value.qualsLevelCode = null;
tableParam.value.stdPosition = null;
tableParam.value.organizationId = null;
tableParam.value.bandCode = null;
getStuList();
}
@@ -646,7 +623,6 @@ function del(row) {
});
}
function submitCall(selectList) {
tableData.value.loading = true;
addLearners({