|  | @@ -10,7 +10,11 @@ import { get } from 'lodash-es';
 | 
											
												
													
														|  |   * @param deviceOptions 用于初始化设备下拉框
 |  |   * @param deviceOptions 用于初始化设备下拉框
 | 
											
												
													
														|  |   * @returns
 |  |   * @returns
 | 
											
												
													
														|  |   */
 |  |   */
 | 
											
												
													
														|  | -export const getDefaultSchemas: (dictOptions: any[], deviceOptions: any[]) => FormSchema[] = (dictOptions: any[], deviceOptions: any[]) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +export const getDefaultSchemas: (dictOptions: any[], deviceOptions: any[], onDeviceChange?: Function) => FormSchema[] = (
 | 
											
												
													
														|  | 
 |  | +  dictOptions: any[],
 | 
											
												
													
														|  | 
 |  | +  deviceOptions: any[],
 | 
											
												
													
														|  | 
 |  | +  onDeviceChange?: Function
 | 
											
												
													
														|  | 
 |  | +) => {
 | 
											
												
													
														|  |    const device = get(deviceOptions, '[0].value', '');
 |  |    const device = get(deviceOptions, '[0].value', '');
 | 
											
												
													
														|  |    const dictcode = get(dictOptions, '[0].value', '');
 |  |    const dictcode = get(dictOptions, '[0].value', '');
 | 
											
												
													
														|  |    const isRedis = get(deviceOptions, '[0].stationtype', 'redis') === 'redis';
 |  |    const isRedis = get(deviceOptions, '[0].stationtype', 'redis') === 'redis';
 | 
											
										
											
												
													
														|  | @@ -50,16 +54,12 @@ export const getDefaultSchemas: (dictOptions: any[], deviceOptions: any[]) => Fo
 | 
											
												
													
														|  |        field: 'gdeviceids',
 |  |        field: 'gdeviceids',
 | 
											
												
													
														|  |        component: 'Select',
 |  |        component: 'Select',
 | 
											
												
													
														|  |        required: true,
 |  |        required: true,
 | 
											
												
													
														|  | -      defaultValue: isRedis ? device : [device],
 |  | 
 | 
											
												
													
														|  | 
 |  | +      defaultValue: VENT_PARAM.historyIsMultiple ? [device] : device,
 | 
											
												
													
														|  |        componentProps: {
 |  |        componentProps: {
 | 
											
												
													
														|  |          options: deviceOptions,
 |  |          options: deviceOptions,
 | 
											
												
													
														|  | -        // onChange: (e, option) => {
 |  | 
 | 
											
												
													
														|  | -        mode: isRedis ? undefined : 'multiple',
 |  | 
 | 
											
												
													
														|  | 
 |  | +        mode: VENT_PARAM.historyIsMultiple ? 'multiple' : undefined,
 | 
											
												
													
														|  |          maxTagCount: 'responsive',
 |  |          maxTagCount: 'responsive',
 | 
											
												
													
														|  | -        //   nextTick(async () => {
 |  | 
 | 
											
												
													
														|  | -        //     await getDataSource();
 |  | 
 | 
											
												
													
														|  | -        //   });
 |  | 
 | 
											
												
													
														|  | -        // },
 |  | 
 | 
											
												
													
														|  | 
 |  | +        onChange: onDeviceChange,
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  |        colProps: {
 |  |        colProps: {
 | 
											
												
													
														|  |          span: 6,
 |  |          span: 6,
 |