Selaa lähdekoodia

4.0.56 待审阅恢复全部审阅、数据导入正式导入增加batchNo、工作流修改

liuyanpeng 2 vuotta sitten
vanhempi
sitoutus
731116986f

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.0.54",
+  "version": "4.0.56",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 6 - 1
src/customer/DataImportPanel.vue

@@ -370,6 +370,7 @@ export default {
       var _self = this;
       _self.columns = [];
       _self.dataSource = [];
+      _self.batchNo = null;
       if (_self.dataTemplates != null && _self.dataTemplates.length > 0) {
         _self.dataTemplates.forEach(item => {
           if (item.dataTemplateNo == _self.selectedDataTemplateNo) {
@@ -757,12 +758,16 @@ export default {
         message.warning('请输入正确的导入列数!');
         return;
       }
-      const no = _self.batchNo;
+      const no = _self.selectedDataTemplateNo;
+      const params = {
+        batchNo: _self.batchNo,
+      };
       _self.loading = true;
       $.ajax({
         url: Common.getApiURL('dataImportResource/formalDataImportByIds/') + no,
         type: 'post',
         dataType: 'json',
+        data: params,
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },

+ 28 - 1
src/workflow/CopyTaskWorkflow.vue

@@ -11,6 +11,7 @@
       />
     </a-col>
     <a-col>
+      <a-button type="link" @click="completeApproval">全部完成审阅</a-button>
       <a-select
         v-model:value="searchParams.processStatusQuery"
         allow-clear
@@ -132,7 +133,33 @@ const statusChange = value => {
   isShowMore.value = true;
   searchDatas(true);
 };
-
+// 全部完成审阅
+const completeApproval = () => {
+  const _self = this;
+  isLoading.value = true;
+  $.ajax({
+    url: Common.getApiURL('WorkflowResource/completeCopyTasks'),
+    type: 'post',
+    dataType: 'json',
+    contentType: 'application/json',
+    beforeSend: function (request) {
+      Common.addTokenToRequest(request);
+    },
+    success: function (data) {
+      isLoading.value = false;
+      if (data.errorCode === 0) {
+        _self.$emit('refreshStasticCount');
+        _self.searchCopyTask();
+      } else {
+        Notify.error('错误', data.errorMessage, false);
+      }
+    },
+    error: function (XMLHttpRequest, textStatus, errorThrown) {
+      isLoading.value = false;
+      Common.processException(XMLHttpRequest, textStatus, errorThrown);
+    },
+  });
+};
 // 查询数据API
 const searchApprove = (params, isSearch) => {
   isLoading.value = true;

+ 20 - 14
src/workflow/WorkflowEdit.vue

@@ -38,7 +38,7 @@
       </div>
       <a-button
         class="btn btn-default"
-        style="margin: 10px 60px 0 0"
+        style="margin: 10px 0 0 0"
         @click="openArchive"
       >
         历史数据归档
@@ -256,7 +256,7 @@
     </Modal>
     <a-modal
       v-model:visible="archiveVisible"
-      title="请确认是否进行历史数据归档"
+      title="请按照如下步骤进行历史数据归档"
       width="600px"
       :mask-closable="false"
     >
@@ -276,9 +276,15 @@
           </h4>
         </div>
         <div v-if="steps[current].title === '步骤二'">
-          <h4 style="padding: 100px 0; text-align: center; color: red">
+          <h4
+            v-if="!isNext"
+            style="padding: 100px 0; text-align: center; color: red"
+          >
             注意:改操作执行时间较长,执行时请您耐心等待。
           </h4>
+          <h4 v-else style="padding: 100px 0; text-align: center; color: red">
+            历史数据归档完成,共计归档{{ archiveTotal }}条数据。
+          </h4>
         </div>
         <div v-if="steps[current].title === '步骤三'">
           <a-textarea v-model:value="deleteTableSql" :rows="8" />
@@ -464,10 +470,11 @@ export default {
       current: 0,
       tableSql: '',
       deleteTableSql: '',
+      archiveTotal: null,
       steps: [
         {
           title: '步骤一',
-          content: '备份历史流程数据',
+          content: '备份历史数据',
         },
         {
           title: '步骤二',
@@ -475,7 +482,7 @@ export default {
         },
         {
           title: '步骤三',
-          content: '清理历史流程数据',
+          content: '删除历史数据',
         },
       ],
     };
@@ -505,9 +512,9 @@ export default {
     openArchive: function () {
       this.current = 0;
       this.getTableSql();
-      this.isOk =  false;
-      this.isNext =  false;
-      this.isDeleteOk =  false;
+      this.isOk = false;
+      this.isNext = false;
+      this.isDeleteOk = false;
     },
     next: function () {
       this.current++;
@@ -1204,8 +1211,8 @@ export default {
           if (error.status === 404) {
             _self.archiveVisible = false;
             Notify.error(
-              '服务器未配置历史流程归档实现,请配置:',
-              'prodog-workflow-history-spring-boot-starter 历史流程归档服务。',
+              '历史数据归档错误',
+              '服务器未配置历史流程归档服务,请配置。',
               false,
             );
           } else {
@@ -1235,10 +1242,9 @@ export default {
       _self.loading = true;
       ajaxApi(url).then(
         success => {
-          if (success === 0) {
-            _self.isNext = true;
-            Notify.success('成功', '归档执行成功。', false);
-          }
+          _self.isNext = true;
+          _self.archiveTotal = success;
+          Notify.success('成功', '归档执行成功。', false);
           _self.loading = false;
         },
         error => {