Merge branch '250213-prod-master_1202-gx-copy' into test20250220

This commit is contained in:
gengxin
2025-02-24 16:54:16 +08:00
6 changed files with 164 additions and 70 deletions

View File

@@ -41,7 +41,10 @@ export const deleteTask = (ids) => http.get('/professional/task/delete/' + ids)
//获取岗位
export const getStdPosition = (obj) => http.get('/professional/compulsory/getStdPositionList', { params: obj })
//获取Band
export const getBandList = (obj) => http.get('/professional/compulsory/getBandList', { params: obj })
export const getBandList = (obj) => http.get('/professional/allocation/getBandList', { params: obj })
//获取Band
export const getOrgList = (obj) => http.get('/professional/allocation/getOrgList', { params: obj })
//获取职级
export const getQualsLevelCode = (obj) => http.get('/professional/compulsory/getQualsLevelCodeList', { params: obj })
@@ -49,7 +52,7 @@ export const getQualsLevelCode = (obj) => http.get('/professional/compulsory/get
export const downLoadImpTemplate = () => http.post(`/professional/allocation/downloadTemplate.do`)
//列表排序
export const toSortTask = (ids) => http.get(`/professional/task/sortTask/` + ids)
export const toSortTask = (ids, type) => http.get(`/professional/task/sortTask/${ids}?type=${type}`)
//删除学员
export const batchDelStudents = (ids) => http.get(`/professional/allocation/batchDelStudents/` + ids)
@@ -88,7 +91,7 @@ export const boeuGrowthPlatePageList = (obj) => http.post('/boeu/growth/pageList
// 是否按顺序学习
export const openOrCloseSortSwitch = (growthId) => http.get('/professional/task/openOrCloseSortSwitch/' + growthId,)
export const openOrCloseSortSwitch = (growthId, type) => http.get(`/professional/task/openOrCloseSortSwitch/${growthId}?type=${type}`,)
// 新建专业力必修
export const saveGrowth = (data) => http.post('/professional/compulsory/saveGrowth', data)

View File

@@ -78,26 +78,41 @@
class="chooseLeft"
style="display: grid; grid-template-columns: 250px auto"
>
<div style="border: 1px solid #f0f0f0">
<div class="tree" style="margin: 10px 4px 0 10px">
<a-tree
allow-clear
tree-default-expand-all
:tree-data="treeData"
:load-data="onLoadData"
v-model:selectedKeys="stuTreeSelectKeys"
v-model:expandedKeys="stuTreeExpandedKeys"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
@select="stuStuOrgSelect"
>
</a-tree>
<a-spin :spinning="treeSpin">
<div
style="border: 1px solid #f0f0f0"
:style="{
height: screenHeight - 180 + 'px',
overflowY: 'auto',
}"
>
<a-input-search
v-model:value="nameSearch.departName"
placeholder="请输入部门名称"
@search="getOrgList"
/>
<div class="tree" style="margin: 10px 4px 0 10px">
<a-tree
allow-clear
tree-default-expand-all
:tree-data="treeData"
:load-data="onLoadData"
v-model:selectedKeys="stuTreeSelectKeys"
v-model:expandedKeys="stuTreeExpandedKeys"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
@select="stuStuOrgSelect"
>
</a-tree>
</div>
</div>
</div>
</a-spin>
<div
class="tableBox tabb"
style="margin: 0px 4px 0 10px; border: 1px solid #f0f0f0"
@@ -271,18 +286,28 @@ const activeKey = ref(1);
const nameSearch = ref({
keyword: "",
departId: "",
departName: "",
});
const stuTreeSelectKeys = ref([]);
const stuTreeExpandedKeys = ref([]);
const treeData = ref([]);
request(ORG_LIST, {
keyword: "",
}).then((res) => {
treeData.value = res.data;
});
const treeSpin = ref(false);
const getOrgList = () => {
treeSpin.value = true;
request(ORG_LIST, {
keyword: nameSearch.value.departName,
})
.then((res) => {
treeData.value = res.data;
})
.finally(() => {
treeSpin.value = false;
});
};
getOrgList();
const stuColumns = ref([
{
title: "姓名",
@@ -350,7 +375,9 @@ function stuStuOrgSelect(e) {
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: "" });
nameSearch.value.departName = "";
stuTableRef.value.reset({ keyword: "", departId: "", departName: "" });
getOrgList();
};
//清空选择部门信息
const deleteDepSelect = () => {
@@ -360,13 +387,13 @@ const deleteDepSelect = () => {
//确定添加授权
const confirm = () => {
if(!stuSelectRows.value.length && !projectSelectRows.value.length){
message.warning('请选择学员')
return
if (!stuSelectRows.value.length && !projectSelectRows.value.length) {
message.warning("请选择学员");
return;
}
visiable.value = false;
emit("confirm", stuSelectRows.value, projectSelectRows.value);
closeDrawer()
closeDrawer();
};
onMounted(() => {
@@ -395,7 +422,7 @@ onMounted(() => {
margin-left: 24px;
}
.CommonStudent {
.ant-form-item{
.ant-form-item {
display: flex;
align-items: center;
}

View File

@@ -6,16 +6,26 @@
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="归属组织" style="min-width: 170px">
<a-form-item title="Band职级" style="width: 193px">
<div class="select in">
<a-select
v-model:value="tableParam.organizationId"
placeholder="请选择归属组织"
:options="organizationOption"
allowClear
></a-select>
</div>
</a-form-item>
<!-- <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-form-item> -->
</a-col>
<a-col>
<!-- <a-col>
<a-form-item title="选择岗位" style="min-width: 170px">
<div class="select in">
<PostSelect v-model:value="tableParam.stdPosition"> </PostSelect>
@@ -32,7 +42,7 @@
></OfficeSelect>
</div>
</a-form-item>
</a-col>
</a-col> -->
<a-col>
<a-form-item title="Band职级" style="width: 193px">
<div class="select in">
@@ -40,7 +50,6 @@
v-model:value="tableParam.bandCode"
placeholder="请选择Band职级"
:options="bandOption"
notFoundContent="请先选择任职资格"
allowClear
></a-select>
</div>
@@ -299,6 +308,7 @@ import {
allocationList,
addLearners,
getBandList,
getOrgList,
} from "@/api/growthpath";
import GrowthCommonStudent from "./GrowthCommonStudent";
import { message } from "ant-design-vue";
@@ -352,6 +362,8 @@ const addSut = () => {
const visibleName = ref([]);
// band职级选项
const bandOption = ref([]);
// 归属组织选项
const organizationOption = ref([]);
// 加入方式选项
const statusValues = ref([
{ value: "1", label: "系统加入" },
@@ -368,7 +380,6 @@ const officeSelectChange = () => {
}).then((res) => {
// 清空筛选band职级的值
tableParam.value.bandCode = null;
bandOption.value = res.data.data.map((item) => {
return {
value: item,
@@ -377,6 +388,35 @@ const officeSelectChange = () => {
});
});
};
const getBandListData = () => {
getBandList({
growthId: props.growId,
}).then((res) => {
// 清空筛选band职级的值
tableParam.value.bandCode = null;
bandOption.value = res.data.data.map((item) => {
return {
value: item.bandCode,
label: item.bandCode,
};
});
});
};
const getorganizationOption = () => {
getOrgList({
growthId: props.growId,
}).then((res) => {
// 清空筛选band职级的值
organizationOption.value = res.data.data.map((item) => {
return {
value: item.orgId,
label: item.orgName,
};
});
});
};
getorganizationOption();
getBandListData();
const tablecolumns = ref([
{
title: "姓名",
@@ -406,24 +446,24 @@ const tablecolumns = ref([
className: "h",
ellipsis: true,
},
{
title: "标准岗位",
dataIndex: "stdPositionName",
key: "stdPositionName",
width: 170,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "任职资格等级",
dataIndex: "qualsLevelDesr",
key: "qualsLevelDesr",
width: 100,
align: "center",
className: "h",
ellipsis: true,
},
// {
// title: "标准岗位",
// dataIndex: "stdPositionName",
// key: "stdPositionName",
// width: 170,
// align: "center",
// className: "h",
// ellipsis: true,
// },
// {
// title: "任职资格等级",
// dataIndex: "qualsLevelDesr",
// key: "qualsLevelDesr",
// width: 100,
// align: "center",
// className: "h",
// ellipsis: true,
// },
{
title: "Band职级",
dataIndex: "bandCode",

View File

@@ -467,7 +467,7 @@ export default {
bg_check: false,
statusPostCreate: [],
statusRankCreate: [],
courseNum: "",
courseNum: "0",
isPublished: false,
matStudens: "",
elePublishedNum: 0, // 选修发布数量
@@ -496,6 +496,7 @@ export default {
});
const handleOut = () => {
state.bg_check = true;
state.courseNum = 0;
};
const releaseLearnPath = (item) => {
dialog({
@@ -686,7 +687,7 @@ export default {
return message.error("请输入任职资格等级");
}
if (state.courseNum !== 0 && !state.courseNum) {
return message.error("请输入完成选修数量");
state.courseNum = 0;
}
if (state.editId && state.isPublished) {
if (state.courseNum > state.elePublishedNum) {

View File

@@ -232,7 +232,7 @@
<a-radio-group
button-style="solid"
v-model:value="courseType"
@change="getListTask"
@change="tabsChange"
>
<a-radio-button value="1">必修</a-radio-button>
<a-radio-button value="2">选修</a-radio-button>
@@ -241,7 +241,7 @@
<div class="switch">
<a-switch
@change="sortSwitchChange"
v-model:checked="basicData.sortSwitch"
v-model:checked="sortSwitch"
/>
<div style="margin-left: 5px">是否按顺序学习</div>
</div>
@@ -792,6 +792,7 @@ export default {
const state = reactive({
homeworkModelVisible: false,
activeKey: "1",
sortSwitch: false,
FSvisible: false,
facestudent: false,
commonData: null,
@@ -856,7 +857,7 @@ export default {
// 开启加载弹窗getListTask请求完成后会关闭弹框
state.spinning = true;
const listIds = state.listTaskData.map((item) => item.id).join(",");
toSortTask(listIds).then((res) => {
toSortTask(listIds, state.courseType).then((res) => {
getListTask();
});
};
@@ -1040,6 +1041,14 @@ export default {
});
}
};
// 必修选修切换
const tabsChange = () => {
console.log(state.sortSwitch, state.courseType);
state.courseType === "1"
? (state.sortSwitch = state.basicData.sortSwitch)
: (state.sortSwitch = state.basicData.eleSortSwitch);
getListTask();
};
const releaseLearnPath = () => {
dialog({
content: "确定发布当前任务?",
@@ -1341,6 +1350,7 @@ export default {
if (res.data.code === 200) {
state.basicData = res.data.data;
state.basicData.createTime = state.basicData.createTime.split("T")[0];
state.sortSwitch = state.basicData.sortSwitch;
}
});
//概览
@@ -1387,17 +1397,29 @@ export default {
// 是否自动学习开关
const sortSwitchChange = (val) => {
dialog({
content: `请确认是否${val ? "启用" : "停用"}按顺序学习?`,
content: `
${
val
? "开启后系统将根据排序自动生成学习顺序,"
: "关闭后系统将自动重置当前学习顺序,"
}
请确认是否${val ? "开启" : "关闭"}
`,
ok: () => {
// 开启加载弹窗getListTask请求完成后会关闭弹框
state.spinning = true;
openOrCloseSortSwitch(state.routerId).then((res) => {
message.success("操作成功");
getListTask();
});
openOrCloseSortSwitch(state.routerId, state.courseType).then(
(res) => {
message.success("操作成功");
getListTask();
state.courseType == "1"
? (state.basicData.sortSwitch = state.sortSwitch)
: (state.basicData.eleSortSwitch = state.sortSwitch);
}
);
},
close: () => {
state.basicData.sortSwitch = !state.basicData.sortSwitch;
state.sortSwitch = !state.sortSwitch;
},
});
};
@@ -1411,6 +1433,7 @@ export default {
resize,
releaseLearnPath,
sortSwitchChange,
tabsChange,
showStudent,
showTest,
showOnline,

View File

@@ -19,7 +19,7 @@ module.exports = defineConfig({
},
proxy: {
"/professional": {
target: 'http://192.168.66.211:32002',
target: 'http://192.168.31.211:32002',
// target: 'http://192.168.50.195:32002',
// target: 'http://192.168.86.195:32002',
changeOrigin: true,