Compare commits
4 Commits
d3ea703204
...
892923becc
| Author | SHA1 | Date | |
|---|---|---|---|
| 892923becc | |||
|
|
fe87dd6b51 | ||
|
|
b728e96c2a | ||
|
|
bf52a63a52 |
@@ -49,11 +49,12 @@ async function createCharacter(characterData) {
|
|||||||
age: toNullIfBlank(characterData.age),
|
age: toNullIfBlank(characterData.age),
|
||||||
gender: toNullIfBlank(characterData.gender),
|
gender: toNullIfBlank(characterData.gender),
|
||||||
mbti: toNullIfBlank(characterData.mbti),
|
mbti: toNullIfBlank(characterData.mbti),
|
||||||
characterType: toNullIfBlank(characterData.type),
|
characterType: toNullIfBlank(characterData.characterType),
|
||||||
originalWorkId: characterData.originalWorkId || null,
|
originalWorkId: characterData.originalWorkId || null,
|
||||||
speechPattern: toNullIfBlank(characterData.speechPattern),
|
speechPattern: toNullIfBlank(characterData.speechPattern),
|
||||||
speechStyle: toNullIfBlank(characterData.speechStyle),
|
speechStyle: toNullIfBlank(characterData.speechStyle),
|
||||||
appearance: toNullIfBlank(characterData.appearance),
|
appearance: toNullIfBlank(characterData.appearance),
|
||||||
|
region: characterData.region || null,
|
||||||
tags: characterData.tags || [],
|
tags: characterData.tags || [],
|
||||||
hobbies: characterData.hobbies || [],
|
hobbies: characterData.hobbies || [],
|
||||||
values: characterData.values || [],
|
values: characterData.values || [],
|
||||||
|
|||||||
@@ -109,11 +109,11 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<!-- 성별 -->
|
<!-- 성별 & 리전 -->
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col
|
<v-col
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
>
|
>
|
||||||
<v-select
|
<v-select
|
||||||
v-model="character.gender"
|
v-model="character.gender"
|
||||||
@@ -124,10 +124,35 @@
|
|||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
cols="12"
|
||||||
|
md="4"
|
||||||
|
>
|
||||||
|
<v-select
|
||||||
|
v-if="!isEdit"
|
||||||
|
v-model="character.region"
|
||||||
|
:items="regionOptions"
|
||||||
|
item-text="text"
|
||||||
|
item-value="value"
|
||||||
|
label="리전"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
/>
|
||||||
|
<v-text-field
|
||||||
|
v-else
|
||||||
|
:value="regionDisplayText"
|
||||||
|
label="리전"
|
||||||
|
readonly
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
background-color="grey lighten-4"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<!-- 나이 -->
|
<!-- 나이 -->
|
||||||
<v-col
|
<v-col
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="character.age"
|
v-model="character.age"
|
||||||
@@ -1116,6 +1141,7 @@ export default {
|
|||||||
speechStyle: '',
|
speechStyle: '',
|
||||||
appearance: '',
|
appearance: '',
|
||||||
systemPrompt: '',
|
systemPrompt: '',
|
||||||
|
region: 'KR',
|
||||||
tags: [],
|
tags: [],
|
||||||
memories: [],
|
memories: [],
|
||||||
relationships: [],
|
relationships: [],
|
||||||
@@ -1150,6 +1176,10 @@ export default {
|
|||||||
'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ',
|
'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ',
|
||||||
'ISTP', 'ISFP', 'ESTP', 'ESFP'
|
'ISTP', 'ISFP', 'ESTP', 'ESFP'
|
||||||
],
|
],
|
||||||
|
regionOptions: [
|
||||||
|
{ text: '한국', value: 'KR' },
|
||||||
|
{ text: '일본', value: 'JP' }
|
||||||
|
],
|
||||||
typeOptions: ['Clone', 'Character'],
|
typeOptions: ['Clone', 'Character'],
|
||||||
systemPromptRules: [
|
systemPromptRules: [
|
||||||
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요')
|
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요')
|
||||||
@@ -1197,6 +1227,10 @@ export default {
|
|||||||
const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id');
|
const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id');
|
||||||
const imageChanged = !!this.character.image; // 새 이미지 선택 여부
|
const imageChanged = !!this.character.image; // 새 이미지 선택 여부
|
||||||
return !(hasNonIdField || imageChanged);
|
return !(hasNonIdField || imageChanged);
|
||||||
|
},
|
||||||
|
regionDisplayText() {
|
||||||
|
const option = this.regionOptions.find(opt => opt.value === this.character.region);
|
||||||
|
return option ? option.text : this.character.region;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1569,9 +1603,12 @@ export default {
|
|||||||
const result = { ...data };
|
const result = { ...data };
|
||||||
// 기본값 보정
|
// 기본값 보정
|
||||||
if (result.originalWorkId == null) result.originalWorkId = null;
|
if (result.originalWorkId == null) result.originalWorkId = null;
|
||||||
|
// 리전 정보가 없는 경우 기본값 KR 설정
|
||||||
|
if (!result.region) result.region = 'KR';
|
||||||
|
|
||||||
const simpleFields = [
|
const simpleFields = [
|
||||||
'name', 'systemPrompt', 'description', 'age', 'gender', 'mbti',
|
'name', 'systemPrompt', 'description', 'age', 'gender', 'mbti',
|
||||||
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl'
|
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl', 'region'
|
||||||
];
|
];
|
||||||
simpleFields.forEach(f => {
|
simpleFields.forEach(f => {
|
||||||
if (result[f] == null) result[f] = '';
|
if (result[f] == null) result[f] = '';
|
||||||
@@ -1595,6 +1632,7 @@ export default {
|
|||||||
speechPattern: this.character.speechPattern,
|
speechPattern: this.character.speechPattern,
|
||||||
speechStyle: this.character.speechStyle,
|
speechStyle: this.character.speechStyle,
|
||||||
appearance: this.character.appearance,
|
appearance: this.character.appearance,
|
||||||
|
region: this.character.region,
|
||||||
tags: this.character.tags || [],
|
tags: this.character.tags || [],
|
||||||
hobbies: this.character.hobbies || [],
|
hobbies: this.character.hobbies || [],
|
||||||
values: this.character.values || [],
|
values: this.character.values || [],
|
||||||
@@ -1615,7 +1653,7 @@ export default {
|
|||||||
// 기본 필드 비교
|
// 기본 필드 비교
|
||||||
const simpleFields = [
|
const simpleFields = [
|
||||||
'name', 'description', 'age', 'gender', 'mbti', 'characterType', 'originalWorkId',
|
'name', 'description', 'age', 'gender', 'mbti', 'characterType', 'originalWorkId',
|
||||||
'speechPattern', 'speechStyle', 'isActive'
|
'speechPattern', 'speechStyle', 'isActive', 'region'
|
||||||
];
|
];
|
||||||
|
|
||||||
simpleFields.forEach(field => {
|
simpleFields.forEach(field => {
|
||||||
|
|||||||
@@ -79,6 +79,9 @@
|
|||||||
<th class="text-center">
|
<th class="text-center">
|
||||||
태그
|
태그
|
||||||
</th>
|
</th>
|
||||||
|
<th class="text-center">
|
||||||
|
리전
|
||||||
|
</th>
|
||||||
<th class="text-center">
|
<th class="text-center">
|
||||||
등록일
|
등록일
|
||||||
</th>
|
</th>
|
||||||
@@ -150,6 +153,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{ getRegionText(item.region) }}</td>
|
||||||
<td>{{ item.createdAt }}</td>
|
<td>{{ item.createdAt }}</td>
|
||||||
<td>{{ item.updatedAt || '-' }}</td>
|
<td>{{ item.updatedAt || '-' }}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -284,7 +288,11 @@ export default {
|
|||||||
total_page: 0,
|
total_page: 0,
|
||||||
characters: [],
|
characters: [],
|
||||||
selected_character: {},
|
selected_character: {},
|
||||||
searchTerm: ''
|
searchTerm: '',
|
||||||
|
regionOptions: [
|
||||||
|
{ text: '한국', value: 'KR' },
|
||||||
|
{ text: '일본', value: 'JP' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -301,6 +309,11 @@ export default {
|
|||||||
this.$dialog.notify.success(message)
|
this.$dialog.notify.success(message)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getRegionText(region) {
|
||||||
|
if (!region) return '-';
|
||||||
|
const option = this.regionOptions.find(opt => opt.value === region);
|
||||||
|
return option ? option.text : region;
|
||||||
|
},
|
||||||
|
|
||||||
showDetailDialog(item, type) {
|
showDetailDialog(item, type) {
|
||||||
this.selected_character = item;
|
this.selected_character = item;
|
||||||
|
|||||||
@@ -73,6 +73,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{{ total_sign_up_google_count }}
|
{{ total_sign_up_google_count }}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ total_sign_up_line_count }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ total_auth_count }}
|
{{ total_auth_count }}
|
||||||
</td>
|
</td>
|
||||||
@@ -105,6 +108,10 @@
|
|||||||
{{ item.signUpGoogleCount.toLocaleString() }}
|
{{ item.signUpGoogleCount.toLocaleString() }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.signUpLineCount="{ item }">
|
||||||
|
{{ item.signUpLineCount.toLocaleString() }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:item.authCount="{ item }">
|
<template v-slot:item.authCount="{ item }">
|
||||||
{{ item.authCount.toLocaleString() }}
|
{{ item.authCount.toLocaleString() }}
|
||||||
</template>
|
</template>
|
||||||
@@ -151,6 +158,7 @@ export default {
|
|||||||
total_sign_up_email_count: 0,
|
total_sign_up_email_count: 0,
|
||||||
total_sign_up_kakao_count: 0,
|
total_sign_up_kakao_count: 0,
|
||||||
total_sign_up_google_count: 0,
|
total_sign_up_google_count: 0,
|
||||||
|
total_sign_up_line_count: 0,
|
||||||
total_sign_out_count: 0,
|
total_sign_out_count: 0,
|
||||||
total_payment_member_count: 0,
|
total_payment_member_count: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -187,6 +195,12 @@ export default {
|
|||||||
sortable: false,
|
sortable: false,
|
||||||
value: 'signUpGoogleCount',
|
value: 'signUpGoogleCount',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '라인 가입 수',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'signUpLineCount',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '본인인증 수',
|
text: '본인인증 수',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -253,6 +267,7 @@ export default {
|
|||||||
this.total_sign_up_email_count = data.totalSignUpEmailCount
|
this.total_sign_up_email_count = data.totalSignUpEmailCount
|
||||||
this.total_sign_up_kakao_count = data.totalSignUpKakaoCount
|
this.total_sign_up_kakao_count = data.totalSignUpKakaoCount
|
||||||
this.total_sign_up_google_count = data.totalSignUpGoogleCount
|
this.total_sign_up_google_count = data.totalSignUpGoogleCount
|
||||||
|
this.total_sign_up_line_count = data.totalSignUpLineCount
|
||||||
this.total_sign_out_count = data.totalSignOutCount
|
this.total_sign_out_count = data.totalSignOutCount
|
||||||
this.total_payment_member_count = data.totalPaymentMemberCount
|
this.total_payment_member_count = data.totalPaymentMemberCount
|
||||||
this.items = data.items
|
this.items = data.items
|
||||||
|
|||||||
Reference in New Issue
Block a user