fix(amap):core
This commit is contained in:
parent
2f686df09c
commit
28201296f1
|
@ -7,12 +7,14 @@ import Config from "@/util/config";
|
|||
interface UploadFileProps {
|
||||
imgList: Array<UploadFileEx>;
|
||||
onChnage: Function;
|
||||
maxCount?: number;
|
||||
}
|
||||
|
||||
interface UploadFileEx extends UploadFile {
|
||||
systemImageId?: number;
|
||||
bannerName?: string;
|
||||
file_name?: string;
|
||||
file_url?: string;
|
||||
redictUrl?: string;
|
||||
id?: number;
|
||||
}
|
||||
|
@ -47,12 +49,12 @@ const AliUpload = (props: UploadFileProps) => {
|
|||
}, [props.imgList]);
|
||||
|
||||
const handleChange: UploadProps["onChange"] = ({ fileList: newFileList }) => {
|
||||
newFileList.forEach((i)=>{
|
||||
i.url = `${Config.uploadUrl}uploads/`+i.name
|
||||
i.fileName = i.name
|
||||
})
|
||||
newFileList.forEach((i) => {
|
||||
i.url = `${Config.uploadUrl}uploads/` + i.name;
|
||||
i.fileName = i.name;
|
||||
});
|
||||
setFileList(newFileList);
|
||||
props.onChnage(newFileList)
|
||||
props.onChnage(newFileList);
|
||||
};
|
||||
const uploadButton = (
|
||||
<div>
|
||||
|
@ -68,10 +70,10 @@ const AliUpload = (props: UploadFileProps) => {
|
|||
fileList={files}
|
||||
action={`${Config.uploadUrl}v1/public/fts/upload`}
|
||||
onPreview={handlePreview}
|
||||
maxCount={4}
|
||||
maxCount={props.maxCount ?? 4}
|
||||
onChange={handleChange}
|
||||
>
|
||||
{files.length >= 4 ? null : uploadButton}
|
||||
{files.length >= (props.maxCount??4) ? null : uploadButton}
|
||||
</Upload>
|
||||
<Modal
|
||||
open={previewOpen}
|
||||
|
|
|
@ -43,7 +43,7 @@ const LayOut = (props: Store) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
key: "/admin/archives",
|
||||
key: "/admin/archives/box",
|
||||
label: `档案管理`,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -21,6 +21,7 @@ export interface UserDataType {
|
|||
endTime: any;
|
||||
status: any;
|
||||
identity: string;
|
||||
archives_category_identity:string;
|
||||
}
|
||||
|
||||
export interface TagDataType {
|
||||
|
|
|
@ -9,13 +9,12 @@ import React from "react";
|
|||
import FolderTwoTone from "@ant-design/icons/FolderOpenTwoTone";
|
||||
import { folderConfig } from "./archives_conf";
|
||||
import { Form, Select } from "antd";
|
||||
import Preview from "./preview";
|
||||
import { useNavigate } from "react-router";
|
||||
const { Option } = Select;
|
||||
const ArchivesFolder = (props: Store) => {
|
||||
const { folderStore, acStore } = props;
|
||||
const nav = useNavigate();
|
||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||
const [isModalOpenArchives, setIsModalOpenArchives] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
const formRef = React.useRef<FormInstance>(null);
|
||||
|
@ -49,16 +48,9 @@ const ArchivesFolder = (props: Store) => {
|
|||
setIsModalOpen(false);
|
||||
};
|
||||
|
||||
const cancelHandlerArch = () => {
|
||||
setIsModalOpenArchives(false);
|
||||
};
|
||||
|
||||
|
||||
// 文件夹点击
|
||||
const folderHandle = (e) => {
|
||||
folderStore.getAlist(e.identity).then((res) => {
|
||||
setIsModalOpenArchives(true);
|
||||
});
|
||||
};
|
||||
|
||||
const onFinishFailed = () => {};
|
||||
return (
|
||||
<div className="contentBox">
|
||||
|
@ -72,7 +64,10 @@ const ArchivesFolder = (props: Store) => {
|
|||
{Array.from({ length: folderStore.list?.length ?? 0 }, (_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
onClick={() => folderHandle(folderStore.list[i])}
|
||||
onClick={() =>
|
||||
//folderHandle(folderStore.list[i])
|
||||
nav("/admin/archives/folder/" + folderStore.list[i].identity)
|
||||
}
|
||||
style={{ cursor: "pointer", width: "120px" }}
|
||||
>
|
||||
<FolderTwoTone rotate={-270} style={{ fontSize: "80px" }} />
|
||||
|
@ -82,15 +77,6 @@ const ArchivesFolder = (props: Store) => {
|
|||
</div>
|
||||
))}
|
||||
</Flex>
|
||||
<Modal
|
||||
title={"档案预览"}
|
||||
width={"80%"}
|
||||
open={isModalOpenArchives}
|
||||
onCancel={cancelHandlerArch}
|
||||
footer={null}
|
||||
>
|
||||
<Preview list={folderStore.alist} />
|
||||
</Modal>
|
||||
<Modal
|
||||
title={!tagId ? "添加文件夹" : "编辑文件夹"}
|
||||
width={600}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
import { Breadcrumb, Button, UploadFile } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Store } from "antd/es/form/interface";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { useParams } from "react-router";
|
||||
import AliUpload from "@/components/ali_upload";
|
||||
interface ArchiveUploadFile extends UploadFile{
|
||||
file_type:string | undefined;
|
||||
file_url:string | undefined;
|
||||
}
|
||||
const FileListPage = (props: Store) => {
|
||||
const { folderStore,archivesStore } = props;
|
||||
const { id } = useParams();
|
||||
const [fileList, setFileList] = useState<ArchiveUploadFile[]>([]);
|
||||
useEffect(() => {
|
||||
folderStore.getAlist(id).then((res) => {
|
||||
setFileList(folderStore.alist)
|
||||
});
|
||||
}, [folderStore,id]);
|
||||
const saveHandler = ()=>{
|
||||
fileList.forEach((item)=>{
|
||||
item.file_url= item.url;
|
||||
item.file_type= item.type;
|
||||
})
|
||||
archivesStore.save(id,fileList);
|
||||
}
|
||||
return (
|
||||
<div style={{ margin: "10px" }}>
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
title: "文件夹",
|
||||
path: "/admin/archives/box",
|
||||
},
|
||||
{
|
||||
title: "档案列表",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div style={{ margin: "10px" }}></div>
|
||||
<div style={{ margin: "10px" }}>
|
||||
<Button type="primary" onClick={saveHandler}>保存</Button>
|
||||
</div>
|
||||
<AliUpload
|
||||
imgList={fileList??[]}
|
||||
onChnage={(v) => {
|
||||
setFileList(v);
|
||||
}}
|
||||
maxCount={100}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
//export default FileListPage;
|
||||
export default inject("archivesStore","folderStore")(observer(FileListPage));
|
|
@ -1,35 +1,13 @@
|
|||
|
||||
|
||||
import { Tabs, TabsProps } from "antd";
|
||||
import ArchivesCat from "./archivesCat";
|
||||
import ArchivesFolder from "./archivesFolder";
|
||||
import Archive from "./archive";
|
||||
import { Outlet } from "react-router";
|
||||
|
||||
|
||||
const Archives = () => {
|
||||
const onChange = (key: string) => {
|
||||
console.log(key);
|
||||
};
|
||||
const items: TabsProps["items"] = [
|
||||
{
|
||||
key: "1",
|
||||
label: "档案类别管理",
|
||||
children: <ArchivesCat />,
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
label: "档案文件夹管理",
|
||||
children: <ArchivesFolder />,
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
label: "档案管理",
|
||||
children: <Archive />,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
||||
<Outlet />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
|
||||
import { Tabs, TabsProps } from "antd";
|
||||
import ArchivesCat from "./archivesCat";
|
||||
import ArchivesFolder from "./archivesFolder";
|
||||
// import Archive from "./archive";
|
||||
|
||||
|
||||
const ArchiveBox = () => {
|
||||
const onChange = (key: string) => {
|
||||
console.log(key);
|
||||
};
|
||||
const items: TabsProps["items"] = [
|
||||
{
|
||||
key: "1",
|
||||
label: "档案类别管理",
|
||||
children: <ArchivesCat />,
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
label: "档案文件夹管理",
|
||||
children: <ArchivesFolder />,
|
||||
},
|
||||
];
|
||||
return (
|
||||
<>
|
||||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ArchiveBox;
|
|
@ -1,7 +1,9 @@
|
|||
.login_model {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: aqua;
|
||||
background-image: url("../../static/jun.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@ -15,7 +17,6 @@
|
|||
}
|
||||
.container {
|
||||
height: 100%;
|
||||
background-image: linear-gradient(to right, #fbc2eb, #a6c1ee);
|
||||
}
|
||||
.login-wrapper {
|
||||
background-color: #fff;
|
||||
|
@ -53,11 +54,12 @@
|
|||
.btn {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
background-image: linear-gradient(to right, #a6c1ee, #fbc2eb);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.msg {
|
||||
|
|
|
@ -0,0 +1,173 @@
|
|||
import {
|
||||
Button,
|
||||
Col,
|
||||
Divider,
|
||||
Flex,
|
||||
FormInstance,
|
||||
message,
|
||||
Modal,
|
||||
Row,
|
||||
} from "antd";
|
||||
import { Store } from "antd/es/form/interface";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { useState } from "react";
|
||||
import AliUpload from "@/components/ali_upload";
|
||||
import SimpleForm from "@/components/form/simple_form";
|
||||
import React from "react";
|
||||
import { folderConfig } from "../archives/archives_conf";
|
||||
interface TaskArchivesProps {
|
||||
acStore?: Store;
|
||||
folderStore?: Store;
|
||||
trainingStore?: Store;
|
||||
taskId: string;
|
||||
category_identity: string;
|
||||
}
|
||||
|
||||
const TaskArchives = (props: TaskArchivesProps) => {
|
||||
const { folderStore, trainingStore, taskId, category_identity } = props;
|
||||
const [isModalOpenUser, setIsModalOpenUser] = useState<boolean>(false);
|
||||
const [folderModal, setfolderModal] = useState<boolean>(false);
|
||||
const [folderList, setfolderList] = useState<any>([]);
|
||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
const [identity, setIdentity] = useState<string>("");
|
||||
const [imageList, setImageList] = useState<any>([]);
|
||||
const formRef = React.useRef<FormInstance>(null);
|
||||
|
||||
const getFolderList = () => {
|
||||
folderStore
|
||||
?.getFolderList(category_identity)
|
||||
.then((res) => {
|
||||
setfolderList(res?.data?.record ?? []);
|
||||
});
|
||||
};
|
||||
const onFinish = async (values: any) => {
|
||||
let data = values;
|
||||
data.ac_identity = category_identity;
|
||||
folderStore?.add(data).then(() => {
|
||||
message.success("保存成功");
|
||||
getFolderList();
|
||||
setfolderModal(false);
|
||||
});
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
let imlist = imageList
|
||||
imlist.forEach(element => {
|
||||
element.file_url = element.url;
|
||||
element.file_name = element.name;
|
||||
});
|
||||
let data = {
|
||||
task_identity: taskId, // 任务id
|
||||
identity: identity, // 文件夹id
|
||||
list: imlist,
|
||||
category_identity: category_identity,
|
||||
};
|
||||
let res = await trainingStore?.addAcieves(data);
|
||||
message.success("档案已保存到当前文件夹");
|
||||
};
|
||||
const handleSelect = async (identity) => {
|
||||
await folderStore?.getAlist(identity).then(() => {
|
||||
folderStore.alist?.forEach(elem=>{
|
||||
elem.url = elem.file_url
|
||||
elem.name = elem.file_name
|
||||
})
|
||||
setImageList(folderStore.alist ?? []);
|
||||
});
|
||||
setIdentity(identity);
|
||||
};
|
||||
const onFinishFailed = () => {};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setIsModalOpenUser(true);
|
||||
getFolderList();
|
||||
}}
|
||||
>
|
||||
档案上传
|
||||
</Button>
|
||||
<Modal
|
||||
title="创建文件夹"
|
||||
width={600}
|
||||
open={folderModal}
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
onOk={() => formRef.current?.submit()}
|
||||
onCancel={() => setfolderModal(false)}
|
||||
>
|
||||
<SimpleForm
|
||||
formRef={formRef}
|
||||
createCallback={() => {}}
|
||||
formName="card_basic"
|
||||
colProps={12}
|
||||
span={6}
|
||||
subBtnName="提交"
|
||||
formDatas={projectConfig}
|
||||
onFinish={onFinish}
|
||||
initialValues={true}
|
||||
onFinishFailed={onFinishFailed}
|
||||
></SimpleForm>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="档案上传"
|
||||
width={1200}
|
||||
open={isModalOpenUser}
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
onCancel={() => setIsModalOpenUser(false)}
|
||||
>
|
||||
<Row gutter={16}>
|
||||
<Col span={4}>
|
||||
<p>文件夹列表</p>
|
||||
<Divider dashed />
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
setfolderModal(true);
|
||||
setProjectConfig(folderConfig);
|
||||
}}
|
||||
>
|
||||
创建文件夹
|
||||
</Button>
|
||||
{folderList?.map((v: any) => {
|
||||
return (
|
||||
<p
|
||||
style={{
|
||||
cursor: "pointer",
|
||||
color: identity === v.identity ? "blue" : "",
|
||||
}}
|
||||
key={v.identity}
|
||||
onClick={() => {
|
||||
handleSelect(v.identity);
|
||||
}}
|
||||
>
|
||||
{v.folder_name}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</Col>
|
||||
<Col span={20}>
|
||||
<Flex justify={"space-between"}>
|
||||
<p>档案</p>
|
||||
<Button type="primary" onClick={save}>
|
||||
保存
|
||||
</Button>
|
||||
</Flex>
|
||||
<Divider dashed />
|
||||
<AliUpload
|
||||
imgList={imageList}
|
||||
onChnage={(v) => {
|
||||
setImageList(v);
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default inject("folderStore", "trainingStore")(observer(TaskArchives));
|
|
@ -22,6 +22,7 @@ import { traningConfig } from "./traning_config";
|
|||
import { FormType } from "@/components/form/interface";
|
||||
import TraningUser from "./traningUser";
|
||||
import MinusCircleOutlined from "@ant-design/icons/lib/icons/MinusCircleOutlined";
|
||||
import TaskArchives from "./task_archives";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
|
@ -44,22 +45,12 @@ const Trainings = (props: Store) => {
|
|||
{ title: "任务开始时间", dataIndex: "start_time" },
|
||||
{ title: "任务结束时间", dataIndex: "end_time" },
|
||||
{ title: "任务积分设置", dataIndex: "score" },
|
||||
{ title: "任务类别", dataIndex: "category_identity" },
|
||||
{ title: "任务类别", dataIndex: "category_name" },
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "id",
|
||||
render: (any, record) => (
|
||||
<Space wrap>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
trainingStore.id = record?.identity;
|
||||
setIsModalOpenUser(true);
|
||||
}}
|
||||
>
|
||||
训练人员管理
|
||||
</Button>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
|
@ -79,6 +70,37 @@ const Trainings = (props: Store) => {
|
|||
>
|
||||
删除
|
||||
</Button>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
trainingStore.id = record?.identity;
|
||||
setIsModalOpenUser(true);
|
||||
}}
|
||||
>
|
||||
训练人员管理
|
||||
</Button>
|
||||
<TaskArchives taskId={record?.identity} category_identity={record.archives_category_identity}/>
|
||||
{/* <Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
trainingStore.id = record?.identity;
|
||||
setIsModalOpenUser(true);
|
||||
}}
|
||||
>
|
||||
档案上传
|
||||
</Button> */}
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
trainingStore.id = record?.identity;
|
||||
setIsModalOpenUser(true);
|
||||
}}
|
||||
>
|
||||
物资归还
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
@ -110,6 +132,7 @@ const Trainings = (props: Store) => {
|
|||
};
|
||||
useEffect(() => {
|
||||
trainingStore.getlist();
|
||||
|
||||
}, [trainingStore]);
|
||||
useEffect(() => {
|
||||
trainingCatStore.getlist().then(() => {
|
||||
|
@ -229,7 +252,7 @@ const Trainings = (props: Store) => {
|
|||
{(fields, { add, remove }) => (
|
||||
<>
|
||||
{fields.map(({ key, name, ...restField }) => (
|
||||
<>
|
||||
<div style={{ position: "relative" }}>
|
||||
<Form.Item
|
||||
{...restField}
|
||||
label={"物资"}
|
||||
|
@ -262,8 +285,15 @@ const Trainings = (props: Store) => {
|
|||
>
|
||||
<InputNumber placeholder="请输入物资数量" />
|
||||
</Form.Item>
|
||||
<MinusCircleOutlined onClick={() => remove(name)} />
|
||||
</>
|
||||
<MinusCircleOutlined
|
||||
style={{
|
||||
position: "absolute",
|
||||
right: "10px",
|
||||
bottom: "20px",
|
||||
}}
|
||||
onClick={() => remove(name)}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<Form.Item>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
|
@ -300,4 +330,7 @@ const Trainings = (props: Store) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default inject("trainingStore", "trainingCatStore")(observer(Trainings));
|
||||
export default inject(
|
||||
"trainingStore",
|
||||
"trainingCatStore",
|
||||
)(observer(Trainings));
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
// const TrainingCat = () => {
|
||||
// return (
|
||||
// <>
|
||||
// <p>训练分类管理</p>
|
||||
// </>
|
||||
// );
|
||||
// };
|
||||
// export default TrainingCat;
|
||||
|
||||
import { Button, Space, Modal, FormInstance } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import type { ColumnsType } from "antd/es/table";
|
||||
|
|
|
@ -35,6 +35,13 @@ export const defaultConfig =(team,per)=>
|
|||
value: "",
|
||||
rules: [{ required: true, message: "请输入年龄" }],
|
||||
},
|
||||
{
|
||||
type: FormType.input,
|
||||
label: "身份证",
|
||||
name: "id_card",
|
||||
value: "",
|
||||
rules: [{ required: true, message: "请输入身份证" }],
|
||||
},
|
||||
{
|
||||
type: FormType.input,
|
||||
label: "登录账号",
|
||||
|
@ -46,7 +53,7 @@ export const defaultConfig =(team,per)=>
|
|||
type: FormType.input,
|
||||
label: "初始密码",
|
||||
name: "password",
|
||||
value: "",
|
||||
value: "123456",
|
||||
rules: [{ required: true, message: "请输入初始密码" }],
|
||||
},
|
||||
{
|
||||
|
@ -56,13 +63,7 @@ export const defaultConfig =(team,per)=>
|
|||
value: "",
|
||||
rules: [{ required: true, message: "请输入家庭住址" }],
|
||||
},
|
||||
{
|
||||
type: FormType.input,
|
||||
label: "身份证",
|
||||
name: "id_card",
|
||||
value: "",
|
||||
rules: [{ required: true, message: "请输入身份证" }],
|
||||
},
|
||||
|
||||
{
|
||||
type: FormType.input,
|
||||
label: "担任职务",
|
||||
|
@ -126,7 +127,7 @@ export const defaultConfig =(team,per)=>
|
|||
name: "team_link_user",
|
||||
checkboxData:team,
|
||||
value: "",
|
||||
rules: [{ required: true, message: "请输入民族" }],
|
||||
rules: [{ required: true, message: "请选择所属队伍" }],
|
||||
},
|
||||
{
|
||||
type: FormType.cehckboxGroup,
|
||||
|
@ -134,7 +135,7 @@ export const defaultConfig =(team,per)=>
|
|||
name: "pers_link_user",
|
||||
checkboxData:per,
|
||||
value: "",
|
||||
rules: [{ required: true, message: "请输入民族" }],
|
||||
rules: [{ required: true, message: "请选择个人身份属性" }],
|
||||
},
|
||||
{
|
||||
type: FormType.radio,
|
||||
|
@ -151,7 +152,7 @@ export const defaultConfig =(team,per)=>
|
|||
val: 2,
|
||||
},
|
||||
],
|
||||
rules: [{ required: true, message: "请输入民族" }],
|
||||
rules: [{ required: true, message: "是否党员不能为空" }],
|
||||
},
|
||||
{
|
||||
type: FormType.radio,
|
||||
|
@ -168,8 +169,9 @@ export const defaultConfig =(team,per)=>
|
|||
val: 2,
|
||||
},
|
||||
],
|
||||
rules: [{ required: true, message: "请输入退役军人" }],
|
||||
rules: [{ required: true, message: "是否退役军人不能为空" }],
|
||||
},
|
||||
|
||||
{
|
||||
type: FormType.textarea,
|
||||
label: "描述",
|
||||
|
|
|
@ -15,6 +15,8 @@ const WhseMgmt = (props: Store) => {
|
|||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
const formRef = React.useRef<FormInstance>(null);
|
||||
const [record, setRecord] = useState<any>(null);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
stashStore.getlist();
|
||||
setProjectConfig(defaultConfig);
|
||||
|
@ -25,7 +27,7 @@ const WhseMgmt = (props: Store) => {
|
|||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
onClick={() => {
|
||||
nav("/admin/whse/storage/" + record.identity);
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -20,6 +20,8 @@ import PoverPage from "@/pages/poverPage";
|
|||
import PoverDetail from "@/pages/poverDetail";
|
||||
import SystemPage from "@/pages/system";
|
||||
import OrgChart from "@/pages/OrgChart";
|
||||
import ArchiveBox from "@/pages/archives/index_box";
|
||||
import FileListPage from "@/pages/archives/file_list";
|
||||
export const homeRouter = [
|
||||
{
|
||||
path: "/",
|
||||
|
@ -67,8 +69,20 @@ export const homeRouter = [
|
|||
},
|
||||
{
|
||||
path: "/admin/archives",
|
||||
index: true,
|
||||
// index: true,
|
||||
element: <Archives />,
|
||||
children: [
|
||||
{
|
||||
path: "/admin/archives/box",
|
||||
index: true,
|
||||
element: <ArchiveBox />,
|
||||
},
|
||||
{
|
||||
path: "/admin/archives/folder/:id",
|
||||
index: true,
|
||||
element: <FileListPage />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/admin/leaveApproval",
|
||||
|
@ -118,7 +132,7 @@ export const homeRouter = [
|
|||
{
|
||||
path: "/admin/whse",
|
||||
element: <WhseMgmtRoute />,
|
||||
children:[
|
||||
children: [
|
||||
{
|
||||
path: "/admin/whse/whseMgmt",
|
||||
index: true,
|
||||
|
@ -129,18 +143,18 @@ export const homeRouter = [
|
|||
index: true,
|
||||
element: <Storage />,
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/admin/sys",
|
||||
element: <WhseMgmtRoute />,
|
||||
children:[
|
||||
children: [
|
||||
{
|
||||
path: "/admin/sys/setting",
|
||||
index: true,
|
||||
element: <SystemPage />,
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 180 KiB |
|
@ -1,7 +1,8 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import { action, makeObservable } from "mobx";
|
||||
// 档案
|
||||
import BaseStore from "./baseStore";
|
||||
import { TagDataType } from "@/model/userModel";
|
||||
import baseHttp from "@/service/base";
|
||||
|
||||
class ArchivesConfig {
|
||||
static LIST: string = "archives/list"
|
||||
|
@ -12,7 +13,13 @@ class ArchivesConfig {
|
|||
class ArchivesStore extends BaseStore<TagDataType> {
|
||||
constructor() {
|
||||
super(ArchivesConfig)
|
||||
makeObservable(this, {})
|
||||
makeObservable(this, {
|
||||
save: action
|
||||
})
|
||||
}
|
||||
|
||||
async save(id: string, list: Array<any>) {
|
||||
return await baseHttp.post(ArchivesConfig.ADD +"/"+ id, {"list":list});
|
||||
}
|
||||
}
|
||||
export const archivesStore = new ArchivesStore()
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import { makeObservable } from "mobx";
|
||||
// 档案分类
|
||||
import BaseStore from "./baseStore";
|
||||
import { TagDataType } from "@/model/userModel";
|
||||
|
||||
|
||||
class ArchivesCategoryConfig {
|
||||
static LIST: string = "archives/category/list"
|
||||
static ADD: string = "archives/category"
|
||||
|
@ -13,7 +11,6 @@ class ArchivesCategoryConfig {
|
|||
class ArchivesCategoryStore extends BaseStore<TagDataType> {
|
||||
constructor() {
|
||||
super(ArchivesCategoryConfig)
|
||||
makeObservable(this, {})
|
||||
}
|
||||
}
|
||||
export const acStore = new ArchivesCategoryStore()
|
||||
|
|
|
@ -17,6 +17,7 @@ class FolderStore extends BaseStore<TagDataType> {
|
|||
super(FolderConfig)
|
||||
makeObservable(this, {
|
||||
getAlist: action,
|
||||
getFolderList: action,
|
||||
alist: observable,
|
||||
})
|
||||
}
|
||||
|
@ -25,6 +26,9 @@ class FolderStore extends BaseStore<TagDataType> {
|
|||
let res = await baseHttp.get(FolderConfig.AList+"/"+idl, {});
|
||||
this.alist = res.data?.record;
|
||||
}
|
||||
async getFolderList(idl?: string) {
|
||||
return await baseHttp.get(FolderConfig.LIST+"/"+idl, {});
|
||||
}
|
||||
alist!: Array<any>;
|
||||
}
|
||||
const folderStore = new FolderStore()
|
||||
|
|
|
@ -12,6 +12,7 @@ class TrainingConfig {
|
|||
static ACCESS: string = "training/accept"
|
||||
static tran_user: string = "training/user"
|
||||
static addScores: string = "scoreMgmt/scores"
|
||||
static addAchives: string = "training/archives"
|
||||
|
||||
}
|
||||
class TrainingStore extends BaseStore<TagDataType> {
|
||||
|
@ -36,6 +37,10 @@ class TrainingStore extends BaseStore<TagDataType> {
|
|||
await baseHttp.put(TrainingConfig.ACCESS + "/" + id, param)
|
||||
this.getlist()
|
||||
}
|
||||
// 添加档案到培训
|
||||
async addAcieves(param: any) {
|
||||
return await baseHttp.post(TrainingConfig.addAchives, param)
|
||||
}
|
||||
async getUserListByTraning() {
|
||||
let res = await baseHttp.get(TrainingConfig.tran_user + "/" + this.id, null)
|
||||
let data: Array<any> = []
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
class Config {
|
||||
static baseUrl = "https://rw.quwanya.cn/";
|
||||
static uploadUrl = "https://rw.quwanya.cn/";
|
||||
static ws = "wss://rw.quwanya.cn/ws";
|
||||
// static baseUrl = "https://rw.quwanya.cn/";
|
||||
// static uploadUrl = "https://rw.quwanya.cn/";
|
||||
// static ws = "wss://rw.quwanya.cn/ws";
|
||||
|
||||
// static ws = "wss://rw.quwanya.cn/ws?id=admin";
|
||||
// static baseUrl = "http://127.0.0.1:12214/";
|
||||
// static uploadUrl = "http://127.0.0.1:12214/";
|
||||
// static ws = "ws://rw.quwanya.cn/ws";
|
||||
static baseUrl = "http://127.0.0.1:12214/";
|
||||
static uploadUrl = "http://127.0.0.1:12214/";
|
||||
static ws = "wss://rw.quwanya.cn/ws";
|
||||
|
||||
}
|
||||
export default Config;
|
||||
|
|
Loading…
Reference in New Issue