mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
完善功能点
This commit is contained in:
@@ -148,6 +148,8 @@ export const transferPermission =(data)=>{
|
||||
data:data
|
||||
})
|
||||
}
|
||||
//删除权限
|
||||
export const deletedPermission = (data) => http.get('/activityApi/examinePermission/deletedPermission',{params:data})
|
||||
//添加权限
|
||||
// export const addPermission = (data)=>{
|
||||
// return http({
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="successNum && errfile "
|
||||
v-if="successNum || errfile "
|
||||
:class="downloadErrUrl == '' ? 'succebox' : 'defeatbox'"
|
||||
>
|
||||
<div class="lefimg"></div>
|
||||
@@ -180,13 +180,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { computed, reactive, toRefs,ref} from "vue";
|
||||
import { computed, reactive, toRefs,ref,onMounted} from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { BATCH_IMPORT_SCORE } from "@/api/config";
|
||||
import { useStore } from "vuex";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
import { saveTeacher,getTeacherId } from "@/api/examineApi";
|
||||
import {boeRequest} from "@/api/request";
|
||||
|
||||
export default {
|
||||
name: "ImpStu",
|
||||
props: {
|
||||
@@ -222,13 +224,43 @@ export default {
|
||||
fileName: "",
|
||||
successIds: [],
|
||||
errorIds: [],
|
||||
courseList: [],
|
||||
studentLists: [],
|
||||
});
|
||||
const headers = { token: getCookieForName("token") };
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const CountingBar =ref(null)
|
||||
const successNum =ref(null)
|
||||
const errfile = ref(null)
|
||||
const CountingBar =ref(null)
|
||||
const successNum =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 = () => {
|
||||
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({
|
||||
examineId:props.courseId,
|
||||
teacherIds:state.successIds
|
||||
@@ -371,7 +403,8 @@ const errfile = ref(null)
|
||||
downloadEeeorData,
|
||||
removeUpload,
|
||||
successNum,
|
||||
errfile
|
||||
errfile,
|
||||
onlineLearningList
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -303,8 +303,7 @@
|
||||
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";
|
||||
import {addPermission} from '@/api/examineApi.js'
|
||||
|
||||
import {addPermission,transferPermission} from '@/api/examineApi.js'
|
||||
const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -651,6 +650,8 @@
|
||||
if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) {
|
||||
return message.warning("添加小组学员超过最大值");
|
||||
}
|
||||
// emit("finash", false);
|
||||
nameSearch.value.keyword = "";
|
||||
if(!props.typeLists){
|
||||
if(stuSelectRows.value.length==0){
|
||||
message.error("请选择人员")
|
||||
@@ -659,18 +660,30 @@
|
||||
if(stuSelectRows.value.length>1){
|
||||
message.error("归属权仅可选择一人,请重新选择")
|
||||
stuTableRef.value.clear()
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
transferPermission({
|
||||
id: props.id,
|
||||
examinePermission: {
|
||||
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(() => {
|
||||
deleteDepSelect();
|
||||
emit("finash", true);
|
||||
});
|
||||
}
|
||||
stageVisible.value = false;
|
||||
visiable.value = false;
|
||||
emit("finash", false);
|
||||
nameSearch.value.keyword = "";
|
||||
addPermission(dataLists.value).then(() => {
|
||||
deleteDepSelect();
|
||||
emit("finash", true);
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索受众值发生变化
|
||||
|
||||
@@ -606,6 +606,11 @@ const columns = [
|
||||
key: 'reviewResult',
|
||||
dataIndex: 'reviewResult',
|
||||
},
|
||||
{
|
||||
title: '二次认证',
|
||||
key: 'secondResult',
|
||||
dataIndex: 'secondResult',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
@@ -973,6 +978,11 @@ const vwtext = ref(null)
|
||||
{{ text===1?'未开始':(text===2?'进行中':'已报名') }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'secondResult'">
|
||||
<span>
|
||||
{{ text===1?'否':'是' }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<span style="text-align: center;">
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
<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 @finash="handleFinash" v-if="record.permissionType == 2"
|
||||
:type="7" :ref="listDatas" :typeLists="false" :permissionType="0" :examineId="id" :id="record.id" title="归属权"
|
||||
>转移归属权</CommonStudent
|
||||
>
|
||||
<a-button
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="close_exit" @click="closeSameModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>确定转移?</span>
|
||||
<span>确定删除?</span>
|
||||
<!-- <span style="margin-top: 20px">数据删除后不可恢复!</span> -->
|
||||
</div>
|
||||
<div style="width:100%;display:flex;justify-content:center;align-items:center">
|
||||
@@ -143,7 +143,7 @@
|
||||
import { STUDENT_LIST } from "@/api/apis";
|
||||
import { delStudentList } from "@/api/index1";
|
||||
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";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -162,6 +162,13 @@ import { message } from "ant-design-vue";
|
||||
default:false
|
||||
}
|
||||
});
|
||||
const handleFinash = (val) => {
|
||||
console.log(val,'val')
|
||||
if(val){
|
||||
getData()
|
||||
}
|
||||
}
|
||||
const listDatas = ref(null)
|
||||
const datalist = ref([])
|
||||
const getData = async ()=>{
|
||||
loadings.value = true
|
||||
@@ -304,23 +311,11 @@ import { message } from "ant-design-vue";
|
||||
const records=ref(null)
|
||||
//确定删除
|
||||
const sureSameModal = async () => {
|
||||
console.log(records.value,'dddd');
|
||||
await transferPermission({
|
||||
"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('转移成功')
|
||||
deletedPermission({id:records.value.id}).then(res=>{
|
||||
message.success('删除成功')
|
||||
getData()
|
||||
|
||||
})
|
||||
deleteModalVisible.value = false;
|
||||
|
||||
};
|
||||
//取消
|
||||
const closeSameModal = () => {
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
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 {
|
||||
saveStu,
|
||||
@@ -305,7 +305,8 @@
|
||||
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";
|
||||
import {addTutor}from '@/api/examineApi.js'
|
||||
import {addTutor,getOnlineLearningList}from '@/api/examineApi.js'
|
||||
import {boeRequest} from "@/api/request";
|
||||
const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
|
||||
@@ -363,6 +364,15 @@
|
||||
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 projectSelectRows = ref([]);
|
||||
const stuSelectRows = ref([]);
|
||||
@@ -648,32 +658,38 @@ const route = useRoute()
|
||||
visiable.value = false;
|
||||
emit("finash", false);
|
||||
nameSearch.value.keyword = "";
|
||||
addTutor({
|
||||
examineId:route.query.id.toString(),
|
||||
teachers: teaunm.value,
|
||||
deptIds: deptList.value?.map((e) => e.id),
|
||||
groupIds: auditSelectRows.value?.map((e) => e.id),
|
||||
}).then(() => {
|
||||
deleteDepSelect();
|
||||
emit("finash", true);
|
||||
message.info('添加成功');
|
||||
if(stuSelectRows.value.length!=0){
|
||||
addTutor({
|
||||
examineId:route.query.id.toString(),
|
||||
teachers: teaunm.value,
|
||||
deptIds: deptList.value?.map((e) => e.id),
|
||||
groupIds: auditSelectRows.value?.map((e) => e.id),
|
||||
}).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);
|
||||
});
|
||||
});
|
||||
if(courseList.value.length!=0){
|
||||
courseList.value.map(item=>{
|
||||
saveStu({
|
||||
targetId: item,
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user