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

事件权限交互修改

parent f3348486
Pipeline #39811 skipped with stages
/* eslint-disable spaced-comment */
/* eslint-disable eqeqeq */
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { import {
Card, Card,
...@@ -258,7 +260,7 @@ const InitDataBase = props => { ...@@ -258,7 +260,7 @@ const InitDataBase = props => {
}) })
.then(res => { .then(res => {
setCardLoading(false); setCardLoading(false);
if (res.code === 0&& res.data == true) { if (res.code == 0 && res.data == true) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -290,7 +292,7 @@ const InitDataBase = props => { ...@@ -290,7 +292,7 @@ const InitDataBase = props => {
}) })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.data.root) console.log(res.data.root);
setOption(res.data.root); setOption(res.data.root);
} else { } else {
notification.error({ notification.error({
...@@ -689,7 +691,7 @@ const InitDataBase = props => { ...@@ -689,7 +691,7 @@ const InitDataBase = props => {
<Input placeholder="请输入用户名称" /> <Input placeholder="请输入用户名称" />
</Form.Item> </Form.Item>
<Form.Item label={`${formLables.password}:`} name="password"> <Form.Item label={`${formLables.password}:`} name="password">
<Input placeholder="请输入用户密码" type="password"/> <Input placeholder="请输入用户密码" type="password" />
</Form.Item> </Form.Item>
<Form.Item label={`${formLables.dbName}:`} name="dbName"> <Form.Item label={`${formLables.dbName}:`} name="dbName">
<Select <Select
...@@ -757,7 +759,7 @@ const InitDataBase = props => { ...@@ -757,7 +759,7 @@ const InitDataBase = props => {
<Card className={styles.mgTop20}> <Card className={styles.mgTop20}>
<div className={styles.tableTitle}>近期保存的数据库连接</div> <div className={styles.tableTitle}>近期保存的数据库连接</div>
<Table <Table
style={{ marginTop: '20px'}} style={{ marginTop: '20px' }}
scroll={{ x: 'max-content', y: 'calc(100vh - 580px)' }} scroll={{ x: 'max-content', y: 'calc(100vh - 580px)' }}
columns={columns} columns={columns}
dataSource={data} dataSource={data}
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
Popconfirm, Popconfirm,
notification, notification,
Spin, Spin,
Pagination Pagination,
} from 'antd'; } from 'antd';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import PageContainer from '@/components/BasePageContainer'; import PageContainer from '@/components/BasePageContainer';
...@@ -338,11 +338,11 @@ const ManagementDataBase = () => { ...@@ -338,11 +338,11 @@ const ManagementDataBase = () => {
]; ];
const paginationChange = (page, pageSizes) => { const paginationChange = (page, pageSizes) => {
console.log(page) console.log(page);
console.log(pageSizes) console.log(pageSizes);
setCurrentPage(page); setCurrentPage(page);
setPageSize(pageSizes); setPageSize(pageSizes);
} };
return ( return (
<> <>
......
...@@ -133,7 +133,7 @@ const Fieldselection = props => { ...@@ -133,7 +133,7 @@ const Fieldselection = props => {
title="流程节点配置" title="流程节点配置"
visible={visible} visible={visible}
onOk={onFinish} onOk={onFinish}
width="700px" width="750px"
onCancel={handleCancel} onCancel={handleCancel}
maskClosable={false} maskClosable={false}
destroyOnClose destroyOnClose
......
...@@ -130,7 +130,7 @@ const AddFlowsModal = props => { ...@@ -130,7 +130,7 @@ const AddFlowsModal = props => {
let a1 = []; let a1 = [];
let a2; let a2;
let a3 = []; let a3 = [];
initialArr.map(i => { initialArr.data.map(i => {
// console.log(i.groupType) // console.log(i.groupType)
a2 = i.groupType; a2 = i.groupType;
// console.log(a2) // console.log(a2)
......
...@@ -791,11 +791,12 @@ const AddModal = props => { ...@@ -791,11 +791,12 @@ const AddModal = props => {
return tempObj; return tempObj;
}; };
const formateArrDataA1 = (initialArr, name) => { const formateArrDataA1 = (initialArr, name) => {
console.log(initialArr);
let aa = []; let aa = [];
let a1 = []; let a1 = [];
let a2; let a2;
let a3 = []; let a3 = [];
initialArr.map(i => { initialArr.data.map(i => {
// console.log(i.groupType) // console.log(i.groupType)
a2 = i.groupType; a2 = i.groupType;
// console.log(a2) // console.log(a2)
...@@ -888,6 +889,9 @@ const AddModal = props => { ...@@ -888,6 +889,9 @@ const AddModal = props => {
}; };
const onOK = prop => { const onOK = prop => {
console.log(prop.isType); console.log(prop.isType);
console.log(prop.stt);
console.log(prop.filed22);
console.log(prop.title);
if (prop.isType == 'app') { if (prop.isType == 'app') {
let title = prop.title; let title = prop.title;
let selectData = prop.stt; let selectData = prop.stt;
...@@ -904,9 +908,14 @@ const AddModal = props => { ...@@ -904,9 +908,14 @@ const AddModal = props => {
} }
}); });
console.log(aa); console.log(aa);
if (item == '外部字段' && aa.length == 0) {
bb = 0;
} else {
// eslint-disable-next-line no-lonely-if
if (aa.length == 0) { if (aa.length == 0) {
bb = 1; bb = 1;
} }
}
}); });
console.log(aa); console.log(aa);
if (bb == 1) { if (bb == 1) {
...@@ -917,6 +926,8 @@ const AddModal = props => { ...@@ -917,6 +926,8 @@ const AddModal = props => {
} else { } else {
setIsVisible(false); setIsVisible(false);
let inputText = { ...inputValue }; let inputText = { ...inputValue };
console.log(inputText);
console.log(prop.str);
inputText[prop.pickItem] = prop.str; inputText[prop.pickItem] = prop.str;
setCheckedList1(prop.checkedList); setCheckedList1(prop.checkedList);
setInputValue(inputText); setInputValue(inputText);
...@@ -990,11 +1001,11 @@ const AddModal = props => { ...@@ -990,11 +1001,11 @@ const AddModal = props => {
} }
} }
}); });
if (a.length > 0) { // if (a.length > 0) {
pp.外部字段 = a; // pp.外部字段 = a;
console.log(pp); // console.log(pp);
arr.push('外部字段'); // arr.push('外部字段');
} // }
console.log(a); console.log(a);
console.log(pp); console.log(pp);
setFiled1(pp); setFiled1(pp);
......
...@@ -3,11 +3,23 @@ ...@@ -3,11 +3,23 @@
/* eslint-disable no-unused-expressions */ /* eslint-disable no-unused-expressions */
/* eslint-disable no-shadow */ /* eslint-disable no-shadow */
import React, { useState, useEffect, useCallback, useRef } from 'react'; import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Modal, Space, Divider, Radio, Checkbox, Button } from 'antd'; import {
Form,
Modal,
Space,
Divider,
Radio,
Checkbox,
Button,
Tabs,
Pagination,
Input,
} from 'antd';
import Sortable from 'sortablejs'; import DragTable from '@/components/DragTable/DragTable';
import styles from './incident.less'; import styles from './incident.less';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const { TabPane } = Tabs;
const ChangeAddFlows = props => { const ChangeAddFlows = props => {
const { const {
callBackSubmit = () => {}, callBackSubmit = () => {},
...@@ -27,12 +39,86 @@ const ChangeAddFlows = props => { ...@@ -27,12 +39,86 @@ const ChangeAddFlows = props => {
const [indeterminate, setIndeterminate] = useState([]); const [indeterminate, setIndeterminate] = useState([]);
const [checkAll, setCheckAll] = useState([]); const [checkAll, setCheckAll] = useState([]);
const [selectData, setSelectData] = useState([]); const [selectData, setSelectData] = useState([]);
const [arrValue, setArrValue] = useState([]);
const [data, setData] = useState([]);
const [flagg, setFlagg] = useState(0);
const [type, setType] = useState(); // 是否全选
const [searchWord, setSearchWord] = useState(''); // 关键字
const { Search } = Input;
const [total, setTotal] = useState();
const [pageSize, setPageSize] = useState(10);
const [currentPage, setCurrentPage] = useState(1);
let objArr = []; let objArr = [];
const onChangeList1 = (list, index, title) => { const onChangeList1 = (list, index, title) => {
const checkedListArr = [...checkedList]; const checkedListArr = [...checkedList];
checkedListArr[index] = list; checkedListArr[index] = list;
// 将第一次打开回显数据先存成数组
let oldArr = [];
let addArr = [];
let newArr = [];
if (flagg == 0) {
arrValue.map((item, index) => {
oldArr = oldArr.concat(item);
});
console.log(oldArr);
// 将第一次打开回显数据存入已选择数组里
oldArr.map(item => {
newArr.push(item);
});
console.log(newArr);
// 获取本次新增数据后的数组
let objArr = [];
checkedListArr.map(item => {
objArr = objArr.concat(item);
});
console.log(objArr); // 本次增加数据后数组
console.log(arrValue); // 上次数组
// 获取新增数据
objArr.map((item1, index1) => {
if (arrValue.indexOf(item1) == -1) {
addArr.push(item1);
}
});
} else {
arrValue.map((item, index) => {
oldArr = oldArr.concat(item);
});
console.log(oldArr);
// 将第一次打开回显数据存入已选择数组里
oldArr.map(item => {
newArr.push(item);
});
console.log(newArr);
// 获取本次新增数据后的数组
let objArr = [];
checkedListArr.map(item => {
objArr = objArr.concat(item);
});
console.log(objArr); // 本次增加数据后数组
console.log(oldArr); // 上次数组
// 获取新增数据
objArr.map((item1, index1) => {
if (oldArr.indexOf(item1) == -1) {
addArr.push(item1);
}
});
}
// 将每次新增数据从尾部写入已选择数组里
console.log(addArr);
if (addArr.length != 0) {
addArr.map(item => {
newArr.push(item);
});
}
console.log(newArr);
// 保存此次所有数据顺序
setArrValue(newArr);
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
console.log(checkedListArr);
// setSelectData(checkedListArr);
const indeterminateArr = [...indeterminate]; const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll]; const checkAllArr = [...checkAll];
indeterminateArr[index] = indeterminateArr[index] =
...@@ -40,22 +126,37 @@ const ChangeAddFlows = props => { ...@@ -40,22 +126,37 @@ const ChangeAddFlows = props => {
checkAllArr[index] = list.length === filed1[title].length; checkAllArr[index] = list.length === filed1[title].length;
setIndeterminate(indeterminateArr); setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr); setCheckAll(checkAllArr);
setFlagg(0);
}; };
const onSubmit = () => { const onSubmit = () => {
console.log(selectData.join(',')); console.log(selectData);
console.log(pickItem); let aRR = [];
console.log(checkedList); selectData.map(item => {
console.log(typeof item);
if (typeof item == 'string') {
aRR = selectData;
} else {
console.log(112212);
console.log(item.name);
aRR.push(item.name);
console.log(63467246);
console.log(aRR);
}
});
console.log(aRR);
callBackSubmit({ callBackSubmit({
checkedList, checkedList,
str: selectData.join(','), str: aRR.join(','),
pickItem, pickItem,
stt: selectData, stt: aRR,
title, title,
filed22: filed1, filed22: filed1,
}); });
}; };
const onCheckAllChange = e => { const onCheckAllChange = e => {
setData(1);
const indeterminateArr = [...indeterminate]; const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll]; const checkAllArr = [...checkAll];
const checkedListArr = [...checkedList]; const checkedListArr = [...checkedList];
...@@ -65,24 +166,93 @@ const ChangeAddFlows = props => { ...@@ -65,24 +166,93 @@ const ChangeAddFlows = props => {
? (checkedListArr[e.target.index] = e.target.checkvalue) ? (checkedListArr[e.target.index] = e.target.checkvalue)
: (checkedListArr[e.target.index] = []); : (checkedListArr[e.target.index] = []);
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
setType(e.target.checked);
setIndeterminate(indeterminateArr); setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr); setCheckAll(checkAllArr);
}; };
useEffect(() => { useEffect(() => {
if (flagg == 0) {
selectAll();
}
if (data == 1) {
selectAll(); selectAll();
}
setData(0);
}, [checkedList]); }, [checkedList]);
const selectAll = () => { const selectAll = () => {
console.log(data);
console.log(checkedList);
objArr = []; objArr = [];
let lastArr = [];
checkedList.map(item => { checkedList.map(item => {
objArr = objArr.concat(item); objArr = objArr.concat(item);
}); });
setSelectData(objArr); console.log(arrValue);
console.log(objArr);
if (data == 1) {
let newArr = [];
arrValue.map(item => {
if (item.name == undefined) {
newArr = arrValue;
} else {
newArr = arrValue.map(item => item.name);
}
});
console.log(newArr);
if (type == false) {
newArr.map(item => {
if (objArr.indexOf(item) != -1) {
lastArr.push(item);
}
});
let newArr1 = lastArr.map(item => ({ name: item }));
if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = [];
}
console.log(newArr1);
setSelectData(newArr1);
setArrValue(lastArr);
} else {
let addArr = [];
objArr.map(item => {
if (newArr.indexOf(item) == -1) {
addArr.push(item);
}
});
console.log(addArr);
addArr.map(item => {
newArr.push(item);
});
console.log(newArr);
let newArr1 = newArr.map(item => ({ name: item }));
if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = [];
}
console.log(newArr1);
setSelectData(newArr1);
setArrValue(newArr);
}
} else {
arrValue.map(item => {
if (objArr.indexOf(item) != -1) {
lastArr.push(item);
}
});
let newArr1 = lastArr.map(item => ({ name: item }));
if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = [];
}
console.log(lastArr);
console.log(newArr1);
setSelectData(newArr1);
setArrValue(lastArr);
}
}; };
useEffect(() => { useEffect(() => {
console.log(characterValue); if (visible) {
console.log(pickItem); setFlagg(1);
console.log(filed1); console.log(filed1);
let arr = Object.keys(filed1); let arr = Object.keys(filed1);
console.log(arr, 'arr'); console.log(arr, 'arr');
...@@ -91,12 +261,7 @@ const ChangeAddFlows = props => { ...@@ -91,12 +261,7 @@ const ChangeAddFlows = props => {
let indeterminateArr = []; let indeterminateArr = [];
let checkAllArr = []; let checkAllArr = [];
console.log(newCheckedList); console.log(newCheckedList);
// let b = []
// let a = []
arr.map((item, index) => { arr.map((item, index) => {
// filed1[item].map((i, j) => {
// b.push(i)
// })
checkArr[index] = []; checkArr[index] = [];
newCheckedList.map(checkItem => { newCheckedList.map(checkItem => {
if (filed1[item].includes(checkItem)) { if (filed1[item].includes(checkItem)) {
...@@ -109,56 +274,67 @@ const ChangeAddFlows = props => { ...@@ -109,56 +274,67 @@ const ChangeAddFlows = props => {
); );
checkAllArr.push(checkArr[index].length === filed1[item].length); checkAllArr.push(checkArr[index].length === filed1[item].length);
}); });
// newCheckedList.map((item, index) => {
// if (b.includes(item) == false) {
// if(item == ''){
// a=[]
// }else{
// a.push(item)
// }
// }
// })
// if(a.length >0){
// filed1.外部字段 = a
// console.log(filed1)
// arr.push('外部字段')
// }
// setTitle(arr)
// checkArr.push(a)
console.log(checkArr);
setCheckedList(checkArr); setCheckedList(checkArr);
setIndeterminate(indeterminateArr); setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr); setCheckAll(checkAllArr);
console.log(characterValue);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr); console.log(newArr);
draftSort(); let newArr1 = newCheckedList.map(item => ({ name: item }));
if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = [];
}
console.log(newArr1);
setSelectData(newArr1);
setArrValue(newArr1);
} else {
setSelectData([]);
setArrValue([]);
}
}, [visible]); }, [visible]);
const dragCallBack = arr => {
console.log(arr);
// 拖拽初始化及逻辑 if (arr) {
const draftSort = () => { console.log(111);
let el = document.getElementById('doctor-drag-items');
if (el) {
let sortable = Sortable.create(el, {
animation: 100, // 动画参数
onEnd(evt) {
// 拖拽完毕之后发生,只需关注该事件
let arr = [];
let len = evt.from.children.length;
for (let i = 0; i < len; i++) {
arr.push(evt.from.children[i].getAttribute('drag-id'));
}
setSelectData(arr); setSelectData(arr);
}, let newArr = arr.map(item => item.name);
}); console.log(newArr);
setArrValue(newArr);
} }
}; };
const submitSearchUser = () => {};
// 获取搜索框的值
const handleSearch = e => {
setSearchWord(e.target.value);
};
// 监听分页
const paginationChange = (page, pageSizes) => {
// 分页时清空复选框
setCurrentPage(page);
setPageSize(pageSizes);
// let username = form.getFieldValue('username');
// getData(username, page, pageSizes);
};
const columns = [
{
title: '已选列表',
dataIndex: 'name',
width: 150,
key: 'name',
},
];
return ( return (
<Modal <Modal
title="部门或角色" title="权限选择"
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', height: '650px', overflowY: 'scorll' }}
width="1400px" width="1000px"
style={{ top: '10px' }}
destroyOnClose destroyOnClose
centered centered
cancelText="取消" cancelText="取消"
...@@ -168,20 +344,36 @@ const ChangeAddFlows = props => { ...@@ -168,20 +344,36 @@ const ChangeAddFlows = props => {
forceRender forceRender
getContainer={false} getContainer={false}
> >
<Search
style={{
width: 260,
marginRight: '20px',
marginBottom: '10px',
}}
placeholder="搜索"
onSearch={submitSearchUser}
onChange={e => handleSearch(e)}
enterButton
value={searchWord}
/>
<Button
type="primary"
htmlType="submit"
// onClick={() => {
// setCurrentPage(1);
// getData('', 1, pageSize);
// form.setFieldsValue({ username: '' });
// }}
>
重置
</Button>
{visible && ( {visible && (
<div className={styles.listCard1}> <div className={styles.listCard1}>
<div <div className={styles.cardItem1}>
className={styles.cardItem1}
style={{ borderRight: '1px solid #99bbe8' }}
>
<Divider
orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
>
待选部门站点角色
</Divider>
<div className={styles.cardContent1}> <div className={styles.cardContent1}>
<Tabs defaultActiveKey="0" className={styles.tab}>
{title.map((item, index) => ( {title.map((item, index) => (
<TabPane tab={item} key={index}>
<div className={styles.cardItemData1} key={index}> <div className={styles.cardItemData1} key={index}>
<Divider <Divider
orientation="left" orientation="left"
...@@ -191,16 +383,15 @@ const ChangeAddFlows = props => { ...@@ -191,16 +383,15 @@ const ChangeAddFlows = props => {
borderTopColor: '#99bbe8', borderTopColor: '#99bbe8',
}} }}
> >
{item}{' '}
<Checkbox <Checkbox
indeterminate={indeterminate[index]} indeterminate={indeterminate[index]}
onChange={onCheckAllChange} onChange={onCheckAllChange}
index={index} index={index}
checkvalue={filed1[item]} checkvalue={filed1[item]}
checked={checkAll[index]} checked={checkAll[index]}
> style={{ marginRight: '7px' }}
{' '} />
</Checkbox> {item}
</Divider> </Divider>
<CheckboxGroup <CheckboxGroup
options={filed1[item]} options={filed1[item]}
...@@ -208,51 +399,37 @@ const ChangeAddFlows = props => { ...@@ -208,51 +399,37 @@ const ChangeAddFlows = props => {
onChange={e => onChangeList1(e, index, item)} onChange={e => onChangeList1(e, index, item)}
/> />
</div> </div>
</TabPane>
))} ))}
</Tabs>
</div> </div>
</div> </div>
{/* <div className={styles.cardItem}> <div className={styles.cardItem11}>
<Divider <DragTable
orientation="left" bordered
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }} style={{ marginBottom: '10px' }}
> rowKey={record => record.name}
已选列表 columns={columns}
</Divider> dataSource={selectData}
<div className={styles.cardContent}> pagination={false}
<div className={styles.doctorTable}> size="small"
<table> dragCallBack={dragCallBack}
<thead> ItemTypes="stadingOrder"
<tr> />
<td>字段名</td>
</tr>
</thead>
<tbody id="doctor-drag-items">
{selectData && selectData.length > 0 ? (
selectData.map((item, index) => (
<tr
drag-id={item}
key={index}
style={{ cursor: 'move' }}
>
<td>
<span title={item}>{item}</span>
</td>
</tr>
))
) : (
<tr>
<td colSpan="10" style={{ textAlign: 'center' }}>
暂无数据
</td>
</tr>
)}
</tbody>
</table>
</div>
</div> </div>
</div> */}
</div> </div>
)} )}
<Pagination
total={total}
showTotal={item => `共 ${item} 条`}
defaultPageSize={pageSize}
defaultCurrent={1}
current={currentPage}
onChange={paginationChange}
style={{ marginBottom: '10px' }}
size="small"
showQuickJumper
/>
</Modal> </Modal>
); );
}; };
......
/* eslint-disable react/jsx-no-undef */
/* eslint-disable valid-typeof */
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
/* eslint-disable consistent-return */ /* eslint-disable consistent-return */
/* eslint-disable no-shadow */ /* eslint-disable no-shadow */
...@@ -7,14 +9,27 @@ ...@@ -7,14 +9,27 @@
/* eslint-disable eqeqeq */ /* eslint-disable eqeqeq */
/* eslint-disable no-plusplus */ /* eslint-disable no-plusplus */
import React, { useState, useEffect, useCallback, useRef } from 'react'; import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Modal, Divider, Checkbox } from 'antd'; import {
Form,
Modal,
Divider,
Checkbox,
Tabs,
Input,
Button,
Pagination,
} from 'antd';
import DragTable from '@/components/DragTable/DragTable'; import DragTable from '@/components/DragTable/DragTable';
import Sortable from 'sortablejs'; import Sortable from 'sortablejs';
import { add } from 'lodash-es'; import { add } from 'lodash-es';
import styles from './incident.less'; import { string } from 'prop-types';
import { setServiceType } from '@/services/webConfig/api'; import { setServiceType } from '@/services/webConfig/api';
import { ContinuousLegend } from '@antv/g2/lib/dependents';
import { ConsoleSqlOutlined } from '@ant-design/icons';
import styles from './incident.less';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const { TabPane } = Tabs;
const AddModal = props => { const AddModal = props => {
const { const {
callBackSubmit = () => {}, callBackSubmit = () => {},
...@@ -41,6 +56,11 @@ const AddModal = props => { ...@@ -41,6 +56,11 @@ const AddModal = props => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [flagg, setFlagg] = useState(0); const [flagg, setFlagg] = useState(0);
const [type, setType] = useState(); // 是否全选 const [type, setType] = useState(); // 是否全选
const [searchWord, setSearchWord] = useState(''); // 关键字
const { Search } = Input;
const [total, setTotal] = useState();
const [pageSize, setPageSize] = useState(10);
const [currentPage, setCurrentPage] = useState(1);
let objArr = []; let objArr = [];
const onChangeList = (list, index, title) => { const onChangeList = (list, index, title) => {
...@@ -122,7 +142,72 @@ const AddModal = props => { ...@@ -122,7 +142,72 @@ const AddModal = props => {
const onChangeList1 = (list, index, title) => { const onChangeList1 = (list, index, title) => {
const checkedListArr = [...checkedList]; const checkedListArr = [...checkedList];
checkedListArr[index] = list; checkedListArr[index] = list;
// 将第一次打开回显数据先存成数组
let oldArr = [];
let addArr = [];
let newArr = [];
if (flagg == 0) {
arrValue.map((item, index) => {
oldArr = oldArr.concat(item);
});
console.log(oldArr);
// 将第一次打开回显数据存入已选择数组里
oldArr.map(item => {
newArr.push(item);
});
console.log(newArr);
// 获取本次新增数据后的数组
let objArr = [];
checkedListArr.map(item => {
objArr = objArr.concat(item);
});
console.log(objArr); // 本次增加数据后数组
console.log(arrValue); // 上次数组
// 获取新增数据
objArr.map((item1, index1) => {
if (arrValue.indexOf(item1) == -1) {
addArr.push(item1);
}
});
} else {
arrValue.map((item, index) => {
oldArr = oldArr.concat(item);
});
console.log(oldArr);
// 将第一次打开回显数据存入已选择数组里
oldArr.map(item => {
newArr.push(item);
});
console.log(newArr);
// 获取本次新增数据后的数组
let objArr = [];
checkedListArr.map(item => {
objArr = objArr.concat(item);
});
console.log(objArr); // 本次增加数据后数组
console.log(oldArr); // 上次数组
// 获取新增数据
objArr.map((item1, index1) => {
if (oldArr.indexOf(item1) == -1) {
addArr.push(item1);
}
});
}
// 将每次新增数据从尾部写入已选择数组里
console.log(addArr);
if (addArr.length != 0) {
addArr.map(item => {
newArr.push(item);
});
}
console.log(newArr);
// 保存此次所有数据顺序
setArrValue(newArr);
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
console.log(checkedListArr);
// setSelectData(checkedListArr);
const indeterminateArr = [...indeterminate]; const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll]; const checkAllArr = [...checkAll];
indeterminateArr[index] = indeterminateArr[index] =
...@@ -130,9 +215,22 @@ const AddModal = props => { ...@@ -130,9 +215,22 @@ const AddModal = props => {
checkAllArr[index] = list.length === filed1[title].length; checkAllArr[index] = list.length === filed1[title].length;
setIndeterminate(indeterminateArr); setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr); setCheckAll(checkAllArr);
setFlagg(0);
}; };
const onSubmit1 = () => { const onSubmit1 = () => {
console.log(selectData);
let aRR = [];
selectData.map(item => {
console.log(typeof item);
if (typeof item == 'string') {
console.log(1111);
aRR = selectData;
} else {
aRR.push(item.name);
}
});
console.log(aRR);
let newArr = selectData.map(item => item.name); let newArr = selectData.map(item => item.name);
isType === 'rule' isType === 'rule'
? callBackSubmit( ? callBackSubmit(
...@@ -142,9 +240,9 @@ const AddModal = props => { ...@@ -142,9 +240,9 @@ const AddModal = props => {
) )
: callBackSubmit({ : callBackSubmit({
checkedList, checkedList,
str: newArr.join(','), str: aRR.join(','),
pickItem, pickItem,
stt: newArr, stt: aRR,
title, title,
filed22: filed1, filed22: filed1,
isType, isType,
...@@ -152,6 +250,22 @@ const AddModal = props => { ...@@ -152,6 +250,22 @@ const AddModal = props => {
}; };
const onSubmit = () => { const onSubmit = () => {
console.log(selectData);
let aRR = [];
selectData.map(item => {
console.log(typeof item);
if (typeof item == 'string') {
aRR = selectData;
} else {
console.log(112212);
console.log(item.name);
aRR.push(item.name);
console.log(63467246);
console.log(aRR);
}
});
console.log(aRR);
isType === 'rule' isType === 'rule'
? callBackSubmit( ? callBackSubmit(
`${ `${
...@@ -160,22 +274,20 @@ const AddModal = props => { ...@@ -160,22 +274,20 @@ const AddModal = props => {
) )
: callBackSubmit({ : callBackSubmit({
checkedList, checkedList,
str: selectData.join(','), str: aRR.join(','),
pickItem, pickItem,
stt: selectData, stt: aRR,
title, title,
filed22: filed1, filed22: filed1,
isType, isType,
}); });
}; };
const onCheckAllChange1 = e => { const onCheckAllChange1 = e => {
console.log(11212123213);
setData(1); setData(1);
const indeterminateArr = [...indeterminate]; const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll]; const checkAllArr = [...checkAll];
const checkedListArr = [...checkedList]; const checkedListArr = [...checkedList];
checkAllArr[e.target.index] = e.target.checked; checkAllArr[e.target.index] = e.target.checked;
console.log(e.target.checked);
indeterminateArr[e.target.index] = false; indeterminateArr[e.target.index] = false;
e.target.checked e.target.checked
? (checkedListArr[e.target.index] = e.target.checkvalue) ? (checkedListArr[e.target.index] = e.target.checkvalue)
...@@ -187,6 +299,7 @@ const AddModal = props => { ...@@ -187,6 +299,7 @@ const AddModal = props => {
}; };
const onCheckAllChange = e => { const onCheckAllChange = e => {
setData(1);
const indeterminateArr = [...indeterminate]; const indeterminateArr = [...indeterminate];
const checkAllArr = [...checkAll]; const checkAllArr = [...checkAll];
const checkedListArr = [...checkedList]; const checkedListArr = [...checkedList];
...@@ -196,6 +309,7 @@ const AddModal = props => { ...@@ -196,6 +309,7 @@ const AddModal = props => {
? (checkedListArr[e.target.index] = e.target.checkvalue) ? (checkedListArr[e.target.index] = e.target.checkvalue)
: (checkedListArr[e.target.index] = []); : (checkedListArr[e.target.index] = []);
setCheckedList(checkedListArr); setCheckedList(checkedListArr);
setType(e.target.checked);
setIndeterminate(indeterminateArr); setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr); setCheckAll(checkAllArr);
}; };
...@@ -210,16 +324,17 @@ const AddModal = props => { ...@@ -210,16 +324,17 @@ const AddModal = props => {
}, [checkedList]); }, [checkedList]);
const selectAll = () => { const selectAll = () => {
console.log(data);
console.log(checkedList);
objArr = []; objArr = [];
let lastArr = []; let lastArr = [];
// 处理未排序的勾选数据扁平化
checkedList.map(item => { checkedList.map(item => {
objArr = objArr.concat(item); objArr = objArr.concat(item);
}); });
console.log(arrValue); console.log(arrValue);
console.log(objArr); console.log(objArr);
// 判断是否操作全部勾选的复选框
if (data == 1) { if (data == 1) {
// 处理上次选中改变顺序后的数据扁平化
let newArr = []; let newArr = [];
arrValue.map(item => { arrValue.map(item => {
if (item.name == undefined) { if (item.name == undefined) {
...@@ -229,7 +344,9 @@ const AddModal = props => { ...@@ -229,7 +344,9 @@ const AddModal = props => {
} }
}); });
console.log(newArr); console.log(newArr);
// 判断是否为全选
if (type == false) { if (type == false) {
// 判断上次有顺序的数据是否包含这次未排序已选列表数据
newArr.map(item => { newArr.map(item => {
if (objArr.indexOf(item) != -1) { if (objArr.indexOf(item) != -1) {
lastArr.push(item); lastArr.push(item);
...@@ -239,10 +356,12 @@ const AddModal = props => { ...@@ -239,10 +356,12 @@ const AddModal = props => {
if (newArr1.length === 1 && newArr1[0].name === '') { if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = []; newArr1 = [];
} }
console.log(lastArr);
console.log(newArr1); console.log(newArr1);
setSelectData(newArr1); setSelectData(newArr1);
setArrValue(lastArr); setArrValue(lastArr);
} else { } else {
// 全选状态时
let addArr = []; let addArr = [];
objArr.map(item => { objArr.map(item => {
if (newArr.indexOf(item) == -1) { if (newArr.indexOf(item) == -1) {
...@@ -259,11 +378,11 @@ const AddModal = props => { ...@@ -259,11 +378,11 @@ const AddModal = props => {
newArr1 = []; newArr1 = [];
} }
console.log(newArr1); console.log(newArr1);
setSelectData(newArr1); setSelectData(newArr1);
setArrValue(newArr); setArrValue(newArr);
} }
} else { } else {
// 判断扁平处理后的选中未排序列表数据是否存在于上次已选数组中
arrValue.map(item => { arrValue.map(item => {
if (objArr.indexOf(item) != -1) { if (objArr.indexOf(item) != -1) {
lastArr.push(item); lastArr.push(item);
...@@ -345,7 +464,13 @@ const AddModal = props => { ...@@ -345,7 +464,13 @@ const AddModal = props => {
console.log(characterValue); console.log(characterValue);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
console.log(newArr); console.log(newArr);
setSelectData(newArr); let newArr1 = newCheckedList.map(item => ({ name: item }));
if (newArr1.length === 1 && newArr1[0].name === '') {
newArr1 = [];
}
console.log(newArr1);
setSelectData(newArr1);
setArrValue(newArr1);
} }
} else { } else {
setSelectData([]); setSelectData([]);
...@@ -355,30 +480,49 @@ const AddModal = props => { ...@@ -355,30 +480,49 @@ const AddModal = props => {
const dragCallBack = arr => { const dragCallBack = arr => {
console.log(arr); console.log(arr);
if (arr) { if (arr) {
console.log(111); console.log(111);
setSelectData(arr); setSelectData(arr);
let newArr = arr.map(item => item.name); let newArr = [];
arr.map(item => {
newArr.push(item.name);
});
console.log(newArr); console.log(newArr);
setArrValue(newArr); setArrValue(newArr);
} }
}; };
const submitSearchUser = () => {};
// 获取搜索框的值
const handleSearch = e => {
setSearchWord(e.target.value);
};
// 监听分页
const paginationChange = (page, pageSizes) => {
// 分页时清空复选框
setCurrentPage(page);
setPageSize(pageSizes);
// let username = form.getFieldValue('username');
// getData(username, page, pageSizes);
};
const columns = [ const columns = [
{ {
title: '字段名', title: '已选列表',
dataIndex: 'name', dataIndex: 'name',
width: 150, width: 150,
key: 'name', key: 'name',
}, },
]; ];
if (isType != 'app') { if (isType != 'app') {
return ( return (
<Modal <Modal
title="字段集选择" title="字段集选择"
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
width="700px" width="750px"
destroyOnClose destroyOnClose
centered centered
cancelText="取消" cancelText="取消"
...@@ -394,12 +538,12 @@ const AddModal = props => { ...@@ -394,12 +538,12 @@ const AddModal = props => {
className={styles.cardItem} className={styles.cardItem}
style={{ borderRight: '1px solid #99bbe8' }} style={{ borderRight: '1px solid #99bbe8' }}
> >
<Divider {/* <Divider
orientation="left" orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }} style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
> >
待选字段列表 待选字段列表
</Divider> </Divider> */}
{flag === 0 ? ( {flag === 0 ? (
<> <>
...@@ -468,12 +612,12 @@ const AddModal = props => { ...@@ -468,12 +612,12 @@ const AddModal = props => {
)} )}
</div> </div>
<div className={styles.cardItem}> <div className={styles.cardItem}>
<Divider {/* <Divider
orientation="left" orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }} style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
> >
已选字段列表 已选字段列表
</Divider> </Divider> */}
<div className={styles.cardContent}> <div className={styles.cardContent}>
<div className={styles.doctorTable}> <div className={styles.doctorTable}>
<DragTable <DragTable
...@@ -498,9 +642,9 @@ const AddModal = props => { ...@@ -498,9 +642,9 @@ const AddModal = props => {
if (isType === 'app') { if (isType === 'app') {
return ( return (
<Modal <Modal
title="部门或角色" title="权限选择"
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', height: '650px', overflowY: 'scorll' }}
width="1400px" width="1000px"
style={{ top: '10px' }} style={{ top: '10px' }}
destroyOnClose destroyOnClose
centered centered
...@@ -511,20 +655,36 @@ const AddModal = props => { ...@@ -511,20 +655,36 @@ const AddModal = props => {
forceRender forceRender
getContainer={false} getContainer={false}
> >
<Search
style={{
width: 260,
marginRight: '20px',
marginBottom: '10px',
}}
placeholder="搜索"
onSearch={submitSearchUser}
onChange={e => handleSearch(e)}
enterButton
value={searchWord}
/>
<Button
type="primary"
htmlType="submit"
// onClick={() => {
// setCurrentPage(1);
// getData('', 1, pageSize);
// form.setFieldsValue({ username: '' });
// }}
>
重置
</Button>
{visible && ( {visible && (
<div className={styles.listCard1}> <div className={styles.listCard1}>
<div <div className={styles.cardItem1}>
className={styles.cardItem1}
// style={{ borderRight: '1px solid #99bbe8' }}
>
<Divider
orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
>
待选部门站点角色
</Divider>
<div className={styles.cardContent1}> <div className={styles.cardContent1}>
<Tabs defaultActiveKey="0" className={styles.tab}>
{title.map((item, index) => ( {title.map((item, index) => (
<TabPane tab={item} key={index}>
<div className={styles.cardItemData1} key={index}> <div className={styles.cardItemData1} key={index}>
<Divider <Divider
orientation="left" orientation="left"
...@@ -550,11 +710,37 @@ const AddModal = props => { ...@@ -550,11 +710,37 @@ const AddModal = props => {
onChange={e => onChangeList1(e, index, item)} onChange={e => onChangeList1(e, index, item)}
/> />
</div> </div>
</TabPane>
))} ))}
</Tabs>
</div> </div>
</div> </div>
<div className={styles.cardItem11}>
<DragTable
bordered
style={{ marginBottom: '10px' }}
rowKey={record => record.name}
columns={columns}
dataSource={selectData}
pagination={false}
size="small"
dragCallBack={dragCallBack}
ItemTypes="stadingOrder"
/>
</div>
</div> </div>
)} )}
<Pagination
total={total}
showTotal={item => `共 ${item} 条`}
defaultPageSize={pageSize}
defaultCurrent={1}
current={currentPage}
onChange={paginationChange}
style={{ marginBottom: '10px' }}
size="small"
showQuickJumper
/>
</Modal> </Modal>
); );
} }
......
.ant-modal-close-x {
line-height: 35px;
}
.ant-btn .anticon.anticon-plus > svg {
margin-top: -5px;
}
.incidentContainer {
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.ant-modal-body {
padding: 0px 24px 0px 24px;
}
.linkDrowp {
position: absolute;
left: 93.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414e65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg,
.ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem {
background-color: #f5f6f9;
}
.contentContainers {
.ant-table table {
width: 100% !important;
overflow-x: scroll;
}
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
height: calc(100vh - 166px);
overflow-x: hidden;
border: none;
}
.orgContainer {
height: calc(100vh - 74px);
width: 250px;
left: 0;
top: 0;
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property: width, left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree {
padding-top: 6px;
.ant-tree-switcher {
line-height: 1;
margin-right: 0px !important;
color: #1890ff;
.ant-tree-switcher-line-icon {
margin-left: 5px;
}
}
}
.switcher {
display: block;
position: absolute;
font-size: 18px;
color: #1890ff !important;
top: 50%;
right: 2px;
transform: translate(0%, -50%);
z-index: 1;
}
}
.orgContainerHide {
// transform: translateX(-230px);
left: 0px;
top: 0;
width: 26px;
}
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer {
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
background: white;
width: 100%;
position: relative;
transition: width 0.5s;
.title {
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-pagination {
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn {
margin: 0px 10px;
.ant-btn-primary {
background: #50aefc;
}
}
.ant-input-search-button {
margin-left: 0px !important;
}
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
background-color: #f6f9fe;
}
.ant-table-cell {
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-body {
height: calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle {
background: #cfe7fd;
}
.ant-pagination {
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
.icon {
margin-top: -5px !important;
vertical-align: text-bottom;
}
}
.formData {
height: 38rem;
overflow-y: scroll;
.ant-form-item-label
> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: none;
}
.formData_label {
display: flex;
align-items: center;
}
.filed_listItem {
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
.ant-modal-root .ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 200px !important;
}
}
.listCard {
display: flex;
justify-content: space-around;
width: 100%;
.cardItem {
padding: 0.5rem;
width: 50%;
}
.cardContent {
height: 30rem;
overflow-y: scroll;
overflow-x: scroll;
width: 100%;
}
.cardItemData {
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
overflow-x: scroll;
}
}
.listCard1 {
width: 100%;
display: flex;
height: 34rem;
.cardItem1 {
border: 1px solid #b5b8c8;
padding: 0.5rem;
width: 70%;
}
.cardItem11 {
padding: 0rem 0.5rem;
width: 30%;
height: 34.5rem;
overflow-y: scroll;
overflow-x: scroll;
}
.cardContent1 {
height: 33rem;
overflow-y: scroll;
width: 100%;
display: flex;
justify-content: space-around;
}
.tab {
width: 100%;
}
.cardItemData1 {
padding: 0rem 1rem;
margin-bottom: 1rem;
width: 100%;
height: 28rem;
}
}
.doctorTable {
margin-bottom: 16px;
}
.ant-drawer-footer {
display: flex;
justify-content: flex-end;
}
.config {
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title {
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn {
display: flex;
justify-content: flex-end;
width: 20rem;
}
.ant-btn {
display: flex;
align-items: center;
margin-left: 20px;
}
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px);
background: #ffffff;
.ant-table.ant-table-small
.ant-table-tbody
.ant-table-wrapper:only-child
.ant-table {
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container {
border: none;
}
.clickRowStyle {
background: #cfe7fd;
}
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
}
.panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem {
display: flex;
}
...@@ -76,38 +76,90 @@ const incident = () => { ...@@ -76,38 +76,90 @@ const incident = () => {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 150, width: 150,
render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '事件主表', title: '事件主表',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
width: 200, width: 200,
ellipsis: true, render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '编码', title: '编码',
dataIndex: 'code', dataIndex: 'code',
key: 'code', key: 'code',
width: 50, width: 80,
render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '摘要字段', title: '摘要字段',
dataIndex: 'summaryFields', dataIndex: 'summaryFields',
key: 'summaryFields', key: 'summaryFields',
width: 200, width: 100,
ellipsis: true, render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '权限', title: '权限',
dataIndex: 'roles', dataIndex: 'roles',
key: 'roles', key: 'roles',
width: 50, width: 50,
render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '流程', title: '流程',
dataIndex: 'flowCount', dataIndex: 'flowCount',
key: 'flowCount', key: 'flowCount',
width: 50, width: 50,
render: record => {
if (record) {
return (
<Tooltip placement="topLeft" title={record}>
{record}
</Tooltip>
);
}
},
}, },
{ {
title: '上报', title: '上报',
...@@ -119,23 +171,35 @@ const incident = () => { ...@@ -119,23 +171,35 @@ const incident = () => {
title: '上报字段', title: '上报字段',
dataIndex: 'reportFields', dataIndex: 'reportFields',
key: 'reportFields', key: 'reportFields',
width: 100, width: 80,
render: item => ( render: record => {
<span style={{ color: 'grey' }} key={item}> if (record) {
{item} return (
<Tooltip placement="topLeft" title={record}>
<span style={{ color: 'grey' }} key={record}>
{record}
</span> </span>
), </Tooltip>
);
}
},
}, },
{ {
title: '显示字段', title: '显示字段',
dataIndex: 'displayFields', dataIndex: 'displayFields',
key: 'displayFields', key: 'displayFields',
width: 100, width: 80,
render: item => ( render: record => {
<span style={{ color: 'grey' }} key={item}> if (record) {
{item} return (
<Tooltip placement="topLeft" title={record}>
<span style={{ color: 'grey' }} key={record}>
{record}
</span> </span>
), </Tooltip>
);
}
},
}, },
{ {
...@@ -153,7 +217,7 @@ const incident = () => { ...@@ -153,7 +217,7 @@ const incident = () => {
title: '编辑字段', title: '编辑字段',
dataIndex: 'editableFields', dataIndex: 'editableFields',
key: 'editableFields', key: 'editableFields',
width: 100, width: 80,
render: item => ( render: item => (
<div <div
ref={r => { ref={r => {
...@@ -168,7 +232,7 @@ const incident = () => { ...@@ -168,7 +232,7 @@ const incident = () => {
title: '上报方式', title: '上报方式',
dataIndex: 'createMode', dataIndex: 'createMode',
key: 'createMode', key: 'createMode',
width: 100, width: 80,
}, },
// { // {
// title: '置顶条件', // title: '置顶条件',
...@@ -500,12 +564,12 @@ const incident = () => { ...@@ -500,12 +564,12 @@ const incident = () => {
</div> </div>
<div className={styles.switcher}> <div className={styles.switcher}>
{treeVisible && ( {treeVisible && (
<Tooltip title="隐藏机构列表"> <Tooltip title="隐藏事件列表">
<DoubleLeftOutlined onClick={() => setTreeVisible(false)} /> <DoubleLeftOutlined onClick={() => setTreeVisible(false)} />
</Tooltip> </Tooltip>
)} )}
{!treeVisible && ( {!treeVisible && (
<Tooltip title="显示机构列表"> <Tooltip title="显示事件列表">
<DoubleRightOutlined onClick={() => setTreeVisible(true)} /> <DoubleRightOutlined onClick={() => setTreeVisible(true)} />
</Tooltip> </Tooltip>
)} )}
...@@ -547,7 +611,7 @@ const incident = () => { ...@@ -547,7 +611,7 @@ const incident = () => {
})} })}
columns={columns} columns={columns}
dataSource={tableData[pickItem]} dataSource={tableData[pickItem]}
// scroll={{ y: 'calc(100vh - 155px)', x: 'max-content' }} scroll={{ y: 'calc(100vh - 155px)', x: 'max-content' }}
pagination={{ pagination={{
showTotal: (total, range) => showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`, `第${range[0]}-${range[1]} 条/共 ${total} 条`,
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
.ant-card-body { .ant-card-body {
padding: 12px 24px 24px 24px; padding: 12px 24px 24px 24px;
} }
.ant-modal-body {
padding: 0px 24px 0px 24px;
}
.linkDrowp { .linkDrowp {
position: absolute; position: absolute;
left: 93.5%; left: 93.5%;
...@@ -36,6 +38,10 @@ ...@@ -36,6 +38,10 @@
background-color: #f5f6f9; background-color: #f5f6f9;
} }
.contentContainers { .contentContainers {
.ant-table table {
width: 100% !important;
overflow-x: scroll;
}
display: flex; display: flex;
width: 100%; width: 100%;
position: relative; position: relative;
...@@ -129,7 +135,7 @@ ...@@ -129,7 +135,7 @@
.ant-table-cell { .ant-table-cell {
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
// text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.ant-table-body { .ant-table-body {
...@@ -204,10 +210,20 @@ ...@@ -204,10 +210,20 @@
} }
} }
.listCard1 { .listCard1 {
width: 100%;
display: flex; display: flex;
height: 34rem;
.cardItem1 { .cardItem1 {
border: 1px solid #b5b8c8;
padding: 0.5rem; padding: 0.5rem;
width: 100%; width: 70%;
}
.cardItem11 {
padding: 0rem 0.5rem;
width: 30%;
height: 34.5rem;
overflow-y: scroll;
overflow-x: scroll;
} }
.cardContent1 { .cardContent1 {
height: 33rem; height: 33rem;
...@@ -216,12 +232,14 @@ ...@@ -216,12 +232,14 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.tab {
width: 100%;
}
.cardItemData1 { .cardItemData1 {
padding: 1rem; padding: 0rem 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem; margin-bottom: 1rem;
width: 33.3%; width: 100%;
overflow-x: scroll; height: 28rem;
} }
} }
.doctorTable { .doctorTable {
......
...@@ -49,7 +49,7 @@ const GateConfig = () => { ...@@ -49,7 +49,7 @@ const GateConfig = () => {
> >
<img src={configuration} style={{ height: '16px' }} alt="" /> <img src={configuration} style={{ height: '16px' }} alt="" />
<span style={{ marginLeft: '10px', fontWeight: 'bold' }}> <span style={{ marginLeft: '10px', fontWeight: 'bold' }}>
服务管理 网关配置
</span> </span>
</div> </div>
<Divider /> <Divider />
...@@ -66,7 +66,7 @@ const GateConfig = () => { ...@@ -66,7 +66,7 @@ const GateConfig = () => {
marginRight: '-10px', marginRight: '-10px',
}} }}
> >
服务运行 网关开启
</div> </div>
</Col> </Col>
<Col span={22}> <Col span={22}>
......
...@@ -187,7 +187,7 @@ const AddModal = props => { ...@@ -187,7 +187,7 @@ const AddModal = props => {
title={isType === 'rule' ? '选择验证规则' : '字段集选择'} title={isType === 'rule' ? '选择验证规则' : '字段集选择'}
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '10px' }} style={{ top: '10px' }}
width="700px" width="750px"
centered centered
maskClosable={false} maskClosable={false}
cancelText="取消" cancelText="取消"
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
.cardContent { .cardContent {
height: 40rem; height: 40rem;
overflow-y: scroll; overflow-y: scroll;
width: 19.5rem; width: 21rem;
} }
.cardItemData { .cardItemData {
padding: 1rem; padding: 1rem;
......
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
.ant-checkbox-group .ant-checkbox-group-item { .ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important; margin-right: 0px !important;
min-width: 200px !important; min-width: 300px !important;
} }
.ant-tree-list-holder { .ant-tree-list-holder {
......
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