Commit 565bac58 authored by 涂伟's avatar 涂伟

fix: '运维维保方案配置新增动态周期'

parent 9dcf7c61
Pipeline #85878 passed with stages
......@@ -41,7 +41,7 @@ import {
} from '@ant-design/icons';
import styles from './maintenance.less';
import RuleConfig from '@/components/RuleConfig';
import { FormRender } from 'panda-xform';
// import { FormRender } from 'panda-xform';
import {
CM_XWBPlan_AccountTable,
NewCM_XWBPlan_feedbackTable,
......@@ -134,10 +134,10 @@ const EditableCell = ({
<Select ref={inputRef} showSearch onPressEnter={save} onBlur={save} onSelect={save}>
{state.selectList
? state.selectList.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Form.Item>
......@@ -157,7 +157,7 @@ const EditableCell = ({
};
const AddModal = props => {
const { callBackSubmit = () => {}, visible, type, formObj, keepTableData } = props;
const { callBackSubmit = () => { }, visible, type, formObj, keepTableData } = props;
const { state, dispatch } = useContext(Context);
const [Type1, setType1] = useState('');
const [Type2, setType2] = useState('');
......@@ -443,7 +443,7 @@ const AddModal = props => {
} else {
form.setFieldsValue({ parentId: '', inOrder: data.inOrder === 1 ? true : false });
}
form.setFieldsValue({ isDynamicCycle: data.isDynamicCycle === 1 ? true : false });
setType1(data.businessType);
setType2(data.accountName);
});
......@@ -473,7 +473,7 @@ const AddModal = props => {
getFeedbackTable();
}, []);
useEffect(() => {}, [keepData]);
useEffect(() => { }, [keepData]);
const getParentList = e => {
let value = e ? e : formObj.accountName;
......@@ -559,6 +559,7 @@ const AddModal = props => {
EndExecLen: EndExecLen,
};
obj.inOrder = obj.inOrder ? 1 : 0;
obj.isDynamicCycle = obj.isDynamicCycle ? 1 : 0;
if (!obj.time) {
lastData.time = false;
if (data.Unit === 'month') {
......@@ -1274,10 +1275,10 @@ const AddModal = props => {
<Select placeholder="选择父业务模板" showSearch allowClear>
{parentList
? parentList.map((item, index) => (
<Option key={index.ID} value={item.ID}>
{item.TemplateName}
</Option>
))
<Option key={index.ID} value={item.ID}>
{item.TemplateName}
</Option>
))
: ''}
</Select>
</Item>
......@@ -1305,10 +1306,10 @@ const AddModal = props => {
<Select placeholder="选择父业务模板" disabled>
{parentList
? parentList.map((item, index) => (
<Option key={index.ID} value={item.ID}>
{item.TemplateName}
</Option>
))
<Option key={index.ID} value={item.ID}>
{item.TemplateName}
</Option>
))
: ''}
</Select>
</Item>
......@@ -1361,34 +1362,34 @@ const AddModal = props => {
</div>
{stateType === 'drag'
? dataSource.length > 0 && (
<Table
pagination={false}
dataSource={dataSource}
columns={columns}
rowKey={record => record.key}
components={{
body: {
wrapper: DraggableContainer,
row: DraggableBodyRow,
},
}}
/>
)
<Table
pagination={false}
dataSource={dataSource}
columns={columns}
rowKey={record => record.key}
components={{
body: {
wrapper: DraggableContainer,
row: DraggableBodyRow,
},
}}
/>
)
: dataSource.length > 0 && (
<Table
pagination={false}
dataSource={dataSource}
columns={columns}
rowKey={record => record.key}
rowClassName={() => 'editable-row'}
components={{
body: {
row: EditableRow,
cell: EditableCell,
},
}}
/>
)}
<Table
pagination={false}
dataSource={dataSource}
columns={columns}
rowKey={record => record.key}
rowClassName={() => 'editable-row'}
components={{
body: {
row: EditableRow,
cell: EditableCell,
},
}}
/>
)}
</Item>
</Col>
<Col span={12}>
......@@ -1415,6 +1416,11 @@ const AddModal = props => {
visible={visible}
type={type}
/>
<Col span={24}>
<Item labelCol={{ span: 5 }} valuePropName="checked" label="动态周期" name="isDynamicCycle">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Item>
</Col>
<Col span={24}>
<div className={styles.titleIcon}>
<div className={styles.icon} />
......@@ -1562,10 +1568,10 @@ const AddModal = props => {
>
{eventData
? eventData.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
......@@ -1581,10 +1587,10 @@ const AddModal = props => {
>
{eventData
? eventData.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
......@@ -1671,12 +1677,12 @@ const AddModal = props => {
>
{keepTree.length > 0
? keepTree.map((item, index) => (
<>
<Option key={item.name} value={item.name}>
{item.name}
</Option>
</>
))
<>
<Option key={item.name} value={item.name}>
{item.name}
</Option>
</>
))
: ''}
</Select>
</Form.Item>
......@@ -1693,7 +1699,7 @@ const AddModal = props => {
block
icon={<PlusOutlined />}
style={{ marginLeft: '7px', width: '423px' }}
// disabled={keepData && !(keepData.length > 0)}
// disabled={keepData && !(keepData.length > 0)}
>
添加映射
</Button>
......@@ -1748,11 +1754,11 @@ const AddModal = props => {
footer={null}
>
<Spin spinning={loading}>
{formJson ? (
{/* {formJson ? (
<FormRender schemaValues={formJson} />
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} style={{ marginTop: '300px' }} />
)}
)} */}
</Spin>
</Modal>
</Drawer>
......
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