Sfoglia il codice sorgente

1.0.86 修复查询窗口导出bug

liuyanpeng 1 anno fa
parent
commit
fd3ae0e991
3 ha cambiato i file con 23 aggiunte e 14 eliminazioni
  1. 1 1
      package.json
  2. 16 4
      packages/info/src/QueryCondition.vue
  3. 6 9
      packages/info/src/QueryPage.vue

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pc-component-v3",
-  "version": "1.0.85",
+  "version": "1.0.86",
   "description": "",
   "main": "dist/pc-component-v3.js",
   "scripts": {

+ 16 - 4
packages/info/src/QueryCondition.vue

@@ -31,7 +31,7 @@
             @simple-search="simpleSearch"
             @refresh-search="refreshSearch"
             @execute-process="executeProcess($event)"
-            @execute-export="executeExport"
+            @execute-export="executeExport(true)"
           />
         </div>
 
@@ -55,7 +55,7 @@
               :show-button="showButton"
               @complex-search="complexSearch"
               @execute-process="executeProcess($event)"
-              @execute-export="executeExport"
+              @execute-export="executeExport(false)"
             />
           </a-drawer>
         </div>
@@ -154,6 +154,17 @@ export default {
       },
       immediate:true,
     },
+
+    searchVisible:{
+      handler(newVal){
+        if(newVal){
+          this.searchType = 'complex';
+        } else {
+          this.searchType = 'simple';
+        }
+      },
+      immediate:true,
+    },
     
     
   },
@@ -169,6 +180,7 @@ export default {
     },
     closeSearch(){
       this.searchVisible = false;
+      this.searchType = 'simple';
       this.$emit('openComplex',false);
     },
     /**
@@ -238,8 +250,8 @@ export default {
          * 执行导出
          * @return {void} 
          */
-    executeExport: function () {
-      this.$emit('executeExport');
+    executeExport: function (isSimple) {
+      this.$emit('executeExport',isSimple);
     },
 
     /**

+ 6 - 9
packages/info/src/QueryPage.vue

@@ -434,6 +434,7 @@ export default {
     },
     openComplex:function(value){
       this.isComplex = value;
+      this.searchType = 'complex';
     },
     // 页码数量改变
     gridSizeSelect: function (newPageSize) {
@@ -620,10 +621,7 @@ export default {
 
     queryInfoWindowDataSimple: function () {
       var _self = this;
-      if (_self.$refs.loading) {
-        _self.loading = true;
-      }
-
+      _self.loading = true;
       _self.infoQueryParam.whereClauseSource = _self.whereClauseSource;
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
@@ -647,11 +645,10 @@ export default {
           );
 
           _self.fixedTableHeader();
+          _self.loading = false;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          if (_self.$refs.loading) {
-            _self.loading = false;
-          }
+          _self.loading = false;
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
@@ -960,11 +957,11 @@ export default {
      * 执行导出
      * @return {void}
      */
-    executeExport: function () {
+    executeExport: function (isSimple) {
       var _self = this;
 
       // var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery();
-      if (this.isComplex == false) {
+      if (isSimple) {
         let condition = _self.$refs.queryCondition.getQueryCondition();
         let downloadUrl =
           Common.getApiURL('exportResource/exportInfoDataSimple') +