From 4ec5d99d0c1ba2c513c55f03f8928bdf4750954d Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Thu, 6 Mar 2025 17:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.ts | 12 +- src/components/dialogTable/index.vue | 2 +- src/components/oaFlow/index.vue | 139 ++++++++ src/components/oaFlowCheck/index.vue | 190 ++++++++++ src/views/article/lists/edit.vue | 305 ++++++++-------- src/views/article/lists/edit2.vue | 138 ++++++++ src/views/article/lists/index.vue | 280 +++++++-------- src/views/oa_Initiate/edit.vue | 2 - src/views/oa_Initiate/form/rs/lz.vue | 4 +- src/views/oa_Initiate/form/rs/rz.vue | 2 +- src/views/oa_Initiate/form/rs/zg.vue | 4 +- src/views/oa_Initiate/form/rs/zpxq.vue | 4 +- src/views/oa_Initiate/form/rs/zz.vue | 4 +- src/views/oa_Initiate/form/xz/zzjy.vue | 2 +- src/views/oa_department_change/edit.vue | 332 +++++++++--------- src/views/oa_department_change/index.vue | 2 +- src/views/oa_flow/index.vue | 2 +- src/views/oa_flow_type/edit.vue | 3 +- src/views/oa_flow_type/index.vue | 2 +- src/views/oa_personal_quit/edit.vue | 23 +- src/views/oa_plan/index.vue | 2 +- src/views/oa_schedule/index.vue | 2 +- src/views/oa_work/components/reciveReport.vue | 7 +- src/views/oa_work/components/sendReport.vue | 2 +- src/views/oa_work/edit.vue | 3 - src/views/organization/department/edit.vue | 297 ++++++++-------- 26 files changed, 1101 insertions(+), 664 deletions(-) create mode 100644 src/components/oaFlow/index.vue create mode 100644 src/components/oaFlowCheck/index.vue create mode 100644 src/views/article/lists/edit2.vue diff --git a/src/api/common.ts b/src/api/common.ts index 17c3082f5..59f9a0990 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -15,31 +15,31 @@ export function apiAreaList(params: any) { //获取所有人员 export function getAdminsByAll(params: any) { - return request.get({ url: "/auth.admin/getAdminsByAll", params }); + return request.get({ url: "/auth/admin/getAdminsByAll", params }); } //获取某个部门下的所有人员 export function getAdminsByDept(params: any) { - return request.get({ url: "/auth.admin/getAdminsByDept", params }); + return request.get({ url: "/auth/admin/getAdminsByDept", params }); } //获取某个岗位下的所有人员 export function getAdminsByJob(params: any) { - return request.get({ url: "/auth.admin/getAdminsByJob", params }); + return request.get({ url: "/auth/admin/getAdminsByJob", params }); } //获取所有岗位 export function getAllJobs(params: any) { - return request.get({ url: "/dept.jobs/getAllJobs", params }); + return request.get({ url: "/dept/jobs/getAllJobs", params }); } //获取所有部门 export function getAllDept(params: any) { - return request.get({ url: "/dept.dept/getAllDept", params }); + return request.get({ url: "/dept/dept/getAllDept", params }); } //某个项目下的项目合同列表 export function projectcontracts(params: any) { - return request.get({ url: "/project.project/contracts", params }); + return request.get({ url: "/project/project/contracts", params }); } diff --git a/src/components/dialogTable/index.vue b/src/components/dialogTable/index.vue index 355ef97b0..0a80da354 100644 --- a/src/components/dialogTable/index.vue +++ b/src/components/dialogTable/index.vue @@ -3,7 +3,7 @@ - + diff --git a/src/components/oaFlow/index.vue b/src/components/oaFlow/index.vue new file mode 100644 index 000000000..ed703ae29 --- /dev/null +++ b/src/components/oaFlow/index.vue @@ -0,0 +1,139 @@ + + diff --git a/src/components/oaFlowCheck/index.vue b/src/components/oaFlowCheck/index.vue new file mode 100644 index 000000000..33f6e3b55 --- /dev/null +++ b/src/components/oaFlowCheck/index.vue @@ -0,0 +1,190 @@ + + + + diff --git a/src/views/article/lists/edit.vue b/src/views/article/lists/edit.vue index 27ab1ab9a..ac0d01a3d 100644 --- a/src/views/article/lists/edit.vue +++ b/src/views/article/lists/edit.vue @@ -1,173 +1,150 @@ + + const getDetail = async (row: Record) => { + const data = await articleDetail({ + id: row.id + }) + Object.keys(formData).forEach((key) => { + //@ts-ignore + formData[key] = data[key] + }) + } + + const handleClose = () => { + emit('close') + } + + defineExpose({ + open, + setFormData, + getDetail + }) + \ No newline at end of file diff --git a/src/views/article/lists/edit2.vue b/src/views/article/lists/edit2.vue new file mode 100644 index 000000000..673846c36 --- /dev/null +++ b/src/views/article/lists/edit2.vue @@ -0,0 +1,138 @@ + + + \ No newline at end of file diff --git a/src/views/article/lists/index.vue b/src/views/article/lists/index.vue index ea6ff2bb6..02e5aa2c9 100644 --- a/src/views/article/lists/index.vue +++ b/src/views/article/lists/index.vue @@ -1,154 +1,154 @@ + getLists() + \ No newline at end of file diff --git a/src/views/oa_Initiate/edit.vue b/src/views/oa_Initiate/edit.vue index 7cc2283e9..50bbce98b 100644 --- a/src/views/oa_Initiate/edit.vue +++ b/src/views/oa_Initiate/edit.vue @@ -79,7 +79,6 @@ const popupTitle = computed(() => { // 表单数据 const formData = reactive({ - id: 0, data: [], extends: {} }); @@ -90,7 +89,6 @@ const formData = reactive({ // 获取详情 const setFormData = async (data: Record) => { formData.data = data.data; - formData.id = data.id; }; // 获取详情 diff --git a/src/views/oa_Initiate/form/rs/lz.vue b/src/views/oa_Initiate/form/rs/lz.vue index b89a73d62..43ad6c7dd 100644 --- a/src/views/oa_Initiate/form/rs/lz.vue +++ b/src/views/oa_Initiate/form/rs/lz.vue @@ -80,7 +80,7 @@ const formRef = ref(null) const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() @@ -88,7 +88,7 @@ getDeptList() const zwlist = ref([]) const getzwlist = async () => { const res = await jobsLists() - zwlist.value = res.lists + zwlist.value = res } getzwlist() diff --git a/src/views/oa_Initiate/form/rs/rz.vue b/src/views/oa_Initiate/form/rs/rz.vue index 69e8aa9ed..b39df9827 100644 --- a/src/views/oa_Initiate/form/rs/rz.vue +++ b/src/views/oa_Initiate/form/rs/rz.vue @@ -73,7 +73,7 @@ const formRef = ref(null) const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() diff --git a/src/views/oa_Initiate/form/rs/zg.vue b/src/views/oa_Initiate/form/rs/zg.vue index d21d68b31..50651f518 100644 --- a/src/views/oa_Initiate/form/rs/zg.vue +++ b/src/views/oa_Initiate/form/rs/zg.vue @@ -96,7 +96,7 @@ const formRef = ref(null) const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() @@ -104,7 +104,7 @@ getDeptList() const zwlist = ref([]) const getzwlist = async () => { const res = await jobsLists() - zwlist.value = res.lists + zwlist.value = res } getzwlist() diff --git a/src/views/oa_Initiate/form/rs/zpxq.vue b/src/views/oa_Initiate/form/rs/zpxq.vue index 0afe6d115..bf08e5677 100644 --- a/src/views/oa_Initiate/form/rs/zpxq.vue +++ b/src/views/oa_Initiate/form/rs/zpxq.vue @@ -69,7 +69,7 @@ const formRef = ref(null) const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() @@ -77,7 +77,7 @@ getDeptList() const zwlist = ref([]) const getzwlist = async () => { const res = await jobsLists() - zwlist.value = res.lists + zwlist.value = res } getzwlist() diff --git a/src/views/oa_Initiate/form/rs/zz.vue b/src/views/oa_Initiate/form/rs/zz.vue index 589a2883c..9796afc69 100644 --- a/src/views/oa_Initiate/form/rs/zz.vue +++ b/src/views/oa_Initiate/form/rs/zz.vue @@ -64,7 +64,7 @@ const formRef = ref(null) const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() @@ -72,7 +72,7 @@ getDeptList() const zwlist = ref([]) const getzwlist = async () => { const res = await jobsLists() - zwlist.value = res.lists + zwlist.value = res } getzwlist() diff --git a/src/views/oa_Initiate/form/xz/zzjy.vue b/src/views/oa_Initiate/form/xz/zzjy.vue index 54aa4ab9e..cd1039024 100644 --- a/src/views/oa_Initiate/form/xz/zzjy.vue +++ b/src/views/oa_Initiate/form/xz/zzjy.vue @@ -79,7 +79,7 @@ import { deptLists } from "@/api/org/department"; const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() diff --git a/src/views/oa_department_change/edit.vue b/src/views/oa_department_change/edit.vue index 8a1faab1e..d38096721 100644 --- a/src/views/oa_department_change/edit.vue +++ b/src/views/oa_department_change/edit.vue @@ -1,185 +1,181 @@ + defineExpose({ + open, + setFormData, + getDetail + }) + \ No newline at end of file diff --git a/src/views/oa_department_change/index.vue b/src/views/oa_department_change/index.vue index 36006b99a..7a47c285e 100644 --- a/src/views/oa_department_change/index.vue +++ b/src/views/oa_department_change/index.vue @@ -121,7 +121,7 @@ const handleDelete = async (id: number | any[]) => { const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() getLists() diff --git a/src/views/oa_flow/index.vue b/src/views/oa_flow/index.vue index 21e0977a9..8878a655b 100644 --- a/src/views/oa_flow/index.vue +++ b/src/views/oa_flow/index.vue @@ -130,7 +130,7 @@ const handleDelete = async (id: number | any[]) => { const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } getDeptList() getLists() diff --git a/src/views/oa_flow_type/edit.vue b/src/views/oa_flow_type/edit.vue index cc73612bf..11fccc832 100644 --- a/src/views/oa_flow_type/edit.vue +++ b/src/views/oa_flow_type/edit.vue @@ -134,7 +134,7 @@ const formData = reactive({ title: "", name: "", icon: "", - department_ids: "", + department_ids: [], data: [ { "type": '0', @@ -194,6 +194,7 @@ const setFormData = async (data: Record) => { } } formData.department_ids = formData.department_ids.split(",").map(Number); + console.log(formData.department_ids) }; const getDetail = async (row: Record) => { diff --git a/src/views/oa_flow_type/index.vue b/src/views/oa_flow_type/index.vue index 062769838..7c7fae49c 100644 --- a/src/views/oa_flow_type/index.vue +++ b/src/views/oa_flow_type/index.vue @@ -138,7 +138,7 @@ const handleDelete = async (id: number | any[]) => { const deptList = ref([]) const getDeptList = async () => { const res = await deptLists() - deptList.value = res.lists + deptList.value = res } diff --git a/src/views/oa_personal_quit/edit.vue b/src/views/oa_personal_quit/edit.vue index d6b6c081f..26fc51075 100644 --- a/src/views/oa_personal_quit/edit.vue +++ b/src/views/oa_personal_quit/edit.vue @@ -3,7 +3,7 @@ - + + @click="userclick('lead_admin_id', 'lead_admin_name', 1)" /> + @click="userclick('connect_id', 'connect_name', 1)" /> + @click="userclick('connect_uids', 'connect_names', 2)" /> @@ -80,17 +80,19 @@ const formData = reactive({ let personnelType = ref('1') let value; -const userclick = async (val, type) => { +let formLabel; +const userclick = async (field, label, type) => { personnelType.value = type showDialog.value = true - value = val + value = field + formLabel = label await nextTick() personnel.value.open() } const submituser = (e: any) => { if (personnelType.value == '1') { - formData[value + '_name'] = e.name - formData[value + "_id"] = String(e.id) + formData[formLabel] = e.name + formData[value] = String(e.id) } else { formData.connect_uids = e.map((item: any) => { return item.id @@ -99,6 +101,7 @@ const submituser = (e: any) => { return item.name }).join(',') } + console.log(formData); showDialog.value = false } @@ -203,7 +206,6 @@ const setFormData = async (data: Record) => { formData.uid_name = data.user_name formData.connect_names = data.connect_users formData.connect_name = data.connect_user_name - formData.uid_id = formData.uid } const getDetail = async (row: Record) => { @@ -215,9 +217,6 @@ const getDetail = async (row: Record) => { // 提交按钮 const handleSubmit = async () => { - formData.uid = formData.uid_id - delete formData.uid_id - console.log(formData) await formRef.value?.validate() const data = { ...formData, } mode.value == 'edit' diff --git a/src/views/oa_plan/index.vue b/src/views/oa_plan/index.vue index 813bb519d..88623eb25 100644 --- a/src/views/oa_plan/index.vue +++ b/src/views/oa_plan/index.vue @@ -5,7 +5,7 @@ - + diff --git a/src/views/oa_schedule/index.vue b/src/views/oa_schedule/index.vue index 4eac0a819..124b16633 100644 --- a/src/views/oa_schedule/index.vue +++ b/src/views/oa_schedule/index.vue @@ -5,7 +5,7 @@ - + diff --git a/src/views/oa_work/components/reciveReport.vue b/src/views/oa_work/components/reciveReport.vue index c425e8f66..28eeb38b2 100644 --- a/src/views/oa_work/components/reciveReport.vue +++ b/src/views/oa_work/components/reciveReport.vue @@ -1,6 +1,6 @@