diff --git a/src/components/ali_upload.tsx b/src/components/ali_upload.tsx index cea1125..df37a45 100644 --- a/src/components/ali_upload.tsx +++ b/src/components/ali_upload.tsx @@ -68,7 +68,7 @@ const AliUpload = (props: UploadFileProps) => { { value: "identity", children: "children" }} - treeCheckable={v.treeCheckbox} + multiple showSearch style={{ width: '100%' }} placeholder="请选择" diff --git a/src/components/layout/layout_config.tsx b/src/components/layout/layout_config.tsx index 1303722..75d791e 100644 --- a/src/components/layout/layout_config.tsx +++ b/src/components/layout/layout_config.tsx @@ -8,9 +8,9 @@ export const items = [ }, { key: "/user", - label: `用户管理`, + label: `员工管理`, icon: , - children: [{ key: "/user/list", label: `用户管理` }], + children: [{ key: "/user/list", label: `员工管理` }], }, { key: "/source", @@ -26,7 +26,7 @@ export const items = [ label: `权限管理`, icon: , children: [ - { label: `企业管理`, key: "/permi/company" }, + { label: `单位管理`, key: "/permi/company" }, { label: `部门管理`, key: "/permi/dep" }, { label: `角色管理`, key: "/permi/role" }, { label: `菜单管理`, key: "/permi/menu" }, diff --git a/src/components/video_select.tsx b/src/components/video_select.tsx deleted file mode 100644 index 8642a6b..0000000 --- a/src/components/video_select.tsx +++ /dev/null @@ -1,33 +0,0 @@ -// import { TreeSelect, TreeSelectProps } from "antd"; -// import { useEffect, useState } from "react"; - -const VideoSelect = (props) => { -// const { changes } = props; -// const [value, setValue] = useState(); -// useEffect(() => {}, []); - -// const onLoadData: TreeSelectProps["loadData"] = async ({ id }) => {}; - -// const onChange = (newValue: string) => { -// if (newValue.length > 4) return; -// setValue(newValue); -// changes(newValue); -// }; -// return ( -//
-// -//
-// ); -}; - -export default VideoSelect; diff --git a/src/pages/source/source.tsx b/src/pages/source/source.tsx index 282cbb1..49c2a03 100644 --- a/src/pages/source/source.tsx +++ b/src/pages/source/source.tsx @@ -71,6 +71,7 @@ const Source = (props: Store) => { }; const getContent = (list, index) => { setLoading(true); + console.log(index) sourceStore.geContent(list, index, 20).then((res) => { res.forEach((element) => { element.key = element.identity; @@ -181,6 +182,7 @@ const Source = (props: Store) => { const onChange: PaginationProps["onChange"] = (page) => { setPage(page); + console.log(page) getContent(selectKey, page); cancel(); }; diff --git a/src/pages/source/upload.tsx b/src/pages/source/upload.tsx index 6b53a00..4ea3d50 100644 --- a/src/pages/source/upload.tsx +++ b/src/pages/source/upload.tsx @@ -1,12 +1,11 @@ -import Config from "@/util/config"; import { Button, message, Upload, UploadProps } from "antd"; const Uploads = () => { const props: UploadProps = { name: "file", - action: `${Config.baseUrl}/public/fts/uploadthree`, + action: `http://127.0.0.1:12216/v1/public/fts/uploadFore`, headers: { - authorization: "authorization-text", + authorization: window.localStorage.getItem("token")??'' }, onChange(info: any) { if (info.file.status === "done" && info.file.response.code !== 200) { diff --git a/src/pages/user/user_config.tsx b/src/pages/user/user_config.tsx index 50ef001..05f3602 100644 --- a/src/pages/user/user_config.tsx +++ b/src/pages/user/user_config.tsx @@ -110,15 +110,20 @@ export const columns: ColumnsType = [ dataIndex: "tel", }, { - title: "所属部门", - dataIndex: "", + title: "所属部门", + render: (render) => ( + {render.dep[0]?.dep_name} + ), }, { - title: "所属单位", - dataIndex: "", + title: "所属单位", + render: (render) => ( + {render.company[0]?.name} + ), + }, { - title: "角色", + title: "角色", dataIndex: "", } ]; diff --git a/src/store/baseStore.ts b/src/store/baseStore.ts index 6636e1d..4e17e07 100644 --- a/src/store/baseStore.ts +++ b/src/store/baseStore.ts @@ -90,6 +90,7 @@ class BaseStore implements BaseStoreInterface { if (!res?.data?.record) { runInAction(() => { this.list = data; + this.total = res.data.count }) this.listStatus = false; return; diff --git a/src/store/source.ts b/src/store/source.ts index 77bc978..ff5e953 100644 --- a/src/store/source.ts +++ b/src/store/source.ts @@ -1,4 +1,4 @@ -import { action, makeObservable, observable } from "mobx"; +import { action, makeObservable, observable, runInAction } from "mobx"; import BaseStore from "./baseStore"; import { UserDataType } from "@/model/userModel"; import SourceConfig from "@/service/source_config"; @@ -38,8 +38,8 @@ class SourceStore extends BaseStore { } } let res = await base.put(SourceConfig.EDIT, { - list:list, - id_card:idcard, + list: list, + id_card: idcard, }) if (res.code !== 200) { message.error(res.msg) @@ -54,7 +54,10 @@ class SourceStore extends BaseStore { message.error(res.msg) return false } - this.total = res.data.count; + runInAction(() => { + this.total = res.data.count; + }) + return res.data.record; } } diff --git a/src/store/user.ts b/src/store/user.ts index b53ae81..888293f 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -4,7 +4,6 @@ import BaseStore from "./baseStore"; import { UserDataType, UserInfos } from "@/model/userModel"; import { message } from "antd"; import { UserConfig } from "@/service/user_config"; -import { json } from "stream/consumers"; class UserStore extends BaseStore { _userinfo: UserInfos = {}; // 用户信息