Browse Source

修改流程处理

余思翰 1 year ago
parent
commit
b26451d681

+ 1
- 1
oa-ui/src/views/flowable/form/scForm.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-19 16:29:01
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-01-29 16:51:20
5
+ * @LastEditTime: 2024-01-30 10:43:19
6 6
 -->
7 7
 <template>
8 8
   <div>

+ 6
- 5
oa-ui/src/views/flowable/form/scTable.vue View File

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div style="padding:10px">
3
-    <h2 style="text-align: center;">考核表</h2>
3
+    <h2 style="text-align: center;">生产部门考核表</h2>
4 4
     <table class="table">
5 5
       <tr>
6 6
         <td>姓名</td>
@@ -714,7 +714,7 @@
714 714
         <td>{{ tableForm.f1306 }}</td>
715 715
       </tr>
716 716
       <tr>
717
-        <td rowspan="6">内业-dom</td>
717
+        <td rowspan="6">内业-DOM</td>
718 718
         <td>1:200</td>
719 719
         <td>km²</td>
720 720
         <td>{{ tableForm.f1401 }}</td>
@@ -763,7 +763,7 @@
763 763
         <td>{{ tableForm.f1406 }}</td>
764 764
       </tr>
765 765
       <tr>
766
-        <td rowspan="6">内业-dem</td>
766
+        <td rowspan="6">内业-DEM</td>
767 767
         <td>1:200</td>
768 768
         <td>km²</td>
769 769
         <td>{{ tableForm.f1501 }}</td>
@@ -925,7 +925,8 @@ export default {
925 925
   },
926 926
   watch: {
927 927
     tableForm: function (newval, oldval) {
928
-      console.log(1);
928
+      console.log(oldval);
929
+      this.formatForm();
929 930
       console.log(newval);
930 931
     }
931 932
   },
@@ -962,7 +963,7 @@ export default {
962 963
             this.form['role0' + i] = this.tableForm['role0' + i]
963 964
         }
964 965
         else {
965
-          if (this.tableForm['role0' + i] != undefined)
966
+          if (this.tableForm['role' + i] != undefined)
966 967
             this.form['role' + i] = this.tableForm['role' + i]
967 968
         }
968 969
       }

+ 1
- 3
oa-ui/src/views/flowable/task/myProcess/detail/index.vue View File

@@ -78,14 +78,12 @@ import Parser from '@/components/parser/Parser'
78 78
 import {getProcessVariables, readXml, getFlowViewer, getHighlight, flowXmlAndNode} from "@/api/flowable/definition";
79 79
 import flow from '@/views/flowable/task/myProcess/detail/flow'
80 80
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
81
-import ScTable from "../../../form/scTable.vue";
82 81
 
