sgj
11 小时以前 c1082c999e7cb35395ace980f2c521c1e8b0998e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.data.PatrolSuperData</Property>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">库区名称</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">系统组织编码</Property>
      </PropertyDef>
      <PropertyDef name="weekNum">
        <Property name="dataType">Integer</Property>
        <Property name="label">7天内巡检人次</Property>
      </PropertyDef>
      <PropertyDef name="yesterdayNum">
        <Property name="dataType">Integer</Property>
        <Property name="label">昨天巡检人次</Property>
      </PropertyDef>
      <PropertyDef name="curNum">
        <Property name="dataType">Integer</Property>
        <Property name="label">当天巡检人次</Property>
      </PropertyDef>
      <PropertyDef name="isPatrol">
        <Property></Property>
        <Property name="label">当天是否巡检</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="code">Y</Property>
                <Property name="name">已巡检</Property>
              </Entity>
              <Entity>
                <Property name="code">N</Property>
                <Property name="name">未巡检</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注说明</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">&#xD;
/**&#xD;
* 查看详情&#xD;
*/&#xD;
detail = function(){&#xD;
    var cur = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
    var deptId = cur.get(&quot;deptId&quot;);&#xD;
    var url = &quot;/com.fzzy.igds.Patrol.d&quot;;&#xD;
    var panelId = window.parent.frameElement.getAttribute('data-id');
    window.parent.parent.$.modal.openTab(&quot;巡更详情&quot;, url,false, panelId);
};&#xD;
&#xD;
renderStatus = function(arg){&#xD;
    var txt = arg.data.getText(&quot;isPatrol&quot;);&#xD;
    if(!txt) return true;&#xD;
    var htm = &quot;&lt;span class='s2'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
    if(txt.includes(&quot;N&quot;)){&#xD;
        htm = &quot;&lt;span class='s3'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
    }&#xD;
    if(txt.includes(&quot;Y&quot;)){&#xD;
        htm = &quot;&lt;span class='s1'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
    }&#xD;
    arg.dom.innerHTML = htm;&#xD;
}&#xD;
    </ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">patrolPR#getData</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <Container>
      <Property name="className">c-data3</Property>
      <DataGrid id="dgMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dgMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="deptId">
          <Property name="property">deptId</Property>
        </DataColumn>
        <DataColumn name="weekNum">
          <Property name="property">weekNum</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="yesterdayNum">
          <Property name="property">yesterdayNum</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="curNum">
          <Property name="property">curNum</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="isPatrol">
          <ClientEvent name="onRenderCell">renderStatus(arg);</ClientEvent>
          <Property name="property">isPatrol</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="remark">
          <Property name="property">remark</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="width">160</Property>
        </DataColumn>
        <DataColumn>
          <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='detail()' class='a-btn1'>查看详情&lt;/a>&quot;;</ClientEvent>
          <Property name="width">160</Property>
          <Property name="caption">操作</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
          <Editor/>
        </DataColumn>
      </DataGrid>
    </Container>
  </View>
</ViewConfig>