This commit is contained in:
zhangsir
2024-05-21 19:54:29 +08:00
parent 502064dcf2
commit 75ae7739f2
5 changed files with 52 additions and 27 deletions

View File

@@ -160,4 +160,6 @@ export const deletedPermission = (data) => http.get('/activityApi/examinePermiss
// }
//依旧id查找教师
export const getTeacherId = (data) => http.get('/activityApi/teacher/getTeacherId',{params:data})
export const getTeacherId = (data) => http.get('/activityApi/teacher/getTeacherId',{params:data})
//更改状态
export const updateStatus = (data) => http.post('/activityApi/examine/updateStatus',data)

View File

@@ -267,6 +267,12 @@ export default {
message.error("请上传正确的文件格式");
return;
}
const sizeBig = info.file.size < 50000000
if(!sizeBig){
message.destroy();
message.error("文件大小不能超过50M")
return
}
}
// state.addLoading = true;

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,removePermission} from '@/api/examineApi.js'
import {getexamineList,CreateAuthentication,delExamine,getOnlineLearningList,deleteCourse,addCourse,updateExamine,removePermission,updateStatus} from '@/api/examineApi.js'
import dialog from "@/utils/dialog";
import DropDown from "@/components/common/DropDown";
import OwnerTableModelStudent from "./tablemodel";
@@ -60,7 +60,7 @@ const ViewReviewcolumns =[
dataIndex: 'courseName',
key: 'id',
ellipsis: true,
width: 400,
width: 300,
},
{
title: "创建人",
@@ -68,7 +68,7 @@ const ViewReviewcolumns =[
dataIndex: 'createName',
key: 'id',
align: "center",
width: 150,
width: 50,
},
{
title: "发布时间",
@@ -77,16 +77,14 @@ const ViewReviewcolumns =[
key: 'id',
align: "center",
ellipsis: true,
width: 150,
width: 100,
},
{
title: "操作",
width: 200,
width: 50,
dataIndex: "id",
key: "id",
fixed: 'right',
align: "center",
width: 150,
slots: { customRender: "action" },
},
]
@@ -200,10 +198,8 @@ const createData = () => {
}
//删除数据
const deleteReview = (record,index) =>{
console.log(ViewReviewdata,'ViewReviewdata')
console.log(record,index,'record')
dialog({
content: '是否删除?',
content: '确认删除吗?删除后数据不可恢复',
ok: () => {
if(record.newId==2){
ViewReviewdata.value = ViewReviewdata.value.filter(item => item.id !== record.id);
@@ -220,6 +216,22 @@ const deleteReview = (record,index) =>{
}
})
}
const resizeRe = (record) => {
//启用 0 禁用 1
dialog({
content: record.status==1?'确定启用吗?启用后新报名的讲师会显示该课程信息':'确定禁用吗?禁用后新报名的讲师不显示该课程信息',
ok: () => {
updateStatus({
id:record.id,
status: record.status==1?0:1
}).then(res=>{
console.log(res,'res')
message.success(record.status==1?'启用成功':'禁用成功')
OnlineLearning()
})
}
})
}
const falseData = () => {
ViewReviewdata.value = []
ViewReviewDataShow.value = []
@@ -424,6 +436,9 @@ function handleOper(record, type, status = "") {
<a-button type="link" @click="deleteReview(record,index)">
<span>删除</span>
</a-button>
<a-button type="link" @click="resizeRe(record,index)">
<span>{{record.status==0?'启用':'禁用'}}</span>
</a-button>
</a-space>
</template>
@@ -496,7 +511,7 @@ function handleOper(record, type, status = "") {
</template>
<template v-else-if="column.key === 'action'">
<span style="text-align: center;">
<a style="margin-right: 7px;" @click="editFee(record)">编辑</a>
<a style="margin-right: 7px;" v-if="record.isView" @click="editFee(record)">编辑</a>
<a style="margin-right: 7px;" @click='SkipManagement(record.id,record.description,record.name)'>管理</a>
@@ -518,7 +533,7 @@ function handleOper(record, type, status = "") {
>管理权</CommonStudent
>
</DropDown>
<a style="color: #de2139;margin-left: 7px" @click="handleOper(record, 'del')">删除</a>
<a style="color: #de2139;margin-left: 7px" v-if="record.isView" @click="handleOper(record, 'del')">删除</a>
</span>
</template>
</template>
@@ -542,14 +557,13 @@ function handleOper(record, type, status = "") {
<img :style="createParam?.cover==item.value?{border:'3px solid rgba(78, 166, 255, 1)'}:{border:'1px solid #ccc'}" style="width: 127px; height: 70px;" :src="item.value" alt="">
</div>
</a-form-item>
<a-form-item style="margin-left: 71px;margin-top: 24px" label="具体说明">
<a-form-item style="margin-left: 71px;margin-top: 24px;" label="具体说明">
<a-textarea
style="width: 410px;"
style="width: 410px;height: 130px;overflow: auto;position: relative;resize: none;"
:maxlength="150"
:showCount="true"
v-model:value="createParam.description"
:auto-size="{ minRows: 4,}"
/>
<span style="position:absolute;right:71px;bottom:0px;color: #c7cbd2;">{{ createParam.description.length }}/150</span>
</a-form-item>
</a-form>
</a-modal>

View File

@@ -83,7 +83,7 @@ const startReviewSave = async () => {
"teacherIds": teacherid.value
}).then(res => {
console.log(res);
message.info('添加成功');
message.info('发起成功');
rwname.value = null
searchReview()
@@ -509,15 +509,16 @@ const SearchTeachers =async()=>{
pageNo: 1,
pageSize: 15,
examineId: route.query.id,
secondResult: value2.value==null?'1':value2.value,
second: value2.value==null?'0':value2.value,
reviewResult:value.value,
keyWord:value3.value
})
total.value = res.data.total
data.value = res.data.records
if(value2.value=='0'){
if(value2.value!=2){
getTeacher2()
}else{
data2.value = []
}
}
//重置教师
@@ -929,7 +930,7 @@ const vwtext = ref(null)
</div>
<div class="select" style="margin-left: 15px;">
<a-select v-model:value="value" style="width: 270px; border-radius: 8px" placeholder="请选择认证结果">
<a-select v-model:value="value" allowClear style="width: 270px; border-radius: 8px" placeholder="请选择认证结果">
<a-select-option value="3">已报名</a-select-option>
<a-select-option value="2">认证中</a-select-option>
<a-select-option value="1">未通过</a-select-option>
@@ -939,9 +940,9 @@ const vwtext = ref(null)
</div>
<div class="select" style="margin-left: 15px;">
<a-select v-model:value="value2" style="width: 270px; border-radius: 8px" placeholder="请选择二次认证" >
<a-select-option value="0"></a-select-option>
<a-select-option value="1"></a-select-option>
<a-select v-model:value="value2" allowClear style="width: 270px; border-radius: 8px" placeholder="请选择二次认证" >
<a-select-option value="1"></a-select-option>
<a-select-option value="2"></a-select-option>
</a-select>
</div>
<div style="display: flex; margin-left: 20px">

View File

@@ -370,7 +370,7 @@
const courseList = ref([])
const onlineLearningList = () =>{
boeRequest('/activityApi/examine/getOnlineLearningList post').then(res=>{
courseList.value = res.data.map(item => item.courseId)
courseList.value = res.data.filter(item=>item.status == 0).map(item => item.courseId)
})
}
const projectSelectKeys = ref([]);
@@ -658,18 +658,20 @@ const route = useRoute()
visiable.value = false;
emit("finash", false);
nameSearch.value.keyword = "";
if(stuSelectRows.value.length!=0){
if(stuSelectRows.value.length!=0||selectedOrgKeys.value.length!=0||auditSelectRows.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),
departIds: selectedOrgKeys.value,
}).then(() => {
deleteDepSelect();
emit("finash", true);
message.info('添加成功');
});
console.log(courseList.value,'value')
if(courseList.value.length!=0){
courseList.value.map(item=>{
saveStu({