
import { Button, Popconfirm } from 'antd'
import FormPage from '../../components/FormPage';
import {initFilter} from "../../utils/common";

//用户列表页
export default {
  fmtUSAGE: ({ record, loadData, getLoadParam, login, btn, dispatch, onRefreshTableData, width }) => {
    let ret = [];
    if (record && record.USAGE){
      let v = record.USAGE;
      if ((v  & 1) != 0){
        ret.push("安全意识调查");
      }
      if ((v  & 2) != 0){
        ret.push("培训");
      }
      if ((v  & 4) != 0){
        ret.push("事故事件");
      }
    }
    return ret.join("、");
  },
  fmtPost: ({ record, loadData, getLoadParam, login, btn, dispatch, onRefreshTableData, width }) => {
    let ret = [];
    if (record && record.Nav_Posts){
      record.Nav_Posts.forEach(it => it.Nav_Post && ret.push(it.Nav_Post.NAME))
    }
    return ret.join("、");
  },
  fmtPoint: ({ record, loadData, getLoadParam, login, btn, dispatch, onRefreshTableData, width }) => {
    let ret = [];
    if (record && record.Nav_Points){
      record.Nav_Points.forEach(it => it.Nav_Point && ret.push(it.Nav_Point.NAME))
    }
    return ret.join("、");
  },
} 
