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: false,
  dialogClickModal: false,
  labelWidth:160,
  columnBtn:false,
  addBtn:false,
  editBtn:false,
  delBtn:false,
  column: {
  factoryId:{
      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",
      cascader: [getStore({ name: 'userInfo' }).user_category==1?'clientId':'',getStore({ name: 'userInfo' }).user_category==1?'productModelId':''],
      dicUrl: "/api/pl-factory/factory/select",
      props: {
        label: "name",
        value: "id",
      },
      rules: [{
        required: true,
        message: "请选择所属工厂",
        trigger: "blur"
      }]
    },
    createPersonName:{
      label: "上报人",
      prop: "createPersonName",
      type: "input",
      addDisplay: false,
      editDisplay: false,
    },
    createTime:{
      label: "上报日期",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
    },
    reworkPersonName:{
      label: "维修人",
      prop: "reworkPersonName",
      type: "input",
    },
    reworkDate:{
      label: "维修时间",
      prop: "reworkDate",
      type: "input",
    },
    auditPersonName:{
      label: "审核人",
      prop: "auditPersonName",
      type: "input",
    },
    auditDate:{
      label: "审核时间",
      prop: "auditDate",
      type: "input",
    },
    qrCode:{
      label: "产品二维码",
      prop: "qrCode",
      type: "input",
      search: true,
    },
    status:{
      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,
    },
  }
}
