From 1a136c4df1ddee2fedb119a264e73147b79bfb1c Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期五, 05 十一月 2021 09:10:38 +0800 Subject: [PATCH] U 修改列表页面 --- src/pages/alarmWork/list.vue | 56 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/pages/alarmWork/list.vue b/src/pages/alarmWork/list.vue index 554d043..ff71924 100644 --- a/src/pages/alarmWork/list.vue +++ b/src/pages/alarmWork/list.vue @@ -61,27 +61,12 @@ <script> import FlexLayout from "@/components/FlexLayout.vue"; -import ListCard from "@/components/listCard.vue"; +import ListCard from "./components/listCard.vue"; -let list = [ - { - a: 1 - }, - { - a: 2 - }, - { - a: 1 - }, - { - a: 2 - },{ - a: 1 - }, - { - a: 2 - } -]; +import { + getList +} from './js/api'; + export default { data() { return { @@ -120,11 +105,36 @@ }, handleCurrentChange (val) { console.log(`褰撳墠椤�: ${val}`); + }, + // 鏌ュ垪琛� + getList () { + let param = { + pageNum: 1, + pageSize: 1, + type: 1 + }; + let data = { + + }; + getList(param, data).then((res) => { + res = res.data; + console.log(res, '====='); + let list = []; + if (res.code) { + list = res.data; + } + console.log(list); + this.list = list; + }).catch((err) => { + console.error(err); + }); } + }, mounted() { - this.unitType = this.$route.meta.unitType - this.list = list; + this.unitType = this.$route.meta.unitType; + + this.getList(); } } @@ -135,7 +145,7 @@ background: #fff; border-bottom: 1px solid #c4c4c4; margin-bottom: 16px; - padding: 16px 10px; + padding: 14px 30px; } .contain-search span.label { font-size: 18px; -- Gitblit v1.9.1