فهرست منبع

流程日志功能添加

songxy 9 ماه پیش
والد
کامیت
b06e986530

+ 63 - 2
client_h5/src/pages/handleCenter/index.scss

@@ -1,6 +1,11 @@
 .handlecenter_box {
   background-color: #eff1f5;
   min-height: 100%;
+  :deep(.van-dialog__header) {
+    margin-top: 0px;
+    padding: 10px 0px;
+    padding-top: 15px;
+  }
   .search_box {
     display: flex;
     align-items: center;
@@ -67,13 +72,23 @@
               text-overflow: ellipsis;
               overflow: hidden;
             }
-            &.tip {
-              font-size: 13px;
+          }
+        }
+        &.tip {
+          font-size: 13px;
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          >div {
+            &.one {
               >span {
                 display: inline-block;
                 margin-left: 3px;
               }
             }
+            &.two {
+              font-size: 16px;
+            }
           }
         }
       }
@@ -82,4 +97,50 @@
   p {
     margin: 0px;
   }
+  .processLogBox {
+    background-color: #eff1f5;
+    overflow: auto;
+    >ul {
+      height: 400px;
+      >li {
+        margin-bottom: 5px;
+        background-color: #fff;
+        padding: 10px 15px;
+        font-size: 14px;
+        color: #000;
+        position: relative;
+        >.status {
+          position: absolute;
+          right: 15px;
+          top: 10px;
+          color: #07ab5c;
+          font-size: 12px;
+          padding: 2px 6px;
+          border: 1px solid #07ab5c;
+          border-radius: 2px;
+          background-color: #fff;
+          &.color1 {
+            background-color: #07ab5c;
+            border: solid 1px #07ab5c;
+            color: #fff;
+          }
+          &.color0 {
+            background-color: #6a6a6a;
+            border: solid 1px #6a6a6a;
+            color: #fff;
+          }
+        }
+        > p {
+          margin-bottom: 4px;
+          color: #000;
+        }
+        >.header {
+          font-weight: bold;
+          font-size: 15px;
+          margin-right: 10px;
+          width: calc(100% - 50px);
+        }
+      }
+    }
+  }
 }

+ 80 - 14
client_h5/src/pages/handleCenter/index.vue

@@ -25,7 +25,7 @@
                 finished-text="没有更多了"
                 @load="onLoad"
               >
-                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index" @click="clickHandler(item, false)">
+                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index">
                   <div class="header">
                     <p class="title">
                       <span>业务编号:</span>
@@ -35,16 +35,21 @@
                        <span v-html="item['statusVal']"></span>
                     </p>
                   </div>
-                  <div class="content">
+                  <div class="content" @click="clickHandler(item, false)">
                     <div class="titleBox">
                       <p class="title">{{item['NAME']}}</p>
                       <p class="desc">办理环节:<span>{{item['ACTIVITYNAME']}}</span></p>
                     </div>
                     <div class="desc">{{item['DESCRIBTION']??'暂无流程描述'}}</div>
-                    <div class="tip">
+                  </div>
+                  <div class="tip">
+                    <div class="one">
                       <van-icon name="clock-o" />
                       <span>{{formatDateTime(new Date(item['STARTTIME']))}}</span>
                     </div>
+                    <div class="two" @click="processLogHandle(item)">
+                      <van-button type="primary" icon="todo-list-o" size="mini">流程日志</van-button>
+                    </div>
                   </div>
                 </div>
               </van-list>
@@ -60,7 +65,7 @@
                 finished-text="没有更多了"
                 @load="onLoad"
               >
-                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index" @click="clickHandler(item, true)">
+                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index">
                   <div class="header">
                     <p class="title">
                       <span>业务编号:</span>
@@ -71,15 +76,20 @@
                        <span v-html="item['statusVal']"></span>
                     </p>
                   </div>
-                  <div class="content">
+                  <div class="content" @click="clickHandler(item, true)">
                     <div class="titleBox">
                       <p class="title">{{item['NAME']}}</p>
                       <p class="desc">完成环节:<span>{{item['ACTIVITYNAME']}}</span></p>
                     </div>
                     <div class="desc">{{item['DESCRIBTION']??'暂无流程描述'}}</div>
-                    <div class="tip">
+                  </div>
+                  <div class="tip">
+                    <div class="one">
                       <van-icon name="clock-o" />
-                      <span>{{formatDateTime(new Date(item['FINISH_TIME']))}}</span>
+                      <span>{{formatDateTime(new Date(item['STARTTIME']))}}</span>
+                    </div>
+                    <div class="two" @click="processLogHandle(item)">
+                      <van-button type="primary" icon="todo-list-o" size="mini">流程日志</van-button>
                     </div>
                   </div>
                 </div>
@@ -96,7 +106,7 @@
                 finished-text="没有更多了"
                 @load="onLoad"
               >
-                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index" @click="clickHandler(item, true)">
+                <div class="handlecenter_card" v-for="(item,index) in handleLists" :key="index">
                   <div class="header">
                     <p class="title">
                       <span>业务编号:</span>
@@ -106,15 +116,19 @@
                        <span v-html="item['statusVal']"></span>
                     </p>
                   </div>
