Commit 54d149d3 authored by 涂伟's avatar 涂伟

fix: '1.表单设计按钮样式优化2.表字段设置按钮操作逻辑优化'

parent 188ff0f1
Pipeline #68642 passed with stages
...@@ -500,6 +500,7 @@ const AddModal = props => { ...@@ -500,6 +500,7 @@ const AddModal = props => {
type="primary" type="primary"
// icon={<PlusSquareOutlined />} // icon={<PlusSquareOutlined />}
onClick={() => formRef.current.preview()} onClick={() => formRef.current.preview()}
style={{ marginLeft: '30px' }}
> >
预览 预览
</Button> </Button>
......
...@@ -367,6 +367,25 @@ const TableManager = props => { ...@@ -367,6 +367,25 @@ const TableManager = props => {
return <div dangerouslySetInnerHTML={{ __html: n }} />; return <div dangerouslySetInnerHTML={{ __html: n }} />;
}; };
const pushFieldConfig = record => {
history.push({
pathname: `/biz/account/fieldConfig`,
state: {
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,
},
});
};
const columns = [ const columns = [
{ {
title: '名称', title: '名称',
...@@ -485,14 +504,18 @@ const TableManager = props => { ...@@ -485,14 +504,18 @@ const TableManager = props => {
onClick={() => changeDesc(record)} onClick={() => changeDesc(record)}
style={{ fontSize: '20px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> */} /> */}
<a href="#"> <img
<img className={styles.btnImg}
src={formDesign} src={formDesign}
alt="" alt=""
onClick={() => changeDesc(record)} // onClick={() => changeDesc(record)}
style={{ width: '20px', color: '#1890FF' }} onClick={() => {
/> setType('tableEdit');
</a> setVisible(true);
setFormObj(record);
}}
style={{ width: '20px', color: '#1890FF' }}
/>
</Tooltip> </Tooltip>
<Tooltip title="表单设计"> <Tooltip title="表单设计">
{/* <MenuOutlined {/* <MenuOutlined
...@@ -503,18 +526,21 @@ const TableManager = props => { ...@@ -503,18 +526,21 @@ const TableManager = props => {
}} }}
style={{ fontSize: '20px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> */} /> */}
<a href="#"> <img
<img className={styles.btnImg}
src={tableDesign} src={tableDesign}
alt="" alt=""
onClick={() => { // onClick={() => {
setType('tableEdit'); // setType('tableEdit');
setVisible(true); // setVisible(true);
setFormObj(record); // setFormObj(record);
}} // }}
style={{ width: '20px', color: '#1890FF' }} onClick={e => {
/> e.stopPropagation();
</a> pushFieldConfig(record);
}}
style={{ width: '20px', color: '#1890FF' }}
/>
</Tooltip> </Tooltip>
{/* <Tooltip title="字段配置"> {/* <Tooltip title="字段配置">
<FontColorsOutlined <FontColorsOutlined
...@@ -723,22 +749,23 @@ const TableManager = props => { ...@@ -723,22 +749,23 @@ const TableManager = props => {
onRow={record => ({ onRow={record => ({
onDoubleClick: event => { onDoubleClick: event => {
event.stopPropagation(); event.stopPropagation();
history.push({ // history.push({
pathname: `/biz/account/fieldConfig`, // pathname: `/biz/account/fieldConfig`,
state: { // state: {
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,
}, // },
}); // });
pushFieldConfig(record);
}, },
onClick: event => { onClick: event => {
event.stopPropagation(); event.stopPropagation();
......
...@@ -143,4 +143,8 @@ ...@@ -143,4 +143,8 @@
.orgContainerHide { .orgContainerHide {
width: 26px; width: 26px;
}
.btnImg:hover {
cursor: pointer;
} }
\ No newline at end of file
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