yusheng 11 месяцев назад
Родитель
Сommit
dd5a6a854e
3 измененных файлов с 49 добавлено и 37 удалено
  1. 6 6
      src/api/bpm/task.js
  2. 6 6
      src/public-path.js
  3. 37 25
      src/views/bpm/done/index.vue

+ 6 - 6
src/api/bpm/task.js

@@ -5,8 +5,8 @@ import Vue from 'vue';
 export async function getTodoTaskPage(query) {
   const res = await request({
     url: '/bpm/task/todo-page',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   });
   if (res.data.code == 0) {
     console.log('-----getTodoTaskPage---user--------');
@@ -61,8 +61,8 @@ export async function getTodoTaskPage(query) {
 export async function getDoneTaskPage(query) {
   const res = await request({
     url: '/bpm/task/done-page',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   });
 
   if (res.data.code == 0) {
@@ -328,8 +328,8 @@ export async function getProcessInstanceNoticePage(query) {
 export async function ccPage(data) {
   const res = await request({
     url: `/bpm/task/cc-page`,
-    method: 'get',
-    params: data
+    method: 'post',
+    data
   });
   if (res.data.code == 0) {
     return res.data.data;

+ 6 - 6
src/public-path.js

@@ -1,11 +1,11 @@
 (function () {
   if (window.__POWERED_BY_QIANKUN__) {
-    if (process.env.NODE_ENV === 'development') {
-      // eslint-disable-next-line
-      __webpack_public_path__ = `//localhost:${process.env.VUE_APP_PORT}/`;
-      console.log('__webpack_public_path__', __webpack_public_path__);
-      return;
-    }
+    // if (process.env.NODE_ENV === 'development') {
+    //   // eslint-disable-next-line
+    //   __webpack_public_path__ = `//localhost:${process.env.VUE_APP_PORT}/`;
+    //   console.log('__webpack_public_path__', __webpack_public_path__);
+    //   return;
+    // }
     // eslint-disable-next-line
     __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
     // __webpack_public_path__ = `${process.env.BASE_URL}/`

+ 37 - 25
src/views/bpm/done/index.vue

@@ -50,7 +50,10 @@
                 />
               </el-form-item>
             </el-col>
-            <el-col  style="display: flex;justify-content: flex-end" v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+            <el-col
+              style="display: flex; justify-content: flex-end"
+              v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
+            >
               <div class="ele-form-actions">
                 <el-button
                   type="primary"
@@ -73,11 +76,17 @@
         cache-key="systemRoleTable5"
       >
         <template v-slot:result="{ row }">
-          <el-tag size="medium" :type="getTimelineItemType(getDictValue('流程实例的结果', row.result))"> {{getDictValue('流程实例的结果', row.result)}} </el-tag>
-
+          <el-tag
+            size="medium"
+            :type="
+              getTimelineItemType(getDictValue('流程实例的结果', row.result))
+            "
+          >
+            {{ getDictValue('流程实例的结果', row.result) }}
+          </el-tag>
         </template>
         <template v-slot:durationInMillis="{ row }">
-          {{getDateTime(row.durationInMillis)}}
+          {{ getDateTime(row.durationInMillis) }}
         </template>
         <template v-slot:name="{ row }">
           <el-link type="primary" :underline="false" @click="handleAudit(row)">
@@ -97,14 +106,13 @@
       </ele-pro-table>
     </el-card>
     <detail ref="detailRef"></detail>
-
   </div>
 </template>
 
 <script>
   import dictMixins from '@/mixins/dictMixins';
   import { getDoneTaskPage } from '@/api/bpm/task';
-  import {getDate} from "@/utils/dateUtils";
+  import { getDate } from '@/utils/dateUtils';
   import detail from './detailDialog.vue';
 
   // 默认表单数据
@@ -114,7 +122,7 @@
   };
   export default {
     name: 'BpmDoneTask',
-    components: {detail},
+    components: { detail },
     mixins: [dictMixins],
     data() {
       return {
@@ -219,7 +227,7 @@
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 130
-          },
+          }
           // {
           //   columnKey: 'action',
           //   label: '操作',
@@ -243,6 +251,10 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
+        if (this.params.createTime?.length) {
+          this.params['beginCreateTime'] = this.params.createTime[0];
+          this.params['endCreateTime'] = this.params.createTime[1];
+        }
         return getDoneTaskPage({
           pageNo: page,
           pageSize: limit,
@@ -264,24 +276,24 @@
         this.$refs.detailRef.open(row);
       },
       getTimelineItemType(result) {
-      if (result === '通过') {
-        return 'success';
-      }
-      if (result === '不通过') {
-        return 'danger';
-      }
-      if (result === '取消') {
-        return 'info';
-      }
-      if (result === '处理中') {
-        return 'warning';
-      }
+        if (result === '通过') {
+          return 'success';
+        }
+        if (result === '不通过') {
+          return 'danger';
+        }
+        if (result === '取消') {
+          return 'info';
+        }
+        if (result === '处理中') {
+          return 'warning';
+        }
 
-      return '';
-    },
-    getDateTime(ms){
-      return getDate(ms)
-    }
+        return '';
+      },
+      getDateTime(ms) {
+        return getDate(ms);
+      }
     }
   };
 </script>