From db5455a1bcea1d8e69cfc13fc8f74ea10f59ad6f Mon Sep 17 00:00:00 2001
From: qirong <2032486488@qq.com>
Date: 星期五, 27 十月 2023 13:37:09 +0800
Subject: [PATCH] 部门修改

---
 src/App.vue |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 8e554d8..29f4cab 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,11 +7,17 @@
 <script>
 import { mapGetters, mapState, mapActions } from 'vuex'
 import departmentApi from '@/api/department'
+import enumItem from '@/store/modules/enumItem'
 export default {
   name: 'App',
   data(){
     return{
-      depart:[]
+      depart:[],
+      queryParam: {
+        level: null,
+        pageIndex: 1,
+        pageSize: 100
+      },
     }
   },
   created () {
@@ -26,12 +32,19 @@
     this.seachPageDepartMentList()
   },
   methods:{
-    seachPageDepartMentList(){
+    async seachPageDepartMentList () {
       let that = this
-      departmentApi.pageList(this.queryParam).then(res=>{
+      await departmentApi.pageList(this.queryParam).then(res => {
         console.log(res)
-        if (res.code == 1){
+        if (res.code == 1) {
           that.depart = res.response.list
+          console.log(that.depart)
+          this.depart.map(item=>{
+            item.key = item.id
+            item.value = item.name
+          })
+          enumItem.state.user.levelEnum = that.depart
+
         }
       })
     }

--
Gitblit v1.8.0