|
@@ -146,6 +146,23 @@ export default function () {
|
|
|
{
|
|
|
...comboGridPicker,
|
|
|
...me.grid,
|
|
|
+ tbar: {
|
|
|
+ xtype: 'toolbar',
|
|
|
+ items: [
|
|
|
+ {xtype: 'textfield', fieldLabel: '筛选'},
|
|
|
+ {
|
|
|
+ xtype: 'button',
|
|
|
+ text: '查询',
|
|
|
+ iconCls: 'x-fa fa-search',
|
|
|
+ cssType: 'primary',
|
|
|
+ listeners: {
|
|
|
+ click: () => {
|
|
|
+ me.reloadGrid()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
autoLoad: false,
|
|
|
listeners: {
|
|
|
afterrender(grid) {
|
|
@@ -256,10 +273,20 @@ export default function () {
|
|
|
onExpand() {
|
|
|
// 展开时,根据 lookup 带入查询参数
|
|
|
const expressData = this.getExpressData()
|
|
|
+ const txtField = this.grid.down('toolbar').down('textfield')
|
|
|
+ txtField.setValue(expressData.queryValue)
|
|
|
+ this.reloadGrid()
|
|
|
+ },
|
|
|
+
|
|
|
+ reloadGrid() {
|
|
|
+ // 展开时,根据 lookup 带入查询参数
|
|
|
+ const expressData = this.getExpressData()
|
|
|
const reloadParam = calcObjectFlat(expressData, this.param)
|
|
|
|
|
|
+ const txtField = this.grid.down('toolbar').down('textfield')
|
|
|
+
|
|
|
// 每个 combogrid 默认带上 __queryValue 属性
|
|
|
- reloadParam["__queryValue"] = expressData.queryValue
|
|
|
+ reloadParam["__queryValue"] = txtField.getValue()
|
|
|
this.grid.reload(reloadParam)
|
|
|
},
|
|
|
|