讲师管理

This commit is contained in:
zhangsir
2024-05-14 18:24:10 +08:00
parent 28221766b6
commit ddef0cd1fd
4 changed files with 35 additions and 20 deletions

View File

@@ -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)

View File

@@ -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);
});

View File

@@ -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 = "") {
<div style="display: flex;flex-direction: column;">
<!-- <div @click="ViewReviewShow=true" style="margin-bottom: 15px; height: 38px; width: 150px;background: #4ea6ff;line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">选择/新建课程</div> -->
<CreateOnline ref="onlineRef" :id="''" :type="''">
<a-button type="primary" style="border-radius: 4px">{{
<a-button type="primary" style="border-radius: 4px;margin-bottom:15px;">{{
"选择/新建课程"
}}
</a-button>
@@ -435,10 +435,10 @@ function handleOper(record, type, status = "") {
:type="9"
>权限名单</OwnerTableModelStudent
>
<CommonStudent :type="7" :id="record.id" title="查看权"
<CommonStudent :type="7" :permissionType="0" :examineId="record.id" :id="record.id" title="查看权"
>查看权</CommonStudent
>
<CommonStudent :type="8" :id="record.id" title="管理权"
<CommonStudent :type="8" :permissionType="2" :examineId="record.id" :id="record.id" title="管理权"
>管理权</CommonStudent
>
</DropDown>

View File

@@ -709,11 +709,9 @@ const attestation = ref([])
const scoreTwo = ref()
const scoreOne = ref()
const show= async (record)=>{
showViewInstructor.value=true
await getDataById({teacherId:record.teacherId}).then(res=>{
console.log(res,'res')
if(res.code == 200){
console.log(res.data,'data')
showViewInstructor.value=true
techerDetail.value = res.data
if(techerDetail.value.firstList){
const totalScore = techerDetail.value.firstList.reduce((acc, item) => acc + item.score, 0);
@@ -727,6 +725,8 @@ const show= async (record)=>{
const averageScore = totalScore / techerDetail.value.secondList.length;
scoreTwo.value = averageScore.toFixed(2)
}
}else{
message.error('暂无数据')
}
})
await getCertificationProcess({teacherId:record.teacherId}).then(res=>{