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),
|
||||
gender: toNullIfBlank(characterData.gender),
|
||||
mbti: toNullIfBlank(characterData.mbti),
|
||||
characterType: toNullIfBlank(characterData.type),
|
||||
characterType: toNullIfBlank(characterData.characterType),
|
||||
originalWorkId: characterData.originalWorkId || null,
|
||||
speechPattern: toNullIfBlank(characterData.speechPattern),
|
||||
speechStyle: toNullIfBlank(characterData.speechStyle),
|
||||
appearance: toNullIfBlank(characterData.appearance),
|
||||
region: characterData.region || null,
|
||||
tags: characterData.tags || [],
|
||||
hobbies: characterData.hobbies || [],
|
||||
values: characterData.values || [],
|
||||
|
||||
@@ -109,11 +109,11 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- 성별 -->
|
||||
<!-- 성별 & 리전 -->
|
||||
<v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
md="6"
|
||||
md="4"
|
||||
>
|
||||
<v-select
|
||||
v-model="character.gender"
|
||||
@@ -124,10 +124,35 @@
|
||||
/>
|
||||
</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
|
||||
cols="12"
|
||||
md="6"
|
||||
md="4"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="character.age"
|
||||
@@ -1116,6 +1141,7 @@ export default {
|
||||
speechStyle: '',
|
||||
appearance: '',
|
||||
systemPrompt: '',
|
||||
region: 'KR',
|
||||
tags: [],
|
||||
memories: [],
|
||||
relationships: [],
|
||||
@@ -1150,6 +1176,10 @@ export default {
|
||||
'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ',
|
||||
'ISTP', 'ISFP', 'ESTP', 'ESFP'
|
||||
],
|
||||
regionOptions: [
|
||||
{ text: '한국', value: 'KR' },
|
||||
{ text: '일본', value: 'JP' }
|
||||
],
|
||||
typeOptions: ['Clone', 'Character'],
|
||||
systemPromptRules: [
|
||||
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 imageChanged = !!this.character.image; // 새 이미지 선택 여부
|
||||
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 };
|
||||
// 기본값 보정
|
||||
if (result.originalWorkId == null) result.originalWorkId = null;
|
||||
// 리전 정보가 없는 경우 기본값 KR 설정
|
||||
if (!result.region) result.region = 'KR';
|
||||
|
||||
const simpleFields = [
|
||||
'name', 'systemPrompt', 'description', 'age', 'gender', 'mbti',
|
||||
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl'
|
||||
'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl', 'region'
|
||||
];
|
||||
simpleFields.forEach(f => {
|
||||
if (result[f] == null) result[f] = '';
|
||||
@@ -1595,6 +1632,7 @@ export default {
|
||||
speechPattern: this.character.speechPattern,
|
||||
speechStyle: this.character.speechStyle,
|
||||
appearance: this.character.appearance,
|
||||
region: this.character.region,
|
||||
tags: this.character.tags || [],
|
||||
hobbies: this.character.hobbies || [],
|
||||
values: this.character.values || [],
|
||||
@@ -1615,7 +1653,7 @@ export default {
|
||||
// 기본 필드 비교
|
||||
const simpleFields = [
|
||||
'name', 'description', 'age', 'gender', 'mbti', 'characterType', 'originalWorkId',
|
||||
'speechPattern', 'speechStyle', 'isActive'
|
||||
'speechPattern', 'speechStyle', 'isActive', 'region'
|
||||
];
|
||||
|
||||
simpleFields.forEach(field => {
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
<th class="text-center">
|
||||
태그
|
||||
</th>
|
||||
<th class="text-center">
|
||||
리전
|
||||
</th>
|
||||
<th class="text-center">
|
||||
등록일
|
||||
</th>
|
||||
@@ -150,6 +153,7 @@
|
||||
</div>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td>{{ getRegionText(item.region) }}</td>
|
||||
<td>{{ item.createdAt }}</td>
|
||||
<td>{{ item.updatedAt || '-' }}</td>
|
||||
<td>
|
||||
@@ -284,7 +288,11 @@ export default {
|
||||
total_page: 0,
|
||||
characters: [],
|
||||
selected_character: {},
|
||||
searchTerm: ''
|
||||
searchTerm: '',
|
||||
regionOptions: [
|
||||
{ text: '한국', value: 'KR' },
|
||||
{ text: '일본', value: 'JP' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -301,6 +309,11 @@ export default {
|
||||
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) {
|
||||
this.selected_character = item;
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
<td>
|
||||
{{ total_sign_up_google_count }}
|
||||
</td>
|
||||
<td>
|
||||
{{ total_sign_up_line_count }}
|
||||
</td>
|
||||
<td>
|
||||
{{ total_auth_count }}
|
||||
</td>
|
||||
@@ -105,6 +108,10 @@
|
||||
{{ item.signUpGoogleCount.toLocaleString() }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.signUpLineCount="{ item }">
|
||||
{{ item.signUpLineCount.toLocaleString() }}
|
||||
</template>
|
||||
|
||||
<template v-slot:item.authCount="{ item }">
|
||||
{{ item.authCount.toLocaleString() }}
|
||||
</template>
|
||||
@@ -151,6 +158,7 @@ export default {
|
||||
total_sign_up_email_count: 0,
|
||||
total_sign_up_kakao_count: 0,
|
||||
total_sign_up_google_count: 0,
|
||||
total_sign_up_line_count: 0,
|
||||
total_sign_out_count: 0,
|
||||
total_payment_member_count: 0,
|
||||
page: 1,
|
||||
@@ -187,6 +195,12 @@ export default {
|
||||
sortable: false,
|
||||
value: 'signUpGoogleCount',
|
||||
},
|
||||
{
|
||||
text: '라인 가입 수',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'signUpLineCount',
|
||||
},
|
||||
{
|
||||
text: '본인인증 수',
|
||||
align: 'center',
|
||||
@@ -253,6 +267,7 @@ export default {
|
||||
this.total_sign_up_email_count = data.totalSignUpEmailCount
|
||||
this.total_sign_up_kakao_count = data.totalSignUpKakaoCount
|
||||
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_payment_member_count = data.totalPaymentMemberCount
|
||||
this.items = data.items
|
||||
|
||||
Reference in New Issue
Block a user