import file from "@/assets/file.xls";
/**
 * 筛选条件排列组合
 */
const cartesianProduct = (...arrays) => {
  return arrays.reduce(
    (acc, array) => {
      return acc.flatMap((d) => {
        if (d?.name) {
          return array?.map((e) => ({ name: d?.name + "*" + e?.name }));
        } else {
          return array?.map((e) => ({ name: e?.name }));
        }
      });
    },
    [{}]
  );
};

const uploadFile = () => {
  window.open(file);
};

export default {
  cartesianProduct,
  uploadFile,
};
