Procházet zdrojové kódy

4.1.52 修复curd新建bug 和 处理审阅bug

liuyanpeng před 1 rokem
rodič
revize
e55da90607

+ 1 - 1
package.json

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

+ 25 - 13
src/window/tabFormView/TabFormEdit.vue

@@ -741,15 +741,19 @@ export default {
         _self.windowNo,
         function (window) {
           _self.loading = false;
-          WindowClientUtil.parseFilterSchema(window);
-          var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-          WindowClientUtil.parseSubTab(window, tab);
+          if(window.errorCode != 0){
+            Notify.error('Error', window.errorMessage, false);
+            return;
+          }
+          WindowClientUtil.parseFilterSchema(window.data);
+          var tab = WindowClientUtil.getTab(window.data, _self.tabIndex);
+          WindowClientUtil.parseSubTab(window.data, tab);
           WindowClientUtil.parseFieldGroup(tab);
-          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window.data);
 
           _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-          _self.window = window;
-          _self.jsUrl = window.jsUrl;
+          _self.window = window.data;
+          _self.jsUrl = window.data.jsUrl;
           _self.tab = tab;
           TabFormView.restoreTabFormFieldDef(
             _self.windowNo,
@@ -820,7 +824,11 @@ export default {
           _self.windowNo,
           function (window) {
             _self.loading = false;
-            initWindowAfterLoaded(window);
+            if(window.errorCode != 0){
+              Notify.error('Error', window.errorMessage, false);
+              return;
+            }
+            initWindowAfterLoaded(window.data);
           },
           function () {
             _self.loading = false;
@@ -905,15 +913,19 @@ export default {
         _self.windowNo,
         function (window) {
           _self.loading = false;
-          WindowClientUtil.parseFilterSchema(window);
-          var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-          WindowClientUtil.parseSubTab(window, tab);
+          if(window.errorCode != 0){
+            Notify.error('Error', window.errorMessage, false);
+            return;
+          }
+          WindowClientUtil.parseFilterSchema(window.data);
+          var tab = WindowClientUtil.getTab(window.data, _self.tabIndex);
+          WindowClientUtil.parseSubTab(window.data, tab);
           WindowClientUtil.parseFieldGroup(tab);
-          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window.data);
 
           _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-          _self.window = window;
-          _self.jsUrl = window.jsUrl;
+          _self.window = window.data;
+          _self.jsUrl = window.data.jsUrl;
           _self.tab = tab;
           TabFormView.restoreTabFormFieldDef(
             _self.windowNo,

+ 0 - 1
src/window1/tabFormView/TabFormView.vue

@@ -1133,7 +1133,6 @@ export default {
         _self.window = window;
         _self.jsUrl = window.jsUrl;
         _self.tab = tab;
-        console.log(_self.window,'========================');
         TabFormView.restoreTabFormFieldDef(
           _self.windowNo,
           _self.tabIndex,

+ 7 - 9
src/workflow/ApprovedWorkflow.vue

@@ -62,7 +62,7 @@
   <CustomerTask
     ref="customerTask"
     :task-id="selectedTaskId"
-    @closed="() => searchDatas"
+    @closed="() => searchDatas(true)"
   />
 </template>
 
@@ -100,8 +100,6 @@ onMounted(() => {
 
 // 查询条件时从0开始
 const queryDatas = () => {
-  pager.start = 0;
-  isShowMore.value = true;
   searchDatas(true);
 };
 
@@ -113,22 +111,22 @@ const loadMore = () => {
 
 // 查询
 const searchDatas = isSearch => {
+  if(isSearch){
+    pager.start = 0;
+    isShowMore.value = true;
+  } 
   const params = { ...searchParams.value, ...filterParams.value, ...pager };
   searchApprove(params, isSearch);
 };
 
 // 获取类型no
 const getTypeNo = windowNo => {
-  pager.start = 0;
-  isShowMore.value = true;
   searchParams.value.windowNo = windowNo;
   searchDatas(true);
 };
 
 // 通过高级查询搜索
 const searchWorkflow = value => {
-  pager.start = 0;
-  isShowMore.value = true;
   filterParams.value = value;
   searchDatas(true);
 };
@@ -180,14 +178,14 @@ const goWindow = taskInfo => {
     successData => {
       if (successData.type === 'newWindow') {
         WindowService.open(successData.url, '已处理的', function () {
-          searchDatas();
+          searchDatas(true);
           emit('refreshStasticCount');
         });
       } else if (successData.type === 'customerTask') {
         // 打开自定义的界面
         selectedTaskId.value = taskInfo.id;
         customerTask.value.show();
-        searchDatas();
+        searchDatas(true);
         emit('refreshStasticCount');
       }
     },

+ 6 - 6
src/workflow/CopyTaskWorkflow.vue

@@ -72,7 +72,7 @@
   <CustomerTask
     ref="customerTask"
     :task-id="selectedTaskId"
-    @closed="() => searchDatas"
+    @closed="() => searchDatas(true)"
   />
 </template>
 
@@ -111,8 +111,6 @@ onMounted(() => {
 
 // 查询条件时从0开始
 const queryDatas = () => {
-  pager.start = 0;
-  isShowMore.value = true;
   searchDatas(true);
 };
 
@@ -124,6 +122,10 @@ const loadMore = () => {
 
 //  查询
 const searchDatas = isSearch => {
+  if(isSearch){
+    pager.start = 0;
+    isShowMore.value = true;
+  }
   const params = { ...searchParams.value, ...pager };
   searchApprove(params, isSearch);
 };
@@ -131,8 +133,6 @@ const searchDatas = isSearch => {
 // 状态改变事件
 const statusChange = value => {
   if (!value) searchParams.value.processStatusQuery = 'ALL';
-  pager.start = 0;
-  isShowMore.value = true;
   searchDatas(true);
 };
 // 全部完成审阅
@@ -231,7 +231,7 @@ const goWindow = taskInfo => {
     successData => {
       if (successData.type === 'newWindow') {
         WindowService.open(successData.url, '抄送我的', function () {
-          searchDatas();
+          searchDatas(true);
           emit('refreshStasticCount');
         });
       } else if (successData.type === 'customerTask') {