<script>
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'

export default {
  name: 'WorkFlowDemo',
  components: { WorkflowDetail },
  mounted () {
    this.$refs.workFlow.init({
      workflowId: 6255
    })
  },
  methods: {
    /**
     * 流程详情页成功
     * @param note 备注信息
     * @param form 表单信息
     * @param workflowId
     */
    success ({ note, form, workflowId }) {
      console.log('success', note, form, workflowId)
    },
    /**
     * 流程详情页成功
     * @param note 备注信息
     * @param form 表单信息
     * @param workflowId 工作流id
     * @param fromStepId 起ID
     * @param toStepId 往ID
     * @param successStepId 完成步骤id
     * @param successStep 完成步骤名称
     * @param fromStep 起步骤名称
     * @param toStep 往步骤名称
     */
    nextClick ({ note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep }) {
      console.log('success', note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep)
    }
  }
}
</script>

<template>
  <WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
</template>

<style scoped lang="less">

</style>
