mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
讲师管理bug
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
添加讲师
|
||||
选择{{title}}
|
||||
</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
@@ -128,7 +128,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
onMounted(()=>{
|
||||
onlineLearningList()
|
||||
@@ -262,7 +265,7 @@ const deleteDepSelect = () => {
|
||||
//确定添加授权
|
||||
const submitAuth = () => {
|
||||
emit('update:arrayList',teaunm.value)
|
||||
emit('valueChange',teaunm.value)
|
||||
emit('valueChange',teaunm.value,props.type)
|
||||
visiable.value = false;
|
||||
emit("finash", false);
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-descriptions-item v-if="formData?.isParent==1" label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="formData?.isParent==1" label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">
|
||||
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||
{{{1:'待审核', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="false"
|
||||
:hideOnSinglePage="true"
|
||||
:hideOnSinglePage="false"
|
||||
:pageSize="searchParam.pageSize"
|
||||
:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
@@ -1153,7 +1153,8 @@ getAllLevelList().then((res) => {
|
||||
state.formParam.orgNames = state.formParam.orgName
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("详情", err);
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
});
|
||||
}
|
||||
//二级页面
|
||||
@@ -1227,7 +1228,7 @@ getAllLevelList().then((res) => {
|
||||
state.formParam.teachingTime = state.formParam.teachingTime?.replace(/\D/g, '');
|
||||
state.formParam.teachingTime = state.formParam.teachingTime?.slice(0,8);
|
||||
state.formParam.teachingTime == 0 && (state.formParam.teachingTime = null);
|
||||
state.formParam.teachingTime && state.formParam.levelPay && (state.formParam.expense = state.formParam.levelPay*(state.formParam.teachingTime/60).toFixed(2));
|
||||
state.formParam.teachingTime && state.formParam.levelPay && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2));
|
||||
}
|
||||
const clearstudysNumber = () => {
|
||||
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
|
||||
@@ -1246,7 +1247,7 @@ getAllLevelList().then((res) => {
|
||||
state.formParam.levelPay = state.formParam.levelPay?.replace(/\D/g, '');
|
||||
state.formParam.levelPay = state.formParam.levelPay?.slice(0,8);
|
||||
state.formParam.levelPay == 0 && (state.formParam.levelPay = null);
|
||||
state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = state.formParam.levelPay*(state.formParam.teachingTime/60).toFixed(2))
|
||||
state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2))
|
||||
}
|
||||
const rules = {
|
||||
name: [{ required: true, message:'',log: '讲师不能为空' }],
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 130px;">
|
||||
<FolderAddOutlined /> 新增归属组织
|
||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 160px;">
|
||||
<FolderAddOutlined /> 新增培训发生组织
|
||||
</a-button>
|
||||
<div
|
||||
class="btnn btn2"
|
||||
@@ -52,7 +52,7 @@
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:hideOnSinglePage="false"
|
||||
:pageSize="searchParam.pageSize"
|
||||
:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
@@ -137,7 +137,7 @@
|
||||
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择组织负责人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||
<!-- <ProjectManager :type="0" v-model:value="formParam.actValue" :placeholder="'请选择担当'" v-model:arrayList="formParam.actArray" ></ProjectManager> -->
|
||||
<AddApprover v-model:arrayList="formParam.actArray" @valueChange="valueChange" :type="0">
|
||||
<AddApprover :title="'组织担当'" v-model:arrayList="formParam.actArray" @valueChange="valueChange" :type="0">
|
||||
<a-select style="width:100%" v-model:value="formParam.actValue" :open="false" :placeholder="'请选择担当'"></a-select>
|
||||
</AddApprover>
|
||||
</a-form-item>
|
||||
@@ -149,7 +149,7 @@
|
||||
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||
<!-- <ProjectManager :type="1" v-model:value="formParam.leveOneValue" :placeholder="'请选择一级审批人'" v-model:arrayList="formParam.leveOneArray" ></ProjectManager> -->
|
||||
<AddApprover v-model:arrayList="formParam.leveOneArray" @valueChange="valueChange" :type="1">
|
||||
<AddApprover :title="'一级审批人'" v-model:arrayList="formParam.leveOneArray" @valueChange="valueChange" :type="1">
|
||||
<a-select style="width:100%" v-model:value="formParam.leveOneValue" :open="false" :placeholder="'请选择一级审批人'"></a-select>
|
||||
</AddApprover>
|
||||
</a-form-item>
|
||||
@@ -159,7 +159,7 @@
|
||||
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||
<!-- <ProjectManager :type="1" :placeholder="'请选择二级审批人'" v-model:arrayList="formParam.leveTwoArray" ></ProjectManager> -->
|
||||
<AddApprover v-model:arrayList="formParam.leveTwoArray" @valueChange="valueChange" :type="2">
|
||||
<AddApprover :title="'二级审批人'" v-model:arrayList="formParam.leveTwoArray" @valueChange="valueChange" :type="2">
|
||||
<a-select style="width:100%" v-model:value="formParam.leveTwoValue" :open="false" :placeholder="'请选择二级审批人'"></a-select>
|
||||
</AddApprover>
|
||||
</a-form-item>
|
||||
@@ -171,7 +171,7 @@
|
||||
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||
<!-- <ProjectManager :type="1" :placeholder="'请选择三级审批人'" v-model:arrayList="formParam.leveThreeArray" ></ProjectManager> -->
|
||||
<AddApprover v-model:arrayList="formParam.leveThreeArray" @valueChange="valueChange" :type="3">
|
||||
<AddApprover :title="'三级审批人'" v-model:arrayList="formParam.leveThreeArray" @valueChange="valueChange" :type="3">
|
||||
<a-select style="width:100%" v-model:value="formParam.leveThreeValue" :open="false" :placeholder="'请选择三级审批人'"></a-select>
|
||||
</AddApprover>
|
||||
</a-form-item>
|
||||
@@ -183,7 +183,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item label="选择管理组织">
|
||||
<a-form-item label="选择管理组织" name="orglistName">
|
||||
<a-row :gutter="50" style="margin-bottom: 10px;">
|
||||
<a-col :span="2">
|
||||
<!-- <a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag> -->
|
||||
@@ -266,6 +266,7 @@ export default{
|
||||
pageSize: "10"
|
||||
},
|
||||
formParam:{
|
||||
orglistName: null,
|
||||
affiliationCode:null,
|
||||
affiliationName:null,
|
||||
isParent: 1,
|
||||
@@ -283,9 +284,9 @@ export default{
|
||||
},
|
||||
})
|
||||
const PlaceOfPayList = ref([
|
||||
{ value: '1', label: "一级审批" },
|
||||
{ value: '2', label: "二级审批" },
|
||||
{ value: '3', label: "三级审批" },
|
||||
{ value: '1', label: "一级审批人" },
|
||||
{ value: '2', label: "二级审批人" },
|
||||
{ value: '3', label: "三级审批人" },
|
||||
])
|
||||
const placeData = () => {
|
||||
lecturer.parentList().then(res=>{
|
||||
@@ -300,9 +301,7 @@ export default{
|
||||
})
|
||||
}
|
||||
placeData()
|
||||
const PlaceOfPayListTwo = ref([
|
||||
{ value: '1', label: "一级审批人" },
|
||||
])
|
||||
const PlaceOfPayListTwo = ref([])
|
||||
const selectRadio = (val)=>{
|
||||
if(val.target.value == 1){
|
||||
state.formParam.leveOneArray = []
|
||||
@@ -360,11 +359,11 @@ export default{
|
||||
case '2':
|
||||
return <span>审核中</span>;
|
||||
case '3':
|
||||
return <span>审核通过</span>;
|
||||
return <span>已完成</span>;
|
||||
case '4':
|
||||
return <span>拒绝</span>;
|
||||
return <span>审核失败</span>;
|
||||
case '5':
|
||||
return <span>撤回</span>;
|
||||
return <span>待审核</span>;
|
||||
default:
|
||||
return <span>-</span>;
|
||||
}
|
||||
@@ -514,12 +513,12 @@ const getTableDate = (obj) => {
|
||||
};
|
||||
const addTeacher=()=>{
|
||||
state.teacherdialog=true ,
|
||||
state.teacherdialogtitle="新增归属组织"
|
||||
state.teacherdialogtitle="新增培训发生组织"
|
||||
state.vf = true
|
||||
lecturer.getAffiliationCode().then(res=>{
|
||||
state.formParam.affiliationCode = res.data.data
|
||||
}).catch(()=>{
|
||||
message.error('获取归属组织编号失败')
|
||||
message.error('获取培训发生组织编号失败')
|
||||
})
|
||||
}
|
||||
const downOpen = () => {
|
||||
@@ -574,7 +573,7 @@ const getTableDate = (obj) => {
|
||||
});
|
||||
state.formParam.leveThreeValue = state.formParam.leveThreeArray.map(item => item.label).join(',');
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '编辑归属组织'
|
||||
state.teacherdialogtitle = '编辑培训发生组织'
|
||||
state.vf = false
|
||||
})
|
||||
// TeacherSystem(record)
|
||||
@@ -586,6 +585,7 @@ const getTableDate = (obj) => {
|
||||
}
|
||||
const cancel=()=>{
|
||||
state.formParam={
|
||||
orglistName: null,
|
||||
affiliationCode:null,
|
||||
affiliationName:null,
|
||||
isParent: 1,
|
||||
@@ -613,31 +613,34 @@ const getTableDate = (obj) => {
|
||||
});
|
||||
});
|
||||
}
|
||||
const valueChange = (val) => {
|
||||
console.log(val,'vallll')
|
||||
if(val.length>0){
|
||||
if(val[0].type==0){
|
||||
state.formParam.actValue = val.map(item=>item.label).join(',') || null
|
||||
}else if(val[0].type==1){
|
||||
state.formParam.leveOneValue = val.map(item=>item.label).join(',') || null
|
||||
}else if(val[0].type==2){
|
||||
state.formParam.leveTwoValue = val.map(item=>item.label).join(',') || null
|
||||
}else if(val[0].type==3){
|
||||
state.formParam.leveThreeValue = val.map(item=>item.label).join(',') || null
|
||||
}
|
||||
const valueChange = (val,type) => {
|
||||
if(type==0){
|
||||
state.formParam.actValue = val?.map(item=>item.label).join(',') || null
|
||||
}else if(type==1){
|
||||
state.formParam.leveOneValue = val?.map(item=>item.label).join(',') || null
|
||||
}else if(type==2){
|
||||
state.formParam.leveTwoValue = val?.map(item=>item.label).join(',') || null
|
||||
}else if(type==3){
|
||||
state.formParam.leveThreeValue = val?.map(item=>item.label).join(',') || null
|
||||
}
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = async (val) => {
|
||||
console.log(state.formParam,'state.formParam')
|
||||
state.formParam.affiliationName = state.formParam.affiliationName?.trim()
|
||||
state.formParam.affiliationUserList = [...state.formParam?.actArray,...state.formParam?.leveOneArray,...state.formParam?.leveTwoArray,...state.formParam?.leveThreeArray]
|
||||
state.formParam.orglistName = state.formParam.affiliationOrgList?.map(item=>item.name).join(',')
|
||||
const formItemNames = Object.keys(rules);
|
||||
for(let i=0;i<formItemNames.length;i++){
|
||||
const result = await validateField(formItemNames[i]);
|
||||
if (result) {
|
||||
if(formItemNames[i]=='code' && !state.formParam.isParent){
|
||||
return message.error(rules[formItemNames[i]][0].log2)
|
||||
}else{
|
||||
return message.error(rules[formItemNames[i]][0].log)
|
||||
}
|
||||
}
|
||||
}
|
||||
state.formParam.remark = state.formParam?.remark?.trim()
|
||||
state.formParam.submitStatus = val
|
||||
dialog({
|
||||
@@ -676,12 +679,12 @@ const getTableDate = (obj) => {
|
||||
})
|
||||
};
|
||||
const rules = {
|
||||
affiliationCode: [{ required: true, message: '',log:'培训发生组织编号不能为空' }],
|
||||
affiliationName: [{ required: true, message: '',log:'培训发生组织名称不能为空' }],
|
||||
code: [{ required: true, message: '',log:'根节点不能为空' }],
|
||||
actValue: [{ required: true, message: '',log:'组织担当不能为空' }],
|
||||
leveOneValue: [{ required: true, message: '"',log:'一级审批人不能为空' }],
|
||||
|
||||
affiliationCode: [{ required: true, message: '',log:'请选择培训发生组织编号' }],
|
||||
affiliationName: [{ required: true, message: '',log:'请选择培训发生组织名称' }],
|
||||
code: [{ required: true, message: '',log:'请选择根节点',log2:'请选择审批层级' }],
|
||||
actValue: [{ required: true, message: '',log:'请选择组织担当' }],
|
||||
leveOneValue: [{ required: true, message: '',log:'请选择一级审批人' }],
|
||||
orglistName: [{ required: true, message: '',log:'请选择管理组织' }],
|
||||
|
||||
}
|
||||
//回车
|
||||
|
||||
Reference in New Issue
Block a user