|
@@ -2,7 +2,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2023-03-03 11:30:33
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-03-09 15:55:52
|
|
|
+ * @LastEditTime: 2023-03-09 17:11:35
|
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -19,7 +19,7 @@ import { ProColumns } from '@ant-design/pro-table';
|
|
|
import { message, Popconfirm } from 'antd';
|
|
|
import FormItem from 'antd/lib/form/FormItem';
|
|
|
import { useEffect, useState } from 'react'
|
|
|
-import { addData, delData, editData, getData, getDepartmentType, importDepartmentData } from './service';
|
|
|
+import { addData, delData, editData, getData, getDepartmentType, getRelaHosp, importDepartmentData } from './service';
|
|
|
|
|
|
import './style.less';
|
|
|
|
|
@@ -102,7 +102,7 @@ export default function DepartmentMana() {
|
|
|
}
|
|
|
|
|
|
const delTableData = async (record: any) => {
|
|
|
- const resp = await delData(record.dictId);
|
|
|
+ const resp = await delData(record.id);
|
|
|
if (resp) {
|
|
|
set_reload(true);
|
|
|
// message.success('操作成功!');
|
|
@@ -169,10 +169,10 @@ export default function DepartmentMana() {
|
|
|
placeholder="请选择院区"
|
|
|
rules={[{ required: true, message: '院区不能为空!' }]}
|
|
|
request={async () => {
|
|
|
- const resp = await getAllHosp({ pageSize: 200, current: 1 });
|
|
|
+ const resp = await getRelaHosp();
|
|
|
if (resp) {
|
|
|
- const data: any = resp.list?.map((a) => ({
|
|
|
- label: a.hospName,
|
|
|
+ const data: any = resp?.map((a:any) => ({
|
|
|
+ label: a.name,
|
|
|
value: a.id
|
|
|
}));
|
|
|
|
|
@@ -218,7 +218,7 @@ export default function DepartmentMana() {
|
|
|
<span key="3">导入</span>
|
|
|
}
|
|
|
onFinish={async (values) => {
|
|
|
- console.log({values});
|
|
|
+
|
|
|
const { importFile: { fileList } } = values;
|
|
|
|
|
|
let formData = new FormData();
|
|
@@ -263,23 +263,7 @@ export default function DepartmentMana() {
|
|
|
<div className='toolBar'>
|
|
|
<div className='filter'>
|
|
|
<div className='filterItem' style={{ marginRight: 16 }}>
|
|
|
- <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,
|
|
|
- departName: ''
|
|
|
- });
|
|
|
- }
|
|
|
- }}
|
|
|
- onSearch={() => tableDataSearchHandle('departName')}
|
|
|
-
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div className='filterItem'>
|
|
|
- <span className='label'>科室:</span>
|
|
|
+ <span className='label'>类型:</span>
|
|
|
{
|
|
|
types.length > 0 && (
|
|
|
<ProFormSelect
|
|
@@ -312,6 +296,22 @@ export default function DepartmentMana() {
|
|
|
)
|
|
|
}
|
|
|
</div>
|
|
|
+ <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,
|
|
|
+ departName: ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ onSearch={() => tableDataSearchHandle('departName')}
|
|
|
+
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div className='btnGroup'>
|
|
|
{importData('科室')}
|