import { ProColumns } from "@ant-design/pro-components"; import { useModel } from "@umijs/max"; import { Badge, Button, Image, Space, Tag } from "antd"; import PopUp from "./popUp"; export const columns = (sync: (id: any) => void): ProColumns[] => { const { getEnum } = useModel("global") return [ { title: "企微名称", dataIndex: 'corpName', key: "corpName", align: "center", width:100, ellipsis:true, fixed: 'left' }, { title: "企微ID", dataIndex: 'corpId', key: "corpId", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "授权方企业类型", dataIndex: 'corpType', key: "corpType", hideInSearch: true, align: "center", width:100, ellipsis:true, valueEnum: getEnum("CORPTYPE", "map") }, { title: "授权方企业用户规模", dataIndex: 'corpUserMax', key: "corpUserMax", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "授权方企业的主体名称", dataIndex: 'corpFullName', key: "corpFullName", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "认证到期时间", dataIndex: 'verifiedEndTime', key: "verifiedEndTime", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "企业类型", dataIndex: 'subjectType', key: "subjectType", hideInSearch: true, align: "center", width:100, ellipsis:true, valueEnum: getEnum("SUBJECTTYPE", "map") }, { title: "企业规模", dataIndex: 'corpScale', key: "corpScale", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "所属行业", dataIndex: 'corpIndustry', key: "corpIndustry", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "所属子行业", dataIndex: 'corpSubIndustry', key: "corpSubIndustry", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "授权方应用id", dataIndex: 'agentId', key: "agentId", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "所属分销商账号id", dataIndex: 'authDistributorAccountId', key: "authDistributorAccountId", hideInSearch: true, width:100, ellipsis:true, align: "center", }, { title: "授权状态", dataIndex: 'authStatus', key: "authStatus", align: "center", width:100, ellipsis:true, valueEnum(row) { return { "1": { text: }, "-1": { text: } } }, }, { title: "授权时间", dataIndex: 'createTime', key: "createTime", hideInSearch: true, align: "center", width:100, ellipsis:true, }, { title: "关注二维码", tooltip: "授权企业在微信插件(原企业号)的二维码,可用于关注微信插件", dataIndex: 'corpWxQrcode', key: "corpWxQrcode", hideInSearch: true, align: "center", ellipsis:true, width: 120, render: (_, row) => { return } }, { title: "操作", dataIndex: 'option', valueType: 'option', align: "center", width: 90, render: (_, record) => { return }, }, ]; } export function PopUpColumns(): ProColumns[] { const { getEnum } = useModel("global") return [ { title: "企微客服id", dataIndex: 'corpUserId', key: "corpUserId", hideInSearch: true, align: "center", }, { title: "企微客服名称", dataIndex: 'name', key: "name", align: "center", }, { title: "性别", dataIndex: 'gender', key: "gender", align: "center", hideInSearch: true, valueEnum(row) { return { 0: { text: 未知 }, 1: { text: }, 2: { text: } } }, }, { title: "分销商账号", dataIndex: 'distributorAccountName', key: "distributorAccountName", hideInSearch: true, align: "center", }, { title: "状态", dataIndex: 'status', key: "status", hideInSearch: true, align: "center", valueEnum:()=>{ let obj = getEnum("CORPSTATE", "obj") let colors = ["success","error","default","warning"] Object.keys(obj).forEach((key:any,index)=>{ obj[key] = { text:{obj[key].text} } }) return obj } }, ] }