mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
讲师管理培训发生组织修改bug
This commit is contained in:
@@ -103,10 +103,16 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
|||||||
checkedKeys.value = []
|
checkedKeys.value = []
|
||||||
}else{
|
}else{
|
||||||
console.log(props.AddContentList,'xixiixix')
|
console.log(props.AddContentList,'xixiixix')
|
||||||
|
getNot()
|
||||||
treeAddData.value = props?.AddContentList
|
treeAddData.value = props?.AddContentList
|
||||||
checkedKeys.value = props?.AddContentList?.map(item=>item.orgId)
|
checkedKeys.value = props?.AddContentList?.map(item=>item.orgId)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const getNot = () => {
|
||||||
|
lecturerApi.getUnSelectOrg().then(res=>{
|
||||||
|
console.log(res,'ressss')
|
||||||
|
})
|
||||||
|
}
|
||||||
const onCheck = (checkedKeys, {checked: bool, checkedNodes, node, event}) => {
|
const onCheck = (checkedKeys, {checked: bool, checkedNodes, node, event}) => {
|
||||||
// "965356037047586816"
|
// "965356037047586816"
|
||||||
let length = treeAddData.value.length
|
let length = treeAddData.value.length
|
||||||
|
|||||||
@@ -25,10 +25,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<a-descriptions :column="2" bordered>
|
<a-descriptions :column="2" bordered>
|
||||||
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
|
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item v-if="formData?.isParent==1" label="一级审批人">{{formData?.one||'-'}}</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 label="状态">
|
<a-descriptions-item label="状态">
|
||||||
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
@@ -41,7 +44,7 @@
|
|||||||
<a-table :columns="columns" :data-source="formData?.tableData" />
|
<a-table :columns="columns" :data-source="formData?.tableData" />
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 100px">
|
<div style="margin-bottom: 100px">
|
||||||
<a-descriptions :column="2" bordered>
|
<!-- <a-descriptions :column="2" bordered>
|
||||||
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
||||||
@@ -52,11 +55,11 @@
|
|||||||
<a-descriptions-item label="状态">
|
<a-descriptions-item label="状态">
|
||||||
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions> -->
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="审批记录" force-render>
|
<a-tab-pane key="2" tab="审批记录" force-render>
|
||||||
<div>
|
<div style="margin-bottom: 100px">
|
||||||
<a-table :columns="columnsTwo" :data-source="formData?.tableDataTwo" />
|
<a-table :columns="columnsTwo" :data-source="formData?.tableDataTwo" />
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-form-item class="select">
|
<a-form-item class="select">
|
||||||
<div>
|
<div>
|
||||||
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入工号/讲师姓名进行检索"
|
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入编号/名称进行搜索"
|
||||||
v-on:keydown.enter="enterPressHadlerSearch" />
|
v-on:keydown.enter="enterPressHadlerSearch" />
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -21,6 +21,14 @@
|
|||||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 130px;">
|
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 130px;">
|
||||||
<FolderAddOutlined /> 新增归属组织
|
<FolderAddOutlined /> 新增归属组织
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<div
|
||||||
|
class="btnn btn2"
|
||||||
|
@click="downOpen"
|
||||||
|
style="margin-right: 14px"
|
||||||
|
>
|
||||||
|
<div class="daochu"></div>
|
||||||
|
<div class="btnText">导出</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
|
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
|
||||||
@expand="expandTable" :pagination="false">
|
@expand="expandTable" :pagination="false">
|
||||||
@@ -31,6 +39,7 @@
|
|||||||
<div style="color: #1890ff;">查看</div>
|
<div style="color: #1890ff;">查看</div>
|
||||||
</lockLecturer>
|
</lockLecturer>
|
||||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||||
|
<a-button type="link" @click="() => updateModal(record)">撤回</a-button>
|
||||||
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -79,8 +88,15 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
<!-- 抽屉 -->
|
<!-- 抽屉 -->
|
||||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
<a-drawer v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
|
||||||
width="60%" :title="teacherdialogtitle">
|
<div class="headers">
|
||||||
|
<div class="headerTitle">{{ teacherdialogtitle }}</div>
|
||||||
|
<img
|
||||||
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
|
src="@/assets/images/basicinfo/close.png"
|
||||||
|
@click="cancelTeacherDialog"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -97,7 +113,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="培训发生组织名称:" name="affiliationName">
|
<a-form-item label="培训发生组织名称:" name="affiliationName">
|
||||||
<a-input v-model:value="formParam.affiliationName" class="draitem"
|
<a-input :maxlength="30" show-count v-model:value="formParam.affiliationName" class="draitem"
|
||||||
placeholder="请输入讲师体系名称" allowClear showSearch>
|
placeholder="请输入讲师体系名称" allowClear showSearch>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -111,7 +127,7 @@
|
|||||||
<a-radio :value="1">否</a-radio>
|
<a-radio :value="1">否</a-radio>
|
||||||
<a-radio :value="0">是</a-radio>
|
<a-radio :value="0">是</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
<a-select v-model:value="formParam.code" placeholder="请选择根节点"
|
<a-select v-model:value="formParam.code" :placeholder="!formParam.isParent?'请选择审批层级':'请选择根节点'"
|
||||||
:options="!formParam.isParent?PlaceOfPayList:PlaceOfPayListTwo" allowClear showSearch/>
|
:options="!formParam.isParent?PlaceOfPayList:PlaceOfPayListTwo" allowClear showSearch/>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -204,8 +220,8 @@
|
|||||||
} "
|
} "
|
||||||
>
|
>
|
||||||
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
|
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
|
||||||
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
|
<a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
|
||||||
</a-button>
|
<a-button class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||||
@@ -267,9 +283,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=>{
|
||||||
@@ -416,10 +432,11 @@ const getTableDate = (obj) => {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
getTableDate()
|
getTableDate()
|
||||||
// 搜索
|
// 搜索
|
||||||
const searchSubmit = () => {
|
const searchSubmit = () => {
|
||||||
getTableDate();
|
state.searchParam.pageNo = 1;
|
||||||
};
|
getTableDate();
|
||||||
|
};
|
||||||
//重置
|
//重置
|
||||||
const searchReset = () => {
|
const searchReset = () => {
|
||||||
state.searchParam = {
|
state.searchParam = {
|
||||||
@@ -436,6 +453,21 @@ const getTableDate = (obj) => {
|
|||||||
state.searchParam.pageSize = pageSize;
|
state.searchParam.pageSize = pageSize;
|
||||||
getTableDate();
|
getTableDate();
|
||||||
};
|
};
|
||||||
|
const updateModal = (record) => {
|
||||||
|
dialog({
|
||||||
|
content: '是否确认撤回 ?',
|
||||||
|
ok: () => {
|
||||||
|
// lecturer.affiliationDelById(record.id).then(res=>{
|
||||||
|
// console.log(res,'res')
|
||||||
|
// message.success("删除成功")
|
||||||
|
// searchSubmit();
|
||||||
|
// }).catch(err=>{
|
||||||
|
// console.log(err,'errr')
|
||||||
|
// message.error(err.msg)
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
//删除弹窗
|
//删除弹窗
|
||||||
const deleteModal = (record) => {
|
const deleteModal = (record) => {
|
||||||
dialog({
|
dialog({
|
||||||
@@ -443,8 +475,12 @@ const getTableDate = (obj) => {
|
|||||||
ok: () => {
|
ok: () => {
|
||||||
lecturer.affiliationDelById(record.id).then(res=>{
|
lecturer.affiliationDelById(record.id).then(res=>{
|
||||||
console.log(res,'res')
|
console.log(res,'res')
|
||||||
|
if(typeof (res.data.data) != 'object'){
|
||||||
|
message.error(res.data.data)
|
||||||
|
return
|
||||||
|
}
|
||||||
message.success("删除成功")
|
message.success("删除成功")
|
||||||
getTableDate();
|
searchSubmit();
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
console.log(err,'errr')
|
console.log(err,'errr')
|
||||||
message.error(err.msg)
|
message.error(err.msg)
|
||||||
@@ -459,7 +495,7 @@ const getTableDate = (obj) => {
|
|||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
// message.success("删除成功");
|
// message.success("删除成功");
|
||||||
state.deleteInTeacherdialog = false
|
state.deleteInTeacherdialog = false
|
||||||
getTableDate();
|
searchSubmit();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -475,14 +511,17 @@ const getTableDate = (obj) => {
|
|||||||
state.editTeacher = false
|
state.editTeacher = false
|
||||||
};
|
};
|
||||||
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 = () => {
|
||||||
|
alert('没有接口')
|
||||||
}
|
}
|
||||||
const addContentData = () => {
|
const addContentData = () => {
|
||||||
state.showContent = true
|
state.showContent = true
|
||||||
@@ -533,7 +572,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)
|
||||||
@@ -587,7 +626,7 @@ const getTableDate = (obj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//保存
|
//保存
|
||||||
const createTeacherDialog = async () => {
|
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.affiliationUserList = [...state.formParam?.actArray,...state.formParam?.leveOneArray,...state.formParam?.leveTwoArray,...state.formParam?.leveThreeArray]
|
||||||
const formItemNames = Object.keys(rules);
|
const formItemNames = Object.keys(rules);
|
||||||
@@ -597,22 +636,24 @@ const getTableDate = (obj) => {
|
|||||||
return message.error(rules[formItemNames[i]][0].log)
|
return message.error(rules[formItemNames[i]][0].log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
state.formParam.remark = state.formParam?.remark?.trim()
|
||||||
|
state.formParam.submitStatus = val
|
||||||
dialog({
|
dialog({
|
||||||
content: '是否确认提交,一旦提交将进入(BPM系统)审核流程。',
|
content: val?'是否确认提交,一旦提交将进入(BPM系统)审核流程。':'是否确认保存?',
|
||||||
ok: () => {
|
ok: () => {
|
||||||
if (state.vf == false) {
|
if (state.vf == false) {
|
||||||
updateTrainOrg(state.formParam).then(response => {
|
updateTrainOrg(state.formParam).then(response => {
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
state.teacherdialog = false;
|
state.teacherdialog = false;
|
||||||
cancel()
|
cancel()
|
||||||
getTableDate();
|
searchSubmit();
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
addReviewer(state.formParam).then((res) => {
|
addReviewer(state.formParam).then((res) => {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
state.teacherdialog = false;
|
state.teacherdialog = false;
|
||||||
cancel()
|
cancel()
|
||||||
getTableDate();
|
searchSubmit();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -651,8 +692,10 @@ const getTableDate = (obj) => {
|
|||||||
placeData,
|
placeData,
|
||||||
searchReset,
|
searchReset,
|
||||||
deleteModal,
|
deleteModal,
|
||||||
|
updateModal,
|
||||||
cancelTeacherDialog,
|
cancelTeacherDialog,
|
||||||
addTeacher,
|
addTeacher,
|
||||||
|
downOpen,
|
||||||
addContentData,
|
addContentData,
|
||||||
handleModify,
|
handleModify,
|
||||||
closeDeleteTeacher,
|
closeDeleteTeacher,
|
||||||
@@ -667,6 +710,23 @@ const getTableDate = (obj) => {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.headers {
|
||||||
|
height: 73px;
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
// background-color: red;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.headerTitle {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 25px;
|
||||||
|
// margin-left: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.tableBox {
|
.tableBox {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
margin: 20px 38px 30px;
|
margin: 20px 38px 30px;
|
||||||
@@ -945,6 +1005,32 @@ position: relative;
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.btnn {
|
||||||
|
padding: 0px 26px 0px 26px;
|
||||||
|
height: 40px;
|
||||||
|
background: #1890ff;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #1890ff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 14px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.btnText {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 36px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
.daochu {
|
||||||
|
width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
background-image: url("../../assets/images/coursewareManage/export1.png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//展开收起样式
|
//展开收起样式
|
||||||
.moreidbtn {
|
.moreidbtn {
|
||||||
|
|||||||
Reference in New Issue
Block a user