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

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

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