From a31a452b9999ba3c811c36b5cb1b3ec0c18d037d Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期三, 08 十一月 2023 02:23:38 +0800
Subject: [PATCH] 提交MQTT相关功能

---
 src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml |   52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml b/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml
index 94c6caa..4a77418 100644
--- a/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml
+++ b/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml
@@ -93,6 +93,11 @@
         <Property name="dataType">Date</Property>
         <Property name="label">閫夋嫨鏃堕棿</Property>
       </PropertyDef>
+      <PropertyDef name="weight">
+        <Property name="dataType">Double</Property>
+        <Property name="defaultValue">0.00</Property>
+        <Property name="label">閲嶉噺</Property>
+      </PropertyDef>
     </DataType>
   </Model>
   <View layout="regionPadding:10">
@@ -160,6 +165,12 @@
         <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">
@@ -351,7 +362,7 @@
           <Property name="caption">纭畾鎵ц</Property>
         </Button>
         <Button>
-          <ClientEvent name="onClick">view.get(&quot;parent&quot;).hide();</ClientEvent>
+          <ClientEvent name="onClick">view.get(&quot;#dialogGrain&quot;).hide();</ClientEvent>
           <Property name="caption">鍙栨秷鎵ц</Property>
         </Button>
       </Buttons>
@@ -372,5 +383,44 @@
       <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.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;#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>
   </View>
 </ViewConfig>

--
Gitblit v1.9.3