cloud-module-bpm 6.13.2 → 6.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/cloud-module-bpm.common.js +3965 -1347
  2. package/dist/cloud-module-bpm.common.js.map +1 -1
  3. package/dist/cloud-module-bpm.css +1 -1
  4. package/dist/cloud-module-bpm.umd.js +3965 -1347
  5. package/dist/cloud-module-bpm.umd.js.map +1 -1
  6. package/dist/cloud-module-bpm.umd.min.js +6 -6
  7. package/dist/cloud-module-bpm.umd.min.js.map +1 -1
  8. package/package.json +5 -2
  9. package/packages/bpm-back-anylink-dialog/Tree.vue +222 -0
  10. package/packages/bpm-back-anylink-dialog/bpm-back-anylink-dialog.vue +466 -213
  11. package/packages/bpm-form-tools/bpm-form-tools.vue +33 -10
  12. package/packages/bpm-jump-dialog/Tree.vue +222 -0
  13. package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +425 -161
  14. package/packages/bpm-jump-latest-dialog/Tree.vue +180 -41
  15. package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +200 -30
  16. package/packages/bpm-opinion-dialog/bpm-opinion.vue +105 -44
  17. package/packages/bpm-send-read-dialog/SelectedGrid.vue +1 -1
  18. package/packages/bpm-send-read-dialog/SourceGrid.vue +90 -102
  19. package/packages/bpm-send-read-dialog/Tree.vue +145 -24
  20. package/packages/bpm-send-read-dialog/bpm-next-node.vue +3 -3
  21. package/packages/bpm-send-read-opinion-dialog/bpm-send-read-opinion.vue +35 -34
  22. package/packages/bpm-sign-dialog/SelectedGrid.vue +2 -2
  23. package/packages/bpm-sign-dialog/SourceGrid.vue +96 -113
  24. package/packages/bpm-sign-dialog/Tree.vue +125 -87
  25. package/packages/bpm-sign-dialog/bpm-next-node.vue +11 -8
  26. package/packages/bpm-user-select-dialog/SourceGrid.vue +127 -51
  27. package/packages/bpm-user-select-dialog/Tree.vue +151 -61
  28. package/packages/bpm-user-select-dialog/bpm-next-node.vue +17 -5
  29. package/packages/i18n/langs/zh_CN.js +6 -6
  30. package/packages/utils/merit-bpm.js +121 -8
@@ -3,172 +3,217 @@
3
3
  <el-dialog
4
4
  :title="opt.title"
5
5
  :visible.sync="dialogVisible"
6
- width="650px"
7
- top="8vh"
6
+ width="900px"
7
+ top="2vh"
8
8
  @open="openDialog"
9
9
  :before-close="handleClose"
10
10
  :close-on-click-modal="false"
11
11
  append-to-body
12
- custom-class="bpmjump"
12
+ class="jumpDialog"
13
13
  >
14
- <el-form>
15
- <div style="padding: 10px 0px 30px 0px">
16
- <el-row>
17
- <el-col
18
- :span="9"
19
- style="padding-right:125px"
20
- >
21
- {{ $t('bpm.back_anyLink.choice_activity') }}
22
- </el-col>
23
- </el-row>
24
- <el-row
25
- type="flex"
26
- justify="center"
27
- >
28
- <span style="padding-right:5px;line-height:2;">
29
- {{ $t('bpm.back_anyLink.activity_name') }}
30
- </span>
14
+ <el-container>
15
+ <el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background: #e8ecf3">
16
+ <el-container>
17
+ <el-aside style="height:456px;width: 35%;max-width: 400px;margin:0px;border-radius: 0px;">
18
+ <v-tree
19
+ :opt="nextNode"
20
+ @refreshGrid="treeClickData"
21
+ />
22
+ </el-aside>
23
+ <!-- 待选择人员列表 -->
24
+ <el-main style="height:456px; width: 45%; padding: 0px; margin-left: 2px;">
25
+ <div class="selected-grid">
26
+ <!-- <el-row>
27
+ <el-col style="text-align: left;padding: 7px 7px 0 7px">
28
+ {{ $t('bpm.jump.choice_activity') }}
29
+ </el-col>
30
+ </el-row> -->
31
+ <el-row>
32
+ <el-col
33
+ :span="7"
34
+ style="float: left;padding-right: 40px;margin-top: 5px;padding-left: 7px;"
35
+ >{{ $t('bpm.jump.activity_name') }}</el-col>
31
36
 
