From 1c5f53abf5d6ad69cde24fc8ed9723fa595497dc Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Wed, 21 Feb 2024 14:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=A8=A1=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productmanage/components/ActionForm.jsx | 12 +++++------ .../productmanage/components/CreateAction.jsx | 20 +++++++++++++++++-- .../productmanage/components/CreateForm.jsx | 2 +- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/pages/device/productmanage/components/ActionForm.jsx b/src/pages/device/productmanage/components/ActionForm.jsx index 90e3ce6..1f9b5a8 100644 --- a/src/pages/device/productmanage/components/ActionForm.jsx +++ b/src/pages/device/productmanage/components/ActionForm.jsx @@ -84,12 +84,12 @@ const ActionForm = (props) => { // } // } // }, - { - title: '排序', - dataIndex: 'sort', - valueType:'digit', - width: '8%', - }, + // { + // title: '排序', + // dataIndex: 'sort', + // valueType:'digit', + // width: '8%', + // }, { title: '操作', valueType: 'option', diff --git a/src/pages/device/productmanage/components/CreateAction.jsx b/src/pages/device/productmanage/components/CreateAction.jsx index 06584a9..64444fc 100644 --- a/src/pages/device/productmanage/components/CreateAction.jsx +++ b/src/pages/device/productmanage/components/CreateAction.jsx @@ -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: () => }, ]; + case 'textareaary': + return [ + { + dataIndex: 'actionValue', + valueType: 'text', + initialValue:jsontext, + renderFormItem: () =>