From 4583e2710578a6420e4d8fbe71492796984430ea Mon Sep 17 00:00:00 2001 From: markliu2013 Date: Mon, 29 Jan 2024 23:11:33 +0800 Subject: [PATCH] save --- package.json | 2 +- src/locales/en-US/flow.ts | 2 ++ src/locales/zh-CN/flow.ts | 2 ++ src/pages/BalanceFlow/DataTable.jsx | 15 ++++++++++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index da9d192..af92887 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moneywhere-user-fe", - "version": "1.0.47", + "version": "1.0.48", "private": true, "scripts": { "analyze": "cross-env ANALYZE=1 max build", diff --git a/src/locales/en-US/flow.ts b/src/locales/en-US/flow.ts index 8b2c658..d296fd3 100644 --- a/src/locales/en-US/flow.ts +++ b/src/locales/en-US/flow.ts @@ -33,5 +33,7 @@ export default { 'flow.file.size.error': 'Too Large', 'flow.currency.auto.tooltip': 'Convert,Currency:{rate}', 'flow.search.has.file': 'Has File', + 'flow.search.label.category.check.strictly': 'Category Checked With children', + 'flow.search.label.tag.check.strictly': 'Tag Checked With children', } diff --git a/src/locales/zh-CN/flow.ts b/src/locales/zh-CN/flow.ts index 152facc..dfdec83 100644 --- a/src/locales/zh-CN/flow.ts +++ b/src/locales/zh-CN/flow.ts @@ -34,5 +34,7 @@ export default { 'flow.file.size.error': '文件太大', 'flow.currency.auto.tooltip': '自动折算,当前汇率:{rate}', 'flow.search.has.file': '文件', + 'flow.search.label.category.check.strictly': '分类自动选择子类', + 'flow.search.label.tag.check.strictly': '标签自动选择子类', } diff --git a/src/pages/BalanceFlow/DataTable.jsx b/src/pages/BalanceFlow/DataTable.jsx index 272bbf8..1459767 100644 --- a/src/pages/BalanceFlow/DataTable.jsx +++ b/src/pages/BalanceFlow/DataTable.jsx @@ -1,5 +1,5 @@ import {useEffect, useRef, useState} from 'react'; -import { Alert, Button, Dropdown, Form, Input, Modal, Space, Tag, Tooltip } from 'antd'; +import {Alert, Button, Dropdown, Form, Input, Modal, Space, Switch, Tag, Tooltip} from 'antd'; import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { ProTable } from '@ant-design/pro-components'; import {useModel, useRequest, history} from '@umijs/max'; @@ -21,6 +21,9 @@ export default () => { const formRef = useRef(); const { show } = useModel('modal'); + const [categoryTreeCheckStrictly, setCategoryTreeCheckStrictly] = useState(false); + const [tagTreeCheckStrictly, setTagTreeCheckStrictly] = useState(false); + // 对账点击过来的 useEffect(() => { console.log(history.location.state?.account) @@ -227,6 +230,7 @@ export default () => { onFocus: loadCategories, options: categories, loading: categoriesLoading, + treeCheckStrictly: categoryTreeCheckStrictly, }, }, { @@ -240,6 +244,7 @@ export default () => { ...treeSelectMultipleProp, options: tags, loading: tagsLoading, + treeCheckStrictly: tagTreeCheckStrictly, }, }, { @@ -381,6 +386,14 @@ export default () => { return ( <> +
+ + setCategoryTreeCheckStrictly(!checked)} /> + + + setTagTreeCheckStrictly(!checked)} /> + +