@lambo-design/workflow-approve 1.0.0-beta.47 → 1.0.0-beta.49
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 +1 -1
- package/src/components/assignee-box.vue +45 -32
- package/src/components/history.vue +404 -402
- package/src/portrait.vue +1665 -1569
- package/src/workflow-diagram.vue +392 -386
package/package.json
CHANGED
|
@@ -174,7 +174,13 @@ export default {
|
|
|
174
174
|
self.organTreeType = organTreeType
|
|
175
175
|
self.getRootData(organTreeType)
|
|
176
176
|
},
|
|
177
|
+
clearData(){
|
|
178
|
+
this.idSelectedArr = []
|
|
179
|
+
//清除表格数据
|
|
180
|
+
this.doSearch()
|
|
181
|
+
},
|
|
177
182
|
toggleShowHelpBox(organTreeType, permScope, helpBoxType, id) {
|
|
183
|
+
this.clearData()
|
|
178
184
|
this.id = id
|
|
179
185
|
this.helpBoxType = helpBoxType
|
|
180
186
|
this.organTreeType = organTreeType
|
|
@@ -186,44 +192,51 @@ export default {
|
|
|
186
192
|
this.getRootData(organTreeType)
|
|
187
193
|
}
|
|
188
194
|
this.modalBoxShow = !this.modalBoxShow;
|
|
195
|
+
this.$forceUpdate()
|
|
189
196
|
},
|
|
190
197
|
|
|
191
198
|
onOk(){
|
|
192
199
|
let self = this
|
|
193
200
|
let idSelectedArr = self.idSelectedArr
|
|
194
201
|
self.loading = true
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
202
|
+
if (self.helpBoxType ==='addMultitaskInstance'){
|
|
203
|
+
idSelectedArr = [...new Set(idSelectedArr)]
|
|
204
|
+
const assingeeList = idSelectedArr.map(item => item.split(',')[0])
|
|
205
|
+
self.$emit('add-multitask-instance', assingeeList);
|
|
199
206
|
} else {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
name: self.data.auditResultName,
|
|
205
|
-
}
|
|
206
|
-
self.data.selectedUserId=idSelectedArr[0];
|
|
207
|
-
let url = this.smartFlowServerContext + '/manage/processTodo/audit'
|
|
208
|
-
ajax.post(url, self.data).then(function (resp) {
|
|
209
|
-
let result = resp.data
|
|
210
|
-
if (result.code == '200') {
|
|
211
|
-
self.loading = false
|
|
212
|
-
self.$Message.success(result.message);
|
|
213
|
-
if (self.executionCompleted) {
|
|
214
|
-
self.executionCompleted(true, self.data.instanceId, self.data.taskId, auditResult, self.data.taskId);
|
|
215
|
-
}
|
|
216
|
-
self.toBeDoneListDoSearch();
|
|
217
|
-
} else {
|
|
218
|
-
self.loading = false
|
|
219
|
-
self.$Message.error(result.message)
|
|
220
|
-
if (self.executionCompleted) {
|
|
221
|
-
self.executionCompleted(false, null, null, auditResult, self.data.taskId);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
})
|
|
207
|
+
if (idSelectedArr.length > 1) {
|
|
208
|
+
self.loading = false
|
|
209
|
+
self.$Message.info('办理人只能选择一条记录!')
|
|
210
|
+
this.$emit('update-selected', ''); // 触发事件并传递 userId
|
|
225
211
|
} else {
|
|
226
|
-
|
|
212
|
+
let idSelectedArr = self.idSelectedArr[0].split(',')
|
|
213
|
+
if (self.helpBoxType === 'transferCurTask'){
|
|
214
|
+
let auditResult = {
|
|
215
|
+
code: self.data.auditResult,
|
|
216
|
+
name: self.data.auditResultName,
|
|
217
|
+
}
|
|
218
|
+
self.data.selectedUserId=idSelectedArr[0];
|
|
219
|
+
let url = this.smartFlowServerContext + '/manage/processTodo/audit'
|
|
220
|
+
ajax.post(url, self.data).then(function (resp) {
|
|
221
|
+
let result = resp.data
|
|
222
|
+
if (result.code == '200') {
|
|
223
|
+
self.loading = false
|
|
224
|
+
self.$Message.success(result.message);
|
|
225
|
+
if (self.executionCompleted) {
|
|
226
|
+
self.executionCompleted(true, self.data.instanceId, self.data.taskId, auditResult, self.data.taskId);
|
|
227
|
+
}
|
|
228
|
+
self.toBeDoneListDoSearch();
|
|
229
|
+
} else {
|
|
230
|
+
self.loading = false
|
|
231
|
+
self.$Message.error(result.message)
|
|
232
|
+
if (self.executionCompleted) {
|
|
233
|
+
self.executionCompleted(false, null, null, auditResult, self.data.taskId);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
})
|
|
237
|
+
} else {
|
|
238
|
+
self.$emit('update-next-node-assignee', idSelectedArr[0], idSelectedArr[1], self.id);
|
|
239
|
+
}
|
|
227
240
|
}
|
|
228
241
|
}
|
|
229
242
|
this.modalBoxShow = false;
|
|
@@ -234,8 +247,8 @@ export default {
|
|
|
234
247
|
},
|
|
235
248
|
onSelectionChange: function (selection) {
|
|
236
249
|
let self = this
|
|
237
|
-
self.idSelectedArr = []
|
|
238
|
-
if (selection.length > 1) {
|
|
250
|
+
// self.idSelectedArr = []
|
|
251
|
+
if (self.helpBoxType !== 'addMultitaskInstance' && selection.length > 1) {
|
|
239
252
|
self.$Message.info('只能选择一条记录!')
|
|
240
253
|
this.$refs.selection.selectAll(false);
|
|
241
254
|
}
|