chore: restructure project and add i18n support

- Reorganize project structure with new electron and shared directories
- Add comprehensive i18n support with Chinese, English, and Japanese locales
- Update build configurations and TypeScript paths for new structure
- Add various UI components including chat interface and task management
- Include Windows release binaries and localization files
- Update dependencies and fix import paths throughout the codebase
This commit is contained in:
duanshuwen
2026-04-06 14:39:06 +08:00
parent e76b034d50
commit 6615d11dd6
311 changed files with 823682 additions and 4460 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div class="flex-1 h-full p-[20px] select-none">
<TitleSection title="账号设置" desc="请关联PMS和渠道房型名称可使用智能对标" />
<div
class="w-full flex items-center mt-[20px] py-[20px] box-border border-b-[1px] border-dashed border-b-[#E5E8EE]">
<div class="label w-[64px] text-[16px] font-medium text-[#171717] mr-[24px]">账号</div>
<div class="value text-[14px] font-medium text-[#171717]">1234567890</div>
</div>
<div class="w-full flex items-center py-[20px] box-border border-b-[1px] border-dashed border-b-[#E5E8EE]">
<div class="label w-[64px] text-[16px] font-medium text-[#171717] mr-[24px]">登录密码</div>
<div class="value text-[14px] text-[#99A0AE]">保障投资者登录操作时使用上次登录时间2022-11-09 16:24:30</div>
<div class="border-[1px] border-[#E5E8EE] rounded-[6px] px-[6px] py-[4px] flex items-center ml-[24px]">
<RiCheckboxCircleFill class="w-[16px] h-[16px]" color="#1FC16B" />
<span class="text-[12px] text-[#525866] ml-[2px]">已设置</span>
</div>
<el-button type="text" class="ml-auto">修改密码</el-button>
</div>
</div>
</template>
<script setup lang="ts">
import { RiCheckboxCircleFill } from '@remixicon/vue'
import TitleSection from '@src/components/TitleSection/index.vue'
</script>

View File

@@ -0,0 +1,36 @@
<template>
<div class="flex-1 h-full p-[20px] select-none">
<TitleSection title="渠道管理" desc="绑定酒店使用的相关渠道的账户和密码用于智能操作" />
<div class="grid grid-cols-3 gap-[12px] mb-[12px] select-none">
<div class="border-[1px] border-[#E5E8ED] box-border flex flex-col rounded-[12px] overflow-hidden"
v-for="item in channel" :key="item.id">
<div class="bg-[#E0E0E0] h-[120px]"></div>
<div class="flex items-center relative mt-[-20px] pl-[12px]">
<img :src="item.icon" class="w-[40px] h-[40px]">
</div>
<div class="flex items-center p-[12px]">
<span class="text-[14px] font-500 text-[#171717] leading-[20px]">
{{ item.name }}
</span>
<div class="bg-[#F2F5F8] rounded-[6px] flex items-center ml-[8px] py-[4px] px-[6px]">
<RiForbidLine class="w-[16px] h-[16px]" color="#717784" />
<span class="text-[12px] font-500 text-[#717784] leading-[20px] ml-[4px]">
未绑定
</span>
</div>
</div>
<div class="p-[12px] border-t-[1px] border-t-[#E5E8ED]">
<el-button plain>绑定</el-button>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { channel } from '@constant/channel'
import { RiForbidLine } from '@remixicon/vue'
import TitleSection from '@src/components/TitleSection/index.vue'
</script>

View File

@@ -0,0 +1,3 @@
<template></template>
<script setup lang="ts"></script>

View File

@@ -0,0 +1,27 @@
<template>
<div
class="w-[136px] h-full box-border border-r-[1px] border-r-[#E5E8EE] py-[12px] px-[8px] flex flex-col gap-[4px] select-none">
<div class="text-[12px] text-[#99A0AE] p-[4px]">系统设置</div>
<div
:class="['box-border flex items-center py-[10px] px-[12px] rounded-[6px] cursor-pointer', item.id === currentId ? 'bg-[#EFF6FF]' : '']"
v-for="item in systemMenus" :key="item.id" @click="handleClick(item)">
<component :is="item.icon" :color="item.id === currentId ? item.activeColor : item.color"
class="w-[20px] h-[20px]" />
<span class="box-border px-[8px] text-[14px] font-medium text-[#525866]">{{ item.name }}</span>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, defineEmits } from 'vue'
import { systemMenus } from '@src/constant/system-config'
const currentId = ref(1)
const emits = defineEmits(['change'])
const handleClick = async (item: any) => {
currentId.value = item.id
emits('change', item)
}
</script>

View File

@@ -0,0 +1,49 @@
<template>
<div class="flex-1 h-full p-[20px] select-none">
<TitleSection title="账号设置" desc="请关联PMS和渠道房型名称可使用智能对标" />
<div
class="w-full flex items-center mt-[20px] py-[20px] box-border border-b-[1px] border-dashed border-b-[#E5E8EE]">
<div class="label w-[64px] text-[16px] font-medium text-[#171717] mr-[24px]">当前版本</div>
<div class="value text-[16px] font-medium text-[#171717]">1.0.0</div>
<el-button type="text" class="ml-auto">检查更新</el-button>
</div>
<!-- 语言设置 -->
<div
class="w-full flex items-center mt-[20px] py-[20px] box-border border-b-[1px] border-dashed border-b-[#E5E8EE]">
<div class="label w-[64px] text-[16px] font-medium text-[#171717] mr-[24px]">语言设置</div>
<div class="value flex gap-2">
<el-button v-for="lang in supportedLanguages" :key="lang.code"
:type="currentLanguage === lang.code ? 'primary' : 'text'" @click="handleLanguageChange(lang.code)"
class="px-4">
{{ lang.label }}
</el-button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import TitleSection from '@src/components/TitleSection/index.vue'
import { setLanguage, getLanguage, type LanguageType } from '@src/i18n'
const supportedLanguages = [
{ code: 'zh', label: '中文' },
{ code: 'en', label: 'English' },
{ code: 'ja', label: '日本語' }
] as const
const currentLanguage = ref<LanguageType>('zh')
onMounted(() => {
currentLanguage.value = getLanguage() as LanguageType
})
const handleLanguageChange = async (langCode: LanguageType) => {
if (langCode === currentLanguage.value) return
await setLanguage(langCode)
currentLanguage.value = langCode
}
</script>