| | |
| | | <Arguments/> |
| | | <Context/> |
| | | <Model/> |
| | | <View layout="padding:5;regionPadding:5"> |
| | | <View> |
| | | <ClientEvent name="onReady">var depotList = null;
 |
| | | </ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | |
| | | <Property name="dataProvider">depotConfPR#getConfList</Property> |
| | | <Property name="dataType">[dtDepotConf]</Property> |
| | | </DataSet> |
| | | <Container layout="regionPadding:10" layoutConstraint="top"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <Property name="height">55</Property> |
| | | <Property name="contentOverflow">hidden</Property> |
| | | <Label layoutConstraint="left"> |
| | | <Property name="text">菜单栏:</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | <Container> |
| | | <Property name="exClassName">c-data</Property> |
| | | <ToolBar> |
| | | <ToolBarLabel> |
| | | <Property name="text">菜单栏:</Property> |
| | | <Property name="exClassName">menu-bar-caption</Property> |
| | | </ToolBarLabel> |
| | | <ToolBarButton layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | view.get("#depotId").set("readOnly",false);
 |
| | | view.get("#dgMain").show();</ClientEvent> |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var select = view.get("#dataGridMain").get("selection");
 |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var select = view.get("#dataGridMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#dgMain").show();
 |
| | | view.get("#depotId").set("readOnly",true);
 |
| | | }else{
 |
| | | $notify("请选择需要修改的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">修改</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">
 |
| | | <Property name="caption">修改</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton layoutConstraint="left"> |
| | | <ClientEvent name="onClick">
 |
| | | 
 |
| | | var select = view.get("#dataGridMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#ajaxDel2").set("parameter",select).execute(function(result){
 |
| | | if(result){
 |
| | | $alert(result);
 |
| | | }else{
 |
| | | entity.remove();
 |
| | | }
 |
| | | });
 |
| | | if(result){
 |
| | | $alert(result);
 |
| | | }else{
 |
| | | entity.remove();
 |
| | | }
 |
| | | });
 |
| | | }else{
 |
| | | $notify("请选择需要删除的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <Property name="caption">刷新缓存</Property> |
| | | <Property name="exClassName">btn-flush</Property> |
| | | <Property name="iconClass">fa fa-refresh</Property> |
| | | <Property name="action">ajaxRefreshCache</Property> |
| | | </Button> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton layoutConstraint="left"> |
| | | <Property name="caption">刷新缓存</Property> |
| | | <Property name="exClassName">btn-flush</Property> |
| | | <Property name="iconClass">fa fa-refresh</Property> |
| | | <Property name="action">ajaxRefreshCache</Property> |
| | | </ToolBarButton> |
| | | </ToolBar> |
| | | <DataGrid id="dataGridMain" layoutConstraint="padding:15px 0px 0px 0px"> |
| | | <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | | <RowSelectorColumn/> |
| | | <RowNumColumn/> |
| | | <DataColumn name="depotId"> |
| | | <Property name="property">depotId</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="grainSer"> |
| | | <Property name="property">grainSer</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="property">cableRule</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="name">cableRule</Property> |
| | | </DataColumn> |
| | | <DataColumn name="cableCir"> |
| | | <Property name="property">cableCir</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="tempMax"> |
| | | <Property name="property">tempMax</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="grainFreq"> |
| | | <Property name="property">grainFreq</Property> |
| | | </DataColumn> |
| | | <DataColumn name="n2Max"> |
| | | <Property name="property">n2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="co2Max"> |
| | | <Property name="property">co2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="o2Max"> |
| | | <Property name="property">o2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="ph3Max"> |
| | | <Property name="property">ph3Max</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | <DataGrid id="dataGridMain" layoutConstraint="center "> |
| | | <ClientEvent name="onDataRowDoubleClick">var cur = view.get("#dsMain.data:#");
 |
| | | if(!cur) return ;
 |
| | | view.get("#depotId").set("readOnly",true);
 |
| | | view.get("#dgMain").show();</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | | <RowSelectorColumn/> |
| | | <RowNumColumn/> |
| | | <DataColumn name="depotId"> |
| | | <Property name="property">depotId</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="grainSer"> |
| | | <Property name="property">grainSer</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="property">cableRule</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="name">cableRule</Property> |
| | | </DataColumn> |
| | | <DataColumn name="cableCir"> |
| | | <Property name="property">cableCir</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="tempMax"> |
| | | <Property name="property">tempMax</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="grainFreq"> |
| | | <Property name="property">grainFreq</Property> |
| | | </DataColumn> |
| | | <DataColumn name="n2Max"> |
| | | <Property name="property">n2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="co2Max"> |
| | | <Property name="property">co2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="o2Max"> |
| | | <Property name="property">o2Max</Property> |
| | | </DataColumn> |
| | | <DataColumn name="ph3Max"> |
| | | <Property name="property">ph3Max</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | <UpdateAction id="uaMain"> |
| | | <Property name="dataResolver">depotConfPR#saveConf</Property> |
| | | <UpdateItem> |