Эх сурвалжийг харах

Merge branch 'master' of https://a.leanwo.com:3000/prodog-client-2023/client-base-v4

YangZhiJie 2 жил өмнө
parent
commit
39ff0fc1f4

+ 1 - 1
package.json

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

+ 2 - 2
src/client/DingTalkLogin.vue

@@ -90,11 +90,11 @@ export default {
           Common.clearLocalStorage();
 
           // path为指定路径,直接删除该路径下的cookie
-          $.removeCookie('token', { path: '/' });
+          // $.removeCookie('token', { path: '/' });
 
           // bug fixed by jack
           // 清除掉/pcapp路径的cookie
-          $.removeCookie('token', { path: '/pcapp' });
+          // $.removeCookie('token', { path: '/pcapp' });
 
           // $.cookie('token', loginInfo.token, { expires: 7, path: '/', secure: true, sameSite: 'Strict' });
 

+ 2 - 2
src/client/LoginService.js

@@ -16,11 +16,11 @@ export default {
     Common.clearLocalStorage();
 
     // path为指定路径,直接删除该路径下的cookie
-    $.removeCookie('token', { path: '/' });
+    // $.removeCookie('token', { path: '/' });
 
     // bug fixed by jack
     // 清除掉/pcapp路径的cookie
-    $.removeCookie('token', { path: '/pcapp' });
+    // $.removeCookie('token', { path: '/pcapp' });
 
     // bug fixed by jack
     // 把cookies的path属性设置成“/”。在指定路径的时候,凡是来自同一服务器,URL里有相同路径的所有WEB页面都可以共享cookies。

+ 4 - 4
src/client/top-nav-user-info.vue

@@ -80,13 +80,13 @@ export default {
       Common.clearLocalStorage();
 
       //path为指定路径,直接删除该路径下的cookie
-      $.removeCookie('#accountId', { path: '/' });
-      $.removeCookie('token', { path: '/' });
+      // $.removeCookie('#accountId', { path: '/' });
+      // $.removeCookie('token', { path: '/' });
 
       // bug fixed by jack
       // 清除掉/pcapp路径的cookie
-      $.removeCookie('#accountId', { path: '/pcapp' });
-      $.removeCookie('token', { path: '/pcapp' });
+      // $.removeCookie('#accountId', { path: '/pcapp' });
+      // $.removeCookie('token', { path: '/pcapp' });
 
       this.$router.push('/login');
       // 这边存在问题,模块化以后,需要修复

+ 2 - 2
src/common/Common.js

@@ -237,8 +237,8 @@ export default {
     document.cookie.split(';').forEach(function (c) {
       document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');
     });
-    $.removeCookie('token', { path: '/' });
-    $.removeCookie('token', { path: '/app' });
+    // $.removeCookie('token', { path: '/' });
+    // $.removeCookie('token', { path: '/app' });
     // $.cookie('token', loginInfo.token, {
     //   expires: 7,
     //   path: '/',

+ 3 - 3
src/workflow/ApprovedWorkflow.vue

@@ -147,7 +147,7 @@ const searchApprove = (params, isSearch) => {
               allDatas.push(item);
             }
           });
-          const ids = new Set(allDatas.map(item => item.id));  
+          const ids = new Set(allDatas.map(item => item.id));
           approveDatas.value = allDatas.filter(item => ids.has(item.id));
           if (isSearch) {
             approveDatas.value = success.datas;
@@ -175,10 +175,10 @@ const searchApprove = (params, isSearch) => {
 
 // 选择了taskInfo
 const selectTaskInfo = taskInfo => {
-  TaskOpenUtil.openTask(taskInfo).then(
+  TaskOpenUtil.openHistoryTask(taskInfo).then(
     successData => {
       if (successData.type === 'newWindow') {
-        WindowService.open(successData.url, '待处理', function () {
+        WindowService.open(successData.url, '已处理的', function () {
           searchDatas();
           emit('refreshStasticCount');
         });

+ 31 - 6
src/workflow/CopyTaskWorkflow.vue

@@ -200,19 +200,44 @@ const searchApprove = (params, isSearch) => {
 
 // 选择了taskInfo
 const selectTaskInfo = taskInfo => {
-  TaskOpenUtil.openTask(taskInfo).then(
+  
+  if (taskInfo.systemProcess == undefined || taskInfo.systemProcess == false) {
+    isLoading.value = true;
+    $.ajax({
+      url: Common.getApiURL('WorkflowResource/processTaskInfo'),
+      type: 'get',
+      dataType: 'json',
+      contentType: 'application/json',
+      beforeSend: function (request) {
+        Common.addTokenToRequest(request);
+      },
+      data: {
+        taskInfoId: taskInfo.id,
+      },
+      success: function (data) {
+        isLoading.value = false;
+
+      },
+      error: function (XMLHttpRequest, textStatus, errorThrown) {
+        isLoading.value = false;
+        Common.processException(XMLHttpRequest, textStatus, errorThrown);
+      },
+    });
+  }
+
+  TaskOpenUtil.openCopyTask(taskInfo).then(
     successData => {
       if (successData.type === 'newWindow') {
-        WindowService.open(successData.url, '待处理', function () {
+        WindowService.open(successData.url, '抄送我的', function () {
           searchDatas();
           emit('refreshStasticCount');
         });
       } else if (successData.type === 'customerTask') {
         // 打开自定义的界面
-        selectedTaskId.value = taskInfo.id;
-        customerTask.value.show();
-        searchDatas();
-        emit('refreshStasticCount');
+        // selectedTaskId.value = taskInfo.id;
+        // customerTask.value.show();
+        // searchDatas();
+        // emit('refreshStasticCount');
       }
     },
     errorData => {

+ 20 - 24
src/workflow/MyApplyWorkflow.vue

@@ -62,10 +62,8 @@ import WorkflowSearch from './WorkflowSearch.vue';
 import { ajaxApi } from '../api/workflow/workflow.js';
 import { message } from 'ant-design-vue';
 import { approvedColumns } from './configData.js';
-import TaskOpenUtil from './TaskOpenUtil.js';
-import WindowService from '../common/WindowService.js';
 import CustomerTask from './CustomerTask.vue';
-import { Notify } from 'pc-component-v3';
+import { Uuid } from 'pc-component-v3';
 
 const emit = defineEmits(['refreshStasticCount']);
 const customerTask = ref(null);
@@ -160,27 +158,25 @@ const searchApprove = (params, isSearch) => {
 
 // 选择了taskInfo
 const selectTaskInfo = taskInfo => {
-  TaskOpenUtil.openTask(taskInfo).then(
-    successData => {
-      if (successData.type === 'newWindow') {
-        WindowService.open(successData.url, '待处理', function () {
-          searchDatas();
-          emit('refreshStasticCount');
-        });
-      } else if (successData.type === 'customerTask') {
-        // 打开自定义的界面
-        selectedTaskId.value = taskInfo.id;
-        customerTask.value.show();
-        searchDatas();
-        emit('refreshStasticCount');
-      }
-    },
-    errorData => {
-      if (errorData != null) {
-        Notify.error(errorData.title, errorData.message, false);
-      }
-    },
-  );
+  const type = 'view';
+  const windowNo = taskInfo.windowNo;
+  const tabIndex = taskInfo.tabIndex;
+  const recordId = taskInfo.recordId;
+  const url =
+    '/desktop/window/window-read/' +
+    type +
+    '/' +
+    windowNo +
+    '/' +
+    tabIndex +
+    '/' +
+    recordId +
+    '?workflowType=approve&taskInfoId=' +
+    taskInfo.id +
+    '&currIndex=1&totalCount=1&canGoBack=false&uuid=' +
+    Uuid.createUUID();
+
+  window.open(Common.getRedirectUrl('#' + url));
 };
 
 // 处理content json

+ 20 - 24
src/workflow/NotApproveWorkflow.vue

@@ -62,10 +62,8 @@ import WorkflowSearch from './WorkflowSearch.vue';
 import { ajaxApi } from '../api/workflow/workflow.js';
 import { message } from 'ant-design-vue';
 import { approvedColumns } from './configData.js';
-import TaskOpenUtil from './TaskOpenUtil.js';
-import WindowService from '../common/WindowService.js';
 import CustomerTask from './CustomerTask.vue';
-import { Notify } from 'pc-component-v3';
+import { Uuid } from 'pc-component-v3';
 
 const emit = defineEmits(['refreshStasticCount']);
 const customerTask = ref(null);
@@ -160,27 +158,25 @@ const searchApprove = (params, isSearch) => {
 
 // 选择了taskInfo
 const selectTaskInfo = taskInfo => {
-  TaskOpenUtil.openTask(taskInfo).then(
-    successData => {
-      if (successData.type === 'newWindow') {
-        WindowService.open(successData.url, '待处理', function () {
-          searchDatas();
-          emit('refreshStasticCount');
-        });
-      } else if (successData.type === 'customerTask') {
-        // 打开自定义的界面
-        selectedTaskId.value = taskInfo.id;
-        customerTask.value.show();
-        searchDatas();
-        emit('refreshStasticCount');
-      }
-    },
-    errorData => {
-      if (errorData != null) {
-        Notify.error(errorData.title, errorData.message, false);
-      }
-    },
-  );
+  const type = 'view';
+  const windowNo = taskInfo.windowNo;
+  const tabIndex = taskInfo.tabIndex;
+  const recordId = taskInfo.recordId;
+  const url =
+    '/desktop/window/window-read/' +
+    type +
+    '/' +
+    windowNo +
+    '/' +
+    tabIndex +
+    '/' +
+    recordId +
+    '?workflowType=approve&taskInfoId=' +
+    taskInfo.id +
+    '&currIndex=1&totalCount=1&canGoBack=false&uuid=' +
+    Uuid.createUUID();
+
+  window.open(Common.getRedirectUrl('#' + url));
 };
 
 // 处理content json