讲师认证

This commit is contained in:
zhangsir
2024-05-16 17:21:38 +08:00
parent 979c7e6a33
commit d2002edd8d
4 changed files with 53 additions and 34 deletions

View File

@@ -82,7 +82,7 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane v-if="!selectStu" :key="2" tab="添加组织">
<a-tab-pane v-if="!selectStu&&typeLists" :key="2" tab="添加组织">
<div :style="{ height: screenHeight - 235 + 'px' }">
<div class="tab2">
<a-form-item label="组织:">
@@ -112,7 +112,7 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane v-if="!selectStu" :key="3" tab="受众关联">
<a-tab-pane v-if="!selectStu&&typeLists" :key="3" tab="受众关联">
<div :style="{ height: screenHeight - 235 + 'px' }">
<div>
<a-form-item label="受众名称:">
@@ -140,7 +140,7 @@
</a-tab-pane>
</a-tabs>
</div>
<div class="right1" style="min-width: 200px">
<div v-if="typeLists" class="right1" style="min-width: 200px">
<div class="onerow">
<div class="onleft">
<div class="already">已选</div>
@@ -367,6 +367,10 @@
examineId:{
type: String,
default: null
},
typeLists:{
type: Boolean,
default: true
}
});
const projectSelectKeys = ref([]);
@@ -634,7 +638,6 @@
if(val.length!=0){
console.log(val,'val')
dataLists.value = val.map(item=>{
console.log(item,'item')
return{
examineId:props.examineId,
name:item.realName,
@@ -648,6 +651,18 @@
if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) {
return message.warning("添加小组学员超过最大值");
}
if(!props.typeLists){
if(stuSelectRows.value.length==0){
message.error("请选择人员")
return
}
if(stuSelectRows.value.length>1){
message.error("归属权仅可选择一人,请重新选择")
stuTableRef.value.clear()
}
return
}
stageVisible.value = false;
visiable.value = false;
emit("finash", false);
@@ -672,7 +687,6 @@
stuTreeExpandedKeys.value = [];
stuTreeSelectKeys.value = [];
activeKey.value = props.isGroup ? 4 : 1;
projectParams.value.studentName = "";
nameSearch.value.keyword = "";
searchOrgName.value.keyword = "";

View File

@@ -788,7 +788,7 @@ const returnPage = (record) => {
content: "确定退回初稿吗?",
ok:()=>{
backDraft({
teacherId:record.id,
teacherId:record.teacherId,
version:0
}).then(res=>{
console.log(res,'res')
@@ -801,7 +801,7 @@ const returnPageTwo = (record) => {
content: "确定退回初稿吗?",
ok:()=>{
backDraft({
teacherId:record.id,
teacherId:record.teacherId,
version:1
}).then(res=>{
console.log(res,'res')
@@ -897,7 +897,7 @@ const vwtext = ref(null)
<div style="display: flex; align-items: center; margin-top: 15px;margin-bottom: 15px;">
<div class="btns" style="margin-left: 15px;margin-bottom: 4.5px">
<proj-check-ship @finash="translate">
<proj-check-ship :type="13" :id="route.query.id" @finash="translate">
<div class="btn btn3" >
<div class="search"></div>
<div class="btnText" @click="Tecvisible=true">添加讲师</div>

View File

@@ -73,16 +73,16 @@
<template #action="{ record }">
<a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot>
<CommonStudent v-if="record.permissionType == 2"
:type="7" :typeLists="false" :permissionType="0" :examineId="record.id" :id="record.id" title="归属权"
>转移归属权</CommonStudent
>
<a-button
v-if="
record.type !== 6 &&
record.type !== 9 &&
record.type !== 12
"
v-else
@click="del(record)"
type="link"
>转移归属权</a-button
>删除</a-button
>
</a-space>
</template>
@@ -138,6 +138,7 @@
watch,
onMounted,
} from "vue";
import CommonStudent from "./CommonTeacher";
import { usePage } from "@/api/request";
import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1";
@@ -195,8 +196,8 @@ import { message } from "ant-design-vue";
const columns = ref([
{
title: "姓名",
dataIndex: "createName",
key: "createName",
dataIndex: "name",
key: "name",
width: 30,
align: "center",
ellipsis: true,
@@ -227,7 +228,7 @@ import { message } from "ant-design-vue";
({
0: "查看权",
1: "管理权",
2: "管理权",
2: "归属权",
7: "查看权",
8: "管理权",
9: "归属权",

View File

@@ -383,6 +383,10 @@
const teaunm = ref([])
watch(stuSelectRows,(val)=>{
console.log(val,'val')
if(val.length == 0){
teaunm.value = []
return
}
teaunm.value = val.map((res,index)=>{
return {
teacherName:res.realName,
@@ -390,7 +394,7 @@
}
})
console.log(teaunm.value);
})
},{deep:true})
const person = ref(false);
const group = ref(false);
const visiable = ref(false);
@@ -649,27 +653,27 @@ const route = useRoute()
teachers: teaunm.value,
deptIds: deptList.value?.map((e) => e.id),
groupIds: auditSelectRows.value?.map((e) => e.id),
}).then(() => {
}).then(() => {
deleteDepSelect();
emit("finash", true);
message.info('添加成功');
});
// 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(() => {
// deleteDepSelect();
// emit("finash", true);
// });
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(() => {
deleteDepSelect();
emit("finash", true);
});
}
// 搜索受众值发生变化
function orgValue(value) {