Commit 0d972781 by zhaochengxiang

needEnc修改

parent 00e255fb
...@@ -129,7 +129,7 @@ const UpdateDatasourceModal = (props) => { ...@@ -129,7 +129,7 @@ const UpdateDatasourceModal = (props) => {
if (item.selectMode === null && item.required) { if (item.selectMode === null && item.required) {
item.needEnc = true; item.needEnc = true;
if (action === 'edit') { if (action === 'edit') {
item.needEnc = false; item.needEnc = (item.value!==datasourceRow[item.name]);
} }
} }
...@@ -146,7 +146,7 @@ const UpdateDatasourceModal = (props) => { ...@@ -146,7 +146,7 @@ const UpdateDatasourceModal = (props) => {
if (item.selectMode === null && item.required) { if (item.selectMode === null && item.required) {
item.needEnc = true; item.needEnc = true;
if (action === 'edit') { if (action === 'edit') {
item.needEnc = false; item.needEnc = (item.value!==credentialRow[item.name]);
} }
} }
...@@ -288,21 +288,13 @@ const UpdateDatasourceModal = (props) => { ...@@ -288,21 +288,13 @@ const UpdateDatasourceModal = (props) => {
rules={[{ required: item.required, message: '必填项'}]} rules={[{ required: item.required, message: '必填项'}]}
> >
{ {
(item.selectMode==='singleSelect') ? ( (item.selectMode==='singleSelect') ? <Select >
(item.name==='driver') ? <Select >
{
(item.targetDriverNodeList||[]).map((item,index) => {
return <Select.Option key={index} value={item.driverIdStr} >{item.name||''}</Select.Option>
})
}
</Select> : <Select >
{ {
(item.selectItem||[]).map((item,index) => { (item.selectItem||[]).map((item,index) => {
return <Select.Option key={index} value={item||''} >{item||''}</Select.Option> return <Select.Option key={index} value={item||''} >{item||''}</Select.Option>
}) })
} }
</Select> </Select> : ( item.show ? <Input placeholder={item.explain||''} /> : <Input.Password placeholder={item.explain||''} visibilityToggle={false} /> ) }
) : ( item.show ? <Input placeholder={item.explain||''} /> : <Input.Password placeholder={item.explain||''} visibilityToggle={false} /> ) }
</Form.Item> </Form.Item>
) )
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment