From 93e01fa050330ead95041ed11cc85e9765c19fc1 Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期四, 09 十一月 2023 12:06:52 +0800 Subject: [PATCH] 手动测试 --- src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml | 270 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 250 insertions(+), 20 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 ac6066d..3e6254f 100644 --- a/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml +++ b/src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml @@ -6,38 +6,70 @@ <DataType name="dtMain"> <Property name="creationType">com.fzzy.gateway.entity.GatewayConf</Property> <PropertyDef name="kqmc"> - <Property/> + <Property></Property> <Property name="label">搴撳尯鍚嶇О</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="kqdm"> - <Property/> + <Property></Property> <Property name="label">搴撳尯浠g爜</Property> <Property name="required">true</Property> </PropertyDef> + <PropertyDef name="gatewayId"> + <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 name="label">缃戝叧IP</Property> + </PropertyDef> + <PropertyDef name="gatewayMac"> + <Property></Property> + <Property name="label">缃戝叧Mac</Property> + </PropertyDef> + <PropertyDef name="gatewayCPU"> + <Property></Property> + <Property name="label">缃戝叧CPU</Property> + </PropertyDef> + <PropertyDef name="gatewayMem"> + <Property></Property> + <Property name="label">缃戝叧鍐呭瓨</Property> + </PropertyDef> + <PropertyDef name="gatewayHardDisk"> + <Property></Property> + <Property name="label">缃戝叧纭洏</Property> + </PropertyDef> <PropertyDef name="userName"> - <Property/> + <Property></Property> <Property name="label">鐪佸钩鍙板笎鍙�</Property> </PropertyDef> <PropertyDef name="password"> - <Property/> + <Property></Property> <Property name="label">鐪佸钩鍙板瘑鐮�</Property> </PropertyDef> <PropertyDef name="publicKey"> - <Property/> + <Property></Property> <Property name="label">鐪佸钩鍙板叕閽�</Property> </PropertyDef> <PropertyDef name="apiUrl"> - <Property/> + <Property></Property> <Property name="label">鐪佸钩鍙版帴鍙e湴鍧�</Property> </PropertyDef> <PropertyDef name="exeTag"> - <Property/> + <Property></Property> <Property name="label">鏄惁鍚敤</Property> </PropertyDef> <PropertyDef name="pushProtocol"> <Property></Property> - <Property name="label">涓婅鍗忚</Property> + <Property name="label">鐪佸钩鍙板崗璁�</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("apiTriggerService#triggerPushProtocol").getResult()}</Property> <Property name="keyProperty">code</Property> @@ -46,8 +78,29 @@ <Property name="required">true</Property> </PropertyDef> <PropertyDef name="deptId"> - <Property/> + <Property></Property> <Property name="label">绮簱绯荤粺涓簱鍖虹紪鐮�</Property> + </PropertyDef> + </DataType> + <DataType name="dtParam"> + <Property name="creationType">com.fzzy.gateway.entity.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> @@ -56,6 +109,10 @@ <DataSet id="dsMain"> <Property name="dataType">[dtMain]</Property> <Property name="dataProvider">gatewayConfService#listAll</Property> + </DataSet> + <DataSet id="dsQuery"> + <Property name="dataType">dtParam</Property> + <Property name="dataProvider">gatewayDeviceService#getQuery</Property> </DataSet> <ToolBar> <ToolBarLabel> @@ -71,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("#dsMain").flushAsync();
 -</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("#dgMain").getCurrentItem();
 @@ -108,6 +157,31 @@ <Property name="width">90</Property> <Property name="exClassName">toolbar-button-warn</Property> </ToolBarButton> + <Separator/> + <ToolBarButton> + <ClientEvent name="onClick">view.get("#dialogGrain").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("#dialogWeight").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("#dialogLpr").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> @@ -126,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> @@ -134,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"> @@ -180,6 +258,47 @@ <AutoFormElement> <Property name="name">kqdm</Property> <Property name="property">kqdm</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">gatewayId</Property> + <Property name="property">gatewayId</Property> + <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/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">gatewayMac</Property> + <Property name="property">gatewayMac</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">gatewayCPU</Property> + <Property name="property">gatewayCPU</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">gatewayMem</Property> + <Property name="property">gatewayMem</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">gatewayHardDisk</Property> + <Property name="property">gatewayHardDisk</Property> <Editor/> </AutoFormElement> <AutoFormElement> @@ -239,5 +358,116 @@ <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("#dsQuery.data");
 +view.get("#ajaxTestGrain").set("parameter",data.toJSON()).execute(function(result){
 + self.get("parent").hide();
 + $alert(result);
 +});</ClientEvent> + <Property name="caption">纭畾鎵ц</Property> + </Button> + <Button> + <ClientEvent name="onClick">view.get("#dialogGrain").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("#dsQuery.data");
 +view.get("#ajaxTestWeight").set("parameter",data.toJSON()).execute(function(result){
 + self.get("parent").hide();
 + $alert(result);
 +});</ClientEvent> + <Property name="caption">纭畾鎵ц</Property> + </Button> + <Button> + <ClientEvent name="onClick">view.get("#dialogWeight").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("#dsQuery.data");
 +console.log(data.toJSON());
 +view.get("#ajaxTestLpr").set("parameter",data.toJSON()).execute(function(result){
 + self.get("parent").hide();
 + $alert(result);
 +});</ClientEvent> + <Property name="caption">纭畾鎵ц</Property> + <Property name="action">updateAction1</Property> + </Button> + <Button> + <ClientEvent name="onClick">view.get("#dialogLpr").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="executingMessage">鍦ㄥ姫鍔涙墽琛屼腑鈥︹��</Property> + <Property name="service">gatewayDeviceService#ajaxTestLpr</Property> + </AjaxAction> </View> </ViewConfig> -- Gitblit v1.9.3