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
51520254
Commit
51520254
authored
May 07, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format code
parent
0f5d4a9c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
123 deletions
+76
-123
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+5
-6
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+2
-5
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+58
-101
index.vue
src/pages/don-vi-chu-quan/index.vue
+11
-11
No files found.
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
51520254
import
{
defineComponent
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
...
...
@@ -127,10 +127,10 @@ export default defineComponent({
),
];
const
selectedFile
=
(
value
:
FileList
)
=>
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
console
.
log
(
value
);
console
.
log
(
URL
.
createObjectURL
(
value
[
0
]));
}
}
;
const
upload
=
ref
(
null
);
const
uploadBanner
=
()
=>
{
// eslint-disable-next-line
...
...
@@ -155,7 +155,6 @@ export default defineComponent({
upload
,
uploadBanner
,
selectedFile
,
};
},
emits
:
[
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
51520254
...
...
@@ -28,9 +28,7 @@
:label=
"$t('artist.artistInformation.tabLabel.hotProduct')"
/>
</q-tabs>
<q-separator
/>
<q-tab-panels
v-model=
"tab"
animated
>
<q-tab-panel
name=
"information"
>
<PersonalInformation
...
...
@@ -76,12 +74,11 @@
:stories=
"stories"
></VabAccount>
</q-tab-panel>
<q-tab-panel
name=
"bankAccount"
>
<BankAccount
:bank-accounts=
"bankAccounts"
@
confirmDeleteAccBank=
"confirmDeleteAccBank"
@
click:addBankBtn=
"
openDialogAddAccBank
"
@
click:addBankBtn=
"
isOpenAddAccountBankDialog = true
"
@
clickEditAccBankBtn=
"openDialogEditAccBank"
></BankAccount>
</q-tab-panel>
...
...
@@ -130,7 +127,7 @@
@
click:CloseBtnAddHotProduct=
"openAddHotProduct = false"
></AddHotProductDialog>
<UpdateHotProduct
:dataUpdate=
"DataUpdatHotProduct"
:dataUpdate=
"DataUpdat
e
HotProduct"
@
UpdateData=
"UpdateData($event)"
@
click:CloseBtnUpdateHotProduct=
"openUpdateHotProduct = false"
v-model:open-update-hot-product=
"openUpdateHotProduct"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
51520254
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
PersonalInformation
from
'../../components/artist-information/personal-information/index.vue'
;
import
VabAccount
from
'../../components/artist-information/VAB-account/index.vue'
;
import
BankAccount
from
'../../components/artist-information/bank-account/index.vue'
;
import
HotProduct
from
'../../components/artist-information/hot-product/index.vue'
;
import
AddHotProductDialog
from
'../../components/artist-information/AddHotProduct/index.vue'
;
import
AddNewBankAccountDialog
from
'components/artist-information/bank-account/add-new-bank-account-dialog/index.vue'
;
import
EditBankAccountDialog
from
'components/artist-information/bank-account/edit-bank-account/index.vue'
;
import
UploadEmbedDialog
from
'components/artist-information/upload-embed-dialog/index.vue'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations'
;
import
{
useRoute
}
from
'vue-router'
;
...
...
@@ -14,7 +6,19 @@ import { AxiosResponse } from 'axios';
import
moment
from
'moment'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
import
{
Router
}
from
'src/router'
;
import
{
Pages
}
from
'src/router/routes'
;
import
PersonalInformation
from
'components/artist-information/personal-information/index.vue'
;
import
VabAccount
from
'components/artist-information/VAB-account/index.vue'
;
import
BankAccount
from
'components/artist-information/bank-account/index.vue'
;
import
HotProduct
from
'components/artist-information/hot-product/index.vue'
;
import
AddHotProductDialog
from
'components/artist-information/AddHotProduct/index.vue'
;
import
AddNewBankAccountDialog
from
'components/artist-information/bank-account/add-new-bank-account-dialog/index.vue'
;
import
EditBankAccountDialog
from
'components/artist-information/bank-account/edit-bank-account/index.vue'
;
import
UploadEmbedDialog
from
'components/artist-information/upload-embed-dialog/index.vue'
;
import
UpdateHotProduct
from
'components/artist-information/UpdateHotProduct/index.vue'
;
import
{
ArtistInfoType
,
FieldType
,
...
...
@@ -30,8 +34,6 @@ import {
CardBankType
,
TypeCardType
,
}
from
'src/assets/type'
;
import
{
Router
}
from
'src/router'
;
import
{
Pages
}
from
'src/router/routes'
;
export
default
defineComponent
({
components
:
{
...
...
@@ -40,34 +42,23 @@ export default defineComponent({
BankAccount
,
HotProduct
,
AddNewBankAccountDialog
,
UploadEmbedDialog
,
AddHotProductDialog
,
EditBankAccountDialog
,
AddHotProductDialog
,
UpdateHotProduct
,
UploadEmbedDialog
,
},
watch
:
{
tab
(
value
)
{
if
(
value
===
'information'
)
{
console
.
log
(
'information'
);
}
else
if
(
value
===
'vabAccount'
)
{
console
.
log
(
'vabAccount'
);
// console.log(this.$router.currentRoute.value.params, 'asdasd');
}
else
if
(
value
===
'bankAccount'
)
{
console
.
log
(
'bankAccount'
);
}
else
console
.
log
(
'hotProduct'
);
},
},
setup
()
{
const
route
=
useRoute
();
const
tab
=
ref
(
'information'
);
const
clickBtn
=
()
=>
{
console
.
log
(
'askdaskdkasds'
);
};
// state open dialog
const
isOpenAddAccountBankDialog
:
Ref
<
boolean
>
=
ref
(
false
);
const
isOpenEditAccountBankDialog
:
Ref
<
boolean
>
=
ref
(
false
);
const
openAddHotProduct
:
Ref
<
boolean
>
=
ref
(
false
);
const
openUpdateHotProduct
:
Ref
<
boolean
>
=
ref
(
false
);
const
isOpenDialogEmbed
:
Ref
<
boolean
>
=
ref
(
false
);
// state
const
fieldOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
nationalityOptions
:
Ref
<
NationalityType
[]
>
=
ref
([]);
const
professionOptions
:
Ref
<
QualificationType
[]
>
=
ref
([]);
...
...
@@ -79,35 +70,19 @@ export default defineComponent({
{
id
:
1
,
name
:
'Nam'
},
{
id
:
2
,
name
:
'Nữ'
},
]);
// const status: Ref<boolean | number> = ref(true);
//state sử dụng trong tab thong-tin-ca-nhan
const
id
:
Ref
<
number
>
=
ref
(
0
);
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
)
const
account
:
Ref
<
string
>
=
ref
(
''
);
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
const
fullName
:
Ref
<
string
>
=
ref
(
''
);
const
artistName
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
birthday
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
'29/04/2021'
);
const
sex
:
Ref
<
number
|
undefined
>
=
ref
();
const
nationality
:
Ref
<
NationalityType
>
=
ref
({
id
:
0
,
name
:
''
,
status
:
1
,
numIndex
:
1
,
});
const
qualification
:
Ref
<
QualificationType
>
=
ref
({
id
:
0
,
name
:
''
,
status
:
1
,
numIndex
:
1
,
});
const
artistLevel
:
Ref
<
ArtistLevelType
>
=
ref
({
id
:
0
,
name
:
''
,
status
:
1
,
artistLevel
:
1
,
description
:
''
,
});
const
nationality
:
Ref
<
NationalityType
|
null
>
=
ref
(
null
);
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
artistLevel
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
fields
:
Ref
<
FieldType
[]
>
=
ref
([]);
...
...
@@ -118,25 +93,25 @@ export default defineComponent({
const
facebookMessage
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
instagram
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
whatsapp
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
bankAccounts
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
const
products
:
Ref
<
ProductType
[]
>
=
ref
([]);
// state sử dụng trong tab vab account
const
banners
:
Ref
<
BannerType
[]
>
=
ref
([]);
const
shortDescription
:
Ref
<
string
|
null
>
=
ref
(
''
);
const
socialEmbedded
:
Ref
<
string
|
null
>
=
ref
(
''
);
const
stories
:
Ref
<
StoriesType
[]
>
=
ref
([]);
const
schedules
:
Ref
<
SchedulesType
[]
>
=
ref
([]);
const
formatSchedules
:
Ref
<
string
[]
>
=
ref
([]);
const
route
=
useRoute
();
//state accountBank
const
bankAccounts
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
const
rowBankAccIdx
:
Ref
<
number
>
=
ref
(
0
);
const
rowDataAccBank
:
Ref
<
BankAccountType
|
null
>
=
ref
(
null
);
//satate hot product
const
products
:
Ref
<
ProductType
[]
>
=
ref
([]);
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
);
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataUpdatHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataUpdat
e
HotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
getInformationArtist
=
async
()
=>
{
const
response
=
(
await
api
({
...
...
@@ -149,7 +124,8 @@ export default defineComponent({
id
.
value
=
ArtistInformation
.
id
;
// avatar.value = ArtistInformation.avatar
avatar
.
value
=
'https://lh3.googleusercontent.com/proxy/cL5mHGDvQFU8xR-Gn60kKHN9otMevrqQ0wRv3_fEQi4030JNccyLBSBmJoyL3KOYhObYR5WPnRZr8FwphGhYenMklss0tYuiIzhE2BrnNeUJJ76_ztQizomVS3RsPP8'
avatar
.
value
=
'https://lh3.googleusercontent.com/proxy/cL5mHGDvQFU8xR-Gn60kKHN9otMevrqQ0wRv3_fEQi4030JNccyLBSBmJoyL3KOYhObYR5WPnRZr8FwphGhYenMklss0tYuiIzhE2BrnNeUJJ76_ztQizomVS3RsPP8'
;
account
.
value
=
ArtistInformation
.
account
;
artistCode
.
value
=
ArtistInformation
.
artistCode
;
fullName
.
value
=
ArtistInformation
.
fullName
;
...
...
@@ -265,7 +241,6 @@ export default defineComponent({
bankAccounts
.
value
.
push
(
value
);
isOpenAddAccountBankDialog
.
value
=
false
;
};
const
confirmDeleteAccBank
=
(
value
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
...
...
@@ -279,27 +254,14 @@ export default defineComponent({
),
color
:
'negative'
,
}).
onOk
(()
=>
{
deleteAccBank
(
value
);
});
};
const
openDialogAddHotProduct
=
()
=>
{
openAddHotProduct
.
value
=
true
;
};
const
openDialogAddAccBank
=
()
=>
{
isOpenAddAccountBankDialog
.
value
=
true
;
};
const
deleteAccBank
=
(
index
:
number
)
=>
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'artist.dialogLabel.validateMessages.deleteAccess'
),
});
bankAccounts
.
value
.
splice
(
index
,
1
);
};
const
selectedFile
=
(
value
:
BannerType
)
=>
{
banners
.
value
.
push
(
value
);
console
.
log
(
banners
.
value
);
bankAccounts
.
value
.
splice
(
value
,
1
);
});
};
const
openDialogEditAccBank
=
(
itemData
:
BankAccountType
,
...
...
@@ -317,11 +279,15 @@ export default defineComponent({
bankAccounts
.
value
[
rowBankAccIdx
.
value
]
=
value
;
isOpenEditAccountBankDialog
.
value
=
false
;
};
const
pushData
=
(
value
:
ProductType
)
=>
{
products
.
value
.
push
(
value
);
console
.
log
(
products
.
value
);
};
const
selectedFile
=
(
value
:
BannerType
)
=>
{
banners
.
value
.
push
(
value
);
console
.
log
(
banners
.
value
);
};
const
reset
=
ref
(
null
);
const
resetOldData
=
()
=>
{
document
.
getElementById
(
'reset'
)?.
click
();
...
...
@@ -339,12 +305,20 @@ export default defineComponent({
),
color
:
'negative'
,
}).
onOk
(()
=>
{
deleteRowItem
(
value
);
products
.
value
.
splice
(
value
,
1
);
});
};
const
deleteRowItem
=
(
index
:
number
)
=>
{
products
.
value
.
splice
(
index
,
1
);
const
UpdateData
=
(
value
:
ProductType
)
=>
{
for
(
let
i
=
0
;
i
<
products
.
value
.
length
;
i
++
)
{
if
(
products
.
value
[
i
].
id
===
value
?.
id
)
{
products
.
value
[
i
]
=
value
;
}
}
};
const
SetProduct
=
(
value
:
ProductType
)
=>
{
DataUpdateHotProduct
.
value
=
value
;
};
const
updateInformationArtist
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
...
...
@@ -389,18 +363,6 @@ export default defineComponent({
}
}
catch
(
error
)
{}
};
const
UpdateData
=
(
value
:
ProductType
)
=>
{
for
(
let
i
=
0
;
i
<
products
.
value
.
length
;
i
++
)
{
if
(
products
.
value
[
i
].
id
===
value
?.
id
)
{
// console.log(products.value[i],'Item đẹpo');
products
.
value
[
i
]
=
value
;
}
}
// console.log(products.value);
};
const
SetProduct
=
(
value
:
ProductType
)
=>
{
DataUpdatHotProduct
.
value
=
value
;
};
onMounted
(()
=>
{
void
getInformationArtist
();
void
getFieldOptions
();
...
...
@@ -454,16 +416,12 @@ export default defineComponent({
stories
,
isOpenAddAccountBankDialog
,
openAddHotProduct
,
clickBtn
,
addAccBank
,
schedules
,
formatSchedules
,
confirmDeleteAccBank
,
selectedFile
,
isOpenDialogEmbed
,
deleteAccBank
,
openDialogAddAccBank
,
openDialogAddHotProduct
,
cardBankOptions
,
typeBankOptions
,
isOpenEditAccountBankDialog
,
...
...
@@ -475,17 +433,16 @@ export default defineComponent({
pushData
,
resetOldData
,
reset
,
deleteRowItem
,
confirmDeleteRow
,
updateInformationArtist
,
openUpdateHotProduct
,
SetProduct
,
DataUpdatHotProduct
,
DataUpdat
e
HotProduct
,
UpdateData
,
getBankOptions
,
getTypeCardOptions
,
rowDataAccBank
,
avatar
avatar
,
};
},
});
src/pages/don-vi-chu-quan/index.vue
View file @
51520254
...
...
@@ -335,7 +335,7 @@ export default defineComponent({
};
const
addNewUnit
=
()
=>
{
const
data
=
{
//
const data = {
// name: unitName.value,
// code: unitCode.value,
// representative: unitRepresentative.value,
...
...
@@ -345,7 +345,7 @@ export default defineComponent({
// status: unitStatus.value,
// fields: fieldSelected.value,
// artistList: unitArtistList.value,
};
//
};
// // call API use Data
};
...
...
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