feat:合并

This commit is contained in:
lixg
2023-02-13 13:56:03 +08:00
parent 7beb752da0
commit 2b6550561a

View File

@@ -318,21 +318,85 @@
<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>
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
<OwnerTableModelStudent
:types="[10, 11, 12]"
:id="record.offcourseId"
>权限名单</OwnerTableModelStudent
>
<CommonStudent
:type="10"
:id="record.offcourseId"
title="查看权"
>查看权</CommonStudent
>
<CommonStudent
:type="11"
:id="record.offcourseId"
title="管理权"
>管理权</CommonStudent
>
</DropDown>
<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
@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
>
</DropDown>
</a-space>
</template>
@@ -1107,9 +1171,42 @@
: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 +1611,8 @@ import {
addStudent,
studentExport,
handleStudent,
getMemberInfoApi, copyCoursePlan,
getMemberInfoApi,
copyCoursePlan,
// listReview,
// studyRecordList,
} from "@/api/indexCourse";
@@ -2904,7 +3002,7 @@ export default defineComponent({
// 渲染列表1操作
const getTableDate = async () => {
state.tableLoading = true
state.tableLoading = true;
console.log("我是点击搜索的数据", state.sysTypeId);
// let datas = state.tableData1;
let startTime = "";
@@ -2966,7 +3064,7 @@ export default defineComponent({
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
});
state.tableData1 = datas;
state.tableLoading = false
state.tableLoading = false;
};
function findClassFullName(list, classify, name = "") {
@@ -3980,13 +4078,15 @@ export default defineComponent({
if (state.copy_hs) {
console.log(2222222);
if (state.offcourseId && state.offcoursePlanId) {
copyCoursePlan({offcoursePlanId:state.offcoursePlanId}).then(() => {
copyCoursePlan({ offcoursePlanId: state.offcoursePlanId }).then(
() => {
message.destroy();
message.success("复制成功");
getTableDate3();
delete_exit1();
rest();
});
}
);
} else if (state.offcourseId) {
console.log(87887);
// 拿数据
@@ -4155,8 +4255,6 @@ export default defineComponent({
if (res.data.code === 200) return res.data.data;
});
state.statusJuJue = Number(item.auditStatus) === -1 ? 1 : 0;
if (Number(item.auditStatus) === 2 && Number(item.status) === 1) {
@@ -4219,7 +4317,7 @@ export default defineComponent({
if (type === "1") {
return;
}
state.offcourseId = itm.offcourseId;
state.offcourseId = itm.id;
const item = await detail({
offcourseId: Number(state.offcourseId),
@@ -4297,11 +4395,12 @@ export default defineComponent({
});
};
const handleStart = (item, type) => {
console.log(item);
console.log("点击开课item", item);
// console.log(item);
if (type === "1") {
return;
}
state.offcourseId = item.offcourseId;
state.offcourseId = item.id;
state.newCourseName = item.name;
getTableDate3();
@@ -4637,7 +4736,9 @@ export default defineComponent({
name: record.name ? record.name : "",
url:
type == 1
? window.location.protocol + process.env.VUE_APP_COURSE_STUDY + record.offcourseId
? window.location.protocol +
process.env.VUE_APP_COURSE_STUDY +
record.offcourseId
: process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${
record.offcoursePlanId