mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +08:00
讲师管理bug
This commit is contained in:
@@ -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"
|
||||
@@ -50,15 +50,15 @@
|
||||
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="searchParam.pageSize"
|
||||
:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="false"
|
||||
:pageSize="searchParam.pageSize"
|
||||
:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 删除功能弹窗 -->
|
||||
@@ -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,29 +613,32 @@ 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.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);
|
||||
for(let i=0;i<formItemNames.length;i++){
|
||||
const result = await validateField(formItemNames[i]);
|
||||
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()
|
||||
@@ -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