32
- <el-select
33
- style="width:200px"
34
- @change="handleChange"
35
- v-model="value"
36
- :placeholder="$t('bpm.back_anyLink.please_select')"
37
- >
38
- <el-option
39
- v-for="item in options"
40
- :key="item.value"
41
- :label="item.label"
42
- :value="item.value"
43
- :title="item.label"
44
- >
45
- </el-option>
46
- </el-select>
47
- </el-row>
48
- </div>
49
- <div>
50
- <el-row>
51
- <el-col
52
- :span="9"
53
- style="padding-right:125px"
54
- >{{
55
- $t('bpm.back_anyLink.for_personnel')
56
- }}</el-col>
57
- </el-row>
58
- <el-table
59
- :data="initialTableData"
60
- tooltip-effect="dark"
61
- stripe
62
- height="150"
63
- @select="handleSelect"
64
- @select-all="handleSelectAll"
65
- ref="eltableCurrentRow"
66
- >
67
- <el-table-column
68
- type="selection"
69
- width="55"
70
- > </el-table-column>
71
- <el-table-column
72
- prop="name"
73
- :label="$t('bpm.back_anyLink.name')"
74
- >
75
- <template slot-scope="scope">
76
- <div
77
- :title="scope.row.name"
78
- class="cell-hidden"
79
- >
80
- {{ scope.row.name }}
81
- </div>
82
- </template>
83
- </el-table-column>
84
- <el-table-column
85
- prop="code"
86
- :label="$t('bpm.back_anyLink.coding')"
87
- >
88
- <template slot-scope="scope">
89
- <div
90
- :title="scope.row.code"
91
- class="cell-hidden"
92
- >
93
- {{ scope.row.code }}
94
- </div>
95
- </template>
96
- </el-table-column>
97
- <el-table-column
98
- prop="deptName"
99
- :label="$t('bpm.back_anyLink.department')"
100
- >
101
- <template slot-scope="scope">
102
- <div
103
- :title="scope.row.deptName"
104
- class="cell-hidden"
105
- >
106
- {{ scope.row.deptName }}
107
- </div>
108
- </template>
109
- </el-table-column>
110
- </el-table>
111
- </div>
112
- <div style="padding: 20px 0px 0px 0px">
113
- <el-row>
114
- <el-col
115
- :span="9"
116
- style="padding-right:125px"
117
- >{{
118
- $t('bpm.back_anyLink.selected_personnel_list')
119
- }}</el-col>
120
- </el-row>
121
- <el-table
122
- :data="selectTableData"
123
- tooltip-effect="dark"
124
- stripe
125
- height="150"
126
- @row-click="handleRowClick"
127
- >
128
- <el-table-column width="55"></el-table-column>
129
- <el-table-column
130
- prop="name"
131
- :label="$t('bpm.back_anyLink.name')"
132
- >
133
- <template slot-scope="scope">
134
- <div
135
- :title="scope.row.name"
136
- class="cell-hidden"
37
+ <el-col
38
+ :span="17"
39
+ style="float:right;"
40
+ >
41
+ <el-select
42
+ style="width:225px"
43
+ @change="handleChange"
44
+ v-model="value"
45
+ :placeholder="$t('bpm.jump.please_select')"
46
+ >
47
+ <el-option
48
+ v-for="item in options"
49
+ :key="item.value"
50
+ :label="item.label"
51
+ :value="item.value"
52
+ :title="item.label"
53
+ >
54
+ </el-option>
55
+ </el-select>
56
+ </el-col>
57
+ </el-row>
58
+ <el-row
59
+ justify="space-between"
60
+ style="padding: 5px;"
137
61
  >
