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
550dc170
Commit
550dc170
authored
Jun 24, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
184f9c53
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
172 additions
and
16 deletions
+172
-16
configurations.example.ts
src/assets/configurations.example.ts
+6
-4
openDialogRefusedBrowser.vue
src/components/customer/openDialogRefusedBrowser.vue
+121
-0
index.vue
src/pages/bai-viet/index.vue
+2
-1
index.vue
src/pages/banner/index.vue
+2
-1
index.vue
src/pages/cau-hinh-doi-tac-truyen-thong/index.vue
+2
-1
index.vue
src/pages/cau-hinh-san-pham-noi-bat/index.vue
+2
-1
index.vue
src/pages/cau-hinh-tin-tuc/index.vue
+2
-2
index.vue
src/pages/khach-hang/index.vue
+33
-4
index.vue
src/pages/thong-tin-chung/index.vue
+2
-2
No files found.
src/assets/configurations.example.ts
View file @
550dc170
export
const
config
=
{
API_ENDPOINT
:
'https://cms.vab.vn/api/'
,
// pro
// API_ENDPOINT:'http://103.147.34.34:10700/api/' ,
// API_IMAGE_ENDPOINT: 'http://103.147.34.34:10700/api/upload/' , // test
API_IMAGE_ENDPOINT
:
'https://cms.vab.vn/file/upload/'
,
// pro
// API_ENDPOINT: 'https://cms.vab.vn/api/',
// API_IMAGE_ENDPOINT: 'https://cms.vab.vn/file/upload/',
// dev
API_ENDPOINT
:
'https://cms.vab.xteldev.com/api/'
,
API_IMAGE_ENDPOINT
:
'https://cms.vab.xteldev.com/file/upload/'
,
API_RES_CODE
:
{
OK
:
{
...
...
src/components/customer/openDialogRefusedBrowser.vue
0 → 100644
View file @
550dc170
<
template
>
<q-dialog
persistent
:model-value=
"openDialogRefusedBrowser"
>
<q-card
style=
"min-width: 900px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"confirmRefusedCustomer"
>
<q-card-section
style=
"padding-bottom:10px"
>
<q-item
style=
"padding-left: 10px"
>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
Lý do
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-card-section
style=
"padding-top:0px"
>
<q-input
outlined
hide-bottom-space
:rules=
"contentRules"
v-model=
"content"
label=
"Nội dung"
type=
"textarea"
/>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
label=
"Hủy"
@
click=
"$emit('click:CloseBtn')"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
label=
"Ok"
/>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
emit
}
from
'cluster'
;
export
default
defineComponent
({
props
:
{
openDialogRefusedBrowser
:
{
type
:
Boolean
,
required
:
true
,
},
customerId
:
{
type
:
Number
,
required
:
true
}
},
setup
(
props
,
context
){
watch
(
()
=>
props
.
openDialogRefusedBrowser
,
(
value
)
=>
{
if
(
value
)
{
content
.
value
=
null
}
}
);
const
content
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
contentRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
'Vui lòng nhập nội dung'
];
const
confirmRefusedCustomer
=
async
()
=>
{
try
{
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
browserCustomer
,
method
:
'POST'
,
data
:
{
id
:
props
.
customerId
,
isCustomer
:
1
,
approvalStatus
:
0
,
reason
:
content
.
value
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
browserResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
'Từ chối duyệt thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
context
.
emit
(
'editReCustomer'
)
context
.
emit
(
'click:CloseBtn'
)
}
}
catch
(
error
)
{}
}
return
{
contentRules
,
content
,
confirmRefusedCustomer
}
},
emits
:[
'click:CloseBtn'
,
'editReCustomer'
]
})
</
script
>
\ No newline at end of file
src/pages/bai-viet/index.vue
View file @
550dc170
...
...
@@ -461,7 +461,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
...
...
src/pages/banner/index.vue
View file @
550dc170
...
...
@@ -400,7 +400,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
...
...
src/pages/cau-hinh-doi-tac-truyen-thong/index.vue
View file @
550dc170
...
...
@@ -408,7 +408,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// test
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
...
...
src/pages/cau-hinh-san-pham-noi-bat/index.vue
View file @
550dc170
...
...
@@ -468,7 +468,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
...
...
src/pages/cau-hinh-tin-tuc/index.vue
View file @
550dc170
...
...
@@ -413,8 +413,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// test
// url:'http://103.147.34.34:10700/api/upload/', // pro
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
...
...
src/pages/khach-hang/index.vue
View file @
550dc170
...
...
@@ -97,6 +97,15 @@
@
click=
"confirmBrowserCustomer(rowData.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
Duyệt tài khoản
</q-tooltip>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-block-helper"
@
click=
"confirmRefusedBrowserCustomer(rowData.row.id)"
>
<q-tooltip
:offset=
"[10, 10]"
>
Từ chối duyệt
</q-tooltip>
</q-btn>
<q-btn
flat
...
...
@@ -140,7 +149,7 @@
{{
rowData
.
value
===
1
?
'Đã duyệt'
:
'Ch
ờ
duyệt'
:
'Ch
ưa
duyệt'
}}
</q-chip>
</div>
...
...
@@ -171,6 +180,15 @@
@
click:CloseBtn=
"showDialogUpdate = false"
@
editCustomer=
"updateCustomer"
></UpdateNewCustomerDialogComponent>
<RefusedBrowserCustomer
:customer-id=
"customerId"
v-model:open-dialog-refused-browser=
"openDialogRefusedBrowser"
@
click:CloseBtn=
"openDialogRefusedBrowser = false"
@
editReCustomer=
"getListCustomers"
>
</RefusedBrowserCustomer>
</div>
</div>
</div>
...
...
@@ -182,6 +200,7 @@ import { defineComponent, onMounted, Ref, ref } from 'vue';
import
Pagination
from
'components/pagination/index.vue'
;
import
AddNewCustomerDialogComponent
from
'../../components/customer/add-new-customer-dialog/index.vue'
;
import
UpdateNewCustomerDialogComponent
from
'../../components/customer/update-new-customer-dialog/index.vue'
;
import
RefusedBrowserCustomer
from
'../../components/customer/openDialogRefusedBrowser.vue'
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
...
...
@@ -195,6 +214,7 @@ export default defineComponent({
components
:
{
AddNewCustomerDialogComponent
,
UpdateNewCustomerDialogComponent
,
RefusedBrowserCustomer
,
Pagination
,
},
setup
()
{
...
...
@@ -298,7 +318,9 @@ export default defineComponent({
];
const
userTableRowsCustomer
:
Ref
<
CustomerType
[]
>
=
ref
([]);
const
customerInfo
:
Ref
<
CustomerType
|
null
>
=
ref
(
null
);
const
customerId
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
showDialog
=
ref
(
false
);
const
openDialogRefusedBrowser
=
ref
(
false
);
const
showDialogUpdate
=
ref
(
false
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
...
...
@@ -378,17 +400,21 @@ export default defineComponent({
// i18n.global.t(
// 'customer.confirmActionsTitle.confirmDeleteUserContent'
// ),
cancel
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserCancelBtnLabel'
),
color
:
'
negative
'
,
color
:
'
secondary
'
,
}).
onOk
(()
=>
{
// void deleteCustomer(id);
void
browserCustomer
(
id
);
});
};
const
browserCustomer
=
async
(
id
:
number
)
=>
{
const
confirmRefusedBrowserCustomer
=
(
id
:
number
)
=>
{
customerId
.
value
=
id
openDialogRefusedBrowser
.
value
=
true
}
const
browserCustomer
=
async
(
id
:
number
)
=>
{
try
{
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
browserCustomer
,
...
...
@@ -553,6 +579,7 @@ export default defineComponent({
addCustomer
,
showDialogUpdate
,
showDialog
,
openDialogRefusedBrowser
,
id
,
userName
,
fullName
,
...
...
@@ -584,6 +611,8 @@ export default defineComponent({
confirmDeleteCustomer
,
confirmBrowserCustomer
,
customerInfo
,
customerId
,
confirmRefusedBrowserCustomer
};
},
});
...
...
src/pages/thong-tin-chung/index.vue
View file @
550dc170
...
...
@@ -284,8 +284,8 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'https://cms.vab.vn/file/upload/'
,
// test
// url:'http://103.147.34.34:10700/api/upload/', // pro
// url: 'https://cms.vab.vn/file/upload/', // pro
url
:
'https://cms.vab.xteldev.com/file/upload/'
,
// test
method
:
'POST'
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
...
...
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