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