import { setStore, getStore } from '@/utils/store';
export default {
  height:'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  labelWidth:160,
  columnBtn:false,
  addBtn:false,
  editBtn:false,
  delBtn:false,
  column: [
    {
      label: "主键",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "租户ID",
      prop: "tenantId",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "所属工厂",
      prop: "factoryId",
      search: getStore({ name: 'userInfo' }).user_category==1,
      hide: getStore({ name: 'userInfo' }).user_category!=1,
      display: getStore({ name: 'userInfo' }).user_category==1,
      type: "tree",
      dicUrl: "/api/pl-factory/factory/select",
      props: {
        label: "name",
        value: "id",
      },
    },
    {
      label: "产品id",
      prop: "productId",
      type: "input",
      hide: true,
    },
    {
      label: "产品二维码",
      prop: "qrCode",
      type: "input",
      search: true,
    },
    {
      label: "产品型号id",
      prop: "productModelId",
      type: "input",
      hide: true,
    },
    {
      label: "产品名称",
      prop: "productName",
      type: "input",
      search: true,
    },
    {
      label: "产品型号",
      prop: "productModel",
      type: "input",
      search: true,
    },
    {
      label: "状态",
      prop: "status",
      addDisplay: false,
      editDisplay: false,
      type:"select",
      dataType:"number",
      dicUrl:"/blade-system/dict-biz/dictionary?code=repair_status",
      props:{label:"dictValue",value:"dictKey"},
      search: true,
    },
    {
      label: "报修图片",
      prop: "repairsImgs",
      dataType: 'string',
      type: 'upload',
      hide: true,
      fileType:'img',//img/video/audio
      tip: '只能上传jpg/png图片',
      listType: 'picture-img',
      span:24
    },
    {
      label: "问题描述",
      prop: "problemDesc",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      hide: true,
      span:24
    },
    {
      label: "上报人",
      prop: "createPersonName",
      type: "input",
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: "上报日期",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: "维修人",
      prop: "reworkPersonName",
      type: "input",
    },
    {
      label: "维修时间",
      prop: "reworkDate",
      type: "input",
    },
    {
      label: "维修图片",
      prop: "reworkImgs",
      dataType: 'string',
      type: 'upload',
      hide: true,
      fileType:'img',//img/video/audio
      tip: '只能上传jpg/png图片',
      listType: 'picture-img',
      span:24
    },
    {
      label: "审核人",
      prop: "auditPersonName",
      type: "input",
    },
    {
      label: "审核时间",
      prop: "auditDate",
      type: "input",
    },
    {
      label: "创建人",
      prop: "createUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
  ]
}
