vue2-client 1.12.10 → 1.12.11
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
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
components: { WorkflowDetail },
|
|
7
7
|
mounted () {
|
|
8
8
|
this.$refs.workFlow.init({
|
|
9
|
-
workflowId: '
|
|
9
|
+
workflowId: '194'
|
|
10
10
|
})
|
|
11
11
|
},
|
|
12
12
|
methods: {
|
|
@@ -18,13 +18,28 @@ export default {
|
|
|
18
18
|
*/
|
|
19
19
|
success ({ note, form, workflowId }) {
|
|
20
20
|
console.log('success', note, form, workflowId)
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* 流程详情页成功
|
|
24
|
+
* @param note 备注信息
|
|
25
|
+
* @param form 表单信息
|
|
26
|
+
* @param workflowId 工作流id
|
|
27
|
+
* @param formStepId 起ID
|
|
28
|
+
* @param toStepId 往ID
|
|
29
|
+
* @param successStepId 完成步骤id
|
|
30
|
+
* @param successStep 完成步骤名称
|
|
31
|
+
* @param formStep 起步骤名称
|
|
32
|
+
* @param toStep 往步骤名称
|
|
33
|
+
*/
|
|
34
|
+
nextClick ({ note, form, workflowId, formStepId, toStepId, formStep, toStep, successStepId, successStep }) {
|
|
35
|
+
console.log('success', note, form, workflowId, formStepId, toStepId, formStep, toStep, successStepId, successStep)
|
|
21
36
|
}
|
|
22
37
|
}
|
|
23
38
|
}
|
|
24
39
|
</script>
|
|
25
40
|
|
|
26
41
|
<template>
|
|
27
|
-
<WorkflowDetail ref="workFlow" @success="success"></WorkflowDetail>
|
|
42
|
+
<WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
|
|
28
43
|
</template>
|
|
29
44
|
|
|
30
45
|
<style scoped lang="less">
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:details="details"
|
|
37
37
|
@refresh="stepChanged"
|
|
38
38
|
@success="success"
|
|
39
|
+
@nextClick="nextClick"
|
|
39
40
|
/>
|
|
40
41
|
</a-tab-pane>
|
|
41
42
|
<a-tab-pane key="2" tab="任务流转记录">
|
|
@@ -193,6 +194,10 @@ export default {
|
|
|
193
194
|
success (res) {
|
|
194
195
|
this.visible = false
|
|
195
196
|
this.$emit('success', res)
|
|
197
|
+
},
|
|
198
|
+
// 提交完成后事件
|
|
199
|
+
nextClick (res) {
|
|
200
|
+
this.$emit('nextClick', res)
|
|
196
201
|
}
|
|
197
202
|
}
|
|
198
203
|
}
|
|
@@ -456,7 +456,7 @@ export default {
|
|
|
456
456
|
this.submitForm(res)
|
|
457
457
|
postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
458
458
|
.then(
|
|
459
|
-
|
|
459
|
+
() => {
|
|
460
460
|
const extra = {
|
|
461
461
|
setHandler: this.getStepHandler(),
|
|
462
462
|
setDeadline: this.deadline,
|
|
@@ -466,6 +466,7 @@ export default {
|
|
|
466
466
|
this.$message.success('提交成功')
|
|
467
467
|
this.loading = true
|
|
468
468
|
this.loadingHistory = true
|
|
469
|
+
this.$emit('nextClick', { note: this.note.trim(), form: res.realForm, workflowId: this.workflowId, ...this.generateStepChange(this.currentStepId, this.nextBtnTo) })
|
|
469
470
|
this.$emit('refresh')
|
|
470
471
|
this.onClose()
|
|
471
472
|
this.init()
|
|
@@ -512,7 +513,7 @@ export default {
|
|
|
512
513
|
this.submitForm(res)
|
|
513
514
|
postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
514
515
|
.then(
|
|
515
|
-
|
|
516
|
+
() => {
|
|
516
517
|
const extra = {
|
|
517
518
|
setHandler: this.getStepHandler(),
|
|
518
519
|
setDeadline: this.deadline,
|
|
@@ -520,6 +521,7 @@ export default {
|
|
|
520
521
|
}
|
|
521
522
|
this.saveWorkflowLog('跳过', this.generateStepChangeText(this.currentStepId, this.stepNextBtnTo), extra)
|
|
522
523
|
this.$message.success('提交成功')
|
|
524
|
+
this.$emit('nextClick', { note: this.note.trim(), form: res.realForm, workflowId: this.workflowId, ...this.generateStepChange(this.currentStepId, this.stepNextBtnTo) })
|
|
523
525
|
this.loading = true
|
|
524
526
|
this.loadingHistory = true
|
|
525
527
|
this.$emit('refresh')
|
|
@@ -577,8 +579,6 @@ export default {
|
|
|
577
579
|
},
|
|
578
580
|
// 根据步骤id获取步骤名称
|
|
579
581
|
getStepNameByStepId (stepId) {
|
|
580
|
-
console.log('stepId==', stepId)
|
|
581
|
-
console.log('this.stepsDefine==', this.stepsDefine)
|
|
582
582
|
return this.stepsDefine[stepId - 1].name
|
|
583
583
|
},
|
|
584
584
|
// 表单提交的回调
|
|
@@ -766,6 +766,16 @@ export default {
|
|
|
766
766
|
generateStepChangeText (formStepId, toStepId) {
|
|
767
767
|
return `第${formStepId}步: ${this.getStepNameByStepId(formStepId)} --> 第${toStepId}步: ${this.getStepNameByStepId(toStepId)}`
|
|
768
768
|
},
|
|
769
|
+
generateStepChange (formStepId, toStepId) {
|
|
770
|
+
return {
|
|
771
|
+
formStepId,
|
|
772
|
+
toStepId,
|
|
773
|
+
formStep: this.getStepNameByStepId(formStepId),
|
|
774
|
+
toStep: this.getStepNameByStepId(toStepId),
|
|
775
|
+
successStepId: this.stepsDefine[this.stepsDefine.length - 1].id,
|
|
776
|
+
successStep: this.stepsDefine[this.stepsDefine.length - 1].name,
|
|
777
|
+
}
|
|
778
|
+
},
|
|
769
779
|
// 保存工作流日志
|
|
770
780
|
saveWorkflowLog (operation, desc, extra) {
|
|
771
781
|
postByServiceName(workFlowViewApi.saveWorkFlowLog, {
|
|
@@ -54,13 +54,13 @@ routerResource.example = {
|
|
|
54
54
|
name: '示例主页面',
|
|
55
55
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
56
56
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
57
|
-
component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
57
|
+
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
58
58
|
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
59
59
|
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
60
60
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
|
61
61
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
62
62
|
// component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
63
|
-
|
|
63
|
+
component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
64
64
|
// component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
|
|
65
65
|
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
|
|
66
66
|
// component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
|