83 82
 export default {
84 83
   name: "Record",
85 84
   components: {
86 85
     Parser,
87
-    flow,
88
-    ScTable
86
+    flow
89 87
 },
90 88
   props: {},
91 89
   data() {

+ 66
- 90
oa-ui/src/views/flowable/task/myProcess/index.vue View File

@@ -2,20 +2,12 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="名称" prop="name">
5
-        <el-input
6
-          v-model="queryParams.name"
7
-          placeholder="请输入名称"
8
-          clearable
9
-          size="small"
10
-          @keyup.enter.native="handleQuery"
11
-        />
5
+        <el-input v-model="queryParams.name" placeholder="请输入名称" clearable size="small"
6
+          @keyup.enter.native="handleQuery" />
12 7
       </el-form-item>
13 8
       <el-form-item label="开始时间" prop="deployTime">
14
-        <el-date-picker clearable size="small"
15
-                        v-model="queryParams.deployTime"
16
-                        type="date"
17
-                        value-format="yyyy-MM-dd"
18
-                        placeholder="选择时间">
9
+        <el-date-picker clearable size="small" v-model="queryParams.deployTime" type="date" value-format="yyyy-MM-dd"
10
+          placeholder="选择时间">
19 11
         </el-date-picker>
20 12
       </el-form-item>
21 13
       <el-form-item>
@@ -26,116 +18,88 @@
26 18
 
27 19
     <el-row :gutter="10" class="mb8">
28 20
       <el-col :span="1.5">
29
-        <el-button
30
-          type="primary"
31
-          plain
32
-          icon="el-icon-plus"
33
-          size="mini"
34
-          @click="handleAdd"
35
-          v-hasPermi="['system:deployment:add']"
36
-        >新增流程</el-button>
21
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
22
+          v-hasPermi="['system:deployment:add']">新增流程</el-button>
37 23
       </el-col>
38 24
       <el-col :span="1.5">
39
-        <el-button
40
-          type="danger"
41
-          plain
42
-          icon="el-icon-delete"
43
-          size="mini"
44
-          :disabled="multiple"
45
-          @click="handleDelete"
46
-          v-hasPermi="['system:deployment:remove']"
47
-        >删除</el-button>
25
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
26
+          v-hasPermi="['system:deployment:remove']">删除</el-button>
48 27
       </el-col>
49 28
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
50 29
     </el-row>
51 30
 
52 31
     <el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange">
53 32
       <el-table-column type="selection" width="55" align="center" />
54
-      <el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true"/>
55
-      <el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/>
33
+      <el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true" />
34
+      <el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true" />
56 35
       <el-table-column label="流程类别" align="center" prop="category" width="100px" />
57 36
       <el-table-column label="流程版本" align="center" width="80px">
58 37
         <template slot-scope="scope">
59
-          <el-tag size="medium" >v{{ scope.row.procDefVersion }}</el-tag>
38
+          <el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
60 39
         </template>
61 40
       </el-table-column>
62
-      <el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
41
+      <el-table-column label="提交时间" align="center" prop="createTime" width="180" />
63 42
       <el-table-column label="流程状态" align="center" width="100">
64 43
         <template slot-scope="scope">
65 44
           <el-tag v-if="scope.row.finishTime == null" size="mini">进行中</el-tag>
66 45
           <el-tag type="success" v-if="scope.row.finishTime != null" size="mini">已完成</el-tag>
67 46
         </template>
68 47
       </el-table-column>
69
-      <el-table-column label="耗时" align="center" prop="duration" width="180"/>
70
-      <el-table-column label="当前节点" align="center" prop="taskName"/>
48
+      <el-table-column label="耗时" align="center" prop="duration" width="180" />
49
+      <el-table-column label="当前节点" align="center" prop="taskName" />
71 50
       <el-table-column label="办理人" align="center">
72 51
         <template slot-scope="scope">
73
-          <label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.assigneeDeptName}}</el-tag></label>
74
-<!--          <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
52
+          <label v-if="scope.row.assigneeName">{{ scope.row.assigneeName }} <el-tag type="info"
53
+              size="mini">{{ scope.row.assigneeDeptName }}</el-tag></label>
54
+          <!--          <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
75 55
         </template>
76 56
       </el-table-column>
77 57
       <el-table-column label="操作" width="150" fixed="right" class-name="small-padding fixed-width">
78 58
         <template slot-scope="scope">
79 59
           <el-button @click="handleFlowRecord(scope.row)" type="text" size="small">详情</el-button>
80 60
           <el-button @click="handleStop(scope.row)" type="text" size="small">取消申请</el-button>
81
-          <el-button @click="handleDelete(scope.row)" type="text" size="small" v-hasPermi="['system:deployment:remove']">删除</el-button>
61
+          <el-button @click="handleDelete(scope.row)" type="text" size="small"
62
+            v-hasPermi="['system:deployment:remove']">删除</el-button>
82 63
         </template>
83 64
       </el-table-column>
84 65
     </el-table>
85 66
 
86
-    <pagination
87
-      v-show="total>0"
88
-      :total="total"
89
-      :page.sync="queryParams.pageNum"
90
-      :limit.sync="queryParams.pageSize"
91
-      @pagination="getList"
92
-    />
67
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
68
+      @pagination="getList" />
93 69
 
94 70
     <!-- 发起流程 -->
95 71
     <el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
96 72
       <el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px">
97 73
         <el-form-item label="名称" prop="name">
98
-          <el-input
99
-            v-model="queryProcessParams.name"
100
-            placeholder="请输入名称"
101
-            clearable
102
-            size="small"
103
-            @keyup.enter.native="handleQuery"
104
-          />
74
+          <el-input v-model="queryProcessParams.name" placeholder="请输入名称" clearable size="small"
75
+            @keyup.enter.native="handleQuery" />
105 76
         </el-form-item>
106 77
         <el-form-item>
107 78
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleProcessQuery">搜索</el-button>
108 79
           <el-button icon="el-icon-refresh" size="mini" @click="resetProcessQuery">重置</el-button>
