From ac6ecd32d72890e6ca51a189ba159546b4f3b61e Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 17 八月 2025 11:32:28 +0800
Subject: [PATCH] 添加异常流程

---
 src/views/flowmgr/processQuery.vue  |    9 
 src/api/flowmgr/processQuery.js     |   13 
 src/views/flowmgr/processQuery3.vue |  715 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 734 insertions(+), 3 deletions(-)

diff --git a/src/api/flowmgr/processQuery.js b/src/api/flowmgr/processQuery.js
index 5927d3d..cc06e54 100644
--- a/src/api/flowmgr/processQuery.js
+++ b/src/api/flowmgr/processQuery.js
@@ -1,7 +1,7 @@
 /*
  * @Date: 2025-06-12 22:38:05
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-08-17 08:46:26
+ * @LastEditTime: 2025-08-17 11:31:05
  * @FilePath: /mdmweb/src/api/flowmgr/processQuery.js
  */
 import request from '@/axios';
@@ -27,6 +27,17 @@
     },
   })
 };
+export const getList3 = (current, size, params) => {
+  return request({
+    url: '/blade-mdm/flow/mgr/exception-list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    },
+  })
+};
 export const deleteRow = (params,data) => {
   return request({
     url: '/blade-mdm/flow/mgr/delete-instance',
diff --git a/src/views/flowmgr/processQuery.vue b/src/views/flowmgr/processQuery.vue
index 0490309..a202ad8 100644
--- a/src/views/flowmgr/processQuery.vue
+++ b/src/views/flowmgr/processQuery.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2025-08-10 14:14:58
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-08-17 08:40:49
+ * @LastEditTime: 2025-08-17 11:29:34
  * @FilePath: /mdmweb/src/views/flowmgr/processQuery.vue
 -->
 <template>
@@ -17,16 +17,21 @@
             <el-tab-pane label="宸茬粨鏉�" name="done">
                 <processQuery2 v-if="activeName==='done'"> </processQuery2>
             </el-tab-pane>
+            <el-tab-pane label="寮傚父娴佺▼" name="error">
+                <processQuery3 v-if="activeName==='error'"> </processQuery3>
+            </el-tab-pane>
         </el-tabs>
     </basic-container>
 </template>
 <script>
 import processQuery1 from './processQuery1.vue';
 import processQuery2 from './processQuery2.vue';
+import processQuery3 from './processQuery3.vue';
 export default {
     components: {
         processQuery2,
-        processQuery1
+        processQuery1,
+        processQuery3
     },
     data() {
         return {
diff --git a/src/views/flowmgr/processQuery3.vue b/src/views/flowmgr/processQuery3.vue
new file mode 100644
index 0000000..a3f0817
--- /dev/null
+++ b/src/views/flowmgr/processQuery3.vue
@@ -0,0 +1,715 @@
+<!--
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-08-17 11:30:47
+ * @FilePath: /mdmweb/src/views/flowmgr/processQuery3.vue
+-->
+<template>
+    <basic-container>
+        <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
+            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
+            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
+            @selection-change="selectionChange">
+            <!-- <template slot="view" slot-scope="{ row }">
+              <div class="custom-view-footer">
+                <p>杩欐槸鑷畾涔夌殑搴曢儴鍐呭</p>
+                <p>褰撳墠琛屾暟鎹細{{ row }}</p>
+              </div>
+            </template> -->
+            <template #menu-left>
+                <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
+                <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
+                <!-- <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button> -->
+                <!-- <el-button type="primary" plain @click="reassign">閲嶆柊鎸囨淳
+                </el-button> -->
+            </template>
+            <template #menu="scope">
+                <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
+                </el-button>
+                <!-- <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'"
+                    @click.stop="handleAction(scope.row, scope.index, 1)">瀹℃壒琛ㄦ墦鍗�
+                </el-button>
+                <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">鍒犻櫎
+                </el-button> -->
+                
+            </template>
+        </avue-crud>
+        <el-dialog title="鎸囨淳" append-to-body v-model="reassignBox" width="30%">
+            <avue-form ref="reassginform" :option="reassignOption" v-model="reassignForm"
+                @submit="toPerson"></avue-form>
+        </el-dialog>
+
+        <el-dialog title="鏌ョ湅璇︽儏" v-model="dialogVisible" width="60%">
+            <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form>
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column prop="assigneeName" label="鎵ц浜�" />
+                <el-table-column prop="taskName" label="浠诲姟鍚嶇О" />
+                <el-table-column prop="comment" label="鎵规敞" />
+                <el-table-column prop="createTime" label="寮�濮嬫椂闂�" />
+                <el-table-column prop="endTime" label="瀹屾垚鏃堕棿" />
+            </el-table>
+        </el-dialog>
+    </basic-container>
+</template>
+
+<script>
+import { getList3, deleteRow, printRow } from '@/api/flowmgr/processQuery.js';
+import { getAssignee, reassgin } from '@/api/flow/todolist';
+import { exportBlobPost } from '@/api/common';
+import NProgress from 'nprogress';
+import { downloadFile } from '@/utils/util';
+import 'nprogress/nprogress.css';
+
+export default {
+    name: 'MachineReturnFileOp',
+    data() {
+        return {
+            tableData: [],
+            viewRow: {},
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+            },
+            form: {},
+            query: {},
+            loading: true,
+            data: [],
+            option: {
+                addBtn: false,
+                editBtn: false,
+                delBtn: false,
+                viewBtn: false,
+                columnBtn: false,
+                tip: false,
+                // simplePage: true,
+                searchShow: true,
+                searchMenuSpan: 7,
+                dialogWidth: '70%',
+                // tree: true,
+                border: true,
+                index: true,
+                selection: true,
+
+                menuWidth: 200,
+                // menu: false,
+                labelWidth: 90,
+                menuSpan: 6,
+                dialogClickModal: false,
+                column: [
+                    {
+                        label: '娴佺▼绫诲瀷',
+                        prop: 'processDefinitionKey',
+                        search: true,
+                        searchType: 'select',
+                        hide: true,
+                        dicUrl: `/blade-mdm/system/dict/dictionary?code=flow`,
+                        props: {
+                            label: 'dictValue',
+                            value: 'remark',
+                        },
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'createTime',
+                        type: 'datetime',
+                        format: 'YYYY-MM-DD HH:mm:ss',
+                        valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                        search: true,
+                        searchRange: true,
+                        hide: true,
+                    },
+                    {
+                        label: '鍏抽敭瀛�',
+                        prop: 'keyword',
+                        search: true,
+                        searchType: 'input',
+                        hide: true,
+                        viewDisplay: false,
+                    },
+					{
+                        label: '鏍囬',
+                        prop: 'variables.title',
+                        width: 150,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.title)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.title || '');
+                        }
+                    },
+					{
+                        label: '娴佺▼鍚嶇О',
+                        prop: '',
+                        width: 80,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.myProcessName)
+                        }
+                    },
+                    {
+                        label: '宸ヨ壓鐗堟',
+                        prop: 'variables.craftEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍙�',
+                        prop: 'processNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍚嶇О',
+                        prop: 'processName',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processName || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鐗堟',
+                        prop: 'processEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processEdition || '');
+                        }
+                    },
+                    {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.drawingNo || '');
+                        }
+                    },
+                    {
+                        label: '浠诲姟杞﹂棿',
+                        prop: 'workshop',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+                        }
+                    },
+                    {
+                        label: '杩囩▼鍗″彿',
+                        prop: 'empty',
+                        width: 80,
+                    },
+					{
+                        label: '鍥惧彿',
+                        prop: '',
+                        width: 100,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.drawingNo)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.drawingNo || '');
+                        }
+                    },
+					{
+                        label: '浜у搧鍨嬪彿',
+                        prop: '',
+                        width: 100,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.productModel)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.productModel || '');
+                        }
+                    },
+					
+                    {
+                        label: '鏈哄簥',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.machineCode)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.machineCode || '');
+                        }
+                    },
+                    {
+                        label: '鍒涘缓浜�',
+                        prop: 'startUserName',
+						width: 80,
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'processCreateTime',
+                    },
+                    {
+                        label: '褰撳墠鑺傜偣',
+                        prop: 'taskName',
+						width: 90
+                    },
+                    {
+                        label: '璁″垝鍔犲伐鏃堕棿',
+                        prop: 'planStartTime',
+                        width: 180,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.planStartTime || '');
+                        }
+                    },
+                    {
+                        label: '绋嬪簭鍖呭悕',
+                        prop: 'programPackageName',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.programPackageName || '');
+                        }
+                    },
+                ],
+            },
+            viewFormOption: {
+                emptyBtn: false,
+                submitBtn: false,
+                menuBtn: false,
+                labelWidth: 100,
+                span: 8,
+                column: [
+                    {
+                        label: '娴佺▼绫诲瀷',
+                        prop: 'processDefinitionKey',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.processDefinitionKey)
+                        },
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'createTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.createTime)
+                        },
+                    },
+                    {
+                        label: '鏍囬',
+                        prop: 'variables.title',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.title)
+                        }
+                    },
+                    {
+                        label: '娴佺▼鍚嶇О',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
+                        }
+                    },
+                    {
+                        label: '宸ヨ壓鐗堟',
+                        prop: 'variables.craftEdition',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍙�',
+                        prop: 'processNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍚嶇О',
+                        prop: 'processName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processName || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鐗堟',
+                        prop: 'processEdition',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processEdition || '');
+                        }
+                    },
+                    {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo || '');
+                        }
+                    },
+                    {
+                        label: '浠诲姟杞﹂棿',
+                        prop: 'workshop',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+                        }
+                    },
+                    {
+                        label: '杩囩▼鍗″彿',
+                        prop: 'empty',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+                        }
+                    },
+                    {
+                        label: '鍥惧彿',
+                        prop: 'drawingNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo)
+                        }
+                    },
+                    {
+                        label: '浜у搧鍨嬪彿',
+                        prop: 'productModel',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.productModel)
+                        }
+                    },                    
+                    {
+                        label: '鏈哄簥',
+                        prop: 'machineCode',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.machineCode)
+                        }
+                    },
+                    {
+                        label: '鍒涘缓浜�',
+                        prop: 'startUserName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.startUserName)
+                        }
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'processCreateTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.processCreateTime)
+                        }
+                    },
+                    {
+                        label: '褰撳墠鑺傜偣',
+                        prop: 'taskName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.taskName)
+                        }
+                    },
+                    {
+                        label: '璁″垝鍔犲伐鏃堕棿',
+                        prop: 'planStartTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.planStartTime || '');
+                        }
+                    },
+                    {
+                        label: '绋嬪簭鍖呭悕',
+                        prop: 'programPackageName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.programPackageName || '');
+                        }
+                    },
+                    {
+                        label: '鍋忕鍗曞彿',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.deviation || '');
+                        }
+                    },
+                ],
+            },
+            selectedList: [],
+            dialogVisible: false,
+            reassignBox: false,
+            reassignForm: {},
+            reassignOption: {
+                submitBtn: true,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: '鍙戦�佺粰',
+                        prop: 'newAssigneeId',
+                        type: 'select',
+                        // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
+                        // dicFlag: true,
+                        props: {
+                            label: 'name',
+                            value: 'id',
+                        },
+                        span: 24,
+                        disabled: false,
+                        dicData: [
+
+                        ],
+                        rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
+                    },
+                    {
+                        label: '澶囨敞',
+                        span: 24,
+                        prop: 'comment',
+                        type: 'textarea',
+                        rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                    },
+                ],
+            },
+        }
+    },
+    mounted() {
+        getAssignee().then(res => {
+            this.reassignOption.column[0].dicData = res.data.data;
+        })
+    },
+    methods: {
+        customView(row) {
+            this.viewRow = {...row};
+            axios({
+                url: '/blade-mdm/flow/mgr/process-trace',
+                method: 'get',
+                params: {processInstanceId: row.processInstanceId}
+            }).then(
+              res => {
+                this.tableData = res.data.data;
+            });
+            this.dialogVisible = true;
+        },
+        reassign() {// 閲嶆柊鎸囨淳
+            console.log(this.selectedList.length)
+            if (this.selectedList.length === 0) {
+                this.$message.warning('璇烽�夋嫨闇�瑕侀噸鏂版寚娲剧殑浠诲姟');
+                return;
+            }
+            if (this.selectedList.length > 1) {
+                this.$message.warning('璇烽�夋嫨涓�鏉�');
+                return;
+            }
+            this.reassignBox = true;
+        },
+        toPerson(form, done) {
+            this.$confirm('璇风‘璁ゆ槸鍚︽寚娲�', '', {
+                confirmButtonText: this.$t('submitText'),
+                cancelButtonText: this.$t('cancelText'),
+                type: 'warning',
+            }).then(() => {
+                console.log('toPerson', form);
+                reassgin({
+                    ...form,
+                    taskId: this.selectedList[0].taskId,
+                    processInstanceId: this.selectedList[0].processInstanceId,
+                }).then(res => {
+                    this.$message.success('鎸囨淳鎴愬姛');
+                    this.reassignBox = false;
+                    this.$refs?.reassginform?.resetForm();
+                    this.onLoad(this.page, this.query);
+
+                }).catch(err => {
+                    console.error(err);
+                })
+            });
+            done();
+        },
+        handleAction(row, index, flag) {
+            if (flag === 0) {
+                // 澶勭悊鎺ュ彈鎴栨嫆缁濇搷浣�
+                let ids = [row.id].toString();
+                this.$confirm('纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?', {
+                    confirmButtonText: '纭畾',
+                    cancelButtonText: '鍙栨秷',
+                    type: 'warning',
+                })
+                    .then(() => {
+                        deleteRow({ processInstanceId: row.processInstanceId,id:row.processInstanceId }).then(res => {
+                            this.onLoad(this.page, this.query);
+                        })
+                    })
+            } else if (flag === 1) {
+                printRow({ processInstanceId: row.processInstanceId })
+                this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
+                    confirmButtonText: '纭畾',
+                    cancelButtonText: '鍙栨秷',
+                    type: 'warning',
+                }).then(() => {
+                    console.log(this.selection)
+                    NProgress.start();
+                    exportBlobPost(
+                        `/blade-mdm/flow/mgr/export-approve-table`,
+                        { processInstanceId: row.processInstanceId },
+                        { processInstanceId: row.processInstanceId },
+                    ).then(res => {
+                        let name = res.headers['content-disposition'].split('filename=')[1]
+                        console.log(res.headers['content-disposition'].split('filename=')[1]);
+                        downloadFile(res.data, `瀹℃壒鎵撳嵃-${name}`);
+                        NProgress.done();
+                    });
+                });
+            }
+
+        },
+        selectionChange(list) {
+            console.log('selectionChange', list);
+            this.selectedList = list;
+        },
+        // exportWebSite() {
+        //     if (this.selectedList.length === 0) {
+        //         this.$message.warning('璇峰厛閫夋嫨闇�瑕佸鍑虹殑鏁版嵁');
+        //         return;
+        //     }
+        //     this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
+        //         confirmButtonText: '纭畾',
+        //         cancelButtonText: '鍙栨秷',
+        //         type: 'warning',
+        //     }).then(() => {
+        //         NProgress.start();
+        //         exportBlob(
+        //             `/blade-mdm/machineback/filehandle/export-to-inner`,
+        //             {
+        //                 ids: this.selectedList.map(item => item.id).join(','),
+        //             }
+        //         ).then(res => {
+        //             downloadXls(res.data, `瀵煎嚭鍥炰紶娑夊瘑缃�${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
+        //             NProgress.done();
+        //         });
+        //     });
+        // },
+        // exportExcel() {
+        //     if (this.selectedList.length === 0) {
+        //         this.$message.warning('璇峰厛閫夋嫨闇�瑕佸鍑虹殑鏁版嵁');
+        //         return;
+        //     }
+        //     this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
+        //         confirmButtonText: '纭畾',
+        //         cancelButtonText: '鍙栨秷',
+        //         type: 'warning',
+        //     }).then(() => {
+        //         NProgress.start();
+        //         exportBlob(
+        //             `/blade-mdm/machineback/filehandle/export-excel?${this.website.tokenHeader}=${getToken()}`
+        //         ).then(res => {
+        //             downloadXls(res.data, `瀵煎嚭鏈哄簥鍥炰紶绋嬪簭${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
+        //             NProgress.done();
+        //         });
+        //     });
+        // },
+        searchChange(params, done) {
+            let data = {}
+            this.query = params;
+            this.page.currentPage = 1;
+            console.log('searchChange', params);
+            params.createTimeBegin = params?.createTime?.[0] || '';
+            params.createTimeEnd = params?.createTime?.[1] || '';
+            console.log(params);
+            // data = {
+            //     createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '',
+            //     createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '',
+            //     keyword: params.keyword || ''
+            // }
+            data = {
+                createTimeBegin: params.createTimeBegin || undefined,
+                createTimeEnd: params.createTimeEnd || undefined,
+                keyword: params.keyword || undefined,
+                processDefinitionKey: params.processDefinitionKey || undefined
+            }
+            this.query = data
+            this.onLoad(this.page, data);
+            done();
+        },
+        searchReset() {
+            let data = {}
+            this.query = data;
+            this.page.currentPage = 1;
+            data = {
+                createTimeBegin: params.createTimeBegin,
+                createTimeEnd: params.createTimeEnd,
+                keyword: params.keyword || '',
+                processDefinitionKey: params.processDefinitionKey || ''
+            }
+            this.onLoad(this.page, data);
+            done();
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+            // this.onLoad();
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.query);
+        },
+        /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+         */
+        onLoad(page, params = {}) {
+            console.log('onLoad', page, params);
+            const data = {
+                ...this.query,
+                createTimeBegin: params.createTimeBegin,
+                createTimeEnd: params.createTimeEnd,
+                keyword: params.keyword || '',
+                processDefinitionKey: params.processDefinitionKey || ''
+            };
+            this.loading = true;
+            getList3(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
+                const data = res.data.data
+                this.page.total = data.total;
+                this.data = data.records.map(v=> {
+                    return {
+                        ...v,
+                        id: v.processInstanceId,
+                    }
+                });
+                this.loading = false;
+            }, () => {
+                this.data = [];
+                this.loading = false;
+            }).catch(err => {
+                this.data = [];
+                this.loading = false;
+            });
+        }
+    }
+};
+</script>
+
+<style lang="scss">
+.margin0 {
+    margin: 0
+}
+.viewRowForm .el-form-item--default {
+    margin-bottom: 0
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3