diff --git a/README.md b/README.md index 3708155..69dcd47 100644 --- a/README.md +++ b/README.md @@ -43,20 +43,4 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). -To learn React, check out the [React documentation](https://reactjs.org/). -添加的数据 - -1、队伍属性管理 添加队伍 -2、个人身份管理 添加身份 -3、组织架构通过部门来组织 - - -首页: -1、组织架构 用户数量统计,党员数量统计 -2、武装力量 根据队伍统计 -3、年度训练 按照年度统计类别,次数 (任务发布时,可选择多个类别) - -4、物资管理 -5、档案管理 - -6、评优争先 \ No newline at end of file +To learn React, check out the [React documentation](https://reactjs.org/). \ No newline at end of file diff --git a/config-overrides.js b/config-overrides.js index 5791d17..075668d 100644 --- a/config-overrides.js +++ b/config-overrides.js @@ -1,14 +1,14 @@ -const {override,fixBabelImports,addLessLoader} =require('customize-cra'); +const { override, fixBabelImports, addLessLoader } = require('customize-cra'); module.exports = override( - fixBabelImports('import',{ - libraryName:'antd', - libraryDirectory:'es', - style:true, + fixBabelImports('import', { + libraryName: 'antd', + libraryDirectory: 'es', + style: true, }), addLessLoader({ - lessOptions:{ - javascriptEnabled:true , - ModifyVars:{ '@primary-color':'#eee' } + lessOptions: { + javascriptEnabled: true, + ModifyVars: { '@primary-color': '#eee' } } }) ); diff --git a/craco.config.js b/craco.config.js index 177549f..a59fe7d 100644 --- a/craco.config.js +++ b/craco.config.js @@ -1,6 +1,6 @@ const CracoLessPlugin = require('craco-less') module.exports = { - plugins: [ + plugins: [ { plugin: CracoLessPlugin, options: { diff --git a/src/components/layout/layout.tsx b/src/components/layout/layout.tsx index 9b6d7ea..cb11dd2 100644 --- a/src/components/layout/layout.tsx +++ b/src/components/layout/layout.tsx @@ -63,7 +63,6 @@ const LayOut = (props: Store) => { theme="dark" defaultSelectedKeys={["1"]} defaultOpenKeys={["sub1"]} - style={{ height: "100%", borderRight: 0 }} items={items} onClick={(e) => { diff --git a/src/components/layout/layout_config.tsx b/src/components/layout/layout_config.tsx index c8d95ea..f3a40f0 100644 --- a/src/components/layout/layout_config.tsx +++ b/src/components/layout/layout_config.tsx @@ -4,15 +4,14 @@ import { NotificationOutlined, PaperClipOutlined, FileSyncOutlined, - DashboardOutlined + DashboardOutlined, } from "@ant-design/icons"; export const items: ItemType[] = [ { key: "/", label: `首页看板`, - - icon:, + icon: , }, { key: "/user", @@ -50,7 +49,7 @@ export const items: ItemType[] = [ ], }, { - icon:, + icon: , key: "/city", label: `区域管理`, children: [{ label: `区域列表`, key: "/city/list" }], @@ -58,7 +57,7 @@ export const items: ItemType[] = [ { key: "/sys", label: `系统管理`, - icon:, + icon: , children: [ { label: `部门管理`, key: "/sys/dep" }, { label: `数据字典`, key: "/sys/keywod" }, diff --git a/src/index.less b/src/index.less index 991a8bb..5c72306 100644 --- a/src/index.less +++ b/src/index.less @@ -1,8 +1,14 @@ -html { +html ,#root { width: 100%; height: 100%; } -body { +body, +p, +h1, +h2, +h3, +h4, +h5 { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", @@ -11,9 +17,7 @@ body { -moz-osx-font-smoothing: grayscale; height: 100%; } -#root { - height: 100%; -} + .projectContent { box-sizing: border-box; margin: 10px; @@ -73,42 +77,6 @@ code { color: #00ef97 !important; border-color: #00ef97 !important; } -.owner_model { - padding-bottom: 0px !important; - .ant-modal-content { - background-size: 100% 100%; - background-position: center center; /* 可选,确保图片在容器中居中 */ - background-repeat: no-repeat; /* 确保图片不会重复 */ - padding-bottom: 0px; - .ant-modal-header { - color: rgba(0, 0, 0, 0.85); - background: none; - border-bottom: 0px solid #f0f0f0; - align-items: center; - padding-left: 40px; - position: relative; - top: -10px; - left: -30px; - .ant-modal-title { - color: #fff; - } - } - .ant-modal-close { - color: #fff; - } - .ant-modal-body { - min-height: 300px; - overflow: auto; - } - .ant-modal-footer { - padding: 30px 30px; - text-align: center; - background: transparent; - border-top: 0px solid #f0f0f0; - background: none; - } - } -} .text-overflow { display: inline-block; diff --git a/src/pages/permission/permission.less b/src/pages/permission/permission.less deleted file mode 100644 index 4a4054f..0000000 --- a/src/pages/permission/permission.less +++ /dev/null @@ -1,8 +0,0 @@ -.contentBox{ - overflow-y: auto; - height: 100%; - .tableName{ - height: 100%; - overflow-y: auto; - } -} \ No newline at end of file diff --git a/src/pages/permission/permission.tsx b/src/pages/permission/permission.tsx deleted file mode 100644 index 5ac69cd..0000000 --- a/src/pages/permission/permission.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Button, Space, Modal, FormInstance } from "antd"; -import { inject, observer } from "mobx-react"; -import BTable from "@/components/b_table"; -import { useEffect, useState } from "react"; -import { Store } from "antd/lib/form/interface"; -import React from "react"; -import { columns } from "./permission_config"; -import "./permission.less"; - -const Permission = (props: Store) => { - const { usrStore } = props; - const [isModalOpen, setIsModalOpen] = useState(false); - const formRef = React.useRef(null); - const [userId, setId] = useState(null); - - useEffect(() => {}, []); - - const addHandler = () => {}; - return ( -
- - - - - formRef.current?.resetFields()} - onOk={() => formRef.current?.submit()} - okText="确定" - cancelText="取消" - onCancel={() => { - setId(null); - setIsModalOpen(false); - }} - > - -
- ); -}; - -export default inject("usrStore")(observer(Permission)); diff --git a/src/pages/permission/permission_config.tsx b/src/pages/permission/permission_config.tsx deleted file mode 100644 index 34761da..0000000 --- a/src/pages/permission/permission_config.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { FormType } from "@/components/form/interface"; -import { UserDataType } from "@/model/userModel"; -import { ColumnsType } from "antd/lib/table"; -import { Image } from "antd"; -import { getBirthDateAndGender } from "@/util/util"; -export const defaultConfig = (team, per) => [ - { - type: FormType.input, - label: "用户名", - name: "user_name", - value: "", - rules: [{ required: true, message: "请输入用户名称!" }], - }, - - { - type: FormType.inputNumber, - label: "年龄", - name: "age", - value: "", - rules: [{ required: true, message: "请输入年龄" }], - }, - { - type: FormType.input, - label: "身份证", - name: "id_card", - value: "", - rules: [{ required: true, message: "请输入身份证" }], - }, - { - type: FormType.input, - label: "登录账号", - name: "account", - value: "", - rules: [{ required: true, message: "请输入登录账号" }], - }, - - { - type: FormType.input, - label: "联系电话", - name: "tel", - value: "", - }, - - { - type: FormType.input, - label: "邮箱", - name: "email", - value: "", - }, - { - type: FormType.upload, - label: "头像", - name: "head_img", - value: [], - }, -]; - -export const columns: ColumnsType = [ - { - title: "用户名", - dataIndex: "user_name", - width: 200, - fixed: "left", - }, - { - title: "性别", - width: 150, - render: (render) => ( - {getBirthDateAndGender(render.id_card)?.gender} - ), - }, - - { - title: "头像", - dataIndex: "head_img", - width: 150, - render: (head_img) => { - return ; - }, - }, - - { - title: "登录账号", - width: 150, - dataIndex: "account", - }, - { - title: "身份证", - width: 150, - dataIndex: "id_card", - }, - { - title: "联系电话", - width: 150, - dataIndex: "tel", - }, -]; diff --git a/src/router/index.tsx b/src/router/index.tsx index 769c759..b5d7c16 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -1,11 +1,7 @@ import { createHashRouter } from "react-router-dom"; import LayOut from "@/components/layout/layout"; -import Login from "@/pages/login/login"; -import User from "@/pages/user/user"; -import Dashbord from "@/pages/dashbord"; import { rbac } from "./routers/rbac_router"; import { sku } from "./routers/sku_router"; -import Order from "@/pages/order"; const routers = createHashRouter([ { @@ -15,25 +11,33 @@ const routers = createHashRouter([ { path: "/", index: true, - element: , + lazy: async() => ({ + Component:(await import("@/pages/dashbord")).default, + }) }, { path: "/user/list", index: true, - element: , + lazy: async() => ({ + Component:(await import("@/pages/user/user")).default, + }) }, ...rbac, ...sku, { path: "/order/list", index: true, - element: , + lazy: async() => ({ + Component:(await import("@/pages/order")).default, + }) }, ], }, { path: "/login", - element: , + lazy: async() => ({ + Component:(await import("@/pages/login/login")).default, + }) }, ]); diff --git a/src/router/routers/rbac_router.tsx b/src/router/routers/rbac_router.tsx index ee98533..037e71d 100644 --- a/src/router/routers/rbac_router.tsx +++ b/src/router/routers/rbac_router.tsx @@ -1,37 +1,44 @@ -import Rbac from "@/pages/rbac"; -import Dep from "@/pages/rbac/dep"; -import Menu from "@/pages/rbac/menu"; -import Org from "@/pages/rbac/org"; -import Role from "@/pages/rbac/role"; -import Staff from "@/pages/rbac/staff"; export const rbac = [ { path: "/rbac", - element: , + lazy: async () => ({ + Component: (await import("@/pages/rbac")).default, + }), children: [ { path: "/rbac/menu", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/rbac/menu")).default, + }), }, { path: "/rbac/role", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/rbac/role")).default, + }), }, { path: "/rbac/org", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/rbac/org")).default, + }), }, { path: "/rbac/dep", index: true, - element: , - }, { + lazy: async () => ({ + Component: (await import("@/pages/rbac/dep")).default, + }), + }, + { path: "/rbac/staff", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/rbac/staff")).default, + }), }, ], }, diff --git a/src/router/routers/sku_router.tsx b/src/router/routers/sku_router.tsx index bc9dd6b..215bbf7 100644 --- a/src/router/routers/sku_router.tsx +++ b/src/router/routers/sku_router.tsx @@ -1,12 +1,10 @@ import Menu from "@/pages/rbac/menu"; -import Sku from "@/pages/sku"; -import Brand from "@/pages/sku/brand"; -import Cat from "@/pages/sku/cat"; -import Spec from "@/pages/sku/spec"; export const sku = [ { path: "/sku", - element: , + lazy: async () => ({ + Component: (await import("@/pages/sku")).default, + }), children: [ { path: "/sku/list", @@ -16,17 +14,23 @@ export const sku = [ { path: "/sku/cat", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/sku/cat")).default, + }), }, { path: "/sku/spec", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/sku/spec")).default, + }), }, { path: "/sku/brand", index: true, - element: , + lazy: async () => ({ + Component: (await import("@/pages/sku/brand")).default, + }), }, ], }, 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