138
- {{ scope.row.name }}
139
- </div>
140
- </template>
141
- </el-table-column>
142
- <el-table-column
143
- prop="code"
144
- :label="$t('bpm.back_anyLink.coding')"
145
- >
146
- <template slot-scope="scope">
147
- <div
148
- :title="scope.row.code"
149
- class="cell-hidden"
62
+ <el-col
63
+ :span="7"
64
+ style="float: left;padding-right: 40px;margin-top: 5px;padding-left: 2px;"
65
+ >{{ $t('base.list_alternatives') }}</el-col>
66
+ <el-col
67
+ :span="17"
68
+ style="float:right;"
69
+ >
70
+ <el-input
71
+ placeholder="请输入姓名或编码"
72
+ v-model="searchName"
73
+ clearable
74
+ @clear="restart"
75
+ @change="searchClickData"
76
+ >
77
+ <el-button
78
+ class="el-icon-search-button"
79
+ slot="append"
80
+ icon="el-icon-search"
81
+ @click="searchClickData"
82
+ ></el-button>
83
+ </el-input>
84
+ </el-col>
85
+ </el-row>
86
+
87
+ <el-table
88
+ :data="initialTableData"
89
+ :height="tableHeight"
90
+ @select="handleSelect"
91
+ ref="eltableCurrentRow"
92
+ @select-all="handleSelectAll"
150
93
  >
151
- {{ scope.row.code }}
152
- </div>
153
- </template>
154
- </el-table-column>
155
- <el-table-column
156
- prop="deptName"
157
- :label="$t('bpm.back_anyLink.department')"
94
+ <el-table-column type="selection"> </el-table-column>
95
+ <el-table-column
96
+ prop="name"
97
+ :label="$t('bpm.jump.name')"
98
+ >
99
+ <template slot-scope="scope">
100
+ <div
101
+ :title="scope.row.name"
102
+ class="cell-hidden"
103
+ >
104
+ {{ scope.row.name }}
105
+ </div>
106
+ </template>
107
+ </el-table-column>
108
+ <el-table-column
109
+ prop="code"
110
+ :label="$t('bpm.jump.coding')"
111
+ >
112
+ <template slot-scope="scope">
113
+ <div
114
+ :title="scope.row.code"
115
+ class="cell-hidden"
116
+ >
117
+ {{ scope.row.code }}
118
+ </div>
119
+ </template>
120
+ </el-table-column>
121
+ <el-table-column
122
+ prop="deptName"
123
+ :label="$t('bpm.jump.department')"
124
+ >
125
+ <template slot-scope="scope">
126
+ <div
127
+ :title="scope.row.deptName"
128
+ class="cell-hidden"
129
+ >
130
+ {{ scope.row.deptName }}
131
+ </div>
132
+ </template>
133
+ </el-table-column>
134
+ </el-table>
135
+ <!--tree分页-->
136
+ <el-pagination
137
+ v-if="isShowPagination"
138
+ class="SourceGrid"
139
+ @size-change="handleSizeChange"
140
+ @current-change="handleCurrentChange"
141
+ :current-page="currentPage"
142
+ :page-size="pageSize"
143
+ layout="total, prev, pager, next"
144
+ :total="total"
145
+ :pager-count="pagerCount"
146
+ ></el-pagination>
147
+ <!--下拉框分页-->
148
+ <el-pagination
149
+ v-if="isShowPagination == false"
150
+ class="SourceGrid"
151
+ @size-change="elSelectHandleSizeChange"
152
+ @current-change="elSelectHandleCurrentChange"
153
+ :current-page="currentPage"
154
+ :page-size="pageSize"
155
+ layout="total, prev, pager, next"
156
+ :total="total"
157
+ :pager-count="pagerCount"
158
+ ></el-pagination>
159
+ </div>
160
+ </el-main>
161
+ </el-container>
162
+ </el-aside>
163
+ <!-- 已选择人员列表-->
164
+ <el-main style="height: 456px; padding: 0px; width: 35%; margin-left: 10px;">
165
+ <div>
166
+ <el-row style="float:left;padding:7px;">
167
+ {{ $t('bpm.jump.selected_personnel_list') }}
168
+ </el-row>
169
+ <el-table
170
+ :data="selectTableData"
171
+ :height="tableHeight + 85"
172
+ @row-click="handleRowClick"
158
173
  >
