/*
 * @Company: 沈阳信诚科技
 * @Email: html_venustar@163.com
 * @Author: Liuqiming
 * @Description: 生产事件记录
 * @LastEditors: Liuqiming
 * @LastEditTime: 2024-03-05 09:21:51
 * @Date: 2024-02-26 16:55:19
 */

export const init = () => {

  const searchList = ref([
    {
      label: '炉号',
      field: 'lfHeatNo',
      width: '340px',
      clearable: true,
      placeholder: '请输入炉号',
    },
    {
      label: '铸坯编号',
      field: 'prdNo',
      width: '340px',
      clearable: true,
      placeholder: '请输入铸坯编号',
    },
    {
      label: '钢包到站',
      field: 'ladleArriveTimes',
      width: '340px',
      type: 'date',
      enum: 'daterange', // 其他类型枚举 week, month, year, date, daterange
      placeholder: '开始日期-结束日期' // 若选择框枚举类型为daterange， 此值接受 a-b 式截取提示内容展示
    }
  ])
  const btnList = ref([])
  const columns = ref([
    {
      label: "铸坯编号",
      prop: "prdNo",
      minWidth: 160
    },
    {
      label: "铸流号",
      prop: "prdStrandNo",
      minWidth: 160
    },
    {
      label: "炉号",
      prop: "lfHeatNo",
      minWidth: 120
    },
    {
      label: "钢种",
      prop: "steelGrade",
      minWidth: 100
    },
    {
      label: "钢包到站时间",
      sort: true,
      prop: "ladleArriveTime",
      minWidth: 140
    },
    {
      label: "钢包离站时间",
      sort: true,
      prop: "ladleDepartureTime",
      minWidth: 140
    },
    {
      label: "开始浇铸时间",
      sort: true,
      prop: "startHeatTime",
      minWidth: 140
    },
    {
      label: "铸流开始时间",
      sort: true,
      prop: "strandOpenTime",
      minWidth: 140
    },
    {
      label: "炉次浇铸开始时间",
      sort: true,
      prop: "strandHeatStartTime",
      minWidth: 170
    },
    {
      label: "炉次浇铸结束时间",
      sort: true,
      prop: "strandHeatStopTime",
      minWidth: 170
    },
    {
      label: "铸流结束时间",
      sort: true,
      prop: "strandCloseTime",
      minWidth: 170
    },
  ])
  const pageSet = ref({
    pageNum: 1,
    pageSize: 10,
    total:0
  })
  // 表格表单公共配置
  const tableOption = ref({
    checkbox: false, // 是否展示多选框
    index: true, // 是否展示序号
    fixed: "left", // 是否将多选框及序号列固定在最左侧
    stripe: true, // 是否斑马纹表格
    border: false, // 是否表格边框
    pageHidden: false, // 是否隐藏分页
    maxHeight: '70vh'
  })
  return {
    searchList,
    btnList,
    columns,
    pageSet,
    tableOption,
  }
}
