From a9b2315d177f4e4fd5ee75b8dccd0977ed8d3fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=99=B6=E5=9C=9F=E8=B1=86?= <水晶土豆@devide> Date: Thu, 16 Nov 2023 14:26:00 +0800 Subject: [PATCH] Thu Nov 16 14:26:00 CST 2023 inscode --- .../announcementType.vue | 1 + src/component/humanResources/department.vue | 40 +++++++++++-------- .../table/operation/addSubcategories.vue | 4 +- src/component/main/tableList/table/table.vue | 9 +++-- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/component/enterpriseAnnouncement/announcementType.vue b/src/component/enterpriseAnnouncement/announcementType.vue index f44c4d1..aa407e1 100644 --- a/src/component/enterpriseAnnouncement/announcementType.vue +++ b/src/component/enterpriseAnnouncement/announcementType.vue @@ -121,6 +121,7 @@ provide("rowID", rowID); provide("changeState",()=>{ console.log(1111); }) +provide("subString","子分类") provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => { if (column.property === "state") { if (row.state == "正常") { diff --git a/src/component/humanResources/department.vue b/src/component/humanResources/department.vue index 9c30c31..23fc31a 100644 --- a/src/component/humanResources/department.vue +++ b/src/component/humanResources/department.vue @@ -9,14 +9,14 @@ import { ref, provide, onMounted } from 'vue'; import { getHumanResourcesDepartment } from '@/api/api'; import { FlatToTree } from '@/util/toTree'; import { deepClone } from '@/util/deepCode'; -const addText = ref('添加分类'); +const addText = ref('添加部门'); let tableData = ref([ ]) -onMounted(async()=>{ +onMounted(async () => { let data = (await getHumanResourcesDepartment()).data.data.data; - console.log(FlatToTree(data)); - tableData.value = FlatToTree(data).tree; + console.log(deepClone(data)); + tableData.value = FlatToTree(deepClone(data)).tree; }) let tableType = ref([ @@ -27,27 +27,27 @@ let tableType = ref([ isSort: false, align: "center" }, - { - name: "排序", - type: "sort", - width: "100px", - isSort: true, - align: "center" - }, { name: '上级ID', type: "parentID", - width: "auto", + width: "80px", isSort: false, align: "left" }, { name: '部门名称', type: "departmentName", - width: "80px", + width: "auto", isSort: false, align: "center" }, + { + name: "排序", + type: "sort", + width: "100px", + isSort: true, + align: "center" + }, { name: '部门负责人', type: "departmentHead", @@ -58,9 +58,14 @@ let tableType = ref([ { name: '部门电话', type: "departmentPhone", - width: "100px", + width: "200px", isSort: false, align: "center" + }, + { + name:'状态', + type:'state', + width:'120px', } ] ); @@ -103,9 +108,10 @@ provide("deleteDialog", deleteDialog); provide("tableData", tableData); provide("rowID", rowID); -provide("changeState",()=>{ - console.log(1111); +provide("changeState", () => { + console.log(1111); }) +provide("subString","子部门"); provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => { if (column.property === "state") { if (row.state == "正常") { @@ -123,7 +129,7 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {