# 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) export const updateExamine = (data) => http.post('/activityApi/examine/updateExamine',data)
//添加权限 0: 查看 2: 管理 //添加权限 0: 查看 2: 管理
export const addPermission = (data) => http.post('/activityApi/permission/addPermission',data) 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 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'
const emit = defineEmits({}); const emit = defineEmits({});
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
pid:Number,
infoType: Number, infoType: Number,
infoId: Number, infoId: Number,
id: String, id: String,
@@ -613,8 +615,9 @@
//确定添加授权 //确定添加授权
const submitAuth = () => { const submitAuth = () => {
if (props.type === 2) { if (props.pid === 2) {
stageVisible.value = true; stageVisible.value = true;
} else { } else {
handleDialogOk(); handleDialogOk();
} }

View File

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

View File

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

View File

@@ -65,7 +65,7 @@
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="studentList" :data-source="datalist"
:pagination="stuPagination" :pagination="stuPagination"
:loading="loading" :loading="loading"
row-key="id" row-key="id"
@@ -79,7 +79,7 @@
record.type !== 9 && record.type !== 9 &&
record.type !== 12 record.type !== 12
" "
@click="del(record.id)" @click="del(record)"
type="link" type="link"
>转移归属权</a-button >转移归属权</a-button
@@ -90,8 +90,8 @@
</div> </div>
</div> </div>
<div class="btn" style="display: flex;justify-content: center;margin-top: 200px"> <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> <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>
</div> </div>
</a-drawer> </a-drawer>
@@ -114,8 +114,8 @@
<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">
<div style="width:100px" @click="closeSameModal"> <div style="width:100px" @click="closeSameModal">
@@ -136,11 +136,14 @@
defineExpose, defineExpose,
ref, ref,
watch, watch,
onMounted,
} from "vue"; } from "vue";
import { usePage } from "@/api/request"; import { usePage } from "@/api/request";
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 { message } from "ant-design-vue";
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
@@ -154,7 +157,18 @@
default: () => [], 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 visiable = ref(false);
const initParams = { const initParams = {
@@ -172,46 +186,46 @@
const columns = ref([ const columns = ref([
{ {
title: "姓名", title: "姓名",
dataIndex: "studentName", dataIndex: "createName",
key: "studentName", key: "createName",
width: 30, width: 30,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
}, },
{ {
title: "工号", title: "工号",
dataIndex: "studentUserNo", dataIndex: "userNo",
key: "studentUserNo", key: "userNo",
width: 50, width: 50,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
}, },
{ {
title: "部门", title: "部门",
dataIndex: "studentDepartName", dataIndex: "departName",
key: "studentDepartName", key: "departName",
width: 80, width: 80,
align: "center", align: "center",
ellipsis: true, ellipsis: true,
}, },
{ {
title: "权限", title: "权限",
dataIndex: "type", dataIndex: "permissionType",
key: "type", key: "permissionType",
width: 30, width: 30,
align: "center", align: "center",
customRender: ({ record: { type } }) => customRender: ({ record: { permissionType } }) =>
({ ({
4: "查看权", 0: "查看权",
5: "管理权", 1: "管理权",
6: "归属权", 2: "归属权",
7: "查看权", 7: "查看权",
8: "管理权", 8: "管理权",
9: "归属权", 9: "归属权",
10: "查看权", 10: "查看权",
11: "管理权", 11: "管理权",
12: "归属权", 12: "归属权",
}[type]), }[permissionType]),
}, },
{ {
title: "操作", title: "操作",
@@ -249,26 +263,46 @@
searchParams.value.pageNo = page; searchParams.value.pageNo = page;
}; };
function search() { const search = async()=>{
searchParams.value.studentName = searchName.value; const res = await removePermission({
searchParams.value.pageNo = 1; "examineId": props.id,
searchStu() "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 deleteModalVisible = ref(false);
const deleteId = ref(null); const deleteId = ref(null);
function del(id) {
deleteModalVisible.value = true;
deleteId.value = id;
}
const del = (record)=>{
deleteModalVisible.value = true;
records.value = record;
}
const records=ref(null)
//确定删除 //确定删除
const sureSameModal = () => { const sureSameModal = async () => {
if (deleteId.value) { console.log(records.value,'dddd');
loading.value = true; await transferPermission({
delStudentList({ ids: [deleteId.value] }).then(() => searchStu()); "id": records.value.id,
deleteModalVisible.value = false; "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 = () => { const closeSameModal = () => {
@@ -279,13 +313,16 @@
const closeDrawer = () => { const closeDrawer = () => {
visiable.value = false; visiable.value = false;
}; };
const reset = ()=>{
function reset() { getData()
searchParams.value = initParams; searchName.value=''
searchName.value = "";
searchParams.value.pageNo = 1;
searchStu()
} }
// function reset() {
// searchParams.value = initParams;
// searchName.value = "";
// searchParams.value.pageNo = 1;
// searchStu()
// }
watch(visiable, () => { watch(visiable, () => {
visiable.value && searchStu(); visiable.value && searchStu();

View File

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