update

parent 45dc9acb
......@@ -142,5 +142,6 @@ export enum API_PATHS {
artistOwnerBrowseManagement = 'artistOwner/browseManagement',
// thêm người dùng vào nhóm
addUser = 'user/group/addUser',
importExcel = 'artist/importExcel'
importExcel = 'artist/importExcel',
exportExcel = 'artist/exportExcel'
}
......@@ -252,14 +252,29 @@
</q-card>
</q-dialog>
<div class="col-12 q-mt-sm">
<Pagination
v-model:currentPage="pageIndex"
v-model:pageSize="pageSize"
:totalPage="totalPage"
@update:pageSize="changePageSize"
@update:currentPage="getListArtists"
/>
<div class="col-12">
<div class="row">
<div class="col">
<q-btn
color="primary"
no-caps
style="width: 7.14rem"
label="Xuất File"
@click="exportFile"
>
</q-btn>
</div>
<div class="col">
<Pagination
v-model:currentPage="pageIndex"
v-model:pageSize="pageSize"
:totalPage="totalPage"
@update:pageSize="changePageSize"
@update:currentPage="getListArtists"
/>
</div>
</div>
</div>
<AddNewArtistDialog
v-model:is-open-new-artist-dialog="isOpenNewArtistDialog"
......@@ -440,6 +455,7 @@ export default defineComponent({
const pageIndex = ref(1);
const pageSize = ref(20);
const totalPage = ref(0);
const totalRecords = ref(0);
const fullNameKeyword = ref('');
const sexOptions = ref([
{ id: 1, name: 'Nam' },
......@@ -492,7 +508,9 @@ 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_IMAGE_ENDPOINT}artist/exportExcel?pageIndex=${pageIndex.value}&pageSize=${totalRecords.value}&name=${fullNameKeyword.value}&fromMoney=${costFrom.value}&toMoney=${costTo.value}&channel=CMS`;
};
const callApiUploadAvatar = async (file: File) => {
try {
const bodyFormData = new FormData();
......@@ -587,6 +605,7 @@ export default defineComponent({
if (response.data.error.code === config.API_RES_CODE.OK.code) {
userTableRowsArtist.value = response.data.data.data;
totalPage.value = response.data.data.totalPages;
totalRecords.value = response.data.data.totalRecords;
}
} catch (error) {}
};
......@@ -723,9 +742,11 @@ export default defineComponent({
configImg,
userTableColumnsArtist,
userTableRowsArtist,
exportFile,
getListArtists,
pageIndex,
pageSize,
totalRecords,
isOpenNewArtistDialog,
id,
// artistCode,
......
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