/* eslint-disable prettier/prettier */
import { ContentConfig } from "/@/components/PageContent";
import apis from "./apis";

const columns = [
  {
    prop: 'name',
    label: '部门名称',
    _slot_: 'name'
  },
  {
    prop: 'companyNo',
    label: '业务公司编码',
    minWidth: '155px'
  },
  {
    prop: 'companyName',
    label: '业务公司名称',
    minWidth: '165px'
  },
  {
    prop: 'tag_1',
    label: '库存'
  },
  {
    prop: 'tag_2',
    label: '非库存'
  },
  {
    prop: 'tag_3',
    label: '咨询采反'
  },
  {
    prop: 'tag_total',
    label: '总计'
  }
]


const contentConfig: ContentConfig = {
  columns,
  showTitle: false,
  responseCode: 1,
  superUserNoAction: false,
  notPagination: true,
  root: true,
  handleData(data) {
    const list = Object.values(data);
    const total = list.shift();

    console.log([...list, total])
    return [...list, total];
  },
  apis: { httpList: apis.list }
};


export default contentConfig;
