const action_type_list = [
  { value: "1", label: "开始节点", type: "warning" },
  { value: "2", label: "过程节点", type: "primary" },
  { value: "3", label: "中断节点", type: "danger" },
  { value: "4", label: "结束节点", type: "success" },
];
const operation_type_list = [
  { value: "1", label: "审批节点" },
  { value: "2", label: "系统节点" },
];
const listCol = [
  {
    prop: "status_name",
    label: "节点名称",
  },
  {
    prop: "order_process",
    label: "节点值",
    width: "70px",
  },
  {
    prop: "is_master",
    label: "是否主流程",
    width: "100px",
    _slot_: "is_master",
  },
  {
    prop: "action_type",
    label: "节点类型",
    _slot_: "action_type",
    width: "90px",
  },
  {
    prop: "operation_type",
    label: "操作类型",
    _slot_: "operation_type",
    width: "90px",
  },
  {
    prop: "status",
    label: "状态",
    _slot_: "status",
    width: "70px",
  },
  {
    prop: "next_actions",
    label: "下一节点",
    _slot_: "next_actions",
  },
  {
    prop: "creater",
    label: "创建人",
    width: "75px",
  },
  {
    prop: "addtime",
    label: "创建时间",
    width: "145px",
  },

  {
    prop: "",
    label: "操作",
    fixed: "right",
    _slot_: "operation",
    width: "140px",
  },
];
const rules = {
  operation_type: [
    {
      required: true,
      message: "请选择操作类型",
      trigger: "change",
    },
  ],
  action_type: [
    {
      required: true,
      message: "请选择节点类型",
      trigger: "change",
    },
  ],
  status_name: [
    {
      required: true,
      message: "请输入流程节点",
      trigger: "blur",
    },
    {
      min: 2,
      max: 30,
      message: "长度在 2 到 30 个字符",
      trigger: "blur",
    },
  ],
  order_process: [
    {
      required: true,
      message: "请输入流程节点值",
      trigger: "blur",
    },
  ],
  is_master: [
    {
      required: true,
      message: "请选择是否为主流程",
      trigger: "blur",
    },
  ],
  next_action_ids: [
    {
      type: "array",
      required: true,
      message: "请选择下一个节点",
      trigger: "change",
    },
  ],
};

export { action_type_list, listCol, operation_type_list, rules };
