export const columns = [
  {
    title: '资源编号',
    dataIndex: 'serviceid',
    width: 200,
  },
  {
    title: '资源名称',
    dataIndex: 'servicename',
    width: 200,
  },
  {
    title: '资源类型',
    dataIndex: 'typename',
    width: 200,
  },
  {
    title: '资源标签',
    dataIndex: 'servicetype',
    width: 200,
  },
  {
    title: '发布人',
    dataIndex: 'publisher',
    width: 200,
  },
  {
    title: '发布时间',
    dataIndex: 'publisherdate',
    width: 200,
    slots: { customRender: 'pdate' },
  },
  {
    title: '当前环节',
    dataIndex: 'currHj',
    width: 200,
  },
  {
    title: '当前处理人',
    dataIndex: 'auditStatus',
    width: 200,
  },
  {
    title: '审核状态',
    dataIndex: 'status',
    width: 200,
    slots: { customRender: 'status' },
  },
  {
    title: '审核时间',
    dataIndex: 'eximdata',
    width: 200,
    slots: { customRender: 'edate' },
  },
];

export const searchFormSchema = [
  {
    field: 'resourceTags',
    label: '资源标签',
    component: 'Select',
    componentProps: {
      options: [
        { label: '无', value: 0 },
      ],
    },
    colProps: { span: 6 },
  },
  {
    field: 'resourceName',
    label: '资源名称',
    component: 'Input',
    colProps: { span: 6 },
    componentProps: {
      maxLength: 255,
    },
  },
  {
    field: 'auditStatus',
    label: '审核状态',
    component: 'Select',
    componentProps: {
      options: [
        { label: '审核不通过', value: 2 },
        { label: '审核中', value: 1 },
        { label: '审核通过', value: 0 },
      ],
    },
    colProps: { span: 6 },
  },
]

// 新增表单配置
export const accountFormSchema = [
  {
    field: 'title',
    label: '',
    slot: 'title',
    component: 'Input',
  },
  {
    field: 'basicinfo',
    label: '',
    slot: 'basicinfo',
    component: 'Input',
  },
  {
    field: 'id',
    label: 'id',
    component: 'Input',
    show: false,
    componentProps: {
      maxLength: 36,
    },
  },
  {
    field: 'serviceCode',
    label: '资源编码',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入资源编码',
    },
  },
  {
    field: 'serviceName',
    label: '资源名称',
    required: true,
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入资源名称',
    },
  },
  {
    field: 'serviceAliasName',
    label: '资源别名',
    required: true,
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入资源别名',
    },
  },
  // {
  //   field: 'parentId',
  //   label: '服务类型',
  //   required: true,
  //   component: 'TreeSelect',
  //   colProps: { span: 12 },
  //   componentProps: {
  //     replaceFields: {
  //       title: 'name',
  //       key: 'id',
  //       value: 'id',
  //     },
  //     maxTagCount: 10,
  //     getPopupContainer: () => document.body,
  //   },
  // },
  {
    field: 'sysTag',
    label: '系统标签',
    required: true,
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'servicedesc',
    label: '资源描述',
    component: 'InputTextArea',
    colProps: { span: 24 },
    componentProps: {
      maxLength: 255,
      placeholder: '请输入备注',
    },
  },

  {
    field: 'thumbnail',
    label: '缩略图',
    slot: 'upload',
    component: 'Input',
    // componentProps: {
    //   maxLength: 255,
    // },
  },
  {
    field: 'descinfo',
    label: '',
    slot: 'descinfo',
    component: 'Input',
  },
  {
    field: 'serviceType',
    label: '资源类型',
    required: true,
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'coors',
    label: '坐标系',
    required: true,
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'serviceAddr',
    label: '服务地址',
    component: 'Input',
    colProps: { span: 24 },
    componentProps: {
      placeholder: '请输入服务地址',
    },
  },
  {
    field: 'dataRange',
    label: '数据范围',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入',
    },
  },
  {
    field: 'dataSource',
    label: '数据来源',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入',
    },
  },
  {
    field: 'classification',
    label: '密级',
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'lymc',
    label: '数据表',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入数据表',
    },
  },
  {
    field: 'lymc',
    label: '保管单位',
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'parentId',
    label: '责任处室',
    required: true,
    component: 'TreeSelect',
    colProps: { span: 12 },
    componentProps: {
      replaceFields: {
        title: 'name',
        key: 'id',
        value: 'id',
      },
      maxTagCount: 10,
      getPopupContainer: () => document.body,
    },
  },
  {
    field: 'publishdata',
    label: '发布日期',
    component: 'DatePicker',
    colProps: { span: 12 },
    dynamicDisabled:true,
    componentProps: {
      placeholder: '请输入',
    },
  },

  {
    field: 'publisher',
    label: '发布者',
    component: 'Input',
    colProps: { span: 12 },
    dynamicDisabled:true,
    componentProps: {
      placeholder: '请输入',
    },
  },
  {
    field: 'updateWay',
    label: '更新方式',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入更新方式',
    },
  },
  {
    field: 'publishdata',
    label: '更新日期',
    component: 'DatePicker',
    colProps: { span: 12 },
    dynamicDisabled:true,
    componentProps: {
      placeholder: '请输入更新日期',
    },
  },
  
  {
    field: 'epsgcode',
    label: 'EPSC CODE',
    component: 'Input',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入EPSC CODE',
    },
  },
  {
    field: 'runstatus',
    label: "运行状态", //状态
    component: 'RadioButtonGroup',
    colProps: { span: 12 },
    defaultValue: '0',
    componentProps: {
      options: [
        { label: "是", value: '0' }, //启用
        { label: "否", value: '1' }, //禁用
      ],
    },
  },

  {
    field: 'status',
    label: "是否公开", //状态
    component: 'RadioButtonGroup',
    colProps: { span: 8 },
    defaultValue: '0',
    componentProps: {
      options: [
        { label: "是", value: '0' }, //启用
        { label: "否", value: '1' }, //禁用
      ],
    },
  },

  {
    field: 'status',
    label: "是否共享", //状态
    component: 'RadioButtonGroup',
    colProps: { span: 8 },
    defaultValue: '0',
    componentProps: {
      options: [
        { label: "是", value: '0' }, //启用
        { label: "否", value: '1' }, //禁用
      ],
    },
  },

  {
    field: 'status',
    label: "是否展开", //状态
    component: 'RadioButtonGroup',
    colProps: { span: 8 },
    defaultValue: '0',
    componentProps: {
      options: [
        { label: "是", value: '0' }, //启用
        { label: "否", value: '1' }, //禁用
      ],
    },
  },
]