billboard.api.ts 646 B

123456789101112131415161718192021222324252627
  1. import { BillboardType } from './billboard.data';
  2. import { useUserStore } from '/@/store/modules/user';
  3. import { defHttp } from '/@/utils/http/axios';
  4. const store = useUserStore();
  5. enum Api {
  6. getSummary = '/ventanaly-company/company/index/getEachMinePlateInfo',
  7. }
  8. /**
  9. * 获取看板的详细数据
  10. * @param params
  11. */
  12. export const getSummary: () => Promise<BillboardType[]> = () =>
  13. defHttp
  14. .post({
  15. url: Api.getSummary,
  16. params: {
  17. userName: store.userInfo?.username,
  18. },
  19. })
  20. .then((res: BillboardType[]) => {
  21. return res.reverse().sort((r) => {
  22. return r.orgname ? -1 : 1;
  23. });
  24. });