提交 201dd41e authored 作者: 钟是志's avatar 钟是志

应用树形列表增加搜索条件

上级 de389925
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
* 一个年份加上校区-学院-专业的树 * 一个年份加上校区-学院-专业的树
* */ * */
import { Tree } from 'antd'; import { Input, Tree } from 'antd';
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import Shell from '@/baseComponent/Shell'; import Shell from '@/baseComponent/Shell';
import { getAppTypeList, getListByTreeList } from '@/webPublic/Services'; import { getAppTypeList, getListByTreeList } from '@/webPublic/Services';
import { getPermInfo } from '@/highOrderComponent/Service';
import { connect } from 'dva'; import { connect } from 'dva';
import { deepCopy } from '@/webPublic/zyd_public/utils/utils'; import { deepCopy } from '@/webPublic/zyd_public/utils/utils';
import BlockTitle from '@/baseComponent/BlockTitle';
const { TreeNode } = Tree; const { TreeNode } = Tree;
...@@ -22,7 +22,7 @@ export default class AppTypeTree extends Component { ...@@ -22,7 +22,7 @@ export default class AppTypeTree extends Component {
super(); super();
this.state = { this.state = {
treeListData: [], treeListData: [],
initYear: 0, name: '',
}; };
} }
...@@ -67,7 +67,7 @@ export default class AppTypeTree extends Component { ...@@ -67,7 +67,7 @@ export default class AppTypeTree extends Component {
}); });
}; };
getList = () => { getList = (name = null) => {
const { groupId } = this.props; const { groupId } = this.props;
const { parentId } = this.state; const { parentId } = this.state;
if (!groupId) { if (!groupId) {
...@@ -77,6 +77,7 @@ export default class AppTypeTree extends Component { ...@@ -77,6 +77,7 @@ export default class AppTypeTree extends Component {
{ {
parentId, parentId,
groupId, groupId,
name,
cacheKey: Math.random(), cacheKey: Math.random(),
}, },
).then((treeListData) => { ).then((treeListData) => {
...@@ -147,6 +148,18 @@ export default class AppTypeTree extends Component { ...@@ -147,6 +148,18 @@ export default class AppTypeTree extends Component {
return dom; return dom;
}; };
inputList = () => {
const { name } = this.state;
return (
<Input.Search
placeHolder={'应用名称搜索'}
onSearch={(value) => {
this.getList(value);
}}
style={{ marginLeft: '10px', width: '150px' }}/>
);
};
render() { render() {
const { treeListData, loading, heightSet } = this.state; const { treeListData, loading, heightSet } = this.state;
const { selectKey } = this.props; const { selectKey } = this.props;
...@@ -160,6 +173,10 @@ export default class AppTypeTree extends Component { ...@@ -160,6 +173,10 @@ export default class AppTypeTree extends Component {
overflowX: 'auto', overflowX: 'auto',
marginTop: 0, marginTop: 0,
}}> }}>
<BlockTitle title={'应用'}
isSmall={true}
dom={this.inputList()}
/>
<Tree <Tree
onSelect={this.onSelect} onSelect={this.onSelect}
selectedKeys={[selectKey]} selectedKeys={[selectKey]}
......
...@@ -57,6 +57,13 @@ const handlePageSearch = (props) => { ...@@ -57,6 +57,13 @@ const handlePageSearch = (props) => {
return deleteChildren(response); return deleteChildren(response);
}, },
condition: [ condition: [
{
key: 'groupId',
name: '类别',
type: 'select',
options: props.typeList,
required: true,
},
{ {
key: 'sysCode', key: 'sysCode',
type: 'select', type: 'select',
...@@ -92,13 +99,7 @@ const handlePageSearch = (props) => { ...@@ -92,13 +99,7 @@ const handlePageSearch = (props) => {
}, },
], ],
}, },
{
key: 'groupId',
name: '类别',
type: 'select',
options: props.typeList,
required: true,
},
], ],
nameSpan: { big: 6, small: 7 }, nameSpan: { big: 6, small: 7 },
fileSpan: { big: 4, small: 4 }, fileSpan: { big: 4, small: 4 },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论