|
|
@@ -8,8 +8,11 @@ const CreateAction = (props) => { |
|
|
|
const [valueType, setValueType] = useState('text'); |
|
|
|
const [layoutType, setLayoutType] = useState('Form'); |
|
|
|
const [optionitem,setoptionitem]=useState([]) |
|
|
|
const [jsontext,setjsontext]=useState('') |
|
|
|
|
|
|
|
const [modalVisit, setModalVisit] = useState(false); |
|
|
|
const [shuUpdate, setshuUpdate] = useState(false); |
|
|
|
const { TextArea } = Input; |
|
|
|
useEffect(() => { |
|
|
|
formRef.current?.setFieldsValue(props.values); |
|
|
|
if(props.createModalVisible){ |
|
|
@@ -34,6 +37,8 @@ const CreateAction = (props) => { |
|
|
|
ary.push({actionValueName:op[t].actionValueName}) |
|
|
|
} |
|
|
|
setoptionitem(ary); |
|
|
|
}if(props.values.actionType=="textareaary"){ |
|
|
|
setjsontext(props.values.actionValue) |
|
|
|
}else{ |
|
|
|
setValueType(props.values.actionType); |
|
|
|
setLayoutType('Form'); |
|
|
@@ -130,6 +135,17 @@ const handleChange=(value)=>{ |
|
|
|
renderFormItem: () => <Input placeholder="输入类型值" disabled /> |
|
|
|
}, |
|
|
|
]; |
|
|
|
case 'textareaary': |
|
|
|
return [ |
|
|
|
{ |
|
|
|
dataIndex: 'actionValue', |
|
|
|
valueType: 'text', |
|
|
|
initialValue:jsontext, |
|
|
|
renderFormItem: () => <TextArea |
|
|
|
placeholder="数据格式:[data1:{value1:'1'},{value2:'2'},data2:{value1:'1'},{value2:'2'}]" |
|
|
|
autoSize={{minRows: 10,maxRows: 100}}/> |
|
|
|
}, |
|
|
|
]; |
|
|
|
default: |
|
|
|
return [{ |
|
|
|
dataIndex: 'actionValue', |
|
|
@@ -214,9 +230,9 @@ const handleChange=(value)=>{ |
|
|
|
<Form.Item name="isBatch" label="是否绑定物料" valuePropName="checked"> |
|
|
|
<Switch checkedChildren="是" unCheckedChildren="否"/> |
|
|
|
</Form.Item> */} |
|
|
|
<Form.Item name="sort" label="排序"> |
|
|
|
{/* <Form.Item name="sort" label="排序"> |
|
|
|
<Input placeholder="请输入排序" /> |
|
|
|
</Form.Item> |
|
|
|
</Form.Item> */} |
|
|
|
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} > |
|
|
|
取消 |
|
|
|
</Button> |
|
|
|