--fix bug

This commit is contained in:
yuping
2023-04-18 14:57:37 +08:00
parent a6e059acb8
commit d833e88b05

View File

@@ -320,7 +320,7 @@
:pagination="false"
:scroll="{ x: 'max-content' }"
>
<template #operation="{ text, record, index }">
<template #action="{ text, record, index }">
<a-space :key="record.id">
<a-button
v-if="(record.auditStatus === 2 || record.auditStatus === 3) && !record.publishStatus && checkPer(record.permissions,createId)"
@@ -383,9 +383,7 @@
>
</DropDown>
<DropDown v-if="checkPer(record.permissions,createId)" value="更多">
<a-button @click="() => handleCopy(text)" type="link"
>复制</a-button
>
<a-button @click="() => handleCopy(text)" type="link" block>复制</a-button>
<a-button
v-if="
(record.auditStatus === 1 || record.auditStatus === 2 || record.publishStatus) &&
@@ -394,6 +392,7 @@
"
@click="() => handleRejectExit(text, index, record)"
type="link"
block
>撤回</a-button
>
<a-button
@@ -402,8 +401,9 @@
record.status &&
checkPer(record.permissions,createId)
"
@click="() => handleStop(text, index)"
@click="() => handleStop(record)"
type="link"
block
>停用</a-button
>
<a-button
@@ -412,14 +412,16 @@
!record.status &&
checkPer(record.permissions,createId)
"
@click="() => handleOpen(text, index)"
@click="() => handleOpen(record)"
type="link"
block
>启用</a-button
>
<a-button
v-if="record.publishStatus!==1 || !record.status"
@click="() => handleDelete(text, index, record)"
type="link"
block
danger
>删除
</a-button>
@@ -798,8 +800,7 @@
@expand="expandTable"
:pagination="false"
>
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<template #action="{ record, column }">
<div class="operation">
<div class="fb">
<!--新加 签到 -->
@@ -864,7 +865,6 @@
</div>
</a-dropdown>
</div>
</template>
</template>
</a-table>
<div class="tableBox" style="margin-top: 50px">
@@ -1968,6 +1968,7 @@ const columns6 = [
dataIndex: "operation",
key: "operation",
align: "center",
slots: { customRender: "action" },
},
];
//开课学员管理
@@ -2353,7 +2354,7 @@ export default defineComponent({
key: "id",
fixed: "right",
align: "right",
slots: { customRender: "operation" },
slots: { customRender: "action" },
},
],
@@ -4518,23 +4519,23 @@ export default defineComponent({
state.delete_hs = true;
state.copy_hs = true;
};
const handleStop = (id, index) => {
const handleStop = (record) => {
dialog({
content: "确定停用该课程吗?",
ok: () => {
message.success("停用成功");
state.tableData1[index].status = 0;
handle({ offcourseId: id, type: -2 });
record.status = 0;
handle({ offcourseId: record.id, type: -2 });
},
});
};
const handleOpen = async (id, index) => {
const handleOpen = (record) => {
dialog({
content: "确定启用该课程吗?",
ok: () => {
message.success("启用成功");
state.tableData1[index].status = 1;
handle({ offcourseId: id, type: 2 });
record.status = 1;
handle({ offcourseId: record.id, type: 2 });
},
});
};