|
|
@@ -218,11 +218,9 @@ const Workflow: React.FC = () => {
|
|
|
|
|
|
// 创建配置映射
|
|
|
const configMap: Record<string, string> = {};
|
|
|
- if (res?.data) {
|
|
|
- res.data.forEach((config) => {
|
|
|
- configMap[config.uri] = config.config_value;
|
|
|
- });
|
|
|
- }
|
|
|
+ (res.data?.configs || []).forEach((config) => {
|
|
|
+ configMap[config.uri] = config.config_value;
|
|
|
+ });
|
|
|
|
|
|
// 获取特殊配置项并解析
|
|
|
const workListFieldsStr = configMap['Patient/WorkListFields'] || '[]';
|
|
|
@@ -233,16 +231,14 @@ const Workflow: React.FC = () => {
|
|
|
|
|
|
// 过滤掉特殊配置项,只保留普通配置项用于表单
|
|
|
const formFieldsConfigs = {};
|
|
|
- if (res?.data) {
|
|
|
- res.data.forEach((config) => {
|
|
|
- if (
|
|
|
- config.uri !== 'Patient/WorkListFields' &&
|
|
|
- config.uri !== 'Patient/HistoryListFields'
|
|
|
- ) {
|
|
|
- formFieldsConfigs[config.uri] = config.config_value;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ (res.data.configs || []).forEach((config) => {
|
|
|
+ if (
|
|
|
+ config.uri !== 'Patient/WorkListFields' &&
|
|
|
+ config.uri !== 'Patient/HistoryListFields'
|
|
|
+ ) {
|
|
|
+ formFieldsConfigs[config.uri] = config.config_value;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
form.setFieldsValue(formFieldsConfigs);
|
|
|
};
|