|
|
@ -141,11 +141,19 @@ export const tableConfig = (orgId) => { |
|
|
|
component: 'NsSelectApi', |
|
|
|
componentProps: { |
|
|
|
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', |
|
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
|
labelField: 'deviceName', |
|
|
|
valueField: 'deviceName', |
|
|
|
// labelField: 'deviceName',
|
|
|
|
// valueField: 'deviceName',
|
|
|
|
filterOption: (input: string, option: any) => { |
|
|
|
return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
|
}, |
|
|
@ -205,11 +213,19 @@ export const tableConfig = (orgId) => { |
|
|
|
component: 'NsSelectApi', |
|
|
|
componentProps: { |
|
|
|
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', |
|
|
|
params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, |
|
|
|
labelField: 'manufacturer', |
|
|
|
valueField: 'manufacturer', |
|
|
|
// labelField: 'manufacturer',
|
|
|
|
// valueField: 'manufacturer',
|
|
|
|
filterOption: (input: string, option: any) => { |
|
|
|
return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
|
}, |
|
|
|