Commit 3114ba3c authored by 邓超's avatar 邓超

fix: 修改表字段分组排序

parent 425183f2
Pipeline #55838 passed with stages
......@@ -53,6 +53,7 @@ import AffiliateAdd from './components/Field/affiliateAdd';
import LoadGroup from './components/Field/loadGroup';
import LoadGroupNew from './components/Field/loadGroupNew';
import { defaultFields } from './components/defaultFields';
import { Ellipse } from 'bizcharts/lib/g-components';
const { Search } = Input;
const { Option } = Select;
const placeholder = '请输入表名';
......@@ -245,11 +246,21 @@ const TableManager = props => {
let newArr = [];
let aa = [];
let bb = [];
console.log(groupData, 'groupData');
// 对分组进行排序
const sortNameArr = ['事件表', '工单表', '台账表', '设备表', '反馈表', '其他表'];
const sortList = [];
sortNameArr.forEach(ele => {
Object.keys(groupData).map((item, index) => {
if (item === ele) {
newArr.push({ type: item, key: index, page: 1, pageSize: 20 });
aa.push({ name: item, key: index, ID: index, children: groupData[item] });
bb.push(item);
}
});
});
console.log(sortList, 'sortList');
setAllData(groupData);
if (!props.history.location.query || initNum.current > 0) {
if (newArr.length > 0 && (!select || isSearch)) {
......@@ -471,8 +482,12 @@ const TableManager = props => {
const getNewGroup = () => {
regroupTableType().then(res => {
if (res.code === 0) {
setFlag(flag + 1);
// setFlag(flag + 1);
setgGroupPopVisible(false);
loadTable(searchValue, 'search');
setSelectTableName('');
setPickIndex(0);
setSelect(groupArr[0].type);
notification.success({ message: '提示', duration: 3, description: '执行成功' });
}
});
......@@ -498,7 +513,7 @@ const TableManager = props => {
<div style={{ display: `${treeVisible ? 'block' : 'none'}` }}>
<span className={styles.processTitle}>
表分组
<Tooltip title="检查表类型重分组">
<Tooltip title="表类型重新分组检查">
<ToolOutlined
onClick={() => checkGroup()}
style={{
......@@ -689,7 +704,7 @@ const TableManager = props => {
/>
)}
<Modal
title="重分组表类型"
title="确定要进行表类型重新分组吗?"
visible={groupPopVisible}
onOk={getNewGroup}
onCancel={() => setgGroupPopVisible(false)}
......
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