kongdeqiang
2022-11-04 98fcbf66162fba0a097a8abcaeba5e1c1e32000e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
  <div>
    <Divider class="component-blue" orientation="left"
      >通过流程key直接发起最新版本</Divider
    >
    <div style="font-size: 12px; margin-bottom: 10px">
      示例(此处传入的属性流程key为请假申请leave,传入actBusinessId为测试数据123456,所以会报错):
    </div>
    <Button @click="showProcessStart = true" :loading="processLoading"
      >发起流程</Button
    >
    <h3 class="component-article">基础用法</h3>
    基本用法,使用
    <code>v-model</code>
    实现数据的双向绑定(组件显示),显示组件前记得传入有效属性值:processKey和actBusinessId。
    <h3 class="component-article">props</h3>
    <Table
      :columns="props"
      :data="data1"
      border
      size="small"
      width="1000"
    ></Table>
    <h3 class="component-article">events</h3>
    <Table
      :columns="events"
      :data="data2"
      border
      size="small"
      width="1000"
    ></Table>
 
    <process-start
      v-model="showProcessStart"
      processKey="leave"
      actBusinessId="123456"
      @on-loading="processLoading = true"
      @on-loaded="processLoading = false"
    />
  </div>
</template>
<script>
import { props, events, methods } from "./columns";
import processStart from "@/views/my-components/xboot/process-start";
export default {
  components: {
    processStart,
  },
  data() {
    return {
      props: props,
      events: events,
      methods: methods,
      showProcessStart: false,
      processLoading: false,
      data1: [
        {
          name: "value",
          desc: "绑定的值,可使用 v-model 双向绑定",
          type: "String",
          value: "空",
        },
        {
          name: "processKey",
          desc: "流程标识Key,显示组件前务必给该属性传入processKey数据值",
          type: "String",
          value: "空",
        },
        {
          name: "actBusinessId",
          desc:
            "流程关联业务表id,显示组件前务必给该属性传入actBusinessId数据值",
          type: "String",
          value: "空",
        },
      ],
      data2: [
        {
          name: "on-loading",
          type: "Boolean",
          value: "加载中状态,传入key后需加载流程信息,加载中触发返回true",
        },
        {
          name: "on-loaded",
          type: "Boolean",
          value: "加载完毕状态,传入key后需加载流程信息,加载完毕触发返回true",
        },
        {
          name: "on-submit",
          type: "Boolean",
          value: "仅成功提交申请触发返回true,用于刷新表单显示审批状态",
        },
      ],
    };
  },
  methods: {},
  mounted() {},
};
</script>