cloud-module-bpm 6.4.7 → 6.4.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-module-bpm",
3
- "version": "6.4.7",
3
+ "version": "6.4.8",
4
4
  "description": " bpm base lib",
5
5
  "main": "dist/cloud-module-bpm.umd.min.js",
6
6
  "author": "wujx",
@@ -18,22 +18,25 @@
18
18
  {{ $t('bpm.jump.choice_activity') }}
19
19
  </el-col>
20
20
  <el-col :span="16">
21
- <span style="padding-right:5px;line-height:2.5;">
22
- {{ $t('bpm.jump.activity_name') }}
23
- </span>
24
- <el-select style="width:200px" @change="handleChange" v-model="value" :placeholder="$t('bpm.jump.please_select')">
25
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
21
+ <span style="padding-right:5px;line-height:2.5;">
22
+ {{ $t('bpm.jump.activity_name') }}
23
+ </span>
24
+ <el-select
25
+ style="width:200px"
26
+ @change="handleChange"
27
+ v-model="value"
28
+ :placeholder="$t('bpm.jump.please_select')"
29
+ >
30
+ <el-option
31
+ v-for="item in options"
32
+ :key="item.value"
33
+ :label="item.label"
34
+ :value="item.value"
35
+ >
36
+ </el-option>
26
37
  </el-select>
27
38
  </el-col>
28
39
  </el-row>
29
- <!--<el-row type="flex" justify="center">-->
30
- <!--<span style="padding-right:5px;line-height:2.5;">-->
31
- <!--{{ $t('bpm.jump.activity_name') }}-->
32
- <!--</span>-->
33
- <!--<el-select style="width:200px" @change="handleChange" v-model="value" :placeholder="$t('bpm.jump.please_select')">-->
34
- <!--<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>-->
35
- <!--</el-select>-->
36
- <!--</el-row>-->
37
40
  </div>
38
41
  <div>
39
42
  <el-row style="text-align: left">
@@ -49,44 +52,73 @@
49
52
  ref="eltableCurrentRow"
50
53
  >
51
54
  <el-table-column type="selection" width="55"> </el-table-column>
52
- <el-table-column prop="name" :label="$t('bpm.jump.name')"> </el-table-column>
53
- <el-table-column prop="code" :label="$t('bpm.jump.coding')"> </el-table-column>
54
- <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
55
+ <el-table-column prop="name" :label="$t('bpm.jump.name')">
56
+ </el-table-column>
57
+ <el-table-column prop="code" :label="$t('bpm.jump.coding')">
58
+ </el-table-column>
59
+ <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
55
60
  <template slot-scope="scope">
56
- <div :title="scope.row.deptName" class="cell-hidden">
57
- {{ scope.row.deptName }}
58
- </div>
59
- </template>
61
+ <div :title="scope.row.deptName" class="cell-hidden">
62
+ {{ scope.row.deptName }}
63
+ </div>
64
+ </template>
60
65
  </el-table-column>
61
66
  </el-table>
62
67
  </div>
63
68
  <div style="padding: 20px 0px 0px 0px">
64
69
  <el-row style="text-align: left">
65
- <el-col :span="8">{{ $t('bpm.jump.selected_personnel_list') }}</el-col>
70
+ <el-col :span="8">{{
71
+ $t('bpm.jump.selected_personnel_list')
72
+ }}</el-col>
66
73
  </el-row>
67
- <el-table :data="selectTableData" tooltip-effect="dark" stripe height="150" @row-click="handleRowClick">
74
+ <el-table
75
+ :data="selectTableData"
76
+ tooltip-effect="dark"
77
+ stripe
78
+ height="150"
79
+ @row-click="handleRowClick"
80
+ >
68
81
  <el-table-column width="55"></el-table-column>
