？<template>
  <layout-form>
    <el-form
      :model="form"
      :loading="loading"
      :rules="rules"
      size="small"
      style="width: 100%"
      label-width="120px"
      ref="form"
    >
      <el-row>
        <Field
          label="办理流程"
          prop="flowName"
          v-model="form.flowName"
          span="18"
          placeholder="请输入办理流程"
        />
        <Field
          label="办理时长"
          prop="flowTime"
          v-model="form.flowTime"
          placeholder="请输入办理时长"
          span="18"
        />
        <Field
          label="转外时限"
          prop="flowTurnOut"
          v-model="form.flowTurnOut"
          placeholder="请输入转外时限"
          span="18"
        />
        <Field
          label="办理流程说明"
          prop="flowDesc"
          v-model="form.flowDesc"
          placeholder="请输入办理流程说明"
          span="18"
          rows="5"
          type="textarea"
        />

        <Field
          label="办理流程来源"
          prop="source"
          v-model="form.source"
          :enumData="dict.source"
          type="select"
          span="18"
        />
      </el-row>
      <form-buttons @submit="submitForm" />
    </el-form>
  </layout-form>
</template>

<script>
import form from "@/assets/mixins/form";
export default {
  mixins: [form],
  created() {
    const { matterId } = this.$route.query;
    this.form.matterId = matterId;
  },
  data() {
    return {
      toString: ["source"],

      rules: {
        flowName: [
          {
            required: true,
            max: 1024,
            message: "最多只能录入1024个字符",
            trigger: "blur",
          },
        ],
        flowTime: [
          {
            required: true,
            max: 1024,
            message: "最多只能录入1024个字符",
            trigger: "blur",
          },
        ],
        flowTurnOut: [
          { max: 1024, message: "最多只能录入1024个字符", trigger: "blur" },
        ],
        flowDesc: [
          { max: 65535, message: "最多只能录入65535个字符", trigger: "blur" },
        ],
        source: [
          { required: true, message: "请选择事项来源", trigger: "blur" },
        ],
      },
    };
  },
};
</script>