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

@@ -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%;