cloud-module-bpm 6.3.4 → 6.5.0
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 +2741 -736
- 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 +2741 -736
- package/dist/cloud-module-bpm.umd.js.map +1 -1
- package/dist/cloud-module-bpm.umd.min.js +5 -5
- package/dist/cloud-module-bpm.umd.min.js.map +1 -1
- package/package.json +3 -4
- package/packages/bpm-form-tools/bpm-form-tools.vue +23 -12
- package/packages/bpm-grid-buttons/bpm-grid-buttons.vue +11 -1
- package/packages/bpm-grid-buttons-new/bpm-grid-buttons-new.vue +11 -1
- package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +20 -13
- package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +5 -5
- package/packages/bpm-opinion-dialog/bpm-opinion.vue +3 -2
- package/packages/bpm-send-read-dialog/SelectedGrid.vue +1 -1
- package/packages/bpm-send-read-dialog/SourceGrid.vue +1 -1
- package/packages/bpm-send-read-dialog/bpm-next-node.vue +1 -1
- package/packages/bpm-user-select-dialog/SelectedGrid.vue +1 -1
- package/packages/bpm-user-select-dialog/SourceGrid.vue +1 -1
- package/packages/bpm-user-select-dialog/bpm-next-node.vue +2 -2
- package/packages/bpm-user-select-dialog/bpm-user-select.vue +2 -7
- package/packages/utils/merit-bpm.js +7 -2
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloud-module-bpm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": " bpm base lib",
|
|
5
5
|
"main": "dist/cloud-module-bpm.umd.min.js",
|
|
6
6
|
"author": "wujx",
|
|
7
7
|
"private": false,
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
|
|
10
9
|
"scripts": {
|
|
11
10
|
"serve": "vue-cli-service serve --port 8089 ",
|
|
12
11
|
"build": "vue-cli-service build",
|
|
@@ -17,10 +16,10 @@
|
|
|
17
16
|
"axios": "0.19.0",
|
|
18
17
|
"babel-loader": "^8.0.6",
|
|
19
18
|
"babel-polyfill": "^6.26.0",
|
|
20
|
-
"cloud-module-base": "6.
|
|
19
|
+
"cloud-module-base": "6.5.0",
|
|
21
20
|
"core-js": "^3.4.4",
|
|
22
21
|
"css-loader": "^3.4.1",
|
|
23
|
-
"element-ui": "^2.
|
|
22
|
+
"element-ui": "^2.15.7",
|
|
24
23
|
"less": "3.10.3",
|
|
25
24
|
"less-loader": "^5.0.0",
|
|
26
25
|
"moment": "^2.24.0",
|
|
@@ -89,8 +89,8 @@ export default {
|
|
|
89
89
|
bpmBtn: {},
|
|
90
90
|
ruleEngine: {
|
|
91
91
|
businessId: '', //流程业务数据id
|
|
92
|
-
procInstId: undefined
|
|
93
|
-
undoId:''//待办业务id
|
|
92
|
+
procInstId: undefined, //流程实例id
|
|
93
|
+
undoId: '' //待办业务id
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
},
|
|
@@ -104,11 +104,13 @@ export default {
|
|
|
104
104
|
created() {
|
|
105
105
|
Object.assign(this.ruleEngine, { procDefKey: this.procDefKey });
|
|
106
106
|
let id = MeritBPM.getUrlParameter('id') || '';
|
|
107
|
-
let undoId = MeritBPM.getUrlParameter('undoId') || ''
|
|
107
|
+
let undoId = MeritBPM.getUrlParameter('undoId') || ''; //截取表单url中undoId, add by zhangyan,
|
|
108
|
+
let params = MeritBPM.getUrlParameter('params') || ''; // 截取路径中传入的参数
|
|
108
109
|
//打开表单之前,触发外层的init事件。业务模块获取业务数据对象
|
|
109
110
|
this.$emit('init', {
|
|
110
111
|
id: id.replace('businessId', ''),
|
|
111
|
-
undoId: undoId.replace('undoId', ''),
|
|
112
|
+
undoId: undoId.replace('undoId', ''), //add by zhangyan
|
|
113
|
+
params: params.replace('params', ''),
|
|
112
114
|
callback: this.bpmInit
|
|
113
115
|
});
|
|
114
116
|
},
|
|
@@ -121,7 +123,7 @@ export default {
|
|
|
121
123
|
this.MeritBPM.initRuleEngine(this);
|
|
122
124
|
} else {
|
|
123
125
|
this.ruleEngine.businessId = businessData.id;
|
|
124
|
-
this.ruleEngine.undoId = businessData.undoId;
|
|
126
|
+
this.ruleEngine.undoId = businessData.undoId; //add by zhangyan
|
|
125
127
|
this.MeritBPM.runRuleEngine(this, {}, {});
|
|
126
128
|
}
|
|
127
129
|
},
|
|
@@ -141,7 +143,9 @@ export default {
|
|
|
141
143
|
var bpmVersion = _this.ruleEngine.runtime.mainForm.bpmVersion;
|
|
142
144
|
var businessId = _this.ruleEngine.businessId;
|
|
143
145
|
axios['bpm-engine']
|
|
144
|
-
.post(
|
|
146
|
+
.post(
|
|
147
|
+
'/api/engine/bpm/process/version/' + businessId + '/' + bpmVersion
|
|
148
|
+
)
|
|
145
149
|
.then(function(res) {
|
|
146
150
|
if (res.data.isDifferent == 'NoBusinessData') {
|
|
147
151
|
_this.$alert('业务数据不存在!', '警告', {
|
|
@@ -150,11 +154,15 @@ export default {
|
|
|
150
154
|
callback: action => {}
|
|
151
155
|
});
|
|
152
156
|
} else if (res.data.isDifferent) {
|
|
153
|
-
_this.$alert(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
_this.$alert(
|
|
158
|
+
'数据已被' + res.data.lockUserName + '修改!',
|
|
159
|
+
'警告',
|
|
160
|
+
{
|
|
161
|
+
confirmButtonText: '确定',
|
|
162
|
+
type: 'warning',
|
|
163
|
+
callback: action => {}
|
|
164
|
+
}
|
|
165
|
+
);
|
|
158
166
|
} else {
|
|
159
167
|
//业务应用保存数据的方法,保存后回调方法
|
|
160
168
|
_this.$emit('save', _this.bpmSaveAfter);
|
|
@@ -178,7 +186,10 @@ export default {
|
|
|
178
186
|
if (this.bpmBtn.id == 'bpmSaveOrUpdateBtn') {
|
|
179
187
|
this.$message.success(_this.$t('base.operation.save_success'));
|
|
180
188
|
}
|
|
181
|
-
if (
|
|
189
|
+
if (
|
|
190
|
+
this.ruleEngine.procInstId == undefined ||
|
|
191
|
+
this.ruleEngine.procInstId == ''
|
|
192
|
+
) {
|
|
182
193
|
this.MeritBPM.startProcess(this, this.bpmBtn, function(params) {
|
|
183
194
|
_this.bpmBtn.isSave = '1';
|
|
184
195
|
_this.MeritBPM.doSend(_this, _this.bpmBtn);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<el-col :span="7" class="cloud-bpm-grid-buttons">
|
|
3
3
|
<el-button
|
|
4
4
|
v-if="MeritBPM.procCreatePermit"
|
|
5
|
+
:disabled="isDisabledAddButton"
|
|
5
6
|
class="cloud-bpm-grid-button"
|
|
6
7
|
type="primary"
|
|
7
8
|
icon="el-icon-plus"
|
|
@@ -85,6 +86,15 @@ export default {
|
|
|
85
86
|
isShowButton: {
|
|
86
87
|
type: Boolean,
|
|
87
88
|
default: true
|
|
89
|
+
},
|
|
90
|
+
isDisabledAddButton: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false,
|
|
93
|
+
required: false
|
|
94
|
+
},
|
|
95
|
+
params: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: false
|
|
88
98
|
}
|
|
89
99
|
},
|
|
90
100
|
computed: {
|
|
@@ -126,7 +136,7 @@ export default {
|
|
|
126
136
|
},
|
|
127
137
|
//流程新建方法
|
|
128
138
|
createBpm() {
|
|
129
|
-
MeritBPM.create(this, this.procDefKey, {});
|
|
139
|
+
MeritBPM.create(this, this.procDefKey, { params: this.params });
|
|
130
140
|
},
|
|
131
141
|
//删除流程方法
|
|
132
142
|
deleteBpm() {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<el-col :span="7" class="cloud-bpm-grid-buttons">
|
|
3
3
|
<el-button
|
|
4
4
|
v-if="MeritBPM.procCreatePermit"
|
|
5
|
+
:disabled="isDisabledAddButton"
|
|
5
6
|
class="cloud-bpm-grid-button"
|
|
6
7
|
type="primary"
|
|
7
8
|
icon="el-icon-plus"
|
|
@@ -111,6 +112,15 @@ export default {
|
|
|
111
112
|
isShowButton: {
|
|
112
113
|
type: Boolean,
|
|
113
114
|
default: true
|
|
115
|
+
},
|
|
116
|
+
isDisabledAddButton: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
params: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: false
|
|
114
124
|
}
|
|
115
125
|
},
|
|
116
126
|
computed: {
|
|
@@ -159,7 +169,7 @@ export default {
|
|
|
159
169
|
},
|
|
160
170
|
//流程新建方法
|
|
161
171
|
createBpm() {
|
|
162
|
-
MeritBPM.create(this, this.procDefKey, {});
|
|
172
|
+
MeritBPM.create(this, this.procDefKey, { params: this.params });
|
|
163
173
|
},
|
|
164
174
|
//删除流程方法
|
|
165
175
|
deleteBpm() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<el-dialog
|
|
4
4
|
:title="opt.title"
|
|
5
5
|
:visible.sync="dialogVisible"
|
|
6
|
-
width="
|
|
6
|
+
width="700px"
|
|
7
7
|
top="8vh"
|
|
8
8
|
@open="openDialog"
|
|
9
9
|
:before-close="handleClose"
|
|
@@ -14,22 +14,30 @@
|
|
|
14
14
|
<el-form>
|
|
15
15
|
<div style="padding: 10px 0px 30px 0px">
|
|
16
16
|
<el-row>
|
|
17
|
-
<el-col :span="8" style="
|
|
17
|
+
<el-col :span="8" style="text-align: left">
|
|
18
18
|
{{ $t('bpm.jump.choice_activity') }}
|
|
19
19
|
</el-col>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<span style="padding-right:5px;line-height:2.5;">
|
|
20
|
+
<el-col :span="16">
|
|
21
|
+
<span style="padding-right:5px;line-height:2.5;">
|
|
23
22
|
{{ $t('bpm.jump.activity_name') }}
|
|
24
23
|
</span>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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>
|
|
26
|
+
</el-select>
|
|
27
|
+
</el-col>
|
|
28
28
|
</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>-->
|
|
29
37
|
</div>
|
|
30
38
|
<div>
|
|
31
|
-
<el-row>
|
|
32
|
-
<el-col :span="8"
|
|
39
|
+
<el-row style="text-align: left">
|
|
40
|
+
<el-col :span="8">{{ $t('bpm.jump.for_personnel') }}</el-col>
|
|
33
41
|
</el-row>
|
|
34
42
|
<el-table
|
|
35
43
|
:data="initialTableData"
|
|
@@ -53,8 +61,8 @@
|
|
|
53
61
|
</el-table>
|
|
54
62
|
</div>
|
|
55
63
|
<div style="padding: 20px 0px 0px 0px">
|
|
56
|
-
<el-row>
|
|
57
|
-
<el-col :span="8"
|
|
64
|
+
<el-row style="text-align: left">
|
|
65
|
+
<el-col :span="8">{{ $t('bpm.jump.selected_personnel_list') }}</el-col>
|
|
58
66
|
</el-row>
|
|
59
67
|
<el-table :data="selectTableData" tooltip-effect="dark" stripe height="150" @row-click="handleRowClick">
|
|
60
68
|
<el-table-column width="55"></el-table-column>
|
|
@@ -70,7 +78,6 @@
|
|
|
70
78
|
</el-table>
|
|
71
79
|
</div>
|
|
72
80
|
</el-form>
|
|
73
|
-
|
|
74
81
|
<span slot="footer" class="dialog-footer">
|
|
75
82
|
<el-button @click="handleClose">{{ $t('base.button.cancel') }}</el-button>
|
|
76
83
|
<el-button type="primary" @click="handleSave">{{ $t('base.button.ok') }}</el-button>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
class="jumpDialog"
|
|
13
13
|
>
|
|
14
14
|
<el-container>
|
|
15
|
-
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;">
|
|
15
|
+
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background: #e8ecf3">
|
|
16
16
|
<el-container>
|
|
17
17
|
<el-aside style="height:456px;width: 35%;max-width: 400px;padding-top:5px;margin:0px;border-radius: 0px;">
|
|
18
18
|
<v-tree />
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<el-main style="height:456px; width: 45%; padding: 0px; margin-left: 2px;">
|
|
22
22
|
<div class="selected-grid">
|
|
23
23
|
<el-row>
|
|
24
|
-
<el-col style="
|
|
24
|
+
<el-col style="text-align: left;padding: 7px 7px 0 7px">
|
|
25
25
|
{{ $t('bpm.jump.choice_activity') }}
|
|
26
26
|
</el-col>
|
|
27
27
|
</el-row>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</el-col>
|
|
35
35
|
</el-row>
|
|
36
36
|
<el-row>
|
|
37
|
-
<el-col style="
|
|
37
|
+
<el-col style="text-align: left;padding: 7px 7px 0 7px">{{ $t('bpm.jump.for_personnel') }}</el-col>
|
|
38
38
|
</el-row>
|
|
39
39
|
<el-table
|
|
40
40
|
:data="initialTableData"
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
<el-row style="float:left;padding:7px;">
|
|
101
101
|
{{ $t('bpm.jump.selected_personnel_list') }}
|
|
102
102
|
</el-row>
|
|
103
|
-
<el-table :data="selectTableData" :height="tableHeight +
|
|
103
|
+
<el-table :data="selectTableData" :height="tableHeight + 85" @row-click="handleRowClick">
|
|
104
104
|
<el-table-column prop="name" :label="$t('bpm.jump.name')">
|
|
105
105
|
<template slot-scope="scope">
|
|
106
106
|
<div :title="scope.row.name" class="cell-hidden">
|
|
@@ -172,7 +172,7 @@ export default {
|
|
|
172
172
|
pageSize: 10,
|
|
173
173
|
pagerCount: 5,
|
|
174
174
|
total: 10,
|
|
175
|
-
tableHeight:
|
|
175
|
+
tableHeight: 300,
|
|
176
176
|
maxHeight: '483px',
|
|
177
177
|
//默认参数
|
|
178
178
|
opt: {
|
|
@@ -203,7 +203,7 @@ export default {
|
|
|
203
203
|
this.procOpinion.content = opinion;
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
|
-
if (this.procOpinion.content.length <
|
|
206
|
+
if (this.procOpinion.content.length + opinion.length < 200) {
|
|
207
207
|
this.procOpinion.content += ';' + opinion;
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
@@ -211,11 +211,12 @@ export default {
|
|
|
211
211
|
//关闭人员选择对话框
|
|
212
212
|
handleClose() {
|
|
213
213
|
this.procOpinion.content = undefined;
|
|
214
|
+
this.$refs.procOpinion.resetFields();
|
|
214
215
|
this.$emit('dialog-close', this.dialogVisible);
|
|
215
216
|
},
|
|
216
217
|
handleSave() {
|
|
217
218
|
let _this = this;
|
|
218
|
-
if (_this.procOpinion.content.length >
|
|
219
|
+
if (_this.procOpinion.content.length > 200) {
|
|
219
220
|
return this.$message.error(
|
|
220
221
|
_this.$t('bpm.opinion.opinion_content_beyond')
|
|
221
222
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container>
|
|
3
|
-
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;">
|
|
3
|
+
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background: #e8ecf3">
|
|
4
4
|
<el-container>
|
|
5
5
|
<el-aside style="height:456px;width: 40%;max-width: 400px;padding-top:5px;margin:0px;border-radius: 0px;">
|
|
6
6
|
<v-tree :opt="nextNode" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-container>
|
|
3
|
-
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;">
|
|
2
|
+
<el-container style="background: #e8ecf3">
|
|
3
|
+
<el-aside style="height:456px;width:65%;margin-right: 0px;margin-left: 0px;background-color: #e8ecf3">
|
|
4
4
|
<el-container>
|
|
5
5
|
<el-aside style="height:456px;width: 40%;max-width: 400px;padding-top:5px;margin:0px;border-radius: 0px;">
|
|
6
6
|
<v-tree :opt="nextNode" />
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:close-on-click-modal="false"
|
|
12
12
|
append-to-body
|
|
13
13
|
>
|
|
14
|
-
<el-tabs v-model="activeNodeName">
|
|
14
|
+
<el-tabs v-model="activeNodeName" style="padding: 0 20px 20px 20px!important">
|
|
15
15
|
<el-tab-pane v-for="nextNode in nextNodes" :label="nextNode.taskName" :name="nextNode.taskDeKey" :key="nextNode.taskDeKey">
|
|
16
16
|
<v-bpm-next-node :nextNode="nextNode"></v-bpm-next-node>
|
|
17
17
|
</el-tab-pane>
|
|
@@ -100,9 +100,4 @@ export default {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
</script>
|
|
104
|
-
<style>
|
|
105
|
-
/* .el-dialog__body {
|
|
106
|
-
padding: 0px 20px 30px 20px ;
|
|
107
|
-
} */
|
|
108
|
-
</style>
|
|
103
|
+
</script>
|
|
@@ -18,13 +18,16 @@ var MeritBPM = {
|
|
|
18
18
|
*/
|
|
19
19
|
MeritBPM.create = function(that, procDefKey, params, callback) {
|
|
20
20
|
axios['bpm-engine']
|
|
21
|
-
.post('/api/engine/bpm/ruleengine/init/' + procDefKey,
|
|
21
|
+
.post('/api/engine/bpm/ruleengine/init/' + procDefKey, {})
|
|
22
22
|
.then(function(res) {
|
|
23
23
|
if (res.success) {
|
|
24
24
|
if (typeof callback == 'function') {
|
|
25
25
|
callback(res);
|
|
26
26
|
} else if (res.data != null) {
|
|
27
27
|
let url = res.data.runtime.formLink;
|
|
28
|
+
if (params.params != null && params.params != '') {
|
|
29
|
+
url = url + '¶ms=' + params.params;
|
|
30
|
+
}
|
|
28
31
|
// var iTop = (window.screen.availHeight - 30 - 700) / 2;
|
|
29
32
|
// var iLeft = (window.screen.availWidth - 10 - 900) / 2;
|
|
30
33
|
// var features =
|
|
@@ -100,7 +103,6 @@ MeritBPM.open = function(that, params, callback) {
|
|
|
100
103
|
* callback : function(res){ 执行流程相关操作 }
|
|
101
104
|
*/
|
|
102
105
|
MeritBPM.runRuleEngine = function(that, bpmBtn, callback) {
|
|
103
|
-
console.log('runzhang' + that);
|
|
104
106
|
let bpmVars = that.getBpmVar(bpmBtn);
|
|
105
107
|
if (typeof bpmBtn == 'object') {
|
|
106
108
|
bpmVars.bpmOperName = bpmBtn.name || ''; //【流程内置变量名】
|
|
@@ -273,6 +275,9 @@ MeritBPM.startProcess = function(that, bpmBtn, callback) {
|
|
|
273
275
|
bpmVars
|
|
274
276
|
)
|
|
275
277
|
.then(function(res) {
|
|
278
|
+
if (res.data == undefined || res.data == null) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
276
281
|
Object.assign(that.ruleEngine, res.data);
|
|
277
282
|
MeritBPM.runRuleEngine(that, bpmBtn, callback);
|
|
278
283
|
});
|