jiazx0107@163.com
2023-05-17 620eab6cca2bc9ef9ea6d3067a0a5ba1deadbd1c
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
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View layout="padding:5;regionPadding:5">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="loadMode">lazy</Property>
      <Property name="dataType">[dtAreationIntelTask]</Property>
      <Property name="dataProvider">areationIntelPR#listAreation</Property>
    </DataSet>
    <ToolBar>
      <ClientEvent name="onReady">var width = window.innerWidth;&#xD;
width = (width-1000)/2;&#xD;
self.set(&quot;style&quot;, &quot;margin-left:&quot;+width+&quot;px&quot;);</ClientEvent>
      <Property name="style">
        <Property name="color">#8f7f5d</Property>
        <Property name="background">#FFEFD5</Property>
      </Property>
      <Property name="hideMode">display</Property>
      <Property name="width">1000</Property>
      <SimpleIconButton>
        <Property name="iconClass">fa fa-smile-o</Property>
      </SimpleIconButton>
      <ToolBarLabel layoutConstraint="padding:5">
        <Property name="text">通过创建通风任务和配置开启关闭条件,系统根据任务自动执行通风</Property>
      </ToolBarLabel>
      <Fill/>
      <SimpleIconButton>
        <ClientEvent name="onClick">self.get(&quot;parent&quot;).set(&quot;visible&quot;,false);&#xD;
</ClientEvent>
        <Property name="iconClass">fa fa-times</Property>
      </SimpleIconButton>
    </ToolBar>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="contentOverflow">hidden</Property>
      <Property name="height">55</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;#dialogMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn-default</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}</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 data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!data){&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        data.remove();&#xD;
    }&#xD;
});</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn-warn</Property>
        <Property name="iconClass">fa fa-minus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!data){&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#ajaxRun&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
    }&#xD;
});</ClientEvent>
        <Property name="caption">启动任务</Property>
        <Property name="exClassName">btn-normal</Property>
        <Property name="iconClass">fa fa-caret-square-o-right</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!data){&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#ajaxStop&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
    }&#xD;
});</ClientEvent>
        <Property name="caption">任务停止</Property>
        <Property name="exClassName">btn-warn</Property>
        <Property name="iconClass">fa fa-power-off</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
</ClientEvent>
        <Property name="caption">刷新</Property>
        <Property name="exClassName">btn-default</Property>
        <Property name="iconClass">fa fa-refresh</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid layoutConstraint="center padding:5px">
        <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <RowNumColumn/>
        <DataColumn name="depotId">
          <Property name="property">depotId</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">intelConf</Property>
          <Property name="name">intelConf</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">autoId</Property>
          <Property name="name">autoId</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
        <DataColumn name="start">
          <Property name="property">start</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
        <DataColumn name="end">
          <Property name="property">end</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
        <DataColumn name="status">
          <Property name="property">status</Property>
          <Property name="align">center</Property>
          <Property name="readOnly">true</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain" layout="padding:5;regionPadding:10">
      <Property name="width">800</Property>
      <Property name="caption">智能通风任务信息</Property>
      <Property name="iconClass">fa fa-flag-o</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(data.validate() != 'ok'){&#xD;
    $notify(&quot;数据校验失败!!&quot;);&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#uaAction&quot;).set(&quot;parameter&quot;,data).execute(function(){&#xD;
    self.get(&quot;parent&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="caption">确认</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="width">90</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">90</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsMain</Property>
          <Property name="cols">*,*</Property>
          <Property name="labelWidth">100</Property>
          <Property name="labelAlign">right</Property>
          <Property name="labelSeparator">:</Property>
          <AutoFormElement>
            <Property name="name">depotId</Property>
            <Property name="property">depotId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">status</Property>
            <Property name="property">status</Property>
            <Property name="readOnly">true</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">intelConf</Property>
            <Property name="property">intelConf</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">选择智能参数配置方案,如无,请先新增</Property>
          </Label>
          <AutoFormElement>
            <Property name="name">autoId</Property>
            <Property name="property">autoId</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">选择当前仓库配置的通风方案动作方案,如无,请新增</Property>
          </Label>
          <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>
          <AutoFormElement>
            <Property name="name">updateTime</Property>
            <Property name="property">updateTime</Property>
            <Property name="readOnly">true</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateUser</Property>
            <Property name="property">updateUser</Property>
            <Property name="readOnly">true</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaAction">
      <Property name="dataResolver">areationIntelPR#saveIntel</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="confirmMessage">确定要删除吗?</Property>
      <Property name="service">areationIntelPR#delIntel</Property>
    </AjaxAction>
    <AjaxAction id="ajaxRun">
      <Property name="confirmMessage">确定要启动当前任务么?</Property>
      <Property name="service">areationIntelPR#taskRun</Property>
    </AjaxAction>
    <AjaxAction id="ajaxStop">
      <Property name="confirmMessage">确定要停止当前任务么?</Property>
      <Property name="service">areationIntelPR#taskStop</Property>
    </AjaxAction>
  </View>
</ViewConfig>