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

优化事件管理界面UI

parent 5946c5ef
Pipeline #36071 skipped with stages
import React, { useState, useEffect} from 'react';
import { Modal, Form, Input, notification, Row, Col, Select, Button, Dropdown, Menu } from 'antd';
import { Drawer, Form, Input, notification, Row, Col, Select, Button, Dropdown, Menu, Space } from 'antd';
import styles from './maintenance.less'
import ModalDrag from './ModalDrag';
import { CM_XWBPlan_AccountTable, CM_XWBPlan_feedbackTable, CM_XWBPlan_DataEditORAdd, CM_XWBPlan_DataList } from '@/services/maintenance/api'
......@@ -254,22 +254,24 @@ const AddModal = props => {
setCheckedList1(prop.checkedList)
setInputValue(inputText)
}
const title = <ModalDrag title="巡维保计划配置" />
// const title = <ModalDrag title="巡维保计划配置" />
return (
<Modal
title={title}
<Drawer
title="巡维保计划配置"
visible={visible}
maskClosable={false}
mask={false}
destroyOnClose
width="800px"
destroyOnClose
okText="确认"
cancelText="取消"
{...props}
onOk={() => onSubmit()}
footer={
<Space>
<Button onClick={onSubmit} type="primary" >
确定
</Button>
</Space>
}
>
<Form form={form} labelCol={{ span: 7 }} style={{ height: '33rem', overflowY: 'scroll' }}>
<Form form={form} labelCol={{ span: 7 }} style={{overflowY: 'scroll' }}>
<Row>
<Col span={23}>
<Item
......@@ -502,21 +504,9 @@ const AddModal = props => {
</Col>
</Row>
</Form>
{/* <ChangeAdd
visible={isVisible}
onCancel={() => setIsVisible(false)}
callBackSubmit={onOK}
newCheckedList={checkedList1}
isType={types}
filed={filed}
filed1={filed1}
ff={ff}
pickItem={pickItem}
characterValue={characterValue}
/> */}
<ChangeAdd
visible={isVisible}
onClose={() => setIsVisible(false)}
onCancel={() => setIsVisible(false)}
callBackSubmit={onOK}
newCheckedList={checkedList1}
isType={types}
......@@ -525,9 +515,8 @@ const AddModal = props => {
ff={ff}
pickItem={pickItem}
characterValue={characterValue}
placement="right"
/>
</Modal>
</Drawer>
)
};
export default AddModal
\ No newline at end of file
import React, { useState, useEffect, PureComponent } from 'react';
import {Drawer, Divider, Checkbox, Space, Button} from 'antd';
import { Modal, Divider, Checkbox, Space, Button } from 'antd';
import styles from './maintenance.less'
const CheckboxGroup = Checkbox.Group;
......@@ -96,20 +96,19 @@ const ChangeAdd = props => {
if (isType != 'app') {
return (
<div className={styles.ChangeAddContainer}>
<Drawer
<Modal
title="反馈名称"
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '10px' }}
width="450px"
destroyOnClose
centered={true}
cancelText="取消"
okText="确认"
{...props}
footer={
<Space>
<Button onClick={onSubmit} type="primary">
确定
</Button>
</Space>
}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
......@@ -133,25 +132,24 @@ const ChangeAdd = props => {
</div>
)
}
</Drawer>
</Modal>
</div>
);
} else if (isType === 'app') {
return (
<Drawer
<Modal
title="角色"
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '10px' }}
width="450px"
destroyOnClose
centered={true}
cancelText="取消"
okText="确认"
{...props}
footer={
<Space>
<Button onClick={onSubmit} type="primary">
确定
</Button>
</Space>
}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
......@@ -165,7 +163,7 @@ const ChangeAdd = props => {
</div>
)
}
</Drawer>
</Modal>
);
}
};
......
......@@ -220,9 +220,10 @@ const maintenance = () => {
<AddModal
visible={addVisible}
type={type}
onCancel={() => setAddVisible(false)}
onClose={() => setAddVisible(false)}
callBackSubmit={onSubmit}
formObj={formObj}
placement="right"
/>
</div>
</div>
......
......@@ -63,8 +63,8 @@
padding: 0.5rem;
}
.cardContent{
// height: 30rem;
// overflow-y: scroll;
height: 30rem;
overflow-y: scroll;
width: 100%;
}
.cardItemData{
......@@ -82,3 +82,6 @@
.ant-modal-footer {
padding: 0px 48px 10px 40px;
}
.ant-table-pagination.ant-pagination {
margin: 5px 0;
}
......@@ -13,7 +13,7 @@ import {
Tooltip,
Badge, Spac
} from 'antd';
import { EditOutlined, DeleteOutlined, FontColorsOutlined, PlusSquareOutlined, SortDescendingOutlined ,PlusOutlined,BorderInnerOutlined } from '@ant-design/icons';
import { EditOutlined, DeleteOutlined, FontColorsOutlined, PlusSquareOutlined, SortDescendingOutlined, PlusOutlined, BorderInnerOutlined } from '@ant-design/icons';
import PageContainer from '@/components/BasePageContainer';
import { CM_Table_LoadTable, removeTable, loadUnattachedTables } from '@/services/platform/bs'
import styles from './index.less'
......@@ -191,8 +191,10 @@ const TableManager = (props) => {
}
return tempObj
}
const setRowClassName = record =>
Object.entries(record).toString() === Object.entries(selectTableName).toString() ? styles.clickRowStyle : '';
// const setRowClassName = record => {
// Object.entries(record).toString() === Object.entries(selectTableName).toString() ? styles.clickRowStyle : '';
// }
const expandedRowRender = (item) => {
const columns1 = [
{
......@@ -228,7 +230,7 @@ const TableManager = (props) => {
align: 'center',
render: text => {
return (<div className={classnames({
[styles.lack]:text!=='(无)' ,
[styles.lack]: text !== '(无)',
})} >{text}</div>)
}
},
......@@ -309,7 +311,7 @@ const TableManager = (props) => {
}, // 点击行
}
}}
rowClassName={setRowClassName}
// rowClassName={setRowClassName}
showHeader={false} dataSource={allData[item.type]} pagination={false} />;
};
......@@ -317,7 +319,7 @@ const TableManager = (props) => {
{
title: '名称', dataIndex: 'type', key: 'type',
render: text => {
return (<a style={{ fontWeight:'bold' }}>{text}({allData && allData[text] ? allData[text].length : 0}个)</a>)
return (<a style={{ fontWeight: 'bold' }}>{text}({allData && allData[text] ? allData[text].length : 0}个)</a>)
},
width: 260,
},
......@@ -398,8 +400,8 @@ const TableManager = (props) => {
/>
</div>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<BorderInnerOutlined />} onClick={AddTable}>建表</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusOutlined />} onClick={AffiliateAddTable}>附加表</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<BorderInnerOutlined />} onClick={AddTable}>建表</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusOutlined />} onClick={AffiliateAddTable}>附加表</Button>
</div>
<div style={{ width: '100vm', height: 'calc(100vh - 150px) ', background: '#ffffff' }}>
......
......@@ -293,8 +293,18 @@ const incident = () => {
let arrr = formateArrDataA(zz, 'businessType')
console.log(arrr)
setTableData(arrr)
setPickItem(newArr[rember])
setRember1(newArr[0])
if(history.location.state){
console.log(history)
console.log(history.location.state.rember)
setPickItem(newArr[history.location.state.rember])
setRember(history.location.state.rember)
setRember1(newArr[history.location.state.rember])
}else{
setPickItem(newArr[rember])
setRember1(newArr[0])
}
console.log(rember)
console.log(newArr[rember])
console.log(newArr, 'newArr');
setTreeData(newArr)
}
......@@ -396,7 +406,7 @@ const incident = () => {
const process1 = record =>{
history.push({
pathname: '/platformCenter/bsmanger/incidentFlow',
state: { formObj:record, title1:record.name },
state: { formObj:record, title1:record.name, rember },
});
}
// const auxiliaryView = record => {
......@@ -407,7 +417,7 @@ const incident = () => {
const auxiliaryView1 = record => {
history.push({
pathname: '/platformCenter/bsmanger/incidentView',
state: { formObj:record, title2:record.name },
state: { formObj:record, title2:record.name, rember },
});
}
const onSubmit = () => {
......@@ -514,7 +524,6 @@ const incident = () => {
</div>
<Table
// rowClassName={setRowClassName}
size="small"
rowKey='ID'
bordered
......
......@@ -234,12 +234,13 @@
}
.btn{
display: flex;
justify-content: space-around;
justify-content: flex-end;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
margin-left: 20px;
}
}
.containerBox {
......
......@@ -96,10 +96,10 @@ const incidentFlow = (props) => {
setAddVisible(true)
}
const back = () => {
let formObj = props.location.state.formObj;
let rember = props.location.state.rember;
history.push({
pathname: '/platformCenter/bsmanger/incident',
state: { formObj },
state: { rember },
});
};
const deleteEventType = record => {
......
......@@ -207,10 +207,10 @@ const incidentView = props => {
setFlag(flag+1)
}
const back = () => {
let formObj = props.location.state.formObj;
let rember = props.location.state.rember;
history.push({
pathname: '/platformCenter/bsmanger/incident',
state: { formObj },
state: { rember },
});
};
return(
......@@ -243,7 +243,7 @@ const incidentView = props => {
};
}}
columns={columns}
style={{ height: '15rem', overflowY: 'scroll', marginLeft: '25px', marginRight: '25px' }}
style={{overflowY: 'scroll'}}
dataSource={tableData}
pagination={false}
scroll={{ x: 'max-content'}}
......
......@@ -279,6 +279,7 @@ const AddModal = props => {
},
];
useEffect(() => {
console.log(props)
if (props.match.params.id) {
setFormObj(props.match.params.id);
setTreeLoading(true);
......@@ -377,13 +378,13 @@ const AddModal = props => {
};
//附加
const add = record => {
setPramFormObj(props.history.location.state.template);
setPramFormObj(props.location.state.template);
setType('affiliateAdd');
setVisible(true);
};
//分组与排序
const sort = record => {
setPramFormObj(props.history.location.state.template);
setPramFormObj(props.location.state.template);
setType('sort');
setVisible(true);
};
......
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