update

parent 2697d630
......@@ -256,8 +256,8 @@
<div class="row">
<div class="col">
<q-btn
:loading="loading"
color="primary"
no-caps
style="width: 7.14rem"
label="Xuất File"
@click="exportFile"
......@@ -508,8 +508,33 @@ export default defineComponent({
const costTo = ref(100000000);
// const level: Ref<string | null> = ref(null);
const upload = ref(null);
const exportFile = () => {
window.location.href = `${config.API_ENDPOINT}artist/exportExcel?pageIndex=${pageIndex.value}&pageSize=${totalRecords.value}&name=${fullNameKeyword.value}&fromMoney=${costFrom.value}&toMoney=${costTo.value}&channel=CMS`;
const loading = ref(false);
const exportFile = async () => {
loading.value = true;
try {
const dataItem = (await api({
url: API_PATHS.exportExcel,
method: 'GET',
params: {
pageIndex: pageIndex.value,
pageSize: totalRecords.value,
name: fullNameKeyword.value,
field: fieldSelected.value?.id,
qualification: professionSelected.value?.id,
address: provinceSelected.value?.name,
musicTypeDto: musics.value?.id,
fromMoney: costFrom.value,
toMoney: costTo.value,
},
})) as AxiosResponse<BaseResponseBody<unknown>>;
if (dataItem.data.error.code === config.API_RES_CODE.OK.code) {
loading.value = false;
window.location.href = dataItem.data.data as string;
}
} catch (error) {}
};
const callApiUploadAvatar = async (file: File) => {
try {
......@@ -790,6 +815,7 @@ export default defineComponent({
provinceOptions,
costFrom,
costTo,
loading,
// level,
getProvinceOptions,
getMusicTypeOptions,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment