import { mockData } from './mock';
import { cloneDeep } from 'lodash-es';
import { Modal } from 'ant-design-vue';
import { createVNode, ref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';

export const formConfig = [
  {
    field: 'zuzhi',
    label: '组织ID',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入组织ID',
    },
    rules: [
      {
        required: true,
        message: '请输入组织编号',
        trigger: 'blur',
      },
    ],
  },
  {
    field: 'jituanname',
    label: '企业名称',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入企业名称',
      maxLength: 20,
    },
    rules: [
      {
        required: true,
        message: '请输入企业名称',
        trigger: 'blur',
      },
    ],
  },
  {
    field: 'jituanname',
    label: '集团名称',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入集团名称',
      maxLength: 20,
    },
  },
  {
    field: 'cityName',
    label: '省市区',
    component: 'NsInputCity',
    defaultValue: '',
    fieldMap: ['provinceName', 'cityName', 'areaName', 'province', 'city', 'area'],
    componentProps: {
      placeholder: '请选择',
      api: '/api/parking_merchant/objs/BaseArea',
      isSeparate: true,
    },
    rules: [
      {
        required: true,
        message: '请选择区域',
        trigger: 'blur',
      },
    ],
  },
  {
    field: 'address',
    label: '地址',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入地址',
      maxLength: 50,
    },
  },
  {
    field: 'person',
    label: '联系人',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入联系人',
      maxLength: 10,
    },
    rules: [
      {
        required: true,
        message: '请输入联系人',
        trigger: 'blur',
      },
    ],
  },
  {
    field: 'phone',
    label: '联系电话',
    component: 'NsInput',
    componentProps: {
      placeholder: '请输入联系电话',
      maxLength: 11,
    },
    rules: [
      {
        required: true,
        message: '请输入联系电话',
        trigger: 'blur',
      },
    ],
  },
];
