--fix 复制

This commit is contained in:
yuping
2023-02-17 21:18:09 +08:00
parent b29e31721f
commit 2d3a95f1bd
2 changed files with 764 additions and 761 deletions

View File

@@ -32,6 +32,7 @@ export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
//7新建或编辑面授课开课
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
export const copyCoursePlan = (params) => http.get("/admin/offcourse/copyCoursePlan", {params});
export const copyCourse = (params) => http.get("/admin/offcourse/copyCourse", {params});
//8课程导出
export const exportP = (obj) => http.post("/admin/offcourse/export", obj);
//9操作面授课(发布,撤回,删除,审核,停用)

View File

@@ -318,10 +318,18 @@
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<a-space>
<a-button v-if="(record.status===0 || record.status===-1 || !record.kkty) && checkPer(record.permissions)" @click="() => handleEdit(record, String(record.courseform))" type="link">编辑</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)" @click="() => handleStart(record, String(record.courseform))" type="link">开课</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)" @click="() => handleLook(record, String(record.courseform))" type="link">查看</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)" @click="() => handleGuan22(record, String(record.courseform))" type="link">管理</a-button>
<a-button v-if="(record.status===0 || record.status===-1 || !record.kkty) && checkPer(record.permissions)"
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
@click="() => handleStart(record, String(record.courseform))" type="link">开课
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
@click="() => handleLook(record, String(record.courseform))" type="link">查看
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
</a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权">
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
@@ -330,9 +338,14 @@
<DropDown v-if="checkPer(record.permissions)" value="更多">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
<a-button v-if="record.status===2 && record.kkty" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
<a-button v-if="record.status===2 && !record.kkty" @click="() => handleOpen(record, String(record.courseform))" type="link">启用</a-button>
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除</a-button>
<a-button v-if="record.status===2 && record.kkty"
@click="() => handleStop(record, String(record.courseform))" type="link">停用
</a-button>
<a-button v-if="record.status===2 && !record.kkty"
@click="() => handleOpen(record, String(record.courseform))" type="link">启用
</a-button>
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
</a-button>
</DropDown>
</a-space>
</template>
@@ -1106,9 +1119,15 @@
:isgetStudent="isgetStudent"
>
<template #extension="{ data: { record } }">
<a-button v-if="record.source === 4 && record.status === 1" @click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过</a-button>
<a-button v-if="record.source === 4 && record.status === 1" @click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝</a-button>
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)" @click="() => {record.status = 1;auditStudent(record);}" type="link">撤回</a-button>
<a-button v-if="record.source === 4 && record.status === 1"
@click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过
</a-button>
<a-button v-if="record.source === 4 && record.status === 1"
@click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝
</a-button>
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)"
@click="() => {record.status = 1;auditStudent(record);}" type="link">撤回
</a-button>
</template>
</TableStudent>
</div>
@@ -1514,7 +1533,7 @@ import {
studentExport,
handleStudent,
getMemberInfoApi,
copyCoursePlan,
copyCoursePlan, copyCourse,
} from "@/api/indexCourse";
import {
traverseArr,
@@ -3966,48 +3985,20 @@ export default defineComponent({
}
}
if (state.copy_hs) {
console.log(2222222);
if (state.offcourseId && state.offcoursePlanId) {
copyCoursePlan({offcoursePlanId:state.offcoursePlanId}).then(() => {
message.destroy();
state.tableLoading = true;
message.success("复制成功");
delete_exit1();
rest();
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
getTableDate3();
delete_exit1();
rest();
});
} else if (state.offcourseId) {
console.log(87887);
// 拿数据
const item = await detail({
offcourseId: Number(state.offcourseId),
}).then((res) => {
if (res.data.code === 200) return res.data.data;
});
const postData = {
offcourseId: null, //不传代表新增
name: item.name + "(1)",
picUrl: item.picUrl,
targetUser: item.targetUser,
meaning: item.meaning,
// categoryId: item.categoryId,
sysTypeId: item.sysTypeId,
sceneId: item.sceneId,
tips: item.tips,
teacherId: item.teacherId, //?
intro: item.intro,
attach: item.attach,
outline: item.outline,
teacher: item.teacher,
};
edit(postData).then((res) => {
if (res.data.code === 200) {
message.destroy();
message.success("复制成功");
getTableDate();
delete_exit1();
rest();
}
});
message.success("复制成功");
state.tableLoading = true;
await copyCourse({courseId: state.offcourseId})
getTableDate();
}
}
if (state.nouse_hs) {
@@ -4656,6 +4647,7 @@ export default defineComponent({
disabledSeconds: () => [55, 56],
};
};
function auditStudent(record) {
updateStudent(record);
}
@@ -4959,6 +4951,7 @@ export default defineComponent({
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
.daochu {
width: 16px;
height: 18px;
@@ -4975,6 +4968,7 @@ export default defineComponent({
color: #ffffff;
}
}
/**
.btn1:active {
background: #0982ff;
@@ -5342,9 +5336,11 @@ export default defineComponent({
.items_fj {
margin-bottom: 1px;
.fujian {
display: none;
}
.mbl_items12 {
width: 440px;
margin-right: 56px;
@@ -6718,6 +6714,7 @@ export default defineComponent({
line-height: 36px;
margin-left: 5px;
}
.btn2 {
margin-right: 0px;
@@ -6728,6 +6725,7 @@ export default defineComponent({
}
}
}
.btn3 {
.search {
width: 17px;
@@ -6741,6 +6739,7 @@ export default defineComponent({
}
}
}
/**
.btn3 {
width: 130px;
@@ -6896,6 +6895,7 @@ export default defineComponent({
.stusmanageModal {
.ant-modal {
max-width: 1800px;
.ant-modal-content {
// width:1358px !important;
.ant-modal-body {
@@ -7279,9 +7279,11 @@ export default defineComponent({
.tableSelect {
position: relative;
.hoverList {
display: none;
}
&:hover {
.hoverList {
display: block;