diff --git a/src/component/enterpriseAnnouncement/announcementType.vue b/src/component/enterpriseAnnouncement/announcementType.vue index f44c4d1cf6401374b018df4f0be9977ff55bca2e..aa407e1611745aa222ca231ddc32a549c9f8db08 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 9c30c31efc9d47c103ae210644a8ab7c82f966c5..23fc31ae059fc48f193c468cd06d4a6234939a9d 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 }) => {