讲师管理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

@@ -71,6 +71,8 @@ export const getApprovalResultByApprovalIdList = (approvalId) => http.post(`/adm
export const recovery = (id) => http.post(`/admin/affiliation/recovery?id=${id}`) export const recovery = (id) => http.post(`/admin/affiliation/recovery?id=${id}`)
//删除培训发生组织 //删除培训发生组织
export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`) export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`)
//停用启用培训发生组织
export const isEnable = (obj) => http.post(`/admin/affiliation/isEnable?id=${obj.id}&status=${obj.status}`)
//撤回培训发生组织 //撤回培训发生组织
export const affiliatIsConfirm = (id) => http.post(`/admin/affiliation/isConfirm?id=${id}`) export const affiliatIsConfirm = (id) => http.post(`/admin/affiliation/isConfirm?id=${id}`)
//讲师费统计详情 //讲师费统计详情

View File

@@ -247,7 +247,7 @@ export default{
{value.record.courseStatus == 0 || value.record.courseStatus == 1 {value.record.courseStatus == 0 || value.record.courseStatus == 1
? { ? {
"0": "未开课", "0": "未开课",
"1": "开课", "1": "开课",
}[value.record.courseStatus + ""] || "" }[value.record.courseStatus + ""] || ""
: "-"} : "-"}
</div> </div>

View File

@@ -310,7 +310,7 @@ export default{
{value.record.courseStatus == 0 || value.record.courseStatus == 1 {value.record.courseStatus == 0 || value.record.courseStatus == 1
? { ? {
"0": "未开课", "0": "未开课",
"1": "开课", "1": "开课",
}[value.record.courseStatus + ""] || "" }[value.record.courseStatus + ""] || ""
: "-"} : "-"}
</div> </div>

View File

@@ -722,7 +722,7 @@
//认证状态 //认证状态
const AuthenticationStatusList = ref([ const AuthenticationStatusList = ref([
{ value: '0', label: "待确认" }, { value: '0', label: "待确认" },
{ value: '1', label: "待审核" }, { value: '1', label: "待提交" },
{ value: '2', label: "审核中" }, { value: '2', label: "审核中" },
{ value: '4', label: "审核拒绝" }, { value: '4', label: "审核拒绝" },
{ value: '3', label: "审核通过" }, { value: '3', label: "审核通过" },

View File

@@ -40,7 +40,9 @@
</lockLecturer> </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" 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 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> </a-space>
</template> </template>
</template> </template>
@@ -385,14 +387,14 @@ export default{
state.formParam.code = null state.formParam.code = null
} }
const columns = ref([ const columns = ref([
{ // {
title: '培训发生组织编号 ', // title: '培训发生组织编号 ',
dataIndex: 'affiliationCode', // dataIndex: 'affiliationCode',
key: 'affiliationCode', // key: 'affiliationCode',
ellipsis: true, // ellipsis: true,
align: "center", // align: "center",
width: '100px', // width: '100px',
}, // },
{ {
title: '培训发生组织名称 ', title: '培训发生组织名称 ',
dataIndex: 'affiliationName', 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 = () => { const closeDeleteTeacher = () => {
//调用删除接口 //调用删除接口
@@ -859,6 +875,7 @@ const getTableDate = (obj) => {
searchReset, searchReset,
searchList, searchList,
deleteModal, deleteModal,
isEnablePost,
updateModal, updateModal,
cancelTeacherDialog, cancelTeacherDialog,
addTeacher, addTeacher,