Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
b675a6f4
Commit
b675a6f4
authored
Dec 03, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ab01ebd6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
16 deletions
+50
-16
configurations.example.ts
src/assets/configurations.example.ts
+2
-1
type.ts
src/assets/type.ts
+4
-0
add.vue
src/components/danh-sach-san-pham-noi-bat-chua-chon/add.vue
+43
-14
index.vue
src/pages/cau-hinh-trang-chu/index.vue
+1
-1
No files found.
src/assets/configurations.example.ts
View file @
b675a6f4
...
@@ -135,5 +135,6 @@ export enum API_PATHS {
...
@@ -135,5 +135,6 @@ export enum API_PATHS {
formalityDeposit
=
'common/formalityDeposit'
,
// danh sách hình thức đặt cọc
formalityDeposit
=
'common/formalityDeposit'
,
// danh sách hình thức đặt cọc
configHomeProduct
=
'config/home/product'
,
configHomeProduct
=
'config/home/product'
,
artistFeaturedProduct
=
'artist/featuredProduct'
,
artistFeaturedProduct
=
'artist/featuredProduct'
,
homeProductNotActive
=
'config/home/productNotActive'
homeProductNotActive
=
'config/home/productNotActive'
,
artistFeaturedProducts
=
'artist/featuredProducts'
}
}
src/assets/type.ts
View file @
b675a6f4
...
@@ -85,6 +85,10 @@ export type ArtistInfoType = {
...
@@ -85,6 +85,10 @@ export type ArtistInfoType = {
};
};
};
};
export
type
artistFeatured
=
{
ids
:
string
;
};
export
type
listProductNotActives
=
{
export
type
listProductNotActives
=
{
artistId
:
number
;
artistId
:
number
;
artistName
:
{
artistName
:
{
...
...
src/components/danh-sach-san-pham-noi-bat-chua-chon/add.vue
View file @
b675a6f4
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
:rows=
"bannerTableRows"
:rows=
"bannerTableRows"
:columns=
"bannerTableColumns"
:columns=
"bannerTableColumns"
row-key=
"id"
row-key=
"id"
wrap-cells
wrap-cells
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
:rows-per-page-label=
"$t('recordPerPage')"
:rows-per-page-label=
"$t('recordPerPage')"
...
@@ -56,7 +55,13 @@
...
@@ -56,7 +55,13 @@
</div>
</div>
<q-card-actions
align=
"right"
>
<q-card-actions
align=
"right"
>
<q-btn
@
click=
"handleTogle"
color=
"grey"
no-caps
style=
"width: 90px"
label=
"Hủy"
/>
<q-btn
@
click=
"handleTogle"
color=
"grey"
no-caps
style=
"width: 90px"
label=
"Hủy"
/>
<q-btn
<q-btn
type=
"submit"
type=
"submit"
color=
"primary"
color=
"primary"
...
@@ -97,12 +102,11 @@ export default defineComponent({
...
@@ -97,12 +102,11 @@ export default defineComponent({
()
=>
props
.
isOpened
,
()
=>
props
.
isOpened
,
(
value
)
=>
{
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
selected
.
value
=
[]
selected
.
value
=
[];
void
listProductNotActive
();
void
listProductNotActive
();
}
}
}
}
);
);
const
bannerTableColumns
=
[
const
bannerTableColumns
=
[
{
{
name
:
'name'
,
name
:
'name'
,
...
@@ -154,8 +158,8 @@ export default defineComponent({
...
@@ -154,8 +158,8 @@ export default defineComponent({
];
];
const
configImg
=
config
;
const
configImg
=
config
;
const
selected
=
ref
([]);
const
selected
:
Ref
<
listProductNotActives
[]
>
=
ref
([]);
const
getSelectedString
=
()
=>
{
const
getSelectedString
=
()
=>
{
return
selected
.
value
.
length
===
0
return
selected
.
value
.
length
===
0
?
''
?
''
:
`
${
selected
.
value
.
length
}
sản phẩm đã được chọn `
;
:
`
${
selected
.
value
.
length
}
sản phẩm đã được chọn `
;
...
@@ -165,15 +169,40 @@ export default defineComponent({
...
@@ -165,15 +169,40 @@ export default defineComponent({
pageIndex
.
value
=
1
;
pageIndex
.
value
=
1
;
void
listProductNotActive
();
void
listProductNotActive
();
};
};
const
handleConfirmAdd
=
async
()
=>
{
const
data
=
[]
as
any
[]
for
(
let
i
=
0
;
i
<
selected
.
value
.
length
;
i
++
)
{
data
.
push
(
selected
.
value
[
i
]?.
id
)
}
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
artistFeaturedProducts
,
method
:
'GET'
,
params
:
{
ids
:
data
.
join
(),
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
BaseResponseBody
<
listProductNotActives
[]
>>
>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
'Thêm sản phẩm nổi bật thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
context
.
emit
(
'saveBannerInfo'
)
context
.
emit
(
'update:isOpened'
,
false
);
}
}
catch
(
error
)
{}
};
const
handleConfirmAdd
=
()
=>
{
const
handleTogle
=
()
=>
{
console
.
log
(
selected
.
value
)
context
.
emit
(
'update:isOpened'
,
false
);
}
const
handleTogle
=
()
=>
{
context
.
emit
(
'update:isOpened'
,
false
);
context
.
emit
(
'update:isOpened'
,
false
);
}
};
const
pageIndex
=
ref
(
1
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
pageSize
=
ref
(
20
);
...
@@ -219,6 +248,6 @@ export default defineComponent({
...
@@ -219,6 +248,6 @@ export default defineComponent({
handleTogle
,
handleTogle
,
};
};
},
},
emits
:
[
'update:isOpened'
],
emits
:
[
'update:isOpened'
,
'saveBannerInfo'
],
});
});
</
script
>
</
script
>
src/pages/cau-hinh-trang-chu/index.vue
View file @
b675a6f4
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<AddDialog
<AddDialog
v-model:isOpened=
"openAddDialog"
v-model:isOpened=
"openAddDialog"
@
saveBannerInfo=
"
addBanner
"
@
saveBannerInfo=
"
configHomeProduct
"
/>
/>
</div>
</div>
</template>
</template>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment