Commit da36dfaf authored by 田翔's avatar 田翔

fix: 代码完善

parent 6fb603f9
Pipeline #85317 passed with stages
......@@ -17,6 +17,7 @@ import {
Row,
Col,
Switch,
Checkbox,
} from 'antd';
import { PlusOutlined, InfoCircleOutlined, EyeOutlined } from '@ant-design/icons';
import { LoadEventFields } from '@/services/tablemanager/tablemanager';
......@@ -74,6 +75,7 @@ const BookConfigNew = props => {
const [parentData, setParentData] = useState([]); // 父级台账下拉框数据
const [currentId, setCurrentId] = useState(''); // 新增成功后保存的ID
const [EnableImportExport, setEnableImportExport] = useState(false) //是否导入导出
const [EnableSiteFilter, setEnableSiteFilter] = useState(false) //是否站点过滤
const [form] = Form.useForm();
const tableRef = useRef(null);
const accountRef = useRef(null);
......@@ -251,6 +253,7 @@ const BookConfigNew = props => {
if (res.code === 0) {
form.setFieldsValue({ ...res.data });
setEnableImportExport(res.data.EnableImportExport)
setEnableSiteFilter(res.data.EnableSiteFilter)
setOrder(res.data.Order);
let editArr = res.data.LedgerFieids;
changTable(res.data.TableName, editArr);
......@@ -267,6 +270,8 @@ const BookConfigNew = props => {
Type: (!pickItem1 || pickItem1 == '全部') ? data[0] : pickItem1,
PageSize: 20
})
setEnableImportExport(true)
setEnableSiteFilter(false)
}
getParentData({ ledgerId: type === 'edit' ? formObj.ID : '0' });
} else {
......@@ -618,6 +623,12 @@ const BookConfigNew = props => {
if ('EnableImportExport' in changedValues) {
setEnableImportExport(changedValues['EnableImportExport'])
}
if ('EnableSiteFilter' in changedValues) {
setEnableSiteFilter(changedValues['EnableSiteFilter'])
if (!changedValues['EnableSiteFilter']) {
form.setFieldsValue({ EnableSiteIDFilter: false })
}
}
};
return (
......@@ -772,15 +783,8 @@ const BookConfigNew = props => {
<Input placeholder="服务项目dll库" allowClear />
</Item>
</Col>
<Col span={5}>
<Form.Item
{...switchLayout}
label="分页默认数量"
name="PageSize"
>
<Select style={{ width: 150 }} options={pagingOptions} />
</Form.Item>
</Col>
</Row>
<Row style={{ marginLeft: '40px' }}>
<Col span={2}>
<Form.Item
{...switchLayout}
......@@ -792,7 +796,7 @@ const BookConfigNew = props => {
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</Col>
<Col span={4}>
<Col span={6} style={{ position: 'relative', left: '-28px' }}>
<Form.Item
{...switchLayout}
label="导出模板名称"
......@@ -801,6 +805,15 @@ const BookConfigNew = props => {
<Input disabled={!EnableImportExport} placeholder='请输入导出模板名称' />
</Form.Item>
</Col>
<Col span={4}>
<Form.Item
{...switchLayout}
label="分页默认数量"
name="PageSize"
>
<Select style={{ width: 150 }} options={pagingOptions} />
</Form.Item>
</Col>
<Col span={3}>
<Form.Item
{...switchLayout}
......@@ -815,8 +828,8 @@ const BookConfigNew = props => {
<Form.Item
{...switchLayout}
valuePropName="checked"
label="站点过滤"
name="EnableSiteFilter"
label="批量操作"
name="EnableBatchOperation"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
......@@ -825,20 +838,25 @@ const BookConfigNew = props => {
<Form.Item
{...switchLayout}
valuePropName="checked"
label="站点ID过滤"
name="EnableSiteIDFilter"
label="站点过滤"
name="EnableSiteFilter"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</Col>
<Col span={3}>
<Col span={3} style={{ display: EnableSiteFilter ? 'block' : 'none' }}>
<Form.Item
{...switchLayout}
valuePropName="checked"
label="批量操作"
name="EnableBatchOperation"
label=""
name="EnableSiteIDFilter"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
<Checkbox
value={true}
style={{ lineHeight: '32px' }}
>
站点ID过滤
</Checkbox>
</Form.Item>
</Col>
{/* <Col span={4}>
......
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