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
32749220
Commit
32749220
authored
Jul 13, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
37e665d2
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
138 additions
and
75 deletions
+138
-75
enums.ts
src/assets/enums.ts
+1
-1
type.ts
src/assets/type.ts
+4
-0
index.vue
src/components/configSystem/index.vue
+41
-23
index.ts
src/i18n/vi/index.ts
+14
-11
index.vue
src/pages/cau-hinh-he-thong/index.vue
+74
-36
routes.ts
src/router/routes.ts
+4
-4
No files found.
src/assets/enums.ts
View file @
32749220
...
...
@@ -50,7 +50,7 @@ export enum ContactStatus {
inactive
=
0
,
}
export
enum
Policy
Status
{
export
enum
ConfigSystem
Status
{
active
=
1
,
inactive
=
0
,
}
...
...
src/assets/type.ts
View file @
32749220
...
...
@@ -474,6 +474,7 @@ export type ListConfigSystem = {
namePage
:
string
;
title
:
string
;
content
:
string
;
url
:
string
;
numIndex
:
number
;
status
:
number
;
createTime
?:
string
;
...
...
@@ -488,6 +489,7 @@ export type DetailConfigSystem = {
title
:
string
;
content
:
string
;
numIndex
:
number
;
url
:
string
;
status
:
number
;
createTime
?:
string
;
createBy
?:
string
;
...
...
@@ -501,6 +503,7 @@ export type UpdateConfigSystem = {
title
:
string
;
content
:
string
;
status
:
number
;
url
:
string
;
numIndex
:
number
;
createTime
?:
string
;
createBy
?:
string
;
...
...
@@ -512,6 +515,7 @@ export type AddConfigSystem = {
namePage
:
string
;
title
:
string
;
content
:
string
;
url
:
string
;
numIndex
:
number
;
status
:
number
;
};
src/components/
policy
/index.vue
→
src/components/
configSystem
/index.vue
View file @
32749220
...
...
@@ -8,7 +8,7 @@
<q-form
greedy
@
submit
.
prevent=
"
$emit('addUpdate
Policy
',
{});
$emit('addUpdate
ConfigSystem
',
{});
$emit('update:isOpened', false);
"
>
...
...
@@ -17,8 +17,8 @@
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
isUpdate
?
$t
(
'list
Policy
.dialogLabel.titleAdd'
)
:
$t
(
'list
Policy
.dialogLabel.titleUpdate'
)
?
$t
(
'list
ConfigSystem
.dialogLabel.titleAdd'
)
:
$t
(
'list
ConfigSystem
.dialogLabel.titleUpdate'
)
}}
</q-item-label>
</q-item-section>
</q-item>
...
...
@@ -31,7 +31,7 @@
<q-input
:model-value=
"namePage"
@
update:model-value=
"$emit('update:namePage', $event)"
:label=
"$t('list
Policy
.dialogLabel.fieldLabels.namePage')"
:label=
"$t('list
ConfigSystem
.dialogLabel.fieldLabels.namePage')"
class=
"q-my-sm"
type=
"text"
outlined
...
...
@@ -47,29 +47,39 @@
outlined
clearable
></q-input>
<div
class=
"q-pt-sm q-pl-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'listConfigSystem.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
:true-value=
"ConfigSystemStatus.active"
:false-value=
"ConfigSystemStatus.inactive"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
</div>
<div
class=
"col-6"
>
<q-input
:model-value=
"title"
@
update:model-value=
"$emit('update:title', $event)"
:label=
"$t('list
Policy
.dialogLabel.fieldLabels.title')"
:label=
"$t('list
ConfigSystem
.dialogLabel.fieldLabels.title')"
class=
"q-my-sm"
type=
"text"
outlined
:rules=
"titleRules"
clearable
></q-input>
<div
class=
"q-pt-sm q-pl-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'listPolicy.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
:true-value=
"PolicyStatus.active"
:false-value=
"PolicyStatus.inactive"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
<q-input
:model-value=
"url"
@
update:model-value=
"$emit('update:url', $event)"
:label=
"$t('listConfigSystem.dialogLabel.fieldLabels.url')"
class=
"q-my-sm"
type=
"text"
outlined
:rules=
"urlRules"
clearable
></q-input>
</div>
<div
class=
"col-12"
>
<div>
...
...
@@ -178,7 +188,7 @@
color=
"grey"
no-caps
style=
"width: 90px"
:label=
"$t('list
Policy
.crudActions.cancel')"
:label=
"$t('list
ConfigSystem
.crudActions.cancel')"
@
click=
"$emit('update:isOpened', false)"
/>
<q-btn
...
...
@@ -186,7 +196,7 @@
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('list
Policy
.crudActions.save')"
:label=
"$t('list
ConfigSystem
.crudActions.save')"
/>
</q-card-actions>
</q-form>
...
...
@@ -195,7 +205,7 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Policy
Status
}
from
'src/assets/enums'
;
import
{
ConfigSystem
Status
}
from
'src/assets/enums'
;
import
{
defineComponent
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
...
...
@@ -208,6 +218,7 @@ export default defineComponent({
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
namePage
:
{
type
:
String
,
required
:
true
},
title
:
{
type
:
String
,
required
:
true
},
url
:
{
type
:
String
,
required
:
true
},
numIndex
:
{
type
:
Number
,
required
:
true
},
content
:
{
type
:
String
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
...
...
@@ -216,17 +227,23 @@ export default defineComponent({
const
namePageRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'list
Policy
.validateMessages.requireNamePage'
),
i18n
.
global
.
t
(
'list
ConfigSystem
.validateMessages.requireNamePage'
),
];
const
titleRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'listPolicy.validateMessages.requireTitle'
),
i18n
.
global
.
t
(
'listConfigSystem.validateMessages.requireTitle'
),
];
const
urlRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'listConfigSystem.validateMessages.requireUrl'
),
];
return
{
namePageRules
,
titleRules
,
PolicyStatus
,
urlRules
,
ConfigSystemStatus
,
};
},
emits
:
[
...
...
@@ -234,10 +251,11 @@ export default defineComponent({
'update:namePage'
,
'update:title'
,
'update:content'
,
'update:url'
,
'update:numIndex'
,
'update:status'
,
'click:CloseBtn'
,
'addUpdate
Policy
'
,
'addUpdate
ConfigSystem
'
,
],
});
</
script
>
src/i18n/vi/index.ts
View file @
32749220
...
...
@@ -959,33 +959,36 @@ export default {
},
//Cấu hình chính sách
list
Policy
:
{
list
ConfigSystem
:
{
add
:
'Thêm'
,
toolTipMessageUpdate
:
'Cập nhập'
,
toolTipMessageDelete
:
'Xóa'
,
title
:
'Cấu hình
Chính sách
'
,
title
:
'Cấu hình
hệ thống
'
,
titleColumnsTable
:
{
stt
:
'STT'
,
namePage
:
'Tên c
hính sác
h'
,
namePage
:
'Tên c
ấu hìn
h'
,
title
:
'Tiêu đề'
,
url
:
'Url target'
,
content
:
'Nội dung'
,
numIndex
:
'Vị trí'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
},
dialogLabel
:
{
titleAdd
:
'Thêm C
hính sác
h'
,
titleUpdate
:
'Cập nhập C
hính sác
h'
,
titleAdd
:
'Thêm C
ấu hìn
h'
,
titleUpdate
:
'Cập nhập C
ấu hìn
h'
,
fieldLabels
:
{
namePage
:
'Tên c
hính sác
h *'
,
namePage
:
'Tên c
ấu hìn
h *'
,
title
:
'Tiêu đề *'
,
url
:
'Url target *'
,
numIndex
:
'Vị trí'
,
status
:
'Trạng thái'
,
},
},
validateMessages
:
{
requireNamePage
:
'Vui lòng nhập Tên
chính sác
h'
,
requireNamePage
:
'Vui lòng nhập Tên
Cấu hìn
h'
,
requireTitle
:
'Vui lòng nhập Tiêu đề'
,
requireUrl
:
'Vui lòng nhập Url target'
,
},
crudActions
:
{
save
:
'Lưu'
,
...
...
@@ -997,13 +1000,13 @@ export default {
},
confirmActionsTitle
:
{
confirmDelete
:
'Xác nhận'
,
confirmDeleteContent
:
'Bạn có chắc muốn xoá
Menu
này không?'
,
confirmDeleteContent
:
'Bạn có chắc muốn xoá
Cấu hình
này không?'
,
confirmDeleteCancelBtnLabel
:
'Huỷ'
,
},
actionMessages
:
{
addSuccess
:
'Thêm
Menu
thành công'
,
updateSuccess
:
'Cập nhập
Menu
thành công'
,
deleteSuccess
:
'Xóa
Menu
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'
,
deleteSuccess
:
'Xóa
Cấu hình
thành công'
,
},
},
...
...
src/pages/cau-hinh-
chinh-sach
/index.vue
→
src/pages/cau-hinh-
he-thong
/index.vue
View file @
32749220
This diff is collapsed.
Click to expand it.
src/router/routes.ts
View file @
32749220
...
...
@@ -19,7 +19,7 @@ export enum Pages {
menu
=
'menu'
,
listBooking
=
'danh-sach-booking'
,
work
=
'cong-viec'
,
policy
=
'cau-hinh-chinh-sach
'
,
configSystem
=
'cau-hinh-he-thong
'
,
news
=
'cau-hinh-tin-tuc'
,
hotProduct
=
'cau-hinh-san-pham-noi-bat'
,
}
...
...
@@ -120,9 +120,9 @@ const routes: RouteRecordRaw[] = [
name
:
Pages
.
work
,
},
{
path
:
'cau-hinh-
chinh-sach
'
,
component
:
()
=>
import
(
'pages/cau-hinh-
chinh-sach
/index.vue'
),
name
:
Pages
.
policy
,
path
:
'cau-hinh-
he-thong
'
,
component
:
()
=>
import
(
'pages/cau-hinh-
he-thong
/index.vue'
),
name
:
Pages
.
configSystem
,
},
{
path
:
'cau-hinh-tin-tuc'
,
...
...
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