159
- <template slot-scope="scope">
160
- <div
161
- :title="scope.row.deptName"
162
- class="cell-hidden"
163
- >
164
- {{ scope.row.deptName }}
165
- </div>
166
- </template>
167
- </el-table-column>
168
- </el-table>
169
- </div>
170
- </el-form>
171
-
174
+ <el-table-column
175
+ prop="name"
176
+ :label="$t('bpm.jump.name')"
177
+ >
178
+ <template slot-scope="scope">
179
+ <div
180
+ :title="scope.row.name"
181
+ class="cell-hidden"
182
+ >
183
+ {{ scope.row.name }}
184
+ </div>
185
+ </template>
186
+ </el-table-column>
187
+ <el-table-column
188
+ prop="code"
189
+ :label="$t('bpm.jump.coding')"
190
+ >
191
+ <template slot-scope="scope">
192
+ <div
193
+ :title="scope.row.code"
194
+ class="cell-hidden"
195
+ >
196
+ {{ scope.row.code }}
197
+ </div>
198
+ </template>
199
+ </el-table-column>
200
+ <el-table-column
201
+ prop="deptName"
202
+ :label="$t('bpm.jump.department')"
203
+ >
204
+ <template slot-scope="scope">
205
+ <div
206
+ :title="scope.row.deptName"
207
+ class="cell-hidden"
208
+ >
209
+ {{ scope.row.deptName }}
210
+ </div>
211
+ </template>
212
+ </el-table-column>
213
+ </el-table>
214
+ </div>
215
+ </el-main>
216
+ </el-container>
172
217
  <span
173
218
  slot="footer"
174
219
  class="dialog-footer"
@@ -202,6 +247,7 @@ import {
202
247
  TabPane
203
248
  } from 'element-ui';
204
249
  import axios from 'cloud-module-base/packages/httpConfig/http';
