Commit b5a0c2f3 authored by shirlyn.guo's avatar shirlyn.guo 🤡

chore: 适配英文&版面调整

parent ea73ba1e
...@@ -69,6 +69,12 @@ common_module: ...@@ -69,6 +69,12 @@ common_module:
collect_unsubscribed: 'Uncollected' collect_unsubscribed: 'Uncollected'
cancel: 'Cancel' cancel: 'Cancel'
preservation: 'Save' preservation: 'Save'
open: 'Open'
close: 'Close'
delete_tip_title: 'Delete Prompt'
wipe_data: 'Wipe Data '
delete_all_tip_title: 'Clear Data Prompt'
search: 'Search'
dialogue_module: dialogue_module:
continue_question_message: 'You can keep asking questions' continue_question_message: 'You can keep asking questions'
...@@ -144,6 +150,8 @@ router_title_module: ...@@ -144,6 +150,8 @@ router_title_module:
knowledge_document_list: 'Knowledge base document list' knowledge_document_list: 'Knowledge base document list'
knowledge_document_detail: 'Knowledge base Document Details' knowledge_document_detail: 'Knowledge base Document Details'
multi_model_dialogue: 'Multi-model debugging' multi_model_dialogue: 'Multi-model debugging'
explore: 'Explore'
application_square: 'Application square'
personal_space_module: personal_space_module:
title: 'Personal space' title: 'Personal space'
...@@ -230,7 +238,7 @@ personal_space_module: ...@@ -230,7 +238,7 @@ personal_space_module:
continuous_question: 'Make a close inquiry' continuous_question: 'Make a close inquiry'
continuous_question_popover_message: 'The large model automatically generates additional questions based on the content of the conversation' continuous_question_popover_message: 'The large model automatically generates additional questions based on the content of the conversation'
continuous_question_default: 'Default' continuous_question_default: 'Default'
continuous_question_default_desc: 'Based on the user''s latest round of conversation, it automatically provides three question suggestions after a reply.' continuous_question_default_desc: "Based on the user's latest round of conversation, it automatically provides three question suggestions after a reply."
continuous_question_close: 'Close' continuous_question_close: 'Close'
continuous_question_close_desc: 'After each round of responses, users will not be provided with any suggestions for questions' continuous_question_close_desc: 'After each round of responses, users will not be provided with any suggestions for questions'
memory: 'Memory' memory: 'Memory'
...@@ -244,6 +252,12 @@ personal_space_module: ...@@ -244,6 +252,12 @@ personal_space_module:
memory_variable_action_copy: 'Copy name' memory_variable_action_copy: 'Copy name'
variable_name: 'Variable name' variable_name: 'Variable name'
variable_value: 'Variable value' variable_value: 'Variable value'
memory_fragment: 'Memory fragments'
memory_fragment_message: 'Activate the memory fragment function, and the application will store the information fragments mentioned by the user based on the conversation content, and reply based on the memory fragments. Taking "Interview Assistant" as an example:'
memory_fragment_content: 'Record all memory fragments related to user information, preferences, and plans during the chat conversation.'
memory_variable_delete_tip_content: 'After deletion, it cannot be revoked. If the application has already been released, after the update is released, users of the application will not be able to use the memory variable. Do you want to continue?'
memory_fragment_delete_all_tip_content: 'After data is cleared, it cannot be revoked. Are you sure you want to clear it all?'
memory_fragment_delete_row_tip_content: 'After data deletion, it cannot be revoked. Are you sure you want to delete it?'
memory_variable_modal: memory_variable_modal:
edit_memory_variable: 'Edit memory variable' edit_memory_variable: 'Edit memory variable'
...@@ -259,6 +273,9 @@ personal_space_module: ...@@ -259,6 +273,9 @@ personal_space_module:
default_value_placeholder: 'Please enter' default_value_placeholder: 'Please enter'
name_placeholder: 'Please enter name' name_placeholder: 'Please enter name'
add_variable: 'New variable' add_variable: 'New variable'
memory_variable_add_now: 'Immediately Add'
none_memory_variable: 'No memory variables available at the moment'
add_variable_message: 'Add memory variables to better record user characteristics and information'
memory_variable_rules: memory_variable_rules:
name_not_null: 'Please enter name' name_not_null: 'Please enter name'
...@@ -388,3 +405,8 @@ multi_model_dialogue_module: ...@@ -388,3 +405,8 @@ multi_model_dialogue_module:
please_select_model_first: 'Please select the model first' please_select_model_first: 'Please select the model first'
replace_configuration_tip: 'Whether to overwrite the configuration of the model over the original configuration item' replace_configuration_tip: 'Whether to overwrite the configuration of the model over the original configuration item'
open_new_conversation: 'A new session has been started. Procedure' open_new_conversation: 'A new session has been started. Procedure'
applications_square_module:
create_application_btn_text: 'Create application'
all_application_btn_text: 'All applications'
immediate_use_btn_text: 'Immediate use'
...@@ -73,6 +73,7 @@ common_module: ...@@ -73,6 +73,7 @@ common_module:
delete_tip_title: '删除提示' delete_tip_title: '删除提示'
wipe_data: '清空数据' wipe_data: '清空数据'
delete_all_tip_title: '清空数据提示' delete_all_tip_title: '清空数据提示'
search: '搜索'
dialogue_module: dialogue_module:
continue_question_message: '你可以继续提问' continue_question_message: '你可以继续提问'
......
...@@ -73,6 +73,7 @@ common_module: ...@@ -73,6 +73,7 @@ common_module:
delete_tip_title: '删除提示' delete_tip_title: '删除提示'
wipe_data: '清空數據' wipe_data: '清空數據'
delete_all_tip_title: '清空數據提示' delete_all_tip_title: '清空數據提示'
search: '搜索'
dialogue_module: dialogue_module:
continue_question_message: '你可以繼續提問' continue_question_message: '你可以繼續提問'
...@@ -149,7 +150,7 @@ router_title_module: ...@@ -149,7 +150,7 @@ router_title_module:
knowledge_document_detail: '知識庫文檔詳情' knowledge_document_detail: '知識庫文檔詳情'
multi_model_dialogue: '多模型調試' multi_model_dialogue: '多模型調試'
explore: '探索' explore: '探索'
applications-square: '應用廣場' application_square: '應用廣場'
personal_space_module: personal_space_module:
title: '個人空間' title: '個人空間'
...@@ -404,7 +405,6 @@ multi_model_dialogue_module: ...@@ -404,7 +405,6 @@ multi_model_dialogue_module:
open_new_conversation: '已開啓新會話' open_new_conversation: '已開啓新會話'
applications_square_module: applications_square_module:
title: '應用廣場'
create_application_btn_text: '創建應用' create_application_btn_text: '創建應用'
all_application_btn_text: '所有應用' all_application_btn_text: '所有應用'
immediate_use_btn_text: '立即使用' immediate_use_btn_text: '立即使用'
...@@ -18,7 +18,7 @@ export default [ ...@@ -18,7 +18,7 @@ export default [
name: 'ApplicationsSquare', name: 'ApplicationsSquare',
meta: { meta: {
rank: 1001, rank: 1001,
title: 'router_title_module.applications-square', title: 'router_title_module.application_square',
belong: 'ApplicationsSquare', belong: 'ApplicationsSquare',
}, },
component: () => import('@/views/applications-square/applications-square.vue'), component: () => import('@/views/applications-square/applications-square.vue'),
......
...@@ -14,10 +14,15 @@ import { router } from '@/router' ...@@ -14,10 +14,15 @@ import { router } from '@/router'
import searchEmptyImage from '@/assets/images/search-empty.png' import searchEmptyImage from '@/assets/images/search-empty.png'
import applicationEmptyImage from '@/assets/images/application-empty.png' import applicationEmptyImage from '@/assets/images/application-empty.png'
interface mallCategory {
id: number
categoryName: string
}
const { t } = useI18n() const { t } = useI18n()
const searchQuery = ref('') const searchQuery = ref('')
const checkedClassifyValue = ref(t('applications_square_module.all_application_btn_text')) const checkedClassifyValue = ref(0)
const agentApplicationList = ref<PersonalAppConfigState[]>([]) const agentApplicationList = ref<PersonalAppConfigState[]>([])
const pagingInfo = ref<PaginationInfo>({ const pagingInfo = ref<PaginationInfo>({
...@@ -26,7 +31,7 @@ const pagingInfo = ref<PaginationInfo>({ ...@@ -26,7 +31,7 @@ const pagingInfo = ref<PaginationInfo>({
totalPages: 0, totalPages: 0,
totalRows: 0, totalRows: 0,
}) })
const mallCategoryList = ref<string[]>([]) const mallCategoryList = ref<mallCategory[]>([])
const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef') const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
const isShowCarousel = ref(true) const isShowCarousel = ref(true)
const smooth = ref(false) const smooth = ref(false)
...@@ -39,8 +44,8 @@ const behavior = computed(() => (smooth.value ? 'smooth' : 'auto')) ...@@ -39,8 +44,8 @@ const behavior = computed(() => (smooth.value ? 'smooth' : 'auto'))
const { arrivedState } = useScroll(cardContentWrapRef, { behavior }) const { arrivedState } = useScroll(cardContentWrapRef, { behavior })
;(function () { ;(function () {
handleGetAgentApplicationList()
handleGetMallCategoryList() handleGetMallCategoryList()
handleGetAgentApplicationList()
})() })()
watch(checkedClassifyValue, () => { watch(checkedClassifyValue, () => {
...@@ -70,7 +75,7 @@ watch( ...@@ -70,7 +75,7 @@ watch(
) )
function handleGetAgentApplicationList(update = false, search = false) { function handleGetAgentApplicationList(update = false, search = false) {
const agentType = ref('') const agentTypeId = ref<number | null>(0)
if (agentApplicationBottomIsLoading.value && agentApplicationClassifyIsLoading.value) return if (agentApplicationBottomIsLoading.value && agentApplicationClassifyIsLoading.value) return
if (search && searchQuery.value.length !== 0) { if (search && searchQuery.value.length !== 0) {
...@@ -81,13 +86,11 @@ function handleGetAgentApplicationList(update = false, search = false) { ...@@ -81,13 +86,11 @@ function handleGetAgentApplicationList(update = false, search = false) {
if (update) pagingInfo.value.pageNo = 1 if (update) pagingInfo.value.pageNo = 1
checkedClassifyValue.value === t('applications_square_module.all_application_btn_text') checkedClassifyValue.value === 0 ? (agentTypeId.value = null) : (agentTypeId.value = checkedClassifyValue.value)
? (agentType.value = '')
: (agentType.value = checkedClassifyValue.value)
const payload = { const payload = {
search: searchQuery.value, search: searchQuery.value,
pagingInfo: pagingInfo.value, pagingInfo: pagingInfo.value,
agentType: agentType.value, categoryId: agentTypeId.value,
} }
fetchGetAgentApplicationList<PersonalAppConfigState[]>(payload).then((res) => { fetchGetAgentApplicationList<PersonalAppConfigState[]>(payload).then((res) => {
agentApplicationList.value = update ? res.data : [...agentApplicationList.value, ...res.data] agentApplicationList.value = update ? res.data : [...agentApplicationList.value, ...res.data]
...@@ -112,9 +115,8 @@ function handleCollectOrCancelAgentApplication(id: number) { ...@@ -112,9 +115,8 @@ function handleCollectOrCancelAgentApplication(id: number) {
} }
function handleGetMallCategoryList() { function handleGetMallCategoryList() {
mallCategoryList.value[0] = t('applications_square_module.all_application_btn_text') mallCategoryList.value.unshift({ id: 0, categoryName: t('applications_square_module.all_application_btn_text') })
fetchGetMallCategoryList<mallCategory[]>().then((res) => {
fetchGetMallCategoryList<string[]>().then((res) => {
if (res.code !== 0) return if (res.code !== 0) return
mallCategoryList.value = [...mallCategoryList.value, ...res.data] mallCategoryList.value = [...mallCategoryList.value, ...res.data]
}) })
...@@ -141,7 +143,7 @@ function handleAddAgentApplications() { ...@@ -141,7 +143,7 @@ function handleAddAgentApplications() {
<n-input <n-input
v-model:value="searchQuery" v-model:value="searchQuery"
type="text" type="text"
placeholder="搜索" :placeholder="t('common_module.search')"
class="search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]" class="search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
clearable clearable
@keyup.enter="handleGetAgentApplicationList(true, true)" @keyup.enter="handleGetAgentApplicationList(true, true)"
...@@ -158,7 +160,7 @@ function handleAddAgentApplications() { ...@@ -158,7 +160,7 @@ function handleAddAgentApplications() {
type="primary" type="primary"
:bordered="false" :bordered="false"
:focusable="false" :focusable="false"
class="w-[86px]!" class="min-w-[86px]!"
@click="handleAddAgentApplications" @click="handleAddAgentApplications"
> >
<span class="text-sm text-[#fff]">{{ t('applications_square_module.create_application_btn_text') }}</span> <span class="text-sm text-[#fff]">{{ t('applications_square_module.create_application_btn_text') }}</span>
...@@ -185,13 +187,13 @@ function handleAddAgentApplications() { ...@@ -185,13 +187,13 @@ function handleAddAgentApplications() {
<div class="flex items-center rounded-[5px] bg-white py-[9px] pl-[9px]"> <div class="flex items-center rounded-[5px] bg-white py-[9px] pl-[9px]">
<button <button
v-for="classify in mallCategoryList" v-for="classify in mallCategoryList"
:key="classify" :key="classify.id"
:focusable="false" :focusable="false"
:class="['classify-radio-button', { active: checkedClassifyValue === classify }]" :class="['classify-radio-button', { active: checkedClassifyValue === classify.id }]"
class="mr-[4px] w-[86px] cursor-pointer rounded-[5px] border-[1px] border-[#fff] bg-transparent py-[5px] transition-colors duration-300 hover:bg-[#eeefff]" class="mr-[4px] min-w-[86px] cursor-pointer rounded-[5px] border-[1px] border-[#fff] bg-transparent px-[5px] py-[5px] transition-colors duration-300 hover:bg-[#eeefff]"
@click="checkedClassifyValue = classify" @click="checkedClassifyValue = classify.id"
> >
{{ classify }} {{ classify.categoryName }}
</button> </button>
</div> </div>
</div> </div>
...@@ -298,7 +300,7 @@ function handleAddAgentApplications() { ...@@ -298,7 +300,7 @@ function handleAddAgentApplications() {
class="mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]" class="mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
> >
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div> <div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
<div class="mb-[8px] w-[80px]"> <div class="mb-[8px] min-w-[80px]">
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }} {{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
</div> </div>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div> <div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
......
...@@ -1005,7 +1005,7 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -1005,7 +1005,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
</template> </template>
<NCollapseItem name="memoryVariable" class="my-[13px]!"> <NCollapseItem name="memoryVariable" class="my-[13px]!">
<template #header> <template #header>
<span class="mr-[5px] w-[60px]">{{ <span class="mr-[5px] min-w-[60px]">{{
t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable') t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable')
}}</span> }}</span>
<n-popover trigger="hover" placement="top-start" class="p-[12px]! left-[-120px]!" :show-arrow="false"> <n-popover trigger="hover" placement="top-start" class="p-[12px]! left-[-120px]!" :show-arrow="false">
...@@ -1118,7 +1118,7 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -1118,7 +1118,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
<NCollapseItem name="memoryFragment" class="my-[13px]!"> <NCollapseItem name="memoryFragment" class="my-[13px]!">
<template #header> <template #header>
<span class="mr-[5px] w-[60px]"> <span class="mr-[5px] min-w-[60px]">
{{ {{
t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_fragment') t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_fragment')
}} }}
......
...@@ -346,7 +346,7 @@ defineExpose({ ...@@ -346,7 +346,7 @@ defineExpose({
}} }}
</div> </div>
<div <div
class="text-theme-color mt-[6px] flex w-[78px] cursor-pointer" class="text-theme-color mt-[6px] flex min-w-[78px] cursor-pointer"
@click="handleAddMemoryVariableItem" @click="handleAddMemoryVariableItem"
> >
<Plus theme="outline" size="22" :stroke-width="3" class="text-theme-color" /> <Plus theme="outline" size="22" :stroke-width="3" class="text-theme-color" />
...@@ -363,13 +363,16 @@ defineExpose({ ...@@ -363,13 +363,16 @@ defineExpose({
</table> </table>
</div> </div>
</n-scrollbar> </n-scrollbar>
<div <div v-show="memoryVariableTable.length !== 0" class="text-theme-color mt-[16px] flex min-w-[78px]">
v-show="memoryVariableTable.length !== 0" <Plus
class="text-theme-color mt-[16px] flex w-[78px] cursor-pointer" theme="outline"
@click="handleAddMemoryVariableItem" size="22"
> :stroke-width="3"
<Plus theme="outline" size="22" :stroke-width="3" class="text-theme-color" /> class="text-theme-color cursor-pointer"
<span>{{ @click="handleAddMemoryVariableItem"
/>
<span class="cursor-pointer" @click="handleAddMemoryVariableItem">{{
t( t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable_modal.add_variable', 'personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable_modal.add_variable',
) )
......
...@@ -203,7 +203,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -203,7 +203,7 @@ const handleCardContentScrollDebounce = debounce(
<template> <template>
<div class="h-full"> <div class="h-full">
<div class="mb-[13px] flex justify-between"> <div class="mb-[13px] flex justify-between">
<n-space vertical class="w-[118px]"> <n-space vertical class="min-w-[140px]">
<n-select <n-select
v-model:value="selectedPublishStatusValue" v-model:value="selectedPublishStatusValue"
:options="publishStatusOptions" :options="publishStatusOptions"
...@@ -261,7 +261,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -261,7 +261,7 @@ const handleCardContentScrollDebounce = debounce(
</div> </div>
<n-button <n-button
:color="agentAppItem.baseInfo.agentPublishStatus === 'draft' ? '#CCCCCC' : '#000DFF'" :color="agentAppItem.baseInfo.agentPublishStatus === 'draft' ? '#CCCCCC' : '#000DFF'"
class="h-[27px]! w-[71px]! pl-[17px]! pr-[16px]! pt-[7px]! pb-[8px]! text-[13px]! rounded-[13px] border-[1px]" class="h-[27px]! min-w-[71px]! pl-[17px]! pr-[16px]! pt-[7px]! pb-[8px]! text-[13px]! rounded-[13px] border-[1px]"
round round
ghost ghost
> >
...@@ -303,7 +303,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -303,7 +303,7 @@ const handleCardContentScrollDebounce = debounce(
</template> </template>
<div <div
v-show="agentAppItem.baseInfo.agentPublishStatus !== 'draft'" v-show="agentAppItem.baseInfo.agentPublishStatus !== 'draft'"
class="mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]" class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleAnalysisPersonalApp(agentAppItem)" @click="handleAnalysisPersonalApp(agentAppItem)"
> >
{{ t('common_module.data_table_module.analysis') }} {{ t('common_module.data_table_module.analysis') }}
...@@ -319,7 +319,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -319,7 +319,7 @@ const handleCardContentScrollDebounce = debounce(
> >
<template #trigger> <template #trigger>
<div <div
class="mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]" class="hover:bg-active-color mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
> >
{{ t('common_module.data_table_module.remove_applications') }} {{ t('common_module.data_table_module.remove_applications') }}
</div> </div>
...@@ -333,7 +333,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -333,7 +333,7 @@ const handleCardContentScrollDebounce = debounce(
</div> </div>
<div v-show="agentAppItem.isSale === 'N'"> <div v-show="agentAppItem.isSale === 'N'">
<div <div
class="mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]" class="hover:bg-active-color mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleChangeApplicationsSaleStatus(agentAppItem)" @click="handleChangeApplicationsSaleStatus(agentAppItem)"
> >
{{ t('common_module.data_table_module.listing_applications') }} {{ t('common_module.data_table_module.listing_applications') }}
...@@ -342,7 +342,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -342,7 +342,7 @@ const handleCardContentScrollDebounce = debounce(
</div> </div>
<div <div
class="mb-[8px] mt-[8px] h-[24px] w-[72px] rounded-[4px] py-[5px] pl-[8px] text-[14px] leading-[14px] text-[#F25744] hover:bg-[#f1f1f1c7]" class="hover:bg-active-color mb-[8px] mt-[8px] h-[24px] min-w-[72px] rounded-[4px] py-[5px] pl-[8px] text-[14px] leading-[14px] text-[#F25744]"
@click="handleDeletePersonalApp(agentAppItem.baseInfo.agentId)" @click="handleDeletePersonalApp(agentAppItem.baseInfo.agentId)"
> >
{{ t('common_module.delete') }} {{ t('common_module.delete') }}
...@@ -387,7 +387,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -387,7 +387,7 @@ const handleCardContentScrollDebounce = debounce(
class="mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]" class="mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
> >
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div> <div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
<div class="mb-[8px] w-[80px]"> <div class="mb-[8px] min-w-[80px]">
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }} {{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
</div> </div>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div> <div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
......
...@@ -6,6 +6,11 @@ import { Close, Help, Notes, CheckSmall } from '@icon-park/vue-next' ...@@ -6,6 +6,11 @@ import { Close, Help, Notes, CheckSmall } from '@icon-park/vue-next'
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
interface mallCategory {
id: number
categoryName: string
}
const isShowSaleApplicationsConfigurationModal = defineModel<boolean>() const isShowSaleApplicationsConfigurationModal = defineModel<boolean>()
const props = defineProps<{ const props = defineProps<{
...@@ -18,13 +23,13 @@ const emit = defineEmits<{ ...@@ -18,13 +23,13 @@ const emit = defineEmits<{
const { t } = useI18n() const { t } = useI18n()
const checkedClassifyValue = ref('') const checkedClassifyValue = ref<number | null>(null)
const isCopy = ref('N') const isCopy = ref('N')
const saleApplicationsId = ref(props.data.agentPublishId) const saleApplicationsId = ref(props.data.agentPublishId)
const isClassifyError = ref(false) const isClassifyError = ref(false)
const applicationsClassify = ref<string[]>([]) const applicationsClassify = ref<mallCategory[]>([])
;(function () { ;(function () {
handleGetMallCategoryList() handleGetMallCategoryList()
...@@ -33,7 +38,7 @@ const applicationsClassify = ref<string[]>([]) ...@@ -33,7 +38,7 @@ const applicationsClassify = ref<string[]>([])
watch( watch(
() => checkedClassifyValue.value, () => checkedClassifyValue.value,
() => { () => {
if (checkedClassifyValue.value !== '') isClassifyError.value = false if (checkedClassifyValue.value !== null) isClassifyError.value = false
}, },
) )
...@@ -46,7 +51,7 @@ watch( ...@@ -46,7 +51,7 @@ watch(
function handleApplicationsSaleSettingModalClose() { function handleApplicationsSaleSettingModalClose() {
isShowSaleApplicationsConfigurationModal.value = false isShowSaleApplicationsConfigurationModal.value = false
checkedClassifyValue.value = '' checkedClassifyValue.value = null
} }
function handleApplicationReleaseBtn() { function handleApplicationReleaseBtn() {
...@@ -56,7 +61,7 @@ function handleApplicationReleaseBtn() { ...@@ -56,7 +61,7 @@ function handleApplicationReleaseBtn() {
} }
const payload = { const payload = {
agentPublishId: saleApplicationsId.value, agentPublishId: saleApplicationsId.value,
agentType: checkedClassifyValue.value, categoryId: checkedClassifyValue.value,
isCopy: isCopy.value, isCopy: isCopy.value,
isSale: 'Y', isSale: 'Y',
} }
...@@ -79,7 +84,7 @@ function handleIsCopySwitchUpdateValue(value: string) { ...@@ -79,7 +84,7 @@ function handleIsCopySwitchUpdateValue(value: string) {
function handleGetMallCategoryList() { function handleGetMallCategoryList() {
fetchGetMallCategoryList().then((res) => { fetchGetMallCategoryList().then((res) => {
if (res.code !== 0) return if (res.code !== 0) return
applicationsClassify.value = res.data as string[] applicationsClassify.value = res.data as mallCategory[]
}) })
} }
</script> </script>
...@@ -121,19 +126,19 @@ function handleGetMallCategoryList() { ...@@ -121,19 +126,19 @@ function handleGetMallCategoryList() {
<div class="flex flex-wrap"> <div class="flex flex-wrap">
<button <button
v-for="classify in applicationsClassify" v-for="classify in applicationsClassify"
:key="classify" :key="classify.id"
:class="['classify-radio-button', { active: checkedClassifyValue === classify }]" :class="['classify-radio-button', { active: checkedClassifyValue === classify.id }]"
class="relative mb-[8px] mr-[8px] h-[26px] cursor-pointer rounded-[6px] border-[1px] border-[#edeef7] bg-[#edeef7] px-[8px] text-[12px]" class="relative mb-[8px] mr-[8px] h-[26px] cursor-pointer rounded-[6px] border-[1px] border-[#edeef7] bg-[#edeef7] px-[8px] text-[12px]"
@click="checkedClassifyValue = classify" @click="checkedClassifyValue = classify.id"
> >
<div <div
v-show="checkedClassifyValue === classify" v-show="checkedClassifyValue === classify.id"
class="bg-theme-color absolute left-0 top-[-1px] h-[14px] w-[14px] rounded-[3px]" class="bg-theme-color absolute left-0 top-[-1px] h-[14px] w-[14px] rounded-[3px]"
style="clip-path: polygon(0 0, 100% 0, 0 100%)" style="clip-path: polygon(0 0, 100% 0, 0 100%)"
> >
<CheckSmall theme="outline" size="10" fill="#fff" /> <CheckSmall theme="outline" size="10" fill="#fff" />
</div> </div>
{{ classify }} {{ classify.categoryName }}
</button> </button>
</div> </div>
<div class="mb-[10px] h-[16px] text-red-500"> <div class="mb-[10px] h-[16px] text-red-500">
......
...@@ -115,7 +115,7 @@ async function handleCreateKnowledgeNextStep(createKnowledgeData: KnowledgeFormD ...@@ -115,7 +115,7 @@ async function handleCreateKnowledgeNextStep(createKnowledgeData: KnowledgeFormD
<div> <div>
<NDropdown trigger="hover" :options="addPersonalSpaceOptions" @select="handleSelectAddType"> <NDropdown trigger="hover" :options="addPersonalSpaceOptions" @select="handleSelectAddType">
<NButton type="primary" :bordered="false" :focusable="false" class="w-[75px]!"> <NButton type="primary" :bordered="false" :focusable="false" class="min-w-[75px]!">
<Plus theme="outline" size="16" fill="#fff" :stroke-width="4" /> <Plus theme="outline" size="16" fill="#fff" :stroke-width="4" />
<span class="ml-1 text-sm">{{ t('personal_space_module.create_btn_text') }}</span> <span class="ml-1 text-sm">{{ t('personal_space_module.create_btn_text') }}</span>
</NButton> </NButton>
......
...@@ -48,7 +48,7 @@ function handleToLogin() { ...@@ -48,7 +48,7 @@ function handleToLogin() {
<div class="flex items-center"> <div class="flex items-center">
<CustomIcon <CustomIcon
icon="weui:back-outlined" icon="weui:back-outlined"
class="hover:text-theme-color mr-5 outline-none" class="hover:text-theme-color mr-5 cursor-pointer outline-none"
@click="handleBackHomePage" @click="handleBackHomePage"
/> />
<img :src="agentApplicationConfig.baseInfo.agentAvatar" class="mr-5 h-10 w-10 rounded-md" /> <img :src="agentApplicationConfig.baseInfo.agentAvatar" class="mr-5 h-10 w-10 rounded-md" />
...@@ -72,12 +72,12 @@ function handleToLogin() { ...@@ -72,12 +72,12 @@ function handleToLogin() {
<NButton <NButton
v-show="isLogin" v-show="isLogin"
type="primary" type="primary"
class="rounded-md! h-[32px]! w-[100px]!" class="rounded-md! h-[32px]! min-w-[100px]!"
@click="handleToCreateApplication" @click="handleToCreateApplication"
> >
{{ t('common_module.create_agent_btn_text') }} {{ t('common_module.create_agent_btn_text') }}
</NButton> </NButton>
<NButton v-show="!isLogin" type="primary" class="rounded-md! h-[32px]! w-[100px]!" @click="handleToLogin"> <NButton v-show="!isLogin" type="primary" class="rounded-md! h-[32px]! min-w-[100px]!" @click="handleToLogin">
{{ t('common_module.login_now') }} {{ t('common_module.login_now') }}
</NButton> </NButton>
</div> </div>
......
...@@ -74,6 +74,7 @@ declare namespace I18n { ...@@ -74,6 +74,7 @@ declare namespace I18n {
delete_tip_title: string delete_tip_title: string
wipe_data: string wipe_data: string
delete_all_tip_title: string delete_all_tip_title: string
search: string
dialogue_module: { dialogue_module: {
continue_question_message: string continue_question_message: string
...@@ -158,7 +159,7 @@ declare namespace I18n { ...@@ -158,7 +159,7 @@ declare namespace I18n {
knowledge_document_detail: string knowledge_document_detail: string
multi_model_dialogue: string multi_model_dialogue: string
explore: string explore: string
applications_square: string application_square: string
} }
personal_space_module: { personal_space_module: {
...@@ -419,7 +420,6 @@ declare namespace I18n { ...@@ -419,7 +420,6 @@ declare namespace I18n {
} }
applications_square_module: { applications_square_module: {
title: string
create_application_btn_text: string create_application_btn_text: string
all_application_btn_text: string all_application_btn_text: string
immediate_use_btn_text: string immediate_use_btn_text: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment