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
fa7c084a
Commit
fa7c084a
authored
May 11, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
00f5dcf5
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
635 additions
and
4 deletions
+635
-4
enums.ts
src/assets/enums.ts
+5
-0
index.vue
src/components/add-update-post/index.vue
+160
-0
index.vue
...ents/units-manager/unit-add-update-bank-account/index.vue
+1
-1
index.ts
src/i18n/vi/index.ts
+58
-1
index.vue
src/pages/bai-viet/index.vue
+403
-0
index.vue
src/pages/linh-vuc-hoat-dong/index.vue
+1
-1
index.vue
src/pages/xep-hang-khach-hang/index.vue
+1
-1
routes.ts
src/router/routes.ts
+6
-0
No files found.
src/assets/enums.ts
View file @
fa7c084a
...
@@ -23,3 +23,8 @@ export enum FieldStatus {
...
@@ -23,3 +23,8 @@ export enum FieldStatus {
active
=
1
,
active
=
1
,
inactive
=
0
,
inactive
=
0
,
}
}
export
enum
PostStatus
{
active
=
1
,
inactive
=
0
,
}
src/components/add-update-post/index.vue
0 → 100644
View file @
fa7c084a
<
template
>
<q-dialog
persistent
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
<q-card
class=
"full-width"
style=
"max-width: 50rem"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('savePostInfo',
{});
$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
(
'post.dialogLabel.title.addPost'
)
:
$t
(
'post.dialogLabel.title.updatePost'
)
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"overflow-auto"
style=
"max-height: calc(100vh - 10rem)"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<q-input
:model-value=
"avatar"
@
update:model-value=
"$emit('update:avatar', $event)"
:label=
"$t('post.dialogLabel.postLabels.avatar')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"avatarRules"
clearable
></q-input>
</div>
<div
class=
"col-6"
>
<q-input
:model-value=
"name"
@
update:model-value=
"$emit('update:name', $event)"
:label=
"$t('post.dialogLabel.postLabels.name')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"nameRules"
clearable
></q-input>
<q-input
:model-value=
"description"
@
update:model-value=
"$emit('update:description', $event)"
:label=
"$t('post.dialogLabel.postLabels.description')"
type=
"text"
class=
"q-my-sm"
outlined
></q-input>
<q-input
:model-value=
"content"
@
update:model-value=
"$emit('update:content', $event)"
:label=
"$t('post.dialogLabel.postLabels.content')"
:rules=
"contentRules"
type=
"textarea"
class=
"q-my-sm"
outlined
></q-input>
<div
class=
"q-pt-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'post.dialogLabel.postLabels.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('post.crudActions.cancel')"
@
click=
"$emit('update:isOpened', false)"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('post.crudActions.save')"
/>
</div>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
props
:
{
isOpened
:
{
type
:
Boolean
,
required
:
true
,
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
avatar
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
description
:
{
type
:
String
,
required
:
true
},
content
:
{
type
:
String
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
},
setup
()
{
const
avatarRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'post.validateMessages.requireAvatar'
),
];
const
contentRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'post.validateMessages.requireContent'
),
];
const
nameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'post.validateMessages.requireName'
),
];
return
{
contentRules
,
nameRules
,
avatarRules
,
};
},
emits
:
[
'update:isOpened'
,
'update:avatar'
,
'update:name'
,
'update:description'
,
'update:content'
,
'update:status'
,
'savePostInfo'
,
],
});
</
script
>
src/components/units-manager/unit-add-update-bank-account/index.vue
View file @
fa7c084a
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
:label=
"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.numberCard')
$t('managingUnitAdd.dialogLabel.fieldLabels.numberCard')
"
"
type=
"
text
"
type=
"
number
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"numberCardRules"
:rules=
"numberCardRules"
...
...
src/i18n/vi/index.ts
View file @
fa7c084a
...
@@ -592,7 +592,7 @@ export default {
...
@@ -592,7 +592,7 @@ export default {
updateField
:
'Cập nhật 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
*
'
,
description
:
'Mô tả *'
,
description
:
'Mô tả *'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
},
},
...
@@ -621,4 +621,61 @@ export default {
...
@@ -621,4 +621,61 @@ export default {
updateFieldAccess
:
'Cập nhật 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'
,
},
},
},
},
//bài viết
post
:
{
title
:
'Danh sách bài viết'
,
tableColumnsPost
:
{
stt
:
'STT'
,
name
:
'Tên bài viết'
,
avatar
:
'Avatar'
,
category
:
'Danh mục bài viết'
,
addUser
:
'Người thêm'
,
addTime
:
'Thời gian thêm'
,
updateUser
:
'Người cập nhập'
,
updateTime
:
'Thời gian cập nhật'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
},
statusLabel
:
{
active
:
'Đang hoạt động'
,
inactive
:
'Ngừng hoạt động'
,
},
dialogLabel
:
{
title
:
{
addPost
:
'Thêm bài viết'
,
updatePost
:
'Cập nhật Bài viết'
,
},
postLabels
:
{
name
:
'Tên bài viết *'
,
avatar
:
'Avatar *'
,
description
:
'Mô tả'
,
content
:
'Nội dung *'
,
status
:
'Trạng thái'
,
},
},
toolTipMessage
:
{
updatePost
:
'Cập nhật'
,
deletePost
:
'Xoá'
,
},
crudActions
:
{
save
:
'Lưu'
,
cancel
:
'Đóng'
,
},
validateMessages
:
{
requireName
:
'Vui lòng nhập Tên bài viết'
,
requireAvatar
:
'Vui lòng chọn Avatar'
,
requireContent
:
'Vui lòng nhập Nội dung'
,
},
confirmActionsPost
:
{
confirmDeletePostTitle
:
'Xác nhận'
,
confirmDeletePostCancelBtnLabel
:
'Huỷ'
,
confirmDeletePostContent
:
'Bạn có chắc chắn muốn xoá bài viết này không?'
,
},
actionMessages
:
{
addNewPostAccess
:
'Thêm bài viết thành công'
,
deletePostAccess
:
'Xoá bài viết thành công'
,
updatePostAccess
:
'Cập nhật bài viết thành công'
,
},
},
};
};
src/pages/bai-viet/index.vue
0 → 100644
View file @
fa7c084a
This diff is collapsed.
Click to expand it.
src/pages/linh-vuc-hoat-dong/index.vue
View file @
fa7c084a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<q-table
<q-table
:rows=
"fieldTableRows"
:rows=
"fieldTableRows"
:columns=
"fieldTableColumns"
:columns=
"fieldTableColumns"
row-key=
"
unitCod
e"
row-key=
"
fieldNam
e"
separator=
"cell"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
hide-pagination
hide-pagination
...
...
src/pages/xep-hang-khach-hang/index.vue
View file @
fa7c084a
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<q-table
<q-table
:rows=
"customerRankTableRows"
:rows=
"customerRankTableRows"
:columns=
"customerRankTableColumns"
:columns=
"customerRankTableColumns"
row-key=
"
unit
Code"
row-key=
"
customerRank
Code"
separator=
"cell"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
hide-pagination
hide-pagination
...
...
src/router/routes.ts
View file @
fa7c084a
...
@@ -12,6 +12,7 @@ export enum Pages {
...
@@ -12,6 +12,7 @@ export enum Pages {
addArtist
=
'them-nghe-sy'
,
addArtist
=
'them-nghe-sy'
,
customerRank
=
'xep-hang-khach-hang'
,
customerRank
=
'xep-hang-khach-hang'
,
field
=
'linh-vuc-hoat-dong'
,
field
=
'linh-vuc-hoat-dong'
,
post
=
'bai-viet'
,
}
}
const
routes
:
RouteRecordRaw
[]
=
[
const
routes
:
RouteRecordRaw
[]
=
[
...
@@ -74,6 +75,11 @@ const routes: RouteRecordRaw[] = [
...
@@ -74,6 +75,11 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/linh-vuc-hoat-dong/index.vue'
),
component
:
()
=>
import
(
'pages/linh-vuc-hoat-dong/index.vue'
),
name
:
Pages
.
field
,
name
:
Pages
.
field
,
},
},
{
path
:
'bai-viet'
,
component
:
()
=>
import
(
'pages/bai-viet/index.vue'
),
name
:
Pages
.
post
,
},
],
],
},
},
...
...
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