From 0e45e6fe139832152ab721776f4aed98cc0880a7 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期五, 19 十一月 2021 16:33:32 +0800
Subject: [PATCH] 应付检查

---
 src/components/page/keXieXiangMu.vue |  173 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 169 insertions(+), 4 deletions(-)

diff --git a/src/components/page/keXieXiangMu.vue b/src/components/page/keXieXiangMu.vue
index d670a94..930f999 100644
--- a/src/components/page/keXieXiangMu.vue
+++ b/src/components/page/keXieXiangMu.vue
@@ -1,17 +1,182 @@
 <template>
   <div>
     <globalTitle />
+    <div >
+      <!-- 椤圭洰灞曠ず鍖� -->
+      <el-table :data="tableData" style="width: 100%" border stripe>
+        <el-table-column
+          type="index"
+          label="搴忓彿"
+          width="80px"
+        ></el-table-column>
+        <el-table-column
+          prop="lixiangbianhao"
+          label="绔嬮」缂栧彿"
+        ></el-table-column>
+        <el-table-column
+          prop="xiangmumingcheng"
+          label="椤圭洰鍚嶇О"
+        ></el-table-column>
+        <el-table-column
+          prop="xiangmuxingshi"
+          label="椤圭洰褰㈠紡"
+        ></el-table-column>
+        <el-table-column
+          prop="xiangmufuzheren"
+          label="椤圭洰璐熻矗浜�"
+        ></el-table-column>
+        <el-table-column
+          prop="jiexiangshijian"
+          label="缁撻」鏃堕棿"
+        ></el-table-column>
+        <el-table-column prop="beizhu" label="澶囨敞"></el-table-column>
+      </el-table>
+      <!-- 鍒嗛〉瀵艰埅鏍� -->
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="queryInfo.pagenum"
+        :page-sizes="[1, 5, 8, 10]"
+        :page-size="queryInfo.pagesize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
   </div>
 </template>
 
 <script>
 import globalTitle from '../globalTitle.vue'
 export default {
-  components: { globalTitle},
-  name: 'keXieXiangMu'
+  components: { globalTitle },
+  name: 'keXieXiangMu',
+  data() {
+    return {
+      tableData: [
+        {
+          lixiangbianhao: '1',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '2',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '3',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '4',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '5',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '6',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '7',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '8',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '9',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        },
+        {
+          lixiangbianhao: '10',
+          xiangmumingcheng: '骞抽《灞卞闄㈢瀛︽妧鏈崗浼氬畼缃戞惌寤�',
+          xiangmuxingshi: '607瀹為獙瀹ゆ瀯寤�',
+          xiangmufuzheren: '鍠绘亽',
+          jiexiangshijian: '2021-12-31',
+          beizhu: '绉戞妧妤糞607'
+        }
+      ],
+      // 鑾峰彇鐢ㄦ埛鍒楄〃鐨勫弬鏁板璞�
+      queryInfo: {
+        query: '',
+        // 褰撳墠椤垫暟
+        pagenum: 1,
+        // 褰撳墠姣忛〉鏄剧ず澶氬皯鏉℃暟鎹�
+        pagesize: 2
+      },
+      userlist: [],
+      total: 0
+    }
+  },
+  created() {
+    this.getUserList()
+  },
+  methods: {
+    async getUserList() {
+      const { data: res } = await this.$http.get('users', {
+        params: this.queryInfo
+      })
+      if (res.meta.status !== 200) {
+        return this.$message.error('鑾峰彇鐢ㄦ埛鍒楄〃澶辫触锛� ')
+      }
+      this.userlist = res.data.users
+      this.total = res.data.total
+      console.log(res)
+    },
+
+    // 鐩戝惉pagesize鏀瑰彉鐨勪簨浠�
+    handleSizeChange(newSize) {
+      // console.log(newSize)
+      this.queryInfo.pagesize = newSize
+      this.getUserList()
+    },
+    // // 鐩戝惉 椤电爜鍊� 鏀瑰彉鐨勪簨浠�
+    handleCurrentChange(newPage) {
+      // console.log(newPage)
+      this.queryInfo.newpage = newPage
+    }
+  }
 }
 </script>
 
 <style lang="less" scoped>
-
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0