diff --git a/src/api/examineApi.js b/src/api/examineApi.js index ccd445e5..1cad3938 100644 --- a/src/api/examineApi.js +++ b/src/api/examineApi.js @@ -129,3 +129,5 @@ export const getDataById = (data) => http.post('/activityApi/teacher/getDataById export const getCertificationProcess = (data) => http.post('/activityApi/teacher/getCertificationProcess',data) //编辑认证 export const updateExamine = (data) => http.post('/activityApi/examine/updateExamine',data) +//添加权限 0: 查看 2: 管理 +export const addPermission = (data) => http.post('/activityApi/permission/addPermission',data) diff --git a/src/views/gratefulteacher/CommonTeacher.vue b/src/views/gratefulteacher/CommonTeacher.vue index 15a0f56a..8bd6c60b 100644 --- a/src/views/gratefulteacher/CommonTeacher.vue +++ b/src/views/gratefulteacher/CommonTeacher.vue @@ -300,6 +300,7 @@ import { saveStu, } from "@/api/index1"; + import {addPermission} from '@/api/examineApi.js' import dialog from "@/utils/dialog"; import BaseTable from "@/components/common/BaseTable"; import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis"; @@ -358,6 +359,14 @@ type: String, default: null, }, + permissionType:{ + type: Number, + default: null, + }, + examineId:{ + type: String, + default: null + } }); const projectSelectKeys = ref([]); const projectSelectRows = ref([]); @@ -588,6 +597,7 @@ //清空选择部门信息 const deleteDepSelect = () => { stuSelectRows.value = []; + dataLists.value = [] selectedOrgKeys.value = []; projectSelectKeys.value = []; }; @@ -617,7 +627,21 @@ } handleStageOk(); } - + const dataLists = ref([]) + watch(()=>stuSelectRows.value,(val)=>{ + if(val.length!=0){ + console.log(val,'val') + dataLists.value = val.map(item=>{ + console.log(item,'item') + return{ + examineId:props.examineId, + name:item.realName, + userNo:item.userNo, + departName:item.departName, + permissionType:props.permissionType} + }) + } + }) function handleStageOk() { if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) { return message.warning("添加小组学员超过最大值"); @@ -626,18 +650,7 @@ visiable.value = false; emit("finash", false); nameSearch.value.keyword = ""; - saveStu({ - targetId: props.id, - type: props.type, - clear: props.clear, - deptIds: deptList.value?.map((e) => e.id), - stageId: stageId.value, - groupIds: auditSelectRows.value?.map((e) => e.id), - studentList: stuSelectRows.value, - projectList: projectSelectRows.value, - groupName: props.groupName, - groupId: props.groupId, - }).then(() => { + addPermission(dataLists.value).then(() => { deleteDepSelect(); emit("finash", true); }); diff --git a/src/views/gratefulteacher/InstructorCertification.vue b/src/views/gratefulteacher/InstructorCertification.vue index 263de449..f84f740d 100644 --- a/src/views/gratefulteacher/InstructorCertification.vue +++ b/src/views/gratefulteacher/InstructorCertification.vue @@ -109,7 +109,7 @@ const createParam = ref({ index:'' }) const imgClick = (item) => { - console.log(url,'url') + console.log(item,'url') createParam.value.cover = item.url createParam.value.index = item.id } @@ -327,7 +327,7 @@ function handleOper(record, type, status = "") {