|
@@ -1,35 +1,47 @@
|
|
<template>
|
|
<template>
|
|
<div class="page-wrap page-wrap-put-books">
|
|
<div class="page-wrap page-wrap-put-books">
|
|
- <tool-bar :text="['account', 'user']"
|
|
|
|
- :label="['公众号名称', '用户名']">
|
|
|
|
|
|
+ <tool-bar :text="['account', 'user']" :label="['公众号名称', '用户名']">
|
|
<template #picker>
|
|
<template #picker>
|
|
<p class="label">日期</p>
|
|
<p class="label">日期</p>
|
|
<a-range-picker />
|
|
<a-range-picker />
|
|
</template>
|
|
</template>
|
|
</tool-bar>
|
|
</tool-bar>
|
|
- <a-table :columns="columns"
|
|
|
|
- :data-source="list"
|
|
|
|
- :scroll="{x: 1800}"></a-table>
|
|
|
|
|
|
+ <a-table :columns="columns" :data-source="list" :scroll="{x: 1800}"></a-table>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
-import { defineComponent, reactive, toRefs } from "vue";
|
|
|
|
|
|
+import { defineComponent, reactive, toRefs, ref } from "vue";
|
|
|
|
|
|
import ToolBar from "@/components/tool-bar/index.vue";
|
|
import ToolBar from "@/components/tool-bar/index.vue";
|
|
|
|
|
|
import { TableColumnOfPutData } from "../_pageOptions/table-put";
|
|
import { TableColumnOfPutData } from "../_pageOptions/table-put";
|
|
|
|
|
|
|
|
+import { getDeliveryStatList } from "@/api";
|
|
|
|
+import usePagination from "@/hooks/usePagination";
|
|
|
|
+
|
|
|
|
+import { deliveryPlanItem, PageOptions } from "@/types/api";
|
|
|
|
+
|
|
const PutData = defineComponent({
|
|
const PutData = defineComponent({
|
|
components: {
|
|
components: {
|
|
ToolBar,
|
|
ToolBar,
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
|
|
+ let { loading, meta, tablePageOptions } = usePagination();
|
|
const data = reactive({
|
|
const data = reactive({
|
|
- list: [],
|
|
|
|
|
|
+ list: ref<deliveryPlanItem[]>([]),
|
|
columns: TableColumnOfPutData,
|
|
columns: TableColumnOfPutData,
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ getDeliveryStatList().then((res) => {
|
|
|
|
+ data.list = res.data.list;
|
|
|
|
+ });
|
|
|
|
+ const handleTableChange = (pagination: PageOptions) => {
|
|
|
|
+ const { current, pageSize, total } = pagination;
|
|
|
|
+ getDeliveryStatList({ page: current }).then((res) => {
|
|
|
|
+ data.list = res.data.list;
|
|
|
|
+ meta = res.data.meta;
|
|
|
|
+ });
|
|
|
|
+ };
|
|
return { ...toRefs(data) };
|
|
return { ...toRefs(data) };
|
|
},
|
|
},
|
|
});
|
|
});
|