69
- <el-table-column prop="name" :label="$t('bpm.jump.name')"> </el-table-column>
70
- <el-table-column prop="code" :label="$t('bpm.jump.coding')"> </el-table-column>
71
- <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
82
+ <el-table-column prop="name" :label="$t('bpm.jump.name')">
83
+ </el-table-column>
84
+ <el-table-column prop="code" :label="$t('bpm.jump.coding')">
85
+ </el-table-column>
86
+ <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
72
87
  <template slot-scope="scope">
73
- <div :title="scope.row.deptName" class="cell-hidden">
74
- {{ scope.row.deptName }}
75
- </div>
76
- </template>
88
+ <div :title="scope.row.deptName" class="cell-hidden">
89
+ {{ scope.row.deptName }}
90
+ </div>
91
+ </template>
77
92
  </el-table-column>
78
93
  </el-table>
79
94
  </div>
80
95
  </el-form>
81
96
  <span slot="footer" class="dialog-footer">
82
- <el-button @click="handleClose">{{ $t('base.button.cancel') }}</el-button>
83
- <el-button type="primary" @click="handleSave">{{ $t('base.button.ok') }}</el-button>
97
+ <el-button @click="handleClose">{{
98
+ $t('base.button.cancel')
99
+ }}</el-button>
100
+ <el-button type="primary" @click="handleSave">{{
101
+ $t('base.button.ok')
102
+ }}</el-button>
84
103
  </span>
85
104
  </el-dialog>
86
105
  </div>
87
106
  </template>
88
107
  <script>
89
- import { Dialog, Aside, Main, Container, Button, Form, FormItem, Col, Row, Input, Tabs, TabPane } from 'element-ui';
108
+ import {
109
+ Dialog,
110
+ Aside,
111
+ Main,
112
+ Container,
113
+ Button,
114
+ Form,
115
+ FormItem,
116
+ Col,
117
+ Row,
118
+ Input,
119
+ Tabs,
120
+ TabPane
121
+ } from 'element-ui';
90
122
  import axios from 'cloud-module-base/packages/httpConfig/http';
