# Conflicts:
#	src/api/examineApi.js
#	src/views/gratefulteacher/InstructorCertification.vue
This commit is contained in:
zhangsir
2024-05-14 18:26:52 +08:00
6 changed files with 129 additions and 58 deletions

View File

@@ -131,3 +131,28 @@ export const getCertificationProcess = (data) => http.post('/activityApi/teacher
export const updateExamine = (data) => http.post('/activityApi/examine/updateExamine',data)
//添加权限 0: 查看 2: 管理
export const addPermission = (data) => http.post('/activityApi/permission/addPermission',data)
//权限列表
export const removePermission = (data)=>{
return http({
url:'/activityApi/permission/list',
method: "post",
data:data
})
}
//转移归属权
export const transferPermission =(data)=>{
return http({
url:'/activityApi/permission/transferPermission',
method: "post",
data:data
})
}
//添加权限
export const addPermission = (data)=>{
return http({
url:'/activityApi/permission/addPermission',
method: "post",
data:data
})
}

View File

@@ -304,10 +304,12 @@
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'
const emit = defineEmits({});
const props = defineProps({
type: Number,
pid:Number,
infoType: Number,
infoId: Number,
id: String,
@@ -613,8 +615,9 @@
//确定添加授权
const submitAuth = () => {
if (props.type === 2) {
if (props.pid === 2) {
stageVisible.value = true;
} else {
handleDialogOk();
}

View File

@@ -1,7 +1,7 @@
<script setup >
import { ref,onMounted,computed } from 'vue';
import { useRoute, useRouter } from 'vue-router'
import {getexamineList,CreateAuthentication,delExamine,getOnlineLearningList,deleteCourse,addCourse,updateExamine} from '@/api/examineApi.js'
import {getexamineList,CreateAuthentication,delExamine,getOnlineLearningList,deleteCourse,addCourse,updateExamine,removePermission} from '@/api/examineApi.js'
import dialog from "@/utils/dialog";
import DropDown from "@/components/common/DropDown";
import OwnerTableModelStudent from "./tablemodel";
@@ -254,12 +254,12 @@ const SkipManagement = (id,description,time)=>{
// }
})
}
const toLecture = (id) =>{
const toLecture = (id,description,time) =>{
router.push({
path: '/LecturerManagement',
query: {id,
description:data.value[0].description,
name:data.value[0].name,
description:description,
time:time,
lecture:true,
}
})
@@ -425,7 +425,7 @@ function handleOper(record, type, status = "") {
<a style="margin-right: 7px;" @click='SkipManagement(record.id,record.description,record.name)'>管理</a>
<a style="margin-right: 7px;" @click="toLecture(record.id)">
<a style="margin-right: 7px;" @click="toLecture(record.id,record.description,record.name)">
评审
</a>
<DropDown v-if="Administrator===0" value="授权">
@@ -442,7 +442,7 @@ function handleOper(record, type, status = "") {
>管理权</CommonStudent
>
</DropDown>
<a style="color: #de2139" @click="handleOper(record, 'del')">删除</a>
<a style="color: #de2139;margin-left: 7px" @click="handleOper(record, 'del')">删除</a>
</span>
</template>
</template>

View File

@@ -84,10 +84,10 @@ const startReviewSave = async () => {
message.info('添加成功');
rwname.value = null
getReviewList()
InitiateReviewShow.value = false
getReviewList()
return
}).catch(err => {
if (err) {
@@ -240,6 +240,7 @@ const downLoadCoures = (id) => {
}
//老师重置
const resetTeacher = () => {
teacherValue.value = ''
addTeacherList()
}
//老师搜索
@@ -370,6 +371,7 @@ const onChangeReview = (pageNo, pageSize) => {
const reviewValue = ref('')
//重置评审
const resetReview = () => {
reviewValue.value=''
getReviewList()
}
//搜索评审
@@ -381,6 +383,7 @@ const searchReview = async () => {
// console.log(reviewValue.value.trim().length);
const res = await getReview({
examineId:route.query.id,
pageNo: ReviewPageNo.value,
pageSize: 8,
reviewName: reviewValue.value
@@ -874,9 +877,9 @@ const vwtext = ref(null)
</div>
<div style="display: flex; align-items: center; margin-top: 15px;margin-bottom: 15px;">
<div class="btns" style="margin-left: 15px;">
<div class="btns" style="margin-left: 15px;margin-bottom: 4.5px">
<proj-check-ship @finash="translate">
<div class="btn btn3">
<div class="btn btn3" >
<div class="search"></div>
<div class="btnText" @click="Tecvisible=true">添加讲师</div>
</div>
@@ -890,7 +893,7 @@ const vwtext = ref(null)
</div>
</div>
<a-button type="primary" @click="exportExcel" style="color: #fff ;background-color: #4ea6ff; width: 100px; height: 40px; border-radius: 8px;margin-left: 15px; padding-left: 10px;">导出讲师</a-button>
<a-button type="primary" @click="batchhandleOper()" style="width: 100px; height: 40px; border-radius: 8px;margin-left: 12px; padding-left: 10px;" ghost>批量删除</a-button>
<a-button type="primary" @click="batchhandleOper()" style="width: 100px; height: 40px; border-radius: 8px;margin-left: 12px; padding-left: 10px;background-color: #4ea6ff;" >批量删除</a-button>
</div>
<!-- 表格 -->
<div style="display: flex; flex-direction: column;margin-left: 15px">
@@ -1043,7 +1046,7 @@ const vwtext = ref(null)
style="color: #fff ;background-color: #4ea6ff;width: 100px; height: 40px; border-radius: 8px;margin-left: 15px;">搜索</a-button>
<a-button @click="resetReview()"
style="color: #fff ;background-color: #4ea6ff; width: 100px; height: 40px; border-radius: 8px;margin-left: 12px;"
ghost>重置</a-button>
>重置</a-button>
</div>
<div>
<a-button @click="InitReview()" type="primary" style="color: #fff ;background-color: #4ea6ff;width: 100px; height: 40px;
@@ -1065,9 +1068,9 @@ const vwtext = ref(null)
<template #bodyCell="{ column, record, index, text }">
<template v-if="column.key === 'name'">
<a>
<span>
{{ index + 1 }}
</a>
</span>
</template>
<template v-else-if="column.key === 'reviewResult'">
<span>
@@ -1083,7 +1086,8 @@ const vwtext = ref(null)
</span>
</template>
<template v-else-if="column.key === 'action'">
<span style="text-align: center;display:flex;justify-content:end">
<div style=" text-align: center;display:flex;justify-content:center">
<span style="display:flex;justify-content:end;align-self: end;width: 160px;">
<a v-if="record.examineResult === 0" style="margin-right: 7px;"
@click="handleMenuClick(record.reviewName, record.reviewTime.slice(0, 7), record)">二维码</a>
<div>
@@ -1098,6 +1102,7 @@ const vwtext = ref(null)
<a @click="handleOperReview(record.id)" style="color: #de2139">删除</a>
</div>
</span>
</div>
</template>
</template>
</a-table>
@@ -1185,7 +1190,7 @@ const vwtext = ref(null)
<a-button @click="SearchTeacher()" type="primary"
style="width: 70px; height: 31px; border-radius: 5px;margin-left: 15px;">搜索</a-button>
<a-button @click="resetTeacher()" type="primary"
style="width: 70px; height: 31px; border-radius: 5px;margin-left: 12px;" ghost>重置</a-button>
style="width: 70px; height: 31px; border-radius: 5px;margin-left: 12px;" >重置</a-button>
</div>
<p style="margin-top: 11px; color: #b6b7b8; font-size: 12px;">说明列表仅显示终稿已上传且未认证的讲师</p>
<div style="display: flex;flex-direction: column;margin-top: -11px;">
@@ -1433,7 +1438,7 @@ const vwtext = ref(null)
}
.btn2:active {
background: rgba(64, 158, 255, 0.2);
background: #0982ff;
}
.btn {
@@ -1462,6 +1467,7 @@ const vwtext = ref(null)
}
.btn3 {
margin-right: 0;
.search {

View File

@@ -65,7 +65,7 @@
<div style="margin-top: 20px">
<a-table
:columns="columns"
:data-source="studentList"
:data-source="datalist"
:pagination="stuPagination"
:loading="loading"
row-key="id"
@@ -79,7 +79,7 @@
record.type !== 9 &&
record.type !== 12
"
@click="del(record.id)"
@click="del(record)"
type="link"
>转移归属权</a-button
@@ -90,7 +90,7 @@
</div>
</div>
<div class="btn" style="display: flex;justify-content: center;margin-top: 200px">
<button class="btn2" @click="closeDrawer" style=" cursor: pointer;border: none; margin-right: 15px;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;">取消</button>
<button class="btn2" @click="closeDrawer" style="cursor: pointer;border: none; margin-right: 15px;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;">取消</button>
<button class="btn2" @click="closeDrawer" style=" cursor: pointer;border: none;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;">确定</button>
</div>
</div>
@@ -114,8 +114,8 @@
<div class="close_exit" @click="closeSameModal"></div>
</div>
<div class="body">
<span>确定删除?</span>
<span style="margin-top: 20px">数据删除后不可恢复!</span>
<span>确定转移?</span>
<!-- <span style="margin-top: 20px">数据删除后不可恢复!</span> -->
</div>
<div style="width:100%;display:flex;justify-content:center;align-items:center">
<div style="width:100px" @click="closeSameModal">
@@ -136,11 +136,14 @@
defineExpose,
ref,
watch,
onMounted,
} from "vue";
import { usePage } from "@/api/request";
import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1";
import {useAsyncStu} from "@/utils/useCommon";
import {removePermission,transferPermission} from '@/api/examineApi.js'
import { message } from "ant-design-vue";
const props = defineProps({
type: Number,
@@ -154,7 +157,18 @@
default: () => [],
},
});
const datalist = ref([])
const getData = async ()=>{
const res = await removePermission({
"examineId": props.id
})
console.log(res,'权限列表');
datalist.value = res.data.records
}
onMounted(()=>{
getData()
})
const visiable = ref(false);
const initParams = {
@@ -172,46 +186,46 @@
const columns = ref([
{
title: "姓名",
dataIndex: "studentName",
key: "studentName",
dataIndex: "createName",
key: "createName",
width: 30,
align: "center",
ellipsis: true,
},
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
dataIndex: "userNo",
key: "userNo",
width: 50,
align: "center",
ellipsis: true,
},
{
title: "部门",
dataIndex: "studentDepartName",
key: "studentDepartName",
dataIndex: "departName",
key: "departName",
width: 80,
align: "center",
ellipsis: true,
},
{
title: "权限",
dataIndex: "type",
key: "type",
dataIndex: "permissionType",
key: "permissionType",
width: 30,
align: "center",
customRender: ({ record: { type } }) =>
customRender: ({ record: { permissionType } }) =>
({
4: "查看权",
5: "管理权",
6: "归属权",
0: "查看权",
1: "管理权",
2: "归属权",
7: "查看权",
8: "管理权",
9: "归属权",
10: "查看权",
11: "管理权",
12: "归属权",
}[type]),
}[permissionType]),
},
{
title: "操作",
@@ -249,26 +263,46 @@
searchParams.value.pageNo = page;
};
function search() {
searchParams.value.studentName = searchName.value;
searchParams.value.pageNo = 1;
searchStu()
const search = async()=>{
const res = await removePermission({
"examineId": props.id,
"name" : searchName.value
})
datalist.value = res.data.records
}
// function search() {
// searchParams.value.studentName = searchName.value;
// searchParams.value.pageNo = 1;
// searchStu()
// }
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id) {
deleteModalVisible.value = true;
deleteId.value = id;
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
loading.value = true;
delStudentList({ ids: [deleteId.value] }).then(() => searchStu());
deleteModalVisible.value = false;
const del = (record)=>{
deleteModalVisible.value = true;
records.value = record;
}
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('转移成功')
getData()
deleteModalVisible.value = false;
};
//取消
const closeSameModal = () => {
@@ -279,13 +313,16 @@
const closeDrawer = () => {
visiable.value = false;
};
function reset() {
searchParams.value = initParams;
searchName.value = "";
searchParams.value.pageNo = 1;
searchStu()
const reset = ()=>{
getData()
searchName.value=''
}
// function reset() {
// searchParams.value = initParams;
// searchName.value = "";
// searchParams.value.pageNo = 1;
// searchStu()
// }
watch(visiable, () => {
visiable.value && searchStu();

View File

@@ -251,7 +251,7 @@
</div>
</div>
</div>
<div class="btnn">
<div style="display: flex;justify-content: center;" class="btnn" >
<button class="btn2" style="width: 100px; height:38px;background:
#4ea6ff;border: none;margin-right: 15px; border-radius: 8px;color:aliceblue" @click="closeDrawer">取消</button>
<button class="btn2" style="width: 100px;