讲师管理bug

This commit is contained in:
zhangsir
2024-12-31 09:21:33 +08:00
parent 6ca854aab1
commit 13101873f3
4 changed files with 31 additions and 8 deletions

View File

@@ -753,6 +753,7 @@ export default {
getTeacherById({id:state.id}).then((res) => { getTeacherById({id:state.id}).then((res) => {
console.log("外部讲师详情", res.data); console.log("外部讲师详情", res.data);
state.formParam = res.data.data state.formParam = res.data.data
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime == null ? 0 : state.formParam.defaultTeachingTime
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo
}) })

View File

@@ -1294,6 +1294,7 @@ export default {
// objA.neworgName= objA.neworgName[objA.neworgName.length-1] // objA.neworgName= objA.neworgName[objA.neworgName.length-1]
// } // }
state.formParam = res.data.data state.formParam = res.data.data
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime == null ? 0 : state.formParam.defaultTeachingTime
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
state.formParam.workExperience = state.formParam.workExperience == null ? '<p><br></p>' : state.formParam.workExperience state.formParam.workExperience = state.formParam.workExperience == null ? '<p><br></p>' : state.formParam.workExperience
state.formParam.courses = state.formParam.courses == null ? '<p><br></p>' : state.formParam.courses state.formParam.courses = state.formParam.courses == null ? '<p><br></p>' : state.formParam.courses

View File

@@ -247,14 +247,14 @@ export default {
watch( watch(
) )
const columns = ref([ const columns = ref([
{ // {
title: '编号 ', // title: '编号 ',
dataIndex: 'trainOrgId', // dataIndex: 'trainOrgId',
key: 'trainOrgId', // key: 'trainOrgId',
ellipsis: true, // ellipsis: true,
align: "center", // align: "center",
width:'100px', // width:'100px',
}, // },
{ {
title: '培训发生组织 ', title: '培训发生组织 ',
dataIndex: 'trainOrgName', dataIndex: 'trainOrgName',

View File

@@ -90,6 +90,9 @@
</a-modal> </a-modal>
</div> </div>
<!-- 抽屉 --> <!-- 抽屉 -->
<div class="example" v-if="example">
<a-spin />
</div>
<a-drawer class="largeDrawerInside" v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" > <a-drawer class="largeDrawerInside" v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
<div style="padding:24px;"> <div style="padding:24px;">
<div class="headers" style="margin-top: -24px"> <div class="headers" style="margin-top: -24px">
@@ -318,6 +321,7 @@ export default{
setup() { setup() {
const formRef = ref(); const formRef = ref();
const state = reactive({ const state = reactive({
example: false,
editParams: true, editParams: true,
editIndex: 0, editIndex: 0,
tableDataTotal: 0, tableDataTotal: 0,
@@ -816,6 +820,7 @@ const getTableDate = (obj) => {
dialog({ dialog({
content: val?'是否确认提交一旦提交将进入BPM系统审核流程':'是否确认保存', content: val?'是否确认提交一旦提交将进入BPM系统审核流程':'是否确认保存',
ok: () => { ok: () => {
state.example = true;
if (state.vf == false) { if (state.vf == false) {
updateTrainOrg(state.formParam).then(res => { updateTrainOrg(state.formParam).then(res => {
if(res.data.code == 200){ if(res.data.code == 200){
@@ -826,10 +831,12 @@ const getTableDate = (obj) => {
message.error(res.data.msg) message.error(res.data.msg)
} }
state.teacherdialog = false; state.teacherdialog = false;
state.example = false;
}).catch(err=>{ }).catch(err=>{
message.destroy(); message.destroy();
message.error(err.data.msg) message.error(err.data.msg)
state.teacherdialog = false; state.teacherdialog = false;
state.example = false;
cancel() cancel()
}) })
}else { }else {
@@ -838,11 +845,13 @@ const getTableDate = (obj) => {
state.teacherdialog = false; state.teacherdialog = false;
cancel() cancel()
searchSubmit(); searchSubmit();
state.example = false;
}).catch(err=>{ }).catch(err=>{
message.destroy(); message.destroy();
message.error(err.data.msg) message.error(err.data.msg)
state.teacherdialog = false; state.teacherdialog = false;
cancel() cancel()
state.example = false;
}) })
} }
} }
@@ -903,6 +912,18 @@ const getTableDate = (obj) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.example{
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
position: fixed;
top: 0;
left: 0;
z-index: 999999;
display: flex;
justify-content: center;
align-items: center;
}
.headers { .headers {
height: 73px; height: 73px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;