Browse Source

Merge branch 'master' into groupmealweb

groupmealweb
zhaoy 10 months ago
parent
commit
a74c22848b
2 changed files with 15 additions and 3 deletions
  1. +9
    -3
      src/pages/device/productmanage/components/CreateForm.jsx
  2. +6
    -0
      src/pages/device/productmanage/index.jsx

+ 9
- 3
src/pages/device/productmanage/components/CreateForm.jsx View File

@@ -13,6 +13,7 @@ const CreateForm = (props) => {
const [displaybool,setdisplaybool]=useState('none'); const [displaybool,setdisplaybool]=useState('none');
const [displaylength,setdisplaylength]=useState('none'); const [displaylength,setdisplaylength]=useState('none');
const [displaytxtjson,setdisplaytxtjson]=useState('none'); const [displaytxtjson,setdisplaytxtjson]=useState('none');
const [disabledname,setdisabledname]=useState('false');
const [minnumber, setminnumber] = useState(0); const [minnumber, setminnumber] = useState(0);
const [maxnumber, setmaxnumber] = useState(1); const [maxnumber, setmaxnumber] = useState(1);
const [ReadWrite, setReadWrite] = useState(0); const [ReadWrite, setReadWrite] = useState(0);
@@ -43,6 +44,7 @@ const CreateForm = (props) => {
if(props?.values?.type==1){ if(props?.values?.type==1){
setdisplay("none") setdisplay("none")
setdisanumbled('none') setdisanumbled('none')
setdisplaytxtjson('none')
}else if(props?.values?.type==0){ }else if(props?.values?.type==0){
setdisplay("block") setdisplay("block")
} }
@@ -82,9 +84,13 @@ const CreateForm = (props) => {
setminnumber(0); setminnumber(0);
setmaxnumber(1); setmaxnumber(1);
} }
if(props?.values?.isDefault){
setdisabledname(true)
}else{
setdisabledname(false)
}
}else{ }else{
setdisabledname(false)
console.log("xinjian") console.log("xinjian")
setDisabled(false); setDisabled(false);
setdisplay("block") setdisplay("block")
@@ -233,7 +239,7 @@ const onChangeboolLabel1=(e)=>{
</Form.Item> </Form.Item>
<Form.Item name="name" label="功能名称" rules={[{ required: true, max: 64, whitespace: true }]}> <Form.Item name="name" label="功能名称" rules={[{ required: true, max: 64, whitespace: true }]}>
<Input placeholder="请输入功能名称" />
<Input placeholder="请输入功能名称" disabled={disabledname} />
</Form.Item> </Form.Item>
<Form.Item style={{display:display}} label={'数据类型'} name="dataType" rules={[{ required: false }]}> <Form.Item style={{display:display}} label={'数据类型'} name="dataType" rules={[{ required: false }]}>
<Select onChange={onChangedataType} defaultValue="digit"> <Select onChange={onChangedataType} defaultValue="digit">


+ 6
- 0
src/pages/device/productmanage/index.jsx View File

@@ -211,6 +211,12 @@ const bomtechnology = (props) => {
// search: true, // search: true,
// valueEnum:DeviceVesionEnum // valueEnum:DeviceVesionEnum
// }, // },
{
title: '描述',
dataIndex: 'description',
valueType: 'textarea',
hideInSearch: true,
},
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createAt', dataIndex: 'createAt',


Loading…
Cancel
Save