+ :total="allDataList.total" :show-total="(total: number) => `共 ${total} 条`" @change="run" />
@@ -119,12 +114,5 @@ function handleDelete(id: number) {
diff --git a/src/pages/user/modal.vue b/src/pages/user/modal.vue
index f639c5b..d1c9942 100644
--- a/src/pages/user/modal.vue
+++ b/src/pages/user/modal.vue
@@ -3,7 +3,7 @@ import { computed, defineModel, reactive } from 'vue';
import { Modal, Form, Input, Select, SelectOption, Space, Button } from 'ant-design-vue';
import { md5 } from 'js-md5';
-import { RoleList } from '@/core/role';
+import { RoleList } from '@/core/enums';
import useRequest from '@/service/useRequest';
import { saveUser } from '@/service/api/user';
diff --git a/src/router.ts b/src/router.ts
index d0e7e4d..e4655e6 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -29,16 +29,16 @@ export const routes:RouteRecordRaw[] = [
title: '输出计算',
icon:'icon-calculator'
},
- component: () => import('./pages/result.vue')
+ component: () => import('./pages/result/index.vue')
},
{
- path: 'data',
- name: 'data',
+ path: 'product-data',
+ name: 'product',
meta: {
title: '数据管理',
icon:'icon-input'
},
- component: () => import('./pages/datas.vue')
+ component: () => import('./pages/product/index.vue')
},
{
path: 'user',
diff --git a/src/service/api/product.ts b/src/service/api/product.ts
new file mode 100644
index 0000000..84d2be0
--- /dev/null
+++ b/src/service/api/product.ts
@@ -0,0 +1,28 @@
+import { sleep } from "@/core/sleep";
+import { post } from "./request";
+
+export const ProductCols = [
+ { id: 1, name: "能量密度", alias: "power" },
+ { id: 2, name: "蛋白Pro", alias: "protein" },
+ { id: 3, name: "Glu", alias: "glu" },
+ { id: 4, name: "Fat", alias: "fat" },
+ { id: 5, name: "纤维素", alias: "cellulose" },
+ { id: 6, name: "Na", alias: "na" },
+ { id: 7, name: "K", alias: "k" },
+ { id: 8, name: "Ca", alias: "ca" },
+ { id: 9, name: "P", alias: "p" },
+ { id: 10, name: "Mg", alias: "mg" },
+];
+
+export async function getList(param: ProductSearchParam) {
+ await sleep(200);
+ return await post