From 841369c4a261b5e172ea8d2c36649d8d9883aee1 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 12 Nov 2024 11:10:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AE=B2=E5=B8=88=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E5=8F=91=E7=94=9F=E7=BB=84=E7=BB=87=E4=BF=AE?= =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/project/AddOrgContent.vue | 6 + src/components/project/lockLecturer.vue | 13 +- src/views/lecturer/Organization.vue | 144 ++++++++++++++++++----- 3 files changed, 129 insertions(+), 34 deletions(-) diff --git a/src/components/project/AddOrgContent.vue b/src/components/project/AddOrgContent.vue index 3ecb365b..02d519e8 100644 --- a/src/components/project/AddOrgContent.vue +++ b/src/components/project/AddOrgContent.vue @@ -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 diff --git a/src/components/project/lockLecturer.vue b/src/components/project/lockLecturer.vue index 5aaf86b7..fcc63288 100644 --- a/src/components/project/lockLecturer.vue +++ b/src/components/project/lockLecturer.vue @@ -25,10 +25,13 @@
- {{formData?.affiliationCode||'-'}} - {{formData?.affiliationName||'-'}} + {{formData?.affiliationCode||'-'}} + {{formData?.affiliationName||'-'}} {{formData?.isParent==1?'否':'是'}} {{formData?.act||'-'}} + {{formData?.one||'-'}} + {{formData?.two||'-'}} + {{formData?.three||'-'}} {{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}} @@ -41,7 +44,7 @@
- +
-
+
diff --git a/src/views/lecturer/Organization.vue b/src/views/lecturer/Organization.vue index 40e4d822..46eaff54 100644 --- a/src/views/lecturer/Organization.vue +++ b/src/views/lecturer/Organization.vue @@ -5,7 +5,7 @@
-
@@ -21,6 +21,14 @@ 新增归属组织 +
+
+
导出
+
@@ -31,6 +39,7 @@
查看
编辑 + 撤回 删除 @@ -79,8 +88,15 @@ - + +
+
{{ teacherdialogtitle }}
+ +
@@ -97,7 +113,7 @@ - @@ -111,7 +127,7 @@ - @@ -204,8 +220,8 @@ } " > 取消 - 保存 - + 保存 + 提交
@@ -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=>{ @@ -416,10 +432,11 @@ const getTableDate = (obj) => { }) }; getTableDate() - // 搜索 - const searchSubmit = () => { - getTableDate(); - }; + // 搜索 + const searchSubmit = () => { + state.searchParam.pageNo = 1; + getTableDate(); + }; //重置 const searchReset = () => { state.searchParam = { @@ -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(); } }) } @@ -475,14 +511,17 @@ const getTableDate = (obj) => { state.editTeacher = false }; const addTeacher=()=>{ - state.teacherdialog=true , - state.teacherdialogtitle="新增归属组织" - state.vf = true - lecturer.getAffiliationCode().then(res=>{ - state.formParam.affiliationCode = res.data.data - }).catch(()=>{ - message.error('获取归属组织编号失败') - }) + state.teacherdialog=true , + state.teacherdialogtitle="新增归属组织" + state.vf = true + lecturer.getAffiliationCode().then(res=>{ + state.formParam.affiliationCode = res.data.data + }).catch(()=>{ + 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) => {