109 80
         </el-form-item>
110 81
       </el-form>
111
-      <el-table v-loading="processLoading" fit :data="definitionList" border >
82
+      <el-table v-loading="processLoading" fit :data="definitionList" border>
112 83
         <el-table-column label="流程名称" align="center" prop="name" />
113 84
         <el-table-column label="流程版本" align="center">
114 85
           <template slot-scope="scope">
115
-            <el-tag size="medium" >v{{ scope.row.version }}</el-tag>
86
+            <el-tag size="medium">v{{ scope.row.version }}</el-tag>
116 87
           </template>
117 88
         </el-table-column>
118 89
         <el-table-column label="流程分类" align="center" prop="category" />
119 90
         <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
120 91
           <template slot-scope="scope">
121
-            <el-button
122
-              size="mini"
123
-              type="text"
124
-              icon="el-icon-edit-outline"
125
-              @click="handleStartProcess(scope.row)"
126
-            >发起流程</el-button>
92
+            <el-button size="mini" type="text" icon="el-icon-edit-outline"
93
+              @click="handleStartProcess(scope.row)">发起流程</el-button>
127 94
           </template>
128 95
         </el-table-column>
129 96
       </el-table>
130
-      <pagination
131
-        v-show="processTotal>0"
132
-        :total="processTotal"
133
-        :page.sync="queryProcessParams.pageNum"
134
-        :limit.sync="queryProcessParams.pageSize"
135
-        @pagination="listDefinition"
136
-      />
97
+      <pagination v-show="processTotal > 0" :total="processTotal" :page.sync="queryProcessParams.pageNum"
98
+        :limit.sync="queryProcessParams.pageSize" @pagination="listDefinition" />
99
+    </el-dialog>
100
+    <el-dialog title="详情" :visible.sync="detailsOpen" width="60%" append-to-body>
101
+      <RowDetail :rows="clickRow"></RowDetail>
137 102
     </el-dialog>
138
-
139 103
   </div>
140 104
 </template>
141 105
 
@@ -148,11 +112,13 @@ import {
148 112
   exportDeployment,
149 113
   flowRecord
150 114
 } from "@/api/flowable/finished";
