From c3ff7417bcc2746016a494f894719c52ea3659a0 Mon Sep 17 00:00:00 2001 From: CZT <czt18638530771@163.com> Date: 星期一, 26 六月 2023 20:58:56 +0800 Subject: [PATCH] 优化文件接口--分页条件查询 --- src/main/java/com/fzzy/api/view/Api1109.view.xml | 80 ++++++++++++++++++++++++++++++++++++---- 1 files changed, 72 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/fzzy/api/view/Api1109.view.xml b/src/main/java/com/fzzy/api/view/Api1109.view.xml index 0ecc26a..a3e0704 100644 --- a/src/main/java/com/fzzy/api/view/Api1109.view.xml +++ b/src/main/java/com/fzzy/api/view/Api1109.view.xml @@ -62,12 +62,41 @@ <Property name="dataType">DateTime</Property> </PropertyDef> </DataType> + <DataType name="dtParam"> + <Property name="creationType">com.fzzy.api.data.ApiParam</Property> + <PropertyDef name="kqdm"> + <Property></Property> + <Property name="label">鎵�灞炲簱鍖�</Property> + </PropertyDef> + <PropertyDef name="start"> + <Property name="dataType">Date</Property> + <Property name="label">寮�濮嬫椂闂�</Property> + </PropertyDef> + <PropertyDef name="end"> + <Property name="dataType">Date</Property> + <Property name="label">鎴鏃堕棿</Property> + </PropertyDef> + <PropertyDef name="czbz"> + <Property></Property> + <Property name="label">鎿嶄綔鏍囧織</Property> + <Property name="mapping"> + <Property name="mapValues">${dorado.getDataProvider("apiTriggerService#trigger").getResult("CZBZ")}</Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </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">api1109PR#listAll</Property> + <Property name="pageSize">20</Property> + </DataSet> + <DataSet id="dsQuery"> + <ClientEvent name="onReady">self.insert();</ClientEvent> + <Property name="dataType">dtParam</Property> </DataSet> <ToolBar> <ToolBarLabel> @@ -76,14 +105,14 @@ <Property name="font-weight">bold</Property> </Property> </ToolBarLabel> - <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 query = view.get("#dsQuery").getData();
 + view.get("#dsMain").set("parameter",query).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">view.get("#dsMain").insert();
 view.get("#dialogMain").show();</ClientEvent> @@ -165,6 +194,34 @@ <Property name="exClassName">toolbar-button</Property> </ToolBarButton> </ToolBar> + <AutoForm> + <Property name="dataSet">dsQuery</Property> + <Property name="cols">*,*,*,*</Property> + <Property name="labelAlign">right</Property> + <Property name="labelSeparator">锛�</Property> + <Property name="labelWidth">90</Property> + <AutoFormElement> + <Property name="name">kqdm</Property> + <Property name="property">kqdm</Property> + <Editor/> + </AutoFormElement> + <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">czbz</Property> + <Property name="property">czbz</Property> + <Property name="trigger">autoMappingDropDown2</Property> + <Editor/> + </AutoFormElement> + </AutoForm> <DataGrid id="dgMain"> <Property name="dataSet">dsMain</Property> <Property name="selectionMode">multiRows</Property> @@ -201,6 +258,13 @@ <Property name="property">zhgxsj</Property> </DataColumn> </DataGrid> + <ToolBar layoutConstraint="bottom"> + <Fill/> + <DataPilot> + <Property name="itemCodes">pageSize,pages</Property> + <Property name="dataSet">dsMain</Property> + </DataPilot> + </ToolBar> <Dialog id="dialogMain"> <Property name="width">1000</Property> <Property name="caption">鏂囦欢淇℃伅</Property> -- Gitblit v1.9.3