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

@@ -147,6 +147,7 @@ const systemName = ref(null)
const levelName = ref('')
const neworgName = ref('')
const teacherId = ref('')
const changeValue = ref({})
const handleChange = (e,l) => {
isOpen.value = false
// emit('update:value',e)
@@ -161,8 +162,9 @@ const handleChange = (e,l) => {
if( l.orgName !==null ){
neworgName.value= orgName.value.split('/')
neworgName.value= neworgName.value[ neworgName.value.length-1]
}
emit('tlevel',l)
}
changeValue.value = l
// emit('tlevel',l)
};
function debounce(func, wait) {
let timeout;
@@ -335,6 +337,7 @@ watch(()=>visible.value,(val)=>{
orgId.value = ''
systemName.value = null
levelName.value = ''
changeValue.value = {}
neworgName.value=''
selectName.value = null
// selectData.value = ''
@@ -352,7 +355,8 @@ const notChange = () => {
orgName.value = ''
orgId.value = ''
systemName.value = null
levelName.value = ''
levelName.value = ''
changeValue.value = {}
neworgName.value=''
teacherId.value = ''
loadingChange.value = false
@@ -379,7 +383,7 @@ watch(()=>teacherId.value,(val)=>{
}
}
loadingChange.value = false
emit('update:system',systemName.value)
// emit('update:system',systemName.value)
}).catch(err=>{
message.error('讲师体系获取失败,请重新选择')
loadingChange.value = false
@@ -398,6 +402,7 @@ const changeOut = () => {
// neworgName= neworgName[neworgName.length-1]
// }
emit('tlevel',changeValue.value)
selectData.value = teacherName.value
emit('update:value',teacherName.value)
emit('update:lable',orgName.value)

View File

@@ -6,13 +6,13 @@
<a-form layout="inline">
<a-form-item class="select">
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.name" style="width: 250px; height: 40px; border-radius: 8px"
placeholder="请输入讲师姓名/手机号进行检索" allowClear showSearch
v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-form-item >
<a-form-item class="select">
<a-select style="width: 276px" v-model:value="searchParam.status" placeholder="账号状态"
<a-select style="width: 220px" v-model:value="searchParam.status" placeholder="账号状态"
:options="AccountStatusList"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>

View File

@@ -9,17 +9,17 @@
<!-- <a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
</a-input> -->
<a-input style="width: 276px; height: 40px; border-radius: 8px" placeholder="请输入讲师姓名/手机号进行检索" showSearch
<a-input style="width: 235px; height: 40px; border-radius: 8px" placeholder="请输入姓名/手机号进行检索" showSearch
allowClear v-model:value="searchParam.name"
v-on:keydown.enter="enterPressHadlerSearch"></a-input>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.supplier" placeholder="请输入供应商" :options="supperList" allowClear
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.supplier" placeholder="请输入供应商" :options="supperList" allowClear
v-on:keydown.enter="enterPressHadlerSearch" showSearch >
</a-select>
</a-form-item>
<a-form-item class="select">
<a-input v-model:value="searchParam.courseName" style="width: 276px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.courseName" style="width: 235px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch
v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
@@ -27,20 +27,20 @@
<a-form-item class="select ">
<div class="select addTimeBox">
<div class="addTime">授课日期</div>
<a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
<a-range-picker v-model:value="searchdate" style="width: 380px !important;" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
separator="至" :placeholder="[' 开始时间', ' 结束时间']
"
v-on:keydown.enter="enterPressHadlerSearch" />
</div>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.createFrom" placeholder="录入类型"
<a-select style="width: 200px ;margin-bottom:20px" v-model:value="searchParam.createFrom" placeholder="录入类型"
:options="entryTypeList" allowClear
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select">
<a-tree-select style="width: 230px" :fieldNames="{
<a-tree-select style="width: 235px" :fieldNames="{
children: 'children',
label: 'name',
value: 'code',
@@ -52,7 +52,7 @@
</a-tree-select>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 230px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
<a-select style="width: 200px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
:options="AuthenticationStatusList" allowClear
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
@@ -198,13 +198,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px; "
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px; "
placeholder="0" allowClear showSearch suffix="分钟"
:maxLength="8" @blur="clearNonNumber">
:maxLength="8" @change="clearNonNumber">
</a-input>
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> -->
</a-form-item>
</a-col>
</a-row>
@@ -221,7 +221,7 @@
<a-form-item label="评分" name="score">
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-input> -->
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="10"
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="100"
style="width:100%; height: 40px; border-radius: 8px ; " />
</a-form-item>
</a-col>
@@ -398,7 +398,8 @@ export default {
teaching: null,
teachingDate: null,
teacherId:null,
mobile:null
mobile:null,
score: 0
},
searchdate: undefined, //选择时间
searchParam: {
@@ -758,7 +759,7 @@ export default {
if(state.formParam.studys==0){
state.formParam.studys = null
}
if(state.formParam.score){
if(state.formParam.score||state.formParam.score==0){
state.formParam.score = String(state.formParam.score)
}else{
state.formParam.score = null
@@ -836,7 +837,7 @@ export default {
name: null,
type: null,
teaching: null,
score: null,
score: 0,
remark: null,
teachingDate: null,
teacherId:null

View File

@@ -5,12 +5,12 @@
<div class="filter">
<a-form layout="inline" style="min-width: 1380px;">
<a-form-item class="select">
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.name" style="width: 235px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-form-item>
<a-form-item class="select">
<a-input v-model:value="searchParam.courseName" style="width: 276px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.courseName" style="width: 235px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-form-item>
@@ -21,19 +21,19 @@
<a-form-item class="select ">
<div class="select addTimeBox">
<div class="addTime">授课日期</div>
<a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
<a-range-picker v-model:value="searchdate" style="width: 380px !important;" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-on:keydown.enter="enterPressHadlerSearch" />
<!-- @change="searchTimeChange" -->
</div>
</a-form-item>
<!-- <div style="width:100%"></div> -->
<a-form-item class="select">
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.createFrom" placeholder="录入类型"
<a-select style="width: 200px ;margin-bottom:20px" v-model:value="searchParam.createFrom" placeholder="录入类型"
:options="entryTypeList" allowClear v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
<a-form-item class="select">
<a-select style="width: 200px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
:options="AuthenticationStatusList" a llowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
@@ -64,13 +64,13 @@
</a-form-item>
<!-- <div style="width: 100%;"></div> -->
<a-form-item class="select" v-if="moreid == 2">
<a-select style="min-width: 235px ; height: auto ;margin-bottom:20px" v-model:value="score" placeholder="请选择评分"
<a-select style="min-width: 200px ; height: auto ;margin-bottom:20px" v-model:value="score" placeholder="请选择评分"
:options="scoreList" allowClear showSearch mode="multiple" @change="scoreChange"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px" v-model:value="searchParam.studys" placeholder="授课人数" :options="studysList"
<a-select style="width: 200px" v-model:value="searchParam.studys" placeholder="授课人数" :options="studysList"
allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
<!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
@@ -81,12 +81,12 @@
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
<a-button class="resetbtn " @click="searchReset">重置</a-button>
<div v-if="moreid == 1">
<a-button style="line-height:32px;" @click="handlemoreid()" class="moreidbtn" type="text"> 展开
<a-button style="line-height:40px;" @click="handlemoreid()" class="moreidbtn" type="text"> 展开
<DownOutlined />
</a-button>
</div>
<div v-if="moreid == 2">
<a-button style="line-height:32px;" @click="handlemoreid()" class="moreidbtn"> 收起
<a-button style="line-height:40px;" @click="handlemoreid()" class="moreidbtn"> 收起
<UpOutlined />
</a-button>
</div>
@@ -241,19 +241,19 @@
<a-col :span="12">
<a-form-item label="授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px ; "
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; "
placeholder="请输入授课时长" allowClear showSearch suffix="分钟" :maxLength="8" @blur="clearNonNumber">
</a-input>
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="评分" name="score">
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-input> -->
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="10"
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="100"
style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" />
</a-form-item>
</a-col>
@@ -487,6 +487,7 @@ export default {
teachingDate: null,
// sourceBelongId: null,
sourceBelongFullName: null,
score: 0,
},
startTime: null,
searchParam:
@@ -964,7 +965,7 @@ export default {
state.formParam.userNo = state.formParam.name?.split('/')[1]
state.formParam.tsystemName = state.tSystemNames.systemName
state.formParam.tsystemId = state.tSystemNames?.systemId
if(state.formParam.score){
if(state.formParam.score||state.formParam.score==0){
state.formParam.score = String(state.formParam.score)
}else{
state.formParam.score = null
@@ -1049,7 +1050,7 @@ export default {
courseName: null,
teaching: null,
studys: null,
score: null,
score: 0,
type: null,
remark: null,
// sourceBelongId: null,
@@ -1678,7 +1679,8 @@ export default {
.moreidbtn {
border: none;
color: #4ea6ff;
width: 80px
// width: 80px
padding: 0;
}
//小竖线

View File

@@ -5,7 +5,7 @@
<div class="filter" >
<a-form layout="inline" style="min-width: 1380px;">
<a-form-item class="select">
<a-select style="width: 276px" v-model:value="searchParam.trainOrgId" placeholder="培训发生组织" allowClear
<a-select style="width: 235px" v-model:value="searchParam.trainOrgId" placeholder="培训发生组织" allowClear
:options="trainOrglist"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
@@ -15,7 +15,7 @@
<div class="addTime" >汇总时间</div>
<a-range-picker
v-model:value="searchdate"
style="width: 420px"
style="width: 380px !important;"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"
@@ -25,7 +25,7 @@
</div>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
<a-select style="width: 200px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
:options="AuthenticationStatusList"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>

View File

@@ -9,15 +9,15 @@
<!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
</a-input>
--> <div style="width: 234px; height: 40px; border-radius: 8px" >
<a-input v-model:value="searchParam.name" style="width: 234px; height: 40px; border-radius: 8px"
--> <div style="width: 235px; height: 40px; border-radius: 8px" >
<a-input v-model:value="searchParam.name" style="width: 235px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch
v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</div>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 234px ;margin-bottom:20px" v-model:value="searchParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
:options="orgList"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
@@ -27,7 +27,7 @@
<div class="addTime" >授课日期</div>
<a-range-picker
v-model:value="searchdate"
style="width: 380px"
style="width: 380px !important;"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"

View File

@@ -5,12 +5,12 @@
<div class="filter" >
<a-form layout="inline">
<a-form-item class="select">
<a-select style="width: 276px" v-model:value="searchParam.trainOrgId" placeholder="请选择资源归属" allowClear
<a-select style="width: 235px" v-model:value="searchParam.trainOrgId" placeholder="请选择资源归属" allowClear
:options="TrainOrglist"
v-on:keydown.enter="enterPressHadlerSearch"/>
</a-form-item>
<a-form-item class="select " >
<a-date-picker picker="month" style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate"
<a-date-picker picker="month" style="width: 235px; height: 40px; border-radius: 8px" v-model:value="searchdate"
:placeholder="[ '请选择汇总周期']" @change="searchTimeChange" format="YYYY-MM" valueFormat="YYYY-MM"
v-on:keydown.enter="enterPressHadlerSearch" />
</a-form-item >

View File

@@ -24,7 +24,7 @@
<div class="filter">
<a-form layout="inline" >
<a-form-item class="select">
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.name" style="width: 235px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch
v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
@@ -51,7 +51,7 @@
:tree-data="sysTypeOptions"
v-on:keydown.enter="enterPressHadlerSearch">
</a-tree-select> -->
<a-select style="width: 230px" placeholder="请选择培训发生组织" v-model:value="searchParam.trainOrgId"
<a-select style="width: 235px" placeholder="请选择培训发生组织" v-model:value="searchParam.trainOrgId"
:options="getOrganizationList">
</a-select>
</a-form-item>

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)

View File

@@ -8,7 +8,7 @@
<a-input
v-model:value="searchParam.name"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入项目名称1"
placeholder="请输入项目名称"
allowClear
showSearch
>

View File

@@ -8,7 +8,7 @@
<a-input
v-model:value="searchParam.name"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入项目名称1"
placeholder="请输入项目名称"
allowClear
showSearch
>