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