|
@@ -1,7 +1,16 @@
|
|
import React, { Fragment, useState, useEffect, useMemo, useRef } from 'react';
|
|
import React, { Fragment, useState, useEffect, useMemo, useRef } from 'react';
|
|
import { useNavigate } from 'umi';
|
|
import { useNavigate } from 'umi';
|
|
-import { Table, Modal, DatePicker, Divider } from 'antd';
|
|
|
|
-import { useRequest } from '@umijs/max';
|
|
|
|
|
|
+import {
|
|
|
|
+ Table,
|
|
|
|
+ Modal,
|
|
|
|
+ DatePicker,
|
|
|
|
+ Divider,
|
|
|
|
+ Input,
|
|
|
|
+ Space,
|
|
|
|
+ Button,
|
|
|
|
+ Select,
|
|
|
|
+} from 'antd';
|
|
|
|
+import { useModel, useRequest } from '@umijs/max';
|
|
import { queryProfileList, queryApplyList, applyRepeal } from '@/services/boom';
|
|
import { queryProfileList, queryApplyList, applyRepeal } from '@/services/boom';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
import PageContent from '@/components/PageContent';
|
|
import PageContent from '@/components/PageContent';
|
|
@@ -14,9 +23,11 @@ export const Type = {
|
|
};
|
|
};
|
|
|
|
|
|
function profile(props) {
|
|
function profile(props) {
|
|
|
|
+ const { userList, run } = useModel('userList');
|
|
const [tabActive, setTabActive] = useState('1');
|
|
const [tabActive, setTabActive] = useState('1');
|
|
const [loading, setLoading] = useState(false);
|
|
const [loading, setLoading] = useState(false);
|
|
const [columns, setColumes] = useState([]);
|
|
const [columns, setColumes] = useState([]);
|
|
|
|
+ const [name, setName] = useState('');
|
|
const [data, setData] = useState({
|
|
const [data, setData] = useState({
|
|
list: [],
|
|
list: [],
|
|
pagination: {},
|
|
pagination: {},
|
|
@@ -183,6 +194,7 @@ function profile(props) {
|
|
|
|
|
|
const handlerTabChange = (tab) => {
|
|
const handlerTabChange = (tab) => {
|
|
setLoading(true);
|
|
setLoading(true);
|
|
|
|
+ if (name) setName('');
|
|
switch (tab) {
|
|
switch (tab) {
|
|
case '1':
|
|
case '1':
|
|
setColumes(columnsApplay);
|
|
setColumes(columnsApplay);
|
|
@@ -200,6 +212,7 @@ function profile(props) {
|
|
};
|
|
};
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
+ run();
|
|
handlerTabChange('1');
|
|
handlerTabChange('1');
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
@@ -251,6 +264,35 @@ function profile(props) {
|
|
]}
|
|
]}
|
|
onTabChange={setTabActive}
|
|
onTabChange={setTabActive}
|
|
>
|
|
>
|
|
|
|
+ {tabActive == '2' && (
|
|
|
|
+ <Space style={{ marginBottom: '10px' }}>
|
|
|
|
+ <Select
|
|
|
|
+ value={name}
|
|
|
|
+ style={{ width: 300 }}
|
|
|
|
+ allowClear
|
|
|
|
+ showSearch
|
|
|
|
+ placeholder="发起人"
|
|
|
|
+ options={userList?.map((item) => {
|
|
|
|
+ return { value: item.ID, label: item.CName };
|
|
|
|
+ })}
|
|
|
|
+ onChange={(value) => setName(value)}
|
|
|
|
+ filterOption={(input, option) =>
|
|
|
|
+ (option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
|
|
+ }
|
|
|
|
+ />
|
|
|
|
+ <Button
|
|
|
|
+ type="primary"
|
|
|
|
+ onClick={() =>
|
|
|
|
+ queryApprove({
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ initiator: name,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ >
|
|
|
|
+ 查询
|
|
|
|
+ </Button>
|
|
|
|
+ </Space>
|
|
|
|
+ )}
|
|
<Table
|
|
<Table
|
|
columns={columns}
|
|
columns={columns}
|
|
dataSource={data?.list}
|
|
dataSource={data?.list}
|