| | |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:10"> |
| | | <ClientEvent name="onClick">
 |
| | | <ClientEvent name="onReady">
 |
| | | /**
 |
| | | * 查看详情
 |
| | | */
 |
| | |
| | | var panelId = window.parent.frameElement.getAttribute('data-id'); |
| | | window.parent.parent.$.modal.openTab("巡更详情", url,false, panelId); |
| | | };
 |
| | | 
 |
| | | renderStatus = function(arg){
 |
| | | var txt = arg.data.getText("isPatrol");
 |
| | | if(!txt) return true;
 |
| | | var htm = "<span class='s2'>"+txt+"</span>";
 |
| | | if(txt.includes("N")){
 |
| | | htm = "<span class='s3'>"+txt+"</span>";
 |
| | | }
 |
| | | if(txt.includes("Y")){
 |
| | | htm = "<span class='s1'>"+txt+"</span>";
 |
| | | }
 |
| | | arg.dom.innerHTML = htm;
 |
| | | }
 |
| | | </ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | |
| | | <Property name="width">150</Property> |
| | | </DataColumn> |
| | | <DataColumn name="isPatrol"> |
| | | <ClientEvent name="onRenderCell">arg.dom.style.background = arg.data.get("isPatrol")== 'Y' ?"":"#FF5722";
 |
| | | arg.processDefault = true;</ClientEvent> |
| | | <ClientEvent name="onRenderCell">renderStatus(arg);</ClientEvent> |
| | | <Property name="property">isPatrol</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="width">120</Property> |