import { BasicColumn } from '/src/components/Table'; import dayjs from 'dayjs'; import { isSohoeb2b } from '@/views/adweb/site/AdwebSite.api'; //列表数据 export const columns: BasicColumn[] = [ { title: '站点code', align: 'left', dataIndex: 'code', width: '130px', }, { title: '客户名', align: 'left', dataIndex: 'uid_dictText', width: 160, resizable: true, }, { title: '租户', align: 'left', dataIndex: 'channelProviderName', resizable: true, width: 200, customRender: function ({ text }) { if (text) { return text; } else { return '--'; } }, }, { title: '站点名称', align: 'left', dataIndex: 'name', width: 280, resizable: true, }, { title: '站点域名', align: 'left', dataIndex: 'domain', width: '360px', }, { title: '订阅套餐', align: 'left', dataIndex: 'subscribePlan', }, { title: '当前状态', align: 'left', dataIndex: 'status_dictText', }, { title: '建站状态', align: 'left', dataIndex: 'siteCurrentStep', }, { title: '建站进度', align: 'left', dataIndex: 'completeProcess', }, { title: '订单url', align: 'left', dataIndex: 'orderUrl', // 针对苏豪租户管理员展示订单url ifShow: isSohoeb2b({}), }, { title: '创建时间', align: 'left', dataIndex: 'ctime', }, { title: '预计发布时间', align: 'left', dataIndex: 'publishTime', customRender: function ({ text, record }) { return dayjs(record.ctime).add(1, 'month').format('YYYY-MM-DD'); }, }, { title: '实际发布时间', align: 'left', dataIndex: 'issueTime', customRender: function ({ text, record }) { return !text ? '-' : text.length > 16 ? text.substr(0, 16) : text; }, }, { title: '到期时间', align: 'left', dataIndex: 'etime', }, ]; // 高级查询数据 export const superQuerySchema = { uid: { title: '创建人', order: 0, view: 'sel_user', type: 'string' }, code: { title: '站点code', order: 1, view: 'text', type: 'string', }, name: { title: '站点名称', order: 2, view: 'text', type: 'string' }, domain: { title: '站点域名', order: 3, view: 'text', type: 'string' }, status: { title: '当前状态', order: 4, view: 'number', type: 'number', }, etime: { title: '到期时间,默认为ctime+1年', order: 5, view: 'datetime', type: 'string' }, };