| <?xml version="1.0" encoding="UTF-8"?> | 
| <ViewConfig> | 
|   <Arguments/> | 
|   <Context/> | 
|   <Model> | 
|     <DataType name="dataTypeMain"> | 
|       <Property name="creationType">com.ld.igds.models.ThreeConf</Property> | 
|       <PropertyDef name="id"> | 
|         <Property></Property> | 
|         <Property name="label">ID</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="companyId"> | 
|         <Property></Property> | 
|         <Property name="label">组织编码</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="uid"> | 
|         <Property></Property> | 
|         <Property name="label">三维唯一Id</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="depotId"> | 
|         <Property></Property> | 
|         <Property name="label">所属仓库</Property> | 
|         <Property name="mapping"> | 
|           <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> | 
|           <Property name="keyProperty">id</Property> | 
|           <Property name="valueProperty">name</Property> | 
|         </Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="deviceId"> | 
|         <Property></Property> | 
|         <Property name="label">设备id</Property> | 
|   | 
|       </PropertyDef> | 
|       <PropertyDef name="cameraId"> | 
|         <Property></Property> | 
|         <Property name="label">摄像头id</Property> | 
|         <Property name="mapping"> | 
|           <Property name="mapValues">${dorado.getDataProvider("securityPR#listCamera").getResult()}</Property> | 
|           <Property name="keyProperty">id</Property> | 
|           <Property name="valueProperty">name</Property> | 
|         </Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="cameraName"> | 
|         <Property></Property> | 
|         <Property name="label">摄像头名称</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="deviceName"> | 
|         <Property name="label">设备名称</Property> | 
|       </PropertyDef> | 
|     </DataType> | 
|   </Model> | 
|   <View layout="padding:5;regionPadding:5"> | 
|     <ClientEvent name="onReady">addData = function(){
 | 
|     view.get("#dsMain").insert();
 | 
|     view.get("#dialogMain").show();
 | 
| };</ClientEvent> | 
|     <Property name="packages">font-awesome,css-common</Property> | 
|     <Property name="cache"> | 
|       <Property name="mode">clientSide</Property> | 
|     </Property> | 
|     <DataSet id="dsMain"> | 
|       <Property name="parameter"></Property> | 
|       <Property name="dataType">[dataTypeMain]</Property> | 
|       <Property name="dataProvider">threeConfPR#getAllThreeConf</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">addData();</ClientEvent> | 
|         <Property name="caption">新增</Property> | 
|         <Property name="exClassName">btn-normal</Property> | 
|         <Property name="iconClass">fa fa-plus</Property> | 
|       </Button> | 
|       <Button layoutConstraint="left"> | 
|         <ClientEvent name="onClick">view.get("#dialogMain").set("caption","调整分机");
 | 
|                     view.get("#dialogMain").show();</ClientEvent> | 
|         <Property name="caption">修改</Property> | 
|         <Property name="exClassName">btn-warm</Property> | 
|         <Property name="iconClass">fa fa-pencil</Property> | 
|       </Button> | 
|       <Button layoutConstraint="left"> | 
|         <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 | 
|                     if(!data){
 | 
|                     return;
 | 
|                     }
 | 
|                     view.get("#ajaxDel").set("parameter",data).execute(function(result){
 | 
|                     if(result){
 | 
|                     $alert(result);
 | 
|                     return;
 | 
|                     }else{
 | 
|                     data.remove();
 | 
|                     }
 | 
|                     });</ClientEvent> | 
|         <Property name="caption">删除</Property> | 
|         <Property name="exClassName">btn-warn</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> | 
|     </Container> | 
|     <DataGrid layoutConstraint="center"> | 
|       <ClientEvent name="onDataRowDoubleClick">//showData();</ClientEvent> | 
|       <Property name="dataSet">dsMain</Property> | 
|       <Property name="readOnly">true</Property> | 
|       <RowNumColumn/> | 
|       <DataColumn> | 
|         <Property name="property">uid</Property> | 
|         <Property name="name">uid</Property> | 
|         <Property name="align">center</Property> | 
|       </DataColumn> | 
|       <DataColumn> | 
|         <Property name="property">depotId</Property> | 
|         <Property name="name">depotId</Property> | 
|       </DataColumn> | 
|       <DataColumn> | 
|         <Property name="property">deviceId</Property> | 
|         <Property name="align">center</Property> | 
|         <Property name="name">deviceId</Property> | 
|       </DataColumn> | 
|       <DataColumn> | 
|         <Property name="property">cameraId</Property> | 
|         <Property name="align">center</Property> | 
|         <Property name="name">cameraId</Property> | 
|       </DataColumn> | 
|     </DataGrid> | 
|     <Dialog id="dialogMain"> | 
|       <ClientEvent name="onHide">//onDialogHide();</ClientEvent> | 
|       <Property name="width">950</Property> | 
|       <Property name="caption">添加配置</Property> | 
|       <Property name="closeable">false</Property> | 
|       <Buttons> | 
|         <Button> | 
|           <ClientEvent name="onClick">var cur = view.get("#dsMain.data:#");
 | 
|                         if(cur.validate() == 'ok'){
 | 
|                         view.get("#updateMain").execute(function(){
 | 
|                         view.get("#dialogMain").close();
 | 
|                         });
 | 
|                         }else{
 | 
|                         $alert("数据校验失败!");
 | 
|                         }</ClientEvent> | 
|           <Property name="caption">确定</Property> | 
|           <Property name="iconClass">fa fa-check</Property> | 
|           <Property name="exClassName">btn-normal</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">btn-warn</Property> | 
|         </Button> | 
|       </Buttons> | 
|       <Children> | 
|         <AutoForm> | 
|           <Property name="dataSet">dsMain</Property> | 
|           <Property name="labelWidth">120</Property> | 
|           <Property name="labelSeparator">:</Property> | 
|           <Property name="labelAlign">right</Property> | 
|           <Property name="cols">*,*</Property> | 
|           <AutoFormElement> | 
|             <Property name="name">uid</Property> | 
|             <Property name="property">uid</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">depotId</Property> | 
|             <Property name="property">depotId</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">deviceId</Property> | 
|             <Property name="property">deviceId</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">cameraId</Property> | 
|             <Property name="property">cameraId</Property> | 
|             <Property name="trigger">autoMappingDropDown1</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|         </AutoForm> | 
|       </Children> | 
|       <Tools/> | 
|     </Dialog> | 
|     <AjaxAction id="ajaxDel"> | 
|       <Property name="service">threeConfPR#delThreeConf</Property> | 
|       <Property name="confirmMessage">确定要删除吗?</Property> | 
|       <Property name="successMessage">删除成功!</Property> | 
|     </AjaxAction> | 
|     <AjaxAction id="ajaxRefreshCache"> | 
|       <Property name="successMessage">刷新成功!</Property> | 
|       <Property name="confirmMessage">确定要刷新缓存么?</Property> | 
|       <Property name="service">threeConfPR#refreshCache</Property> | 
|     </AjaxAction> | 
|     <UpdateAction id="updateMain"> | 
|       <Property name="dataResolver">threeConfPR#updateThreeConf</Property> | 
|       <UpdateItem> | 
|         <Property name="dataPath">[#current]</Property> | 
|         <Property name="dataSet">dsMain</Property> | 
|       </UpdateItem> | 
|     </UpdateAction> | 
|   </View> | 
| </ViewConfig> |