jiazx0107@163.com
2023-11-09 1f5947ccb5b02817dbe5aaae943c0a7fcfc2cd62
src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml
@@ -15,32 +15,36 @@
        <Property name="label">库区代码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="appId">
        <Property/>
        <Property name="label">appId</Property>
      </PropertyDef>
      <PropertyDef name="gatewayId">
        <Property/>
        <Property></Property>
        <Property name="label">网关ID</Property>
      </PropertyDef>
      <PropertyDef name="gatewayUsername">
        <Property></Property>
        <Property name="label">网关用户名</Property>
      </PropertyDef>
      <PropertyDef name="gatewayPassword">
        <Property></Property>
        <Property name="label">网关密码</Property>
      </PropertyDef>
      <PropertyDef name="gatewayIp">
        <Property/>
        <Property></Property>
        <Property name="label">网关IP</Property>
      </PropertyDef>
      <PropertyDef name="gatewayMac">
        <Property/>
        <Property></Property>
        <Property name="label">网关Mac</Property>
      </PropertyDef>
      <PropertyDef name="gatewayCPU">
        <Property/>
        <Property></Property>
        <Property name="label">网关CPU</Property>
      </PropertyDef>
      <PropertyDef name="gatewayMem">
        <Property/>
        <Property></Property>
        <Property name="label">网关内存</Property>
      </PropertyDef>
      <PropertyDef name="gatewayHardDisk">
        <Property/>
        <Property></Property>
        <Property name="label">网关硬盘</Property>
      </PropertyDef>
      <PropertyDef name="userName">
@@ -78,12 +82,37 @@
        <Property name="label">粮库系统中库区编码</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam" parent="Map">
      <Property name="creationType">com.fzzy.gateway.hx2023.data.GateWayTestParam</Property>
      <PropertyDef name="start">
        <Property name="dataType">DateTime</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="dataType">DateTime</Property>
      </PropertyDef>
      <PropertyDef name="dayTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">选择时间</Property>
      </PropertyDef>
      <PropertyDef name="weight">
        <Property name="label">重量</Property>
        <Property name="dataType">Double</Property>
        <Property name="defaultValue">0.0</Property>
      </PropertyDef>
      <PropertyDef name="carNumber">
        <Property name="label">车牌</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">gatewayConfService#listAll</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <ClientEvent name="onReady">self.insert({});</ClientEvent>
      <Property name="dataType">dtParam</Property>
    </DataSet>
    <ToolBar>
      <ToolBarLabel>
@@ -99,14 +128,6 @@
        <Property name="iconClass">fa fa-plus</Property>
        <Property name="width">90</Property>
        <Property name="exClassName">toolbar-button</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
</ClientEvent>
        <Property name="caption">刷新</Property>
        <Property name="iconClass">fa fa-search</Property>
        <Property name="width">100</Property>
        <Property name="exClassName">toolbar-button-push</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">var cur = view.get(&quot;#dgMain&quot;).getCurrentItem();&#xD;
