sgj
2 天以前 457c87c165739e37d72ce5c2b02fd27e05a75d6a
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.domain.Patrol</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">巡更单号</Property>
      </PropertyDef>
      <PropertyDef name="userId">
        <Property></Property>
        <Property name="label">巡逻人</Property>
      </PropertyDef>
      <PropertyDef name="confId">
        <Property></Property>
        <Property name="label">班次编号</Property>
      </PropertyDef>
      <PropertyDef name="confName">
        <Property></Property>
        <Property name="label">班次名称</Property>
      </PropertyDef>
      <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="userName">
        <Property></Property>
        <Property name="label">巡逻人</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="createBy">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
      <PropertyDef name="updateBy">
        <Property></Property>
        <Property name="label">更新人</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">
/**&#xD;
* 查询&#xD;
*/&#xD;
query = function(){&#xD;
    view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
}&#xD;
query();&#xD;
 
/**&#xD;
* 巡检轨迹查看&#xD;
*/&#xD;
patrolMap = function(){&#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        var patrolId = select.get(&quot;id&quot;);&#xD;
        &#xD;
        var url = &quot;/security/patrol/patrolRecord/&quot;+patrolId+&quot;?time=&quot;+ new Date().getTime();&#xD;
        &#xD;
        view.get(&quot;#iFrameTrack&quot;).set(&quot;path&quot;,url);&#xD;
        view.get(&quot;#dialogTrack&quot;).show();&#xD;
    }else{&#xD;
        $notify(&quot;请选择查看的巡检信息……&quot;);&#xD;
    }&#xD;
};&#xD;</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">patrolPR#pagePatrolData</Property>
      <Property name="pageSize">15</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsParam">
      <ClientEvent name="onReady">self.insert({});</ClientEvent>
      <Property name="dataType">dtBaseParam</Property>
    </DataSet>
    <Container>
      <Property name="className">c-param</Property>
      <AutoForm>
        <Property name="cols">*,*,*,*,90,90</Property>
        <Property name="dataSet">dsParam</Property>
        <Property name="labelAlign">right</Property>
        <Property name="labelWidth">100</Property>
        <AutoFormElement>
          <Property name="name">companyId</Property>
          <Property name="property">companyId</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">deptId</Property>
          <Property name="property">deptId</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">start</Property>
          <Property name="property">start</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">end</Property>
          <Property name="property">end</Property>
          <Editor/>
        </AutoFormElement>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsParam.data&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data).flushAsync();&#xD;
            }else{&#xD;
            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
            }</ClientEvent>
          <Property name="caption">搜索</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn-q1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).flushAsync();</ClientEvent>
          <Property name="caption">重置</Property>
          <Property name="exClassName">btn-q2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </Button>
      </AutoForm>
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="selectionMode">singleRow</Property>
        <Property name="readOnly">true</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
          <Property name="caption">序号</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="width">120</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">deptId</Property>
          <Property name="align">left</Property>
          <Property name="name">deptId</Property>
        </DataColumn>
        <DataColumn name="userName">
          <Property name="property">userName</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="confName">
          <Property name="property">confName</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="remark">
          <Property name="property">remark</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="name">updateTime</Property>
          <Property name="width">160</Property>
        </DataColumn>
        <DataColumn>
          <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='patrolMap()' class='a-btn1'>巡检轨迹&lt;/a>&quot;;</ClientEvent>
          <Property name="caption">操作</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
          <Editor/>
        </DataColumn>
      </DataGrid>
      <ToolBar layoutConstraint="bottom">
        <Fill/>
        <DataPilot layoutConstraint="right">
          <Property name="itemCodes">pageSize,pages</Property>
          <Property name="dataSet">dsMain</Property>
        </DataPilot>
      </ToolBar>
    </Container>
    <Dialog id="dialogTrack">
      <Property name="width">98%</Property>
      <Property name="caption">巡检轨迹</Property>
      <Property name="contentOverflow">hidden</Property>
      <Property name="height">98%</Property>
      <Buttons/>
      <Children>
        <IFrame id="iFrameTrack" layoutConstraint="center"/>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>