mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
讲师管理bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<div class="filter" style="min-width: 1270px;">
|
||||
<div class="filter" style="min-width: 1056px;">
|
||||
<a-form layout="inline">
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
@@ -124,7 +124,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div ref="drawerContent" style="padding-left: 15px;padding-right: 46px;">
|
||||
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||
<a-form :model="formParam" layout="vertical" ref="formRef">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<span class="line"></span><span style="color:#333333;font-weight: 600;font-size:16px;">基本信息</span>
|
||||
@@ -158,7 +158,15 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="讲师姓名" name="name">
|
||||
<a-form-item name="name">
|
||||
<template v-slot:label>
|
||||
<img
|
||||
style="margin-right:4px;width: 7px;height: 7px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
讲师姓名
|
||||
</template>
|
||||
<SearchTeacher @tlevel="teacherTlevel" :lecturer="true" :disabled="!!id" v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
|
||||
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
|
||||
</a-form-item>
|
||||
@@ -177,7 +185,15 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="讲师体系" name="tsystemName">
|
||||
<a-form-item name="tsystemName">
|
||||
<template v-slot:label>
|
||||
<img
|
||||
style="margin-right:4px;width: 7px;height: 7px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
讲师体系
|
||||
</template>
|
||||
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
|
||||
@change="changetlevel" .:options="LecturerSystemList">
|
||||
</a-select> -->
|
||||
@@ -188,7 +204,15 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- <div @click="handleformlevel"> -->
|
||||
<a-form-item label="讲师级别" name="tlevelId">
|
||||
<a-form-item name="tlevelId">
|
||||
<template v-slot:label>
|
||||
<img
|
||||
style="margin-right:4px;width: 7px;height: 7px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
讲师级别
|
||||
</template>
|
||||
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear disableda
|
||||
:options="tSystemNames.levelVoList" @change="handleformlevel">
|
||||
</a-select>
|
||||
@@ -197,10 +221,18 @@
|
||||
</a-col>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="初始授课时长" name="defaultTeachingTime">
|
||||
<a-form-item name="defaultTeachingTime">
|
||||
<template v-slot:label>
|
||||
<img
|
||||
style="margin-right:4px;width: 7px;height: 7px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
初始授课时长
|
||||
</template>
|
||||
<a-input v-model:value="formParam.defaultTeachingTime" style="width:100%; height: 40px; border-radius: 8px; "
|
||||
:maxLength="8"
|
||||
@change="clearNonNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
|
||||
@change="clearNonNumber" @blur="blurNumber" @focus="focusNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
|
||||
</a-input>
|
||||
<!-- <span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime === null">0.00小时</span>
|
||||
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime != null">{{
|
||||
@@ -989,14 +1021,19 @@ export default {
|
||||
}
|
||||
const formItemNames = Object.keys(rules);
|
||||
for(let i=0;i<formItemNames.length;i++){
|
||||
const result = await validateField(formItemNames[i]);
|
||||
if (result) {
|
||||
// const result = await validateField(formItemNames[i]);
|
||||
const result = state.formParam[formItemNames[i]]
|
||||
if (!result) {
|
||||
return message.error(rules[formItemNames[i]][0].log)
|
||||
}
|
||||
}
|
||||
if(state.formParam.certStatus&&!state.formParam.certificationName){
|
||||
return message.error('请上传认证凭证')
|
||||
}
|
||||
if(!state.formParam.certStatus){
|
||||
state.formParam.certification = null
|
||||
state.formParam.certificationName = null
|
||||
}
|
||||
if(state.formParam.name){
|
||||
const nameNo = state.formParam?.name?.split('/')
|
||||
state.formParam.name = nameNo[0]
|
||||
@@ -1141,8 +1178,8 @@ export default {
|
||||
};
|
||||
watch(() => state.formParam.certStatus,(val)=>{
|
||||
if(!val){
|
||||
state.formParam.certification = null
|
||||
state.formParam.certificationName = null
|
||||
// state.formParam.certification = null
|
||||
// state.formParam.certificationName = null
|
||||
}
|
||||
})
|
||||
//清空数据
|
||||
@@ -1177,6 +1214,12 @@ export default {
|
||||
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
|
||||
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.slice(0,8)
|
||||
}
|
||||
const blurNumber = () => {
|
||||
!state.formParam.defaultTeachingTime && (state.formParam.defaultTeachingTime = '0')
|
||||
}
|
||||
const focusNumber = () => {
|
||||
state.formParam.defaultTeachingTime==0 && (state.formParam.defaultTeachingTime = null)
|
||||
}
|
||||
const rules = {
|
||||
name: [{ required: true, message: '',log:'讲师不能为空' }],
|
||||
// newdepartId: [{ required: true, message: '组织不能为空' }],
|
||||
@@ -1320,6 +1363,8 @@ export default {
|
||||
handleformlevel,
|
||||
// customPreview,
|
||||
clearNonNumber,
|
||||
blurNumber,
|
||||
focusNumber,
|
||||
// managerChange,
|
||||
headers,
|
||||
beforeUpload,
|
||||
@@ -1378,15 +1423,21 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .ant-form-item-with-help .ant-form-item-explain{
|
||||
min-height: 0 !important;
|
||||
}
|
||||
::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
|
||||
border-color: #40a9ff !important;
|
||||
}
|
||||
::v-deep .search .ant-select-focused .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
|
||||
border-color: #40a9ff !important;
|
||||
}
|
||||
// ::v-deep .ant-form-item-with-help .ant-form-item-explain{
|
||||
// min-height: 0 !important;
|
||||
// }
|
||||
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
|
||||
// border-color: #40a9ff !important;
|
||||
// }
|
||||
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector {
|
||||
// border-color: #40a9ff !important;
|
||||
// }
|
||||
// ::v-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
|
||||
// border-color: #40a9ff !important;
|
||||
// }
|
||||
// ::v-deep .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{
|
||||
// border-color: #40a9ff !important;
|
||||
// }
|
||||
.ant-form-item{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user