Преглед на файлове

feat: 1.0.7 curd问题修复
- 修复curd查看详情上一个、下一个没有按照筛选条件翻的bug
- 修复curd查看详情上一个、下一个时子页签图片为变化的bug
- 修复当点击复杂查询的查询按钮后简单查询参数仍存在的bug
- 修改当关闭详情模态框后不再刷新表格内容

liuyanpeng преди 5 месеца
родител
ревизия
87778376f7

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v5",
   "description": "Leanwo Prodog Client",
-  "version": "1.0.6",
+  "version": "1.0.7",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "ins": "npm install --registry http://wuzhixin.vip:4873",

+ 35 - 4
src/window1/CurdWindowModal.vue

@@ -5,16 +5,17 @@
     :window-no="mCurdWindowNo" :tab-index="mTabIndex" :type="tabEditViewType" :model-data-id="tabEditViewRecordId"
     width="90%" :current-page="tabEditViewCurrentPage" :current-index="tabEditViewCurrentIndex"
     :total-records="tabEditViewTotalRecords" :task-info-id="tabEditViewTaskInfoId"
+    :simple-filter-params="tabEditViewSimpleFilterParams" :complex-filter-params="tabEditViewComplexFilterParams"
     :workflow-type="tabEditViewWorkflowType" :mask-closable="false" :model-data-create="modelDataCreate"
-    @open-tab-form-view="openTabFormView"
+    :sort-str="tabEditViewSortStr" @open-tab-form-view="openTabFormView"
   />
   <TabFormViewModal
     v-if="openTabViewModal" v-model:open="openTabViewModal"
     :uuid="uuid" :window-no="mCurdWindowNo" :tab-index="mTabIndex"
     :type="tabFormViewType" :model-data-id="tabFormViewRecordId" width="90%" :current-page="tabFormViewCurrentPage"
-    :current-index="tabFormViewCurrentIndex" :total-records="tabFormViewTotalRecords"
-    :task-info-id="tabFormViewTaskInfoId" :workflow-type="tabFormViewWorkflowType" :mask-closable="false"
-    @open-tab-edit-view="openTabEditView"
+    :current-index="tabFormViewCurrentIndex" :total-records="tabFormViewTotalRecords" :simple-filter-params="tabFormViewSimpleFilterParams"
+    :task-info-id="tabFormViewTaskInfoId" :workflow-type="tabFormViewWorkflowType" :mask-closable="false" :complex-filter-params="tabFormViewComplexFilterParams"
+    :sort-str="tabFormViewSortStr" @open-tab-edit-view="openTabEditView"
   />
 </template>
 
