|
@ -141,11 +141,19 @@ export const tableConfig = (orgId) => { |
|
|
component: 'NsSelectApi', |
|
|
component: 'NsSelectApi', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
placeholder: '请选择设备名称', |
|
|
placeholder: '请选择设备名称', |
|
|
api: device.dropArea, |
|
|
api: (params) => { |
|
|
|
|
|
return http.post(device.dropArea, params).then((res) => { |
|
|
|
|
|
const result = res.data?.reduce((pre, cur) => { |
|
|
|
|
|
!pre.includes(cur.deviceName) && pre.push(cur.deviceName); |
|
|
|
|
|
return pre; |
|
|
|
|
|
}, []); |
|
|
|
|
|
return { data: result }; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
resultField: 'data', |
|
|
resultField: 'data', |
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
labelField: 'deviceName', |
|
|
// labelField: 'deviceName',
|
|
|
valueField: 'deviceName', |
|
|
// valueField: 'deviceName',
|
|
|
filterOption: (input: string, option: any) => { |
|
|
filterOption: (input: string, option: any) => { |
|
|
return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
}, |
|
|
}, |
|
@ -205,11 +213,19 @@ export const tableConfig = (orgId) => { |
|
|
component: 'NsSelectApi', |
|
|
component: 'NsSelectApi', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
placeholder: '请选择设备厂商', |
|
|
placeholder: '请选择设备厂商', |
|
|
api: device.dropArea, |
|
|
api: (params) => { |
|
|
|
|
|
return http.post(device.dropArea, params).then((res) => { |
|
|
|
|
|
const result = res.data?.reduce((pre, cur) => { |
|
|
|
|
|
!pre.includes(cur.manufacturer) && pre.push(cur.manufacturer); |
|
|
|
|
|
return pre; |
|
|
|
|
|
}, []); |
|
|
|
|
|
return { data: result }; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
resultField: 'data', |
|
|
resultField: 'data', |
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
labelField: 'manufacturer', |
|
|
// labelField: 'manufacturer',
|
|
|
valueField: 'manufacturer', |
|
|
// valueField: 'manufacturer',
|
|
|
filterOption: (input: string, option: any) => { |
|
|
filterOption: (input: string, option: any) => { |
|
|
return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
}, |
|
|
}, |
|
|