/** 功能列表页数据项配置 */
import { appRestApi } from '@/api/application';

// 搜索栏配置
const conditionForm = [
  {
    label: '应用系统名称',
    name: 'applyName',
    op: '=',
    value: '',
    component: 'SelectApp',
    apiUrl: appRestApi.table,
    valueName: "applyName",
    labelName: "applyName"
  },
  {
    label: '应用系统在用标识',
    name: 'applyStatus',
    op: '=',
    value: '',
    component: 'DgSelect',
    attr: {
      code: 'DM_APPLY_STATUS'
    }
  }
];

// 页面操作
const pageOptList = ['新增', '导入', '同步'];

// 表头操作
const tableOptList = ['详情', '修改', '功能配置','删除'];

// 列表
const tableHeader = [
  {
    label: '应用系统编号',
    prop: 'applyCode'
  },
  {
    label: '应用系统名称',
    prop: 'applyName'
  },
  {
    label: '应用英文名称',
    prop: 'appEnglishName'
  },
  {
    label: '应用系统在用标识',
    prop: 'applyStatus',
    code: 'DM_APPLY_STATUS'
  }
];

// 表单配置
const appForm = [
  {
    label: '应用系统名称',
    prop: 'applyName',
    component: 'ElInput',
    value: '',
    rules: [{ required: true, message: '请输入应用系统名称', trigger: 'change' }]
  },
  {
    label: '应用英文名称',
    prop: 'appEnglishName',
    component: 'ElInput',
    value: '',
    rules: [{ required: true, message: '请输入应用英文名称', trigger: 'change' }]
  },
  {
    label: '上线日期',
    prop: 'lineTime',
    component: 'DgDatePicker',
    value: '',
    attr: {
      type: 'date'
    },
    dateFormat: 'YYYY-MM-DD'
  },
  {
    label: '应用负责人姓名',
    prop: 'fzr',
    component: 'ElInput',
    value: ''
  },
  {
    label: '应用系统管理单位名称',
    prop: 'managerOrgName',
    component: 'ElInput',
    value: ''
  },
  {
    label: '应用系统编号',
    prop: 'applyCode',
    component: 'ElInput',
    value: '',
    rules: [{ required: true, message: '请输入应用系统编号', trigger: 'change' }]
  },
  {
    label: '应用系统在用标识',
    prop: 'applyStatus',
    component: 'DgSelect',
    value: '',
    rules: [{ required: true, message: '请选择应用系统在用标识', trigger: 'change' }],
    attr: {
      code: 'DM_APPLY_STATUS'
    },
    code: 'DM_APPLY_STATUS'
  },
  {
    label: '应用系统事权单位代码',
    prop: 'orgCode',
    component: 'ElInput',
    value: ''
  },
  {
    label: '应用系统运维单位名称',
    prop: 'appOpsDepName',
    component: 'ElInput',
    value: ''
  },
  {
    label: '应用系统说明',
    prop: 'managerDescribe',
    component: 'ElInput',
    attr: {
      type: 'textarea',
      rows: 3
    },
    value: '',
    span: 24
  }
];

export { conditionForm, pageOptList, tableOptList, tableHeader, appForm };
