2016-12-30 00:36 | 题主 | ||||||||
|
grid里无法分页、不显示记录数量的问题 本人超级小白,刚刚用wb里的例子改改输出了我想要的查询记录,大概1000多条,但是grid的右下角一直显示“没有数据”,那些下一页等按钮是灰色,导出按钮也都无效,我想知道是不是我少了什么操作,或者是得用dataview?查询模块源码: module = { itemId: "module", serverScript: function(request, response, app) { var companyData = app.output('select POLICY_NO,REPORT_CASE_NO,REPORT_DATE from user_320100.TMP_NONAUTO_AMOUNT_DAY', null, true); app.send({ company: companyData }); } }; 主页面源码: module = { itemId: "module", items: [{ itemId: "viewport1", layout: "border", items: [{ itemId: "toolbar1", region: "north", items: [{ itemId: "item1", text: "查询", events: { click: function(item, e, options) { Wb.request({ url: 'm?xwl=examples/select', success: function(resp) { var data = Wb.decode(resp.responseText); Wb.setValue(app.viewport1, data); } }); } } }] }, { defaults: { flex: 1 }, itemId: "container1", layout: "@{type: 'hbox',align:'stretch'}", region: "center", items: [{ autoRowNumWidth: true, height: 50, itemId: "company", pagingBar: true, region: "center", sortableColumns: false, items: [{ fields: ['POLICY_NO', 'REPORT_CASE_NO', 'REPORT_DATE'], itemId: "store", maskBindObject: true }, { itemId: "columns", items: [{ dataIndex: "POLICY_NO", flex: 1, iconCls: "accept_icon", itemId: "POLICY_NOCol", text: "保单号" }, { dataIndex: "REPORT_CASE_NO", flex: 1, iconCls: "accept_icon", itemId: "REPORT_CASE_NOCol", text: "报案号" }, { dataIndex: "REPORT_DATE", flex: 1, itemId: "REPORT_DATECol", text: "报案时间" }] }] }] }] }] }; |
2016-12-30 09:36 | #1 | ||||||||
|
搞的这么麻烦,后台使用app.send(sql)就行 前台添加表格控件然后加store关联到上面的模块就行 可以参考下employee示例 |