/**
 * @desc 集成产品清单
 * @date 2023-07-10
 */
// 表头
const tableColumnData = [
  {
    label: '接口名称',
    prop: 'name'
  }, {
    label: '服务名',
    prop: 'beanName'
  },
  {
    label: '方法名',
    prop: 'interfaceName'
  },
  {
    label: '备注',
    prop: 'remark'
  },
  {
    label: '状态',
    prop: 'state'
  }
]
const tableVersionColumn = [
  {
    label: '参数',
    prop: 'argName'
  },
  {
    label: '参数值',
    prop: 'argValue'
  },
  {
    label: '备注',
    prop: 'remark'
  }

]

// 基本信息内容
const formRow = [
  {
    elCol: [{
      label: '接口名称',
      prop: 'name',
      tag: 'elInput',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '服务名',
      prop: 'beanName',
      tag: 'elInput',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '方法名',
      prop: 'interfaceName',
      tag: 'elInput',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '状态',
      prop: 'state',
      tag: 'elRadio',
      span: 24,
      options: [
        {
          label: '启用',
          value: '0'
        },
        {
          label: '停用',
          value: '1'
        }
      ]
    }]
  },
  {
    elCol: [{
      label: '描述',
      prop: 'remark',
      tag: 'elInput',
      type: 'textarea',
      span: 24
    }]
  }
]

const basicsRules = {
  name: [{
    required: true,
    message: '请输入接口名称',
    trigger: 'blur'
  }],
  beanName: [{
    required: true,
    message: '请输入服务名',
    trigger: 'blur'
  }],
  interfaceName: [{
    required: true,
    message: '请输入方法名',
    trigger: 'blur'
  }],
}

// 查看
const formRowShow = [
  {
    elCol: [{
      label: '接口名称',
      prop: 'name',
      tag: 'elLook',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '服务名',
      prop: 'beanName',
      tag: 'elLook',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '方法名',
      prop: 'interfaceName',
      tag: 'elLook',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '状态',
      prop: 'state',
      tag: 'elRadio',
      disabled:true,
      span: 24,
      options: [
        {
          label: '启用',
          value: '0'
        },
        {
          label: '停用',
          value: '1'
        }
      ]
    }]
  },
  {
    elCol: [{
      label: '描述',
      prop: 'remark',
      tag: 'elLook',
      type: 'textarea',
      span: 24
    }]
  }
]
const operationTableColumn = [
  {
    label: '本次推送的执行时间',
    prop: 'create_time'
  },
  {
    label: '本次推送的入参',
    prop: 'inParameter'
  },
  {
    label: '推送人名称',
    prop: 'create_user_id'
  }
]
export default {
  tableColumnData,
  formRow,
  basicsRules,
  formRowShow,
  tableVersionColumn,
  operationTableColumn
}
