| | |
| | | <ViewConfig> |
| | | <Arguments/> |
| | | <Context/> |
| | | <Model> |
| | | <DataType name="dtMain"> |
| | | <Property name="creationType">com.fzzy.igds.domain.DicArea</Property> |
| | | <PropertyDef name="code"> |
| | | <Property></Property> |
| | | <Property name="label">区域编码</Property> |
| | | <Property name="required">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="name"> |
| | | <Property></Property> |
| | | <Property name="label">名称</Property> |
| | | <Property name="required">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="parentCode"> |
| | | <Property></Property> |
| | | <Property name="label">所属区域</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("dicAreaPR#getDicAreaByParentCode").getResult()}</Property> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="parentName"> |
| | | <Property></Property> |
| | | <Property name="label">上级区域</Property> |
| | | <Property name="required">false</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="type"> |
| | | <Property></Property> |
| | | <Property name="label">类型</Property> |
| | | <Property name="required">true</Property> |
| | | <Property name="mapping"> |
| | | <Property name="keyProperty">value</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | <Property name="mapValues"> |
| | | <Collection> |
| | | <Entity> |
| | | <Property name="name">省</Property> |
| | | <Property name="value">1</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">市</Property> |
| | | <Property name="value">2</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">区县</Property> |
| | | <Property name="value">3</Property> |
| | | </Entity> |
| | | </Collection> |
| | | </Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="simple"> |
| | | <Property></Property> |
| | | <Property name="label">简拼</Property> |
| | | <Property name="required">false</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="disabledTag"> |
| | | <Property></Property> |
| | | <Property name="label">是否禁用</Property> |
| | | <Property name="required">false</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues"> |
| | | <Collection> |
| | | <Entity> |
| | | <Property name="name">禁用</Property> |
| | | <Property name="value">Y</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">启用</Property> |
| | | <Property name="value">N</Property> |
| | | </Entity> |
| | | </Collection> |
| | | </Property> |
| | | <Property name="keyProperty">value</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="remark"> |
| | | <Property></Property> |
| | | <Property name="label">备注</Property> |
| | | <Property name="required">false</Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:5;regionPadding:5"> |
| | | <View layout="padding:10"> |
| | | <ClientEvent name="onReady">//查询
 |
| | | query = function(){
 |
| | | view.get("#dsMain").flushAsync();
 |
| | |
| | | query();</ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="dataType">[dtMain]</Property> |
| | | <Property name="dataType">[dtArea]</Property> |
| | | <Property name="dataProvider">dicAreaPR#pageList</Property> |
| | | <Property name="loadMode">manual</Property> |
| | | <Property name="pageSize">20</Property> |
| | | </DataSet> |
| | | <Container layout="regionPadding:10" layoutConstraint="top"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <Property name="contentOverflow">hidden</Property> |
| | | <Property name="height">55</Property> |
| | | <Label layoutConstraint="left"> |
| | | <Property name="text">菜单栏:</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | view.get("#dialogMain").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");
 |
| | | if(select){
 |
| | | view.get("#dialogMain").show();;
 |
| | | }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"> 
 |
| | | var select = view.get("#dataGridMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#ajaxDel").set("parameter",select).execute(function(){
 |
| | | select.remove();
 |
| | | });
 |
| | | }else{
 |
| | | $notify("请选择需要删除的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-minus</Property> |
| | | </Button> |
| | | </Container> |
| | | <Container layoutConstraint="center"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <DataGrid id="dataGridMain" layoutConstraint="center"> |
| | | <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsMain.data:#");
 |
| | | if(data){
 |
| | | view.get("#dialogMain").show();
 |
| | | }</ClientEvent> |
| | | <Container> |
| | | <Property name="className">c-param</Property> |
| | | <ToolBar> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | view.get("#dialogMain").show();
 |
| | | </ClientEvent> |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="width">100</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">
 |
| | | 
 |
| | | var select = view.get("#dataGridMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#dialogMain").show();;
 |
| | | }else{
 |
| | | $notify("请选择需要修改的数据……");
 |
| | | } </ClientEvent> |
| | | <Property name="caption">修改</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="width">100</Property> |
| | | <Property name="iconClass">fa fa-pencil-square-o</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick"> 
 |
| | | var select = view.get("#dataGridMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#ajaxDel").set("parameter",select).execute(function(){
 |
| | | select.remove();
 |
| | | });
 |
| | | }else{
 |
| | | $notify("请选择需要删除的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="width">100</Property> |
| | | <Property name="iconClass">fa fa-times</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">view.get("#dsMain").flushAsync();
 |
| | | </ClientEvent> |
| | | <Property name="caption">刷新</Property> |
| | | <Property name="exClassName">btn-q2</Property> |
| | | <Property name="width">100</Property> |
| | | <Property name="iconClass">fa fa-refresh</Property> |
| | | </ToolBarButton> |
| | | </ToolBar> |
| | | <DataGrid id="dataGridMain" layoutConstraint="padding:8" selectionMode="singleRow"> |
| | | <ClientEvent name="onDataRowClick">self.set("selection", arg.data)</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | | <RowSelectorColumn/> |
| | | <RowNumColumn/> |
| | | <DataColumn> |
| | |
| | | <Property name="name">remark</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | <Container layoutConstraint="bottom"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <DataPilot layoutConstraint="right"> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="itemCodes">pageSize,pages</Property> |
| | | </DataPilot> |
| | | <ToolBar layoutConstraint="bottom"> |
| | | <Fill/> |
| | | <DataPilot layoutConstraint="right"> |
| | | <Property name="itemCodes">pageSize,pages</Property> |
| | | <Property name="dataSet">dsMain</Property> |
| | | </DataPilot> |
| | | </ToolBar> |
| | | </Container> |
| | | <Dialog id="dialogMain"> |
| | | <Property name="closeable">false</Property> |
| | |
| | | $notify("数据执行完成!!");
 |
| | | self.get("parent").hide();
 |
| | | });</ClientEvent> |
| | | <Property name="caption">确定</Property> |
| | | <Property name="iconClass">fa fa-check</Property> |
| | | <Property name="caption">保存</Property> |
| | | <Property name="iconClass">fa fa-check-circle</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="width">120</Property> |
| | | </Button> |
| | | <Button> |
| | | <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 |
| | | self.get("parent").hide();</ClientEvent> |
| | | <Property name="caption">取消</Property> |
| | | <Property name="iconClass">fa fa-times</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-times-circle</Property> |
| | | <Property name="width">120</Property> |
| | | </Button> |
| | | </Buttons> |
| | | <Children> |