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.
- package/dist/cloud-module-bpm.common.js +3965 -1347
- package/dist/cloud-module-bpm.common.js.map +1 -1
- package/dist/cloud-module-bpm.css +1 -1
- package/dist/cloud-module-bpm.umd.js +3965 -1347
- package/dist/cloud-module-bpm.umd.js.map +1 -1
- package/dist/cloud-module-bpm.umd.min.js +6 -6
- package/dist/cloud-module-bpm.umd.min.js.map +1 -1
- package/package.json +5 -2
- package/packages/bpm-back-anylink-dialog/Tree.vue +222 -0
- package/packages/bpm-back-anylink-dialog/bpm-back-anylink-dialog.vue +466 -213
- package/packages/bpm-form-tools/bpm-form-tools.vue +33 -10
- package/packages/bpm-jump-dialog/Tree.vue +222 -0
- package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +425 -161
- package/packages/bpm-jump-latest-dialog/Tree.vue +180 -41
- package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +200 -30
- package/packages/bpm-opinion-dialog/bpm-opinion.vue +105 -44
- package/packages/bpm-send-read-dialog/SelectedGrid.vue +1 -1
- package/packages/bpm-send-read-dialog/SourceGrid.vue +90 -102
- package/packages/bpm-send-read-dialog/Tree.vue +145 -24
- package/packages/bpm-send-read-dialog/bpm-next-node.vue +3 -3
- package/packages/bpm-send-read-opinion-dialog/bpm-send-read-opinion.vue +35 -34
- package/packages/bpm-sign-dialog/SelectedGrid.vue +2 -2
- package/packages/bpm-sign-dialog/SourceGrid.vue +96 -113
- package/packages/bpm-sign-dialog/Tree.vue +125 -87
- package/packages/bpm-sign-dialog/bpm-next-node.vue +11 -8
- package/packages/bpm-user-select-dialog/SourceGrid.vue +127 -51
- package/packages/bpm-user-select-dialog/Tree.vue +151 -61
- package/packages/bpm-user-select-dialog/bpm-next-node.vue +17 -5
- package/packages/i18n/langs/zh_CN.js +6 -6
- package/packages/utils/merit-bpm.js +121 -8
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<el-row
|
|
3
|
+
<el-row
|
|
4
|
+
justify="space-between"
|
|
5
|
+
style="padding: 5px;"
|
|
6
|
+
>
|
|
4
7
|
<el-col
|
|
5
8
|
:span="7"
|
|
6
9
|
style="float: left;margin-top: 5px;padding-left: 2px;"
|
|
7
|
-
|
|
10
|
+
>{{ $t('base.list_alternatives') }}</el-col>
|
|
11
|
+
<el-col
|
|
12
|
+
:span="17"
|
|
13
|
+
style="float:right;"
|
|
8
14
|
>
|
|
9
|
-
<el-col :span="17" style="float:right;">
|
|
10
15
|
<el-input
|
|
11
|
-
class="custom_input_1"
|
|
12
16
|
placeholder="请输入姓名或编码"
|
|
13
17
|
v-model="searchName"
|
|
14
18
|
clearable
|
|
15
|
-
@change="
|
|
16
|
-
@keyup.enter.native="searchGridData"
|
|
17
|
-
suffix-icon="el-icon-search"
|
|
19
|
+
@change="requestGridData"
|
|
18
20
|
>
|
|
19
|
-
|
|
21
|
+
<el-button
|
|
20
22
|
class="el-icon-search-button"
|
|
21
23
|
slot="append"
|
|
22
24
|
icon="el-icon-search"
|
|
23
|
-
@click="
|
|
24
|
-
></el-button>
|
|
25
|
+
@click="requestGridData"
|
|
26
|
+
></el-button>
|
|
25
27
|
</el-input>
|
|
26
28
|
</el-col>
|
|
27
29
|
</el-row>
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
ref="sourceGrid"
|
|
30
32
|
:data="empTableData"
|
|
31
33
|
stripe
|
|
32
|
-
:ruleEngine="ruleEngine"
|
|
34
|
+
:ruleEngine="ruleEngine"
|
|
33
35
|
:height="tableHeight"
|
|
34
36
|
style="width: 100%;"
|
|
35
37
|
:element-loading-text="$t('base.table.loading')"
|
|
@@ -40,10 +42,21 @@
|
|
|
40
42
|
@row-click="handleRowClick"
|
|
41
43
|
>
|
|
42
44
|
<div class=""></div>
|
|
43
|
-
<el-table-column
|
|
44
|
-
|
|
45
|
+
<el-table-column
|
|
46
|
+
style="height: 18px"
|
|
47
|
+
v-if="notOnlyApprove"
|
|
48
|
+
type="selection"
|
|
49
|
+
></el-table-column>
|
|
50
|
+
<el-table-column
|
|
51
|
+
prop="name"
|
|
52
|
+
:label="$t('base.user.name')"
|
|
53
|
+
fit="true"
|
|
54
|
+
>
|
|
45
55
|
<template slot-scope="scope">
|
|
46
|
-
<div
|
|
56
|
+
<div
|
|
57
|
+
:title="scope.row.name"
|
|
58
|
+
class="cell-hidden"
|
|
59
|
+
>
|
|
47
60
|
{{ scope.row.name }}
|
|
48
61
|
</div>
|
|
49
62
|
</template>
|
|
@@ -54,14 +67,24 @@
|
|
|
54
67
|
fit="true"
|
|
55
68
|
>
|
|
56
69
|
<template slot-scope="scope">
|
|
57
|
-
<div
|
|
70
|
+
<div
|
|
71
|
+
:title="scope.row.code"
|
|
72
|
+
class="cell-hidden"
|
|
73
|
+
>
|
|
58
74
|
{{ scope.row.code }}
|
|
59
75
|
</div>
|
|
60
76
|
</template>
|
|
61
77
|
</el-table-column>
|
|
62
|
-
<el-table-column
|
|
78
|
+
<el-table-column
|
|
79
|
+
prop="deptName"
|
|
80
|
+
:label="$t('base.dept.name')"
|
|
81
|
+
fit="true"
|
|
82
|
+
>
|
|
63
83
|
<template slot-scope="scope">
|
|
64
|
-
<div
|
|
84
|
+
<div
|
|
85
|
+
:title="scope.row.deptName"
|
|
86
|
+
class="cell-hidden"
|
|
87
|
+
>
|
|
65
88
|
{{ scope.row.deptName }}
|
|
66
89
|
</div>
|
|
67
90
|
</template>
|
|
@@ -111,12 +134,12 @@ export default {
|
|
|
111
134
|
'el-input': Input,
|
|
112
135
|
'el-button': Button
|
|
113
136
|
},
|
|
114
|
-
data() {
|
|
137
|
+
data () {
|
|
115
138
|
return {
|
|
116
139
|
signUsersUrl: '/api/engine/bpm/process/getSignUsers',//add by zhang
|
|
117
140
|
searchName: '',
|
|
118
141
|
multipleSelection: [],
|
|
119
|
-
tableHeight:
|
|
142
|
+
tableHeight: 375,
|
|
120
143
|
currentPage: 1,
|
|
121
144
|
pageSize: 10,
|
|
122
145
|
pagerCount: 5,
|
|
@@ -126,24 +149,24 @@ export default {
|
|
|
126
149
|
empTotal: 0,
|
|
127
150
|
loading: false,
|
|
128
151
|
receiverIds: [],
|
|
129
|
-
ruleEngine:{}
|
|
152
|
+
ruleEngine: {}
|
|
130
153
|
};
|
|
131
154
|
},
|
|
132
155
|
computed: {
|
|
133
156
|
// 是否是单人审批,如果不是单人审批则展示多选框
|
|
134
|
-
notOnlyApprove() {
|
|
157
|
+
notOnlyApprove () {
|
|
135
158
|
return this.opt.approveType != 'onlyApprove';
|
|
136
159
|
}
|
|
137
160
|
},
|
|
138
|
-
created() {
|
|
161
|
+
created () {
|
|
139
162
|
// this.tableHeight = window.outerHeight > 900 ? 385 : 265;
|
|
140
163
|
this.opt.nextNodes.forEach(bpmUser => {
|
|
141
164
|
this.receiverIds.push(bpmUser.code);
|
|
142
165
|
});
|
|
143
|
-
|
|
166
|
+
|
|
144
167
|
},
|
|
145
168
|
watch: {
|
|
146
|
-
'opt.nextNodes'(old, newVal) {
|
|
169
|
+
'opt.nextNodes' (old, newVal) {
|
|
147
170
|
this.empTableData = this.opt.nextNodes;
|
|
148
171
|
this.empTotal = this.opt.nextNodes.length;
|
|
149
172
|
this.opt.nextNodes.forEach(bpmUser => {
|
|
@@ -153,9 +176,9 @@ export default {
|
|
|
153
176
|
}
|
|
154
177
|
},
|
|
155
178
|
//加载时调用方法 函数
|
|
156
|
-
mounted() {
|
|
179
|
+
mounted () {
|
|
157
180
|
let _this = this;
|
|
158
|
-
|
|
181
|
+
|
|
159
182
|
// this.empTableData = this.opt;
|
|
160
183
|
// this.empTableData = this.opt.bpmUsers;
|
|
161
184
|
// 初始化选择数据分页
|
|
@@ -165,7 +188,7 @@ export default {
|
|
|
165
188
|
}
|
|
166
189
|
this.empTotal = this.opt.nextNodes.length;
|
|
167
190
|
//点击树节点,刷新待选列表
|
|
168
|
-
this.EventBus.$on('refresh-source-grid', treeNode => {
|
|
191
|
+
this.EventBus.$on('refresh-source-grid-sign', treeNode => {
|
|
169
192
|
_this.pageSize = 10;
|
|
170
193
|
_this.currentPage = 1;
|
|
171
194
|
_this.treeNode = treeNode.attributes || treeNode;
|
|
@@ -176,89 +199,49 @@ export default {
|
|
|
176
199
|
_this.cancelSelecedUser(row);
|
|
177
200
|
});
|
|
178
201
|
//监听保存按钮事件。点击后,清除已选择处理人对象
|
|
179
|
-
this.EventBus.$on('save-button-click', function() {
|
|
202
|
+
this.EventBus.$on('save-button-click', function () {
|
|
180
203
|
_this.searchName = '';
|
|
181
204
|
_this.multipleSelection = [];
|
|
182
205
|
});
|
|
183
206
|
},
|
|
184
207
|
methods: {
|
|
185
208
|
//每页显示数据个数变化时调用
|
|
186
|
-
handleSizeChange(val) {
|
|
209
|
+
handleSizeChange (val) {
|
|
187
210
|
this.pageSize = val;
|
|
188
211
|
//点击过tree,this.treeNode.code有值进行分页
|
|
189
212
|
if (this.treeNode.code) {
|
|
190
213
|
this.requestGridData();
|
|
191
|
-
} else {
|
|
192
|
-
//未点击tree进行分页
|
|
193
|
-
this.resultDataChange();
|
|
194
214
|
}
|
|
195
215
|
},
|
|
196
216
|
//页码变化时调用
|
|
197
|
-
handleCurrentChange(val) {
|
|
217
|
+
handleCurrentChange (val) {
|
|
198
218
|
this.currentPage = val;
|
|
199
219
|
//点击过tree,this.treeNode.code有值进行分页
|
|
200
|
-
if (
|
|
220
|
+
if (val) {
|
|
201
221
|
this.requestGridData();
|
|
202
|
-
} else {
|
|
203
|
-
//未点击tree进行分页
|
|
204
|
-
this.resultDataChange();
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
searchGridData() {
|
|
208
|
-
this.currentPage = 1;
|
|
209
|
-
if (this.treeNode.code) {
|
|
210
|
-
this.requestGridData();
|
|
211
|
-
} else {
|
|
212
|
-
this.resultDataChange();
|
|
213
222
|
}
|
|
214
223
|
},
|
|
215
224
|
//判断是否是选择一条数据还是取消选择
|
|
216
|
-
selectRow(select, row) {
|
|
225
|
+
selectRow (select, row) {
|
|
217
226
|
return select.some(element => {
|
|
218
227
|
if (element.code == row.code) {
|
|
219
228
|
return true;
|
|
220
229
|
}
|
|
221
230
|
});
|
|
222
231
|
},
|
|
223
|
-
resultDataChange() {
|
|
224
|
-
if (this.sourceAllData
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const keywordLower = this.searchName.toLowerCase();
|
|
231
|
-
return code.includes(keywordLower) || name.includes(keywordLower);
|
|
232
|
-
});
|
|
233
|
-
this.empTotal = filteredData.length;
|
|
234
|
-
if (filteredData) {
|
|
235
|
-
let result = filteredData.slice(
|
|
236
|
-
this.pageSize * (this.currentPage - 1),
|
|
237
|
-
this.pageSize * this.currentPage
|
|
238
|
-
);
|
|
239
|
-
this.empTableData = result;
|
|
240
|
-
} else {
|
|
241
|
-
this.empTableData = [];
|
|
242
|
-
}
|
|
243
|
-
} else {
|
|
244
|
-
let result = this.sourceAllData.slice(
|
|
245
|
-
this.pageSize * (this.currentPage - 1),
|
|
246
|
-
this.pageSize * this.currentPage
|
|
247
|
-
);
|
|
248
|
-
this.empTableData = result;
|
|
249
|
-
this.empTotal = this.sourceAllData.length;
|
|
250
|
-
}
|
|
251
|
-
// 设置行选中效果
|
|
252
|
-
this.$nextTick(() => {
|
|
253
|
-
this.setRowStatus();
|
|
254
|
-
});
|
|
232
|
+
resultDataChange () {
|
|
233
|
+
if (this.sourceAllData) {
|
|
234
|
+
var result = this.sourceAllData.slice(
|
|
235
|
+
this.pageSize * (this.currentPage - 1),
|
|
236
|
+
this.pageSize * this.currentPage
|
|
237
|
+
);
|
|
238
|
+
this.empTableData = result;
|
|
255
239
|
} else {
|
|
256
240
|
this.empTableData = [];
|
|
257
|
-
this.empTotal = 0;
|
|
258
241
|
}
|
|
259
242
|
},
|
|
260
243
|
//判断是否已经选择该条数据
|
|
261
|
-
indexOfMultipleSelection(row) {
|
|
244
|
+
indexOfMultipleSelection (row) {
|
|
262
245
|
var index = -1;
|
|
263
246
|
var _this = this;
|
|
264
247
|
if (_this.multipleSelection.length > 0) {
|
|
@@ -272,10 +255,10 @@ export default {
|
|
|
272
255
|
return index;
|
|
273
256
|
},
|
|
274
257
|
//行单击事件只有单人审批是选人才生效,其他审批方式,通过checkbox生效
|
|
275
|
-
handleRowClick(row, event, column) {
|
|
258
|
+
handleRowClick (row, event, column) {
|
|
276
259
|
let _this = this;
|
|
277
260
|
let index = this.indexOfMultipleSelection(row);
|
|
278
|
-
if(this.notOnlyApprove) {
|
|
261
|
+
if (this.notOnlyApprove) {
|
|
279
262
|
this.$refs.sourceGrid.toggleRowSelection(row);
|
|
280
263
|
if (index != -1) {
|
|
281
264
|
this.multipleSelection.splice(index, 1);
|
|
@@ -292,7 +275,7 @@ export default {
|
|
|
292
275
|
this.multipleSelection.push(row);
|
|
293
276
|
}
|
|
294
277
|
}
|
|
295
|
-
|
|
278
|
+
|
|
296
279
|
let dealUserCodes = {};
|
|
297
280
|
this.multipleSelection.forEach(element => {
|
|
298
281
|
dealUserCodes[element.code] = element.name;
|
|
@@ -302,7 +285,7 @@ export default {
|
|
|
302
285
|
dealUserCodes: dealUserCodes
|
|
303
286
|
});
|
|
304
287
|
},
|
|
305
|
-
handleSelect(select, row) {
|
|
288
|
+
handleSelect (select, row) {
|
|
306
289
|
if (this.selectRow(select, row)) {
|
|
307
290
|
if (this.indexOfMultipleSelection(row) == -1) {
|
|
308
291
|
this.multipleSelection.push(row);
|
|
@@ -322,7 +305,7 @@ export default {
|
|
|
322
305
|
dealUserCodes: dealUserCodes
|
|
323
306
|
});
|
|
324
307
|
},
|
|
325
|
-
handleSelectAll(selection) {
|
|
308
|
+
handleSelectAll (selection) {
|
|
326
309
|
if (selection.length == 0) {
|
|
327
310
|
this.empTableData.forEach(row => {
|
|
328
311
|
let index = this.indexOfMultipleSelection(row);
|
|
@@ -342,13 +325,13 @@ export default {
|
|
|
342
325
|
this.multipleSelection.forEach(element => {
|
|
343
326
|
dealUserCodes[element.code] = element.name;
|
|
344
327
|
});
|
|
345
|
-
this.EventBus.$emit('refresh-selected-grid'
|
|
328
|
+
this.EventBus.$emit('refresh-selected-grid', this.multipleSelection);
|
|
346
329
|
this.EventBus.$emit('update-selected-user', {
|
|
347
330
|
dealUserCodes: dealUserCodes
|
|
348
331
|
});
|
|
349
332
|
},
|
|
350
333
|
//请求数据
|
|
351
|
-
requestGridData() {
|
|
334
|
+
requestGridData () {
|
|
352
335
|
let _this = this;
|
|
353
336
|
let param = {
|
|
354
337
|
page: this.currentPage,
|
|
@@ -360,22 +343,22 @@ export default {
|
|
|
360
343
|
};
|
|
361
344
|
axios['bpm-engine']
|
|
362
345
|
.post(_this.signUsersUrl + '/' + _this.ruleEngine.procInstId, param)
|
|
363
|
-
.then(function(res) {
|
|
346
|
+
.then(function (res) {
|
|
364
347
|
if (res.success) {
|
|
365
348
|
_this.empTableData = res.data.rows;
|
|
366
349
|
_this.empTotal = res.data.total;
|
|
367
350
|
//必须等列表重新渲染完毕,才能执行此方法。
|
|
368
|
-
setTimeout(function() {
|
|
351
|
+
setTimeout(function () {
|
|
369
352
|
_this.setRowStatus();
|
|
370
353
|
}, 100);
|
|
371
354
|
}
|
|
372
355
|
_this.loading = false;
|
|
373
356
|
})
|
|
374
|
-
.catch(function(err) {
|
|
357
|
+
.catch(function (err) {
|
|
375
358
|
console.log(err);
|
|
376
359
|
});
|
|
377
360
|
},
|
|
378
|
-
setRowStatus() {
|
|
361
|
+
setRowStatus () {
|
|
379
362
|
let _this = this;
|
|
380
363
|
this.empTableData.forEach(row => {
|
|
381
364
|
let index = _this.indexOfMultipleSelection(row);
|
|
@@ -384,29 +367,29 @@ export default {
|
|
|
384
367
|
}
|
|
385
368
|
});
|
|
386
369
|
},
|
|
387
|
-
cancelSelecedUser(row) {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
}
|
|
370
|
+
cancelSelecedUser (row) {
|
|
371
|
+
//取消已选中的
|
|
372
|
+
let index = this.indexOfMultipleSelection(row);
|
|
373
|
+
if (index != -1) {
|
|
374
|
+
this.multipleSelection.splice(index, 1);
|
|
375
|
+
}
|
|
376
|
+
//更新待选的人员
|
|
377
|
+
for (var i = 0; i < this.empTableData.length; i++) {
|
|
378
|
+
if (this.empTableData[i].code == row.code) {
|
|
379
|
+
this.$refs.sourceGrid.toggleRowSelection(
|
|
380
|
+
this.empTableData[i],
|
|
381
|
+
false
|
|
382
|
+
);
|
|
401
383
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
384
|
+
}
|
|
385
|
+
// this.$refs.sourceGrid.toggleRowSelection(row);
|
|
386
|
+
let dealUserCodes = {};
|
|
387
|
+
this.multipleSelection.forEach(element => {
|
|
388
|
+
dealUserCodes[element.code] = element.name;
|
|
389
|
+
});
|
|
390
|
+
this.EventBus.$emit('update-selected-user', {
|
|
391
|
+
dealUserCodes: dealUserCodes
|
|
392
|
+
});
|
|
410
393
|
}
|
|
411
394
|
}
|
|
412
395
|
};
|