@@ -88,6 +89,18 @@ const props = defineProps({
     type: String,
     default: null,
   },
+  sortStr: {
+    type: String,
+    default: null,
+  },
+  simpleFilterParams: {
+    type: String,
+    default: null,
+  },
+  complexFilterParams: {
+    type: Object,
+    default: null,
+  },
   // 创建新数据时,填充已知的值FieldValue
   modelDataCreate: {
     type: Object,
@@ -110,6 +123,9 @@ const tabEditViewTotalRecords = ref(null);
 const tabEditViewIsRestoreData = ref(false);
 const tabEditViewTaskInfoId = ref(null);
 const tabEditViewWorkflowType = ref(null);
+const tabEditViewSortStr = ref(null);
+const tabEditViewSimpleFilterParams = ref(null);
+const tabEditViewComplexFilterParams = ref(null);
 
 const openTabViewModal = ref(false);
 const tabFormViewType = ref('view');
@@ -119,6 +135,9 @@ const tabFormViewCurrentIndex = ref(null);
 const tabFormViewTotalRecords = ref(null);
 const tabFormViewTaskInfoId = ref(null);
 const tabFormViewWorkflowType = ref(null);
+const tabFormViewSortStr = ref(null);
+const tabFormViewSimpleFilterParams = ref(null);
+const tabFormViewComplexFilterParams = ref(null);
 
 const emits = defineEmits(['update:open']);
 
@@ -167,6 +186,9 @@ onMounted(() => {
       isRestoreData: props.isRestoreData,
       taskInfoId: props.taskInfoId,
       workflowType: props.workflowType,
+      sortStr: props.sortStr,
+      simpleFilterParams: props.simpleFilterParams,
+      complexFilterParams: props.complexFilterParams,
     });
   }else if(props.viewType == 'view' || props.viewType == 'viewRestore'){
     openTabFormView({
@@ -181,6 +203,9 @@ onMounted(() => {
       isRestoreData: props.isRestoreData,
       taskInfoId: props.taskInfoId,
       workflowType: props.workflowType,
+      sortStr: props.sortStr,
+      simpleFilterParams: props.simpleFilterParams,
+      complexFilterParams: props.complexFilterParams,
     });
   }
 });
@@ -208,6 +233,9 @@ const openTabFormView = function (param) {
   tabFormViewCurrentPage.value = param.currentPage;
   tabFormViewCurrentIndex.value = param.currentIndex;
   tabFormViewTotalRecords.value = param.totalRecords;
+  tabFormViewSortStr.value = param.sortStr;
+  tabFormViewSimpleFilterParams.value = param.simpleFilterParams;
+  tabFormViewComplexFilterParams.value = param.complexFilterParams;
 
   openTabEditModal.value = false;
   openTabViewModal.value = true;
@@ -234,6 +262,9 @@ const openTabEditView = function (param) {
   tabEditViewCurrentIndex.value = param.currentIndex;
   tabEditViewTotalRecords.value = param.totalRecords;
   tabEditViewIsRestoreData.value = param.isRestoreData;
+  tabEditViewSortStr.value = param.sortStr;
+  tabEditViewSimpleFilterParams.value = param.simpleFilterParams;
+  tabEditViewComplexFilterParams.value = param.complexFilterParams;
 
   openTabViewModal.value = false;
   openTabEditModal.value = true;

+ 6 - 1
src/window1/filter/SimpleFilterPanel.vue

@@ -121,6 +121,11 @@ export default {
         }
       },
     },
+    searchText: {
+      handler: function (newValue, oldValue) {
+        this.simpleConditionValue = newValue;
+      },
+    },
   },
 
 
@@ -143,7 +148,7 @@ export default {
 
       var historyQuery = {
         type: 'SimpleFilter',
-        condition: _self.searchText,
+        condition: _self.simpleConditionValue,
         queryName: '',
         windowNo: _self.windowNo,
         tabIndex: _self.tabIndex,

+ 87 - 51
src/window1/tabFormEdit/TabFormEditModal.vue

@@ -488,6 +488,18 @@ export default {
         return {};
       },
     },
+    sortStr: {
+      type: String,
+      default: null,
+    },
+    simpleFilterParams: {
+      type: String,
+      default: null,
+    },
+    complexFilterParams: {
+      type: Object,
+      default: null,
+    },
   },
   emits: ['update:open', 'OpenTabFormView'],
   data: function () {
@@ -1623,6 +1635,9 @@ export default {
                 currentIndex: currIndex,
                 totalRecords: totalCount,
                 uuid: _self.uuid,
+                sortStr: _self.sortStr,
+                simpleFilterParams: _self.simpleFilterParams,
+                complexFilterParams: _self.complexFilterParams,
               };
               _self.$emit('OpenTabFormView', data);
             } else if (_self.type == 'create') {
@@ -1636,6 +1651,9 @@ export default {
                 currentIndex: 1,
                 totalRecords: (Number(totalCount) + 1),
                 uuid: _self.uuid,
+                sortStr: _self.sortStr,
+                simpleFilterParams: _self.simpleFilterParams,
+                complexFilterParams: _self.complexFilterParams,
               };
               _self.$emit('OpenTabFormView', data);
 
@@ -1651,6 +1669,9 @@ export default {
                 currentIndex: 1,
                 totalRecords: 1,
                 uuid: _self.uuid,
+                sortStr: _self.sortStr,
+                simpleFilterParams: _self.simpleFilterParams,
+                complexFilterParams: _self.complexFilterParams,
               };
               _self.$emit('OpenTabFormView', data);
             }
@@ -2074,6 +2095,9 @@ export default {
           currentIndex: currIndex,
           totalRecords: totalCount,
           uuid: _self.uuid,
+          sortStr: _self.sortStr,
+          simpleFilterParams: _self.simpleFilterParams,
+          complexFilterParams: _self.complexFilterParams,
         };
         _self.$emit('OpenTabFormView', data);
       }
