diff --git a/.gitignore b/.gitignore
index e5bf433..de300a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,6 @@
/scripts
/src/package/dante2/
/src/package/dante3/
-/public
# misc
.DS_Store
.env.local
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..7cf5f3f
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..936f358
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ 黄甲
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/manifest.json b/public/manifest.json
new file mode 100644
index 0000000..f9051fe
--- /dev/null
+++ b/public/manifest.json
@@ -0,0 +1,8 @@
+{
+ "short_name": "React App",
+ "name": "Create React App Sample",
+ "start_url": ".",
+ "display": "standalone",
+ "theme_color": "#000000",
+ "background_color": "#ffffff"
+}
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..e9e57dc
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,3 @@
+# https://www.robotstxt.org/robotstxt.html
+User-agent: *
+Disallow:
diff --git a/src/components/b_table.tsx b/src/components/b_table.tsx
index 317fce7..3293b88 100644
--- a/src/components/b_table.tsx
+++ b/src/components/b_table.tsx
@@ -19,7 +19,6 @@ const BTable = (props: any) => {
selectCallback,
scroll,
editCallback,
- deleteCallback,
actionCloumn,
onSizeChange,
onPageChange,
@@ -59,7 +58,7 @@ const BTable = (props: any) => {
});
}
};
- const cancel: PopconfirmProps["onCancel"] = (e) => {};
+ const cancel: PopconfirmProps["onCancel"] = (e) => { };
const actionDefultColumn = {
title: "操作",
@@ -83,7 +82,7 @@ const BTable = (props: any) => {
title="删除确认"
description="您是否需要删除该数据?"
onConfirm={() => {
- deleteCallback(record.identity);
+ store.deleteItem(record.identity);
}}
onCancel={cancel}
okText="Yes"
diff --git a/src/components/layout/layout_config.ts b/src/components/layout/layout_config.ts
index 87dbc10..e1a0531 100644
--- a/src/components/layout/layout_config.ts
+++ b/src/components/layout/layout_config.ts
@@ -17,10 +17,11 @@ export const items = [
key: "/permi",
label: `权限管理`,
children: [
+ { label: `企业管理`, key: "/permi/company" },
+ { label: `部门管理`, key: "/permi/dep" },
{ label: `权限管理`, key: "/permi/permi" },
{ label: `角色管理`, key: "/permi/role" },
{ label: `菜单管理`, key: "/permi/menu" },
- { label: `部门管理`, key: "/permi/dep" }
],
},
// {
diff --git a/src/pages/company/company.less b/src/pages/company/company.less
new file mode 100644
index 0000000..4a4054f
--- /dev/null
+++ b/src/pages/company/company.less
@@ -0,0 +1,8 @@
+.contentBox{
+ overflow-y: auto;
+ height: 100%;
+ .tableName{
+ height: 100%;
+ overflow-y: auto;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/company/company_config.tsx b/src/pages/company/company_config.tsx
new file mode 100644
index 0000000..b9ac282
--- /dev/null
+++ b/src/pages/company/company_config.tsx
@@ -0,0 +1,84 @@
+import { FormType } from "@/components/form/interface";
+import { UserDataType } from "@/model/userModel";
+import { CompanyConfig } from "@/service/user_config";
+import { ColumnsType } from "antd/lib/table";
+export const defaultConfig = [
+ {
+ type: FormType.input,
+ label: "名称",
+ name: "name",
+ value: "",
+ rules: [{ required: true, message: "请输入企业名称!" }],
+ },
+ {
+ type: FormType.input,
+ label: "描述",
+ name: "desc",
+ value: "",
+ rules: [{ required: true, message: "请输入企业描述" }],
+ },
+ {
+ type: FormType.input,
+ label: "负责人",
+ name: "head",
+ value: "",
+ rules: [{ required: true, message: "请输入负责人" }],
+ },
+ {
+ type: FormType.input,
+ label: "电话",
+ name: "phone",
+ value: "",
+ rules: [{ required: true, message: "请输入企业电话" }],
+ },
+
+ {
+ type: FormType.input,
+ label: "邮箱",
+ name: "email",
+ value: "",
+ rules: [{ required: true, message: "请输入邮箱" }],
+ },
+ {
+ type: FormType.select,
+ label: "上级企业",
+ name: "p_id",
+ value: 0,
+ selectUrl: CompanyConfig.LIST,
+ key: "name",
+ rules: [],
+ },
+];
+
+export const columns: ColumnsType = [
+ {
+ title: "企业名称",
+ dataIndex: "name",
+ width: 200,
+ fixed: "left",
+ },
+ {
+ title: "企业描述",
+ dataIndex: "desc",
+ },
+
+ {
+ title: "负责人",
+ dataIndex: "head",
+ },
+ {
+ title: "企业电话",
+ width: 150,
+ dataIndex: "phone",
+ },
+ {
+ title: "企业邮箱",
+ width: 150,
+ dataIndex: "email",
+ },
+ {
+ title: "上级企业名称",
+ width: 150,
+ dataIndex: "email",
+ },
+];
diff --git a/src/pages/company/index.tsx b/src/pages/company/index.tsx
new file mode 100644
index 0000000..5a8924f
--- /dev/null
+++ b/src/pages/company/index.tsx
@@ -0,0 +1,29 @@
+import { inject, observer } from "mobx-react";
+import BTable from "@/components/b_table";
+import { useEffect } from "react";
+import { Store } from "antd/lib/form/interface";
+import { columns, defaultConfig } from "./company_config";
+import "./company.less";
+
+const Company = (props: Store) => {
+ const { companyStore } = props;
+
+ useEffect(() => {
+ companyStore.getlist();
+ }, [companyStore]);
+
+ return (
+
+
+
+ );
+};
+
+export default inject("companyStore")(observer(Company));
diff --git a/src/router/index.tsx b/src/router/index.tsx
index 0b9d565..722f0a3 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -8,6 +8,7 @@ import Menu from "@/pages/menu";
import Role from "@/pages/role";
import Permission from "@/pages/permission";
import Dep from "@/pages/dep";
+import Company from "@/pages/company";
const routers = createHashRouter([
{
@@ -48,6 +49,11 @@ const routers = createHashRouter([
index: true,
element: ,
},
+ {
+ path: "/permi/company",
+ index: true,
+ element: ,
+ },
],
},
{
diff --git a/src/service/user_config.ts b/src/service/user_config.ts
index db519b7..36c2bae 100644
--- a/src/service/user_config.ts
+++ b/src/service/user_config.ts
@@ -28,5 +28,12 @@ class DepConfig {
static DELETE: string = "/dep";
}
+class CompanyConfig {
+ static ADD: string = "/company";
+ static EDIT: string = "/company";
+ static LIST: string = "/company/list";
+ static DELETE: string = "/company";
+}
-export { RoleConfig, UserConfig, MenuConfig, DepConfig };
\ No newline at end of file
+
+export { RoleConfig, UserConfig, MenuConfig, DepConfig, CompanyConfig };
\ No newline at end of file
diff --git a/src/store/company.ts b/src/store/company.ts
new file mode 100644
index 0000000..c8f8258
--- /dev/null
+++ b/src/store/company.ts
@@ -0,0 +1,13 @@
+import { makeObservable } from "mobx";
+import BaseStore from "./baseStore";
+import { UserDataType } from "@/model/userModel";
+import { CompanyConfig } from "@/service/user_config";
+
+class CompanyStore extends BaseStore {
+ constructor() {
+ super(CompanyConfig)
+ makeObservable(this, {})
+ }
+}
+const companyStore = new CompanyStore();
+export default companyStore;
\ No newline at end of file
diff --git a/src/store/index.ts b/src/store/index.ts
index 98ba250..1694033 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -3,13 +3,15 @@ import sourceStore from '@/store/source';
import roleStore from './role';
import menuStore from './menu';
import depStore from './dep';
+import companyStore from './company';
const store = {
usrStore,
sourceStore,
roleStore,
menuStore,
- depStore
+ depStore,
+ companyStore
};
export default store;
\ No newline at end of file
diff --git a/src/test_socke.html b/src/test_socke.html
deleted file mode 100644
index 5e8dd0a..0000000
--- a/src/test_socke.html
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
-
-
-
-
- Local Video
-
-
-
- Remote Video
-
-
-
- Logs
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/ttttt.html b/src/ttttt.html
deleted file mode 100644
index 4f7a5f7..0000000
--- a/src/ttttt.html
+++ /dev/null
@@ -1,157 +0,0 @@
-
-
-
-
-
-
-
-
-
- Local Video
-
-
-
- Remote Video
-
-
-
- Logs
-
-
-
-
-
-
-
-
\ No newline at end of file