91
123
  export default {
92
124
  name: 'bpm-jump',
@@ -158,7 +190,10 @@ export default {
158
190
  //更新待选的人员
159
191
  for (var i = 0; i < this.initialTableData.length; i++) {
160
192
  if (this.initialTableData[i].code == row.code) {
161
- this.$refs.eltableCurrentRow.toggleRowSelection(this.initialTableData[i], false);
193
+ this.$refs.eltableCurrentRow.toggleRowSelection(
194
+ this.initialTableData[i],
195
+ false
196
+ );
162
197
  }
163
198
  }
164
199
  },
@@ -166,7 +201,10 @@ export default {
166
201
  //全部取消或者删除
167
202
  handleSelectAll(select) {
168
203
  var _this = this;
169
- if ('onlyApprove' == _this.currentRuleEngine.runtime.nextNodes[0].approve.type) {
204
+ if (
205
+ 'onlyApprove' ==
206
+ _this.currentRuleEngine.runtime.nextNodes[0].approve.type
207
+ ) {
170
208
  this.selectTableData = [];
171
209
  this.$refs.eltableCurrentRow.clearSelection();
172
210
  } else {
@@ -192,7 +230,10 @@ export default {
192
230
  var _this = this;
193
231
 
194
232
  // 单人审批 只能选择一个
195
- if ('onlyApprove' == _this.currentRuleEngine.runtime.nextNodes[0].approve.type) {
233
+ if (
234
+ 'onlyApprove' ==
235
+ _this.currentRuleEngine.runtime.nextNodes[0].approve.type
236
+ ) {
196
237
  // 清楚数据
197
238
  _this.selectTableData = [];
198
239
  _this.$refs.eltableCurrentRow.clearSelection();
@@ -245,8 +286,22 @@ export default {
245
286
  _this.toTaskDefKey = val;
246
287
  _this.initialTableData = [];
247
288
  _this.ruleEngine['bpmIsLatest'] = false;
289
+ // 为了解决入参过多的问题
290
+ let temRuleEngine = JSON.parse(JSON.stringify(_this.ruleEngine));
291
+ if (temRuleEngine.runtime) {
292
+ temRuleEngine.runtime = {};
293
+ }
294
+ if (temRuleEngine.opinion) {
295
+ temRuleEngine.opinion = {};
296
+ }
248
297
  axios['bpm-engine']
249
- .post('/api/engine/bpm/query/jump/candidate/' + _this.businessId + '/' + _this.toTaskDefKey, _this.ruleEngine)
298
+ .post(
299
+ '/api/engine/bpm/query/jump/candidate/' +
300
+ _this.businessId +
301
+ '/' +
302
+ _this.toTaskDefKey,
303
+ temRuleEngine
304
+ )
250
305
  .then(function(res) {
251
306
  if (res.data.runtime.nextNodes[0].bpmUsers.length > 0) {
252
307
  res.data.runtime.nextNodes[0].bpmUsers.forEach(element => {
@@ -307,7 +362,9 @@ export default {
307
362
  codes.push(element.code);
308
363
  });
309
364
 
310
- _this.ruleEngine[_this.toTaskDefKey + '_' + _this.approveType] = codes.join(',');
365
+ _this.ruleEngine[
366
+ _this.toTaskDefKey + '_' + _this.approveType
367
+ ] = codes.join(',');
311
368
  _this.ruleEngine.toTaskDefKey = _this.toTaskDefKey;
312
369
  _this.$emit('dialog-save', _this.ruleEngine);
313
370
  _this.options = [];
@@ -12,13 +12,19 @@
12
12
  class="jumpDialog"
13
13
  >
14
14
  <el-container>
15
- <el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background: #e8ecf3">
15
+ <el-aside
16
+ style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background: #e8ecf3"
17
+ >
16
18
  <el-container>
17
- <el-aside style="height:456px;width: 35%;max-width: 400px;padding-top:5px;margin:0px;border-radius: 0px;">
19
+ <el-aside
20
+ style="height:456px;width: 35%;max-width: 400px;padding-top:5px;margin:0px;border-radius: 0px;"
21
+ >
18
22
  <v-tree />
19
23
  </el-aside>
20
24
  <!-- 待选择人员列表 -->
21
- <el-main style="height:456px; width: 45%; padding: 0px; margin-left: 2px;">
25
+ <el-main
26
+ style="height:456px; width: 45%; padding: 0px; margin-left: 2px;"
27
+ >
22
28
  <div class="selected-grid">
23
29
  <el-row>
24
30
  <el-col style="text-align: left;padding: 7px 7px 0 7px">
@@ -28,13 +34,26 @@
28
34
  <el-row>
29
35
  <el-col align="center"
30
36
  >{{ $t('bpm.jump.activity_name') }}
31
- <el-select style="width:200px" @change="handleChange" v-model="value" :placeholder="$t('bpm.jump.please_select')">
32
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
37
+ <el-select
38
+ style="width:200px"
39
+ @change="handleChange"
40
+ v-model="value"
41
+ :placeholder="$t('bpm.jump.please_select')"
42
+ >
43
+ <el-option
44
+ v-for="item in options"
45
+ :key="item.value"
46
+ :label="item.label"
47
+ :value="item.value"
48
+ >
49
+ </el-option>
33
50
  </el-select>
34
51
  </el-col>
35
52
  </el-row>
36
53
  <el-row>
37
- <el-col style="text-align: left;padding: 7px 7px 0 7px">{{ $t('bpm.jump.for_personnel') }}</el-col>
54
+ <el-col style="text-align: left;padding: 7px 7px 0 7px">{{
55
+ $t('bpm.jump.for_personnel')
56
+ }}</el-col>
38
57
  </el-row>
39
58
  <el-table
40
59
  :data="initialTableData"
@@ -58,7 +77,10 @@
58
77
  </div>
59
78
  </template>
60
79
  </el-table-column>
61
- <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
80
+ <el-table-column
81
+ prop="deptName"
82
+ :label="$t('bpm.jump.department')"
83
+ >
62
84
  <template slot-scope="scope">
63
85
  <div :title="scope.row.deptName" class="cell-hidden">
64
86
  {{ scope.row.deptName }}
@@ -95,46 +117,72 @@
95
117
  </el-container>
96
118
  </el-aside>
97
119
  <!-- 已选择人员列表-->
98
- <el-main style="height: 456px; padding: 0px; width: 35%; margin-left: 10px;">
120
+ <el-main
121
+ style="height: 456px; padding: 0px; width: 35%; margin-left: 10px;"
122
+ >
99
123
  <div>
100
124
  <el-row style="float:left;padding:7px;">
101
125
  {{ $t('bpm.jump.selected_personnel_list') }}
102
126
  </el-row>
103
- <el-table :data="selectTableData" :height="tableHeight + 85" @row-click="handleRowClick">
104
- <el-table-column prop="name" :label="$t('bpm.jump.name')">
127
+ <el-table
128
+ :data="selectTableData"
129
+ :height="tableHeight + 85"
130
+ @row-click="handleRowClick"
131
+ >
132
+ <el-table-column prop="name" :label="$t('bpm.jump.name')">
105
133
  <template slot-scope="scope">
106
- <div :title="scope.row.name" class="cell-hidden">
107
- {{ scope.row.name }}
108
- </div>
109
- </template>
134
+ <div :title="scope.row.name" class="cell-hidden">
135
+ {{ scope.row.name }}
136
+ </div>
137
+ </template>
110
138
  </el-table-column>
111
- <el-table-column prop="code" :label="$t('bpm.jump.coding')">
112
- <template slot-scope="scope">
113
- <div :title="scope.row.code" class="cell-hidden">
114
- {{ scope.row.code }}
115
- </div>
116
- </template>
139
+ <el-table-column prop="code" :label="$t('bpm.jump.coding')">
140
+ <template slot-scope="scope">
141
+ <div :title="scope.row.code" class="cell-hidden">
142
+ {{ scope.row.code }}
143
+ </div>
144
+ </template>
117
145
  </el-table-column>
118
- <el-table-column prop="deptName" :label="$t('bpm.jump.department')">
119
- <template slot-scope="scope">
120
- <div :title="scope.row.deptName" class="cell-hidden">
121
- {{ scope.row.deptName }}
122
- </div>
123
- </template>
146
+ <el-table-column
147
+ prop="deptName"
148
+ :label="$t('bpm.jump.department')"
149
+ >
150
+ <template slot-scope="scope">
151
+ <div :title="scope.row.deptName" class="cell-hidden">
152
+ {{ scope.row.deptName }}
153
+ </div>
154
+ </template>
124
155
  </el-table-column>
125
156
  </el-table>
126
157
  </div>
127
158
  </el-main>
128
159
  </el-container>
129
160
  <span slot="footer" class="dialog-footer">
130
- <el-button @click="handleClose">{{ $t('base.button.cancel') }}</el-button>
131
- <el-button type="primary" @click="handleSave">{{ $t('base.button.ok') }}</el-button>
161
+ <el-button @click="handleClose">{{
162
+ $t('base.button.cancel')
163
+ }}</el-button>
164
+ <el-button type="primary" @click="handleSave">{{
165
+ $t('base.button.ok')
166
+ }}</el-button>
132
167
  </span>
133
168
  </el-dialog>
134
169
  </div>
135
170
  </template>
136
171
  <script>
137
- import { Dialog, Aside, Main, Container, Button, Form, FormItem, Col, Row, Input, Tabs, TabPane } from 'element-ui';
172
+ import {
173
+ Dialog,
174
+ Aside,
175
+ Main,
176
+ Container,
177
+ Button,
178
+ Form,
179
+ FormItem,
180
+ Col,
181
+ Row,
182
+ Input,
183
+ Tabs,
184
+ TabPane
185
+ } from 'element-ui';
138
186
  import axios from 'cloud-module-base/packages/httpConfig/http';
139
187
  import tree from './Tree';
140
188
  export default {
@@ -223,7 +271,10 @@ export default {
223
271
  },
224
272
  resultDataChange() {
225
273
  if (this.initialTableData) {
226
- var result = this.initialTableData.slice(this.pageSize * (this.currentPage - 1), this.pageSize * this.currentPage);
274
+ var result = this.initialTableData.slice(
275
+ this.pageSize * (this.currentPage - 1),
276
+ this.pageSize * this.currentPage
277
+ );
227
278
  this.initialTableData = result;
228
279
  } else {
229
280
  this.initialTableData = [];
@@ -243,7 +294,10 @@ export default {
243
294
  //更新待选的人员
244
295
  for (var i = 0; i < this.initialTableData.length; i++) {
245
296
  if (this.initialTableData[i].code == row.code) {
246
- this.$refs.eltableCurrentRow.toggleRowSelection(this.initialTableData[i], false);
297
+ this.$refs.eltableCurrentRow.toggleRowSelection(
298
+ this.initialTableData[i],
299
+ false
300
+ );
247
301
  }
248
302
  }
249
303
  },
@@ -283,7 +337,10 @@ export default {
283
337
  //全选或者全取消
284
338
  handleSelectAll(select) {
285
339
  var _this = this;
286
- if ('onlyApprove' == _this.currentRuleEngine.runtime.nextNodes[0].approve.type) {
340
+ if (
341
+ 'onlyApprove' ==
342
+ _this.currentRuleEngine.runtime.nextNodes[0].approve.type
343
+ ) {
287
344
  this.selectTableData = [];
288
345
  this.$refs.eltableCurrentRow.clearSelection();
289
346
  } else {
@@ -309,7 +366,10 @@ export default {
309
366
  handleSelect(select, row) {
310
367
  var _this = this;
311
368
  // 单人审批 只能选择一个
312
- if ('onlyApprove' == _this.currentRuleEngine.runtime.nextNodes[0].approve.type) {
369
+ if (
370
+ 'onlyApprove' ==
371
+ _this.currentRuleEngine.runtime.nextNodes[0].approve.type
372
+ ) {
313
373
  // 清楚数据
314
374
  _this.selectTableData = [];
315
375
  _this.$refs.eltableCurrentRow.clearSelection();
@@ -339,8 +399,22 @@ export default {
339
399
  _this.toTaskDefKey = val;
340
400
  _this.initialTableData = [];
341
401
  _this.ruleEngine['bpmIsLatest'] = true;
402
+ // 为了解决入参过多的问题
403
+ let temRuleEngine = JSON.parse(JSON.stringify(_this.ruleEngine));
404
+ if (temRuleEngine.runtime) {
405
+ temRuleEngine.runtime = {};
406
+ }
407
+ if (temRuleEngine.opinion) {
408
+ temRuleEngine.opinion = {};
409
+ }
342
410
  axios['bpm-engine']
343
- .post('/api/engine/bpm//query/jump/candidate/' + _this.businessId + '/' + _this.toTaskDefKey, _this.ruleEngine)
411
+ .post(
412
+ '/api/engine/bpm//query/jump/candidate/' +
413
+ _this.businessId +
414
+ '/' +
415
+ _this.toTaskDefKey,
416
+ temRuleEngine
417
+ )
344
418
  .then(function(res) {
345
419
  if (res.data.runtime.nextNodes[0].bpmUsers.length > 0) {
346
420
  res.data.runtime.nextNodes[0].bpmUsers.forEach(element => {
@@ -406,7 +480,9 @@ export default {
406
480
  codes.push(element.code);
407
481
  });
408
482
  //
409
- _this.ruleEngine[_this.toTaskDefKey + '_' + _this.approveType] = codes.join(',');
483
+ _this.ruleEngine[
484
+ _this.toTaskDefKey + '_' + _this.approveType
485
+ ] = codes.join(',');
410
486
 
411
487
  //
412
488
  _this.ruleEngine.toTaskDefKey = _this.toTaskDefKey;
@@ -13,14 +13,26 @@
13
13
  >
14
14
  <v-bpm-next-node v-if="ok" :nextNode="nextNodes"></v-bpm-next-node>
15
15
  <span slot="footer" class="dialog-footer">
16
- <el-button @click="handleClose">{{ $t('base.button.cancel') }}</el-button>
17
- <el-button type="primary" @click="handleSave">{{ $t('base.button.ok') }}</el-button>
16
+ <el-button @click="handleClose">{{
17
+ $t('base.button.cancel')
18
+ }}</el-button>
19
+ <el-button type="primary" @click="handleSave">{{
20
+ $t('base.button.ok')
21
+ }}</el-button>
18
22
  </span>
19
23
  </el-dialog>
20
24
  </div>
21
25
  </template>
22
26
  <script>
23
- import { Dialog, Aside, Main, Container, Button, Tabs, TabPane } from 'element-ui';
27
+ import {
28
+ Dialog,
29
+ Aside,
30
+ Main,
31
+ Container,
32
+ Button,
33
+ Tabs,
34
+ TabPane
35
+ } from 'element-ui';
24
36
  import bpmNextNode from './bpm-next-node';
25
37
  import axios from 'cloud-module-base/packages/httpConfig/http';
26
38
 
@@ -52,7 +64,7 @@ export default {
52
64
  },
53
65
  sendReadUsersUrl: '/api/engine/bpm/process/getSendReadUsers',
54
66
  nextNodes: [],
55
- ok:false,
67
+ ok: false
56
68
  };
57
69
  },
58
70
  created() {
@@ -65,8 +77,13 @@ export default {
65
77
  openDialog() {
66
78
  var _this = this;
67
79
  var taskId = _this.ruleEngine.runtime.taskId;
80
+ // 为了解决入参过多的问题
81
+ let temRuleEngine = JSON.parse(JSON.stringify(_this.ruleEngine));
82
+ if (temRuleEngine.runtime) {
83
+ temRuleEngine.runtime = {};
84
+ }
68
85
  axios['bpm-engine']
69
- .post(_this.sendReadUsersUrl + '/' + taskId, _this.ruleEngine)
86
+ .post(_this.sendReadUsersUrl + '/' + taskId, temRuleEngine)
70
87
  .then(function(res) {
71
88
  _this.nextNodes = res.data.sendReadUsers;
72
89
  _this.ok = true;
@@ -83,11 +100,15 @@ export default {
83
100
  _this.EventBus.$on('update-selected-user', params => {
84
101
  _this.ruleEngine.sendReadUserCodes = params.dealUserCodes;
85
102
  });
86
- if (JSON.stringify(_this.ruleEngine.sendReadUserCodes) == '{}' || _this.ruleEngine.sendReadUserCodes == '' || _this.ruleEngine.sendReadUserCodes == undefined) {
87
- _this.$message({
88
- message: _this.$t('bpm.send_read.please_personnel'),
89
- type: 'warning',
90
- });
103
+ if (
104
+ JSON.stringify(_this.ruleEngine.sendReadUserCodes) == '{}' ||
105
+ _this.ruleEngine.sendReadUserCodes == '' ||
106
+ _this.ruleEngine.sendReadUserCodes == undefined
107
+ ) {
108
+ _this.$message({
109
+ message: _this.$t('bpm.send_read.please_personnel'),
110
+ type: 'warning'
111
+ });
91
112
  return;
92
113
  }
93
114
  this.EventBus.$emit('save-button-click');
@@ -96,5 +117,4 @@ export default {
96
117
  }
97
118
  };
98
119
  </script>
99
- <style>
100
- </style>
120
+ <style></style>