151
-import { myProcessList,stopProcess } from "@/api/flowable/process";
152
-import {listDefinition} from "@/api/flowable/definition";
115
+import { myProcessList, stopProcess } from "@/api/flowable/process";
116
+import { listDefinition } from "@/api/flowable/definition";
117
+import  RowDetail  from './send/rowDetail.vue'
153 118
 export default {
154 119
   name: "Deploy",
155 120
   components: {
121
+    RowDetail
156 122
   },
157 123
   data() {
158 124
     return {
@@ -169,15 +135,17 @@ export default {
169 135
       showSearch: true,
170 136
       // 总条数
171 137
       total: 0,
172
-      processTotal:0,
138
+      processTotal: 0,
173 139
       // 我发起的流程列表数据
174 140
       myProcessList: [],
175 141
       // 弹出层标题
176 142
       title: "",
177 143
       // 是否显示弹出层
178 144
       open: false,
145
+      // 详情弹出框
146
+      detailsOpen: false,
179 147
       src: "",
180
-      definitionList:[],
148
+      definitionList: [],
181 149
       // 查询参数
182 150
       queryParams: {
183 151
         pageNum: 1,
@@ -211,6 +179,8 @@ export default {
211 179
       // 表单校验
212 180
       rules: {
213 181
       },
182
+      // 当前点击的行数据
183
+      clickRow:{}
214 184
     };
215 185
   },
216 186
   created() {
@@ -270,7 +240,7 @@ export default {
270 240
     // 多选框选中数据
271 241
     handleSelectionChange(selection) {
272 242
       this.ids = selection.map(item => item.procInsId)
273
-      this.single = selection.length!==1
243
+      this.single = selection.length !== 1
274 244
       this.multiple = !selection.length
275 245
     },
276 246
     /** 新增按钮操作 */
@@ -279,7 +249,7 @@ export default {
279 249
       this.title = "发起流程";
280 250
       this.listDefinition();
281 251
     },
282
-    listDefinition(){
252
+    listDefinition() {
283 253
       listDefinition(this.queryProcessParams).then(response => {
284 254
         this.definitionList = response.data.records;
285 255
         this.processTotal = response.data.total;
@@ -287,32 +257,38 @@ export default {
287 257
       });
288 258
     },
289 259
     /**  发起流程申请 */
290
-    handleStartProcess(row){
291
-      this.$router.push({ path: '/flowable/task/myProcess/send/index',
260
+    handleStartProcess(row) {
261
+      this.$router.push({
262
+        path: '/flowable/task/myProcess/send/index',
292 263
         query: {
293 264
           deployId: row.deploymentId,
294 265
           procDefId: row.id
295
-          }
266
+        }
296 267
       })
297 268
     },
298 269
     /**  取消流程申请 */
299
-    handleStop(row){
270
+    handleStop(row) {
300 271
       const params = {
301 272
         instanceId: row.procInsId
302 273
       }
303
-      stopProcess(params).then( res => {
304
-       this.$modal.msgSuccess(res.msg);
274
+      stopProcess(params).then(res => {
275
+        this.$modal.msgSuccess(res.msg);
305 276
         this.getList();
306 277
       });
307 278
     },
308 279
     /** 流程流转记录 */
309
-    handleFlowRecord(row){
310
-      this.$router.push({ path: '/flowable/task/myProcess/detail/index',
311
-        query: {
312
-          procInsId: row.procInsId,
313
-          deployId: row.deployId,
314
-          taskId: row.taskId
315
-      }})
280
+    handleFlowRecord(row) {
281
+      // this.$router.push({
282
+      //   path: '/flowable/task/myProcess/detail/index',
283
+      //   query: {
284
+      //     procInsId: row.procInsId,
285
+      //     deployId: row.deployId,
286
+      //     taskId: row.taskId
287
+      //   }
288
+      // })
289
+      console.log(row);
290
+      this.clickRow = row;
291
+      this.detailsOpen = true;
316 292
     },
317 293
     /** 修改按钮操作 */
318 294
     handleUpdate(row) {
@@ -330,13 +306,13 @@ export default {
330 306
         if (valid) {
331 307
           if (this.form.id != null) {
332 308
             updateDeployment(this.form).then(response => {
333
-             this.$modal.msgSuccess("修改成功");
309
+              this.$modal.msgSuccess("修改成功");
334 310
               this.open = false;
335 311
               this.getList();
336 312
             });
337 313
           } else {
338 314
             addDeployment(this.form).then(response => {
339
-             this.$modal.msgSuccess("新增成功");
315
+              this.$modal.msgSuccess("新增成功");
340 316
               this.open = false;
341 317
               this.getList();
342 318
             });
@@ -355,7 +331,7 @@ export default {
355 331
         return delDeployment(ids);
356 332
       }).then(() => {
357 333
         this.getList();
358
-       this.$modal.msgSuccess("删除成功");
334
+        this.$modal.msgSuccess("删除成功");
359 335
       })
360 336
     },
361 337
     /** 导出按钮操作 */

+ 4
- 2
oa-ui/src/views/flowable/task/myProcess/send/index.vue View File

@@ -84,6 +84,7 @@ export default {
84 84
       checkType: '', // 选择类型
85 85
       checkValues: null, // 选中任务接收人员数据
86 86
       formData: {}, // 填写的表单数据,
87
+      formId: '',
87 88
       multiInstanceVars: '' // 会签节点
88 89
     };
89 90
   },
@@ -186,6 +187,7 @@ export default {
186 187
         const data = res.data;
187 188
         if (data) {
188 189
           this.formData = formData;
190
+          this.formId = formData.formId;
189 191
           if (data.dataType === 'dynamic') {
190 192
             if (data.type === 'assignee') { // 指定人员
191 193
               this.checkSendUser = true;
@@ -232,11 +234,11 @@ export default {
232 234
         return;
233 235
       }
234 236
       if (this.formData.formData == undefined) {
235
-        definitionStart(this.procDefId, { approval: this.checkValues }).then(res => {
237
+        definitionStart(this.procDefId, { approval: this.checkValues, formId: this.formId }).then(res => {
236 238
           this.$modal.msgSuccess(res.msg);
237 239
           this.goBack();
238 240
         })
239
-      }else if (this.formData) {
241
+      } else if (this.formData) {
240 242
         const variables = this.formData.valData;
241 243
         let formData = this.formData.formData;
242 244
         // 表单是否禁用

+ 106
- 0
oa-ui/src/views/flowable/task/myProcess/send/rowDetail.vue View File

@@ -0,0 +1,106 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-01-30 09:56:12
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-01-30 10:20:24
6
+-->
7
+<template>
8
+  <div>
9
+    <el-col :span="16" :offset="4">
10
+      <div class="block">
11
+        <el-timeline>
12
+          <el-timeline-item v-for="(item, index ) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)"
13
+            :color="setColor(item.finishTime)">
14
+            <p style="font-weight: 700">{{ item.taskName }}</p>
15
+            <el-card :body-style="{ padding: '10px' }">
16
+              <el-descriptions class="margin-top" :column="1" size="small" border>
17
+                <el-descriptions-item v-if="item.assigneeName" label-class-name="my-label">
18
+                  <template slot="label"><i class="el-icon-user"></i>办理人</template>
19
+                  {{ item.assigneeName }}
20
+                  <el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
21
+                </el-descriptions-item>
22
+                <el-descriptions-item v-if="item.candidate" label-class-name="my-label">
23
+                  <template slot="label"><i class="el-icon-user"></i>候选办理</template>
24
+                  {{ item.candidate }}
25
+                </el-descriptions-item>
26
+                <el-descriptions-item label-class-name="my-label">
27
+                  <template slot="label"><i class="el-icon-date"></i>接收时间</template>
28
+                  {{ item.createTime }}
29
+                </el-descriptions-item>
30
+                <el-descriptions-item v-if="item.finishTime" label-class-name="my-label">
31
+                  <template slot="label"><i class="el-icon-date"></i>处理时间</template>
32
+                  {{ item.finishTime }}
33
+                </el-descriptions-item>
34
+                <el-descriptions-item v-if="item.duration" label-class-name="my-label">
35
+                  <template slot="label"><i class="el-icon-time"></i>耗时</template>
36
+                  {{ item.duration }}
37
+                </el-descriptions-item>
38
+                <el-descriptions-item v-if="item.comment" label-class-name="my-label">
39
+                  <template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
40
+                  {{ item.comment.comment }}
41
+                </el-descriptions-item>
42
+              </el-descriptions>
43
+            </el-card>
44
+          </el-timeline-item>
45
+        </el-timeline>
46
+      </div>
47
+    </el-col>
48
+  </div>
49
+</template>
50
+
51
+<script>
52
+import {flowRecord} from "@/api/flowable/finished";
53
+export default {
54
+  props: {
55
+    rows: {
56
+      type: Object,
57
+      default: {}
58
+    }
59
+  },
60
+  created() {
61
+    this.getFlowRecordList();
62
+  },
63
+  data() {
64
+    return {
65
+      flowRecordList: [], // 流程流转数据
66
+    }
67
+  },
68
+  methods: {
69
+    setColor(val) {
70
+      if (val) {
71
+        return "#2bc418";
72
+      } else {
73
+        return "#b3bdbb";
74
+      }
75
+    },
76
+    setIcon(val) {
77
+      if (val) {
78
+        return "el-icon-check";
79
+      } else {
80
+        return "el-icon-time";
81
+      }
82
+    },
83
+    /** 获取流程变量内容 */
84
+    processVariables() {
85
+      if (this.rows.taskId) {
86
+        // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
87
+        // getProcessVariables(taskId).then(res => {
88
+        //   this.variablesData = res.data.variables;
89
+        // });
90
+      }
91
+    },
92
+    /** 流程流转记录 */
93
+    getFlowRecordList() {
94
+      const that = this
95
+      const params = { procInsId: this.rows.procInsId, deployId: this.rows.deployId }
96
+      flowRecord(params).then(res => {
97
+        that.flowRecordList = res.data.flowList;
98
+      }).catch(res => {
99
+        
100
+      })
101
+    },
102
+  },
103
+}
104
+</script>
105
+
106
+<style lang="scss" scoped></style>

+ 28
- 4
oa-ui/src/views/flowable/task/todo/detail/index.vue View File

@@ -29,7 +29,12 @@
29 29
           </el-col>
30 30
         </el-tab-pane> -->
31 31
         <el-tab-pane label="表单信息" name="1">
32
-          
32
+          <ScTable :tableForm="tableForm"></ScTable>
33
+          <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
34
+            @click="handleComplete">审批
35
+          </el-button>
36
+          <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
37
+          <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
33 38
         </el-tab-pane>
34 39
         <!--流程流转记录-->
35 40
         <el-tab-pane label="流转记录" name="2">
@@ -149,9 +154,11 @@ import {
149 154
   flowTaskForm,
150 155
   checkIsStartUserNode
151 156
 } from "@/api/flowable/todo";
157
+import { getAssess } from '@/api/oa/assess/assess'
152 158
 import flow from '@/views/flowable/task/todo/detail/flow'
153 159
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
154 160
 import { listUser } from "@/api/system/user";
161
+import ScTable from "../../../form/scTable.vue";
155 162
 
156 163
 export default {
157 164
   name: "Record",
@@ -160,7 +167,8 @@ export default {
160 167
     flow,
161 168
     FlowUser,
162 169
     FlowRole,
163
-  },
170
+    ScTable
171
+},
164 172
   props: {},
165 173
   data() {
166 174
     return {
@@ -223,6 +231,8 @@ export default {
223 231
       startUser: null, // 发起人信息,
224 232
       multiInstanceVars: '', // 会签节点
225 233
       formKeyExist: false, // 当前节点是否存在表单
234
+      // 表单信息
235
+      tableForm: {}
226 236
     };
227 237
   },
228 238
   created() {
@@ -234,10 +244,12 @@ export default {
234 244
       this.taskForm.procInsId = this.$route.query.procInsId;
235 245
       this.taskForm.executionId = this.$route.query.executionId;
236 246
       this.taskForm.instanceId = this.$route.query.procInsId;
247
+      this.taskForm.formId = this.$route.query.formId;
237 248
       // 流程任务获取变量信息
238 249
       if (this.taskForm.taskId) {
239 250
         this.processVariables(this.taskForm.taskId)
240 251
         this.getFlowTaskForm(this.taskForm.taskId)
252
+        this.getAssessByAssessId(this.taskForm.formId)
241 253
       }
242 254
       this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
243 255
     }
@@ -322,14 +334,25 @@ export default {
322 334
       if (taskId) {
323 335
         // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
324 336
         flowTaskForm({ taskId: taskId }).then(res => {
325
-          debugger
326 337
           this.variablesData = res.data.formData;
327
-          console.log( res.data.formData);
328 338
           this.taskForm.variables = res.data.formData;
329 339
           this.formKeyExist = res.data.formKeyExist;
330 340
         });
331 341
       }
332 342
     },
343
+    // 获取需要处理的表单表格信息
344
+    getAssessByAssessId(formId) {
345
+      getAssess(formId ).then(res => {
346
+        let data = res.data;
347
+        for(let d in data){
348
+          if(d.includes('role') || d.includes('familiar')){
349
+            data[d] = data[d].split(',')
350
+          }
351
+        }
352
+        this.tableForm = data;
353
+        console.log(data);
354
+      })
355
+    },
333 356
     /** 加载审批任务弹框 */
334 357
     handleComplete() {
335 358
       // this.completeOpen = true;
@@ -477,6 +500,7 @@ export default {
477 500
         this.completeTitle = "流程审批";
478 501
       })
479 502
     },
503
+
480 504
   },
481 505
 };
482 506
 </script>

+ 36
- 53
oa-ui/src/views/flowable/task/todo/index.vue View File

@@ -2,20 +2,12 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="名称" prop="name">
5
-        <el-input
6
-          v-model="queryParams.name"
7
-          placeholder="请输入名称"
8
-          clearable
9
-          size="small"
10
-          @keyup.enter.native="handleQuery"
11
-        />
5
+        <el-input v-model="queryParams.name" placeholder="请输入名称" clearable size="small"
6
+          @keyup.enter.native="handleQuery" />
12 7
       </el-form-item>
13 8
       <el-form-item label="开始时间" prop="deployTime">
14
-        <el-date-picker clearable size="small"
15
-                        v-model="queryParams.deployTime"
16
-                        type="date"
17
-                        value-format="yyyy-MM-dd"
18
-                        placeholder="选择时间">
9
+        <el-date-picker clearable size="small" v-model="queryParams.deployTime" type="date" value-format="yyyy-MM-dd"
10
+          placeholder="选择时间">
19 11
         </el-date-picker>
20 12
       </el-form-item>
21 13
       <el-form-item>
@@ -26,56 +18,40 @@
26 18
 
27 19
     <el-row :gutter="10" class="mb8">
28 20
       <el-col :span="1.5">
29
-        <el-button
30
-          type="danger"
31
-          plain
32
-          icon="el-icon-delete"
33
-          size="mini"
34
-          :disabled="multiple"
35
-          @click="handleDelete"
36
-          v-hasPermi="['system:deployment:remove']"
37
-        >删除
21
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
22
+          v-hasPermi="['system:deployment:remove']">删除
38 23
         </el-button>
39 24
       </el-col>
40 25
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
41 26
     </el-row>
42 27
 
43 28
     <el-table v-loading="loading" :data="todoList" border @selection-change="handleSelectionChange">
44
-      <el-table-column type="selection" width="55" align="center"/>
45
-      <el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true"/>
46
-      <el-table-column label="流程名称" align="center" prop="procDefName"/>
47
-      <el-table-column label="当前节点" align="center" prop="taskName"/>
29
+      <el-table-column type="selection" width="55" align="center" />
30
+      <el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true" />
31
+      <el-table-column label="流程名称" align="center" prop="procDefName" />
32
+      <el-table-column label="当前节点" align="center" prop="taskName" />
48 33
       <el-table-column label="流程版本" align="center">
49 34
         <template slot-scope="scope">
50
-          <el-tag size="medium" >v{{scope.row.procDefVersion}}</el-tag>
35
+          <el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
51 36
         </template>
52 37
       </el-table-column>
53 38
       <el-table-column label="流程发起人" align="center">
54 39
         <template slot-scope="scope">
55
-          <label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label>
40
+          <label>{{ scope.row.startUserName }} <el-tag type="info" size="mini">{{ scope.row.startDeptName
41
+          }}</el-tag></label>
56 42
         </template>
57 43
       </el-table-column>
58
-      <el-table-column label="接收时间" align="center" prop="createTime" width="180"/>
44
+      <el-table-column label="接收时间" align="center" prop="createTime" width="180" />
59 45
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
60 46
         <template slot-scope="scope">
61
-          <el-button
62
-            size="mini"
63
-            type="text"
64
-            icon="el-icon-edit-outline"
65
-            @click="handleProcess(scope.row)"
66
-          >处理
47
+          <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleProcess(scope.row)">处理
67 48
           </el-button>
68 49
         </template>
69 50
       </el-table-column>
70 51
     </el-table>
71 52
 
72
-    <pagination
73
-      v-show="total>0"
74
-      :total="total"
75
-      :page.sync="queryParams.pageNum"
76
-      :limit.sync="queryParams.pageSize"
77
-      @pagination="getList"
78
-    />
53
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
54
+      @pagination="getList" />
79 55
   </div>
80 56
 </template>
81 57
 
@@ -90,7 +66,7 @@ import {
90 66
   delDeployment,
91 67
   exportDeployment
92 68
 } from "@/api/flowable/todo";
93
-
69
+import { getProcessVariables } from "@/api/flowable/definition";
94 70
 export default {
95 71
   name: "Deploy",
96 72
   components: {},
@@ -141,16 +117,23 @@ export default {
141 117
       });
142 118
     },
143 119
     // 跳转到处理页面
144
-    handleProcess(row){
145
-      this.$router.push({ path: '/flowable/task/todo/detail/index',
146
-        query: {
147
-          procInsId: row.procInsId,
148
-          executionId: row.executionId,
149
-          deployId: row.deployId,
150
-          taskId: row.taskId,
151
-          taskName: row.taskName,
152
-          startUser: row.startUserName + '-' + row.startDeptName,
153
-        }})
120
+    handleProcess(row) {
121
+      getProcessVariables(row.taskId).then(res => {
122
+        console.log(res);
123
+        this.$router.push({
124
+          path: '/flowable/task/todo/detail/index',
125
+          query: {
126
+            procInsId: row.procInsId,
127
+            executionId: row.executionId,
128
+            deployId: row.deployId,
129
+            taskId: row.taskId,
130
+            taskName: row.taskName,
131
+            startUser: row.startUserName + '-' + row.startDeptName,
132
+            formId: res.data.formId
133
+          }
134
+        })
135
+      })
136
+
154 137
     },
155 138
     // 取消按钮
156 139
     cancel() {
@@ -200,7 +183,7 @@ export default {
200 183
         return delDeployment(ids);
201 184
       }).then(() => {
202 185
         this.getList();
203
-       this.$modal.msgSuccess("删除成功");
186
+        this.$modal.msgSuccess("删除成功");
204 187
       })
205 188
     },
206 189
   }

Loading…
Cancel
Save