yusheng пре 2 година
родитељ
комит
bb18a2bf81
3 измењених фајлова са 37 додато и 19 уклоњено
  1. 7 6
      src/views/bpm/done/index.vue
  2. 24 6
      src/views/bpm/processInstance/detail.vue
  3. 6 7
      src/views/bpm/todo/index.vue

+ 7 - 6
src/views/bpm/done/index.vue

@@ -31,7 +31,7 @@
                 <DictSelection
                   dictName="流程实例的结果"
                   clearable
-                  v-model="params.status"
+                  v-model="params.result"
                 >
                 </DictSelection>
               </el-form-item>
@@ -96,6 +96,8 @@
         </template>
       </ele-pro-table>
     </el-card>
+    <detail ref="detailRef"></detail>
+
   </div>
 </template>
 
@@ -103,6 +105,8 @@
   import dictMixins from '@/mixins/dictMixins';
   import { getDoneTaskPage } from '@/api/bpm/task';
   import {getDate} from "@/utils/dateUtils";
+  import detail from '@/views/bpm/processInstance/detail.vue';
+
   // 默认表单数据
   const defaultParams = {
     status: '',
@@ -110,7 +114,7 @@
   };
   export default {
     name: 'BpmDoneTask',
-    components: {},
+    components: {detail},
     mixins: [dictMixins],
     data() {
       return {
@@ -229,10 +233,7 @@
       },
       /** 处理审批按钮 */
       handleAudit(row) {
-        this.$router.push({
-          name: '流程详情',
-          query: { id: row.processInstance.id }
-        });
+        this.$refs.detailRef.open(row.processInstance.id);
       },
       getTimelineItemType(result) {
       if (result === '通过') {

+ 24 - 6
src/views/bpm/processInstance/detail.vue

@@ -1,4 +1,12 @@
 <template>
+    <el-dialog
+    title="详情"
+    :before-close="handleClose"
+    :visible.sync="dialogVisible"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    width="80%"
+  >
   <div class="app-container" style="padding: 15px">
     <!-- 审批记录 -->
     <el-card class="box-card" v-loading="tasksLoad">
@@ -80,6 +88,7 @@
       />
     </el-card>
   </div>
+  </el-dialog>
 </template>
 
 <script>
@@ -105,6 +114,7 @@
         // 流程实例
         id: undefined, // 流程实例的编号
         processInstance: {},
+        dialogVisible: false,
 
         // BPMN 数据
         bpmnXML: null,
@@ -119,14 +129,19 @@
       };
     },
     created() {
-      this.id = this.$route.query.id;
-      if (!this.id) {
-        this.$message.error('未传递 id 参数,无法查看流程信息');
-        return;
-      }
-      this.getDetail();
+      // this.id = this.$route.query.id;
+      // if (!this.id) {
+      //   this.$message.error('未传递 id 参数,无法查看流程信息');
+      //   return;
+      // }
+      // this.getDetail();
     },
     methods: {
+      open(id) {
+        this.id = id;
+        this.dialogVisible=true
+        this.getDetail();
+      },
       /** 获得流程实例 */
       getDetail() {
         // 获得流程实例相关
@@ -247,6 +262,9 @@
           return 'default';
         }
         return '';
+      },
+      handleClose() {
+        this.dialogVisible = false;
       }
     }
   };

+ 6 - 7
src/views/bpm/todo/index.vue

@@ -14,7 +14,7 @@
                 <el-input clearable v-model.trim="params.name"></el-input>
               </el-form-item>
             </el-col>
-            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+            <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
               <el-form-item label="状态:" prop="status">
                 <el-select
                   v-model="params.status"
@@ -29,7 +29,7 @@
                   />
                 </el-select>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
               <el-form-item label="创建时间:" prop="createTime">
                 <el-date-picker
@@ -95,12 +95,14 @@
       </ele-pro-table>
     </el-card>
     <handleTask ref="handleTaskRef" @reload="reload"></handleTask>
+    <detail ref="detailRef"></detail>
   </div>
 </template>
 
 <script>
   import { getTodoTaskPage } from '@/api/bpm/task';
   import handleTask from '@/views/bpm/handleTask/index.vue';
+  import detail from '@/views/bpm/processInstance/detail.vue';
 
   // import {getDate} from "@/utils/dateUtils";
   // 默认表单数据
@@ -110,7 +112,7 @@
   };
   export default {
     name: 'BpmDoneTask',
-    components: {handleTask},
+    components: {handleTask,detail},
     computed: {
       // 是否开启响应式布局
       styleResponsive() {
@@ -212,10 +214,7 @@
         if (type == 'audit') {
           this.$refs.handleTaskRef.open(row.processInstance.id);
         } else {
-          this.$router.push({
-            name: '流程详情',
-            query: { id: row.processInstance.id }
-          });
+          this.$refs.detailRef.open(row.processInstance.id);
         }
       }
     }