Browse Source

(*) 点位绑定设备可搜索

master
liujiangyong 1 year ago
parent
commit
b89e5fbf61
  1. 2
      web/client/src/sections/projectRegime/components/pointModel.js

2
web/client/src/sections/projectRegime/components/pointModel.js

@ -174,7 +174,7 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, q
</Form.Item> </Form.Item>
<Form.Item label='设备绑定' name="devices" style={{}} <Form.Item label='设备绑定' name="devices" style={{}}
initialValue={modelData?.pointDevices?.map(s => s?.deviceId) || []}> initialValue={modelData?.pointDevices?.map(s => s?.deviceId) || []}>
<Select mode="multiple"> <Select mode="multiple" showSearch filterOption={(input, option) => (option?.children ?? '').toLowerCase().includes(input.toLowerCase())}>
{ {
devices?.map(s => <Select.Option devices?.map(s => <Select.Option
disabled={s?.pointDevices?.length > 0 && !s?.pointDevices?.find(x => x.pointId == modelData?.id)} disabled={s?.pointDevices?.length > 0 && !s?.pointDevices?.find(x => x.pointId == modelData?.id)}

Loading…
Cancel
Save