Commit 53182d38 authored by 田翔's avatar 田翔

fix: 代码修复

parent 3f732e45
Pipeline #84508 waiting for manual action with stages
......@@ -35,7 +35,7 @@ import {
loadUnattachedTables,
LoadLedgers,
} from '@/services/tablemanager/tablemanager';
// import { FormDesigner } from 'panda-xform';
import { FormDesigner } from 'panda-xform';
import { useHistory } from 'react-router-dom';
import FieldEditor from './fieldEditor';
import AffiliateAdd from '../components/Field/affiliateAdd';
......@@ -101,7 +101,6 @@ const AddModal = props => {
});
LayerSetting({ client: 'sandbox' }).then(res => {
let dataArea = res.data.find(i => i.layerType == 'PipenetLayer');
console.log(res.data[0]);
let ss = {
layers: [dataArea],
};
......@@ -128,14 +127,12 @@ const AddModal = props => {
}).then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
console.log(res.data.root);
let arrlist = [];
let data = {};
let listArr = [];
res.data.root.map(i => {
arrlist.push(i.name);
});
console.log(arrlist);
setKeepTree(arrlist);
data.TableFieldNames = arrlist;
data.TableName = treeSelectValue.substring(0, treeSelectValue.lastIndexOf('@'));
......@@ -154,7 +151,6 @@ const AddModal = props => {
let arrdata = [];
let flowNodeMeta = {};
Object.keys(arr).forEach((item, index) => {
console.log(arr[item]);
arr[item].map(i => {
i.fieldName = i.name;
i.configInfo = i.config;
......@@ -174,8 +170,6 @@ const AddModal = props => {
flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle;
console.log(list);
let tablesSchema = {
child: {},
groups: list.flowNodeMeta.groups,
......@@ -184,7 +178,6 @@ const AddModal = props => {
relationForm: {},
};
setTablesSchema(tablesSchema);
console.log(newArr);
setKeepTreeFirst(bb);
setTreeData(aa);
setSelectGroup(newArr);
......@@ -201,7 +194,6 @@ const AddModal = props => {
}).then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
console.log(res.data.root);
let result = {};
// result.
let arrlist = [];
......@@ -210,7 +202,6 @@ const AddModal = props => {
res.data.root.map(i => {
arrlist.push(i.name);
});
console.log(arrlist);
setKeepTree(arrlist);
data.TableFieldNames = arrlist;
data.TableName = props.tableInfo.id;
......@@ -228,7 +219,6 @@ const AddModal = props => {
let arrdata = [];
let flowNodeMeta = {};
Object.keys(arr).forEach((item, index) => {
console.log(arr[item]);
arr[item].map(i => {
i.fieldName = i.name;
i.configInfo = i.config;
......@@ -248,8 +238,6 @@ const AddModal = props => {
flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle;
console.log(list);
let tablesSchema = {
child: {},
groups: list.flowNodeMeta.groups,
......@@ -258,9 +246,6 @@ const AddModal = props => {
relationForm: {},
};
setTablesSchema(tablesSchema);
console.log(aa, 'aaaaaaaaaaaaa');
console.log(arr);
console.log(newArr);
setSelectGroup(newArr);
setKeepTreeFirst(bb);
setTreeData(aa);
......@@ -315,7 +300,6 @@ const AddModal = props => {
// 返回上一级
const back = () => {
console.log(props.tableInfo);
let {
template,
tableScroll,
......@@ -325,8 +309,6 @@ const AddModal = props => {
searchValue,
select,
} = props.tableInfo;
console.log(keepValue);
console.log(pickIndex, groupArr, 'back');
history.push({
pathname: '/biz/account/table',
query: {
......@@ -342,14 +324,11 @@ const AddModal = props => {
};
const treeSelectOnchange = e => {
console.log(e);
if (e) {
setTreeLoading(true);
console.log('切换');
setSelectedRowKeys([]);
setMultiOperate(true);
setTreeSelectValue(e);
console.log(e.substring(0, e.lastIndexOf('@')));
let ss = e.substring(0, e.lastIndexOf('@'));
setFormObj(e.substring(0, e.lastIndexOf('@')));
reloadTableFields({
......@@ -363,13 +342,11 @@ const AddModal = props => {
res.data.root.map(i => {
arrlist.push(i.name);
});
console.log(arrlist);
setKeepTree(arrlist);
data.TableFieldNames = arrlist;
data.TableName = e.substring(0, e.lastIndexOf('@'));
listArr.push(data);
setKeepTreeData(listArr);
console.log(res.data.root);
let arr = formateArrDataA(res.data.root, 'group');
let newArr = [];
Object.keys(arr).map((item, index) => {
......@@ -403,8 +380,6 @@ const AddModal = props => {
flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle;
console.log(list);
let tablesSchema = {
child: {},
groups: list.flowNodeMeta.groups,
......@@ -554,7 +529,7 @@ const AddModal = props => {
{/* <Spin tip="loading..." spinning={treeLoading}> */}
<div className={styles.containerBox}>
<div style={{ width: '100%', height: 'calc(100% - 63px)', padding: '10px' }}>
{/* {formObj && <FormDesigner ref={formRef} tableName={formObj} />} */}
{formObj && <FormDesigner ref={formRef} tableName={formObj} />}
</div>
</div>
{/* </Spin> */}
......
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