mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
讲师管理
This commit is contained in:
@@ -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 getCertificationProcess = (data) => http.post('/activityApi/teacher/getCertificationProcess',data)
|
||||||
//编辑认证
|
//编辑认证
|
||||||
export const updateExamine = (data) => http.post('/activityApi/examine/updateExamine',data)
|
export const updateExamine = (data) => http.post('/activityApi/examine/updateExamine',data)
|
||||||
|
//添加权限 0: 查看 2: 管理
|
||||||
|
export const addPermission = (data) => http.post('/activityApi/permission/addPermission',data)
|
||||||
|
|||||||
@@ -300,6 +300,7 @@
|
|||||||
import {
|
import {
|
||||||
saveStu,
|
saveStu,
|
||||||
} from "@/api/index1";
|
} from "@/api/index1";
|
||||||
|
import {addPermission} from '@/api/examineApi.js'
|
||||||
import dialog from "@/utils/dialog";
|
import dialog from "@/utils/dialog";
|
||||||
import BaseTable from "@/components/common/BaseTable";
|
import BaseTable from "@/components/common/BaseTable";
|
||||||
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
|
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
|
||||||
@@ -358,6 +359,14 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
permissionType:{
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
examineId:{
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const projectSelectKeys = ref([]);
|
const projectSelectKeys = ref([]);
|
||||||
const projectSelectRows = ref([]);
|
const projectSelectRows = ref([]);
|
||||||
@@ -588,6 +597,7 @@
|
|||||||
//清空选择部门信息
|
//清空选择部门信息
|
||||||
const deleteDepSelect = () => {
|
const deleteDepSelect = () => {
|
||||||
stuSelectRows.value = [];
|
stuSelectRows.value = [];
|
||||||
|
dataLists.value = []
|
||||||
selectedOrgKeys.value = [];
|
selectedOrgKeys.value = [];
|
||||||
projectSelectKeys.value = [];
|
projectSelectKeys.value = [];
|
||||||
};
|
};
|
||||||
@@ -617,7 +627,21 @@
|
|||||||
}
|
}
|
||||||
handleStageOk();
|
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() {
|
function handleStageOk() {
|
||||||
if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) {
|
if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) {
|
||||||
return message.warning("添加小组学员超过最大值");
|
return message.warning("添加小组学员超过最大值");
|
||||||
@@ -626,18 +650,7 @@
|
|||||||
visiable.value = false;
|
visiable.value = false;
|
||||||
emit("finash", false);
|
emit("finash", false);
|
||||||
nameSearch.value.keyword = "";
|
nameSearch.value.keyword = "";
|
||||||
saveStu({
|
addPermission(dataLists.value).then(() => {
|
||||||
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(() => {
|
|
||||||
deleteDepSelect();
|
deleteDepSelect();
|
||||||
emit("finash", true);
|
emit("finash", true);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const createParam = ref({
|
|||||||
index:''
|
index:''
|
||||||
})
|
})
|
||||||
const imgClick = (item) => {
|
const imgClick = (item) => {
|
||||||
console.log(url,'url')
|
console.log(item,'url')
|
||||||
createParam.value.cover = item.url
|
createParam.value.cover = item.url
|
||||||
createParam.value.index = item.id
|
createParam.value.index = item.id
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@ function handleOper(record, type, status = "") {
|
|||||||
<div style="display: flex;flex-direction: column;">
|
<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> -->
|
<!-- <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="''">
|
<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>
|
</a-button>
|
||||||
@@ -435,10 +435,10 @@ function handleOper(record, type, status = "") {
|
|||||||
:type="9"
|
:type="9"
|
||||||
>权限名单</OwnerTableModelStudent
|
>权限名单</OwnerTableModelStudent
|
||||||
>
|
>
|
||||||
<CommonStudent :type="7" :id="record.id" title="查看权"
|
<CommonStudent :type="7" :permissionType="0" :examineId="record.id" :id="record.id" title="查看权"
|
||||||
>查看权</CommonStudent
|
>查看权</CommonStudent
|
||||||
>
|
>
|
||||||
<CommonStudent :type="8" :id="record.id" title="管理权"
|
<CommonStudent :type="8" :permissionType="2" :examineId="record.id" :id="record.id" title="管理权"
|
||||||
>管理权</CommonStudent
|
>管理权</CommonStudent
|
||||||
>
|
>
|
||||||
</DropDown>
|
</DropDown>
|
||||||
|
|||||||
@@ -709,11 +709,9 @@ const attestation = ref([])
|
|||||||
const scoreTwo = ref()
|
const scoreTwo = ref()
|
||||||
const scoreOne = ref()
|
const scoreOne = ref()
|
||||||
const show= async (record)=>{
|
const show= async (record)=>{
|
||||||
showViewInstructor.value=true
|
|
||||||
await getDataById({teacherId:record.teacherId}).then(res=>{
|
await getDataById({teacherId:record.teacherId}).then(res=>{
|
||||||
console.log(res,'res')
|
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
console.log(res.data,'data')
|
showViewInstructor.value=true
|
||||||
techerDetail.value = res.data
|
techerDetail.value = res.data
|
||||||
if(techerDetail.value.firstList){
|
if(techerDetail.value.firstList){
|
||||||
const totalScore = techerDetail.value.firstList.reduce((acc, item) => acc + item.score, 0);
|
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;
|
const averageScore = totalScore / techerDetail.value.secondList.length;
|
||||||
scoreTwo.value = averageScore.toFixed(2)
|
scoreTwo.value = averageScore.toFixed(2)
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
message.error('暂无数据')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await getCertificationProcess({teacherId:record.teacherId}).then(res=>{
|
await getCertificationProcess({teacherId:record.teacherId}).then(res=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user