代办列表
parent
b99e0542f4
commit
d639e428c1
|
|
@ -31,7 +31,7 @@
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"zy-react-library": "^1.1.47"
|
"zy-react-library": "^1.2.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const todoList = declareRequest(
|
||||||
|
"todoListLoading",
|
||||||
|
`Post > @/appmenu/todoList`,
|
||||||
|
);
|
||||||
|
|
@ -9,3 +9,4 @@ export const NS_APP_MENU = defineNamespace("appMenu");
|
||||||
export const NS_NOTICE = defineNamespace("Notice");
|
export const NS_NOTICE = defineNamespace("Notice");
|
||||||
export const NS_NoticeReadRecord = defineNamespace("NoticeReadRecord");
|
export const NS_NoticeReadRecord = defineNamespace("NoticeReadRecord");
|
||||||
export const NS_CORPINFO = defineNamespace("corpInfo");
|
export const NS_CORPINFO = defineNamespace("corpInfo");
|
||||||
|
export const NS_TODO_LIST = defineNamespace("toDoList");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import Page from "zy-react-library/components/Page";
|
||||||
|
import Search from "zy-react-library/components/Search";
|
||||||
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||||
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { NS_TODO_LIST } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
const STATUS_ENUM = [
|
||||||
|
{ bianma: "1", name: "未处理" },
|
||||||
|
{ bianma: "2", name: "已处理" },
|
||||||
|
];
|
||||||
|
function TodoList(props) {
|
||||||
|
const [form] = Search.useForm();
|
||||||
|
const { getUserInfo } = useGetUserInfo();
|
||||||
|
|
||||||
|
const [userInfo, setUserInfo] = useState({});
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["todoList"], {
|
||||||
|
form,
|
||||||
|
params: { eqPcFlag: 1 },
|
||||||
|
transform: formData => ({
|
||||||
|
leCreateTime: formData.createTime?.[0],
|
||||||
|
geCreateTime: formData.createTime?.[1],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
(async () => {
|
||||||
|
const userInfo = await getUserInfo();
|
||||||
|
setUserInfo(userInfo);
|
||||||
|
})();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page isShowAllAction={false}>
|
||||||
|
<Search
|
||||||
|
options={[
|
||||||
|
{ name: "eqAppName", label: "来源", render: (<DictionarySelect dictValue="sys_app_name" />) },
|
||||||
|
{ name: "createTime", label: "接收时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||||
|
{ name: "eqStatus", label: "状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM },
|
||||||
|
]}
|
||||||
|
form={form}
|
||||||
|
onFinish={getData}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
columns={[
|
||||||
|
{ title: "来源", dataIndex: "appName" },
|
||||||
|
{ title: "标题", dataIndex: "title" },
|
||||||
|
{ title: "接收时间", dataIndex: "createTime" },
|
||||||
|
{ title: "处理人", dataIndex: "name", render: () => userInfo.name },
|
||||||
|
{ title: "状态", dataIndex: "content" },
|
||||||
|
{ title: "状处理态", dataIndex: "status", render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }) },
|
||||||
|
]}
|
||||||
|
{...tableProps}
|
||||||
|
/>
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_TODO_LIST], true)(TodoList);
|
||||||
Loading…
Reference in New Issue