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

fix: 代码修复

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