czt
2025-06-04 688fd8243286b342bfdeb3ee0b4ee45be4c005cc
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View>
    <ClientEvent name="onReady">var depotList = null;&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">depotConfPR#getConfList</Property>
      <Property name="dataType">[dtDepotConf]</Property>
    </DataSet>
    <Container>
      <Property name="exClassName">c-data</Property>
      <ToolBar>
        <ToolBarLabel>
          <Property name="text">菜单栏:</Property>
          <Property name="exClassName">menu-bar-caption</Property>
        </ToolBarLabel>
        <ToolBarButton 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">btn1</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dgMain&quot;).show();&#xD;
    view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,true);&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">修改</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-pencil</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel2&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
        }else{&#xD;
            entity.remove();&#xD;
        }&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-trash-o</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <Property name="caption">刷新缓存</Property>
          <Property name="exClassName">btn-flush</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="action">ajaxRefreshCache</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:15px 0px 0px 0px">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&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="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>
    </Container>
    <UpdateAction id="uaMain">
      <Property name="dataResolver">depotConfPR#saveConf</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxRefreshCache">
      <Property name="service">depotConfPR#flushConfCache</Property>
      <Property name="successMessage">刷新成功!</Property>
      <Property name="confirmMessage">确定要刷新缓存么?</Property>
    </AjaxAction>
    <Dialog id="dgMain" layout="regionPadding:10">
      <ClientEvent name="onShow">//根据仓库类型不同,显示不同的配置信息</ClientEvent>
      <Property name="caption">检测配置参数</Property>
      <Property name="width">75%</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>
          <Property name="exClassName">btn1</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>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:5">
          <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 id="depotId">
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Property name="readOnly">true</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">grainSer</Property>
                <Property name="property">grainSer</Property>
                <Editor/>
              </AutoFormElement>
              <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">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="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">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="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>
              <AutoFormElement>
                <Property name="name">isOnlyTH</Property>
                <Property name="property">isOnlyTH</Property>
                <Editor/>
              </AutoFormElement>
              <Label>
                <Property name="text">说明:默认粮情电缆,为温湿度设备需选择!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">grainFreq</Property>
                <Property name="property">grainFreq</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>
                <Property name="exClassName">btn2</Property>
              </Button>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <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>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.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>
                <Property name="exClassName">btn4</Property>
              </Button>
              <AutoFormElement>
                <Property name="name">gasSerTag</Property>
                <Property name="property">gasSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多气体分机配置</Property>
                <Property name="tip">针对多气体分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:多气体分机时,所有分机需要全部配置。气体检测配置通道默认全部通道!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <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>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <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">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>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.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>
                <Property name="exClassName">btn4</Property>
              </Button>
              <AutoFormElement>
                <Property name="name">pestSerTag</Property>
                <Property name="property">pestSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多虫害分机配置</Property>
                <Property name="tip">针对多虫害分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:多虫害分机时,所有分机需要全部配置。虫害检测配置通道默认全部通道!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">pestMax</Property>
                <Property name="property">pestMax</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <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">esSer</Property>
                <Property name="property">esSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">esSerTag</Property>
                <Property name="property">esSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多能耗分机配置</Property>
                <Property name="tip">针对多能耗分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:1">
                <Property name="text">说明:多能耗分机时,所有分机需要全部配置。</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement layoutConstraint="colSpan:3">
                <Property name="name">verbSer</Property>
                <Property name="property">verbSer</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxUpdateFreq">
      <Property name="confirmMessage">确定要更新所有仓库?</Property>
      <Property name="service">depotConfPR#updateFreq</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel2">
      <Property name="successMessage">删除成功</Property>
      <Property name="service">depotConfPR#delDepotConf</Property>
      <Property name="executingMessage">正在删除</Property>
      <Property name="confirmMessage">确定要删除么?</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.fzzy.igds.sys.GasModbus.d</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogGasSerConf">
      <Property name="width">80%</Property>
      <Property name="height">95%</Property>
      <Property name="caption">气体多分机配置</Property>
      <Buttons/>
      <Children>
        <IFrame id="iframGasSerConf">
          <Property name="path">com.fzzy.igds.sys.GasSerConf.d</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>