|
@@ -1,13 +1,13 @@
|
|
/*
|
|
/*
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2022-01-13 15:22:48
|
|
* @Date: 2022-01-13 15:22:48
|
|
- * @LastEditTime: 2022-07-28 16:17:38
|
|
|
|
|
|
+ * @LastEditTime: 2023-03-10 14:59:09
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/hospManage/index.tsx
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/hospManage/index.tsx
|
|
*/
|
|
*/
|
|
|
|
|
|
-import { FC } from 'react';
|
|
|
|
|
|
+import { FC, useState } from 'react';
|
|
import { hospManageModelState, ConnectProps, Loading, connect } from 'umi';
|
|
import { hospManageModelState, ConnectProps, Loading, connect } from 'umi';
|
|
import { Button, Divider, Popconfirm } from 'antd';
|
|
import { Button, Divider, Popconfirm } from 'antd';
|
|
import KCTable from '@/components/kcTable';
|
|
import KCTable from '@/components/kcTable';
|
|
@@ -18,6 +18,7 @@ import ActModal from './modals/modal';
|
|
import './style.less';
|
|
import './style.less';
|
|
import { TableListItem } from './typings';
|
|
import { TableListItem } from './typings';
|
|
import { getSpacifyHospMenu } from '@/service/menu';
|
|
import { getSpacifyHospMenu } from '@/service/menu';
|
|
|
|
+import { KCInput } from '@/components/KCInput';
|
|
|
|
|
|
export enum TableActType {
|
|
export enum TableActType {
|
|
NOACT,
|
|
NOACT,
|
|
@@ -36,6 +37,9 @@ interface PageProps extends ConnectProps {
|
|
const HospManage: FC<PageProps> = ({ hospManageModel: state, dispatch }) => {
|
|
const HospManage: FC<PageProps> = ({ hospManageModel: state, dispatch }) => {
|
|
const { reloadTable } = state;
|
|
const { reloadTable } = state;
|
|
|
|
|
|
|
|
+ const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
|
|
|
|
+ const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
|
|
|
|
+
|
|
const columns: ProColumns<TableListItem>[] = [
|
|
const columns: ProColumns<TableListItem>[] = [
|
|
{
|
|
{
|
|
title: 'ID',
|
|
title: 'ID',
|
|
@@ -223,23 +227,52 @@ const HospManage: FC<PageProps> = ({ hospManageModel: state, dispatch }) => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- const initHospData = async (record: TableListItem)=>{
|
|
|
|
- const resp = await hospInit(record.id);
|
|
|
|
|
|
+ const initHospData = async (record: TableListItem) => {
|
|
|
|
+ const resp = await hospInit(record.id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const tableDataSearchHandle = (paramName: string) => {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ set_tableDataFilterParams({
|
|
|
|
+ ...tableDataFilterParams,
|
|
|
|
+ [`${paramName}`]: tableDataSearchKeywords
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div className="HospManage">
|
|
<div className="HospManage">
|
|
<ActModal {...state} dispatch={dispatch} />
|
|
<ActModal {...state} dispatch={dispatch} />
|
|
|
|
+ <div className='toolBar'>
|
|
|
|
+ <div className='filter'>
|
|
|
|
+ <div className='filterItem'>
|
|
|
|
+ <span className='label'>检索:</span>
|
|
|
|
+ <KCInput placeholder={'请输入参数名称'} style={{ width: 160 }} search allowClear
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ set_tableDataSearchKeywords(e.target.value);
|
|
|
|
+ if (e.target.value.length == 0) {
|
|
|
|
+ set_tableDataFilterParams({
|
|
|
|
+ ...tableDataFilterParams,
|
|
|
|
+ hospName: ''
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }}
|
|
|
|
+ onSearch={() => tableDataSearchHandle('hospName')}
|
|
|
|
+
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div className='btnGroup'>
|
|
|
|
+ <span className='add' onClick={addHandle}>新增</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<KCTable
|
|
<KCTable
|
|
|
|
+ newVer
|
|
rowKey="id"
|
|
rowKey="id"
|
|
- headerTitle="查询表格"
|
|
|
|
columns={columns}
|
|
columns={columns}
|
|
reload={reloadTable}
|
|
reload={reloadTable}
|
|
- toolBarRender={() => [
|
|
|
|
- <Button key="3" type="primary" onClick={addHandle}>
|
|
|
|
- 新增院区
|
|
|
|
- </Button>,
|
|
|
|
- ]}
|
|
|
|
|
|
+ options={false}
|
|
|
|
+ params={tableDataFilterParams}
|
|
request={(params) => getHospData(params)}
|
|
request={(params) => getHospData(params)}
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|