Merge branch 'zcwy-0511-out2' into zcwy-0511-out

# Conflicts:
#	src/api/examineApi.js
#	src/views/gratefulteacher/AddLevelImportTec.vue
#	src/views/gratefulteacher/InstructorCertification.vue
#	src/views/gratefulteacher/LecturerManagement.vue
This commit is contained in:
zhangsir
2024-05-11 22:22:21 +08:00
15 changed files with 237 additions and 79 deletions

View File

@@ -112,4 +112,13 @@ export const addTutor = (data) =>{
method: "post",
data: data
})
}
}
//线上学习课列表
export const getOnlineLearningList = (data) => http.post('/activityApi/examine/getOnlineLearningList',data)
//删除线上学习课
export const deleteCourse = (data) => http.post('/activityApi/examine/deleteCourse',data)
//新增线上学习课
export const addCourse = (data) => http.post('/activityApi/examine/addCourse',data)
//保存导入的教师信息
export const saveTeacher = (data) => http.post('/activityApi/teacher/saveTeacher',data)

BIN
src/assets/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
src/assets/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@@ -34,15 +34,12 @@
<a-upload-dragger
v-model:fileList="fileList"
:action="importStudent"
name="uploadFile"
name="file"
:headers="headers"
:multiple="false"
@change="handleChange"
:data="{
targetId: Number(courseId),
type: courseType,
userId: userInfo.userId,
userName: userInfo.realName,
examineId: Number(courseId),
}"
:showUploadList="false"
>
@@ -99,11 +96,11 @@
</div>
<div class="cancel" style="margin-left: 15px"></div>
</div>
<div v-if="downloadErrUrl !== ''" class="defeat">
<!-- <div v-if="downloadErrUrl !== ''" class="defeat">
<div class="detext" @click="downloadEeeorData">
下载失败数据
</div>
</div>
</div> -->
</div>
</div>
<div
@@ -189,6 +186,7 @@ import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import { useStore } from "vuex";
import {getCookieForName} from "@/api/method";
import { saveTeacher } from "@/api/examineApi";
export default {
name: "ImpStu",
props: {
@@ -210,8 +208,7 @@ export default {
const state = reactive({
locationHref: process.env.VUE_APP_FILE_PATH,
template: process.env.VUE_APP_UP_LOAD_STUDENT_TEMPLATE,
importStudent:
process.env.VUE_APP_BASE_API + "/admin/student/importStudent",
importStudent:'/activityApi/teacher/importTeacher',
timers: "", // 定时器,用于清空定时器使用
isAddStudent: false, // 用于判断用户是否关闭弹框需要重新获取学员列表
uploadpercent: -1,
@@ -223,12 +220,20 @@ export default {
downloadErrUrl: "",
showBottomBar: false, // 显示底部成功条数和失败条数
fileName: "",
successIds: [],
});
const headers = { token: getCookieForName("token") };
const userInfo = computed(() => store.state.userInfo);
const closeDrawer = () => {
clearInterval(state.timers);
saveTeacher({
examineId:props.courseId,
teacherIds:state.successIds
}).then(res=>{
console.log(res,'res')
})
state.successIds = []
// clearInterval(state.timers);
state.fileList = [];
state.uploadpercent = -1;
state.addLoading = false;
@@ -262,7 +267,7 @@ export default {
}
}
state.addLoading = true;
// state.addLoading = true;
state.uploadErr = false;
state.uploadpercent = parseInt(info.file.percent);
console.log("我是文件上传的进度---------->", info.file.percent);
@@ -274,42 +279,42 @@ export default {
console.log("上传成功返回的UUID", info.file.response.data);
console.log("上传成功返回的UUID----->", info);
console.log("我是导入学员接口传递的参数", {
uploadFile: info.file.originFileObj,
targetId: props.courseId,
type: 3,
file: info.file.originFileObj,
examineId: props.courseId,
});
state.successIds = info.file.response.data.successIds
state.fileName = info.file.name;
let i = 0;
state.timers = setInterval(() => {
let uid = info.file.response.data;
api
.getImportStatus(uid)
.then((res) => {
console.log("查询导入状态", res);
if (res.data.code === 200) {
if (res.data.data.status !== "START") {
i++;
if (i === 1) {
message.destroy();
message.success(`${info.file.name}上传成功`);
state.showBottomBar = true;
state.addLoading = false;
state.isAddStudent = true;
}
state.succNum = res.data.data.successNum;
state.errNum = res.data.data.failedNum;
state.downloadErrUrl = res.data.data.url;
clearInterval(state.timers);
}
}
})
.catch((err) => {
clearInterval(state.timers);
state.showBottomBar = true;
state.addLoading = false;
console.log("查询导入状态失败", err);
});
}, 500);
// state.timers = setInterval(() => {
// let uid = info.file.response.data;
// api
// .getImportStatus(uid)
// .then((res) => {
// console.log("查询导入状态", res);
// if (res.data.code === 200) {
// if (res.data.data.status !== "START") {
// i++;
// if (i === 1) {
// message.destroy();
// message.success(`${info.file.name}上传成功`);
// state.showBottomBar = true;
// state.addLoading = false;
// state.isAddStudent = true;
// }
// state.succNum = res.data.data.successNum;
// state.errNum = res.data.data.failedNum;
// state.downloadErrUrl = res.data.data.url;
// clearInterval(state.timers);
// }
// }
// })
// .catch((err) => {
// clearInterval(state.timers);
// state.showBottomBar = true;
// state.addLoading = false;
// console.log("查询导入状态失败", err);
// });
// }, 500);
} else if (status === "error") {
state.addLoading = false;
state.uploadErr = true;

View File

@@ -1,12 +1,13 @@
<script setup >
import { ref,onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router'
import {getexamineList,CreateAuthentication,delExamine} from '@/api/examineApi.js'
import {getexamineList,CreateAuthentication,delExamine,getOnlineLearningList,deleteCourse,addCourse} from '@/api/examineApi.js'
import dialog from "@/utils/dialog";
import DropDown from "@/components/common/DropDown";
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
import CommonStudent from "@/components/student/CommonStudent";
import CreateOnline from "@/components/drawers/CreateOnline.vue";
import { message } from "ant-design-vue";
const route = useRoute()
const router = useRouter()
const visible = ref(false);
@@ -38,9 +39,111 @@ const columns = [
key: 'action',
},
];
const ViewReviewcolumns =[
{
title: "课程名称",
name: 'courseName',
dataIndex: 'courseName',
key: 'id',
ellipsis: true,
},
{
title: "课程分类",
name: 'courseContent',
dataIndex: 'courseContent',
key: 'id',
align: "center",
ellipsis: true,
},
{
title: "创建人",
name: 'createName',
dataIndex: 'createName',
key: 'id',
align: "center",
},
{
title: "发布时间",
name: 'createTime',
dataIndex: 'createTime',
key: 'id',
align: "center",
ellipsis: true,
},
{
title: "操作",
width: 200,
dataIndex: "id",
key: "id",
fixed: 'right',
align: "center",
slots: { customRender: "action" },
},
]
const imgData = ref([
{id:1,img:'50.png'},
{id:2,img:'39.png'},
{id:3,img:'46.png'},
{id:4,img:'33.png'},
{id:5,img:'47.png'},
{id:6,img:'49.png'},
{id:7,img:'27.png'},
{id:8,img:'30.png'},
{id:9,img:'44.png'},
])
const createParam = ref({
name: '',
description: '',
cover: '',
})
const imgClick = (url) => {
console.log(url,'url')
createParam.value.cover = url
}
//创建认证确定
const handleOk = async () => {
console.log(createParam.value,'createParam')
visible.value = false
await CreateAuthentication(createParam.value).then(res=>{
console.log(res,'res')
getlist()
})
}
//编辑认证
const editFee = (record) => {
console.log(record,'record')
createParam.value = {...record}
}
//线上学习课列表显示
const ViewReviewdata = ref([])
const OnlineLearning = async () => {
ViewReviewShow.value = true
await getOnlineLearningList().then(res=>{
if(res.code == 200){
ViewReviewdata.value = res.data
}
})
}
//删除数据
const deleteReview = (record) =>{
dialog({
content: '是否删除?',
ok: () => {
deleteCourse({id:record.id}).then(res=>{
console.log(res,'res')
if(res.code == 200){
message.success('删除成功')
}
})
}
})
}
//认证审批项目列表数据
const data = ref([{
id: 1,
"id": 1,
"deleted": false,
"createTime": "2024-05-10 13:38:37",
"createId": null,
@@ -129,6 +232,16 @@ const SkipManagement = (id)=>{
}
})
}
const toLecture = (id) =>{
router.push({
path: '/LecturerManagement',
query: {id,
description:data.value[0].description,
name:data.value[0].name,
lecture:true,
}
})
}
//讲师认证列表数据
const InstructorCertificationlist = ref([])
const getlist = async() =>{
@@ -146,11 +259,6 @@ total.value = res.data.total
data.value= res.data.records
}
//创建认证
const launchOrUpdate = async()=>{
CreateAuthentication()
}
onMounted(()=>{
getlist()
})
@@ -195,7 +303,13 @@ function handleOper(record, type, status = "") {
/>
</div>
<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>
<!-- <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>
</CreateOnline>
<div>
<a-table
@@ -207,7 +321,16 @@ function handleOper(record, type, status = "") {
:data-source="ViewReviewdata"
class="ant-table-striped"
size="middle"
/>
>
<template #action="{ record, column }">
<a-space>
<a-button type="link" @click="deleteReview(record)">
<span>删除</span>
</a-button>
</a-space>
</template>
</a-table>
</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>
@@ -233,7 +356,7 @@ function handleOper(record, type, status = "") {
</div>
</div>
</div>
<div v-if="Administrator===0" @click="ViewReviewShow=true" style="height: 38px; width: 150px;background: #4ea6ff;line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">线上学习课程设置</div>
<div v-if="Administrator===0" @click="OnlineLearning" style="height: 38px; width: 150px;background: #4ea6ff;line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">线上学习课程设置</div>
<div class="btns" @click="centerDialogVisible=true">
<div class="btn btn3">
<div class="search"></div>
@@ -275,11 +398,11 @@ function handleOper(record, type, status = "") {
</template>
<template v-else-if="column.key === 'action'">
<span style="text-align: center;">
<a style="margin-right: 7px;" @click="visible=true">编辑</a>
<a style="margin-right: 7px;" @click="editFee(record)">编辑</a>
<a style="margin-right: 7px;" @click='SkipManagement(record.id)'>管理</a>
<a style="margin-right: 7px;">
<a style="margin-right: 7px;" @click="toLecture(record.id)">
评审
</a>
<DropDown v-if="Administrator===0" value="授权">
@@ -310,25 +433,28 @@ function handleOper(record, type, status = "") {
</div>
<!--创建认证和编辑认证 -->
<a-modal v-model:visible="visible" title="编辑认证" @ok="handleOk" width="610px">
<a-form>
<a-form-item :rules="[{ required: true, message: 'Please input your password!' }]" label="Username" style="width: 381px;margin-left: 32px;margin-top: 24px">
<a-input placeholder="认证项目名称" style=" border-radius: 8px;" />
<a-form class="form_item">
<a-form-item :rules="[{ required: true, message: 'Please input your password!' }]" label="认证项目名称" style="width: 381px;margin-left: 32px;margin-top: 24px">
<a-input :maxlength="50" v-model:value="createParam.name" placeholder="认证项目名称" style=" border-radius: 8px;" />
</a-form-item>
<a-form-item :rules="[{ required: true, message: 'Please input your password!' }]" label="封面图" style="width: 560px;margin-left: 32px;margin-top: 24px">
<img style="width: 127px; height: 70px;margin-bottom: 13px;" src="../../assets/50.png" alt="">
<a-form-item :rules="[{ required: true, message: 'Please input your password!' }]" label="封面图" style="width: 560px;margin-left: 32px;margin-top: 24px;">
<!-- <img style="width: 127px; height: 70px;margin-bottom: 13px;" src="../../assets/50.png" alt=""> -->
<!-- <a-image style="width: 127px; height: 70px;margin-bottom: 13px;" src="../../assets/50.png"></a-image> -->
<img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/39.png" alt="">
<!-- <img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/39.png" alt="">
<img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/46.png" alt="">
<img style="width: 127px; height: 70px;margin-bottom: 13px;" src="../../assets/33.png" alt="">
<img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/47.png" alt="">
<img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/49.png" alt="">
<img style="width: 127px; height: 70px;margin-bottom: 13px;margin-left: 15px" src="../../assets/49.png" alt=""> -->
<div class="img_box_item" @click="imgClick(item.img)" v-for="(item,index) in imgData" :key="index">
<img style="width: 127px; height: 70px;" :src="require(`../../assets/${item.img}`)" alt="">
</div>
</a-form-item>
<a-form-item style="margin-left: 32px;margin-top: 24px" label="具体说明">
<a-textarea
style="width: 408px;"
v-model:value="value2"
:maxlength="500"
v-model:value="createParam.description"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-item>
@@ -399,6 +525,17 @@ function handleOper(record, type, status = "") {
margin-left: 5px;
}
}
.form_item{
::v-deep .ant-form-item-control-input-content {
display: flex;
flex-wrap: wrap;
}
.img_box_item{
cursor: pointer;
margin-right: 15px;
margin-bottom: 13px;
}
}
.page {
width: 100%;
height: 100%;

View File

@@ -22,7 +22,7 @@ console.log(route.query.id,'idssss');
const formState = reactive({
reviewname: '',
time: '',
});
const teacherid = ref(null)
//发起评审
@@ -153,7 +153,7 @@ const SearchTeacher = async()=>{
"teacherSearch":teacherValue.value
})
tabledata.value = res.data.records
}
function timeChangeEnd(timeStr){
console.log(timeStr,'time')
@@ -161,7 +161,7 @@ function timeChangeEnd(timeStr){
}
//添加讲师
const addTeacherList = async()=>{
const res = await addTeacher({
"examineId":route.query.id,
"pageSize":10,
@@ -292,6 +292,10 @@ const delteacherIdList =async ()=>{
console.log('sha c sss');
getTeacher()
}
//导出讲师
const exportExcel = () => {
window.open(`/activityApi/teacher/export?examineId=${route.query.id}`)
}
function batchhandleOper() {
dialog({
content: "确认删除吗?数据删除后不可恢复",
@@ -374,6 +378,9 @@ const onFinish = values => {
onMounted(()=>{
if(route.query.lecture == 'true'){
activeKey.value = '2'
}
getTeacher()
getReviewList()
// getTeacher2()
@@ -489,7 +496,7 @@ const teacherRowSelection = {
teacherid.value = selectedRowKeys
},
};
const AddSwitch = ref(null)
@@ -603,7 +610,7 @@ const options1 = ref([{
<div class="btnText" @click="Tecvisible=true">添加讲师</div>
</div>
</proj-check-ship>
</div>
<div class="btns" style="margin-left: 15px;">
<div class="btn btn3">
@@ -802,9 +809,9 @@ const options1 = ref([{
<template v-else-if="column.key === 'action'">
<span style="text-align: center;">
<a style="margin-right: 7px;" @click="handleMenuClick(record.reviewName,record.reviewTime.slice(0,7),record)" >二维码</a>
<a style="margin-right: 7px;" @click='getreviewdetail({reviewId:record.id,examineId:route.query.id}),vwtext= record.id'>查看</a>
<a @click="editReviewSave(record.reviewName,record.reviewTime,record.id)" style="margin-right: 7px;">
编辑
</a>
@@ -912,7 +919,7 @@ const options1 = ref([{
<a-form-item
style="margin-top: 29px;"
label="评审名称"
:rules="[{ required: true, message: '请填写评审名称' }]"
>
<a-input placeholder="请输入评审名称" v-model:value="formState.reviewname" />
@@ -923,7 +930,7 @@ const options1 = ref([{
:rules="[{ required: true, message: '请填写评审时间' }]"
>
<a-date-picker v-model:value="formState.time"
<a-date-picker v-model:value="formState.time"
placeholder="请选择评审时间"
:show-time="{ format: 'HH:mm:ss' }"
:format="['YYYY-MM-DD HH:mm:ss']"