Commit 4184aa98 authored by 涂伟's avatar 涂伟

fix: '注释弹窗全屏'

parent 8c561103
Pipeline #68985 passed with stages
...@@ -115,9 +115,9 @@ const AddModal = props => { ...@@ -115,9 +115,9 @@ const AddModal = props => {
}, []); }, []);
useEffect(() => { useEffect(() => {
if (props.tableInfo.id) { if (props.location.state.id) {
setSelectTreeData(props.tableInfo.keepData); setSelectTreeData(props.location.state.keepData);
setSelectDataFirst(props.tableInfo.keepTreeFirst); setSelectDataFirst(props.location.state.keepTreeFirst);
if (treeSelectValue) { if (treeSelectValue) {
let ss = treeSelectValue.substring(0, treeSelectValue.lastIndexOf('@')); let ss = treeSelectValue.substring(0, treeSelectValue.lastIndexOf('@'));
setFormObj(treeSelectValue.substring(0, treeSelectValue.lastIndexOf('@'))); setFormObj(treeSelectValue.substring(0, treeSelectValue.lastIndexOf('@')));
...@@ -158,7 +158,7 @@ const AddModal = props => { ...@@ -158,7 +158,7 @@ const AddModal = props => {
i.fieldName = i.name; i.fieldName = i.name;
i.configInfo = i.config; i.configInfo = i.config;
i.presetValue = i.preset == '(无)' ? '' : i.preset; i.presetValue = i.preset == '(无)' ? '' : i.preset;
i.showCss = props.tableInfo.template.tableStyle; i.showCss = props.location.state.template.tableStyle;
i.tableName = ss; i.tableName = ss;
i.uiGroup = item; i.uiGroup = item;
i.readOnly = i.readOnly == '是' ? 1 : 0; i.readOnly = i.readOnly == '是' ? 1 : 0;
...@@ -172,7 +172,7 @@ const AddModal = props => { ...@@ -172,7 +172,7 @@ const AddModal = props => {
}); });
flowNodeMeta.groups = arrdata; flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta; list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle; list.showCss = props.location.state.template.tableStyle;
console.log(list); console.log(list);
let tablesSchema = { let tablesSchema = {
...@@ -194,11 +194,11 @@ const AddModal = props => { ...@@ -194,11 +194,11 @@ const AddModal = props => {
} }
}); });
} else { } else {
let ss = props.tableInfo.id; let ss = props.location.state.id;
setFormObj(props.tableInfo.id); setFormObj(props.location.state.id);
setFormName(props.tableInfo.name); setFormName(props.location.state.name);
reloadTableFields({ reloadTableFields({
tableName: props.tableInfo.id, tableName: props.location.state.id,
}).then(res => { }).then(res => {
setTreeLoading(false); setTreeLoading(false);
if (res.msg === 'Ok') { if (res.msg === 'Ok') {
...@@ -214,7 +214,7 @@ const AddModal = props => { ...@@ -214,7 +214,7 @@ const AddModal = props => {
console.log(arrlist); console.log(arrlist);
setKeepTree(arrlist); setKeepTree(arrlist);
data.TableFieldNames = arrlist; data.TableFieldNames = arrlist;
data.TableName = props.tableInfo.id; data.TableName = props.location.state.id;
listArr.push(data); listArr.push(data);
setKeepTreeData(listArr); setKeepTreeData(listArr);
let arr = formateArrDataA(res.data.root, 'group'); let arr = formateArrDataA(res.data.root, 'group');
...@@ -234,7 +234,7 @@ const AddModal = props => { ...@@ -234,7 +234,7 @@ const AddModal = props => {
i.fieldName = i.name; i.fieldName = i.name;
i.configInfo = i.config; i.configInfo = i.config;
i.presetValue = i.preset == '(无)' ? '' : i.preset; i.presetValue = i.preset == '(无)' ? '' : i.preset;
i.showCss = props.tableInfo.template.tableStyle; i.showCss = props.location.state.template.tableStyle;
i.tableName = ss; i.tableName = ss;
i.uiGroup = item; i.uiGroup = item;
i.readOnly = i.readOnly == '是' ? 1 : 0; i.readOnly = i.readOnly == '是' ? 1 : 0;
...@@ -248,7 +248,7 @@ const AddModal = props => { ...@@ -248,7 +248,7 @@ const AddModal = props => {
}); });
flowNodeMeta.groups = arrdata; flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta; list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle; list.showCss = props.location.state.template.tableStyle;
console.log(list); console.log(list);
let tablesSchema = { let tablesSchema = {
...@@ -316,7 +316,7 @@ const AddModal = props => { ...@@ -316,7 +316,7 @@ const AddModal = props => {
// 返回上一级 // 返回上一级
const back = () => { const back = () => {
console.log(props.tableInfo); console.log(props.location.state);
let { let {
template, template,
tableScroll, tableScroll,
...@@ -325,7 +325,7 @@ const AddModal = props => { ...@@ -325,7 +325,7 @@ const AddModal = props => {
groupArr, groupArr,
searchValue, searchValue,
select, select,
} = props.tableInfo; } = props.location.state;
console.log(keepValue); console.log(keepValue);
console.log(pickIndex, groupArr, 'back'); console.log(pickIndex, groupArr, 'back');
history.push({ history.push({
...@@ -389,7 +389,7 @@ const AddModal = props => { ...@@ -389,7 +389,7 @@ const AddModal = props => {
i.fieldName = i.name; i.fieldName = i.name;
i.configInfo = i.config; i.configInfo = i.config;
i.presetValue = i.preset == '(无)' ? '' : i.preset; i.presetValue = i.preset == '(无)' ? '' : i.preset;
i.showCss = props.tableInfo.template.tableStyle; i.showCss = props.location.state.template.tableStyle;
i.tableName = ss; i.tableName = ss;
i.uiGroup = item; i.uiGroup = item;
i.readOnly = i.readOnly == '是' ? 1 : 0; i.readOnly = i.readOnly == '是' ? 1 : 0;
...@@ -403,7 +403,7 @@ const AddModal = props => { ...@@ -403,7 +403,7 @@ const AddModal = props => {
}); });
flowNodeMeta.groups = arrdata; flowNodeMeta.groups = arrdata;
list.flowNodeMeta = flowNodeMeta; list.flowNodeMeta = flowNodeMeta;
list.showCss = props.tableInfo.template.tableStyle; list.showCss = props.location.state.template.tableStyle;
console.log(list); console.log(list);
let tablesSchema = { let tablesSchema = {
...@@ -449,7 +449,7 @@ const AddModal = props => { ...@@ -449,7 +449,7 @@ const AddModal = props => {
}); });
}); });
} else { } else {
setPramFormObj(props.tableInfo.template); setPramFormObj(props.location.state.template);
} }
setType('affiliateAdd'); setType('affiliateAdd');
setVisible(true); setVisible(true);
...@@ -461,13 +461,13 @@ const AddModal = props => { ...@@ -461,13 +461,13 @@ const AddModal = props => {
}; };
return ( return (
<> <>
<Spin tip="loading..." spinning={treeLoading}> {/* <Spin tip="loading..." spinning={treeLoading}> */}
<div className={styles.containerBox}> <div className={styles.containerBox}>
<div className={styles.config}> <div className={styles.config}>
{/* <ArrowLeftOutlined onClick={back} className={styles.goBack} /> */} <ArrowLeftOutlined onClick={back} className={styles.goBack} />
<div className={styles.title}> 展示名称 【{formName}</div> <div className={styles.title}> 展示名称 【{formName}</div>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
{/* <div style={{ lineHeight: '32px', marginRight: '5px' }}>快速切换表:</div> {/* <div style={{ lineHeight: '32px', marginRight: '5px' }}>快速切换表:</div>
<div style={{ width: '350px', marginRight: '10px' }}> <div style={{ width: '350px', marginRight: '10px' }}>
<TreeSelect <TreeSelect
showSearch showSearch
...@@ -487,37 +487,37 @@ const AddModal = props => { ...@@ -487,37 +487,37 @@ const AddModal = props => {
)} )}
</TreeSelect> </TreeSelect>
</div> */} </div> */}
<div className={styles.btn}> <div className={styles.btn}>
<Button <Button
type="primary" type="primary"
// icon={<PlusSquareOutlined />} // icon={<PlusSquareOutlined />}
ghost ghost
onClick={() => formRef.current.clear()} onClick={() => formRef.current.clear()}
> >
<img src={clearSvg} style={{ marginRight: '6px' }} alt="" /> <img src={clearSvg} style={{ marginRight: '6px' }} alt="" />
清空 清空
</Button> </Button>
<Button <Button
type="primary" type="primary"
ghost ghost
icon={<EyeOutlined />} icon={<EyeOutlined />}
onClick={() => formRef.current.preview()} onClick={() => formRef.current.preview()}
style={{ marginLeft: '10px' }} style={{ marginLeft: '10px' }}
> >
预览 预览
</Button> </Button>
<Button <Button
type="primary" type="primary"
icon={<UploadOutlined />} icon={<UploadOutlined />}
onClick={() => formRef.current.submit()} onClick={() => formRef.current.submit()}
style={{ marginLeft: '10px' }} style={{ marginLeft: '10px' }}
> >
提交 提交
</Button> </Button>
{/* <Button type="primary" icon={<PlusSquareOutlined />} onClick={add}> {/* <Button type="primary" icon={<PlusSquareOutlined />} onClick={add}>
附加 附加
</Button> */} </Button> */}
{/* <Button {/* <Button
type="primary" type="primary"
icon={<RollbackOutlined />} icon={<RollbackOutlined />}
onClick={back} onClick={back}
...@@ -525,14 +525,14 @@ const AddModal = props => { ...@@ -525,14 +525,14 @@ const AddModal = props => {
> >
返回 返回
</Button> */} </Button> */}
</div>
</div> </div>
</div> </div>
<div style={{ width: '100%', height: 'calc(100% - 63px)', padding: '10px' }}>
{formObj && <FormDesigner ref={formRef} tableName={formObj} />}
</div>
</div> </div>
</Spin> <div style={{ width: '100%', height: 'calc(100% - 63px)', padding: '10px' }}>
{formObj && <FormDesigner ref={formRef} tableName={formObj} />}
</div>
</div>
{/* </Spin> */}
{visible && type === 'affiliateAdd' && ( {visible && type === 'affiliateAdd' && (
<AffiliateAdd <AffiliateAdd
visible={visible} visible={visible}
......
...@@ -217,24 +217,24 @@ const TableManager = props => { ...@@ -217,24 +217,24 @@ const TableManager = props => {
const fieldsConfig = (record, e) => { const fieldsConfig = (record, e) => {
e.stopPropagation(); e.stopPropagation();
setFormObj(record); setFormObj(record);
pushFieldConfig(record); // pushFieldConfig(record);
// history.push({ history.push({
// pathname: `/biz/account/fieldConfig`, pathname: `/biz/account/fieldConfig`,
// state: { state: {
// name: record.tableAlias || record.tableName, name: record.tableAlias || record.tableName,
// id: record.tableName, id: record.tableName,
// template: record, template: record,
// tableScroll: document.querySelector('.ant-table-body').scrollTop, tableScroll: document.querySelector('.ant-table-body').scrollTop,
// groupArr: groupArr, groupArr: groupArr,
// pickIndex: pickIndex, pickIndex: pickIndex,
// searchValue: searchValue, searchValue: searchValue,
// select: select, select: select,
// keepValue: keepValue, keepValue: keepValue,
// keepTreeSelect: keepTreeSelect, keepTreeSelect: keepTreeSelect,
// keepTreeFirst: keepTreeFirst, keepTreeFirst: keepTreeFirst,
// keepData: keepData, keepData: keepData,
// }, },
// }); });
// setType('config'); // setType('config');
// setVisible(true); // setVisible(true);
}; };
...@@ -379,38 +379,38 @@ const TableManager = props => { ...@@ -379,38 +379,38 @@ const TableManager = props => {
}; };
const pushFieldConfig = record => { const pushFieldConfig = record => {
// history.push({ history.push({
// pathname: `/biz/account/fieldConfig`, pathname: `/biz/account/fieldConfig`,
// state: { state: {
// name: record.tableAlias || record.tableName, name: record.tableAlias || record.tableName,
// id: record.tableName, id: record.tableName,
// template: record, template: record,
// tableScroll: document.querySelector('.ant-table-body').scrollTop, tableScroll: document.querySelector('.ant-table-body').scrollTop,
// groupArr: groupArr, groupArr: groupArr,
// pickIndex: pickIndex, pickIndex: pickIndex,
// searchValue: searchValue, searchValue: searchValue,
// select: select, select: select,
// keepValue: keepValue, keepValue: keepValue,
// keepTreeSelect: keepTreeSelect, keepTreeSelect: keepTreeSelect,
// keepTreeFirst: keepTreeFirst, keepTreeFirst: keepTreeFirst,
// keepData: keepData, keepData: keepData,
// }, },
// });
setTableInfo({
name: record.tableAlias || record.tableName,
id: record.tableName,
template: record,
tableScroll: document.querySelector('.ant-table-body').scrollTop,
groupArr: groupArr,
pickIndex: pickIndex,
searchValue: searchValue,
select: select,
keepValue: keepValue,
keepTreeSelect: keepTreeSelect,
keepTreeFirst: keepTreeFirst,
keepData: keepData,
}); });
setFieldConfigShow(true); // setTableInfo({
// name: record.tableAlias || record.tableName,
// id: record.tableName,
// template: record,
// tableScroll: document.querySelector('.ant-table-body').scrollTop,
// groupArr: groupArr,
// pickIndex: pickIndex,
// searchValue: searchValue,
// select: select,
// keepValue: keepValue,
// keepTreeSelect: keepTreeSelect,
// keepTreeFirst: keepTreeFirst,
// keepData: keepData,
// });
// setFieldConfigShow(true);
}; };
const columns = [ const columns = [
......
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