import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '创建日期',
    align:"center",
    sorter: true,
    dataIndex: 'createTime'
   },
   {
    title: '所属区域',
    align:"center",
    dataIndex: 'iconClass_dictText'
   },
   {
    title: '图片',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '分类标识',
    align:"center",
    dataIndex: 'classId_dictText'
   },
   {
    title: '标签',
    align:"center",
    dataIndex: 'iconTitle'
   },
   {
    title: '价格',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '单位',
    align:"center",
    dataIndex: 'unit'
   },
   {
    title: '地址',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '浏览量',
    align:"center",
    dataIndex: 'num'
   },
   {
    title: '年限',
    align:"center",
    dataIndex: 'timeGo'
   },
   {
    title: '热点名称',
    align:"center",
    dataIndex: 'iconName'
   },
   {
    title: '视频',
    align:"center",
    dataIndex: 'homeMp4',
    slots: { customRender: 'fileSlot' },
   },
   {
    title: '户型',
    align:"center",
    dataIndex: 'homeType'
   },
   {
    title: '面积',
    align:"center",
    dataIndex: 'homeMi'
   },
   {
    title: '房屋结构',
    align:"center",
    dataIndex: 'homeJg'
   },
   {
    title: '房屋编号',
    align:"center",
    dataIndex: 'homeNo'
   },
   {
    title: '房屋周边',
    align:"center",
    dataIndex: 'homeBian'
   },
   {
    title: '房间数量',
    align:"center",
    dataIndex: 'homeNum'
   },
   {
    title: '菜地',
    align:"center",
    dataIndex: 'homeCai'
   },
   {
    title: '距离场镇距离',
    align:"center",
    dataIndex: 'homeJl'
   },
   {
    title: '距离成都西三环',
    align:"center",
    dataIndex: 'homeShjl'
   },
   {
    title: '房屋主体是否改造',
    align:"center",
    dataIndex: 'homeGz'
   },
   {
    title: '房屋面积',
    align:"center",
    dataIndex: 'homeMj'
   },
   {
    title: '院子总面积',
    align:"center",
    dataIndex: 'homeYzmj'
   },
   {
    title: '房屋朝向及海拔',
    align:"center",
    dataIndex: 'homeHb'
   },
   {
    title: '是否经过安置',
    align:"center",
    dataIndex: 'homeAz'
   },
   {
    title: '交通',
    align:"center",
    dataIndex: 'homeJt'
   },
   {
    title: '坟包及电塔 工厂噪音',
    align:"center",
    dataIndex: 'homeZy'
   },
   {
    title: '水电气网',
    align:"center",
    dataIndex: 'homeSd'
   },
   {
    title: '停车',
    align:"center",
    dataIndex: 'homeCat'
   },
   {
    title: '付款方式及押金',
    align:"center",
    dataIndex: 'homePay'
   },
   {
    title: '租期',
    align:"center",
    dataIndex: 'homeTime'
   },
   {
    title: '非正常死亡',
    align:"center",
    dataIndex: 'homeSw'
   },
   {
    title: '邻居对房东评价',
    align:"center",
    dataIndex: 'homePj'
   },
   {
    title: '佣金',
    align:"center",
    dataIndex: 'homeMoney'
   },
   {
    title: '钥匙',
    align:"center",
    dataIndex: 'homeYs'
   },
   {
    title: '户主家庭职业',
    align:"center",
    dataIndex: 'homeJtzy'
   },
   {
    title: '报建手续',
    align:"center",
    dataIndex: 'homeBjsx'
   },
   {
    title: '府市民云房屋信息档案查询',
    align:"center",
    dataIndex: 'homeTf',
    customRender:render.renderAvatar,
   },
   {
    title: '审核状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '户主年龄',
    align:"center",
    dataIndex: 'homeAge'
   },
   {
    title: '产权证照片',
    align:"center",
    dataIndex: 'homeImage',
    customRender:render.renderAvatar,
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'homeBz'
   },
   {
    title: '用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '经度',
    align:"center",
    dataIndex: 'longitude'
   },
   {
    title: '纬度',
    align:"center",
    dataIndex: 'latitude'
   },
   {
    title: '地区标识',
    align:"center",
    dataIndex: 'areaId_dictText'
   },
   {
    title: '视频',
    align:"center",
    dataIndex: 'mpVio',
    slots: { customRender: 'fileSlot' },
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "所属区域",
      field: "iconClass",
      component: 'JSearchSelect',
      componentProps:{
         dict:"common_icon_image,title,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "分类标识",
      field: "classId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"common_class,title,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "审核状态",
      field: "status",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"home_status"
      },
      colProps: {span: 6},
 	},
	{
      label: "用户",
      field: "userId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "地区标识",
      field: "areaId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"comm_city,title,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '所属区域',
    field: 'iconClass',
    component: 'JSearchSelect',
    componentProps:{
       dict:"common_icon_image,title,id"
    },
  },
  {
    label: '图片',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '分类标识',
    field: 'classId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"common_class,title,id"
    },
  },
  {
    label: '标签',
    field: 'iconTitle',
    component: 'Input',
  },
  {
    label: '价格',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '浏览量',
    field: 'num',
    component: 'InputNumber',
  },
  {
    label: '年限',
    field: 'timeGo',
    component: 'InputNumber',
  },
  {
    label: '热点名称',
    field: 'iconName',
    component: 'Input',
  },
  {
    label: '视频',
    field: 'homeMp4',
    component: 'JUpload',
    componentProps:{
     },
  },
  {
    label: '户型',
    field: 'homeType',
    component: 'Input',
  },
  {
    label: '面积',
    field: 'homeMi',
    component: 'Input',
  },
  {
    label: '房屋结构',
    field: 'homeJg',
    component: 'Input',
  },
  {
    label: '房屋编号',
    field: 'homeNo',
    component: 'Input',
  },
  {
    label: '房屋周边',
    field: 'homeBian',
    component: 'Input',
  },
  {
    label: '房间数量',
    field: 'homeNum',
    component: 'Input',
  },
  {
    label: '菜地',
    field: 'homeCai',
    component: 'Input',
  },
  {
    label: '距离场镇距离',
    field: 'homeJl',
    component: 'Input',
  },
  {
    label: '距离成都西三环',
    field: 'homeShjl',
    component: 'Input',
  },
  {
    label: '房屋主体是否改造',
    field: 'homeGz',
    component: 'Input',
  },
  {
    label: '房屋面积',
    field: 'homeMj',
    component: 'Input',
  },
  {
    label: '院子总面积',
    field: 'homeYzmj',
    component: 'Input',
  },
  {
    label: '房屋朝向及海拔',
    field: 'homeHb',
    component: 'Input',
  },
  {
    label: '是否经过安置',
    field: 'homeAz',
    component: 'Input',
  },
  {
    label: '交通',
    field: 'homeJt',
    component: 'Input',
  },
  {
    label: '坟包及电塔 工厂噪音',
    field: 'homeZy',
    component: 'Input',
  },
  {
    label: '水电气网',
    field: 'homeSd',
    component: 'Input',
  },
  {
    label: '停车',
    field: 'homeCat',
    component: 'Input',
  },
  {
    label: '付款方式及押金',
    field: 'homePay',
    component: 'Input',
  },
  {
    label: '租期',
    field: 'homeTime',
    component: 'Input',
  },
  {
    label: '非正常死亡',
    field: 'homeSw',
    component: 'Input',
  },
  {
    label: '邻居对房东评价',
    field: 'homePj',
    component: 'Input',
  },
  {
    label: '佣金',
    field: 'homeMoney',
    component: 'InputNumber',
  },
  {
    label: '钥匙',
    field: 'homeYs',
    component: 'InputNumber',
  },
  {
    label: '户主家庭职业',
    field: 'homeJtzy',
    component: 'Input',
  },
  {
    label: '报建手续',
    field: 'homeBjsx',
    component: 'Input',
  },
  {
    label: '府市民云房屋信息档案查询',
    field: 'homeTf',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '审核状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"home_status"
     },
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入审核状态!'},
          ];
     },
  },
  {
    label: '户主年龄',
    field: 'homeAge',
    component: 'Input',
  },
  {
    label: '产权证照片',
    field: 'homeImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '备注',
    field: 'homeBz',
    component: 'Input',
  },
  {
    label: '用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '经度',
    field: 'longitude',
    component: 'Input',
  },
  {
    label: '纬度',
    field: 'latitude',
    component: 'Input',
  },
  {
    label: '地区标识',
    field: 'areaId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"comm_city,title,id"
    },
  },
  {
    label: '视频',
    field: 'mpVio',
    component: 'JUpload',
    componentProps:{
     },
  },
];