@@ -136,6 +157,31 @@
        <Property name="width">90</Property>
        <Property name="exClassName">toolbar-button-warn</Property>
      </ToolBarButton>
      <Separator/>
      <ToolBarButton>
        <ClientEvent name="onClick">view.get(&quot;#dialogGrain&quot;).show();</ClientEvent>
        <Property name="caption">粮情推送测试</Property>
        <Property name="iconClass">fa fa-search</Property>
        <Property name="exClassName">toolbar-button-push</Property>
      </ToolBarButton>
      <ToolBarButton>
        <ClientEvent name="onClick">view.get(&quot;#dialogWeight&quot;).show();</ClientEvent>
        <Property name="caption">地磅推送测试</Property>
        <Property name="iconClass">fa fa-search</Property>
        <Property name="exClassName">toolbar-button-push</Property>
      </ToolBarButton>
        <ToolBarButton>
            <ClientEvent name="onClick">view.get(&quot;#dialogLpr&quot;).show();</ClientEvent>
            <Property name="caption">车牌识别推送测试</Property>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="exClassName">toolbar-button-push</Property>
        </ToolBarButton>
      <ToolBarButton>
        <Property name="caption">网关初始化</Property>
        <Property name="iconClass">fa fa-search</Property>
        <Property name="exClassName">toolbar-button-push</Property>
        <Property name="action">ajaxInit</Property>
      </ToolBarButton>
    </ToolBar>
    <DataGrid id="dgMain">
      <Property name="dataSet">dsMain</Property>
@@ -154,6 +200,13 @@
        <Property name="name">grade</Property>
        <Property name="width">200</Property>
      </DataColumn>
      <DataColumn name="gatewayId">
        <Property name="property">gatewayId</Property>
        <Property name="width">300</Property>
      </DataColumn>
      <DataColumn name="gatewayUsername">
        <Property name="property">gatewayUsername</Property>
      </DataColumn>
      <DataColumn name="userName">
        <Property name="property">userName</Property>
      </DataColumn>
@@ -162,9 +215,6 @@
      </DataColumn>
      <DataColumn name="exeTag">
        <Property name="property">exeTag</Property>
      </DataColumn>
      <DataColumn name="deptId">
        <Property name="property">deptId</Property>
      </DataColumn>
    </DataGrid>
    <Dialog id="dialogMain">
@@ -216,6 +266,17 @@
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">gatewayUsername</Property>
              <Property name="property">gatewayUsername</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">gatewayPassword</Property>
              <Property name="property">gatewayPassword</Property>
              <Property name="editorType">PasswordEditor</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">gatewayIp</Property>
              <Property name="property">gatewayIp</Property>
              <Editor/>
@@ -238,11 +299,6 @@
            <AutoFormElement>
              <Property name="name">gatewayHardDisk</Property>
              <Property name="property">gatewayHardDisk</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">appId</Property>
              <Property name="property">appId</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
@@ -302,5 +358,114 @@
      <Property name="service">gatewayConfService#pushData</Property>
      <Property name="confirmMessage">确定要上报么?</Property>
    </AjaxAction>
    <Dialog id="dialogGrain">
      <Property name="width">400</Property>
      <Property name="height">300</Property>
      <Property name="caption">选择条件</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
view.get(&quot;#ajaxTestGrain&quot;).set(&quot;parameter&quot;,data.toJSON()).execute(function(result){&#xD;
   self.get(&quot;parent&quot;).hide();&#xD;
   $alert(result);&#xD;
});</ClientEvent>
          <Property name="caption">确定执行</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dialogGrain&quot;).hide();</ClientEvent>
          <Property name="caption">取消执行</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsQuery</Property>
          <Property name="cols">*</Property>
          <AutoFormElement>
            <Property name="name">dayTime</Property>
            <Property name="property">dayTime</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxTestGrain">
      <Property name="service">gatewayDeviceService#ajaxTestGrain</Property>
      <Property name="executingMessage">在努力执行中……</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInit">
      <Property name="service">apiInitService#init</Property>
      <Property name="executingMessage">在努力执行中……</Property>
    </AjaxAction>
    <Dialog id="dialogWeight">
      <Property name="width">400</Property>
      <Property name="height">300</Property>
      <Property name="caption">输入重量</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
view.get(&quot;#ajaxTestWeight&quot;).set(&quot;parameter&quot;,data.get(&quot;weight&quot;)).execute(function(result){&#xD;
   self.get(&quot;parent&quot;).hide();&#xD;
   $alert(result);&#xD;
});</ClientEvent>
          <Property name="caption">确定执行</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dialogWeight&quot;).hide();</ClientEvent>
          <Property name="caption">取消执行</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsQuery</Property>
          <Property name="cols">*</Property>
          <AutoFormElement>
            <Property name="name">weight</Property>
            <Property name="property">weight</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxTestWeight">
      <Property name="service">gatewayDeviceService#ajaxTestWeight</Property>
      <Property name="executingMessage">在努力执行中……</Property>
    </AjaxAction>
    <Dialog id="dialogLpr">
      <Property name="width">400</Property>
      <Property name="height">300</Property>
      <Property name="caption">输入车牌</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
view.get(&quot;#ajaxTestLpr&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
   self.get(&quot;parent&quot;).hide();&#xD;
   $alert(result);&#xD;
});</ClientEvent>
          <Property name="caption">确定执行</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dialogLpr&quot;).hide();</ClientEvent>
          <Property name="caption">取消执行</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsQuery</Property>
          <Property name="cols">*</Property>
          <AutoFormElement>
            <Property name="name">carNumber</Property>
            <Property name="property">carNumber</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxTestLpr">
      <Property name="service">gatewayDeviceService#ajaxTestLpr</Property>
      <Property name="executingMessage">在努力执行中……</Property>
    </AjaxAction>
  </View>
</ViewConfig>