完善功能点

This commit is contained in:
zhangsir
2024-05-16 22:42:55 +08:00
parent d59afb226d
commit 9023772e28
6 changed files with 132 additions and 63 deletions

View File

@@ -148,6 +148,8 @@ export const transferPermission =(data)=>{
data:data data:data
}) })
} }
//删除权限
export const deletedPermission = (data) => http.get('/activityApi/examinePermission/deletedPermission',{params:data})
//添加权限 //添加权限
// export const addPermission = (data)=>{ // export const addPermission = (data)=>{
// return http({ // return http({

View File

@@ -104,7 +104,7 @@
</div> </div>
</div> </div>
<div <div
v-if="successNum && errfile " v-if="successNum || errfile "
:class="downloadErrUrl == '' ? 'succebox' : 'defeatbox'" :class="downloadErrUrl == '' ? 'succebox' : 'defeatbox'"
> >
<div class="lefimg"></div> <div class="lefimg"></div>
@@ -180,13 +180,15 @@
</template> </template>
<script> <script>
import { computed, reactive, toRefs,ref} from "vue"; import { computed, reactive, toRefs,ref,onMounted} from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config"; import { BATCH_IMPORT_SCORE } from "@/api/config";
import { useStore } from "vuex"; import { useStore } from "vuex";
import {getCookieForName} from "@/api/method"; import {getCookieForName} from "@/api/method";
import { saveTeacher,getTeacherId } from "@/api/examineApi"; import { saveTeacher,getTeacherId } from "@/api/examineApi";
import {boeRequest} from "@/api/request";
export default { export default {
name: "ImpStu", name: "ImpStu",
props: { props: {
@@ -222,13 +224,43 @@ export default {
fileName: "", fileName: "",
successIds: [], successIds: [],
errorIds: [], errorIds: [],
courseList: [],
studentLists: [],
}); });
const headers = { token: getCookieForName("token") }; const headers = { token: getCookieForName("token") };
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const CountingBar =ref(null) const CountingBar =ref(null)
const successNum =ref(null) const successNum =ref(null)
const errfile = ref(null) const errfile = ref(null)
onMounted(()=>{
onlineLearningList()
})
const onlineLearningList = () =>{
boeRequest('/activityApi/examine/getOnlineLearningList post').then(res=>{
state.courseList = res.data.map(item => item.courseId)
})
}
const closeDrawer = () => { const closeDrawer = () => {
if(state.successIds.length!=0){
getTeacherId({ids:state.successIds.join(',')}).then(res=>{
state.studentLists = res.data
if(state.courseList.length!=0){
state.courseList.map(item=>{
api.saveStu({
targetId: item,
type: 13,
clear: false,
deptIds: [],
groupIds: [],
studentList: state.studentLists,
projectList: [],
groupName: null,
groupId: null,
})
})
}
})
}
saveTeacher({ saveTeacher({
examineId:props.courseId, examineId:props.courseId,
teacherIds:state.successIds teacherIds:state.successIds
@@ -371,7 +403,8 @@ const errfile = ref(null)
downloadEeeorData, downloadEeeorData,
removeUpload, removeUpload,
successNum, successNum,
errfile errfile,
onlineLearningList
}; };
}, },
}; };

View File

@@ -303,8 +303,7 @@
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";
import {addPermission} from '@/api/examineApi.js' import {addPermission,transferPermission} from '@/api/examineApi.js'
const emit = defineEmits({}); const emit = defineEmits({});
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
@@ -651,6 +650,8 @@
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("添加小组学员超过最大值");
} }
// emit("finash", false);
nameSearch.value.keyword = "";
if(!props.typeLists){ if(!props.typeLists){
if(stuSelectRows.value.length==0){ if(stuSelectRows.value.length==0){
message.error("请选择人员") message.error("请选择人员")
@@ -659,19 +660,31 @@
if(stuSelectRows.value.length>1){ if(stuSelectRows.value.length>1){
message.error("归属权仅可选择一人,请重新选择") message.error("归属权仅可选择一人,请重新选择")
stuTableRef.value.clear() stuTableRef.value.clear()
}
return return
} }
stageVisible.value = false; transferPermission({
visiable.value = false; id: props.id,
emit("finash", false); examinePermission: {
nameSearch.value.keyword = ""; examineId: props.examineId,
name: stuSelectRows.value[0].realName,
userNo: stuSelectRows.value[0].userNo,
departName: stuSelectRows.value[0].departName,
permissionType: 2
}
}).then(res=>{
console.log(res,'res')
deleteDepSelect();
emit("finash", true);
})
}else{
addPermission(dataLists.value).then(() => { addPermission(dataLists.value).then(() => {
deleteDepSelect(); deleteDepSelect();
emit("finash", true); emit("finash", true);
}); });
} }
stageVisible.value = false;
visiable.value = false;
}
// 搜索受众值发生变化 // 搜索受众值发生变化
function orgValue(value) { function orgValue(value) {

View File

@@ -606,6 +606,11 @@ const columns = [
key: 'reviewResult', key: 'reviewResult',
dataIndex: 'reviewResult', dataIndex: 'reviewResult',
}, },
{
title: '二次认证',
key: 'secondResult',
dataIndex: 'secondResult',
},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
@@ -973,6 +978,11 @@ const vwtext = ref(null)
{{ text===1?'未开始':(text===2?'进行中':'已报名') }} {{ text===1?'未开始':(text===2?'进行中':'已报名') }}
</span> </span>
</template> </template>
<template v-else-if="column.key === 'secondResult'">
<span>
{{ text===1?'否':'是' }}
</span>
</template>
<template v-else-if="column.key === 'action'"> <template v-else-if="column.key === 'action'">
<span style="text-align: center;"> <span style="text-align: center;">

View File

@@ -73,8 +73,8 @@
<template #action="{ record }"> <template #action="{ record }">
<a-space :size="2"> <a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot> <slot name="extension" v-bind:data="{ record }"></slot>
<CommonStudent v-if="record.permissionType == 2" <CommonStudent @finash="handleFinash" v-if="record.permissionType == 2"
:type="7" :typeLists="false" :permissionType="0" :examineId="record.id" :id="record.id" title="归属权" :type="7" :ref="listDatas" :typeLists="false" :permissionType="0" :examineId="id" :id="record.id" title="归属权"
>转移归属权</CommonStudent >转移归属权</CommonStudent
> >
<a-button <a-button
@@ -114,7 +114,7 @@
<div class="close_exit" @click="closeSameModal"></div> <div class="close_exit" @click="closeSameModal"></div>
</div> </div>
<div class="body"> <div class="body">
<span>确定转移?</span> <span>确定删除?</span>
<!-- <span style="margin-top: 20px">数据删除后不可恢复</span> --> <!-- <span style="margin-top: 20px">数据删除后不可恢复</span> -->
</div> </div>
<div style="width:100%;display:flex;justify-content:center;align-items:center"> <div style="width:100%;display:flex;justify-content:center;align-items:center">
@@ -143,7 +143,7 @@
import { STUDENT_LIST } from "@/api/apis"; import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1"; import { delStudentList } from "@/api/index1";
import {useAsyncStu} from "@/utils/useCommon"; import {useAsyncStu} from "@/utils/useCommon";
import {removePermission,transferPermission} from '@/api/examineApi.js' import {removePermission,transferPermission,deletedPermission} from '@/api/examineApi.js'
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
const props = defineProps({ const props = defineProps({
@@ -162,6 +162,13 @@ import { message } from "ant-design-vue";
default:false default:false
} }
}); });
const handleFinash = (val) => {
console.log(val,'val')
if(val){
getData()
}
}
const listDatas = ref(null)
const datalist = ref([]) const datalist = ref([])
const getData = async ()=>{ const getData = async ()=>{
loadings.value = true loadings.value = true
@@ -304,23 +311,11 @@ import { message } from "ant-design-vue";
const records=ref(null) const records=ref(null)
//确定删除 //确定删除
const sureSameModal = async () => { const sureSameModal = async () => {
console.log(records.value,'dddd'); deletedPermission({id:records.value.id}).then(res=>{
await transferPermission({ message.success('删除成功')
"id": records.value.id,
"examinePermission": {
"examineId": props.id,
"name": records.value.name,
"userNo": records.value.userNo,
"departName": records.value.departName,
"permissionType": records.value.permissionType
}
})
message.success('转移成功')
getData() getData()
})
deleteModalVisible.value = false; deleteModalVisible.value = false;
}; };
//取消 //取消
const closeSameModal = () => { const closeSameModal = () => {

View File

@@ -297,7 +297,7 @@
</template> </template>
<script setup> <script setup>
import {message} from "ant-design-vue"; import {message} from "ant-design-vue";
import {computed, defineEmits, defineProps, ref, watch} from "vue"; import {computed, defineEmits, defineProps, ref, watch,onMounted} from "vue";
import {useNewRowsPageNoInit, request, useRequest, useTotalPage} from "@/api/request"; import {useNewRowsPageNoInit, request, useRequest, useTotalPage} from "@/api/request";
import { import {
saveStu, saveStu,
@@ -305,7 +305,8 @@
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";
import {addTutor}from '@/api/examineApi.js' import {addTutor,getOnlineLearningList}from '@/api/examineApi.js'
import {boeRequest} from "@/api/request";
const emit = defineEmits({}); const emit = defineEmits({});
const props = defineProps({ const props = defineProps({
@@ -363,6 +364,15 @@
default: null, default: null,
}, },
}); });
onMounted(()=>{
onlineLearningList()
})
const courseList = ref([])
const onlineLearningList = () =>{
boeRequest('/activityApi/examine/getOnlineLearningList post').then(res=>{
courseList.value = res.data.map(item => item.courseId)
})
}
const projectSelectKeys = ref([]); const projectSelectKeys = ref([]);
const projectSelectRows = ref([]); const projectSelectRows = ref([]);
const stuSelectRows = ref([]); const stuSelectRows = ref([]);
@@ -648,6 +658,7 @@ const route = useRoute()
visiable.value = false; visiable.value = false;
emit("finash", false); emit("finash", false);
nameSearch.value.keyword = ""; nameSearch.value.keyword = "";
if(stuSelectRows.value.length!=0){
addTutor({ addTutor({
examineId:route.query.id.toString(), examineId:route.query.id.toString(),
teachers: teaunm.value, teachers: teaunm.value,
@@ -659,8 +670,10 @@ const route = useRoute()
message.info('添加成功'); message.info('添加成功');
}); });
if(courseList.value.length!=0){
courseList.value.map(item=>{
saveStu({ saveStu({
targetId: props.id, targetId: item,
type: props.type, type: props.type,
clear: props.clear, clear: props.clear,
deptIds: deptList.value?.map((e) => e.id), deptIds: deptList.value?.map((e) => e.id),
@@ -674,6 +687,9 @@ const route = useRoute()
deleteDepSelect(); deleteDepSelect();
emit("finash", true); emit("finash", true);
}); });
})
}
}
} }
// 搜索受众值发生变化 // 搜索受众值发生变化
function orgValue(value) { function orgValue(value) {