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
f9adb60e
Commit
f9adb60e
authored
Jul 30, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f0e30840
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1243 additions
and
284 deletions
+1243
-284
configurations.example.ts
src/assets/configurations.example.ts
+10
-0
type.ts
src/assets/type.ts
+102
-0
index.vue
src/components/add-update-banner/index.vue
+80
-56
index.vue
...onents/add-update-cau-hinh-doi-tac-truyen-thong/index.vue
+273
-0
index.ts
src/i18n/vi/index.ts
+127
-79
index.vue
src/pages/banner/index.vue
+178
-149
index.vue
src/pages/cau-hinh-doi-tac-truyen-thong/index.vue
+466
-0
routes.ts
src/router/routes.ts
+7
-0
No files found.
src/assets/configurations.example.ts
View file @
f9adb60e
...
@@ -97,4 +97,14 @@ export enum API_PATHS {
...
@@ -97,4 +97,14 @@ export enum API_PATHS {
getDetailInfoVAB
=
'information/detail'
,
getDetailInfoVAB
=
'information/detail'
,
updateInfoVAB
=
'information/update'
,
updateInfoVAB
=
'information/update'
,
getListVABInfo
=
'information'
,
getListVABInfo
=
'information'
,
getListBanner
=
'config/home/banner'
,
getDetailBanner
=
'config/home/banner/detail'
,
addBanner
=
'config/home/banner/add'
,
updateBanner
=
'config/home/banner/update'
,
deleteBanner
=
'config/home/banner/delete'
,
getListConfigPartner
=
'config/home/partner'
,
deleteConfigPartner
=
'config/home/partner/delete'
,
addConfigPartner
=
'config/home/partner/add'
,
getDetailConfigPartner
=
'config/home/partner/detail'
,
updateConfigPartner
=
'config/home/partner/update'
,
}
}
src/assets/type.ts
View file @
f9adb60e
...
@@ -565,3 +565,105 @@ export type UpdateVABInfoType = {
...
@@ -565,3 +565,105 @@ export type UpdateVABInfoType = {
twtLink
:
string
;
twtLink
:
string
;
fbLink
:
string
;
fbLink
:
string
;
};
};
export
type
ListBannerConfig
=
{
id
:
number
;
name
:
string
;
bannerType
:
string
;
numIndex
:
number
;
image
:
string
;
urlTarget
:
string
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
DetailBannerConfig
=
{
id
:
number
;
name
:
string
;
bannerType
:
string
;
numIndex
:
number
;
image
:
string
;
urlTarget
:
string
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
UpdateBannerConfig
=
{
id
:
number
;
name
:
string
;
bannerType
:
string
;
numIndex
:
number
;
image
:
string
;
urlTarget
:
string
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
AddBannerConfig
=
{
name
:
string
;
bannerType
:
string
;
numIndex
:
number
;
image
:
string
;
urlTarget
:
string
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
ListConfigPartner
=
{
id
:
number
;
name
:
string
;
image
:
string
;
numIndex
:
number
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
DetailConfigPartner
=
{
id
:
number
;
name
:
string
;
image
:
string
;
numIndex
:
number
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
updateConfigPartnerConfig
=
{
id
:
number
;
name
:
string
;
image
:
string
;
numIndex
:
number
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
export
type
addConfigPartnerConfig
=
{
name
:
string
;
image
:
string
;
numIndex
:
number
;
status
:
number
;
createBy
:
string
;
createTime
:
string
;
updateBy
:
string
;
updateTime
:
string
;
};
src/components/add-update-banner/index.vue
View file @
f9adb60e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
:model-value=
"isOpened"
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
>
<q-card
class=
"full-width"
style=
"max-width:
5
0rem"
bordered
>
<q-card
class=
"full-width"
style=
"max-width:
8
0rem"
bordered
>
<q-form
<q-form
greedy
greedy
@
submit
.
prevent=
"
@
submit
.
prevent=
"
...
@@ -27,53 +27,69 @@
...
@@ -27,53 +27,69 @@
<q-card-section
<q-card-section
class=
"overflow-auto"
class=
"overflow-auto"
style=
"max-height: calc(100vh - 1
0
rem)"
style=
"max-height: calc(100vh - 1
5
rem)"
>
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<div
class=
"row flex-center
q-pt-sm
"
>
<div
class=
"row flex-center"
>
<div>
<div>
<q-card
style=
"margin-bottom: 8px
"
v-if=
"image !== null"
>
<q-card
class=
"q-mb-sm
"
v-if=
"image !== null"
>
<q-img
<q-img
:src=
"image"
style=
"height: 268px; width: 350px"
@
click=
"uploadAvatar"
@
click=
"uploadAvatar"
>
:src=
"image"
</q-img>
style=
"height: 250px; width: 450px; cursor: pointer"
></q-img>
<q-icon
<q-icon
name=
"mdi-close-circle"
name=
"mdi-close-circle"
color=
"red"
color=
"red"
style=
"position: absolute; right: 0; font-size: 18px"
style=
"
position: absolute;
right: 0;
font-size: 18px;
cursor: pointer;
"
@
click=
"deleteAvatar"
@
click=
"deleteAvatar"
></q-icon>
></q-icon>
</q-card>
</q-card>
<q-card
v-else
style=
"margin-bottom: 8px"
>
<div
<q-img
@
click=
"uploadAvatar"
src=
"~/assets/noavatar.png"
v-else
style=
"height: 265px; width: 350px"
class=
"q-mb-sm"
></q-img>
style=
"
</q-card>
height: 250px;
width: 450px;
<q-card
@
click=
"uploadAvatar"
>
border: 2px dashed #5d319e;
<div
align=
"center"
class=
"flex flex-center q-py-xs"
>
border-radius: 4px;
cursor: pointer;
"
>
<div
style=
"
height: 250px;
width: 450px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<q-icon
<q-icon
style=
"color: #5d319e"
style=
"color: #5d319e"
name=
"mdi-
plus-circle-outline
"
name=
"mdi-
cloud-upload
"
:size=
"'xs'
"
size=
"xl
"
></q-icon>
></q-icon>
<div
class=
"q-mt-xs"
>
Tải ảnh lên
{{
$t
(
'banner.uploadImg'
)
}}
</div>
</div>
</div>
</div>
<div>
<input
<input
ref=
"upload"
ref=
"upload"
hidden
hidden
type=
"file"
@
change=
"selectedFile($event.target.files)"
@
change=
"selectedFile($event.target.files)"
type=
"file"
accept=
"image/png, image/jpeg"
accept=
"image/png, image/jpeg"
/>
/>
</
q-card
>
</
div
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -88,7 +104,17 @@
...
@@ -88,7 +104,17 @@
:rules=
"nameRules"
:rules=
"nameRules"
clearable
clearable
></q-input>
></q-input>
<q-select
<q-input
:model-value=
"numIndex"
@
update:model-value=
"$emit('update:numIndex', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.numIndex')"
mask=
"####"
class=
"q-my-sm"
outlined
:rules=
"numIndexRules"
clearable
></q-input>
<!--
<q-select
:model-value=
"type"
:model-value=
"type"
@
update:model-value=
"$emit('update:type', $event)"
@
update:model-value=
"$emit('update:type', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.type')"
:label=
"$t('banner.dialogLabel.bannerLabels.type')"
...
@@ -100,21 +126,19 @@
...
@@ -100,21 +126,19 @@
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
></q-select>
></q-select>
-->
<q-select
<
!--
<
q-select
:model-value=
"location"
:model-value=
"location"
@
update:model-value=
"$emit('update:location', $event)"
@
update:model-value=
"$emit('update:location', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.location')"
:label=
"$t('banner.dialogLabel.bannerLabels.location')"
:rules=
"locationRules"
:rules=
"locationRules"
:options=
"locationOptions"
:options=
"locationOptions"
map-options
map-options
option-value=
"id"
option-label=
"name"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
></q-select>
></q-select>
-->
<q-input
<
!--
<
q-input
:model-value=
"urlTarget"
:model-value=
"urlTarget"
@
update:model-value=
"$emit('update:urlTarget', $event)"
@
update:model-value=
"$emit('update:urlTarget', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.urlTarget')"
:label=
"$t('banner.dialogLabel.bannerLabels.urlTarget')"
...
@@ -123,7 +147,7 @@
...
@@ -123,7 +147,7 @@
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
clearable
clearable
></q-input>
></q-input>
-->
<div
class=
"q-pt-sm"
>
<div
class=
"q-pt-sm"
>
<span
class=
"text-body1"
>
{{
<span
class=
"text-body1"
>
{{
$t
(
'banner.dialogLabel.bannerLabels.status'
)
$t
(
'banner.dialogLabel.bannerLabels.status'
)
...
@@ -175,12 +199,11 @@ export default defineComponent({
...
@@ -175,12 +199,11 @@ export default defineComponent({
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
name
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
image
:
{
type
:
String
,
required
:
true
},
image
:
{
type
:
String
,
required
:
true
},
urlTarget
:
{
type
:
String
,
required
:
true
},
//
urlTarget: { type: String, required: true },
status
:
{
type
:
Number
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
type
:
{
type
:
Number
,
required
:
true
},
// type: { type: Number, required: true },
typeOptions
:
{
type
:
Array
,
required
:
true
},
// typeOptions: { type: Array, required: true },
location
:
{
type
:
Number
,
required
:
true
},
numIndex
:
{
type
:
Number
,
required
:
true
},
locationOptions
:
{
type
:
Array
,
required
:
true
},
},
},
setup
(
_
,
context
)
{
setup
(
_
,
context
)
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
...
@@ -199,42 +222,43 @@ export default defineComponent({
...
@@ -199,42 +222,43 @@ export default defineComponent({
// eslint-disable-next-line
// eslint-disable-next-line
upload
.
value
?.
click
();
upload
.
value
?.
click
();
};
};
const
urlTargetRules
=
[
//
const urlTargetRules = [
(
val
?:
string
)
=>
//
(val?: string) =>
(
val
&&
val
.
trim
().
length
)
||
//
(val && val.trim().length) ||
i18n
.
global
.
t
(
'banner.validateMessages.requireUrlTarget'
),
//
i18n.global.t('banner.validateMessages.requireUrlTarget'),
];
//
];
const
nameRules
=
[
const
nameRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'banner.validateMessages.requireName'
),
i18n
.
global
.
t
(
'banner.validateMessages.requireName'
),
];
];
const
typeRules
=
[
//
const typeRules = [
(
val
?:
number
)
=>
//
(val?: number) =>
val
!==
undefined
||
//
val !== undefined ||
i18n
.
global
.
t
(
'banner.validateMessages.requireType'
),
//
i18n.global.t('banner.validateMessages.requireType'),
];
//
];
const
location
Rules
=
[
const
numIndex
Rules
=
[
(
val
?:
number
)
=>
(
val
?:
number
)
=>
val
!==
undefined
||
val
!==
undefined
||
i18n
.
global
.
t
(
'banner.validateMessages.requireLocation'
),
i18n
.
global
.
t
(
'banner.validateMessages.requireLocation'
),
];
];
return
{
return
{
urlTargetRules
,
//
urlTargetRules,
nameRules
,
nameRules
,
typeRules
,
//
typeRules,
location
Rules
,
numIndex
Rules
,
selectedFile
,
selectedFile
,
deleteAvatar
,
deleteAvatar
,
uploadAvatar
,
uploadAvatar
,
upload
,
};
};
},
},
emits
:
[
emits
:
[
'update:isOpened'
,
'update:isOpened'
,
'update:name'
,
'update:name'
,
'update:urlTarget'
,
//
'update:urlTarget',
'update:type'
,
//
'update:type',
'update:
location
'
,
'update:
numIndex
'
,
'update:status'
,
'update:status'
,
'update:image'
,
'update:image'
,
'SetAvatar'
,
'SetAvatar'
,
...
...
src/components/add-update-cau-hinh-doi-tac-truyen-thong/index.vue
0 → 100644
View file @
f9adb60e
<
template
>
<q-dialog
persistent
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
<q-card
class=
"full-width"
style=
"max-width: 80rem"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('saveConfigPartnerInfo',
{});
$emit('update:isOpened', false);
"
>
<q-card-section
class=
"q-pa-none"
>
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
isUpdate
?
$t
(
'configPartner.dialogLabel.title.addConfigPartner'
)
:
$t
(
'configPartner.dialogLabel.title.updateConfigPartner'
)
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"overflow-auto"
style=
"max-height: calc(100vh - 15rem)"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<div
class=
"row flex-center"
>
<div>
<q-card
class=
"q-mb-sm"
v-if=
"image !== null"
>
<q-img
@
click=
"uploadAvatar"
:src=
"image"
style=
"height: 250px; width: 450px; cursor: pointer"
></q-img>
<q-icon
name=
"mdi-close-circle"
color=
"red"
style=
"
position: absolute;
right: 0;
font-size: 18px;
cursor: pointer;
"
@
click=
"deleteAvatar"
></q-icon>
</q-card>
<div
@
click=
"uploadAvatar"
v-else
class=
"q-mb-sm"
style=
"
height: 250px;
width: 450px;
border: 2px dashed #5d319e;
border-radius: 4px;
cursor: pointer;
"
>
<div
style=
"
height: 250px;
width: 450px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<q-icon
style=
"color: #5d319e"
name=
"mdi-cloud-upload"
size=
"xl"
></q-icon>
Tải ảnh lên
</div>
</div>
<div>
<input
ref=
"upload"
hidden
@
change=
"selectedFile($event.target.files)"
type=
"file"
accept=
"image/png, image/jpeg"
/>
</div>
</div>
</div>
</div>
<div
class=
"col-6"
>
<q-input
:model-value=
"name"
@
update:model-value=
"$emit('update:name', $event)"
:label=
"
$t('configPartner.dialogLabel.configPartnerLabels.name')
"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"nameRules"
clearable
></q-input>
<q-input
:model-value=
"numIndex"
@
update:model-value=
"$emit('update:numIndex', $event)"
:label=
"
$t('configPartner.dialogLabel.configPartnerLabels.numIndex')
"
mask=
"####"
class=
"q-my-sm"
outlined
:rules=
"numIndexRules"
clearable
></q-input>
<!--
<q-select
:model-value=
"type"
@
update:model-value=
"$emit('update:type', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.type')"
:rules=
"typeRules"
:options=
"typeOptions"
map-options
option-value=
"id"
option-label=
"name"
type=
"text"
class=
"q-my-sm"
outlined
></q-select>
-->
<!--
<q-select
:model-value=
"location"
@
update:model-value=
"$emit('update:location', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.location')"
:rules=
"locationRules"
:options=
"locationOptions"
map-options
type=
"text"
class=
"q-my-sm"
outlined
></q-select>
-->
<!--
<q-input
:model-value=
"urlTarget"
@
update:model-value=
"$emit('update:urlTarget', $event)"
:label=
"$t('banner.dialogLabel.bannerLabels.urlTarget')"
:rules=
"urlTargetRules"
type=
"text"
class=
"q-my-sm"
outlined
clearable
></q-input>
-->
<div
class=
"q-pt-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'configPartner.dialogLabel.configPartnerLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<div>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
class=
"q-mr-sm"
:label=
"$t('banner.crudActions.cancel')"
@
click=
"$emit('update:isOpened', false)"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('configPartner.crudActions.save')"
/>
</div>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
props
:
{
isOpened
:
{
type
:
Boolean
,
required
:
true
,
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
name
:
{
type
:
String
,
required
:
true
},
image
:
{
type
:
String
,
required
:
true
},
// urlTarget: { type: String, required: true },
status
:
{
type
:
Number
,
required
:
true
},
// type: { type: Number, required: true },
// typeOptions: { type: Array, required: true },
numIndex
:
{
type
:
Number
,
required
:
true
},
},
setup
(
_
,
context
)
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
context
.
emit
(
'SetAvatar'
,
{
file
:
value
[
0
],
url
:
URL
.
createObjectURL
(
value
[
0
]),
});
};
const
deleteAvatar
=
()
=>
{
context
.
emit
(
'deleteAvatar'
);
};
const
upload
=
ref
(
null
);
const
uploadAvatar
=
()
=>
{
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
upload
.
value
?.
click
();
};
// const urlTargetRules = [
// (val?: string) =>
// (val && val.trim().length) ||
// i18n.global.t('banner.validateMessages.requireUrlTarget'),
// ];
const
nameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'configPartner.validateMessages.requireName'
),
];
// const typeRules = [
// (val?: number) =>
// val !== undefined ||
// i18n.global.t('banner.validateMessages.requireType'),
// ];
const
numIndexRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'configPartner.validateMessages.requireLocation'
),
];
return
{
// urlTargetRules,
nameRules
,
// typeRules,
numIndexRules
,
selectedFile
,
deleteAvatar
,
uploadAvatar
,
upload
,
};
},
emits
:
[
'update:isOpened'
,
'update:name'
,
// 'update:urlTarget',
// 'update:type',
'update:numIndex'
,
'update:status'
,
'update:image'
,
'SetAvatar'
,
'deleteAvatar'
,
'saveConfigPartnerInfo'
,
],
});
</
script
>
src/i18n/vi/index.ts
View file @
f9adb60e
...
@@ -28,7 +28,7 @@ export default {
...
@@ -28,7 +28,7 @@ export default {
emptyData
:
'Không có dữ liệu'
,
emptyData
:
'Không có dữ liệu'
,
crudActions
:
{
crudActions
:
{
add
:
'Thêm'
,
add
:
'Thêm'
,
update
:
'Cập nhậ
p
'
,
update
:
'Cập nhậ
t
'
,
delete
:
'Xoá'
,
delete
:
'Xoá'
,
search
:
'Tìm kiếm'
,
search
:
'Tìm kiếm'
,
details
:
'Chi tiết'
,
details
:
'Chi tiết'
,
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewSuccess
:
'Thêm nhóm người dùng thành công'
,
addNewSuccess
:
'Thêm nhóm người dùng thành công'
,
deleteSuccess
:
'Xoá nhóm người dùng thành công'
,
deleteSuccess
:
'Xoá nhóm người dùng thành công'
,
updateSuccess
:
'Cập nhậ
p
nhóm người dùng thành công'
,
updateSuccess
:
'Cập nhậ
t
nhóm người dùng thành công'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addUser
:
'Thêm người dùng'
,
addUser
:
'Thêm người dùng'
,
updateUser
:
'Cập nhậ
p
người dùng'
,
updateUser
:
'Cập nhậ
t
người dùng'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
userName
:
'Tên đăng nhập *'
,
userName
:
'Tên đăng nhập *'
,
...
@@ -132,11 +132,11 @@ export default {
...
@@ -132,11 +132,11 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewUserAccess
:
'Thêm tài khoản thành công'
,
addNewUserAccess
:
'Thêm tài khoản thành công'
,
deleteUserAccess
:
'Xoá tài khoản thành công'
,
deleteUserAccess
:
'Xoá tài khoản thành công'
,
updateUserAccess
:
'Cập nhậ
p
thông tin tài khoản thành công'
,
updateUserAccess
:
'Cập nhậ
t
thông tin tài khoản thành công'
,
resetPasswordAccess
:
'Reset mật khẩu thành công'
,
resetPasswordAccess
:
'Reset mật khẩu thành công'
,
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateUserInfo
:
'Cập nhậ
p
'
,
updateUserInfo
:
'Cập nhậ
t
'
,
resetPassword
:
'Reset mật khẩu'
,
resetPassword
:
'Reset mật khẩu'
,
deleteUser
:
'Xoá'
,
deleteUser
:
'Xoá'
,
informationUser
:
'Thông tin'
,
informationUser
:
'Thông tin'
,
...
@@ -163,7 +163,7 @@ export default {
...
@@ -163,7 +163,7 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
add
:
'Thêm đơn vị chủ quản'
,
add
:
'Thêm đơn vị chủ quản'
,
update
:
'Cập nhậ
p
đơn vị chủ quản'
,
update
:
'Cập nhậ
t
đơn vị chủ quản'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
code
:
'Mã đơn vị *'
,
code
:
'Mã đơn vị *'
,
...
@@ -177,7 +177,7 @@ export default {
...
@@ -177,7 +177,7 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateInfo
:
'Cập nhậ
p
'
,
updateInfo
:
'Cập nhậ
t
'
,
information
:
'Thông tin'
,
information
:
'Thông tin'
,
delete
:
'Xóa'
,
delete
:
'Xóa'
,
},
},
...
@@ -209,7 +209,7 @@ export default {
...
@@ -209,7 +209,7 @@ export default {
addNewManagingUnitsAccess
:
'Thêm Đơn vị chủ quản thành công'
,
addNewManagingUnitsAccess
:
'Thêm Đơn vị chủ quản thành công'
,
deleteManagingUnitsAccess
:
'Xoá Đơn vị chủ quản thành công'
,
deleteManagingUnitsAccess
:
'Xoá Đơn vị chủ quản thành công'
,
updateManagingUnitsAccess
:
updateManagingUnitsAccess
:
'Cập nhậ
p
thông tin Đơn vị chủ quản thành công'
,
'Cập nhậ
t
thông tin Đơn vị chủ quản thành công'
,
},
},
},
},
...
@@ -249,9 +249,9 @@ export default {
...
@@ -249,9 +249,9 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
add
:
'Thêm nghệ sỹ'
,
add
:
'Thêm nghệ sỹ'
,
update
:
'Cập nhậ
p
nghệ sỹ'
,
update
:
'Cập nhậ
t
nghệ sỹ'
,
addBankAccount
:
'Thêm ngân hàng thụ hưởng'
,
addBankAccount
:
'Thêm ngân hàng thụ hưởng'
,
updateBankAccount
:
'Cập nhậ
p
ngân hàng thụ hưởng'
,
updateBankAccount
:
'Cập nhậ
t
ngân hàng thụ hưởng'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
//ds nghệ sỹ
//ds nghệ sỹ
...
@@ -269,9 +269,9 @@ export default {
...
@@ -269,9 +269,9 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateInfo
:
'Cập nhậ
p
'
,
updateInfo
:
'Cập nhậ
t
'
,
delete
:
'Xóa nghệ sỹ'
,
delete
:
'Xóa nghệ sỹ'
,
updateBankAccount
:
'Cập nhậ
p
'
,
updateBankAccount
:
'Cập nhậ
t
'
,
deleteBankAccount
:
'Xóa ngân hàng'
,
deleteBankAccount
:
'Xóa ngân hàng'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -298,7 +298,7 @@ export default {
...
@@ -298,7 +298,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
unitAddArtistSuccess
:
'Thêm hợp đồng nghệ sỹ thành công'
,
unitAddArtistSuccess
:
'Thêm hợp đồng nghệ sỹ thành công'
,
unitUpdateArtistSuccess
:
'Cập nhậ
p
hợp đồng nghệ sỹ thành công'
,
unitUpdateArtistSuccess
:
'Cập nhậ
t
hợp đồng nghệ sỹ thành công'
,
unitDeleteArtistSuccess
:
'Xóa hợp đồng nghệ sỹ thành công'
,
unitDeleteArtistSuccess
:
'Xóa hợp đồng nghệ sỹ thành công'
,
},
},
},
},
...
@@ -325,8 +325,8 @@ export default {
...
@@ -325,8 +325,8 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addCustomer
:
'Thêm khách hàng'
,
addCustomer
:
'Thêm khách hàng'
,
updateCustomer
:
'Cập nhậ
p
khách hàng'
,
updateCustomer
:
'Cập nhậ
t
khách hàng'
,
editCustomer
:
'Cập nhậ
p
thông tin khách hàng'
,
editCustomer
:
'Cập nhậ
t
thông tin khách hàng'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
userName
:
'Tên đăng nhập *'
,
userName
:
'Tên đăng nhập *'
,
...
@@ -346,7 +346,7 @@ export default {
...
@@ -346,7 +346,7 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateCustomerInfo
:
'Cập nhậ
p
'
,
updateCustomerInfo
:
'Cập nhậ
t
'
,
informationCustomer
:
'Thông tin'
,
informationCustomer
:
'Thông tin'
,
deleteCustomer
:
'Xoá'
,
deleteCustomer
:
'Xoá'
,
},
},
...
@@ -392,7 +392,7 @@ export default {
...
@@ -392,7 +392,7 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewUserAccess
:
'Thêm khách hàng thành công'
,
addNewUserAccess
:
'Thêm khách hàng thành công'
,
deleteUserAccess
:
'Xoá khách hàng thành công'
,
deleteUserAccess
:
'Xoá khách hàng thành công'
,
updateUserAccess
:
'Cập nhậ
p
thông tin khách hàng thành công'
,
updateUserAccess
:
'Cập nhậ
t
thông tin khách hàng thành công'
,
resetPasswordAccess
:
'Reset mật khẩu thành công'
,
resetPasswordAccess
:
'Reset mật khẩu thành công'
,
},
},
},
},
...
@@ -416,11 +416,11 @@ export default {
...
@@ -416,11 +416,11 @@ export default {
addStory
:
'Thêm Story'
,
addStory
:
'Thêm Story'
,
updateStory
:
'Chỉnh sửa Story'
,
updateStory
:
'Chỉnh sửa Story'
,
addArtist
:
'Thêm nghệ sỹ'
,
addArtist
:
'Thêm nghệ sỹ'
,
updateArtist
:
'Cập nhậ
p
nghệ sỹ'
,
updateArtist
:
'Cập nhậ
t
nghệ sỹ'
,
addAccountBank
:
'Thêm tài khoản ngân hàng'
,
addAccountBank
:
'Thêm tài khoản ngân hàng'
,
editAccountBank
:
'Cập nhậ
p
tài khoản ngân hàng'
,
editAccountBank
:
'Cập nhậ
t
tài khoản ngân hàng'
,
addHotProduct
:
'Thêm sản phẩm nổi bật'
,
addHotProduct
:
'Thêm sản phẩm nổi bật'
,
updateHotProduct
:
'Cập nhậ
p
sản phẩm nổi bật'
,
updateHotProduct
:
'Cập nhậ
t
sản phẩm nổi bật'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
accountOwner
:
'Chủ tài khoản'
,
accountOwner
:
'Chủ tài khoản'
,
...
@@ -441,11 +441,11 @@ export default {
...
@@ -441,11 +441,11 @@ export default {
requireCardType
:
'Vui lòng chọn Loại thẻ'
,
requireCardType
:
'Vui lòng chọn Loại thẻ'
,
errorIsDefault
:
'Nghệ sỹ đã có tài khoản ngân hàng mặc định'
,
errorIsDefault
:
'Nghệ sỹ đã có tài khoản ngân hàng mặc định'
,
addAccess
:
'Thêm tài khoản ngân hàng thành công'
,
addAccess
:
'Thêm tài khoản ngân hàng thành công'
,
editAccess
:
'Cập nhậ
p
thông tin tài khoản ngân hàng thành công'
,
editAccess
:
'Cập nhậ
t
thông tin tài khoản ngân hàng thành công'
,
deleteAccess
:
'Xoá tài khoản ngân hàng thành công'
,
deleteAccess
:
'Xoá tài khoản ngân hàng thành công'
,
deleteStoryAccess
:
'Xoá Story thành công'
,
deleteStoryAccess
:
'Xoá Story thành công'
,
addHotProductSccess
:
'Thêm sản phẩm thành công'
,
addHotProductSccess
:
'Thêm sản phẩm thành công'
,
updateHotProductSccess
:
'Cập nhậ
p
sản phẩm thành công'
,
updateHotProductSccess
:
'Cập nhậ
t
sản phẩm thành công'
,
deleteHotProductSccess
:
'Xóa sản phẩm thành công'
,
deleteHotProductSccess
:
'Xóa sản phẩm thành công'
,
},
},
},
},
...
@@ -458,7 +458,7 @@ export default {
...
@@ -458,7 +458,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
deleteArtistAccess
:
'Xoá nghệ sỹ thành công'
,
deleteArtistAccess
:
'Xoá nghệ sỹ thành công'
,
editArtistAccess
:
'Cập nhậ
p
thông tin nghệ sỹ thành công'
,
editArtistAccess
:
'Cập nhậ
t
thông tin nghệ sỹ thành công'
,
addNewArtistAccess
:
'Thêm nghệ sỹ thành công'
,
addNewArtistAccess
:
'Thêm nghệ sỹ thành công'
,
EmbedAddSuccess
:
'Thêm link Embed thành công'
,
EmbedAddSuccess
:
'Thêm link Embed thành công'
,
EmbedUpdateSuccess
:
'Thay đổi link Embed thành công'
,
EmbedUpdateSuccess
:
'Thay đổi link Embed thành công'
,
...
@@ -466,7 +466,7 @@ export default {
...
@@ -466,7 +466,7 @@ export default {
StoryAddSuccess
:
'Thêm Story thành công'
,
StoryAddSuccess
:
'Thêm Story thành công'
,
bannerDeleteAccess
:
'Xóa banner thành công'
,
bannerDeleteAccess
:
'Xóa banner thành công'
,
bannerAddAccess
:
'Thêm banner thành công'
,
bannerAddAccess
:
'Thêm banner thành công'
,
bannerUpdateAccess
:
'Cập nhậ
p
banner thành công'
,
bannerUpdateAccess
:
'Cập nhậ
t
banner thành công'
,
},
},
artistInformation
:
{
artistInformation
:
{
tabLabel
:
{
tabLabel
:
{
...
@@ -580,7 +580,7 @@ export default {
...
@@ -580,7 +580,7 @@ export default {
uploadBanner
:
'Tải lên'
,
uploadBanner
:
'Tải lên'
,
uploadEmbed
:
'Tải lên Embed'
,
uploadEmbed
:
'Tải lên Embed'
,
uploadStory
:
'Tải lên Story'
,
uploadStory
:
'Tải lên Story'
,
titleEmbedDialog
:
'Cập nhậ
p
Link Embed'
,
titleEmbedDialog
:
'Cập nhậ
t
Link Embed'
,
},
},
//xếp hạng khách hàng
//xếp hạng khách hàng
...
@@ -601,7 +601,7 @@ export default {
...
@@ -601,7 +601,7 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addCustomerRank
:
'Thêm danh mục xếp hạng khách hàng'
,
addCustomerRank
:
'Thêm danh mục xếp hạng khách hàng'
,
updateCustomerRank
:
'Cập nhậ
p
danh mục xếp hạng khách hàng'
,
updateCustomerRank
:
'Cập nhậ
t
danh mục xếp hạng khách hàng'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
code
:
'Mã xếp hạng *'
,
code
:
'Mã xếp hạng *'
,
...
@@ -611,7 +611,7 @@ export default {
...
@@ -611,7 +611,7 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateCustomerRankInfo
:
'Cập nhậ
p
'
,
updateCustomerRankInfo
:
'Cập nhậ
t
'
,
deleteCustomerRank
:
'Xoá'
,
deleteCustomerRank
:
'Xoá'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -633,7 +633,7 @@ export default {
...
@@ -633,7 +633,7 @@ export default {
addNewCustomerRankAccess
:
'Thêm danh mục xếp hạng khách hàng thành công'
,
addNewCustomerRankAccess
:
'Thêm danh mục xếp hạng khách hàng thành công'
,
deleteCustomerRankAccess
:
'Xoá danh mục xếp hạng khách hàng thành công'
,
deleteCustomerRankAccess
:
'Xoá danh mục xếp hạng khách hàng thành công'
,
updateCustomerRankAccess
:
updateCustomerRankAccess
:
'Cập nhậ
p
danh mục xếp hạng khách hàng thành công'
,
'Cập nhậ
t
danh mục xếp hạng khách hàng thành công'
,
},
},
},
},
...
@@ -654,7 +654,7 @@ export default {
...
@@ -654,7 +654,7 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addField
:
'Thêm lĩnh vực hoạt động'
,
addField
:
'Thêm lĩnh vực hoạt động'
,
updateField
:
'Cập nhậ
p
lĩnh vực hoạt động'
,
updateField
:
'Cập nhậ
t
lĩnh vực hoạt động'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
name
:
'Tên lĩnh vực *'
,
name
:
'Tên lĩnh vực *'
,
...
@@ -663,7 +663,7 @@ export default {
...
@@ -663,7 +663,7 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateField
:
'Cập nhậ
p
'
,
updateField
:
'Cập nhậ
t
'
,
deleteField
:
'Xoá'
,
deleteField
:
'Xoá'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -683,7 +683,7 @@ export default {
...
@@ -683,7 +683,7 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewFieldAccess
:
'Thêm lĩnh vực hoạt động thành công'
,
addNewFieldAccess
:
'Thêm lĩnh vực hoạt động thành công'
,
deleteFieldAccess
:
'Xoá lĩnh vực hoạt động thành công'
,
deleteFieldAccess
:
'Xoá lĩnh vực hoạt động thành công'
,
updateFieldAccess
:
'Cập nhậ
p
lĩnh vực hoạt động thành công'
,
updateFieldAccess
:
'Cập nhậ
t
lĩnh vực hoạt động thành công'
,
},
},
},
},
...
@@ -698,8 +698,8 @@ export default {
...
@@ -698,8 +698,8 @@ export default {
category
:
'Danh mục bài viết'
,
category
:
'Danh mục bài viết'
,
createBy
:
'Người thêm'
,
createBy
:
'Người thêm'
,
createTime
:
'Thời gian thêm'
,
createTime
:
'Thời gian thêm'
,
updateBy
:
'Người
cập nhập
'
,
updateBy
:
'Người
Cập nhật
'
,
updateTime
:
'Thời gian
cập nhập
'
,
updateTime
:
'Thời gian
Cập nhật
'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
...
@@ -710,7 +710,7 @@ export default {
...
@@ -710,7 +710,7 @@ export default {
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addPost
:
'Thêm bài viết'
,
addPost
:
'Thêm bài viết'
,
updatePost
:
'Cập nhậ
p
bài viết'
,
updatePost
:
'Cập nhậ
t
bài viết'
,
},
},
postLabels
:
{
postLabels
:
{
name
:
'Tên bài viết *'
,
name
:
'Tên bài viết *'
,
...
@@ -721,7 +721,7 @@ export default {
...
@@ -721,7 +721,7 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updatePost
:
'Cập nhậ
p
'
,
updatePost
:
'Cập nhậ
t
'
,
deletePost
:
'Xoá'
,
deletePost
:
'Xoá'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -742,7 +742,7 @@ export default {
...
@@ -742,7 +742,7 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewPostAccess
:
'Thêm bài viết thành công'
,
addNewPostAccess
:
'Thêm bài viết thành công'
,
deletePostAccess
:
'Xoá bài viết thành công'
,
deletePostAccess
:
'Xoá bài viết thành công'
,
updatePostAccess
:
'Cập nhậ
p
bài viết thành công'
,
updatePostAccess
:
'Cập nhậ
t
bài viết thành công'
,
},
},
},
},
...
@@ -751,7 +751,7 @@ export default {
...
@@ -751,7 +751,7 @@ export default {
title
:
{
title
:
{
postCategory
:
'Danh sách danh mục bài viết'
,
postCategory
:
'Danh sách danh mục bài viết'
,
addPost
:
'Thêm mới danh mục bài viết'
,
addPost
:
'Thêm mới danh mục bài viết'
,
updatePost
:
'Cập nhậ
p
danh mục bài viết'
,
updatePost
:
'Cập nhậ
t
danh mục bài viết'
,
listPosts
:
'Danh sách bài viết'
,
listPosts
:
'Danh sách bài viết'
,
listPostsSelected
:
'Danh sách bài viết đã chọn'
,
listPostsSelected
:
'Danh sách bài viết đã chọn'
,
addPostDialog
:
'Thêm bài viết'
,
addPostDialog
:
'Thêm bài viết'
,
...
@@ -768,7 +768,7 @@ export default {
...
@@ -768,7 +768,7 @@ export default {
stt
:
'STT'
,
stt
:
'STT'
,
name
:
'Tên bài viết'
,
name
:
'Tên bài viết'
,
createBy
:
'Người sửa gần nhất'
,
createBy
:
'Người sửa gần nhất'
,
updateTime
:
'Thời gian
cập nhập
gần nhất'
,
updateTime
:
'Thời gian
Cập nhật
gần nhất'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
imageMini
:
'Ảnh thu nhỏ'
,
imageMini
:
'Ảnh thu nhỏ'
,
...
@@ -783,7 +783,7 @@ export default {
...
@@ -783,7 +783,7 @@ export default {
actionMessages
:
{
actionMessages
:
{
addPostCategoryAccess
:
'Thêm danh mục bài viết thành công'
,
addPostCategoryAccess
:
'Thêm danh mục bài viết thành công'
,
deletePostCategoryAccess
:
'Xoá danh mục bài viết thành công'
,
deletePostCategoryAccess
:
'Xoá danh mục bài viết thành công'
,
updatePostCategoryAccess
:
'Cập nhậ
p
danh mục bài viết thành công'
,
updatePostCategoryAccess
:
'Cập nhậ
t
danh mục bài viết thành công'
,
},
},
confirmActionsTitle
:
{
confirmActionsTitle
:
{
confirmDeletePostCategory
:
confirmDeletePostCategory
:
...
@@ -798,33 +798,31 @@ export default {
...
@@ -798,33 +798,31 @@ export default {
tableColumnsBanner
:
{
tableColumnsBanner
:
{
stt
:
'STT'
,
stt
:
'STT'
,
name
:
'Tên banner'
,
name
:
'Tên banner'
,
type
:
'Loại banner'
,
numIndex
:
'Vị trí'
,
location
:
'Vị trí'
,
image
:
'Ảnh'
,
image
:
'Ảnh'
,
urlTarget
:
'Url targer'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
statusLabel
:
{
statusLabel
:
{
active
:
'
Đang hoạt động
'
,
active
:
'
Hiển thị
'
,
inactive
:
'
Ngừng hoạt động
'
,
inactive
:
'
Ẩn
'
,
},
},
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
addBanner
:
'Thêm banner'
,
addBanner
:
'Thêm banner'
,
updateBanner
:
'Cập nhậ
p
banner'
,
updateBanner
:
'Cập nhậ
t
banner'
,
},
},
bannerLabels
:
{
bannerLabels
:
{
name
:
'Tên banner *'
,
name
:
'Tên banner *'
,
t
ype
:
'Loại banner *'
,
bannerT
ype
:
'Loại banner *'
,
location
:
'Vị trí *'
,
numIndex
:
'Vị trí *'
,
image
:
'Ảnh'
,
image
:
'Ảnh'
,
urlTarget
:
'
Url target
'
,
urlTarget
:
'
Path
'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateBanner
:
'Cập nhậ
p
'
,
updateBanner
:
'Cập nhậ
t
'
,
deleteBanner
:
'Xoá'
,
deleteBanner
:
'Xoá'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -832,10 +830,8 @@ export default {
...
@@ -832,10 +830,8 @@ export default {
cancel
:
'Đóng'
,
cancel
:
'Đóng'
,
},
},
validateMessages
:
{
validateMessages
:
{
requireName
:
'Vui lòng nhập Tên banner'
,
requireName
:
'Vui lòng nhập Tên'
,
requireType
:
'Vui lòng chọn Loại banner'
,
requireLocation
:
'Vui lòng nhập Vị trí'
,
requireLocation
:
'Vui lòng chọn Vị trí'
,
requireUrlTarget
:
'Vui lòng nhập Url target'
,
},
},
confirmActionsTitle
:
{
confirmActionsTitle
:
{
confirmDeleteBannerTitle
:
'Xác nhận'
,
confirmDeleteBannerTitle
:
'Xác nhận'
,
...
@@ -845,7 +841,59 @@ export default {
...
@@ -845,7 +841,59 @@ export default {
actionMessages
:
{
actionMessages
:
{
addNewBannerAccess
:
'Thêm banner thành công'
,
addNewBannerAccess
:
'Thêm banner thành công'
,
deleteBannerAccess
:
'Xoá banner thành công'
,
deleteBannerAccess
:
'Xoá banner thành công'
,
updateBannerAccess
:
'Cập nhập banner thành công'
,
updateBannerAccess
:
'Cập nhật banner thành công'
,
},
},
//đối tác truyền thông
configPartner
:
{
title
:
'Đối tác truyền thông'
,
uploadImg
:
'Tải lên ảnh'
,
tableColumnsConfigPartner
:
{
name
:
'Tên'
,
numIndex
:
'Vị trí'
,
image
:
'Ảnh'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
},
statusLabel
:
{
active
:
'Hiển thị'
,
inactive
:
'Ẩn'
,
},
dialogLabel
:
{
title
:
{
addConfigPartner
:
'Thêm đối tác truyền thông'
,
updateConfigPartner
:
'Cập nhật đối tác truyền thông'
,
},
configPartnerLabels
:
{
name
:
'Tên *'
,
numIndex
:
'Vị trí *'
,
image
:
'Ảnh'
,
status
:
'Trạng thái'
,
},
},
toolTipMessage
:
{
updateConfigPartner
:
'Cập nhật'
,
deleteConfigPartner
:
'Xoá'
,
},
crudActions
:
{
save
:
'Lưu'
,
cancel
:
'Đóng'
,
},
validateMessages
:
{
requireName
:
'Vui lòng nhập Tên'
,
requireLocation
:
'Vui lòng nhập Vị trí'
,
},
confirmActionsTitle
:
{
confirmDeleteConfigPartnerTitle
:
'Xác nhận'
,
confirmDeleteConfigPartnerCancelBtnLabel
:
'Huỷ'
,
confirmDeleteConfigPartnerContent
:
'Bạn có chắc chắn muốn xoá Đối tác này không?'
,
},
actionMessages
:
{
addNewConfigPartnerAccess
:
'Thêm Đối tác thành công'
,
deleteConfigPartnerAccess
:
'Xoá Đối tác thành công'
,
updateConfigPartnerAccess
:
'Cập nhật Đối tác thành công'
,
},
},
},
},
...
@@ -873,10 +921,10 @@ export default {
...
@@ -873,10 +921,10 @@ export default {
},
},
dialogLabel
:
{
dialogLabel
:
{
title
:
{
title
:
{
updateInfoVAB
:
'Cập nhậ
p
thông tin'
,
updateInfoVAB
:
'Cập nhậ
t
thông tin'
,
//ngân hàng
//ngân hàng
addBankAccount
:
'Thêm ngân hàng thụ hưởng'
,
addBankAccount
:
'Thêm ngân hàng thụ hưởng'
,
updateBankAccount
:
'Cập nhậ
p
ngân hàng thụ hưởng'
,
updateBankAccount
:
'Cập nhậ
t
ngân hàng thụ hưởng'
,
},
},
infoVABLabels
:
{
infoVABLabels
:
{
comName
:
'Tên công ty *'
,
comName
:
'Tên công ty *'
,
...
@@ -898,10 +946,10 @@ export default {
...
@@ -898,10 +946,10 @@ export default {
},
},
},
},
toolTipMessage
:
{
toolTipMessage
:
{
updateInfoVAB
:
'Cập nhậ
p
'
,
updateInfoVAB
:
'Cập nhậ
t
'
,
deleteInfoVAB
:
'Xoá'
,
deleteInfoVAB
:
'Xoá'
,
//ngân hàng
//ngân hàng
updateBankAccount
:
'Cập nhậ
p
'
,
updateBankAccount
:
'Cập nhậ
t
'
,
deleteBankAccount
:
'Xóa ngân hàng'
,
deleteBankAccount
:
'Xóa ngân hàng'
,
},
},
crudActions
:
{
crudActions
:
{
...
@@ -929,7 +977,7 @@ export default {
...
@@ -929,7 +977,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
deleteInfoVABAccess
:
'Xoá thông tin thành công'
,
deleteInfoVABAccess
:
'Xoá thông tin thành công'
,
updateInfoVABAccess
:
'Cập nhậ
p
thông tin thành công'
,
updateInfoVABAccess
:
'Cập nhậ
t
thông tin thành công'
,
},
},
},
},
...
@@ -977,8 +1025,8 @@ export default {
...
@@ -977,8 +1025,8 @@ export default {
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
createTime
:
'Thời gian tạo'
,
createTime
:
'Thời gian tạo'
,
createBy
:
'Người tạo'
,
createBy
:
'Người tạo'
,
updateBy
:
'Người
cập nhập
'
,
updateBy
:
'Người
Cập nhật
'
,
updateTime
:
'Thời gian
cập nhập
'
,
updateTime
:
'Thời gian
Cập nhật
'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
statusLabel
:
{
statusLabel
:
{
...
@@ -990,7 +1038,7 @@ export default {
...
@@ -990,7 +1038,7 @@ export default {
//Cấu hình trang tĩnh
//Cấu hình trang tĩnh
listConfigSystem
:
{
listConfigSystem
:
{
add
:
'Thêm'
,
add
:
'Thêm'
,
toolTipMessageUpdate
:
'Cập nhậ
p
'
,
toolTipMessageUpdate
:
'Cập nhậ
t
'
,
toolTipMessageDelete
:
'Xóa'
,
toolTipMessageDelete
:
'Xóa'
,
title
:
'Cấu hình Trang tĩnh'
,
title
:
'Cấu hình Trang tĩnh'
,
titleColumnsTable
:
{
titleColumnsTable
:
{
...
@@ -1004,7 +1052,7 @@ export default {
...
@@ -1004,7 +1052,7 @@ export default {
},
},
dialogLabel
:
{
dialogLabel
:
{
titleAdd
:
'Thêm Cấu hình'
,
titleAdd
:
'Thêm Cấu hình'
,
titleUpdate
:
'Cập nhậ
p
Cấu hình'
,
titleUpdate
:
'Cập nhậ
t
Cấu hình'
,
fieldLabels
:
{
fieldLabels
:
{
namePage
:
'Tên cấu hình *'
,
namePage
:
'Tên cấu hình *'
,
nameMenu
:
'Loại menu *'
,
nameMenu
:
'Loại menu *'
,
...
@@ -1033,7 +1081,7 @@ export default {
...
@@ -1033,7 +1081,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
addSuccess
:
'Thêm Cấu hình thành công'
,
addSuccess
:
'Thêm Cấu hình thành công'
,
updateSuccess
:
'Cập nhậ
p
Cấu hình thành công'
,
updateSuccess
:
'Cập nhậ
t
Cấu hình thành công'
,
deleteSuccess
:
'Xóa Cấu hình thành công'
,
deleteSuccess
:
'Xóa Cấu hình thành công'
,
},
},
},
},
...
@@ -1041,7 +1089,7 @@ export default {
...
@@ -1041,7 +1089,7 @@ export default {
//Cấu hình tin tức
//Cấu hình tin tức
listNews
:
{
listNews
:
{
add
:
'Thêm'
,
add
:
'Thêm'
,
toolTipMessageUpdate
:
'Cập nhậ
p
'
,
toolTipMessageUpdate
:
'Cập nhậ
t
'
,
toolTipMessageDelete
:
'Xóa'
,
toolTipMessageDelete
:
'Xóa'
,
title
:
'Cấu hình Tin tức'
,
title
:
'Cấu hình Tin tức'
,
titleColumnsTable
:
{
titleColumnsTable
:
{
...
@@ -1053,13 +1101,13 @@ export default {
...
@@ -1053,13 +1101,13 @@ export default {
urlTarget
:
'Url target'
,
urlTarget
:
'Url target'
,
createTime
:
'Người tạo'
,
createTime
:
'Người tạo'
,
createBy
:
'T.G tạo'
,
createBy
:
'T.G tạo'
,
updateTime
:
'Người
cập nhập
'
,
updateTime
:
'Người
Cập nhật
'
,
updateBy
:
'T.G
cập nhập
'
,
updateBy
:
'T.G
Cập nhật
'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
dialogLabel
:
{
dialogLabel
:
{
titleUpdate
:
'Cập nhậ
p
Tin tức'
,
titleUpdate
:
'Cập nhậ
t
Tin tức'
,
titleAdd
:
'Thêm Tin tức'
,
titleAdd
:
'Thêm Tin tức'
,
fieldLabels
:
{
fieldLabels
:
{
avatar
:
'Ảnh tin tức'
,
avatar
:
'Ảnh tin tức'
,
...
@@ -1084,7 +1132,7 @@ export default {
...
@@ -1084,7 +1132,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
addSuccess
:
'Thêm Tin tức thành công'
,
addSuccess
:
'Thêm Tin tức thành công'
,
updateSuccess
:
'Cập nhậ
p
Tin tức thành công'
,
updateSuccess
:
'Cập nhậ
t
Tin tức thành công'
,
deleteSuccess
:
'Xóa Tin tức thành công'
,
deleteSuccess
:
'Xóa Tin tức thành công'
,
},
},
},
},
...
@@ -1092,7 +1140,7 @@ export default {
...
@@ -1092,7 +1140,7 @@ export default {
//Cấu hình SP nổi bật
//Cấu hình SP nổi bật
listHotProduct
:
{
listHotProduct
:
{
add
:
'Thêm'
,
add
:
'Thêm'
,
toolTipMessageUpdate
:
'Cập nhậ
p
'
,
toolTipMessageUpdate
:
'Cập nhậ
t
'
,
toolTipMessageDelete
:
'Xóa'
,
toolTipMessageDelete
:
'Xóa'
,
title
:
'Cấu hình Sản phẩm nổi bật'
,
title
:
'Cấu hình Sản phẩm nổi bật'
,
titleColumnsTable
:
{
titleColumnsTable
:
{
...
@@ -1104,13 +1152,13 @@ export default {
...
@@ -1104,13 +1152,13 @@ export default {
urlTarget
:
'Url target'
,
urlTarget
:
'Url target'
,
createTime
:
'Người tạo'
,
createTime
:
'Người tạo'
,
createBy
:
'T.G tạo'
,
createBy
:
'T.G tạo'
,
updateTime
:
'Người
cập nhập
'
,
updateTime
:
'Người
Cập nhật
'
,
updateBy
:
'T.G
cập nhập
'
,
updateBy
:
'T.G
Cập nhật
'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
dialogLabel
:
{
dialogLabel
:
{
titleUpdate
:
'Cập nhậ
p
Sản phẩm nổi bật'
,
titleUpdate
:
'Cập nhậ
t
Sản phẩm nổi bật'
,
titleAdd
:
'Thêm Sản phẩm nổi bật'
,
titleAdd
:
'Thêm Sản phẩm nổi bật'
,
fieldLabels
:
{
fieldLabels
:
{
avatar
:
'Ảnh sản phẩm'
,
avatar
:
'Ảnh sản phẩm'
,
...
@@ -1135,7 +1183,7 @@ export default {
...
@@ -1135,7 +1183,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
addSuccess
:
'Thêm Sản phẩm nổi bật thành công'
,
addSuccess
:
'Thêm Sản phẩm nổi bật thành công'
,
updateSuccess
:
'Cập nhậ
p
Sản phẩm nổi bật thành công'
,
updateSuccess
:
'Cập nhậ
t
Sản phẩm nổi bật thành công'
,
deleteSuccess
:
'Xóa Sản phẩm nổi bật thành công'
,
deleteSuccess
:
'Xóa Sản phẩm nổi bật thành công'
,
},
},
},
},
...
@@ -1143,7 +1191,7 @@ export default {
...
@@ -1143,7 +1191,7 @@ export default {
//Cấu hình menu
//Cấu hình menu
listMenu
:
{
listMenu
:
{
add
:
'Thêm'
,
add
:
'Thêm'
,
toolTipMessageUpdate
:
'Cập nhậ
p
'
,
toolTipMessageUpdate
:
'Cập nhậ
t
'
,
toolTipMessageDelete
:
'Xóa'
,
toolTipMessageDelete
:
'Xóa'
,
title
:
'Danh sách Menu'
,
title
:
'Danh sách Menu'
,
titleColumnsTable
:
{
titleColumnsTable
:
{
...
@@ -1153,13 +1201,13 @@ export default {
...
@@ -1153,13 +1201,13 @@ export default {
// numIndex: 'Vị trí',
// numIndex: 'Vị trí',
// createTime: 'Người tạo',
// createTime: 'Người tạo',
// createBy: 'Thời gian tạo',
// createBy: 'Thời gian tạo',
// updateTime: 'Người
cập nhập
',
// updateTime: 'Người
Cập nhật
',
// updateBy: 'Thời gian
cập nhập
',
// updateBy: 'Thời gian
Cập nhật
',
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
dialogLabel
:
{
dialogLabel
:
{
titleUpdate
:
'Cập nhậ
p
Menu'
,
titleUpdate
:
'Cập nhậ
t
Menu'
,
titleAdd
:
'Thêm Menu'
,
titleAdd
:
'Thêm Menu'
,
fieldLabels
:
{
fieldLabels
:
{
name
:
'Tên menu'
,
name
:
'Tên menu'
,
...
@@ -1187,7 +1235,7 @@ export default {
...
@@ -1187,7 +1235,7 @@ export default {
},
},
actionMessages
:
{
actionMessages
:
{
addSuccess
:
'Thêm Menu thành công'
,
addSuccess
:
'Thêm Menu thành công'
,
updateSuccess
:
'Cập nhậ
p
Menu thành công'
,
updateSuccess
:
'Cập nhậ
t
Menu thành công'
,
deleteSuccess
:
'Xóa Menu thành công'
,
deleteSuccess
:
'Xóa Menu thành công'
,
},
},
},
},
...
...
src/pages/banner/index.vue
View file @
f9adb60e
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
type=
"text"
type=
"text"
dense
dense
outlined
outlined
label=
"Tên
banner
"
label=
"Tên"
clearable
clearable
></q-input>
></q-input>
</div>
</div>
...
@@ -42,19 +42,33 @@
...
@@ -42,19 +42,33 @@
row-key=
"bannerName"
row-key=
"bannerName"
separator=
"cell"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
:rows-per-page-label=
"$t('recordPerPage')"
:pagination=
"
{
rowsPerPage: 0,
}"
hide-pagination
hide-pagination
class="sticky-header-table"
class="sticky-header-table"
>
>
<template
v-slot:body-cell-action=
""
>
<template
v-slot:body-cell-action=
"item"
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-td
style=
"padding: 0; text-align: center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-account-edit-outline"
>
<q-btn
<!-- @click="openUpdateFieldDialog(item.row.id)" -->
flat
round
color=
"primary"
icon=
"mdi-account-edit-outline"
@
click=
"openUpdateBannerDialog(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'banner.toolTipMessage.updateBanner'
)
$t
(
'banner.toolTipMessage.updateBanner'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
>
<q-btn
<!-- @click="confirmDeleteField(item.row.id)" -->
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
@
click=
"confirmDeleteBanner(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'banner.toolTipMessage.deleteBanner'
)
$t
(
'banner.toolTipMessage.deleteBanner'
)
}}
</q-tooltip>
}}
</q-tooltip>
...
@@ -81,11 +95,9 @@
...
@@ -81,11 +95,9 @@
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:body-cell-image=
"image"
>
<
template
v-slot:body-cell-image=
"image"
>
<q-td
style=
"padding: auto; height: 100%
"
class=
"flex flex-
center"
>
<q-td
style=
"padding: auto; height: 100%
; text-align:
center"
>
<q-img
<q-img
style=
"width: 9rem"
style=
"width: 18rem; height: 6rem"
fit=
"contain"
:ratio=
"16 / 9"
:src=
"configImg.API_IMAGE_ENDPOINT + image.row.image"
:src=
"configImg.API_IMAGE_ENDPOINT + image.row.image"
></q-img>
></q-img>
</q-td>
</q-td>
...
@@ -93,16 +105,22 @@
...
@@ -93,16 +105,22 @@
</q-table>
</q-table>
</div>
</div>
<div
class=
"col-12 q-mt-sm"
>
<Pagination
v-model:currentPage=
"pageIndex"
v-model:pageSize=
"pageSize"
:totalPage=
"totalPage"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListBanner"
/>
</div>
<AddUpdateBannerDialog
<AddUpdateBannerDialog
v-model:isOpened=
"addBannerDialogIsOpened"
v-model:isOpened=
"addBannerDialogIsOpened"
v-model:name=
"name"
v-model:name=
"name"
v-model:image=
"image"
v-model:image=
"image"
v-model:urlTarget=
"urlTarget"
v-model:numIndex=
"numIndex"
v-model:location=
"location"
v-model:type=
"type"
v-model:status=
"status"
v-model:status=
"status"
:typeOptions=
"typeOptions"
:locationOptions=
"locationOptions"
@
SetAvatar=
"setAvatar($event)"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
@
deleteAvatar=
"deleteAvatar"
isUpdate
isUpdate
...
@@ -113,15 +131,11 @@
...
@@ -113,15 +131,11 @@
v-model:isOpened=
"updateBannerDialogIsOpened"
v-model:isOpened=
"updateBannerDialogIsOpened"
v-model:name=
"name"
v-model:name=
"name"
v-model:image=
"image"
v-model:image=
"image"
v-model:urlTarget=
"urlTarget"
v-model:numIndex=
"numIndex"
v-model:location=
"location"
v-model:type=
"type"
v-model:status=
"status"
v-model:status=
"status"
:typeOptions=
"typeOptions"
:locationOptions=
"locationOptions"
@
SetAvatar=
"setAvatar($event)"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
@
deleteAvatar=
"deleteAvatar"
@
save
Update
Info=
"updateBanner"
@
save
Banner
Info=
"updateBanner"
/>
/>
</div>
</div>
</template>
</template>
...
@@ -130,12 +144,20 @@
...
@@ -130,12 +144,20 @@
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
AxiosResponse
}
from
'axios'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FileUploadType
}
from
'src/assets/type'
;
import
{
import
{
config
}
from
'src/assets/configurations'
;
PaginationResponse
,
FileUploadType
,
ListBannerConfig
,
DetailBannerConfig
,
UpdateBannerConfig
,
AddBannerConfig
,
}
from
'src/assets/type'
;
import
{
config
,
API_PATHS
}
from
'src/assets/configurations'
;
import
{
BannerStatus
}
from
'src/assets/enums'
;
import
{
BannerStatus
}
from
'src/assets/enums'
;
import
AddUpdateBannerDialog
from
'components/add-update-banner/index.vue'
;
import
AddUpdateBannerDialog
from
'components/add-update-banner/index.vue'
;
import
{
Dialog
}
from
'quasar'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
type
AvatarType
=
{
export
type
AvatarType
=
{
file
?:
File
;
file
?:
File
;
...
@@ -144,18 +166,11 @@ export type AvatarType = {
...
@@ -144,18 +166,11 @@ export type AvatarType = {
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
Pagination
,
AddUpdateBannerDialog
,
AddUpdateBannerDialog
,
},
},
setup
()
{
setup
()
{
const
bannerTableColumns
=
[
const
bannerTableColumns
=
[
// {
// name: 'index',
// field: 'index',
// required: true,
// label: 'STT',
// align: 'center',
// sortable: false,
// },
{
{
name
:
'name'
,
name
:
'name'
,
field
:
'name'
,
field
:
'name'
,
...
@@ -165,24 +180,6 @@ export default defineComponent({
...
@@ -165,24 +180,6 @@ export default defineComponent({
align
:
'left'
,
align
:
'left'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
name
:
'type'
,
field
:
'type'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'banner.tableColumnsBanner.type'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'location'
,
field
:
'location'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'banner.tableColumnsBanner.location'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
{
name
:
'image'
,
name
:
'image'
,
field
:
'image'
,
field
:
'image'
,
...
@@ -193,12 +190,12 @@ export default defineComponent({
...
@@ -193,12 +190,12 @@ export default defineComponent({
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'
urlTarget
'
,
name
:
'
numIndex
'
,
field
:
'
urlTarget
'
,
field
:
'
numIndex
'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'banner.tableColumnsBanner.
urlTarget
'
),
label
:
i18n
.
global
.
t
(
'banner.tableColumnsBanner.
numIndex
'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'
left
'
,
align
:
'
center
'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
...
@@ -221,37 +218,46 @@ export default defineComponent({
...
@@ -221,37 +218,46 @@ export default defineComponent({
},
},
];
];
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
1
);
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListBanner
();
};
const
bannerTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
bannerTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
addBannerDialogIsOpened
=
ref
(
false
);
const
addBannerDialogIsOpened
=
ref
(
false
);
const
updateBannerDialogIsOpened
=
ref
(
false
);
const
updateBannerDialogIsOpened
=
ref
(
false
);
const
name
=
ref
(
''
);
const
name
=
ref
(
''
);
const
urlTarget
=
ref
(
''
);
const
image
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
image
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
type
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
numIndex
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
location
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
typeOptions
:
Ref
<
unknown
[]
>
=
ref
([]);
const
locationOptions
:
Ref
<
unknown
[]
>
=
ref
([]);
const
status
:
Ref
<
number
>
=
ref
(
BannerStatus
.
active
);
const
status
:
Ref
<
number
>
=
ref
(
BannerStatus
.
active
);
//
const bannerId: Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
bannerId
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
nameBanner
=
ref
(
''
);
const
nameBanner
=
ref
(
''
);
const
avatarFile
:
Ref
<
File
|
null
>
=
ref
(
null
);
const
avatarFile
:
Ref
<
File
|
null
>
=
ref
(
null
);
const
avatarUploaded
:
Ref
<
string
>
=
ref
(
''
);
const
avatarUploaded
:
Ref
<
string
>
=
ref
(
''
);
const
imageChange
:
Ref
<
string
>
=
ref
(
''
);
//gọi api ds
//gọi api ds
const
getListBanner
=
async
()
=>
{
const
getListBanner
=
async
()
=>
{
// const response = (await api({
const
response
=
(
await
api
({
// url: API_PATHS.getListBanner,
url
:
API_PATHS
.
getListBanner
,
// method: 'GET',
method
:
'GET'
,
// params: {
params
:
{
// name: nameBanner.value,
pageIndex
:
pageIndex
.
value
,
// },
pageSize
:
pageSize
.
value
,
// })) as AxiosResponse
<
BaseResponseBody
<
BannerType
[]
>>
;
name
:
nameBanner
.
value
,
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
},
// bannerTableRows.value = response.data.data;
}))
as
AxiosResponse
<
// }
BaseResponseBody
<
PaginationResponse
<
ListBannerConfig
[]
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
bannerTableRows
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
};
};
const
confirmDeleteBanner
=
()
=>
{
const
confirmDeleteBanner
=
(
id
:
number
)
=>
{
Dialog
.
create
({
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
title
:
i18n
.
global
.
t
(
'banner.confirmActionsTitle.confirmDeleteBannerTitle'
'banner.confirmActionsTitle.confirmDeleteBannerTitle'
...
@@ -264,102 +270,123 @@ export default defineComponent({
...
@@ -264,102 +270,123 @@ export default defineComponent({
),
),
color
:
'negative'
,
color
:
'negative'
,
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
void
deleteBanner
();
void
deleteBanner
(
id
);
});
});
};
};
//gói api xóa
//gói api xóa
const
deleteBanner
=
async
()
=>
{
const
deleteBanner
=
async
(
id
:
number
)
=>
{
//
try {
try
{
//
const deleteResult = (await api({
const
deleteResult
=
(
await
api
({
//
url: API_PATHS.deleteBanner,
url
:
API_PATHS
.
deleteBanner
,
//
method: 'GET',
method
:
'GET'
,
//
params: {
params
:
{
//
id: id,
id
:
id
,
//
},
},
//
})) as AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
//
if (deleteResult.data.error.code === config.API_RES_CODE.OK.code) {
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
//
Notify.create({
Notify
.
create
({
//
type: 'positive',
type
:
'positive'
,
//
message: i18n.global.t('banner.actionMessages.deleteBannerAccess'),
message
:
i18n
.
global
.
t
(
'banner.actionMessages.deleteBannerAccess'
),
//
});
});
//
void getListBanner();
void
getListBanner
();
//
}
}
//
} catch (error) {}
}
catch
(
error
)
{}
};
};
const
openAddBannerDialog
=
()
=>
{
const
openAddBannerDialog
=
()
=>
{
name
.
value
=
''
;
name
.
value
=
''
;
numIndex
.
value
=
undefined
;
image
.
value
=
null
;
status
.
value
=
BannerStatus
.
active
;
status
.
value
=
BannerStatus
.
active
;
addBannerDialogIsOpened
.
value
=
true
;
addBannerDialogIsOpened
.
value
=
true
;
};
};
//gọi api add
//gọi api add
const
addBanner
=
async
()
=>
{
const
addBanner
=
async
()
=>
{
// const data = {
avatarUploaded
.
value
=
await
callApiUploadAvatar
(
// name: name.value,
avatarFile
.
value
as
File
// status: status.value,
);
// };
const
data
=
{
// const response = (await api({
name
:
name
.
value
,
// url: API_PATHS.addBanner,
image
:
avatarUploaded
.
value
,
// method: 'POST',
numIndex
:
numIndex
.
value
,
// data,
status
:
status
.
value
,
// })) as AxiosResponse
<
BaseResponseBody
<
AddBannerType
[]
>>
;
};
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
const
response
=
(
await
api
({
// addBannerDialogIsOpened.value = false;
url
:
API_PATHS
.
addBanner
,
// Notify.create({
method
:
'POST'
,
// type: 'positive',
data
,
// message: i18n.global.t('banner.actionMessages.addNewBannerAccess'),
}))
as
AxiosResponse
<
BaseResponseBody
<
AddBannerConfig
[]
>>
;
// actions: [{ icon: 'close', color: 'white' }],
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
// });
addBannerDialogIsOpened
.
value
=
false
;
// void getListBanner();
Notify
.
create
({
// }
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'banner.actionMessages.addNewBannerAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListBanner
();
}
};
};
const
openUpdateBannerDialog
=
()
=>
{
const
openUpdateBannerDialog
=
(
id
:
number
)
=>
{
void
getDetailBanner
();
void
getDetailBanner
(
id
);
updateBannerDialogIsOpened
.
value
=
true
;
updateBannerDialogIsOpened
.
value
=
true
;
};
};
//gọi api detail
//gọi api detail
const
getDetailBanner
=
async
()
=>
{
const
getDetailBanner
=
async
(
id
:
number
)
=>
{
// try {
try
{
// const response = (await api({
const
response
=
(
await
api
({
// url: API_PATHS.getDetailBanner,
url
:
API_PATHS
.
getDetailBanner
,
// method: 'GET',
method
:
'GET'
,
// params: {
params
:
{
// id: id,
id
:
id
,
// },
},
// })) as AxiosResponse
<
BaseResponseBody
<
DetailBannerType
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
DetailBannerConfig
>>
;
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
// bannerId.value = response.data.data.id;
bannerId
.
value
=
response
.
data
.
data
.
id
;
// name.value = response.data.data.name;
name
.
value
=
response
.
data
.
data
.
name
;
// status.value = response.data.data.status;
numIndex
.
value
=
response
.
data
.
data
.
numIndex
;
// }
status
.
value
=
response
.
data
.
data
.
status
;
// } catch (error) {}
image
.
value
=
config
.
API_IMAGE_ENDPOINT
+
response
.
data
.
data
.
image
;
imageChange
.
value
=
response
.
data
.
data
.
image
;
}
}
catch
(
error
)
{}
};
};
//gọi api update
//gọi api update
const
updateBanner
=
async
()
=>
{
const
updateBanner
=
async
()
=>
{
// const data = {
if
(
avatarFile
.
value
)
{
// id: bannerId.value,
avatarUploaded
.
value
=
await
callApiUploadAvatar
(
avatarFile
.
value
);
// name: name.value,
void
confirmUpdate
(
avatarUploaded
.
value
);
// status: status.value,
}
else
{
// };
void
confirmUpdate
(
imageChange
.
value
);
// const response = (await api({
}
// url: API_PATHS.updateBanner,
};
// method: 'POST',
// data,
const
confirmUpdate
=
async
(
image
:
string
)
=>
{
// })) as AxiosResponse
<
BaseResponseBody
<
UpdateBannerType
[]
>>
;
const
data
=
{
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
id
:
bannerId
.
value
,
// updateBannerDialogIsOpened.value = false;
name
:
name
.
value
,
// Notify.create({
numIndex
:
numIndex
.
value
,
// type: 'positive',
status
:
status
.
value
,
// message: i18n.global.t('banner.actionMessages.updateBannerAccess'),
image
,
// actions: [{ icon: 'close', color: 'white' }],
};
// });
const
response
=
(
await
api
({
// void getListBanner();
url
:
API_PATHS
.
updateBanner
,
// }
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
UpdateBannerConfig
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
updateBannerDialogIsOpened
.
value
=
false
;
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'banner.actionMessages.updateBannerAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListBanner
();
}
};
};
const
setAvatar
=
(
value
:
{
file
?:
File
;
url
?:
string
})
=>
{
const
setAvatar
=
(
value
:
{
file
?:
File
;
url
?:
string
})
=>
{
...
@@ -401,6 +428,10 @@ export default defineComponent({
...
@@ -401,6 +428,10 @@ export default defineComponent({
bannerTableColumns
,
bannerTableColumns
,
bannerTableRows
,
bannerTableRows
,
getListBanner
,
getListBanner
,
pageIndex
,
pageSize
,
totalPage
,
changePageSize
,
BannerStatus
,
BannerStatus
,
openAddBannerDialog
,
openAddBannerDialog
,
name
,
name
,
...
@@ -412,17 +443,15 @@ export default defineComponent({
...
@@ -412,17 +443,15 @@ export default defineComponent({
getDetailBanner
,
getDetailBanner
,
updateBanner
,
updateBanner
,
nameBanner
,
nameBanner
,
urlTarget
,
image
,
image
,
type
,
numIndex
,
location
,
typeOptions
,
locationOptions
,
setAvatar
,
setAvatar
,
callApiUploadAvatar
,
callApiUploadAvatar
,
deleteAvatar
,
deleteAvatar
,
configImg
,
configImg
,
avatarUploaded
,
avatarUploaded
,
bannerId
,
confirmUpdate
,
};
};
},
},
});
});
...
...
src/pages/cau-hinh-doi-tac-truyen-thong/index.vue
0 → 100644
View file @
f9adb60e
<
template
>
<div
class=
"row q-col-gutter-sm flex-center q-mt-sm"
>
<div
class=
"col-auto text-h6 text-weight-regular flex flex-center q-mr-md"
>
{{
$t
(
'configPartner.title'
)
}}
<q-separator
vertical
spaced
/>
</div>
<q-space></q-space>
<div
class=
"col-2"
>
<q-input
v-model=
"nameConfigPartner"
type=
"text"
dense
outlined
label=
"Tên"
clearable
></q-input>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.search')"
@
click=
"getListConfigPartner"
style=
"width: 7.14rem"
></q-btn>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
style=
"width: 7.14rem"
@
click=
"openAddConfigPartnerDialog"
>
</q-btn>
</div>
<div
class=
"col-12 q-mt-sm"
>
<q-table
:rows=
"configPartnerTableRows"
:columns=
"configPartnerTableColumns"
row-key=
"bannerName"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
:rows-per-page-label=
"$t('recordPerPage')"
:pagination=
"
{
rowsPerPage: 0,
}"
hide-pagination
class="sticky-header-table"
>
<template
v-slot:body-cell-action=
"item"
>
<q-td
style=
"padding: 0; text-align: center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-account-edit-outline"
@
click=
"openUpdateConfigPartnerDialog(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'configPartner.toolTipMessage.updateConfigPartner'
)
}}
</q-tooltip>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
@
click=
"confirmDeleteConfigPartner(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'configPartner.toolTipMessage.deleteConfigPartner'
)
}}
</q-tooltip>
</q-btn>
</q-td>
</
template
>
<
template
v-slot:body-cell-status=
"rowData"
>
<q-td>
<div
align=
"center"
>
<q-chip
:color=
"
rowData.value === BannerStatus.active ? 'positive' : 'orange'
"
text-color=
"white"
size=
"sm"
>
{{
rowData
.
value
===
BannerStatus
.
active
?
$t
(
'configPartner.statusLabel.active'
)
:
$t
(
'configPartner.statusLabel.inactive'
)
}}
</q-chip>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-image=
"image"
>
<q-td
style=
"padding: auto; height: 100%; text-align: center"
>
<q-img
style=
"width: 12rem; height: 8rem"
:src=
"configImg.API_IMAGE_ENDPOINT + image.row.image"
></q-img>
</q-td>
</
template
>
</q-table>
</div>
<div
class=
"col-12 q-mt-sm"
>
<Pagination
v-model:currentPage=
"pageIndex"
v-model:pageSize=
"pageSize"
:totalPage=
"totalPage"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListConfigPartner"
/>
</div>
<AddUpdateConfigPartnerDialog
v-model:isOpened=
"addConfigPartnerDialogIsOpened"
v-model:name=
"name"
v-model:image=
"image"
v-model:numIndex=
"numIndex"
v-model:status=
"status"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
isUpdate
@
saveConfigPartnerInfo=
"addConfigPartner"
/>
<AddUpdateConfigPartnerDialog
v-model:isOpened=
"updateConfigPartnerDialogIsOpened"
v-model:name=
"name"
v-model:image=
"image"
v-model:numIndex=
"numIndex"
v-model:status=
"status"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
@
saveConfigPartnerInfo=
"updateConfigPartner"
/>
</div>
</template>
<
script
lang=
"ts"
>
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
AxiosResponse
}
from
'axios'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
PaginationResponse
,
FileUploadType
,
ListConfigPartner
,
DetailConfigPartner
,
updateConfigPartnerConfig
,
addConfigPartnerConfig
,
}
from
'src/assets/type'
;
import
{
config
,
API_PATHS
}
from
'src/assets/configurations'
;
import
{
BannerStatus
}
from
'src/assets/enums'
;
import
AddUpdateConfigPartnerDialog
from
'components/add-update-cau-hinh-doi-tac-truyen-thong/index.vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
type
AvatarType
=
{
file
?:
File
;
url
?:
string
|
null
;
};
export
default
defineComponent
({
components
:
{
Pagination
,
AddUpdateConfigPartnerDialog
,
},
setup
()
{
const
configPartnerTableColumns
=
[
{
name
:
'name'
,
field
:
'name'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'configPartner.tableColumnsConfigPartner.name'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'image'
,
field
:
'image'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'configPartner.tableColumnsConfigPartner.image'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'numIndex'
,
field
:
'numIndex'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'configPartner.tableColumnsConfigPartner.numIndex'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'configPartner.tableColumnsConfigPartner.status'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'configPartner.tableColumnsConfigPartner.action'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
];
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
1
);
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListConfigPartner
();
};
const
configPartnerTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
addConfigPartnerDialogIsOpened
=
ref
(
false
);
const
updateConfigPartnerDialogIsOpened
=
ref
(
false
);
const
name
=
ref
(
''
);
const
image
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
numIndex
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
status
:
Ref
<
number
>
=
ref
(
BannerStatus
.
active
);
const
configPartnerId
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
nameConfigPartner
=
ref
(
''
);
const
avatarFile
:
Ref
<
File
|
null
>
=
ref
(
null
);
const
avatarUploaded
:
Ref
<
string
>
=
ref
(
''
);
const
imageChange
:
Ref
<
string
>
=
ref
(
''
);
//gọi api ds
const
getListConfigPartner
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListConfigPartner
,
method
:
'GET'
,
params
:
{
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
name
:
nameConfigPartner
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ListConfigPartner
[]
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
configPartnerTableRows
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
};
const
confirmDeleteConfigPartner
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'configPartner.confirmActionsTitle.confirmDeleteConfigPartnerTitle'
),
message
:
i18n
.
global
.
t
(
'configPartner.confirmActionsTitle.confirmDeleteConfigPartnerContent'
),
cancel
:
i18n
.
global
.
t
(
'configPartner.confirmActionsTitle.confirmDeleteConfigPartnerCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deleteConfigPartner
(
id
);
});
};
//gói api xóa
const
deleteConfigPartner
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
deleteConfigPartner
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'configPartner.actionMessages.deleteConfigPartnerAccess'
),
});
void
getListConfigPartner
();
}
}
catch
(
error
)
{}
};
const
openAddConfigPartnerDialog
=
()
=>
{
name
.
value
=
''
;
numIndex
.
value
=
undefined
;
image
.
value
=
null
;
status
.
value
=
BannerStatus
.
active
;
addConfigPartnerDialogIsOpened
.
value
=
true
;
};
//gọi api add
const
addConfigPartner
=
async
()
=>
{
avatarUploaded
.
value
=
await
callApiUploadAvatar
(
avatarFile
.
value
as
File
);
const
data
=
{
name
:
name
.
value
,
image
:
avatarUploaded
.
value
,
numIndex
:
numIndex
.
value
,
status
:
status
.
value
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
addConfigPartner
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
addConfigPartnerConfig
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
addConfigPartnerDialogIsOpened
.
value
=
false
;
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'configPartner.actionMessages.addNewBannerAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListConfigPartner
();
}
};
const
openUpdateConfigPartnerDialog
=
(
id
:
number
)
=>
{
void
getDetailConfigPartner
(
id
);
updateConfigPartnerDialogIsOpened
.
value
=
true
;
};
//gọi api detail
const
getDetailConfigPartner
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getDetailConfigPartner
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
DetailConfigPartner
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
configPartnerId
.
value
=
response
.
data
.
data
.
id
;
name
.
value
=
response
.
data
.
data
.
name
;
numIndex
.
value
=
response
.
data
.
data
.
numIndex
;
status
.
value
=
response
.
data
.
data
.
status
;
image
.
value
=
config
.
API_IMAGE_ENDPOINT
+
response
.
data
.
data
.
image
;
imageChange
.
value
=
response
.
data
.
data
.
image
;
}
}
catch
(
error
)
{}
};
//gọi api update
const
updateConfigPartner
=
async
()
=>
{
if
(
avatarFile
.
value
)
{
avatarUploaded
.
value
=
await
callApiUploadAvatar
(
avatarFile
.
value
);
void
confirmUpdate
(
avatarUploaded
.
value
);
}
else
{
void
confirmUpdate
(
imageChange
.
value
);
}
};
const
confirmUpdate
=
async
(
image
:
string
)
=>
{
const
data
=
{
id
:
configPartnerId
.
value
,
name
:
name
.
value
,
numIndex
:
numIndex
.
value
,
status
:
status
.
value
,
image
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateConfigPartner
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
updateConfigPartnerConfig
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
updateConfigPartnerDialogIsOpened
.
value
=
false
;
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'configPartner.actionMessages.updateConfigPartnerAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListConfigPartner
();
}
};
const
setAvatar
=
(
value
:
{
file
?:
File
;
url
?:
string
})
=>
{
avatarFile
.
value
=
value
.
file
as
File
;
image
.
value
=
value
.
url
as
string
;
};
const
callApiUploadAvatar
=
async
(
file
:
File
)
=>
{
try
{
const
bodyFormData
=
new
FormData
();
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'http://cms.vab.xteldev.com/file/upload/'
,
method
:
'POST'
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
return
response
.
data
.
data
.
fileName
;
}
else
{
return
''
;
}
}
catch
(
error
)
{
return
''
;
}
};
const
deleteAvatar
=
()
=>
{
image
.
value
=
null
;
};
const
configImg
=
config
;
onMounted
(()
=>
{
void
getListConfigPartner
();
});
return
{
addConfigPartnerDialogIsOpened
,
updateConfigPartnerDialogIsOpened
,
configPartnerTableColumns
,
configPartnerTableRows
,
getListConfigPartner
,
pageIndex
,
pageSize
,
totalPage
,
changePageSize
,
BannerStatus
,
openAddConfigPartnerDialog
,
name
,
status
,
addConfigPartner
,
confirmDeleteConfigPartner
,
deleteConfigPartner
,
openUpdateConfigPartnerDialog
,
getDetailConfigPartner
,
updateConfigPartner
,
nameConfigPartner
,
image
,
numIndex
,
setAvatar
,
callApiUploadAvatar
,
deleteAvatar
,
configImg
,
avatarUploaded
,
configPartnerId
,
confirmUpdate
,
};
},
});
</
script
>
src/router/routes.ts
View file @
f9adb60e
...
@@ -22,6 +22,7 @@ export enum Pages {
...
@@ -22,6 +22,7 @@ export enum Pages {
configSystem
=
'cau-hinh-trang-tinh'
,
configSystem
=
'cau-hinh-trang-tinh'
,
news
=
'cau-hinh-tin-tuc'
,
news
=
'cau-hinh-tin-tuc'
,
hotProduct
=
'cau-hinh-san-pham-noi-bat'
,
hotProduct
=
'cau-hinh-san-pham-noi-bat'
,
configPartner
=
'cau-hinh-doi-tac-truyen-thong'
,
}
}
const
routes
:
RouteRecordRaw
[]
=
[
const
routes
:
RouteRecordRaw
[]
=
[
...
@@ -134,6 +135,12 @@ const routes: RouteRecordRaw[] = [
...
@@ -134,6 +135,12 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/cau-hinh-san-pham-noi-bat/index.vue'
),
component
:
()
=>
import
(
'pages/cau-hinh-san-pham-noi-bat/index.vue'
),
name
:
Pages
.
hotProduct
,
name
:
Pages
.
hotProduct
,
},
},
{
path
:
'cau-hinh-doi-tac-truyen-thong'
,
component
:
()
=>
import
(
'pages/cau-hinh-doi-tac-truyen-thong/index.vue'
),
name
:
Pages
.
configPartner
,
},
],
],
},
},
...
...
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