@@ -2144,36 +2168,42 @@ export default {
         },
         tabIndex: _self.tabIndex,
         windowNo: _self.windowNo,
+        sortStr: _self.sortStr,
+        simpleFilterParams: _self.simpleFilterParams,
+        complexFilterParams: _self.complexFilterParams,
       };
 
-      UserStorageResource.uniqueByKey(_self.uuid).then(
-        successData => {
-          // if(successData.errorCode != 0) {
-          //   Notify.error('提示', successData.errorMessage, false);
-          //   return;
-          // }
-          let simpleFilterParams = null;
-
-          let complexFilterParams = null;
-
-          if (successData.data != null && successData.data != '') {
-            let temp = JSON.parse(successData.data);
-            // 分页数据
-
-            // 简单过滤条件
-            tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
-            // 复杂过滤条件
-            tabQueryParam.filterParams = temp.complexFilterParams;
-            // 排序
-            tabQueryParam.sortStr = temp.sortStr;
-          }
+      _self.loadTabData(tabQueryParam);
 
-          _self.loadTabData(tabQueryParam);
-        },
-        errorData => {
-          Common.processException(errorData);
-        },
-      );
+      // 接口存在问题,查询参数结果异常,暂时注释掉,使用前端数据
+      // UserStorageResource.uniqueByKey(_self.uuid).then(
+      //   successData => {
+      //     // if(successData.errorCode != 0) {
+      //     //   Notify.error('提示', successData.errorMessage, false);
+      //     //   return;
+      //     // }
+      //     let simpleFilterParams = null;
+
+      //     let complexFilterParams = null;
+
+      //     if (successData.data != null && successData.data != '') {
+      //       let temp = JSON.parse(successData.data);
+      //       // 分页数据
+
+      //       // 简单过滤条件
+      //       tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
+      //       // 复杂过滤条件
+      //       tabQueryParam.filterParams = temp.complexFilterParams;
+      //       // 排序
+      //       tabQueryParam.sortStr = temp.sortStr;
+      //     }
+
+      //     _self.loadTabData(tabQueryParam);
+      //   },
+      //   errorData => {
+      //     Common.processException(errorData);
+      //   },
+      // );
     },
 
     /**
@@ -2200,32 +2230,38 @@ export default {
         },
         tabIndex: _self.tabIndex,
         windowNo: _self.windowNo,
+        sortStr: _self.sortStr,
+        simpleFilterParams: _self.simpleFilterParams,
+        complexFilterParams: _self.complexFilterParams,
       };
 
-      UserStorageResource.uniqueByKey(_self.uuid).then(
-        successData => {
-          // if(successData.errorCode != 0) {
-          //   Notify.error('提示', successData.errorMessage, false);
-          //   return;
-          // }
-          if (successData.data != null && successData.data != '') {
-            let temp = JSON.parse(successData.data);
-            // 分页数据
-
-            // 简单过滤条件
-            tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
-            // 复杂过滤条件
-            tabQueryParam.filterParams = temp.complexFilterParams;
-            // 排序
-            tabQueryParam.sortStr = temp.sortStr;
-          }
-
-          _self.loadTabData(tabQueryParam);
-        },
-        errorData => {
-          Common.processException(errorData);
-        },
-      );
+      _self.loadTabData(tabQueryParam);
+
+      // 接口存在问题,查询参数结果异常,暂时注释掉,使用前端数据
+      // UserStorageResource.uniqueByKey(_self.uuid).then(
+      //   successData => {
+      //     // if(successData.errorCode != 0) {
+      //     //   Notify.error('提示', successData.errorMessage, false);
+      //     //   return;
+      //     // }
+      //     if (successData.data != null && successData.data != '') {
+      //       let temp = JSON.parse(successData.data);
+      //       // 分页数据
+
+      //       // 简单过滤条件
+      //       tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
+      //       // 复杂过滤条件
+      //       tabQueryParam.filterParams = temp.complexFilterParams;
+      //       // 排序
+      //       tabQueryParam.sortStr = temp.sortStr;
+      //     }
+
+      //     _self.loadTabData(tabQueryParam);
+      //   },
+      //   errorData => {
+      //     Common.processException(errorData);
+      //   },
+      // );
     },
 
     /**

+ 82 - 53
src/window1/tabFormView/TabFormViewModal.vue

@@ -600,6 +600,18 @@ export default {
       type: String,
       default: null,
     },
+    sortStr: {
+      type: String,
+      default: null,
+    },
+    simpleFilterParams: {
+      type: String,
+      default: null,
+    },
+    complexFilterParams: {
+      type: Object,
+      default: null,
+    },
   },
 
   emits: ['update:open', 'OpenTabEditView'],
@@ -1789,6 +1801,9 @@ export default {
           totalRecords: totalCount,
           isRestoreData: true,
           uuid: _self.uuid,
+          sortStr: _self.sortStr,
+          simpleFilterParams: _self.simpleFilterParams,
+          complexFilterParams: _self.complexFilterParams,
         };
         _self.$emit('OpenTabEditView', data);
       } else {
@@ -1822,6 +1837,9 @@ export default {
           totalRecords: _self.totalCount,
           isRestoreData: false,
           uuid: _self.uuid,
+          sortStr: _self.sortStr,
+          simpleFilterParams: _self.simpleFilterParams,
+          complexFilterParams: _self.complexFilterParams,
         };
         _self.$emit('OpenTabEditView', data);
       } else {
@@ -2068,36 +2086,42 @@ export default {
         },
         windowNo: _self.windowNo,
         tabIndex: _self.tabIndex,
+        sortStr: _self.sortStr,
+        simpleFilterCondition: _self.simpleFilterParams,
+        filterParams: _self.complexFilterParams,
       };
 
-      UserStorageResource.uniqueByKey(_self.uuid).then(
-        successData => {
-          // if(successData.errorCode != 0) {
-          //   Notify.error('提示', successData.errorMessage, false);
-          //   return;
-          // }
-          let simpleFilterParams = null;
-
-          let complexFilterParams = null;
-
-          if (successData.data != null && successData.data != '') {
-            let temp = JSON.parse(successData.data);
-            // 分页数据
-
-            // 简单过滤条件
-            tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
-            // 复杂过滤条件
-            tabQueryParam.filterParams = temp.complexFilterParams;
-            // 排序
-            tabQueryParam.sortStr = temp.sortStr;
-          }
-
-          _self.loadTabData(tabQueryParam);
-        },
-        errorData => {
-          Common.processException(errorData);
-        },
-      );
+      _self.loadTabData(tabQueryParam);
+
+      // 接口存在问题,查询参数结果异常,暂时注释掉,使用前端数据
+      // UserStorageResource.uniqueByKey(_self.uuid).then(
+      //   successData => {
+      //     // if(successData.errorCode != 0) {
+      //     //   Notify.error('提示', successData.errorMessage, false);
+      //     //   return;
+      //     // }
+      //     let simpleFilterParams = null;
+
+      //     let complexFilterParams = null;
+
+      //     if (successData.data != null && successData.data != '') {
+      //       let temp = JSON.parse(successData.data);
+      //       // 分页数据
+
+      //       // 简单过滤条件
+      //       tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
+      //       // 复杂过滤条件
+      //       tabQueryParam.filterParams = temp.complexFilterParams;
+      //       // 排序
+      //       tabQueryParam.sortStr = temp.sortStr;
+      //     }
+
+      //     _self.loadTabData(tabQueryParam);
+      //   },
+      //   errorData => {
+      //     Common.processException(errorData);
+      //   },
+      // );
     },
 
     /**
@@ -2118,32 +2142,37 @@ export default {
         },
         windowNo: _self.windowNo,
         tabIndex: _self.tabIndex,
+        simpleFilterCondition: _self.simpleFilterParams,
+        filterParams: _self.complexFilterParams,
+        sortStr: _self.sortStr,
       };
-
-      UserStorageResource.uniqueByKey(_self.uuid).then(
-        successData => {
-          // if(successData.errorCode != 0) {
-          //   Notify.error('提示', successData.errorMessage, false);
-          //   return;
-          // }
-          if (successData.data != null && successData.data != '') {
-            let temp = JSON.parse(successData.data);
-            // 分页数据
-
-            // 简单过滤条件
-            tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
-            // 复杂过滤条件
-            tabQueryParam.filterParams = temp.complexFilterParams;
-            // 排序
-            tabQueryParam.sortStr = temp.sortStr;
-          }
-
-          _self.loadTabData(tabQueryParam);
-        },
-        errorData => {
-          Common.processException(errorData);
-        },
-      );
+      _self.loadTabData(tabQueryParam); 
+
+      // 接口存在问题,查询参数结果异常,暂时注释掉,使用前端数据
+      // UserStorageResource.uniqueByKey(_self.uuid).then(
+      //   successData => {
+      //     // if(successData.errorCode != 0) {
+      //     //   Notify.error('提示', successData.errorMessage, false);
+      //     //   return;
+      //     // }
+      //     if (successData.data != null && successData.data != '') {
+      //       let temp = JSON.parse(successData.data);
+      //       // 分页数据
+
+      //       // 简单过滤条件
+      //       tabQueryParam.simpleFilterCondition = temp.simpleFilterParams;
+      //       // 复杂过滤条件
+      //       tabQueryParam.filterParams = temp.complexFilterParams;
+      //       // 排序
+      //       tabQueryParam.sortStr = temp.sortStr;
+      //     }
+
+      //     _self.loadTabData(tabQueryParam);
+      //   },
+      //   errorData => {
+      //     Common.processException(errorData);
+      //   },
+      // );
     },
 
     /**

+ 16 - 0
src/window1/tabFormWidget/ImageListViewWidget.vue

@@ -56,6 +56,22 @@ export default {
       modal: false,
     };
   },
+
+  watch:{
+    fieldValue: {
+      handler: function (newValue, oldValue) {
+        if (newValue !== oldValue) {
+          if (newValue.displayValue != undefined && newValue.displayValue.length > 0) {
+            this.newFieldValue.displayValue = newValue.displayValue[0].split(',');
+          }else{
+            this.newFieldValue.displayValue = [];
+          }
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   mounted: function () {
     var _self = this;
     var displayValue = _self.fieldValue.displayValue;

+ 16 - 1
src/window1/tabGridView/TabGridEdit.vue

@@ -562,7 +562,7 @@ export default {
     // 自定义刷新事件 
     handleRefreshCurdData: function () {
       const _self = this;
-      _self.refreshDatas();
+      // _self.refreshDatas();
       _self.dynamicComponentOpen = false;
     },
     // 获取当前tab为哪个阶段
@@ -960,6 +960,9 @@ export default {
             totalRecords: totalCount,
             isRestoreData: true,
             uuid: _self.uuid,
+            simpleFilterParams: _self.searchText,
+            complexFilterParams: _self.complexFilterParams,
+            sortStr: _self.sortStr,
           };
           _self.dynamicComponent = 'CurdWindowModal';
           _self.dynamicComponentOpen = true;
@@ -1038,6 +1041,9 @@ export default {
           totalRecords: totalCount,
           isRestoreData: true,
           uuid: _self.uuid,
+          simpleFilterParams: _self.searchText,
+          complexFilterParams: _self.complexFilterParams,
+          sortStr: _self.sortStr,
         };
         _self.dynamicComponent = 'CurdWindowModal';
         _self.dynamicComponentOpen = true;
@@ -1117,6 +1123,9 @@ export default {
           totalRecords: totalCount,
           isRestoreData: _self.isRestoreData,
           uuid: _self.uuid,
+          simpleFilterParams: _self.searchText,
+          complexFilterParams: _self.complexFilterParams,
+          sortStr: _self.sortStr,
         };
         _self.dynamicComponent = 'CurdWindowModal';
         _self.dynamicComponentOpen = true;
@@ -1203,6 +1212,9 @@ export default {
         totalRecords: totalCount,
         isRestoreData: false,
         uuid: this.uuid,
+        simpleFilterParams: _self.searchText,
+        complexFilterParams: _self.complexFilterParams,
+        sortStr: _self.sortStr,
       };
       _self.dynamicComponent = 'CurdWindowModal';
       _self.dynamicComponentOpen = true;
@@ -1266,6 +1278,9 @@ export default {
             totalRecords: totalCount,
             isRestoreData: false,
             uuid: this.uuid,
+            simpleFilterParams: _self.searchText,
+            complexFilterParams: _self.complexFilterParams,
+            sortStr: _self.sortStr,
           };
           _self.dynamicComponent = 'CurdWindowModal';
           _self.dynamicComponentOpen = true;