|
|
@@ -1,20 +1,65 @@ |
|
|
|
import React from 'react'; |
|
|
|
import { Modal, Form, Input, Button, Select,InputNumber,TreeSelect } from 'antd'; |
|
|
|
|
|
|
|
import React, { useState, useEffect,useRef } from 'react'; |
|
|
|
import { Modal, Row, Col, Checkbox, Select} from 'antd'; |
|
|
|
import { |
|
|
|
GetDeviceList, |
|
|
|
} from '../services'; |
|
|
|
const PushFrom = (props) => { |
|
|
|
const { Option, OptGroup } = Select; |
|
|
|
const [deviceData, setdeviceData] = useState([]); |
|
|
|
useEffect(() => { |
|
|
|
console.log(props.values) |
|
|
|
GetDeviceList().then((r)=>{ |
|
|
|
var data=r.data.map(x=>{ |
|
|
|
return {value:x.id,label:x.name} |
|
|
|
}) |
|
|
|
setdeviceData(data) |
|
|
|
}) |
|
|
|
},[props.values]) |
|
|
|
const handleChange=()=>{ |
|
|
|
|
|
|
|
} |
|
|
|
const onChangedata=()=>{ |
|
|
|
|
|
|
|
} |
|
|
|
return ( |
|
|
|
<Modal |
|
|
|
title={props.values.id ? '编辑' : '新建'} |
|
|
|
title={'下发数据'} |
|
|
|
width={640} |
|
|
|
visible={props.createModalVisible} |
|
|
|
bodyStyle={{ padding: '32px 40px 1px 48px' }} |
|
|
|
footer={null} |
|
|
|
okText="保存" |
|
|
|
cancelText="取消" |
|
|
|
onOk={() => { |
|
|
|
}} |
|
|
|
onCancel={() => { |
|
|
|
props.onCancel(); |
|
|
|
}} |
|
|
|
destroyOnClose |
|
|
|
> |
|
|
|
<Row gutter={26}> |
|
|
|
<Col lg={24} md={24} sm={24}> |
|
|
|
选择设备: |
|
|
|
<Select |
|
|
|
mode="multiple" |
|
|
|
allowClear |
|
|
|
style={{width: '60%'}} |
|
|
|
placeholder="请选择要下发设备" |
|
|
|
onChange={handleChange} |
|
|
|
options={deviceData} |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
|
|
|
|
</Row> |
|
|
|
<Row gutter={26}> |
|
|
|
<Col span={24}> |
|
|
|
选择数据: |
|
|
|
<Checkbox.Group defaultValue={['1','2']} onChange={onChangedata} > |
|
|
|
<Checkbox value="1">商品</Checkbox><a style={{marginLeft:2,marginRight:30}}>【选择商品】</a> |
|
|
|
<Checkbox value="2">物料 </Checkbox><a style={{marginLeft:2,marginRight:30}}>【选择物料】</a> |
|
|
|
<Checkbox value="3">工艺</Checkbox><a style={{marginLeft:2,marginRight:30}}>【选择工艺】</a> |
|
|
|
<Checkbox value="4">配方</Checkbox><a style={{marginLeft:2,marginRight:30}}>【选择配方】</a> |
|
|
|
</Checkbox.Group> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Modal> |
|
|
|
); |
|
|
|
}; |
|
|
|