|
@@ -9,16 +9,32 @@
|
|
|
|
|
|
|
|
import React, { useEffect, useRef, useState } from 'react';
|
|
import React, { useEffect, useRef, useState } from 'react';
|
|
|
import { Drawer, Cascader, Button, Form, Transfer } from 'antd';
|
|
import { Drawer, Cascader, Button, Form, Transfer } from 'antd';
|
|
|
-import ProForm, { ModalForm, ProFormCascader, ProFormDependency, ProFormDigit, ProFormInstance, ProFormRadio, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
|
|
|
|
|
|
|
+import ProForm, {
|
|
|
|
|
+ ModalForm,
|
|
|
|
|
+ ProFormCascader,
|
|
|
|
|
+ ProFormDependency,
|
|
|
|
|
+ ProFormDigit,
|
|
|
|
|
+ ProFormInstance,
|
|
|
|
|
+ ProFormRadio,
|
|
|
|
|
+ ProFormSelect,
|
|
|
|
|
+ ProFormText,
|
|
|
|
|
+ ProFormTextArea,
|
|
|
|
|
+} from '@ant-design/pro-form';
|
|
|
|
|
|
|
|
import './style.less';
|
|
import './style.less';
|
|
|
import { getIndicatorDictionary, IndicatorDictionaryDataType } from '@/service/dictionary';
|
|
import { getIndicatorDictionary, IndicatorDictionaryDataType } from '@/service/dictionary';
|
|
|
import { DefaultOptionType } from 'antd/lib/select';
|
|
import { DefaultOptionType } from 'antd/lib/select';
|
|
|
import { getHospDepartment } from '@/service/department';
|
|
import { getHospDepartment } from '@/service/department';
|
|
|
import { getUsers } from '@/service/user';
|
|
import { getUsers } from '@/service/user';
|
|
|
|
|
+import { getCurrentHospAllEmps } from '@/service/hospList';
|
|
|
import { addIndicatorManaList, getTransferDataReq } from '@/service/indicator';
|
|
import { addIndicatorManaList, getTransferDataReq } from '@/service/indicator';
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
|
-import { DATAFILL_DIMENSIONTYPE, DATAFILL_MAINTYPE, DATAFILL_PERIODTYPE, transformToLabelValue } from '../../dataFilling/fillingMana';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ DATAFILL_DIMENSIONTYPE,
|
|
|
|
|
+ DATAFILL_MAINTYPE,
|
|
|
|
|
+ DATAFILL_PERIODTYPE,
|
|
|
|
|
+ transformToLabelValue,
|
|
|
|
|
+} from '../../dataFilling/fillingMana';
|
|
|
import { addData, getCurrentHospAlldeps } from '../../dataFilling/fillingMana/service';
|
|
import { addData, getCurrentHospAlldeps } from '../../dataFilling/fillingMana/service';
|
|
|
import { useHistory } from 'umi';
|
|
import { useHistory } from 'umi';
|
|
|
|
|
|
|
@@ -35,6 +51,11 @@ const IconFont = createFromIconfontCN({
|
|
|
scriptUrl: '',
|
|
scriptUrl: '',
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+// 定义静态缓存,避免每次打开弹框都重新请求大数据量接口
|
|
|
|
|
+let userCache: DefaultOptionType[] | null = null;
|
|
|
|
|
+let deptCache: DefaultOptionType[] | null = null;
|
|
|
|
|
+let allDeptCache: DefaultOptionType[] | null = null;
|
|
|
|
|
+
|
|
|
const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
const { visible = false, onChange, onFinish, record, onVisibleChange, actType } = props;
|
|
const { visible = false, onChange, onFinish, record, onVisibleChange, actType } = props;
|
|
|
const [renderType, set_renderType] = useState<'ADD' | 'EDIT' | 'DATAMANA'>('ADD');
|
|
const [renderType, set_renderType] = useState<'ADD' | 'EDIT' | 'DATAMANA'>('ADD');
|
|
@@ -48,7 +69,10 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
const [transferDataSource, set_transferDataSource] = useState<any[]>([]);
|
|
const [transferDataSource, set_transferDataSource] = useState<any[]>([]);
|
|
|
const [selectedKeys, set_selectedKeys] = useState<string[]>([]);
|
|
const [selectedKeys, set_selectedKeys] = useState<string[]>([]);
|
|
|
const history: any = useHistory();
|
|
const history: any = useHistory();
|
|
|
- const { indicatorType: indicatorUrlType, id: indicatorId }: { id: string; indicatorType: string } = history.location.query;
|
|
|
|
|
|
|
+ const {
|
|
|
|
|
+ indicatorType: indicatorUrlType,
|
|
|
|
|
+ id: indicatorId,
|
|
|
|
|
+ }: { id: string; indicatorType: string } = history.location.query;
|
|
|
|
|
|
|
|
const commitHandle = () => {
|
|
const commitHandle = () => {
|
|
|
if (actType == 'DATAMANA') {
|
|
if (actType == 'DATAMANA') {
|
|
@@ -61,7 +85,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
if (actType != 'DATAMANA') {
|
|
if (actType != 'DATAMANA') {
|
|
|
let commitData: any[] = [];
|
|
let commitData: any[] = [];
|
|
|
if (baseInfoformRef.current && baseInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
if (baseInfoformRef.current && baseInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
|
- baseInfoformRef.current?.validateFieldsReturnFormatValue().then((val) => {
|
|
|
|
|
|
|
+ baseInfoformRef.current?.validateFieldsReturnFormatValue().then(val => {
|
|
|
commitData.push({
|
|
commitData.push({
|
|
|
baseInfoformRef: val,
|
|
baseInfoformRef: val,
|
|
|
});
|
|
});
|
|
@@ -69,27 +93,40 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (manaInfoformRef.current && manaInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
if (manaInfoformRef.current && manaInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
|
- manaInfoformRef.current?.validateFieldsReturnFormatValue().then((val) => {
|
|
|
|
|
|
|
+ manaInfoformRef.current?.validateFieldsReturnFormatValue().then(val => {
|
|
|
console.log('manaInfoformRef', val);
|
|
console.log('manaInfoformRef', val);
|
|
|
//_indicatorTypeList
|
|
//_indicatorTypeList
|
|
|
// manaInfoformRef.current?.getFieldsValue();
|
|
// manaInfoformRef.current?.getFieldsValue();
|
|
|
// console.log('w',manaInfoformRef.current?.getFieldValue('_indicatorTypeList'))
|
|
// console.log('w',manaInfoformRef.current?.getFieldValue('_indicatorTypeList'))
|
|
|
const _indicatorTypeLists = manaInfoformRef.current?.getFieldValue('_indicatorTypeList');
|
|
const _indicatorTypeLists = manaInfoformRef.current?.getFieldValue('_indicatorTypeList');
|
|
|
- const _indicatorExternalList = manaInfoformRef.current?.getFieldValue('_indicatorExternalList');
|
|
|
|
|
|
|
+ const _indicatorExternalList = manaInfoformRef.current?.getFieldValue(
|
|
|
|
|
+ '_indicatorExternalList'
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
// console.log({_indicatorTypeLists,_indicatorExternalList});
|
|
// console.log({_indicatorTypeLists,_indicatorExternalList});
|
|
|
|
|
|
|
|
commitData.push({
|
|
commitData.push({
|
|
|
manaInfoformRef: {
|
|
manaInfoformRef: {
|
|
|
...val,
|
|
...val,
|
|
|
- indicatorTypeList: _indicatorTypeLists ? _indicatorTypeLists : val.indicatorTypeList ? val.indicatorTypeList.map((t: any) => t[t.length - 1]) : [],
|
|
|
|
|
- indicatorExternalList: _indicatorExternalList ? _indicatorExternalList : val.indicatorExternalList ? val.indicatorExternalList.map((t: any) => t[t.length - 1]) : [],
|
|
|
|
|
|
|
+ indicatorTypeList: _indicatorTypeLists
|
|
|
|
|
+ ? _indicatorTypeLists
|
|
|
|
|
+ : val.indicatorTypeList
|
|
|
|
|
+ ? val.indicatorTypeList.map((t: any) => t[t.length - 1])
|
|
|
|
|
+ : [],
|
|
|
|
|
+ indicatorExternalList: _indicatorExternalList
|
|
|
|
|
+ ? _indicatorExternalList
|
|
|
|
|
+ : val.indicatorExternalList
|
|
|
|
|
+ ? val.indicatorExternalList.map((t: any) => t[t.length - 1])
|
|
|
|
|
+ : [],
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- if (showSetInfoformRef.current && showSetInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
|
|
|
- showSetInfoformRef.current?.validateFieldsReturnFormatValue().then((val) => {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ showSetInfoformRef.current &&
|
|
|
|
|
+ showSetInfoformRef.current.validateFieldsReturnFormatValue
|
|
|
|
|
+ ) {
|
|
|
|
|
+ showSetInfoformRef.current?.validateFieldsReturnFormatValue().then(val => {
|
|
|
// console.log('showSetInfoformRef',val);
|
|
// console.log('showSetInfoformRef',val);
|
|
|
commitData.push({
|
|
commitData.push({
|
|
|
showSetInfoformRef: val,
|
|
showSetInfoformRef: val,
|
|
@@ -97,13 +134,17 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (adminInfoformRef.current && adminInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
if (adminInfoformRef.current && adminInfoformRef.current.validateFieldsReturnFormatValue) {
|
|
|
- adminInfoformRef.current?.validateFieldsReturnFormatValue().then((val) => {
|
|
|
|
|
|
|
+ adminInfoformRef.current?.validateFieldsReturnFormatValue().then(val => {
|
|
|
const _indicatorMenuList = adminInfoformRef.current?.getFieldValue('_indicatorMenuList');
|
|
const _indicatorMenuList = adminInfoformRef.current?.getFieldValue('_indicatorMenuList');
|
|
|
if (val.indicatorMenuList) {
|
|
if (val.indicatorMenuList) {
|
|
|
commitData.push({
|
|
commitData.push({
|
|
|
adminInfoformRef: {
|
|
adminInfoformRef: {
|
|
|
...val,
|
|
...val,
|
|
|
- indicatorMenuList: _indicatorMenuList ? _indicatorMenuList : val.indicatorMenuList ? val.indicatorMenuList.map((t: any) => t[t.length - 1]) : [],
|
|
|
|
|
|
|
+ indicatorMenuList: _indicatorMenuList
|
|
|
|
|
+ ? _indicatorMenuList
|
|
|
|
|
+ : val.indicatorMenuList
|
|
|
|
|
+ ? val.indicatorMenuList.map((t: any) => t[t.length - 1])
|
|
|
|
|
+ : [],
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -111,8 +152,10 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- const hasBaseInfoformRef = commitData.some((item) => item.hasOwnProperty('baseInfoformRef'));
|
|
|
|
|
- const hasAdminInfoformRef = commitData.some((item) => item.hasOwnProperty('adminInfoformRef'));
|
|
|
|
|
|
|
+ const hasBaseInfoformRef = commitData.some(item => item.hasOwnProperty('baseInfoformRef'));
|
|
|
|
|
+ const hasAdminInfoformRef = commitData.some(item =>
|
|
|
|
|
+ item.hasOwnProperty('adminInfoformRef')
|
|
|
|
|
+ );
|
|
|
if (hasBaseInfoformRef && hasAdminInfoformRef) {
|
|
if (hasBaseInfoformRef && hasAdminInfoformRef) {
|
|
|
onFinish && onFinish(commitData);
|
|
onFinish && onFinish(commitData);
|
|
|
}
|
|
}
|
|
@@ -126,14 +169,14 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const getSelectorData = (code: string, type?: 'Cascader') => {
|
|
const getSelectorData = (code: string, type?: 'Cascader') => {
|
|
|
- const result = dirData.filter((t) => t.code == code);
|
|
|
|
|
|
|
+ const result = dirData.filter(t => t.code == code);
|
|
|
|
|
|
|
|
if (type == 'Cascader' && result.length > 0) {
|
|
if (type == 'Cascader' && result.length > 0) {
|
|
|
return result[0].children;
|
|
return result[0].children;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (result.length > 0) {
|
|
if (result.length > 0) {
|
|
|
- return result[0].children.map((t) => ({ label: t.name, value: t.code }));
|
|
|
|
|
|
|
+ return result[0].children.map(t => ({ label: t.name, value: t.code }));
|
|
|
}
|
|
}
|
|
|
return [];
|
|
return [];
|
|
|
};
|
|
};
|
|
@@ -150,9 +193,23 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
description: data.description,
|
|
description: data.description,
|
|
|
fillDeptList:
|
|
fillDeptList:
|
|
|
data.fillDeptList instanceof Array
|
|
data.fillDeptList instanceof Array
|
|
|
- ? data.fillDeptList.map((a: any) => ({ departmentCode: a.value, departmentName: a.label }))
|
|
|
|
|
- : [{ departmentCode: data.fillDeptList.value, departmentName: data.fillDeptList.label }],
|
|
|
|
|
- relateDeptList: data.type != 2 && data.dimensionType != 1 && data.relateDeptList ? data.relateDeptList.map((a: any) => ({ departmentCode: a.value, departmentName: a.label })) : [],
|
|
|
|
|
|
|
+ ? data.fillDeptList.map((a: any) => ({
|
|
|
|
|
+ departmentCode: a.value,
|
|
|
|
|
+ departmentName: a.label,
|
|
|
|
|
+ }))
|
|
|
|
|
+ : [
|
|
|
|
|
+ {
|
|
|
|
|
+ departmentCode: data.fillDeptList.value,
|
|
|
|
|
+ departmentName: data.fillDeptList.label,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ relateDeptList:
|
|
|
|
|
+ data.type != 2 && data.dimensionType != 1 && data.relateDeptList
|
|
|
|
|
+ ? data.relateDeptList.map((a: any) => ({
|
|
|
|
|
+ departmentCode: a.value,
|
|
|
|
|
+ departmentName: a.label,
|
|
|
|
|
+ }))
|
|
|
|
|
+ : [],
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
if (type == 'ADD') {
|
|
if (type == 'ADD') {
|
|
@@ -196,13 +253,21 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
type == 'EDIT'
|
|
type == 'EDIT'
|
|
|
? {
|
|
? {
|
|
|
...record,
|
|
...record,
|
|
|
- fillDeptList: record?.fillDeptList?.map((a: any) => ({ label: a.departmentName, value: Number(a.departmentCode) })) || [],
|
|
|
|
|
- relateDeptList: record?.relateDeptList?.map((a: any) => ({ label: a.departmentName, value: Number(a.departmentCode) })) || [],
|
|
|
|
|
|
|
+ fillDeptList:
|
|
|
|
|
+ record?.fillDeptList?.map((a: any) => ({
|
|
|
|
|
+ label: a.departmentName,
|
|
|
|
|
+ value: Number(a.departmentCode),
|
|
|
|
|
+ })) || [],
|
|
|
|
|
+ relateDeptList:
|
|
|
|
|
+ record?.relateDeptList?.map((a: any) => ({
|
|
|
|
|
+ label: a.departmentName,
|
|
|
|
|
+ value: Number(a.departmentCode),
|
|
|
|
|
+ })) || [],
|
|
|
}
|
|
}
|
|
|
: { periodType: 1, type: 1, dimensionType: 1 }
|
|
: { periodType: 1, type: 1, dimensionType: 1 }
|
|
|
}
|
|
}
|
|
|
trigger={type == 'EDIT' ? <a key="edit">编辑</a> : <span className="add">新增</span>}
|
|
trigger={type == 'EDIT' ? <a key="edit">编辑</a> : <span className="add">新增</span>}
|
|
|
- onFinish={(val) => {
|
|
|
|
|
|
|
+ onFinish={val => {
|
|
|
return updateTable(type == 'EDIT' ? { ...val } : { ...val }, type);
|
|
return updateTable(type == 'EDIT' ? { ...val } : { ...val }, type);
|
|
|
}}
|
|
}}
|
|
|
modalProps={{ destroyOnClose: true }}
|
|
modalProps={{ destroyOnClose: true }}
|
|
@@ -218,8 +283,19 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
// disabled={type == 'EDIT'}
|
|
// disabled={type == 'EDIT'}
|
|
|
rules={[{ required: true, message: '填报项目不能为空!' }]}
|
|
rules={[{ required: true, message: '填报项目不能为空!' }]}
|
|
|
/>
|
|
/>
|
|
|
- <ProFormText name="code" label="填报编码:" hidden={type == 'ADD'} disabled={type == 'EDIT'} />
|
|
|
|
|
- <ProFormRadio.Group label="填报周期:" name="periodType" disabled={type == 'EDIT' && record.limitFlag} options={DATAFILL_PERIODTYPE} rules={[{ required: true }]} />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ name="code"
|
|
|
|
|
+ label="填报编码:"
|
|
|
|
|
+ hidden={type == 'ADD'}
|
|
|
|
|
+ disabled={type == 'EDIT'}
|
|
|
|
|
+ />
|
|
|
|
|
+ <ProFormRadio.Group
|
|
|
|
|
+ label="填报周期:"
|
|
|
|
|
+ name="periodType"
|
|
|
|
|
+ disabled={type == 'EDIT' && record.limitFlag}
|
|
|
|
|
+ options={DATAFILL_PERIODTYPE}
|
|
|
|
|
+ rules={[{ required: true }]}
|
|
|
|
|
+ />
|
|
|
<ProFormRadio.Group
|
|
<ProFormRadio.Group
|
|
|
label="填报主体类型:"
|
|
label="填报主体类型:"
|
|
|
name="type"
|
|
name="type"
|
|
@@ -247,14 +323,23 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
labelInValue: true,
|
|
labelInValue: true,
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ optionFilterProp: 'label',
|
|
|
|
|
+ }
|
|
|
|
|
+ : {
|
|
|
|
|
+ labelInValue: true,
|
|
|
|
|
+ size: 'small',
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ optionFilterProp: 'label',
|
|
|
}
|
|
}
|
|
|
- : { labelInValue: true, size: 'small' }
|
|
|
|
|
}
|
|
}
|
|
|
rules={[{ required: true, message: '填报主体不能为空!' }]}
|
|
rules={[{ required: true, message: '填报主体不能为空!' }]}
|
|
|
request={async () => {
|
|
request={async () => {
|
|
|
|
|
+ if (allDeptCache) return allDeptCache;
|
|
|
const depLists = await getCurrentHospAlldeps();
|
|
const depLists = await getCurrentHospAlldeps();
|
|
|
if (depLists) {
|
|
if (depLists) {
|
|
|
- return transformToLabelValue(depLists);
|
|
|
|
|
|
|
+ allDeptCache = transformToLabelValue(depLists);
|
|
|
|
|
+ return allDeptCache;
|
|
|
}
|
|
}
|
|
|
return [];
|
|
return [];
|
|
|
}}
|
|
}}
|
|
@@ -262,7 +347,13 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
|
|
|
|
|
{type != 2 && (
|
|
{type != 2 && (
|
|
|
<>
|
|
<>
|
|
|
- <ProFormRadio.Group label="填报维度:" name="dimensionType" disabled={type == 'EDIT' && record.limitFlag} options={DATAFILL_DIMENSIONTYPE} rules={[{ required: true }]} />
|
|
|
|
|
|
|
+ <ProFormRadio.Group
|
|
|
|
|
+ label="填报维度:"
|
|
|
|
|
+ name="dimensionType"
|
|
|
|
|
+ disabled={type == 'EDIT' && record.limitFlag}
|
|
|
|
|
+ options={DATAFILL_DIMENSIONTYPE}
|
|
|
|
|
+ rules={[{ required: true }]}
|
|
|
|
|
+ />
|
|
|
<ProFormDependency name={['dimensionType']}>
|
|
<ProFormDependency name={['dimensionType']}>
|
|
|
{({ dimensionType }) => {
|
|
{({ dimensionType }) => {
|
|
|
return (
|
|
return (
|
|
@@ -276,12 +367,16 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
labelInValue: true,
|
|
labelInValue: true,
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ optionFilterProp: 'label',
|
|
|
}}
|
|
}}
|
|
|
rules={[{ required: true, message: '相关科室不能为空!' }]}
|
|
rules={[{ required: true, message: '相关科室不能为空!' }]}
|
|
|
request={async () => {
|
|
request={async () => {
|
|
|
|
|
+ if (allDeptCache) return allDeptCache;
|
|
|
const depLists = await getCurrentHospAlldeps();
|
|
const depLists = await getCurrentHospAlldeps();
|
|
|
if (depLists) {
|
|
if (depLists) {
|
|
|
- return transformToLabelValue(depLists);
|
|
|
|
|
|
|
+ allDeptCache = transformToLabelValue(depLists);
|
|
|
|
|
+ return allDeptCache;
|
|
|
}
|
|
}
|
|
|
return [];
|
|
return [];
|
|
|
}}
|
|
}}
|
|
@@ -297,7 +392,12 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}}
|
|
}}
|
|
|
</ProFormDependency>
|
|
</ProFormDependency>
|
|
|
|
|
|
|
|
- <ProFormText name="unit" label="填报值单位:" placeholder="请输入" rules={[{ required: true, message: '填报值单位不能为空!' }]} />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ name="unit"
|
|
|
|
|
+ label="填报值单位:"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ rules={[{ required: true, message: '填报值单位不能为空!' }]}
|
|
|
|
|
+ />
|
|
|
<ProFormTextArea
|
|
<ProFormTextArea
|
|
|
name="description"
|
|
name="description"
|
|
|
label="填报说明:"
|
|
label="填报说明:"
|
|
@@ -316,7 +416,9 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
const setFormInit = (key: string) => {
|
|
const setFormInit = (key: string) => {
|
|
|
if (key == 'indicatorTypeList') {
|
|
if (key == 'indicatorTypeList') {
|
|
|
if (record && record.indicatorTypeList) {
|
|
if (record && record.indicatorTypeList) {
|
|
|
- const indicatorTypeListVal = record.indicatorTypeList ? record.indicatorTypeList.map((t: string) => t.split('/')) : [];
|
|
|
|
|
|
|
+ const indicatorTypeListVal = record.indicatorTypeList
|
|
|
|
|
+ ? record.indicatorTypeList.map((t: string) => t.split('/'))
|
|
|
|
|
+ : [];
|
|
|
const _indicatorTypeList = indicatorTypeListVal.map((t: any) => t.slice(1, t.length));
|
|
const _indicatorTypeList = indicatorTypeListVal.map((t: any) => t.slice(1, t.length));
|
|
|
// console.log({indicatorTypeListVal,_indicatorTypeList})
|
|
// console.log({indicatorTypeListVal,_indicatorTypeList})
|
|
|
return _indicatorTypeList;
|
|
return _indicatorTypeList;
|
|
@@ -324,7 +426,9 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
if (key == 'indicatorMenuList') {
|
|
if (key == 'indicatorMenuList') {
|
|
|
if (record && record.indicatorMenuList) {
|
|
if (record && record.indicatorMenuList) {
|
|
|
- const a = record.indicatorMenuList ? record.indicatorMenuList.map((t: string) => t.split('/')) : [];
|
|
|
|
|
|
|
+ const a = record.indicatorMenuList
|
|
|
|
|
+ ? record.indicatorMenuList.map((t: string) => t.split('/'))
|
|
|
|
|
+ : [];
|
|
|
const b = a.map((t: any) => t.slice(1, t.length));
|
|
const b = a.map((t: any) => t.slice(1, t.length));
|
|
|
// console.log({a,b})
|
|
// console.log({a,b})
|
|
|
return b;
|
|
return b;
|
|
@@ -333,7 +437,9 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
|
|
|
|
|
if (key == 'indicatorExternalList') {
|
|
if (key == 'indicatorExternalList') {
|
|
|
if (record && record.indicatorExternalList) {
|
|
if (record && record.indicatorExternalList) {
|
|
|
- const a = record.indicatorExternalList ? record.indicatorExternalList.map((t: string) => t.split('/')) : [];
|
|
|
|
|
|
|
+ const a = record.indicatorExternalList
|
|
|
|
|
+ ? record.indicatorExternalList.map((t: string) => t.split('/'))
|
|
|
|
|
+ : [];
|
|
|
const b = a.map((t: any) => t.slice(1, t.length));
|
|
const b = a.map((t: any) => t.slice(1, t.length));
|
|
|
// console.log({a,b})
|
|
// console.log({a,b})
|
|
|
return b;
|
|
return b;
|
|
@@ -416,12 +522,12 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
className="DATAMANA_Transfer"
|
|
className="DATAMANA_Transfer"
|
|
|
dataSource={transferDataSource}
|
|
dataSource={transferDataSource}
|
|
|
selectedKeys={selectedKeys}
|
|
selectedKeys={selectedKeys}
|
|
|
- rowKey={(item) => item.code}
|
|
|
|
|
|
|
+ rowKey={item => item.code}
|
|
|
onSelectChange={(sourceSelectedKeys, targetSelectedKeys) => {
|
|
onSelectChange={(sourceSelectedKeys, targetSelectedKeys) => {
|
|
|
set_selectedKeys(sourceSelectedKeys);
|
|
set_selectedKeys(sourceSelectedKeys);
|
|
|
}}
|
|
}}
|
|
|
showSearch
|
|
showSearch
|
|
|
- render={(item) => `[${item.code}]${item.name}`}
|
|
|
|
|
|
|
+ render={item => `[${item.code}]${item.name}`}
|
|
|
listStyle={{
|
|
listStyle={{
|
|
|
width: '100%', // 左侧列表宽度为100%
|
|
width: '100%', // 左侧列表宽度为100%
|
|
|
height: `calc(100vh - 70px)`,
|
|
height: `calc(100vh - 70px)`,
|
|
@@ -447,9 +553,27 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
render: () => null,
|
|
render: () => null,
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
- <ProFormText colProps={{ md: 12, xl: 8 }} name="name" label="指标名称" placeholder="请输入" fieldProps={{}} rules={[{ required: true, message: '这是必填项' }]} />
|
|
|
|
|
- <ProFormText colProps={{ md: 12, xl: 8 }} name="code" label="指标编码" placeholder="请输入" rules={[{ required: true, message: '这是必填项' }]} />
|
|
|
|
|
- <ProFormText colProps={{ md: 12, xl: 8 }} name="nationalCode" label="国家编码" placeholder="请输入" />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ colProps={{ md: 12, xl: 8 }}
|
|
|
|
|
+ name="name"
|
|
|
|
|
+ label="指标名称"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ fieldProps={{}}
|
|
|
|
|
+ rules={[{ required: true, message: '这是必填项' }]}
|
|
|
|
|
+ />
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ colProps={{ md: 12, xl: 8 }}
|
|
|
|
|
+ name="code"
|
|
|
|
|
+ label="指标编码"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ rules={[{ required: true, message: '这是必填项' }]}
|
|
|
|
|
+ />
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ colProps={{ md: 12, xl: 8 }}
|
|
|
|
|
+ name="nationalCode"
|
|
|
|
|
+ label="国家编码"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ />
|
|
|
<ProFormTextArea
|
|
<ProFormTextArea
|
|
|
colProps={{ md: 12, xl: 16 }}
|
|
colProps={{ md: 12, xl: 16 }}
|
|
|
name="targetDefinition"
|
|
name="targetDefinition"
|
|
@@ -465,7 +589,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="dimension"
|
|
name="dimension"
|
|
|
label="指标维度"
|
|
label="指标维度"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '结构面',
|
|
label: '结构面',
|
|
@@ -506,7 +630,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="directionType"
|
|
name="directionType"
|
|
|
label="管理指向"
|
|
label="管理指向"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '正向',
|
|
label: '正向',
|
|
@@ -532,13 +656,33 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
|
<ProForm.Group colProps={{ md: 12, xl: 8 }}>
|
|
<ProForm.Group colProps={{ md: 12, xl: 8 }}>
|
|
|
- <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style={{
|
|
|
|
|
+ display: 'flex',
|
|
|
|
|
+ flexDirection: 'row',
|
|
|
|
|
+ justifyContent: 'center',
|
|
|
|
|
+ alignItems: 'center',
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
<div>
|
|
<div>
|
|
|
- <ProFormDigit label="指标区间" name="lowerLimit" min={0} max={10000} placeholder="最小值" fieldProps={{ precision: 3 }} />
|
|
|
|
|
|
|
+ <ProFormDigit
|
|
|
|
|
+ label="指标区间"
|
|
|
|
|
+ name="lowerLimit"
|
|
|
|
|
+ min={0}
|
|
|
|
|
+ max={10000}
|
|
|
|
|
+ placeholder="最小值"
|
|
|
|
|
+ fieldProps={{ precision: 3 }}
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
-
|
|
|
<div style={{ position: 'relative', top: 10 }}>
|
|
<div style={{ position: 'relative', top: 10 }}>
|
|
|
- <ProFormDigit name="upperLimit" min={0} max={10000} placeholder="最大值" fieldProps={{ precision: 3 }} />
|
|
|
|
|
|
|
+ <ProFormDigit
|
|
|
|
|
+ name="upperLimit"
|
|
|
|
|
+ min={0}
|
|
|
|
|
+ max={10000}
|
|
|
|
|
+ placeholder="最大值"
|
|
|
|
|
+ fieldProps={{ precision: 3 }}
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</ProForm.Group>
|
|
</ProForm.Group>
|
|
@@ -547,13 +691,16 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="unit"
|
|
name="unit"
|
|
|
label="单位"
|
|
label="单位"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
request={async () => {
|
|
request={async () => {
|
|
|
const dirData = await getIndicatorDictionary();
|
|
const dirData = await getIndicatorDictionary();
|
|
|
- const result = dirData.filter((t) => t.code == 'Department');
|
|
|
|
|
|
|
+ const result = dirData.filter(t => t.code == 'Department');
|
|
|
|
|
|
|
|
if (result.length > 0) {
|
|
if (result.length > 0) {
|
|
|
- return result[0].children.map((t) => ({ label: t.name, value: t.code }));
|
|
|
|
|
|
|
+ return result[0].children.map(t => ({
|
|
|
|
|
+ label: t.name,
|
|
|
|
|
+ value: t.code,
|
|
|
|
|
+ }));
|
|
|
}
|
|
}
|
|
|
return [];
|
|
return [];
|
|
|
}}
|
|
}}
|
|
@@ -564,20 +711,40 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
{({ unit }) => {
|
|
{({ unit }) => {
|
|
|
return unit == '173' || unit == '326' ? (
|
|
return unit == '173' || unit == '326' ? (
|
|
|
<ProForm.Group colProps={{ md: 12, xl: 24 }}>
|
|
<ProForm.Group colProps={{ md: 12, xl: 24 }}>
|
|
|
- <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style={{
|
|
|
|
|
+ display: 'flex',
|
|
|
|
|
+ flexDirection: 'row',
|
|
|
|
|
+ justifyContent: 'center',
|
|
|
|
|
+ alignItems: 'center',
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
<div>
|
|
<div>
|
|
|
- <ProFormText name="molecule" label="公式" width={437} placeholder="请输入分子" />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ name="molecule"
|
|
|
|
|
+ label="公式"
|
|
|
|
|
+ width={437}
|
|
|
|
|
+ placeholder="请输入分子"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
/
|
|
/
|
|
|
<div style={{ position: 'relative', top: 10 }}>
|
|
<div style={{ position: 'relative', top: 10 }}>
|
|
|
- <ProFormText width={437} name="denominator" placeholder="请输入分母" />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ width={437}
|
|
|
|
|
+ name="denominator"
|
|
|
|
|
+ placeholder="请输入分母"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
{unit == '173' ? `*100%` : `‰`}
|
|
{unit == '173' ? `*100%` : `‰`}
|
|
|
</div>
|
|
</div>
|
|
|
</ProForm.Group>
|
|
</ProForm.Group>
|
|
|
) : (
|
|
) : (
|
|
|
<ProForm.Group colProps={{ md: 12, xl: 24 }}>
|
|
<ProForm.Group colProps={{ md: 12, xl: 24 }}>
|
|
|
- <ProFormText name="molecule" label="公式" placeholder="请输入公式" />
|
|
|
|
|
|
|
+ <ProFormText
|
|
|
|
|
+ name="molecule"
|
|
|
|
|
+ label="公式"
|
|
|
|
|
+ placeholder="请输入公式"
|
|
|
|
|
+ />
|
|
|
</ProForm.Group>
|
|
</ProForm.Group>
|
|
|
);
|
|
);
|
|
|
}}
|
|
}}
|
|
@@ -587,7 +754,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="moleculeSourcType"
|
|
name="moleculeSourcType"
|
|
|
label="分子数据来源"
|
|
label="分子数据来源"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '定期填报',
|
|
label: '定期填报',
|
|
@@ -624,7 +791,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="denominatorSourceType"
|
|
name="denominatorSourceType"
|
|
|
label="分母数据来源"
|
|
label="分母数据来源"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '定期填报',
|
|
label: '定期填报',
|
|
@@ -697,10 +864,12 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="divisionId"
|
|
name="divisionId"
|
|
|
label="负责科室"
|
|
label="负责科室"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true, optionFilterProp: 'label' }}
|
|
|
request={async () => {
|
|
request={async () => {
|
|
|
|
|
+ if (deptCache) return deptCache;
|
|
|
const data = await getHospDepartment();
|
|
const data = await getHospDepartment();
|
|
|
- return data.map((t) => ({ label: t.name, value: t.code }));
|
|
|
|
|
|
|
+ deptCache = data.map(t => ({ label: t.name, value: t.code }));
|
|
|
|
|
+ return deptCache;
|
|
|
}}
|
|
}}
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
@@ -708,10 +877,23 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="principalId"
|
|
name="principalId"
|
|
|
label="负责人"
|
|
label="负责人"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{
|
|
|
|
|
+ size: 'small',
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ optionFilterProp: 'label',
|
|
|
|
|
+ }}
|
|
|
request={async () => {
|
|
request={async () => {
|
|
|
- const data = await getUsers({ pageSize: 1000, current: 1 });
|
|
|
|
|
- return data.list.map((t) => ({ label: t.name, value: t.userId }));
|
|
|
|
|
|
|
+ if (userCache) return userCache;
|
|
|
|
|
+ const resp = await getCurrentHospAllEmps();
|
|
|
|
|
+ if (resp) {
|
|
|
|
|
+ // 统一转换为 label/value 结构并缓存
|
|
|
|
|
+ userCache = resp.map((a: any) => ({
|
|
|
|
|
+ label: a.name,
|
|
|
|
|
+ value: a.userId || a.id, // 兼容不同接口的 ID 字段名
|
|
|
|
|
+ }));
|
|
|
|
|
+ return userCache;
|
|
|
|
|
+ }
|
|
|
|
|
+ return [];
|
|
|
}}
|
|
}}
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
@@ -734,6 +916,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
// mode: 'multiple',
|
|
// mode: 'multiple',
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
@@ -759,7 +942,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="analysisType"
|
|
name="analysisType"
|
|
|
label="分析方式"
|
|
label="分析方式"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '数值',
|
|
label: '数值',
|
|
@@ -800,6 +983,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
|
|
+ showSearch: true,
|
|
|
showCheckedStrategy: 'SHOW_CHILD',
|
|
showCheckedStrategy: 'SHOW_CHILD',
|
|
|
fieldNames: { label: 'name', value: 'code', children: 'children' },
|
|
fieldNames: { label: 'name', value: 'code', children: 'children' },
|
|
|
options: getSelectorData('IndicatorType', 'Cascader'),
|
|
options: getSelectorData('IndicatorType', 'Cascader'),
|
|
@@ -842,7 +1026,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const codes = nodes.map((t) => t.code);
|
|
|
|
|
|
|
+ const codes = nodes.map(t => t.code);
|
|
|
manaInfoformRef.current?.setFieldsValue({ _indicatorTypeList: codes });
|
|
manaInfoformRef.current?.setFieldsValue({ _indicatorTypeList: codes });
|
|
|
},
|
|
},
|
|
|
}}
|
|
}}
|
|
@@ -857,12 +1041,18 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={getSelectorData('IndicatorDepartment') as DefaultOptionType[]}
|
|
options={getSelectorData('IndicatorDepartment') as DefaultOptionType[]}
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <ProFormDigit colProps={{ md: 12, xl: 8 }} name="reference" label="同级参考值" placeholder="请输入" />
|
|
|
|
|
|
|
+ <ProFormDigit
|
|
|
|
|
+ colProps={{ md: 12, xl: 8 }}
|
|
|
|
|
+ name="reference"
|
|
|
|
|
+ label="同级参考值"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ />
|
|
|
{/* <ProFormText colProps={{ md: 12, xl: 8 }} name="referenceDesc" label="参考值来源说明" placeholder="请输入" /> */}
|
|
{/* <ProFormText colProps={{ md: 12, xl: 8 }} name="referenceDesc" label="参考值来源说明" placeholder="请输入" /> */}
|
|
|
<ProFormTextArea
|
|
<ProFormTextArea
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
@@ -884,6 +1074,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={getSelectorData('IndicatorCommittee') as DefaultOptionType[]}
|
|
options={getSelectorData('IndicatorCommittee') as DefaultOptionType[]}
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
@@ -897,6 +1088,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
fieldNames: { label: 'name', value: 'code', children: 'children' },
|
|
fieldNames: { label: 'name', value: 'code', children: 'children' },
|
|
|
options: getSelectorData('IndicatorExternal', 'Cascader'),
|
|
options: getSelectorData('IndicatorExternal', 'Cascader'),
|
|
|
onChange(value, selectOptions) {
|
|
onChange(value, selectOptions) {
|
|
@@ -938,7 +1130,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const codes = nodes.map((t) => t.code);
|
|
|
|
|
|
|
+ const codes = nodes.map(t => t.code);
|
|
|
manaInfoformRef.current?.setFieldsValue({ _indicatorExternalList: codes });
|
|
manaInfoformRef.current?.setFieldsValue({ _indicatorExternalList: codes });
|
|
|
},
|
|
},
|
|
|
}}
|
|
}}
|
|
@@ -976,7 +1168,9 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
: renderType == 'EDIT' && record
|
|
: renderType == 'EDIT' && record
|
|
|
? {
|
|
? {
|
|
|
...record,
|
|
...record,
|
|
|
- caseBreakdown: record.caseBreakdown ? record.caseBreakdown.split('/') : [],
|
|
|
|
|
|
|
+ caseBreakdown: record.caseBreakdown
|
|
|
|
|
+ ? record.caseBreakdown.split('/')
|
|
|
|
|
+ : [],
|
|
|
chartType: record.chartType ? record.chartType.split('/') : [],
|
|
chartType: record.chartType ? record.chartType.split('/') : [],
|
|
|
dataDownload: record.dataDownload ? record.dataDownload.split('/') : [],
|
|
dataDownload: record.dataDownload ? record.dataDownload.split('/') : [],
|
|
|
dataSum: record.dataSum ? record.dataSum.split('/') : [],
|
|
dataSum: record.dataSum ? record.dataSum.split('/') : [],
|
|
@@ -992,7 +1186,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="appearDate"
|
|
name="appearDate"
|
|
|
label="呈现期间"
|
|
label="呈现期间"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '年',
|
|
label: '年',
|
|
@@ -1017,6 +1211,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
@@ -1046,6 +1241,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{ label: '全院', value: '全院' },
|
|
{ label: '全院', value: '全院' },
|
|
@@ -1062,6 +1258,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
@@ -1095,6 +1292,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
@@ -1128,6 +1326,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
mode: 'multiple',
|
|
mode: 'multiple',
|
|
|
maxTagCount: 'responsive',
|
|
maxTagCount: 'responsive',
|
|
|
|
|
+ showSearch: true,
|
|
|
}}
|
|
}}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
@@ -1226,6 +1425,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
fieldProps={{
|
|
fieldProps={{
|
|
|
size: 'small',
|
|
size: 'small',
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
|
|
+ showSearch: true,
|
|
|
fieldNames: { label: 'name', value: 'code' },
|
|
fieldNames: { label: 'name', value: 'code' },
|
|
|
onChange(value: any, selectOptions: any) {
|
|
onChange(value: any, selectOptions: any) {
|
|
|
var nodes: any[] = [];
|
|
var nodes: any[] = [];
|
|
@@ -1264,7 +1464,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const codes = nodes.map((t) => t.code);
|
|
|
|
|
|
|
+ const codes = nodes.map(t => t.code);
|
|
|
adminInfoformRef.current?.setFieldsValue({ _indicatorMenuList: codes });
|
|
adminInfoformRef.current?.setFieldsValue({ _indicatorMenuList: codes });
|
|
|
},
|
|
},
|
|
|
}}
|
|
}}
|
|
@@ -1272,7 +1472,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
if (indicatorId) {
|
|
if (indicatorId) {
|
|
|
const dirData = await getIndicatorDictionary();
|
|
const dirData = await getIndicatorDictionary();
|
|
|
if (dirData) {
|
|
if (dirData) {
|
|
|
- const result = dirData.filter((t) => t.code == indicatorId);
|
|
|
|
|
|
|
+ const result = dirData.filter(t => t.code == indicatorId);
|
|
|
|
|
|
|
|
if (result.length > 0) {
|
|
if (result.length > 0) {
|
|
|
return result[0].children;
|
|
return result[0].children;
|
|
@@ -1289,7 +1489,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="isPublic"
|
|
name="isPublic"
|
|
|
label="是否公开"
|
|
label="是否公开"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '是',
|
|
label: '是',
|
|
@@ -1306,7 +1506,7 @@ const DrawerForm = (props: IndicatorDrawerForm) => {
|
|
|
colProps={{ md: 12, xl: 8 }}
|
|
colProps={{ md: 12, xl: 8 }}
|
|
|
name="version"
|
|
name="version"
|
|
|
label="版本"
|
|
label="版本"
|
|
|
- fieldProps={{ size: 'small' }}
|
|
|
|
|
|
|
+ fieldProps={{ size: 'small', showSearch: true }}
|
|
|
options={[
|
|
options={[
|
|
|
{
|
|
{
|
|
|
label: '版本1',
|
|
label: '版本1',
|