czt
2024-07-13 bd01ba57ed8526a0ee94a50e1f52034251bb54f6
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">var depotList = null;&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">depotPR#getConfList</Property>
      <Property name="dataType">[dtDepotConf]</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">view.get(&quot;#dsMain&quot;).insert();&#xD;
view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,false);&#xD;
view.get(&quot;#dgMain&quot;).show();</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">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!cur) return ;&#xD;
view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,true);&#xD;
view.get(&quot;#dgMain&quot;).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 entity = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(entity){&#xD;
    view.get(&quot;#ajaxDel2&quot;).set(&quot;parameter&quot;,entity).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
        }else{&#xD;
            entity.remove();&#xD;
        }&#xD;
    });&#xD;
}</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">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!cur) return ;&#xD;
view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,true);&#xD;
view.get(&quot;#dgMain&quot;).show();</ClientEvent>
      <Property name="dataSet">dsMain</Property>
      <Property name="readOnly">true</Property>
      <IndicatorColumn/>
      <DataColumn name="depotId">
        <Property name="property">depotId</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="grainSer">
        <Property name="property">grainSer</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn>
        <Property name="property">cableRule</Property>
        <Property name="align">center</Property>
        <Property name="name">cableRule</Property>
      </DataColumn>
      <DataColumn name="cableCir">
        <Property name="property">cableCir</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="tempMax">
        <Property name="property">tempMax</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="grainFreq">
        <Property name="property">grainFreq</Property>
      </DataColumn>
      <DataColumn name="n2Max">
        <Property name="property">n2Max</Property>
      </DataColumn>
      <DataColumn name="co2Max">
        <Property name="property">co2Max</Property>
      </DataColumn>
      <DataColumn name="o2Max">
        <Property name="property">o2Max</Property>
      </DataColumn>
      <DataColumn name="ph3Max">
        <Property name="property">ph3Max</Property>
      </DataColumn>
    </DataGrid>
    <UpdateAction id="uaMain">
      <Property name="dataResolver">depotPR#saveConf</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxRefreshCache">
      <Property name="service">depotPR#flushConfCache</Property>
      <Property name="successMessage">刷新成功!</Property>
      <Property name="confirmMessage">确定要刷新缓存么?</Property>
    </AjaxAction>
    <Dialog id="dgMain">
      <ClientEvent name="onShow">//根据仓库类型不同,显示不同的配置信息</ClientEvent>
      <Property name="caption">检测配置参数</Property>
      <Property name="width">900</Property>
      <Property name="closeable">false</Property>
      <Property name="height">600</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#uaMain&quot;).execute(function(){&#xD;
    view.get(&quot;#dgMain&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="caption">确认更新</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
view.get(&quot;#dgMain&quot;).hide();</ClientEvent>
          <Property name="caption">取消更新</Property>
          <Property name="iconClass">fa fa-share-square-o</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet>
          <Property name="caption">基本信息</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement id="depotId">
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet>
          <Property name="caption">粮温检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">grainSer</Property>
                <Property name="property">grainSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableStart</Property>
                <Property name="property">cableStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableEnd</Property>
                <Property name="property">cableEnd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableRule</Property>
                <Property name="property">cableRule</Property>
                <Property name="label">布线规则</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:平方仓:层-行-列,筒仓:第1圈根数-第2圈根数-第n圈根数</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">cableCir</Property>
                <Property name="property">cableCir</Property>
                <Property name="label">层规则</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:只针对筒仓:第1圈层数-第2圈层数-第n圈层数</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">tempMax</Property>
                <Property name="property">tempMax</Property>
                <Property name="label">粮温上限</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startOrientation</Property>
                <Property name="name">startOrientation</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startDirection</Property>
                <Property name="name">startDirection</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startPoint</Property>
                <Property name="name">startPoint</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                  <Property name="property">startConvert</Property>
                  <Property name="name">startConvert</Property>
                  <Property name="editable">false</Property>
                  <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">cableCone</Property>
                <Property name="name">cableCone</Property>
                <Property name="editable">false</Property>
                <Property name="trigger">autoMappingDropDown1</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">grainFreq</Property>
                <Property name="property">grainFreq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">thSer</Property>
                <Property name="property">thSer</Property>
                <Property name="trigger">autoMappingDropDown2</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">thConf</Property>
                <Property name="property">thConf</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var grainFreq = view.get(&quot;#dsMain.data:#&quot;).get(&quot;grainFreq&quot;);&#xD;
&#xD;
if(grainFreq){&#xD;
    view.get(&quot;#ajaxUpdateFreq&quot;).set(&quot;parameter&quot;,grainFreq).execute(function(){&#xD;
        view.get(&quot;#dgMain&quot;).hide();&#xD;
        view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;请先配置更新频率!&quot;)&#xD;
}</ClientEvent>
                <Property name="caption">频率同步</Property>
                <Property name="tip">更新所有仓库频率一致</Property>
                <Property name="iconClass">fa fa-refresh</Property>
              </Button>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet>
          <Property name="caption">气体检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">gasSer</Property>
                <Property name="property">gasSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">gasStart</Property>
                <Property name="property">gasStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">gasEnd</Property>
                <Property name="property">gasEnd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">n2Max</Property>
                <Property name="property">n2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">co2Max</Property>
                <Property name="property">co2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">o2Max</Property>
                <Property name="property">o2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ph3Max</Property>
                <Property name="property">ph3Max</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.ld.igds.modbus.GasModbus.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframModbus&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogModbus&quot;).show();</ClientEvent>
                <Property name="caption">Modbus配置</Property>
                <Property name="tip">针对Modbus协议的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
              </Button>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet>
          <Property name="caption">虫害检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">pestSer</Property>
                <Property name="property">pestSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">pestStart</Property>
                <Property name="property">pestStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">pestEnd</Property>
                <Property name="property">pestEnd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">pestMax</Property>
                <Property name="property">pestMax</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.ld.igds.modbus.PestModbus.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframModbus&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogModbus&quot;).show();</ClientEvent>
                <Property name="caption">Modbus配置</Property>
                <Property name="tip">针对Modbus协议的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
              </Button>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet>
          <Property name="caption">其他配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">verbSer</Property>
                <Property name="property">verbSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">esSer</Property>
                <Property name="property">esSer</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxUpdateFreq">
      <Property name="confirmMessage">确定要更新所有仓库?</Property>
      <Property name="service">depotPR#updateFreq</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel2">
      <Property name="successMessage">删除成功</Property>
      <Property name="service">depotPR#delDepotConf</Property>
      <Property name="executingMessage">正在删除</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDepotList">
      <Property name="service">depotPR#ajaxGetAllCache</Property>
      <Property name="executingMessage">初始化数据……</Property>
    </AjaxAction>
    <Dialog id="dialogModbus">
      <Property name="width">80%</Property>
      <Property name="height">95%</Property>
      <Property name="caption">Modbus-TCP配置</Property>
      <Buttons/>
      <Children>
        <IFrame id="iframModbus">
          <Property name="path">com.ld.igds.modbus.GasModbus.d</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>