250
+ import tree from './Tree';
205
251
  export default {
206
252
  name: 'bpm-back-anylink',
207
253
  components: {
@@ -216,7 +262,8 @@ export default {
216
262
  'el-row': Row,
217
263
  'el-input': Input,
218
264
  'el-tabs': Tabs,
219
- 'el-tab-pane': TabPane
265
+ 'el-tab-pane': TabPane,
266
+ 'v-tree': tree
220
267
  },
221
268
  //父组件传过来的数据属性
222
269
  props: {
@@ -229,44 +276,115 @@ export default {
229
276
  required: true
230
277
  }
231
278
  },
279
+ watch: {
280
+ ruleEngine: {
281
+ deep: true,
282
+ handler: function (newVal, old) {
283
+ if (newVal && newVal.runtime && newVal.runtime.nextNodes && newVal.runtime.nextNodes.length > 0) {
284
+
285
+
286
+ let nextNodeWatch = newVal.runtime.nextNodes[0];
287
+ this.total = nextNodeWatch.bpmUsers.length;
288
+ // this.sourceAllData = nextNodeWatch.bpmUsers || [];
289
+ // this.empTableData = this.sourceAllData.slice(
290
+ // this.pageSize * (this.currentPage - 1),
291
+ // this.pageSize * this.currentPage
292
+ // );
293
+ this.receiverIds = [];
294
+ nextNodeWatch.bpmUsers.forEach(bpmUser => {
295
+ var obj = {};
296
+ obj.name = bpmUser.name;
297
+ obj.code = bpmUser.code;
298
+ obj.deptName = bpmUser.deptName;
299
+ this.initialTableData.push(obj);
300
+ this.receiverIds.push(bpmUser.code);
301
+ });
302
+ }
303
+ }
304
+ }
305
+ },
232
306
  data () {
233
307
  return {
308
+ currentRuleEngine: {},
309
+ currentPage: 1,
310
+ pageSize: 10,
311
+ pagerCount: 5,
312
+ total: 10,
313
+ tableHeight: 300,
314
+ maxHeight: '483px',
315
+ searchName: '',
316
+ empUrl: '/api/identity/bpm-user/list-by-deptcode', //人员数据接口
234
317
  //默认参数
235
318
  opt: {
236
319
  title: this.$t('bpm.back_anyLink.dialog_title')
237
320
  },
238
- //流程key
239
- toTaskDefKey: '',
321
+ //业务id 3f28804f736ee91401736eec34950000
322
+ businessId: '',
323
+ procInstId: '',
240
324
  //初始值
241
325
  initialTableData: [],
242
326
  //选中的值
243
327
  selectTableData: [],
244
- //节点相关数据(节点,待选人员,节点审批方式)
245
- resultData: {},
328
+ receiverIds: [],
246
329
  //下拉框
247
330
  options: [],
248
- //下拉框初始值
249
331
  value: '',
250
- //节点批准类型
251
- approveType: ''
332
+ isShowPagination: false,
333
+ treeNode: {},
334
+ //流程key
335
+ toTaskDefKey: '',
336
+ //批准类型
337
+ approveType: '',
338
+ nextNode: {}
252
339
  };
253
340
  },
254
- created () { },
341
+ created () {
342
+ // this.tableHeight = window.outerHeight > 900 ? 386 : 256;
343
+ },
255
344
  methods: {
345
+ //============tree分页===========
346
+ //每页显示数据个数变化时调用
347
+ handleSizeChange (val) {
348
+ this.pageSize = val;
349
+ this.searchClickData();
350
+ },
351
+ //页码变化时调用
352
+ handleCurrentChange (val) {
353
+ this.currentPage = val;
354
+ this.searchClickData();
355
+ },
356
+
357
+ //============下拉框分页===========
358
+ //每页显示数据个数变化时调用
359
+ elSelectHandleSizeChange (val) {
360
+ this.pageSize = val;
361
+ },
362
+ //页码变化时调用
363
+ elSelectHandleCurrentChange (val) {
364
+ this.currentPage = val;
365
+ this.resultDataChange();
366
+ },
367
+ resultDataChange () {
368
+ if (this.initialTableData) {
369
+ var result = this.initialTableData.slice(
370
+ this.pageSize * (this.currentPage - 1),
371
+ this.pageSize * this.currentPage
372
+ );
373
+ this.initialTableData = result;
374
+ } else {
375
+ this.initialTableData = [];
376
+ }
377
+ },
378
+
256
379
  handleRowClick (row, event, column) {
257
380
  this.removeData(this.selectTableData, row);
258
381
  },
382
+
259
383
  ////取消已选中的
260
- removeData (userData, row) {
261
- //取消已选中的人员
262
- var index = -1;
263
- for (var i = 0; i < userData.length; i++) {
264
- if (userData[i].code == row.code) {
265
- index = i;
266
- }
267
- }
384
+ removeData (selectTableData, row) {
385
+ let index = this.indexOfselectTableData(row);
268
386
  if (index != -1) {
269
- userData.splice(index, 1);
387
+ selectTableData.splice(index, 1);
270
388
  }
271
389
  //更新待选的人员
272
390
  for (var i = 0; i < this.initialTableData.length; i++) {
@@ -278,11 +396,46 @@ export default {
278
396
  }
279
397
  }
280
398
  },
399
+ //是选中还是取消
400
+ selectRow (select, row) {
401
+ return select.some(element => {
402
+ if (element.code == row.code) {
403
+ return true;
404
+ }
405
+ });
406
+ },
407
+ // 是否已选中该条数据
408
+ indexOfselectTableData (row) {
409
+ var index = -1;
410
+ var _this = this;
411
+ if (_this.selectTableData.length > 0) {
412
+ for (var i = 0; i < _this.selectTableData.length; i++) {
413
+ if (_this.selectTableData[i].code == row.code) {
414
+ index = i;
415
+ return index;
416
+ }
417
+ }
418
+ }
419
+ return index;
420
+ },
281
421
 
282
- //全部取消或者删除
422
+ // 是否已选中该条数据
423
+ indexOfselectTableData2 () {
424
+ _this.initialTableData.forEach(element => {
425
+ var index = _this.indexOfselectTableData(element);
426
+ if (index != -1) {
427
+ _this.selectTableData.splice(index, 1);
428
+ }
429
+ });
430
+ },
431
+
432
+ //全选或者全取消
283
433
  handleSelectAll (select) {
284
434
  var _this = this;
285
- if ('onlyApprove' == _this.approveType) {
435
+ if (
436
+ 'onlyApprove' ==
437
+ _this.currentRuleEngine.runtime.nextNodes[0].approve.type
438
+ ) {
286
439
  this.selectTableData = [];
287
440
  this.$refs.eltableCurrentRow.clearSelection();
288
441
  } else {
@@ -304,11 +457,12 @@ export default {
304
457
  }
305
458
  }
306
459
  },
460
+
307
461
  handleSelect (select, row) {
308
462
  var _this = this;
309
-
310
463
  // 单人审批 只能选择一个
311
- if ('onlyApprove' == _this.approveType) {
464
+ if ('onlyApprove' == _this.approveType)
465
+ {
312
466
  // 清楚数据
313
467
  _this.selectTableData = [];
314
468
  _this.$refs.eltableCurrentRow.clearSelection();
@@ -331,28 +485,6 @@ export default {
331
485
  }
332
486
  }
333
487
  },
334
- //是选中还是取消
335
- selectRow (select, row) {
336
- return select.some(element => {
337
- if (element.code == row.code) {
338
- return true;
339
- }
340
- });
341
- },
342
- // 是否已选中该条数据
343
- indexOfselectTableData (row) {
344
- var index = -1;
345
- var _this = this;
346
- if (_this.selectTableData.length > 0) {
347
- for (var i = 0; i < _this.selectTableData.length; i++) {
348
- if (_this.selectTableData[i].code == row.code) {
349
- index = i;
350
- return index;
351
- }
352
- }
353
- }
354
- return index;
355
- },
356
488
  //下拉框change事件
357
489
  handleChange (val) {
358
490
  // var = 选中的label
@@ -360,26 +492,64 @@ export default {
360
492
  _this.selectTableData = [];
361
493
  _this.toTaskDefKey = val;
362
494
  _this.initialTableData = [];
363
- if (_this.resultData[val] != null) {
364
- _this.resultData[val].forEach(element => {
365
- var obj = {};
366
- obj.name = element.name;
367
- obj.code = element.code;
368
- obj.deptName = element.deptName;
369
- _this.initialTableData.push(obj);
370
- });
371
- // 获取每个节点的审批方式
372
- _this.approveType = _this.resultData.approveName[val];
373
- }
495
+ _this.ruleEngine['bpmIsLatest'] = false;
496
+ // 为了解决入参过多的问题
497
+ let temRuleEngine = JSON.parse(JSON.stringify(_this.ruleEngine));
498
+ if (temRuleEngine.runtime) {
499
+ temRuleEngine.runtime = {};
500
+ }
501
+ if (temRuleEngine.opinion) {
502
+ temRuleEngine.opinion = {};
503
+ }
504
+ if (temRuleEngine.actors) {
505
+ temRuleEngine.actors = {};
506
+ }
507
+ axios['bpm-engine']
508
+ .post(
509
+ '/api/engine/bpm/query/jump/candidate/' +
510
+ _this.businessId +
511
+ '/' +
512
+ _this.toTaskDefKey,
513
+ temRuleEngine
514
+ )
515
+ .then(function (res) {
516
+ _this.nextNode = res.data.runtime.nextNodes[0];
517
+ _this.receiverIds = [];
518
+ if (res.data.runtime.nextNodes[0].bpmUsers.length > 0) {
519
+ res.data.runtime.nextNodes[0].bpmUsers.forEach(element => {
520
+ var obj = {};
521
+ obj.name = element.name;
522
+ obj.code = element.code;
523
+ obj.deptName = element.deptName;
524
+ _this.receiverIds.push(element.code);
525
+ // _this.initialTableData.push(obj);
526
+ });
527
+ //_this.total = _this.initialTableData.length;
528
+ _this.approveType = res.data.approve.type;
529
+ }
530
+
531
+ _this.currentRuleEngine = res.data;
532
+ _this.isShowPagination = false;
533
+ })
534
+ .catch(function (err) {
535
+ console.log(err);
536
+ });
537
+
538
+
374
539
  },
375
540
  openDialog () {
376
541
  var _this = this;
377
542
  _this.procInstId = _this.ruleEngine.runtime.mainForm.procInstId;
543
+ _this.businessId = _this.ruleEngine.runtime.mainForm.businessId;
378
544
  _this.requestData();
545
+ _this.selectTableData = [];
546
+
379
547
  },
380
548
  //关闭对话框
381
549
  handleClose () {
382
550
  this.options = [];
551
+ this.searchName = '';
552
+ this.treeNode = {};
383
553
  this.$emit('dialog-close', this.dialogVisible);
384
554
  },
385
555
  requestData () {
@@ -406,7 +576,10 @@ export default {
406
576
  console.log(err);
407
577
  });
408
578
  },
579
+ //保存
409
580
  handleSave () {
581
+
582
+
410
583
  var _this = this;
411
584
  if (_this.selectTableData.length == 0) {
412
585
  _this.$message.warning(
@@ -422,8 +595,88 @@ export default {
422
595
  _this.ruleEngine['resultToTaskDefKey'] = _this.toTaskDefKey;
423
596
  _this.$emit('dialog-save', _this.ruleEngine);
424
597
  _this.options = [];
598
+ },
599
+ restart () {
600
+
601
+ handleChange(this.value);
602
+ },
603
+ treeClickData (treeNode) {
604
+ if (treeNode) {
605
+ this.treeNode = treeNode;
606
+ }
607
+ let _this = this;
608
+ let param = {
609
+ page: this.currentPage,
610
+ rows: this.pageSize,
611
+ deptCode: this.treeNode.code ? this.treeNode.code : this.treeNode.deptCode,
612
+ search: this.searchName,
613
+ userNames: this.receiverIds.join(',')
614
+ };
615
+ axios['bpm-engine']
616
+ .post(this.empUrl, param)
617
+ .then(function (res) {
618
+ if (res.success) {
619
+ _this.initialTableData = [];
620
+ res.data.rows.forEach(arr => {
621
+
622
+ var obj = {};
623
+ obj.name = arr.name;
624
+ obj.code = arr.code;
625
+ obj.deptName = arr.deptName;
626
+ _this.initialTableData.push(obj);
627
+ });
628
+ // _this.empTableData = res.data.rows;
629
+ _this.total = res.data.total;
630
+ _this.isShowPagination = true;
631
+ //必须等列表重新渲染完毕,才能执行此方法。
632
+
633
+ }
634
+ _this.loading = false;
635
+ })
636
+ .catch(function (err) {
637
+ console.log(err);
638
+ });
639
+
640
+ },
641
+ searchClickData () {
642
+
643
+ let _this = this;
644
+ let param = {
645
+ page: this.currentPage,
646
+ rows: this.pageSize,
647
+ deptCode: this.treeNode.code ? this.treeNode.code : this.treeNode.deptCode,
648
+ search: this.searchName,
649
+ userNames: this.receiverIds.join(',')
650
+ };
651
+ axios['bpm-engine']
652
+ .post(this.empUrl, param)
653
+ .then(function (res) {
654
+ if (res.success) {
655
+ _this.initialTableData = [];
656
+ res.data.rows.forEach(arr => {
657
+
658
+ var obj = {};
659
+ obj.name = arr.name;
660
+ obj.code = arr.code;
661
+ obj.deptName = arr.deptName;
662
+ _this.initialTableData.push(obj);
663
+ });
664
+ // _this.empTableData = res.data.rows;
665
+ _this.total = res.data.total;
666
+ _this.isShowPagination = true;
667
+ //必须等列表重新渲染完毕,才能执行此方法。
668
+
669
+ }
670
+ _this.loading = false;
671
+ })
672
+ .catch(function (err) {
673
+ console.log(err);
674
+ });
425
675
  }
426
676
  },
427
- mounted () { }
677
+
678
+ mounted () {
679
+ }
428
680
  };
429
681
  </script>
682
+ <style></style>