讲师管理bug

This commit is contained in:
zhangsir
2024-12-10 11:42:09 +08:00
parent 402262881e
commit bbf207f008
11 changed files with 74 additions and 54 deletions

View File

@@ -5,7 +5,7 @@
<a-form layout="inline">
<a-form-item class="select">
<div>
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入编号/名称进行搜索"
<a-input style="width: 235px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入编号/名称进行搜索"
v-on:keydown.enter="enterPressHadlerSearch" />
</div>
</a-form-item>
@@ -221,7 +221,7 @@
>
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
<a-button v-if="editParams||editIndex>1" class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
</div>
</a-drawer>
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
@@ -252,6 +252,8 @@ export default{
setup() {
const formRef = ref();
const state = reactive({
editParams: true,
editIndex: 0,
tableDataTotal: 0,
vf:true,
showContent: false,
@@ -476,7 +478,8 @@ const getTableDate = (obj) => {
getTableDate();
}).catch(err=>{
console.log(err,'errr')
message.error(err.msg)
message.destroy()
message.error(err.data.msg)
})
}
})
@@ -530,6 +533,9 @@ const getTableDate = (obj) => {
watch(()=>state.teacherdialog,(val)=>{
if(val){
placeData()
}else{
state.editParams = true
state.editIndex = 0
}
})
const addTeacher=()=>{
@@ -548,10 +554,16 @@ const getTableDate = (obj) => {
const addContentData = () => {
state.showContent = true
}
watch(()=>state.formParam,(val)=>{
if(!state.editParams){
state.editIndex++
}
},{deep:true})
//修改信息弹窗
const handleModify = (record) => {
lecturer.getAffiliationById(record.id).then(res=>{
console.log(res,'resssss')
state.editParams = false
state.formParam = res.data.data
const actArray = res.data.data.affiliationUserList.filter(item=>item.type == 0)
const leveOneArray = res.data.data.affiliationUserList.filter(item=>item.type == 1)