讲师管理bug

This commit is contained in:
zhangsir
2024-12-24 14:21:21 +08:00
parent d722297b81
commit bccb4913be
5 changed files with 31 additions and 12 deletions

View File

@@ -40,7 +40,9 @@
</lockLecturer>
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status==2&&false" type="link" @click="() => updateModal(record)">撤回</a-button>
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
<a-button @click="isEnablePost(record,0)" type="link" >启用</a-button>
<a-button @click="isEnablePost(record,1)" type="link" >停用</a-button>
</a-space>
</template>
</template>
@@ -385,14 +387,14 @@ export default{
state.formParam.code = null
}
const columns = ref([
{
title: '培训发生组织编号 ',
dataIndex: 'affiliationCode',
key: 'affiliationCode',
ellipsis: true,
align: "center",
width: '100px',
},
// {
// title: '培训发生组织编号 ',
// dataIndex: 'affiliationCode',
// key: 'affiliationCode',
// ellipsis: true,
// align: "center",
// width: '100px',
// },
{
title: '培训发生组织名称 ',
dataIndex: 'affiliationName',
@@ -581,6 +583,20 @@ const getTableDate = (obj) => {
}
})
};
const isEnablePost = (record,status) => {
dialog({
content: `是否确认${!status?'启用':'停用'}该培训发生组织?`,
ok: () => {
lecturer.isEnable({id:record.id,status}).then(res=>{
message.success("操作成功")
searchSubmit();
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
}
})
}
//确认删除
const closeDeleteTeacher = () => {
//调用删除接口
@@ -859,6 +875,7 @@ const getTableDate = (obj) => {
searchReset,
searchList,
deleteModal,
isEnablePost,
updateModal,
cancelTeacherDialog,
addTeacher,