import { useDictionaryStore } from "@/store";
const { dicts } = useDictionaryStore();

const switchOp = [
  {
    label: "否",
    value: 0,
  },
  {
    label: "是",
    value: 1,
  },
];

export const formOption = {
  submitBtn: false,
  emptyBtn: false,
  column: [
    {
      label: "工序类型",
      prop: "operationType",
      type: "select",
      search: true,
      dicData: dicts.process_type,
      props: {
        label: "dictLabel",
        value: "dictValue",
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请选择工序类型",
          trigger: "change",
        },
      ],
    },
    {
      label: "技能要求",
      prop: "skillAsk",
      span: 24,
      type: "select",
      search: true,
      filterable: true,
      dicData: dicts.skill_requirements,
      props: {
        label: "dictLabel",
        value: "dictValue",
      },
      rules: [
        {
          required: true,
          message: "请选择技能要求",
          trigger: "change",
        },
      ],
    },
    {
      label: "工位类型",
      prop: "stanType",
      search: true,
      type: "select",
      dicData: dicts.station_type,
      props: {
        label: "dictLabel",
        value: "dictValue",
      },
      span: 24,
      row: true,
      rules: [
        {
          required: true,
          message: "请选择工位类型",
          trigger: "blur",
        },
      ],
    },
    {
      label: "标准工时",
      prop: "standardWorktime",
      span: 24,
      value: 0,
      append: "分钟",
      rules: [
        {
          required: true,
          message: "标准工时不能为空",
          trigger: "blur",
        },
      ],
    },
    /*{
      label: "标准机时",
      prop: "timeingNum",
      span: 24,
      value: 0,
      append: "分钟",
      // rules: [
      //   {
      //     required: true,
      //     message: "标准机时不能为空",
      //     trigger: "blur",
      //   },
      // ],
    },*/
    {
      label: "后置时间",
      prop: "forceTime",
      span: 24,
      value: 0,
      append: "分钟",
      rules: [
        {
          required: true,
          message: "后置时间不能为空",
          trigger: "blur",
        },
      ],
      // slot:true, // 自定义列
    },
    {
      label: "是否外协",
      prop: "externalCooperation",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否首检",
      prop: "firstCheck",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否互检",
      prop: "mutualInspection",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否专检",
      prop: "specialInspection",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否巡检",
      prop: "inspection",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否自检",
      prop: "selfCheck",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "是否可跳过",
      prop: "skipped",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "批量报工",
      prop: "batchReport",
      span: 24,
      type: "switch",
      dicData: switchOp,
      value: 0,
    },
    {
      label: "工序描述",
      prop: "operationDesc",
      span: 24,
      type: "textarea",
    },
   /* {
      label: "tbom文件",
      prop: "tbomUrl",
      span: 24,
    },*/
  ],
};
