--项目 学员列表

This commit is contained in:
yuping
2022-12-04 21:30:19 +08:00
parent ea0e4dd2f1
commit 9ab9006fa2
4 changed files with 59 additions and 40 deletions

View File

@@ -115,6 +115,8 @@ export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo'
export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
//获取、添加授权(修改版)
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
//获取学员列表
export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj)
//获取用户登录
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
//公共信息---------------------------------------------------

View File

@@ -583,6 +583,7 @@ import {
// batchLoadList,
} from "../../utils/utils";
import * as api from "../../api/index1";
import {getStuList} from "../../api/index1";
export default {
name: "ProjCheckShip",
@@ -603,6 +604,11 @@ export default {
type: Number,
default: null,
},
//1 审核 2添加学员
type: {
type: Number,
default: 1,
},
},
setup(props, ctx) {
const store = useStore();
@@ -805,7 +811,7 @@ export default {
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (bool) {
optionAuthPerm();
props.type === 1 ? optionAuthPerm() : getStuentList()
}
};
//获取组织树
@@ -1335,33 +1341,18 @@ export default {
ctx.emit("update:addAuthList", state.selectAllArr);
closeDrawer();
};
//获取授权 坐回显
const optionAuthPerm = () => {
let obj = {
keyWord: "",
type:
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
opt: 1,
//获取学员列表
const getStuentList = () => {
getStuList({
refType: {learnPath: 1, project: 2, course: 3, addstudent: 2}[props.classify],
refId: props.selectProjectId,
pageNo: 0,
pageSize: 0,
deptList: [],
groupList: [],
studentList: [],
};
console.log("获取权限名单obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
// console.log("获取权限名单成功", res);
if (res.data.code === 200) {
extId: 0
}).then(res => {
initResp(res)
})
}
function initResp(res) {
let studentArr = res.data.data.studentList;
state.studentList = res.data.data.studentList;
state.choosepeople = res.data.data.studentList;
@@ -1390,10 +1381,33 @@ export default {
state.relationpeople = relationpeople;
console.log("获取权限名单成功", res);
}
//获取授权 坐回显
const optionAuthPerm = () => {
let obj = {
keyWord: "",
type:
props.classify === "learnPath"
? 1
: props.classify === "project"
? 2
: props.classify === "course"
? 3
: null,
tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
opt: 1,
refId: props.selectProjectId,
pageNo: 0,
pageSize: 0,
deptList: [],
groupList: [],
studentList: [],
};
console.log("获取权限名单obj", obj);
api.optionAuthPerm(obj).then((res) => {
initResp(res)
})
.catch((err) => {
console.log("获取权限名单失败", err);
});
};
return {
...toRefs(state),

View File

@@ -1027,7 +1027,8 @@
:selectProjectId="routerId"
v-model:addAuthList="addAuthList"
:authClassify="authClassify"
classify="addstudent"
classify="learnPath"
:type="2"
/>
<!-- 导入学员抽屉 -->
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />

View File

@@ -1185,7 +1185,8 @@
:selectProjectId="projectId"
v-model:addAuthList="addAuthList"
:authClassify="authClassify"
classify="addstudent"
classify="project"
:type="2"
/>
<!-- 学员管理-导入学员抽屉 -->
<import-stu v-model:Importvisible="Importvisible" />
@@ -3293,6 +3294,7 @@ export default {
};
//获取学员列表
const getStu = (obj) => {
state.loading = true
let objf = obj || {
deptIds: [], //部门
groupId: 0,