-                  <div class="content">
+                  <div class="content" @click="clickHandler(item, true)">
                     <div class="titleBox">
                       <p class="title">{{item['NAME']}}</p>
-                      <!-- <p class="desc">办理环节:<span>{{item['ACTIVITYNAME']}}</span></p> -->
                     </div>
                     <div class="desc">{{item['DESCRIBTION']??'暂无流程描述'}}</div>
-                    <div class="tip">
+                  </div>
+                  <div class="tip">
+                    <div class="one">
                       <van-icon name="clock-o" />
-                      <span>{{formatDateTime(new Date(item['FINISH_TIME']))}}</span>
+                      <span>{{formatDateTime(new Date(item['STARTTIME']))}}</span>
+                    </div>
+                    <div class="two" @click="processLogHandle(item)">
+                      <van-button type="primary" icon="todo-list-o" size="mini">流程日志</van-button>
                     </div>
                   </div>
                 </div>
@@ -130,11 +144,27 @@
           :items="items"
         />
     </van-dialog>
+    <van-dialog v-model:show="processLogShow" title="流程日志" confirmButtonText="关闭">
+      <div class="processLogBox">
+        <ul>
+          <li v-for="(item,index) in processLogs" :key="index">
+            <p :class="'status color'+item['handleMethod']">{{ filterStatus(item['handleMethod']) }}</p>
+            <p class="header">{{ item['activityName'] }}</p>
+            <p>{{ item['handleMethod'] === 0 ? '退回人' : '办理人' }}:{{ item['handler'] }}</p>
+            <p>转件时间:{{item['receiveTime']}}</p>
+            <p>办理时限:{{ item['shouldFinishTime'] ? item['shouldFinishTime'] : '无时限' }}</p>
+            <p v-if="item['transferActivityName']">转至》{{ item['transferActivityName'] ? `[${item['transferActivityName']}]` : ''}}<span style="display: inline-block;margin-left: 5px;"></span></p>
+            <p v-if="item['transferActivityName']">可办理人:{{ item['canHandler'] }}</p>
+          </li>
+        </ul>
+      </div>
+    </van-dialog>
   </div>
 </template>
 
 <script setup lang="ts">
-import { getHandlerCaseCenterList, getHandlerCaseCenterCount, getFlowTemplateTreeDataByUser, saveAndGetMobileUrl } from '@/service/flow';
+import { showToast } from "vant";
+import { getHandlerCaseCenterList, getHandlerCaseCenterCount,getRecordList, getFlowTemplateTreeDataByUser, saveAndGetMobileUrl } from '@/service/flow';
 import { listToTree } from '@/utils/tree';
 import PubsubService from "@/utils/PubsubService";
 import { formatDateTime, getQueryParamsByUrl } from '@/utils/common';
@@ -340,7 +370,43 @@ const filterToCalBackBtn = (lists: any[]): OperationType => {
   }
   return map;
 }
-
+/**
+ * 流程日志
+ */
+const filterStatus = (status: number) => {
+  let msg = '';
+  switch (status) {
+    case 0:
+      msg = '退件'
+      break
+    case 1:
+      msg = '转件'
+      break
+    default:
+      msg = '办理'
+      break
+  }
+  return msg;
+}
+const processLogShow = ref<boolean>(false)
+const processLogs = ref<any[]>([])
+const processLogHandle = (item) => {
+  getRecordList({
+    flowInstanceId: item['FLOWINSID'],
+    _search: false,
+    sord: 'asc'
+  }).then((result: any) => {
+    if (result && result.length > 0) {
+      processLogs.value = result
+      processLogShow.value = true;
+    }else{
+      showToast({
+        message: "暂无流程日志!",
+        position: "top",
+      });
+    }
+  })
+}
 PubsubService.subscribe('HandleCenterEvent', () => {
     searchHandler();
 })

+ 0 - 1
client_h5/src/pages/myLogs/components/LogDetail.vue

@@ -174,7 +174,6 @@ const initData = async () => {
     today.value =
       moment(result.reportEndDate).format("YYYY-MM-DD") ?? today.value;
   }
-  console.log("logDetail", logDetail);
 };
 
 // 初始化评论

+ 2 - 0
client_h5/src/router/index.ts

@@ -14,6 +14,8 @@ const router = createRouter({
 })
 // 路由加载前
 router.beforeEach((to, from, next) => {
+  next();
+  return
   getUserInfoPromise(true).then((isLogin) => {
     next(); 
     if (!isLogin) {

+ 13 - 0
client_h5/src/service/flow.ts

@@ -70,6 +70,19 @@ export const getFlowTemplateTreeDataByUser = async (data: any) => {
   });
 }
 
+/** 获取流程日志 */
+export const getRecordList = async (data: {
+  flowInstanceId: string
+  _search: boolean
+  sord: string
+}) => {
+  return await request.post(`/workflow/IFlowRecord/getRecordList`, data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  });
+}
+
 /** 获取下一步流程(转件) */
 export const getNextActivity = async (data: FormData) => {
   return await request.post(`/workflow/Transfer/getNextActivity`, data);