From 8627d11239e014dedf2ce2898254e6e6bc194ab5 Mon Sep 17 00:00:00 2001
From: Pengxiansen <2422914688@qq.com>
Date: Mon, 24 Feb 2025 16:51:13 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/growthpath.js | 9 +-
.../growthpath/GrowthCommonStudent.vue | 89 ++++++++++++-------
src/components/growthpath/StudentManage.vue | 88 +++++++++++++-----
src/views/growthpath/GrowthPath.vue | 5 +-
src/views/growthpath/PathManage.vue | 41 +++++++--
vue.config.js | 2 +-
6 files changed, 164 insertions(+), 70 deletions(-)
diff --git a/src/api/growthpath.js b/src/api/growthpath.js
index 7378c185..03849fdc 100644
--- a/src/api/growthpath.js
+++ b/src/api/growthpath.js
@@ -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)
diff --git a/src/components/growthpath/GrowthCommonStudent.vue b/src/components/growthpath/GrowthCommonStudent.vue
index 83e31775..cf49d854 100644
--- a/src/components/growthpath/GrowthCommonStudent.vue
+++ b/src/components/growthpath/GrowthCommonStudent.vue
@@ -78,26 +78,41 @@
class="chooseLeft"
style="display: grid; grid-template-columns: 250px auto"
>
-
-
+
+
{
- 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;
}
diff --git a/src/components/growthpath/StudentManage.vue b/src/components/growthpath/StudentManage.vue
index f60e9c78..56e4d0a4 100644
--- a/src/components/growthpath/StudentManage.vue
+++ b/src/components/growthpath/StudentManage.vue
@@ -6,16 +6,26 @@
style="padding-left: 20px; margin-right: 0px"
>
-
+
+
+
+
-
+
@@ -40,7 +50,6 @@
v-model:value="tableParam.bandCode"
placeholder="请选择Band职级"
:options="bandOption"
- notFoundContent="请先选择任职资格"
allowClear
>
@@ -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",
diff --git a/src/views/growthpath/GrowthPath.vue b/src/views/growthpath/GrowthPath.vue
index 8ebce3bc..89e44c6e 100644
--- a/src/views/growthpath/GrowthPath.vue
+++ b/src/views/growthpath/GrowthPath.vue
@@ -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) {
diff --git a/src/views/growthpath/PathManage.vue b/src/views/growthpath/PathManage.vue
index 6c5ae29f..358e468c 100644
--- a/src/views/growthpath/PathManage.vue
+++ b/src/views/growthpath/PathManage.vue
@@ -232,7 +232,7 @@
必修
选修
@@ -241,7 +241,7 @@
@@ -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,
diff --git a/vue.config.js b/vue.config.js
index c5c32767..4dc6c0d4 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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,