讲师管理培训发生组织修改bug

This commit is contained in:
zhangsir
2024-11-12 11:10:47 +08:00
parent 572d39d3bb
commit 841369c4a2
3 changed files with 129 additions and 34 deletions

View File

@@ -103,10 +103,16 @@ import * as lecturerApi from "@/api/Lecturer.js";
checkedKeys.value = []
}else{
console.log(props.AddContentList,'xixiixix')
getNot()
treeAddData.value = props?.AddContentList
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}) => {
// "965356037047586816"
let length = treeAddData.value.length

View File

@@ -25,10 +25,13 @@
</div>
<div class="desc">
<a-descriptions :column="2" bordered>
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</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?.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="状态">
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
</a-descriptions-item>
@@ -41,7 +44,7 @@
<a-table :columns="columns" :data-source="formData?.tableData" />
</div>
<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?.affiliationName||'-'}}</a-descriptions-item>
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
@@ -52,11 +55,11 @@
<a-descriptions-item label="状态">
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
</a-descriptions-item>
</a-descriptions>
</a-descriptions> -->
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="审批记录" force-render>
<div>
<div style="margin-bottom: 100px">
<a-table :columns="columnsTwo" :data-source="formData?.tableDataTwo" />
</div>
</a-tab-pane>

View File

@@ -5,7 +5,7 @@
<a-form layout="inline">
<a-form-item class="select">
<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" />
</div>
</a-form-item>
@@ -21,6 +21,14 @@
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 130px;">
<FolderAddOutlined /> 新增归属组织
</a-button>
<div
class="btnn btn2"
@click="downOpen"
style="margin-right: 14px"
>
<div class="daochu"></div>
<div class="btnText">导出</div>
</div>
</div>
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
@expand="expandTable" :pagination="false">
@@ -31,6 +39,7 @@
<div style="color: #1890ff;">查看</div>
</lockLecturer>
<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-space>
</template>
@@ -79,8 +88,15 @@
</a-modal>
</div>
<!-- 抽屉 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
width="60%" :title="teacherdialogtitle">
<a-drawer v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
<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-row :gutter="16">
<a-col :span="24">
@@ -97,7 +113,7 @@
</a-col>
<a-col :span="12">
<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>
</a-input>
</a-form-item>
@@ -111,7 +127,7 @@
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</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/>
</div>
</a-form-item>
@@ -204,8 +220,8 @@
} "
>
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
</div>
</a-drawer>
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
@@ -267,9 +283,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=>{
@@ -418,6 +434,7 @@ const getTableDate = (obj) => {
getTableDate()
// 搜索
const searchSubmit = () => {
state.searchParam.pageNo = 1;
getTableDate();
};
//重置
@@ -436,6 +453,21 @@ const getTableDate = (obj) => {
state.searchParam.pageSize = pageSize;
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) => {
dialog({
@@ -443,8 +475,12 @@ const getTableDate = (obj) => {
ok: () => {
lecturer.affiliationDelById(record.id).then(res=>{
console.log(res,'res')
if(typeof (res.data.data) != 'object'){
message.error(res.data.data)
return
}
message.success("删除成功")
getTableDate();
searchSubmit();
}).catch(err=>{
console.log(err,'errr')
message.error(err.msg)
@@ -459,7 +495,7 @@ const getTableDate = (obj) => {
if (res.data.code == 200) {
// message.success("删除成功");
state.deleteInTeacherdialog = false
getTableDate();
searchSubmit();
}
})
}
@@ -484,6 +520,9 @@ const getTableDate = (obj) => {
message.error('获取归属组织编号失败')
})
}
const downOpen = () => {
alert('没有接口')
}
const addContentData = () => {
state.showContent = true
}
@@ -533,7 +572,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)
@@ -587,7 +626,7 @@ const getTableDate = (obj) => {
}
}
//保存
const createTeacherDialog = async () => {
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]
const formItemNames = Object.keys(rules);
@@ -597,22 +636,24 @@ const getTableDate = (obj) => {
return message.error(rules[formItemNames[i]][0].log)
}
}
state.formParam.remark = state.formParam?.remark?.trim()
state.formParam.submitStatus = val
dialog({
content: '是否确认提交一旦提交将进入BPM系统审核流程',
content: val?'是否确认提交一旦提交将进入BPM系统审核流程':'是否确认保存',
ok: () => {
if (state.vf == false) {
updateTrainOrg(state.formParam).then(response => {
message.success("修改成功");
state.teacherdialog = false;
cancel()
getTableDate();
searchSubmit();
});
}else {
addReviewer(state.formParam).then((res) => {
message.success("保存成功");
state.teacherdialog = false;
cancel()
getTableDate();
searchSubmit();
})
}
}
@@ -651,8 +692,10 @@ const getTableDate = (obj) => {
placeData,
searchReset,
deleteModal,
updateModal,
cancelTeacherDialog,
addTeacher,
downOpen,
addContentData,
handleModify,
closeDeleteTeacher,
@@ -667,6 +710,23 @@ const getTableDate = (obj) => {
</script>
<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 {
padding-bottom: 20px;
margin: 20px 38px 30px;
@@ -945,6 +1005,32 @@ position: relative;
flex-shrink: 0;
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 {