Commit c86dec82 authored by 皮倩雯's avatar 皮倩雯

fix: '巡维保表单验证优化'

parent 8376372b
Pipeline #54513 passed with stages
......@@ -275,10 +275,12 @@ const AddModal = props => {
const onOK = prop => {
console.log(prop.isType);
setIsVisible(false);
console.log(props);
let inputText = { ...inputValue };
inputText[prop.pickItem] = prop.str;
setCheckedList1(prop.checkedList);
setInputValue(inputText);
form.setFieldsValue(inputText);
};
// const title = <ModalDrag title="巡维保计划配置" />
......@@ -406,23 +408,7 @@ const AddModal = props => {
</Col>
<Col span={23}>
<Item
label={
<>
<span
style={{
lineHeight: '12px',
verticalAlign: 'middle',
color: 'red',
fontSize: '16px',
marginRight: '4px',
marginTop: '4px',
}}
>
*
</span>
<span>反馈名称</span>
</>
}
label="反馈名称"
name="feedbackName"
labelCol={{ span: 4 }}
rules={[
......@@ -434,20 +420,16 @@ const AddModal = props => {
return Promise.resolve();
},
},
// {
// required: true,
// message: '请选择反馈名称',
// },
{
required: true,
message: '请选择反馈名称',
},
]}
>
<div className={styles.filed_listItem}>
<Input
style={{ width: '83%' }}
placeholder="请选择反馈名称"
onChange={e => changeText(e, 'feedbackName')}
value={inputValue.feedbackName}
allowClear
/>
<div style={{ display: 'flex' }}>
<Item name="feedbackName" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请选择反馈名称" allowClear />
</Item>
<Button
type="dashed"
onClick={() => pickFiled('feedbackName')}
......@@ -459,23 +441,7 @@ const AddModal = props => {
</Col>
<Col span={23}>
<Item
label={
<>
<span
style={{
lineHeight: '12px',
verticalAlign: 'middle',
color: 'red',
fontSize: '16px',
marginRight: '4px',
marginTop: '4px',
}}
>
*
</span>
<span>执行角色</span>
</>
}
label="执行角色"
name="doRole"
labelCol={{ span: 4 }}
rules={[
......@@ -487,20 +453,16 @@ const AddModal = props => {
return Promise.resolve();
},
},
// {
// required: true,
// message: '请选择执行角色',
// },
{
required: true,
message: '请选择执行角色',
},
]}
>
<div className={styles.filed_listItem}>
<Input
style={{ width: '83%' }}
placeholder="请选择执行角色"
onChange={e => changeText(e, 'doRole')}
value={inputValue.doRole}
allowClear
/>
<div style={{ display: 'flex' }}>
<Item name="doRole" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请选择执行角色" allowClear />
</Item>
<Button
type="dashed"
onClick={() => pickFiled1('doRole')}
......
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