CZT
2023-09-06 71c4fa1e27f75ae4b765c95c67a3069c84dc72ba
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
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.ld.igds.models.SecPatrolRecord</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">ID</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
      </PropertyDef>
      <PropertyDef name="deviceId">
        <Property></Property>
        <Property name="label">设备编号</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">巡逻人</Property>
      </PropertyDef>
      <PropertyDef name="pointId">
        <Property></Property>
        <Property name="label">巡逻点ID</Property>
      </PropertyDef>
      <PropertyDef name="pointName">
        <Property></Property>
        <Property name="label">巡逻点名称</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">巡逻时间</Property>
      </PropertyDef>
      <PropertyDef name="longitude">
        <Property></Property>
        <Property name="label">经度</Property>
      </PropertyDef>
      <PropertyDef name="latitude">
        <Property></Property>
        <Property name="label">纬度</Property>
      </PropertyDef>
      <PropertyDef name="imgName">
        <Property></Property>
        <Property name="label">巡更照片文件</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam">
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">巡逻人</Property>
      </PropertyDef>
      <PropertyDef name="start">
        <Property name="dataType">Date</Property>
        <Property name="label">开始时间</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="dataType">Date</Property>
        <Property name="label">截止时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onClick">/**&#xD;
      * 轨迹查看&#xD;
      */&#xD;
      showLocus = function(){&#xD;
      var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
      &#xD;
      var url = &quot;./basic/security/show-locus?patrolId=&quot;+cur.get(&quot;id&quot;);&#xD;
      &#xD;
      view.get(&quot;#iFrameVideo&quot;).set(&quot;path&quot;,url);&#xD;
      var time = cur.get(&quot;createTime&quot;).formatDate(&quot;y-m-d&quot;);&#xD;
      var userName = cur.get(&quot;userName&quot;);&#xD;
      view.get(&quot;#dialogVideo&quot;).set(&quot;caption&quot;,time + &quot;,&quot; + userName + &quot;巡更记录&quot;);&#xD;
      view.get(&quot;#dialogVideo&quot;).show();&#xD;
      };</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="loadMode">lazy</Property>
      <Property name="dataProvider">securityPR#pagePatrol</Property>
      <Property name="dataType">[dtMain]</Property>
      <Property name="pageSize">15</Property>
    </DataSet>
    <DataSet id="dsParam">
      <ClientEvent name="onReady">self.insert({});</ClientEvent>
      <Property name="dataType">dtParam</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <AutoForm>
        <Property name="cols">*,*,*,*</Property>
        <Property name="dataSet">dsParam</Property>
        <Property name="labelAlign">right</Property>
        <Property name="labelSeparator">:</Property>
        <Property name="labelWidth">100</Property>
        <AutoFormElement>
          <Property name="name">userName</Property>
          <Property name="property">userName</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>
        <Container layout="regionPadding:15">
          <Button layoutConstraint="left">
            <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
              view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn-default</Property>
            <Property name="iconClass">fa fa-refresh</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).setData({});</ClientEvent>
            <Property name="exClassName">btn-warn</Property>
            <Property name="iconClass">fa fa-refresh</Property>
            <Property name="caption">重置</Property>
          </Button>
        </Container>
      </AutoForm>
      <DataGrid layoutConstraint="center padding:5px">
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <RowNumColumn/>
        <DataColumn name="userName">
          <Property name="property">userName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="pointName">
          <Property name="property">pointName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="createTIme">
          <Property name="property">createTime</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">longitude</Property>
          <Property name="align">center</Property>
          <Property name="name">longitude</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">latitude</Property>
          <Property name="align">center</Property>
          <Property name="name">latitude</Property>
        </DataColumn>
        <DataColumn>
          <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='showLocus()'>轨迹查看&lt;/a>&quot;;</ClientEvent>
          <Property name="width">120</Property>
          <Property name="caption">操作</Property>
          <Property name="align">center</Property>
          <Editor/>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogVideo">
      <Property name="width">95%</Property>
      <Property name="caption">巡更轨迹</Property>
      <Property name="contentOverflow">hidden</Property>
      <Property name="height">99%</Property>
      <Buttons/>
      <Children>
        <IFrame id="iFrameVideo" layoutConstraint="center"/>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>