This commit is contained in:
zhangsir
2024-05-15 09:40:47 +08:00
parent c209b15811
commit c57eac8da6
5 changed files with 123 additions and 72 deletions

View File

@@ -303,10 +303,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,
@@ -603,8 +605,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 } 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";
@@ -266,12 +266,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,
}
})
@@ -339,7 +339,7 @@ function handleOper(record, type, status = "") {
<div style="display: flex;flex-direction: column;">
<!-- <div @click="ViewReviewShow=true" style="margin-bottom: 15px; height: 38px; width: 150px;background: #4ea6ff;line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">选择/新建课程</div> -->
<CreateOnline ref="onlineRef" :id="1" :type="1">
<a-button type="primary" style="border-radius: 4px">{{
<a-button type="primary" style="border-radius: 4px;margin-bottom: 15px;">{{
"选择/新建课程"
}}
</a-button>
@@ -368,7 +368,8 @@ function handleOper(record, type, status = "") {
</div>
<div style=" display: flex;justify-content: center;">
<div style="margin-right: 30px; border-radius: 8px; color: #fff;font-size: 16px; display: flex; justify-content: center;align-items: center; width: 100px; height: 38px; margin-top: 36px;background: #3da8f0;">取消</div>
<div style="border-radius: 8px; color: #fff;font-size: 16px; display: flex; justify-content: center;align-items: center; width: 100px; height: 38px; margin-top: 36px;background: #3da8f0;">确定</div>
<div style="border-radius: 8px; color: #fff;font-size: 16px; display: flex; justify-content: center;align-items: center; width: 100px; height: 38px;
margin-top: 36px;background: #3da8f0;">确定</div>
</div>
</div>
@@ -437,7 +438,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="授权">
@@ -447,14 +448,14 @@ function handleOper(record, type, status = "") {
:type="9"
>权限名单</OwnerTableModelStudent
>
<CommonStudent :type="7" :id="record.id" title="查看权"
<CommonStudent :pid="0" :type="7" :id="record.id" title="查看权"
>查看权</CommonStudent
>
<CommonStudent :type="8" :id="record.id" title="管理权"
<CommonStudent :pid="1" :type="8" :id="record.id" title="管理权"
>管理权</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

@@ -78,10 +78,10 @@ const startReviewSave = async () => {
message.info('添加成功');
rwname.value = null
getReviewList()
InitiateReviewShow.value = false
getReviewList()
return
}).catch(err => {
if (err) {
@@ -238,6 +238,7 @@ const downLoadCoures = (id) => {
}
//老师重置
const resetTeacher = () => {
teacherValue.value = ''
addTeacherList()
}
//老师搜索
@@ -365,6 +366,7 @@ const onChangeReview = (pageNo, pageSize) => {
const reviewValue = ref('')
//重置评审
const resetReview = () => {
reviewValue.value=''
getReviewList()
}
//搜索评审
@@ -376,6 +378,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
@@ -783,7 +786,7 @@ const handleMenuClick = (name, time, record) => {
title: "二维码",
copyAble: true,
name: time + '认证-' + name+'认证',
name: route.query.time + '认证-' + name+'认证',
url: `${location.protocol}//${location.host}/mobile/pages/lecturer/certification/list?reviewId=${record.id}&judgesWorkNum=${userInfo.value.userNo}`,
});
@@ -862,9 +865,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>
@@ -878,7 +881,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">
@@ -1031,7 +1034,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;
@@ -1053,9 +1056,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>
@@ -1071,7 +1074,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>
@@ -1086,6 +1090,7 @@ const vwtext = ref(null)
<a @click="handleOperReview(record.id)" style="color: #de2139">删除</a>
</div>
</span>
</div>
</template>
</template>
</a-table>
@@ -1171,9 +1176,9 @@ const vwtext = ref(null)
<div style="display: flex;margin-top: 13px;">
<a-input v-model:value="teacherValue" placeholder="请输入姓名/工号" style="width: 150px;" />
<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;background: #3da8f0;">搜索</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;background: #3da8f0;" >重置</a-button>
</div>
<p style="margin-top: 11px; color: #b6b7b8; font-size: 12px;">说明列表仅显示终稿已上传且未认证的讲师</p>
<div style="display: flex;flex-direction: column;margin-top: -11px;">
@@ -1187,18 +1192,16 @@ const vwtext = ref(null)
</template>
</a-table>
</div>
<a-pagination size="small" v-model:current="teacherCurrent1" show-quick-jumper :total="teacherTotal"
<div style="width: 100%;text-align: center;margin-top: 19px;">
<a-pagination v-model:current="teacherCurrent1" show-quick-jumper :total="teacherTotal"
@change="onChange3" />
</div>
<a-form-item>
<div style="width: 100%;margin-top: 65px;margin-left: 140px">
<a-button type="primary" @click="CancelReview()"
style="width: 70px; height: 31px; border-radius: 5px ;margin: 0 15px 0 15px;margin-left: 30px">取消</a-button>
<a-button @click="startReviewSave()" html-type="submit" type="primary"
style="width: 70px; height: 31px; border-radius: 5px">确认</a-button>
</div>
</a-form-item>
</a-form>
</div>
<div style="height: 500px; width: 1px; background: #b9e6fb;margin-left: 91px; margin-top: 10px"></div>
<div style="display: flex; flex-direction: column;width: 160px;margin-left: 24px;margin-top: 20px;">
<div style="font-size: 16px; font-weight: 900;">已选</div>
@@ -1215,8 +1218,14 @@ const vwtext = ref(null)
</div>
</div>
</div>
<div style="width: 100%;margin-top: 65px;text-align: center;">
<a-button type="primary" @click="CancelReview()"
style="background: #3da8f0;width: 100px; height: 38px; border-radius: 8px ;margin: 0 15px 0 15px;margin-left: 30px">取消</a-button>
<a-button @click="startReviewSave()" html-type="submit" type="primary"
style="background: #3da8f0;width: 100px; height: 38px; border-radius: 8px">确认</a-button>
</div>
</a-drawer>
<!-- 查看讲师 -->
<a-drawer v-model:visible="showViewInstructor" class="custom-class" :closable="false" placement="right"
@@ -1421,7 +1430,7 @@ const vwtext = ref(null)
}
.btn2:active {
background: rgba(64, 158, 255, 0.2);
background: #0982ff;
}
.btn {
@@ -1450,6 +1459,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,8 +90,8 @@
</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;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>
</a-drawer>
@@ -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) {
const del = (record)=>{
deleteModalVisible.value = true;
deleteId.value = id;
records.value = record;
}
const records=ref(null)
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
loading.value = true;
delStudentList({ ids: [deleteId.value] }).then(() => searchStu());
deleteModalVisible.value = false;
}
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;