diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 4c23945..62d9069 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -309,15 +309,17 @@ import { } from '@element-plus/icons-vue' import {nextTick, onMounted, reactive, ref} from 'vue' -import {options} from './options.js' -import {getUserList} from "../../api/modules/user"; +// 示例数据 +// import {options} from './options.js' +import {getOrderList} from "../../api/modules/order"; const tableData = ref([]) const dataList = ref([]) const table = ref() const tabclickIndex = ref() const isExpand = ref(false) -const columnData = ref(JSON.parse(JSON.stringify(options))) +// 示例数据加载 +// const exampleData = ref(JSON.parse(JSON.stringify(options))) const disabled = ref(false) const dialogVisible = ref(false) const total = ref(0) @@ -332,14 +334,14 @@ const queryData = ref({ }) const initData = () => { + // 示例数据加载 + // tableData.value = exampleData.value; - tableData.value = columnData.value; - - // orderLists(queryData.value).then((res) => { - // console.log(res.data.data) - // // total.value = res.data.data.total - // tableData.value = res.data.data - // }) + getOrderList(queryData.value).then((res) => { + console.log(res.data) + total.value = res.data.total + tableData.value = res.data + }) } const itemEditHanld = (item) => { item.itemEdit = !item.itemEdit