# Conflicts:
#	src/views/gratefulteacher/AddLevelImportTec.vue
This commit is contained in:
zhangsir
2024-05-16 17:49:39 +08:00
6 changed files with 59 additions and 38 deletions

View File

@@ -155,4 +155,7 @@ export const transferPermission =(data)=>{
// method: "post",
// data:data
// })
// }
// }
//依旧id查找教师
export const getTeacherId = (data) => http.get('/activityApi/teacher/getTeacherId',{params:data})

View File

@@ -186,8 +186,7 @@ import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import { useStore } from "vuex";
import {getCookieForName} from "@/api/method";
import { saveTeacher } from "@/api/examineApi";
import {errorExport} from '@/api/examineApi.js'
import { saveTeacher,getTeacherId } from "@/api/examineApi";
export default {
name: "ImpStu",
props: {
@@ -237,7 +236,7 @@ const errfile = ref(null)
if(res.code == 200){
ctx.emit("AddImpStuvisibleClose", state.isAddStudent);
}
})
state.successIds = []
@@ -282,7 +281,7 @@ const errfile = ref(null)
// state.addLoading = true;
state.uploadErr = false;
state.uploadpercent = parseInt(info.file.percent);
console.log("我是文件上传的进度---------->", info.file.percent);
const status = info.file.status;
if (status !== "uploading") {

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

@@ -772,7 +772,7 @@ const show= async (record)=>{
attestation.value =[
//0: 已上传 1: 未上传 2:已退回
{name:{0:'初稿已上传',1:'初稿未上传',2:'初稿已退回'},status:processData?.value.draftStatus,images:{0:'su1.png',1:'s1.png',2:'e2.png'}},
{name:{0:'线上学习已完成',1:'线上学习未完成',2:'线上学习已退回'},status:processData?.value.onlineLearning,images:{0:'su2.png',1:'s2.png',2:''}},
{name:{0:'线上学习已完成',1:'线上学习未完成',2:'进行中'},status:processData?.value.onlineLearning,images:{0:'su2.png',1:'s2.png',2:''}},
{name:{0:'线下辅导已完成',1:'线上辅导未完成',2:'线上辅导已退回'},status:processData?.value.offlineTutoring,images:{0:'su3.png',1:'s3.png',2:''}},
{name:{0:'终稿已上传',1:'终稿未上传',2:'终稿已退回'},status:processData?.value.endStatus,images:{0:'su4.png',1:'s4.png',2:'e3.png'}},
{
@@ -805,7 +805,7 @@ const returnPage = (record) => {
content: "确定退回初稿吗?",
ok:()=>{
backDraft({
teacherId:record.id,
teacherId:record.teacherId,
version:0
}).then(res=>{
console.log(res,'res')
@@ -818,7 +818,7 @@ const returnPageTwo = (record) => {
content: "确定退回初稿吗?",
ok:()=>{
backDraft({
teacherId:record.id,
teacherId:record.teacherId,
version:1
}).then(res=>{
console.log(res,'res')
@@ -914,7 +914,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";
@@ -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) {