dev
+import BTable from "@/components/b_table";
+import { Store } from "antd/es/form/interface";
+import { inject, observer } from "mobx-react";
+import { useEffect } from "react";
+import { columns, defaultConfig } from "./config";
+
+const Event = (props: Store) => {
+ const { thingStore } = props;
+ useEffect(() => {
+ thingStore.getlist();
+ }, [thingStore]);
+
+ return
+
}
-export default Event;
\ No newline at end of file
+export default inject("thingStore")(observer(Event));
\ No newline at end of file
diff --git a/src/pages/user/user_config.tsx b/src/pages/user/user_config.tsx
index 0bb80a4..50ef001 100644
--- a/src/pages/user/user_config.tsx
+++ b/src/pages/user/user_config.tsx
@@ -71,7 +71,6 @@ export const defaultConfig = [
name: "head_img",
value: [],
},
-
];
export const columns: ColumnsType
= [
@@ -100,17 +99,26 @@ export const columns: ColumnsType = [
{
title: "登录账号",
- width: 150,
dataIndex: "account",
},
{
title: "身份证",
- width: 150,
dataIndex: "id_card",
},
{
title: "联系电话",
- width: 150,
dataIndex: "tel",
},
+ {
+ title: "所属部门",
+ dataIndex: "",
+ },
+ {
+ title: "所属单位",
+ dataIndex: "",
+ },
+ {
+ title: "角色",
+ dataIndex: "",
+ }
];
diff --git a/src/service/user_config.ts b/src/service/user_config.ts
index f9df56a..39751f2 100644
--- a/src/service/user_config.ts
+++ b/src/service/user_config.ts
@@ -37,4 +37,12 @@ class CompanyConfig {
}
-export { RoleConfig, UserConfig, MenuConfig, DepConfig, CompanyConfig };
\ No newline at end of file
+class EventConfig {
+ static ADD: string = "/thing";
+ static EDIT: string = "/thing";
+ static LIST: string = "/thing/list";
+ static DELETE: string = "/thing";
+}
+
+
+export { RoleConfig, UserConfig, MenuConfig, DepConfig, CompanyConfig,EventConfig };
\ No newline at end of file
diff --git a/src/store/index.ts b/src/store/index.ts
index 1694033..a4b3fb7 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -4,6 +4,7 @@ import roleStore from './role';
import menuStore from './menu';
import depStore from './dep';
import companyStore from './company';
+import thingStore from './thing';
const store = {
usrStore,
@@ -11,7 +12,8 @@ const store = {
roleStore,
menuStore,
depStore,
- companyStore
+ companyStore,
+ thingStore,
};
export default store;
\ No newline at end of file
diff --git a/src/store/thing.ts b/src/store/thing.ts
new file mode 100644
index 0000000..c15b33a
--- /dev/null
+++ b/src/store/thing.ts
@@ -0,0 +1,15 @@
+import { makeObservable } from "mobx";
+import BaseStore from "./baseStore";
+import { UserDataType } from "@/model/userModel";
+import { EventConfig } from "@/service/user_config";
+
+class ThingStore extends BaseStore {
+
+ constructor() {
+ super(EventConfig)
+ makeObservable(this, {
+ })
+ }
+}
+const thingStore = new ThingStore();
+export default thingStore;
\ No newline at end of file
diff --git a/src/store/user.ts b/src/store/user.ts
index de4cb87..634ffd0 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -71,8 +71,8 @@ class UserStore extends BaseStore {
this.userDetail = data
}
async getMenu() {
- let data = await base.get(UserConfig.menu, {})
- console.log(data)
+ let res = await base.get(UserConfig.menu, {})
+ return res.data.record
}
}
const userStore = new UserStore();