--项目 学员列表

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 getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
//获取、添加授权(修改版) //获取、添加授权(修改版)
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', 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 }) export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
//公共信息--------------------------------------------------- //公共信息---------------------------------------------------

View File

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

View File

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

View File

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