feat: Initialize data-matcher project with Wails framework
- Added frontend runtime JavaScript functions for logging, window management, and notifications. - Created Go module with dependencies for Wails and Excel processing. - Implemented main application entry point with embedded frontend assets. - Configured Wails application settings in wails.json. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# --- Build output ---
|
||||
build/bin
|
||||
build/*.exe
|
||||
build/*.app
|
||||
|
||||
# --- Frontend ---
|
||||
node_modules/
|
||||
frontend/dist
|
||||
frontend/node_modules/
|
||||
frontend/package-lock.json
|
||||
|
||||
# --- Go ---
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*.test
|
||||
*.out
|
||||
vendor/
|
||||
|
||||
# --- IDE ---
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# VS Code(保留 .vscode/extensions.json 以便共享推荐)
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"golang.go",
|
||||
"vue.volar",
|
||||
"vue.vscode-typescript-vue-plugin",
|
||||
"wails.wails"
|
||||
]
|
||||
}
|
||||
86
README.md
Normal file
86
README.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# 数据智能匹配工具 (Data Matcher)
|
||||
|
||||
基于 **Wails v2** (Go + Vue 3) 的桌面端数据匹配工具,支持 Excel/CSV 文件的智能列映射、模糊匹配与 AI 增强匹配。
|
||||
|
||||
## 功能特性
|
||||
|
||||
- 📂 **多文件支持** — 读取 `.xlsx` / `.xls` / `.csv` 格式
|
||||
- 🔗 **动态列映射** — 自动解析表头,前端动态选择匹配列、时间列、提取列
|
||||
- 🧹 **正则清洗** — 自定义正则剔除干扰字符(默认保留纯中文)
|
||||
- ⏱ **时间窗口剪枝** — 按时间差过滤候选记录,提升匹配效率
|
||||
- 📊 **Levenshtein 模糊匹配** — 基于编辑距离的相似度计算
|
||||
- 🤖 **Deepseek AI 增强** — 对基础匹配未命中的记录,调用 Deepseek API 二次匹配
|
||||
- 📤 **结果导出** — 支持导出为 Excel (`.xlsx`) 格式
|
||||
|
||||
## 技术栈
|
||||
|
||||
| 层级 | 技术 |
|
||||
| -------- | ----------------------------- |
|
||||
| 后端 | Go 1.24 + Wails v2.12.0 |
|
||||
| 前端 | Vue 3 (Composition API) + Vite |
|
||||
| Excel | excelize v2.10.1 |
|
||||
| AI API | Deepseek Chat API |
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 前置要求
|
||||
|
||||
- Go 1.24+
|
||||
- Node.js 18+
|
||||
- Wails CLI v2.12.0
|
||||
|
||||
```bash
|
||||
go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||
```
|
||||
|
||||
### 开发模式
|
||||
|
||||
```bash
|
||||
# 安装前端依赖
|
||||
cd frontend && npm install
|
||||
|
||||
# 启动热重载开发服务器
|
||||
wails dev
|
||||
```
|
||||
|
||||
开发模式下:
|
||||
- Vite 热重载服务器运行在 `http://localhost:5173`
|
||||
- Go 方法浏览器调试入口 `http://localhost:34115`
|
||||
|
||||
### 构建
|
||||
|
||||
```bash
|
||||
wails build
|
||||
```
|
||||
|
||||
构建产物位于 `build/bin/` 目录。
|
||||
|
||||
## 使用指南
|
||||
|
||||
1. 点击「选择文件」分别加载 A 表(基准表)和 B 表(数据源表)
|
||||
2. 自动识别表头后,在下拉框中配置列映射:
|
||||
- **匹配列** — 用于模糊匹配的文本列
|
||||
- **时间列** — 可选,用于时间窗口剪枝
|
||||
- **提取列** — 从 B 表提取到结果的目标列
|
||||
3. 点击「开始智能匹配」运行基础算法匹配
|
||||
4. 可选:配置 Deepseek API 密钥后使用「AI 增强匹配」补充未命中记录
|
||||
5. 点击「导出结果」保存为 Excel 文件
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
data-matcher/
|
||||
├── app.go # 核心逻辑(匹配引擎、文件读写、AI 调用)
|
||||
├── main.go # 应用入口
|
||||
├── wails.json # Wails 项目配置
|
||||
├── go.mod / go.sum # Go 依赖
|
||||
├── frontend/
|
||||
│ ├── src/
|
||||
│ │ ├── App.vue # 主界面(Vue 组件)
|
||||
│ │ ├── style.css # 全局样式
|
||||
│ │ └── main.js # Vue 入口
|
||||
│ ├── index.html
|
||||
│ ├── vite.config.js
|
||||
│ └── package.json
|
||||
└── build/ # 构建配置(Windows/macOS 安装包)
|
||||
```
|
||||
35
build/README.md
Normal file
35
build/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Build Directory
|
||||
|
||||
The build directory is used to house all the build files and assets for your application.
|
||||
|
||||
The structure is:
|
||||
|
||||
* bin - Output directory
|
||||
* darwin - macOS specific files
|
||||
* windows - Windows specific files
|
||||
|
||||
## Mac
|
||||
|
||||
The `darwin` directory holds files specific to Mac builds.
|
||||
These may be customised and used as part of the build. To return these files to the default state, simply delete them
|
||||
and
|
||||
build with `wails build`.
|
||||
|
||||
The directory contains the following files:
|
||||
|
||||
- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
|
||||
- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.
|
||||
|
||||
## Windows
|
||||
|
||||
The `windows` directory contains the manifest and rc files used when building with `wails build`.
|
||||
These may be customised for your application. To return these files to the default state, simply delete them and
|
||||
build with `wails build`.
|
||||
|
||||
- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
|
||||
use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
|
||||
will be created using the `appicon.png` file in the build directory.
|
||||
- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
|
||||
- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
|
||||
as well as the application itself (right click the exe -> properties -> details)
|
||||
- `wails.exe.manifest` - The main application manifest file.
|
||||
BIN
build/appicon.png
Normal file
BIN
build/appicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
68
build/darwin/Info.dev.plist
Normal file
68
build/darwin/Info.dev.plist
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>{{.Info.ProductName}}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>{{.OutputFilename}}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.wails.{{.Name}}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>{{.Info.Comments}}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>iconfile</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>true</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>{{.Info.Copyright}}</string>
|
||||
{{if .Info.FileAssociations}}
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
{{range .Info.FileAssociations}}
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>{{.Ext}}</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>{{.Name}}</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>{{.Role}}</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>{{.IconName}}</string>
|
||||
</dict>
|
||||
{{end}}
|
||||
</array>
|
||||
{{end}}
|
||||
{{if .Info.Protocols}}
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
{{range .Info.Protocols}}
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.wails.{{.Scheme}}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>{{.Scheme}}</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>{{.Role}}</string>
|
||||
</dict>
|
||||
{{end}}
|
||||
</array>
|
||||
{{end}}
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
63
build/darwin/Info.plist
Normal file
63
build/darwin/Info.plist
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>{{.Info.ProductName}}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>{{.OutputFilename}}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.wails.{{.Name}}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>{{.Info.Comments}}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{{.Info.ProductVersion}}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>iconfile</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>true</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>{{.Info.Copyright}}</string>
|
||||
{{if .Info.FileAssociations}}
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
{{range .Info.FileAssociations}}
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>{{.Ext}}</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>{{.Name}}</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>{{.Role}}</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>{{.IconName}}</string>
|
||||
</dict>
|
||||
{{end}}
|
||||
</array>
|
||||
{{end}}
|
||||
{{if .Info.Protocols}}
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
{{range .Info.Protocols}}
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.wails.{{.Scheme}}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>{{.Scheme}}</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>{{.Role}}</string>
|
||||
</dict>
|
||||
{{end}}
|
||||
</array>
|
||||
{{end}}
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
build/windows/icon.ico
Normal file
BIN
build/windows/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
15
build/windows/info.json
Normal file
15
build/windows/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"fixed": {
|
||||
"file_version": "{{.Info.ProductVersion}}"
|
||||
},
|
||||
"info": {
|
||||
"0000": {
|
||||
"ProductVersion": "{{.Info.ProductVersion}}",
|
||||
"CompanyName": "{{.Info.CompanyName}}",
|
||||
"FileDescription": "{{.Info.ProductName}}",
|
||||
"LegalCopyright": "{{.Info.Copyright}}",
|
||||
"ProductName": "{{.Info.ProductName}}",
|
||||
"Comments": "{{.Info.Comments}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
114
build/windows/installer/project.nsi
Normal file
114
build/windows/installer/project.nsi
Normal file
@@ -0,0 +1,114 @@
|
||||
Unicode true
|
||||
|
||||
####
|
||||
## Please note: Template replacements don't work in this file. They are provided with default defines like
|
||||
## mentioned underneath.
|
||||
## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
|
||||
## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
|
||||
## from outside of Wails for debugging and development of the installer.
|
||||
##
|
||||
## For development first make a wails nsis build to populate the "wails_tools.nsh":
|
||||
## > wails build --target windows/amd64 --nsis
|
||||
## Then you can call makensis on this file with specifying the path to your binary:
|
||||
## For a AMD64 only installer:
|
||||
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
|
||||
## For a ARM64 only installer:
|
||||
## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
|
||||
## For a installer with both architectures:
|
||||
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
|
||||
####
|
||||
## The following information is taken from the ProjectInfo file, but they can be overwritten here.
|
||||
####
|
||||
## !define INFO_PROJECTNAME "MyProject" # Default "{{.Name}}"
|
||||
## !define INFO_COMPANYNAME "MyCompany" # Default "{{.Info.CompanyName}}"
|
||||
## !define INFO_PRODUCTNAME "MyProduct" # Default "{{.Info.ProductName}}"
|
||||
## !define INFO_PRODUCTVERSION "1.0.0" # Default "{{.Info.ProductVersion}}"
|
||||
## !define INFO_COPYRIGHT "Copyright" # Default "{{.Info.Copyright}}"
|
||||
###
|
||||
## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
|
||||
## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
|
||||
####
|
||||
## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
|
||||
####
|
||||
## Include the wails tools
|
||||
####
|
||||
!include "wails_tools.nsh"
|
||||
|
||||
# The version information for this two must consist of 4 parts
|
||||
VIProductVersion "${INFO_PRODUCTVERSION}.0"
|
||||
VIFileVersion "${INFO_PRODUCTVERSION}.0"
|
||||
|
||||
VIAddVersionKey "CompanyName" "${INFO_COMPANYNAME}"
|
||||
VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
|
||||
VIAddVersionKey "ProductVersion" "${INFO_PRODUCTVERSION}"
|
||||
VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
|
||||
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
|
||||
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
|
||||
|
||||
# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
|
||||
ManifestDPIAware true
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
!define MUI_ICON "..\icon.ico"
|
||||
!define MUI_UNICON "..\icon.ico"
|
||||
# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
|
||||
!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
|
||||
# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
|
||||
!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
|
||||
!insertmacro MUI_PAGE_INSTFILES # Installing page.
|
||||
!insertmacro MUI_PAGE_FINISH # Finished installation page.
|
||||
|
||||
!insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English" # Set the Language of the installer
|
||||
|
||||
## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
|
||||
#!uninstfinalize 'signtool --file "%1"'
|
||||
#!finalize 'signtool --file "%1"'
|
||||
|
||||
Name "${INFO_PRODUCTNAME}"
|
||||
OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
|
||||
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
|
||||
ShowInstDetails show # This will always show the installation details.
|
||||
|
||||
Function .onInit
|
||||
!insertmacro wails.checkArchitecture
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
!insertmacro wails.setShellContext
|
||||
|
||||
!insertmacro wails.webview2runtime
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
!insertmacro wails.files
|
||||
|
||||
CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
|
||||
CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
|
||||
|
||||
!insertmacro wails.associateFiles
|
||||
!insertmacro wails.associateCustomProtocols
|
||||
|
||||
!insertmacro wails.writeUninstaller
|
||||
SectionEnd
|
||||
|
||||
Section "uninstall"
|
||||
!insertmacro wails.setShellContext
|
||||
|
||||
RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath
|
||||
|
||||
RMDir /r $INSTDIR
|
||||
|
||||
Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
|
||||
Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
|
||||
|
||||
!insertmacro wails.unassociateFiles
|
||||
!insertmacro wails.unassociateCustomProtocols
|
||||
|
||||
!insertmacro wails.deleteUninstaller
|
||||
SectionEnd
|
||||
249
build/windows/installer/wails_tools.nsh
Normal file
249
build/windows/installer/wails_tools.nsh
Normal file
@@ -0,0 +1,249 @@
|
||||
# DO NOT EDIT - Generated automatically by `wails build`
|
||||
|
||||
!include "x64.nsh"
|
||||
!include "WinVer.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
!ifndef INFO_PROJECTNAME
|
||||
!define INFO_PROJECTNAME "{{.Name}}"
|
||||
!endif
|
||||
!ifndef INFO_COMPANYNAME
|
||||
!define INFO_COMPANYNAME "{{.Info.CompanyName}}"
|
||||
!endif
|
||||
!ifndef INFO_PRODUCTNAME
|
||||
!define INFO_PRODUCTNAME "{{.Info.ProductName}}"
|
||||
!endif
|
||||
!ifndef INFO_PRODUCTVERSION
|
||||
!define INFO_PRODUCTVERSION "{{.Info.ProductVersion}}"
|
||||
!endif
|
||||
!ifndef INFO_COPYRIGHT
|
||||
!define INFO_COPYRIGHT "{{.Info.Copyright}}"
|
||||
!endif
|
||||
!ifndef PRODUCT_EXECUTABLE
|
||||
!define PRODUCT_EXECUTABLE "${INFO_PROJECTNAME}.exe"
|
||||
!endif
|
||||
!ifndef UNINST_KEY_NAME
|
||||
!define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
|
||||
!endif
|
||||
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
|
||||
|
||||
!ifndef REQUEST_EXECUTION_LEVEL
|
||||
!define REQUEST_EXECUTION_LEVEL "admin"
|
||||
!endif
|
||||
|
||||
RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
|
||||
|
||||
!ifdef ARG_WAILS_AMD64_BINARY
|
||||
!define SUPPORTS_AMD64
|
||||
!endif
|
||||
|
||||
!ifdef ARG_WAILS_ARM64_BINARY
|
||||
!define SUPPORTS_ARM64
|
||||
!endif
|
||||
|
||||
!ifdef SUPPORTS_AMD64
|
||||
!ifdef SUPPORTS_ARM64
|
||||
!define ARCH "amd64_arm64"
|
||||
!else
|
||||
!define ARCH "amd64"
|
||||
!endif
|
||||
!else
|
||||
!ifdef SUPPORTS_ARM64
|
||||
!define ARCH "arm64"
|
||||
!else
|
||||
!error "Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!macro wails.checkArchitecture
|
||||
!ifndef WAILS_WIN10_REQUIRED
|
||||
!define WAILS_WIN10_REQUIRED "This product is only supported on Windows 10 (Server 2016) and later."
|
||||
!endif
|
||||
|
||||
!ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED
|
||||
!define WAILS_ARCHITECTURE_NOT_SUPPORTED "This product can't be installed on the current Windows architecture. Supports: ${ARCH}"
|
||||
!endif
|
||||
|
||||
${If} ${AtLeastWin10}
|
||||
!ifdef SUPPORTS_AMD64
|
||||
${if} ${IsNativeAMD64}
|
||||
Goto ok
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
!ifdef SUPPORTS_ARM64
|
||||
${if} ${IsNativeARM64}
|
||||
Goto ok
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
IfSilent silentArch notSilentArch
|
||||
silentArch:
|
||||
SetErrorLevel 65
|
||||
Abort
|
||||
notSilentArch:
|
||||
MessageBox MB_OK "${WAILS_ARCHITECTURE_NOT_SUPPORTED}"
|
||||
Quit
|
||||
${else}
|
||||
IfSilent silentWin notSilentWin
|
||||
silentWin:
|
||||
SetErrorLevel 64
|
||||
Abort
|
||||
notSilentWin:
|
||||
MessageBox MB_OK "${WAILS_WIN10_REQUIRED}"
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
ok:
|
||||
!macroend
|
||||
|
||||
!macro wails.files
|
||||
!ifdef SUPPORTS_AMD64
|
||||
${if} ${IsNativeAMD64}
|
||||
File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_AMD64_BINARY}"
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
!ifdef SUPPORTS_ARM64
|
||||
${if} ${IsNativeARM64}
|
||||
File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_ARM64_BINARY}"
|
||||
${EndIf}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro wails.writeUninstaller
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
SetRegView 64
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||
WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
|
||||
!macroend
|
||||
|
||||
!macro wails.deleteUninstaller
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
|
||||
SetRegView 64
|
||||
DeleteRegKey HKLM "${UNINST_KEY}"
|
||||
!macroend
|
||||
|
||||
!macro wails.setShellContext
|
||||
${If} ${REQUEST_EXECUTION_LEVEL} == "admin"
|
||||
SetShellVarContext all
|
||||
${else}
|
||||
SetShellVarContext current
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
# Install webview2 by launching the bootstrapper
|
||||
# See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment
|
||||
!macro wails.webview2runtime
|
||||
!ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT
|
||||
!define WAILS_INSTALL_WEBVIEW_DETAILPRINT "Installing: WebView2 Runtime"
|
||||
!endif
|
||||
|
||||
SetRegView 64
|
||||
# If the admin key exists and is not empty then webview2 is already installed
|
||||
ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
|
||||
${If} $0 != ""
|
||||
Goto ok
|
||||
${EndIf}
|
||||
|
||||
${If} ${REQUEST_EXECUTION_LEVEL} == "user"
|
||||
# If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
|
||||
ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
|
||||
${If} $0 != ""
|
||||
Goto ok
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
|
||||
SetDetailsPrint listonly
|
||||
|
||||
InitPluginsDir
|
||||
CreateDirectory "$pluginsdir\webview2bootstrapper"
|
||||
SetOutPath "$pluginsdir\webview2bootstrapper"
|
||||
File "tmp\MicrosoftEdgeWebview2Setup.exe"
|
||||
ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
|
||||
|
||||
SetDetailsPrint both
|
||||
ok:
|
||||
!macroend
|
||||
|
||||
# Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b
|
||||
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" ""
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "${FILECLASS}"
|
||||
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}" "" `${DESCRIPTION}`
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\DefaultIcon" "" `${ICON}`
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell" "" "open"
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open\command" "" `${COMMAND}`
|
||||
!macroend
|
||||
|
||||
!macro APP_UNASSOCIATE EXT FILECLASS
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" `${FILECLASS}_backup`
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "$R0"
|
||||
|
||||
DeleteRegKey SHELL_CONTEXT `Software\Classes\${FILECLASS}`
|
||||
!macroend
|
||||
|
||||
!macro wails.associateFiles
|
||||
; Create file associations
|
||||
{{range .Info.FileAssociations}}
|
||||
!insertmacro APP_ASSOCIATE "{{.Ext}}" "{{.Name}}" "{{.Description}}" "$INSTDIR\{{.IconName}}.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""
|
||||
|
||||
File "..\{{.IconName}}.ico"
|
||||
{{end}}
|
||||
!macroend
|
||||
|
||||
!macro wails.unassociateFiles
|
||||
; Delete app associations
|
||||
{{range .Info.FileAssociations}}
|
||||
!insertmacro APP_UNASSOCIATE "{{.Ext}}" "{{.Name}}"
|
||||
|
||||
Delete "$INSTDIR\{{.IconName}}.ico"
|
||||
{{end}}
|
||||
!macroend
|
||||
|
||||
!macro CUSTOM_PROTOCOL_ASSOCIATE PROTOCOL DESCRIPTION ICON COMMAND
|
||||
DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "" "${DESCRIPTION}"
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "URL Protocol" ""
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\DefaultIcon" "" "${ICON}"
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell" "" ""
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open" "" ""
|
||||
WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open\command" "" "${COMMAND}"
|
||||
!macroend
|
||||
|
||||
!macro CUSTOM_PROTOCOL_UNASSOCIATE PROTOCOL
|
||||
DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
|
||||
!macroend
|
||||
|
||||
!macro wails.associateCustomProtocols
|
||||
; Create custom protocols associations
|
||||
{{range .Info.Protocols}}
|
||||
!insertmacro CUSTOM_PROTOCOL_ASSOCIATE "{{.Scheme}}" "{{.Description}}" "$INSTDIR\${PRODUCT_EXECUTABLE},0" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""
|
||||
|
||||
{{end}}
|
||||
!macroend
|
||||
|
||||
!macro wails.unassociateCustomProtocols
|
||||
; Delete app custom protocol associations
|
||||
{{range .Info.Protocols}}
|
||||
!insertmacro CUSTOM_PROTOCOL_UNASSOCIATE "{{.Scheme}}"
|
||||
{{end}}
|
||||
!macroend
|
||||
15
build/windows/wails.exe.manifest
Normal file
15
build/windows/wails.exe.manifest
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<assemblyIdentity type="win32" name="com.wails.{{.Name}}" version="{{.Info.ProductVersion}}.0" processorArchitecture="*"/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> <!-- fallback for Windows 7 and 8 -->
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness> <!-- falls back to per-monitor if per-monitor v2 is not supported -->
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
</assembly>
|
||||
8
frontend/README.md
Normal file
8
frontend/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Vue 3 + Vite
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs,
|
||||
check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
|
||||
13
frontend/index.html
Normal file
13
frontend/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<title>数据智能匹配工具</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="./src/main.js" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
18
frontend/package.json
Normal file
18
frontend/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.0.3",
|
||||
"vite": "^3.0.7"
|
||||
}
|
||||
}
|
||||
1
frontend/package.json.md5
Normal file
1
frontend/package.json.md5
Normal file
@@ -0,0 +1 @@
|
||||
21d2a2199c4fb87865d8160b492f51c3
|
||||
898
frontend/src/App.vue
Normal file
898
frontend/src/App.vue
Normal file
@@ -0,0 +1,898 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
// Wails 自动生成的绑定
|
||||
import { OpenFileA, OpenFileB, ParseHeaders, RunMatch, ExportResults, SetDeepseekAPIKey, GetDeepseekStatus, DeepseekEnhanceMatching } from '../wailsjs/go/main/App'
|
||||
import { EventsOn, EventsOff } from '../wailsjs/runtime/runtime'
|
||||
|
||||
// ----------- 文件与列映射 -----------
|
||||
const fileAPath = ref('')
|
||||
const fileBPath = ref('')
|
||||
const headersA = ref([])
|
||||
const headersB = ref([])
|
||||
|
||||
// 列映射索引(-1 表示未选/不使用)
|
||||
const colAMatchIdx = ref(-1)
|
||||
const colATimeIdx = ref(-1)
|
||||
const colBMatchIdx = ref(-1)
|
||||
const colBTimeIdx = ref(-1)
|
||||
const colBExtractIdx = ref(-1)
|
||||
|
||||
// ----------- 高级匹配配置 -----------
|
||||
const showAdvanced = ref(false)
|
||||
const matchConfig = ref({
|
||||
regexPattern: '[^\\p{Han}]+',
|
||||
timeWindow: 12,
|
||||
threshold: 0.65,
|
||||
allMatches: false,
|
||||
caseSensitive: false,
|
||||
sortBy: '',
|
||||
maxPreview: 3,
|
||||
exportFormat: 'xlsx',
|
||||
includeHeader: true
|
||||
})
|
||||
|
||||
// ----------- 状态 -----------
|
||||
const monthlyPath = ref('')
|
||||
const dailyPath = ref('')
|
||||
const loading = ref(false)
|
||||
const results = ref([])
|
||||
const exporting = ref(false)
|
||||
const exportPath = ref('')
|
||||
const errorMsg = ref('')
|
||||
const stats = ref({ monthly: 0, daily: 0, matched: 0 })
|
||||
|
||||
// ----------- 进度状态 -----------
|
||||
const progress = ref({ current: 0, total: 100, message: '', phase: '' })
|
||||
const showProgress = ref(false)
|
||||
const progressTimerId = ref(null)
|
||||
|
||||
// ----------- 进度辅助函数 -----------
|
||||
function cancelProgressTimer() {
|
||||
if (progressTimerId.value !== null) {
|
||||
clearTimeout(progressTimerId.value)
|
||||
progressTimerId.value = null
|
||||
}
|
||||
}
|
||||
|
||||
function scheduleProgressDone() {
|
||||
cancelProgressTimer()
|
||||
progressTimerId.value = setTimeout(() => {
|
||||
showProgress.value = false
|
||||
progressTimerId.value = null
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
function hideProgressNow() {
|
||||
cancelProgressTimer()
|
||||
showProgress.value = false
|
||||
}
|
||||
|
||||
// ----------- Deepseek 状态 -----------
|
||||
const deepseekKey = ref('')
|
||||
const deepseekReady = ref(false)
|
||||
const showApiInput = ref(false)
|
||||
const aiEnhancing = ref(false)
|
||||
|
||||
// ----------- 文件选择 -----------
|
||||
async function selectFileA() {
|
||||
errorMsg.value = ''
|
||||
const path = await OpenFileA()
|
||||
if (!path) return
|
||||
fileAPath.value = path
|
||||
// 读表头用于动态下拉框
|
||||
try {
|
||||
headersA.value = await ParseHeaders(path)
|
||||
colAMatchIdx.value = -1; colATimeIdx.value = -1
|
||||
} catch (e) { errorMsg.value = '读取 A 表头失败: ' + (e.message || e) }
|
||||
}
|
||||
|
||||
async function selectFileB() {
|
||||
errorMsg.value = ''
|
||||
const path = await OpenFileB()
|
||||
if (!path) return
|
||||
fileBPath.value = path
|
||||
try {
|
||||
headersB.value = await ParseHeaders(path)
|
||||
colBMatchIdx.value = -1; colBTimeIdx.value = -1; colBExtractIdx.value = -1
|
||||
} catch (e) { errorMsg.value = '读取 B 表头失败: ' + (e.message || e) }
|
||||
}
|
||||
|
||||
// ----------- 智能匹配 -----------
|
||||
async function startMatching() {
|
||||
if (!fileAPath.value || !fileBPath.value) return
|
||||
if (colAMatchIdx.value < 0 || colBMatchIdx.value < 0 || colBExtractIdx.value < 0) {
|
||||
errorMsg.value = '请完成列映射配置(A表匹配列 / B表匹配列 / B表提取列)'
|
||||
return
|
||||
}
|
||||
cancelProgressTimer()
|
||||
loading.value = true; aiEnhancing.value = false; showProgress.value = true
|
||||
errorMsg.value = ''; results.value = []; exportPath.value = ''
|
||||
progress.value = { current: 0, total: 100, message: '准备中...', phase: 'reading' }
|
||||
|
||||
try {
|
||||
const config = {
|
||||
fileAPath: fileAPath.value, fileBPath: fileBPath.value,
|
||||
colAMatchIndex: colAMatchIdx.value, colATimeIndex: colATimeIdx.value,
|
||||
colBMatchIndex: colBMatchIdx.value, colBTimeIndex: colBTimeIdx.value,
|
||||
colBExtractIndex: colBExtractIdx.value,
|
||||
regexPattern: matchConfig.value.regexPattern || '',
|
||||
timeWindow: Number(matchConfig.value.timeWindow) || 12,
|
||||
threshold: Number(matchConfig.value.threshold) || 0.65,
|
||||
allMatches: matchConfig.value.allMatches || false,
|
||||
caseSensitive: matchConfig.value.caseSensitive || false,
|
||||
sortBy: matchConfig.value.sortBy || '',
|
||||
maxPreview: Number(matchConfig.value.maxPreview) || 0,
|
||||
exportFormat: matchConfig.value.exportFormat || 'xlsx',
|
||||
includeHeader: matchConfig.value.includeHeader !== false
|
||||
}
|
||||
const data = await RunMatch(config)
|
||||
results.value = data; stats.value.matched = data.length
|
||||
} catch (err) { errorMsg.value = typeof err === 'string' ? err : (err.message || '匹配失败')
|
||||
hideProgressNow()
|
||||
} finally { loading.value = false; if (!errorMsg.value) scheduleProgressDone() }
|
||||
}
|
||||
|
||||
// ----------- Deepseek AI 增强匹配 -----------
|
||||
async function startAIEnhance() {
|
||||
if (!monthlyPath.value || !dailyPath.value) {
|
||||
errorMsg.value = '请先选择月报和日报文件'
|
||||
return
|
||||
}
|
||||
if (!deepseekReady.value && !deepseekKey.value) {
|
||||
errorMsg.value = '请先配置 Deepseek API 密钥'
|
||||
return
|
||||
}
|
||||
|
||||
// 清除之前残留的定时器
|
||||
cancelProgressTimer()
|
||||
|
||||
// 如果还没保存密钥,先保存
|
||||
if (!deepseekReady.value && deepseekKey.value) {
|
||||
const result = await SetDeepseekAPIKey(deepseekKey.value)
|
||||
deepseekReady.value = await GetDeepseekStatus()
|
||||
}
|
||||
|
||||
aiEnhancing.value = true
|
||||
loading.value = true
|
||||
showProgress.value = true
|
||||
errorMsg.value = ''
|
||||
results.value = []
|
||||
exportPath.value = ''
|
||||
progress.value = { current: 0, total: 100, message: '正在启动 AI 增强匹配...', phase: 'reading' }
|
||||
|
||||
try {
|
||||
const data = await DeepseekEnhanceMatching(monthlyPath.value, dailyPath.value)
|
||||
results.value = data
|
||||
stats.value.matched = data.length
|
||||
} catch (err) {
|
||||
errorMsg.value = typeof err === 'string' ? err : (err.message || 'AI 增强匹配失败')
|
||||
hideProgressNow()
|
||||
} finally {
|
||||
loading.value = false
|
||||
aiEnhancing.value = false
|
||||
if (!errorMsg.value) {
|
||||
scheduleProgressDone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------- 导出 -----------
|
||||
async function exportResult() {
|
||||
if (results.value.length === 0) return
|
||||
exporting.value = true
|
||||
try {
|
||||
const path = await ExportResults(results.value)
|
||||
if (path) exportPath.value = path
|
||||
} catch (err) {
|
||||
errorMsg.value = typeof err === 'string' ? err : (err.message || '导出失败')
|
||||
} finally {
|
||||
exporting.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// ----------- Deepseek 密钥管理 -----------
|
||||
async function saveApiKey() {
|
||||
if (!deepseekKey.value) return
|
||||
const result = await SetDeepseekAPIKey(deepseekKey.value)
|
||||
deepseekReady.value = await GetDeepseekStatus()
|
||||
if (deepseekReady.value) {
|
||||
setTimeout(() => { showApiInput.value = false }, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
// ----------- 进度监听 -----------
|
||||
|
||||
onMounted(async () => {
|
||||
// 检查 Deepseek 状态
|
||||
deepseekReady.value = await GetDeepseekStatus()
|
||||
// 监听匹配进度事件
|
||||
EventsOn('match-progress', (data) => {
|
||||
progress.value = {
|
||||
current: data.current,
|
||||
total: data.total,
|
||||
message: data.message,
|
||||
phase: data.phase
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
cancelProgressTimer()
|
||||
EventsOff('match-progress')
|
||||
})
|
||||
|
||||
// ----------- 计算属性 -----------
|
||||
const canMatch = computed(() => fileAPath.value && fileBPath.value && !loading.value)
|
||||
const hasResults = computed(() => results.value.length > 0)
|
||||
const progressPercent = computed(() => {
|
||||
const p = progress.value
|
||||
if (p.total === 0) return 0
|
||||
return Math.round((p.current / p.total) * 100)
|
||||
})
|
||||
const aiMatchedCount = computed(() => results.value.filter(r => r.aiMatched).length)
|
||||
const basicMatchedCount = computed(() => results.value.length - aiMatchedCount.value)
|
||||
|
||||
// ----------- 辅助函数 -----------
|
||||
function scoreClass(score) {
|
||||
if (score >= 0.9) return 'score-high'
|
||||
if (score >= 0.75) return 'score-mid'
|
||||
return 'score-low'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 顶部标题 -->
|
||||
<header class="app-header">
|
||||
<div class="header-icon">
|
||||
<svg viewBox="0 0 24 24" width="32" height="32" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
||||
<polyline points="7 10 12 15 17 10"/>
|
||||
<line x1="12" y1="15" x2="12" y2="3"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="header-text">
|
||||
<h1>数据智能匹配工具</h1>
|
||||
<p class="subtitle">日报中断原因 → 月报精准匹配</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 操作面板 -->
|
||||
<section class="panel operation-panel">
|
||||
<div class="file-selectors">
|
||||
<!-- A 表 -->
|
||||
<div class="file-row">
|
||||
<label class="file-label"><span class="label-icon">📅</span>A 表(基准表)</label>
|
||||
<div class="file-input-group">
|
||||
<button class="btn btn-outline" @click="selectFileA" :disabled="loading">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>选择文件
|
||||
</button>
|
||||
<span class="file-path" :class="{ selected: fileAPath }">{{ fileAPath || '尚未选择' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="headersA.length" class="mapping-row">
|
||||
<label class="mapping-label">匹配列</label>
|
||||
<select v-model.number="colAMatchIdx" class="col-select"><option :value="-1">-- 请选择 --</option><option v-for="(h,i) in headersA" :key="i" :value="i">{{ h }}</option></select>
|
||||
<label class="mapping-label">时间列</label>
|
||||
<select v-model.number="colATimeIdx" class="col-select"><option :value="-1">跳过时间</option><option v-for="(h,i) in headersA" :key="i" :value="i">{{ h }}</option></select>
|
||||
</div>
|
||||
<!-- B 表 -->
|
||||
<div class="file-row">
|
||||
<label class="file-label"><span class="label-icon">📋</span>B 表(数据源表)</label>
|
||||
<div class="file-input-group">
|
||||
<button class="btn btn-outline" @click="selectFileB" :disabled="loading">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>选择文件
|
||||
</button>
|
||||
<span class="file-path" :class="{ selected: fileBPath }">{{ fileBPath || '尚未选择' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="headersB.length" class="mapping-row">
|
||||
<label class="mapping-label">匹配列</label>
|
||||
<select v-model.number="colBMatchIdx" class="col-select"><option :value="-1">-- 请选择 --</option><option v-for="(h,i) in headersB" :key="i" :value="i">{{ h }}</option></select>
|
||||
<label class="mapping-label">时间列</label>
|
||||
<select v-model.number="colBTimeIdx" class="col-select"><option :value="-1">跳过时间</option><option v-for="(h,i) in headersB" :key="i" :value="i">{{ h }}</option></select>
|
||||
<label class="mapping-label">提取列</label>
|
||||
<select v-model.number="colBExtractIdx" class="col-select"><option :value="-1">-- 请选择 --</option><option v-for="(h,i) in headersB" :key="i" :value="i">{{ h }}</option></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action-row action-row--multi">
|
||||
<button
|
||||
class="btn btn-primary btn-large"
|
||||
:disabled="!canMatch"
|
||||
@click="startMatching"
|
||||
>
|
||||
<template v-if="loading && !aiEnhancing">
|
||||
<span class="spinner"></span>
|
||||
匹配中...
|
||||
</template>
|
||||
<template v-else>
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>
|
||||
</svg>
|
||||
开始智能匹配
|
||||
</template>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-ai"
|
||||
:disabled="!canMatch || !deepseekReady"
|
||||
@click="startAIEnhance"
|
||||
>
|
||||
<template v-if="aiEnhancing">
|
||||
<span class="spinner spinner-dark"></span>
|
||||
AI 增强中...
|
||||
</template>
|
||||
<template v-else>
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M12 2a4 4 0 0 1 4 4c0 2-2 4-4 4s-4-2-4-4a4 4 0 0 1 4-4z"/>
|
||||
<path d="M2 22c0-4 4-8 10-8s10 4 10 8"/>
|
||||
</svg>
|
||||
AI 增强匹配
|
||||
</template>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 高级设置 -->
|
||||
<div class="advanced-config">
|
||||
<button class="btn btn-text" @click="showAdvanced = !showAdvanced">
|
||||
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="3"/>
|
||||
<path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
|
||||
</svg>
|
||||
{{ showAdvanced ? '收起匹配规则' : '匹配规则设置' }}
|
||||
</button>
|
||||
<transition name="slide">
|
||||
<div v-if="showAdvanced" class="advanced-form">
|
||||
<div class="form-row">
|
||||
<label class="form-label">
|
||||
清洗正则
|
||||
<span class="form-hint">匹配内容将被剔除,默认保留纯中文</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="matchConfig.regexPattern"
|
||||
class="form-input mono"
|
||||
placeholder="[^\p{Han}]+"
|
||||
:disabled="loading"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label class="form-label">
|
||||
时间容错窗口
|
||||
<span class="form-hint">单位:小时</span>
|
||||
</label>
|
||||
<input
|
||||
type="number"
|
||||
v-model.number="matchConfig.timeWindow"
|
||||
class="form-input narrow"
|
||||
min="0"
|
||||
max="168"
|
||||
step="1"
|
||||
:disabled="loading"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label class="form-label">
|
||||
相似度阈值
|
||||
<span class="form-hint">当前值:{{ matchConfig.threshold.toFixed(2) }}</span>
|
||||
</label>
|
||||
<input
|
||||
type="range"
|
||||
v-model.number="matchConfig.threshold"
|
||||
class="form-slider"
|
||||
min="0"
|
||||
max="1"
|
||||
step="0.05"
|
||||
:disabled="loading"
|
||||
/>
|
||||
<div class="slider-labels">
|
||||
<span>0</span>
|
||||
<span class="slider-tick" v-for="v in [0.25,0.5,0.65,0.8,0.95]" :key="v" :style="{ left: (v*100)+'%' }">|</span>
|
||||
<span>1</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row form-row--cols">
|
||||
<label class="form-label">
|
||||
匹配策略
|
||||
<span class="form-hint">全部返回 vs 仅最佳</span>
|
||||
</label>
|
||||
<label class="toggle-label">
|
||||
<input type="checkbox" v-model="matchConfig.allMatches" class="toggle-input" :disabled="loading" />
|
||||
<span class="toggle-text">{{ matchConfig.allMatches ? '全部匹配' : '仅最佳匹配' }}</span>
|
||||
</label>
|
||||
<label class="form-label" style="margin-left:20px">
|
||||
调试预览
|
||||
</label>
|
||||
<input type="number" v-model.number="matchConfig.maxPreview" class="form-input narrow" min="0" max="50" step="1" :disabled="loading" />
|
||||
</div>
|
||||
<div class="form-row form-row--cols">
|
||||
<label class="form-label">
|
||||
结果排序
|
||||
<span class="form-hint">匹配结果排序方式</span>
|
||||
</label>
|
||||
<select v-model="matchConfig.sortBy" class="col-select" style="max-width:160px" :disabled="loading">
|
||||
<option value="">不排序</option>
|
||||
<option value="similarity">相似度降序</option>
|
||||
<option value="timeDiff">时间差升序</option>
|
||||
</select>
|
||||
<label class="form-label" style="margin-left:20px">
|
||||
导出格式
|
||||
</label>
|
||||
<select v-model="matchConfig.exportFormat" class="col-select" style="max-width:100px" :disabled="loading">
|
||||
<option value="xlsx">Excel</option>
|
||||
<option value="csv">CSV</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
<!-- Deepseek API 配置 -->
|
||||
<div class="deepseek-config">
|
||||
<button class="btn btn-text" @click="showApiInput = !showApiInput">
|
||||
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="3"/>
|
||||
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1.08-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1.08 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1.08 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1.08z"/>
|
||||
</svg>
|
||||
{{ showApiInput ? '收起 API 配置' : '配置 Deepseek API' }}
|
||||
<span class="status-dot" :class="{ active: deepseekReady }"></span>
|
||||
</button>
|
||||
<transition name="slide">
|
||||
<div v-if="showApiInput" class="api-input-row">
|
||||
<input
|
||||
type="password"
|
||||
v-model="deepseekKey"
|
||||
placeholder="输入 Deepseek API 密钥 (sk-...)"
|
||||
class="api-input"
|
||||
:disabled="loading"
|
||||
/>
|
||||
<button
|
||||
class="btn btn-sm btn-outline"
|
||||
@click="saveApiKey"
|
||||
:disabled="!deepseekKey || loading"
|
||||
>
|
||||
保存
|
||||
</button>
|
||||
<span v-if="deepseekReady" class="api-status ok">已配置</span>
|
||||
<span v-else class="api-status na">未配置</span>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
<!-- 错误提示 -->
|
||||
<transition name="fade">
|
||||
<div v-if="errorMsg" class="error-banner">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<line x1="12" y1="8" x2="12" y2="12"/>
|
||||
<line x1="12" y1="16" x2="12.01" y2="16"/>
|
||||
</svg>
|
||||
<span>{{ errorMsg }}</span>
|
||||
<button class="error-close" @click="errorMsg = ''">×</button>
|
||||
</div>
|
||||
</transition>
|
||||
</section>
|
||||
|
||||
<!-- 进度面板(放在操作面板与结果之间,避免被旧定时器误关) -->
|
||||
<section class="panel progress-panel" v-if="showProgress">
|
||||
<div class="progress-state">
|
||||
<div class="progress-header">
|
||||
<span class="progress-phase">
|
||||
<span v-if="progress.phase === 'reading'" class="phase-icon">📂</span>
|
||||
<span v-else-if="progress.phase === 'matching'" class="phase-icon">🔗</span>
|
||||
<span v-else-if="progress.phase === 'ai-enhancing'" class="phase-icon">🤖</span>
|
||||
<span v-else class="phase-icon">✅</span>
|
||||
{{ progress.message }}
|
||||
</span>
|
||||
<span class="progress-pct">{{ progressPercent }}%</span>
|
||||
</div>
|
||||
<div class="progress-bar-track">
|
||||
<div
|
||||
class="progress-bar-fill"
|
||||
:class="{
|
||||
'fill-matching': progress.phase === 'matching',
|
||||
'fill-ai': progress.phase === 'ai-enhancing',
|
||||
'fill-done': progress.phase === 'done'
|
||||
}"
|
||||
:style="{ width: progressPercent + '%' }"
|
||||
></div>
|
||||
</div>
|
||||
<div class="progress-sub">
|
||||
<span v-if="progress.phase === 'matching'">
|
||||
已处理 {{ progress.current }} / {{ progress.total }} 条
|
||||
</span>
|
||||
<span v-else-if="progress.phase === 'ai-enhancing'">
|
||||
AI 分析中 {{ progress.current }} / {{ progress.total }}
|
||||
</span>
|
||||
<span v-else> </span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 结果面板 -->
|
||||
<section class="panel result-panel" v-if="hasResults">
|
||||
<div class="result-header">
|
||||
<div class="result-title">
|
||||
<h2>
|
||||
匹配结果
|
||||
<span class="badge">{{ results.length }} 条</span>
|
||||
<span v-if="aiMatchedCount > 0" class="badge badge-ai">AI 辅助 {{ aiMatchedCount }} 条</span>
|
||||
<span v-else class="badge badge-basic">基础匹配 {{ basicMatchedCount }} 条</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="result-actions">
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="exportResult"
|
||||
:disabled="exporting"
|
||||
>
|
||||
<template v-if="exporting">
|
||||
<span class="spinner"></span>
|
||||
导出中...
|
||||
</template>
|
||||
<template v-else>
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
||||
<polyline points="7 10 12 15 17 10"/>
|
||||
<line x1="12" y1="15" x2="12" y2="3"/>
|
||||
</svg>
|
||||
导出结果
|
||||
</template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 导出路径提示 -->
|
||||
<transition name="fade">
|
||||
<div v-if="exportPath" class="success-banner">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
|
||||
<polyline points="22 4 12 14.01 9 11.01"/>
|
||||
</svg>
|
||||
<span>导出成功:{{ exportPath }}</span>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 数据表格(新通用格式) -->
|
||||
<div class="table-wrapper">
|
||||
<table class="result-table">
|
||||
<thead><tr>
|
||||
<th v-for="(h,i) in headersA" :key="'ha'+i">{{ h || ('Col'+(i+1)) }}</th>
|
||||
<th class="col-extract">匹配结果(由B表提取)</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr v-for="(r, idx) in results" :key="idx">
|
||||
<td v-for="(h,i) in headersA" :key="'da'+i" :title="r.rowAData?.[i]">{{ r.rowAData?.[i] }}</td>
|
||||
<td class="col-extract" :title="r.extractValue">{{ r.extractValue }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<section class="panel empty-panel" v-else-if="!loading && !errorMsg">
|
||||
<div class="empty-state">
|
||||
<svg viewBox="0 0 24 24" width="64" height="64" fill="none" stroke="currentColor" stroke-width="1" class="empty-icon">
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
||||
<polyline points="14 2 14 8 20 8"/>
|
||||
<line x1="16" y1="13" x2="8" y2="13"/>
|
||||
<line x1="16" y1="17" x2="8" y2="17"/>
|
||||
<polyline points="10 9 9 9 8 9"/>
|
||||
</svg>
|
||||
<h3>等待匹配</h3>
|
||||
<p>请先选择月报和日报文件,然后点击「开始智能匹配」</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* ===== 暗色主题全局 ===== */
|
||||
.app-container {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 40px 64px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans SC', sans-serif;
|
||||
}
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
.app-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
.header-icon {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
width: 60px; height: 60px;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
border-radius: 18px; color: white; flex-shrink: 0;
|
||||
box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
|
||||
}
|
||||
.header-text h1 {
|
||||
font-size: 26px; font-weight: 800; color: #fff; margin: 0 0 4px;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 14px; color: rgba(255,255,255,0.45); margin: 0; font-weight: 400;
|
||||
}
|
||||
|
||||
/* ===== 卡片面板 ===== */
|
||||
.panel {
|
||||
background: rgba(255,255,255,0.04);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border: 1px solid rgba(255,255,255,0.08);
|
||||
border-radius: 20px;
|
||||
margin-bottom: 24px;
|
||||
padding: 28px;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* ===== 文件选择器 ===== */
|
||||
.file-selectors { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
|
||||
.file-row { display: flex; align-items: center; gap: 14px; }
|
||||
.file-label {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
min-width: 110px; font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.8);
|
||||
}
|
||||
.label-icon { font-size: 18px; }
|
||||
.file-input-group { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
|
||||
.file-path {
|
||||
font-size: 13px; color: rgba(255,255,255,0.35);
|
||||
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
|
||||
}
|
||||
.file-path.selected { color: rgba(255,255,255,0.7); font-weight: 500; }
|
||||
|
||||
/* ===== 列映射下拉框 ===== */
|
||||
.mapping-row {
|
||||
display: flex; align-items: center; gap: 10px; margin-top: 2px;
|
||||
margin-left: 124px; flex-wrap: wrap;
|
||||
}
|
||||
.mapping-label {
|
||||
font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5);
|
||||
min-width: 52px; text-transform: uppercase; letter-spacing: 0.5px;
|
||||
}
|
||||
.col-select {
|
||||
flex: 1; min-width: 130px; max-width: 220px;
|
||||
padding: 8px 12px; font-size: 12px;
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 10px; outline: none;
|
||||
background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.col-select:focus {
|
||||
border-color: #667eea;
|
||||
box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
|
||||
}
|
||||
.col-select option { background: #1a1a2e; color: #fff; }
|
||||
|
||||
/* ===== 按钮 ===== */
|
||||
.btn {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
padding: 10px 20px; font-size: 14px; font-weight: 600;
|
||||
border: 1px solid transparent; border-radius: 12px;
|
||||
cursor: pointer; transition: all 0.25s ease; white-space: nowrap;
|
||||
}
|
||||
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
|
||||
.btn-outline {
|
||||
background: rgba(255,255,255,0.06);
|
||||
border-color: rgba(255,255,255,0.12);
|
||||
color: rgba(255,255,255,0.8);
|
||||
}
|
||||
.btn-outline:hover:not(:disabled) {
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-color: rgba(255,255,255,0.25);
|
||||
}
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
color: white; border: none; padding: 14px 36px; font-size: 16px;
|
||||
font-weight: 700; border-radius: 14px;
|
||||
box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
|
||||
}
|
||||
.btn-primary:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 12px 40px rgba(102, 126, 234, 0.45);
|
||||
}
|
||||
.btn-primary:active:not(:disabled) { transform: translateY(0); }
|
||||
.btn-success {
|
||||
background: linear-gradient(135deg, #00b894, #00cec9);
|
||||
color: white; border: none; padding: 10px 24px; font-weight: 600;
|
||||
border-radius: 12px; box-shadow: 0 4px 16px rgba(0,184,148,0.25);
|
||||
}
|
||||
.btn-success:hover:not(:disabled) {
|
||||
background: linear-gradient(135deg, #00a381, #00b5b0);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.btn-ai {
|
||||
background: linear-gradient(135deg, #a855f7, #6366f1);
|
||||
color: white; border: none; padding: 14px 30px; font-weight: 700;
|
||||
border-radius: 14px; font-size: 15px;
|
||||
box-shadow: 0 8px 28px rgba(168,85,247,0.3);
|
||||
}
|
||||
.btn-ai:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 12px 36px rgba(168,85,247,0.45);
|
||||
}
|
||||
.btn-ai:active:not(:disabled) { transform: translateY(0); }
|
||||
.btn-ai:disabled { opacity: 0.35; cursor: not-allowed; }
|
||||
.btn-text {
|
||||
background: none; border: none; color: rgba(255,255,255,0.45);
|
||||
font-size: 13px; padding: 6px 10px; border-radius: 8px;
|
||||
cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
|
||||
}
|
||||
.btn-text:hover { color: #667eea; background: rgba(102,126,234,0.08); }
|
||||
.btn-sm { padding: 7px 16px; font-size: 13px; }
|
||||
.btn-large { min-width: 200px; justify-content: center; }
|
||||
.action-row { display: flex; justify-content: center; }
|
||||
.action-row--multi { gap: 14px; flex-wrap: wrap; }
|
||||
|
||||
/* ===== Spinner ===== */
|
||||
.spinner {
|
||||
display: inline-block; width: 18px; height: 18px;
|
||||
border: 2.5px solid rgba(255,255,255,0.25);
|
||||
border-top-color: white; border-radius: 50%;
|
||||
animation: spin 0.7s linear infinite;
|
||||
}
|
||||
.spinner-dark { border-color: rgba(255,255,255,0.2); border-top-color: white; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
/* ===== 横幅 ===== */
|
||||
.error-banner, .success-banner {
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
padding: 14px 18px; border-radius: 14px; margin-top: 18px; font-size: 14px;
|
||||
animation: slideIn 0.3s ease;
|
||||
}
|
||||
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
|
||||
.error-banner {
|
||||
background: rgba(220,38,38,0.12); color: #fca5a5;
|
||||
border: 1px solid rgba(220,38,38,0.2);
|
||||
}
|
||||
.success-banner {
|
||||
background: rgba(16,185,129,0.12); color: #6ee7b7;
|
||||
border: 1px solid rgba(16,185,129,0.2); margin-bottom: 16px;
|
||||
}
|
||||
.error-close { margin-left: auto; background: none; border: none; font-size: 22px; cursor: pointer; color: inherit; opacity: 0.5; }
|
||||
.error-close:hover { opacity: 1; }
|
||||
|
||||
/* ===== 结果面板 ===== */
|
||||
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
||||
.result-title h2 {
|
||||
font-size: 20px; font-weight: 700; color: #fff; margin: 0;
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
}
|
||||
.badge {
|
||||
display: inline-flex; align-items: center; padding: 3px 12px;
|
||||
font-size: 12px; font-weight: 700; border-radius: 20px;
|
||||
color: #667eea; background: rgba(102,126,234,0.15);
|
||||
}
|
||||
.badge-ai { color: #a855f7; background: rgba(168,85,247,0.15); }
|
||||
|
||||
/* ===== 表格 ===== */
|
||||
.table-wrapper {
|
||||
overflow-x: auto; border-radius: 14px;
|
||||
border: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||
.result-table thead { background: rgba(255,255,255,0.03); }
|
||||
.result-table th {
|
||||
padding: 14px 16px; text-align: left;
|
||||
font-weight: 700; color: rgba(255,255,255,0.6); font-size: 11px;
|
||||
text-transform: uppercase; letter-spacing: 0.5px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06); white-space: nowrap;
|
||||
}
|
||||
.result-table td {
|
||||
padding: 12px 16px; color: rgba(255,255,255,0.75);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.03);
|
||||
max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
font-size: 13px;
|
||||
}
|
||||
.result-table tbody tr { transition: background 0.15s; }
|
||||
.result-table tbody tr:hover { background: rgba(102,126,234,0.08); }
|
||||
.result-table tbody tr:last-child td { border-bottom: none; }
|
||||
.col-extract {
|
||||
min-width: 180px; font-weight: 600;
|
||||
color: #a78bfa; background: rgba(167,139,250,0.06);
|
||||
}
|
||||
|
||||
/* ===== 空状态 ===== */
|
||||
.empty-state { text-align: center; padding: 60px 20px; }
|
||||
.empty-icon { color: rgba(255,255,255,0.1); margin-bottom: 20px; }
|
||||
.empty-state h3 { font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.4); margin: 0 0 10px; }
|
||||
.empty-state p { font-size: 14px; color: rgba(255,255,255,0.25); margin: 0; }
|
||||
|
||||
/* ===== 进度条 ===== */
|
||||
.progress-panel { background: rgba(255,255,255,0.05); }
|
||||
.progress-state { padding: 4px 0; }
|
||||
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
|
||||
.progress-phase { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 8px; }
|
||||
.phase-icon { font-size: 18px; }
|
||||
.progress-pct { font-size: 22px; font-weight: 800; color: #667eea; }
|
||||
.progress-bar-track {
|
||||
width: 100%; height: 10px; background: rgba(255,255,255,0.06);
|
||||
border-radius: 5px; overflow: hidden;
|
||||
}
|
||||
.progress-bar-fill {
|
||||
height: 100%; border-radius: 5px; transition: width 0.4s ease;
|
||||
background: linear-gradient(90deg, #667eea, #764ba2);
|
||||
box-shadow: 0 0 12px rgba(102,126,234,0.3);
|
||||
}
|
||||
.fill-matching { background: linear-gradient(90deg, #667eea, #764ba2); }
|
||||
.fill-ai { background: linear-gradient(90deg, #a855f7, #6366f1); }
|
||||
.fill-done { background: linear-gradient(90deg, #00b894, #00cec9); }
|
||||
.progress-sub { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,0.3); min-height: 20px; }
|
||||
|
||||
/* ===== Deepseek 配置 ===== */
|
||||
.deepseek-config { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
|
||||
.status-dot {
|
||||
display: inline-block; width: 8px; height: 8px; border-radius: 50%;
|
||||
background: rgba(255,255,255,0.2);
|
||||
}
|
||||
.status-dot.active {
|
||||
background: #00b894; box-shadow: 0 0 10px rgba(0,184,148,0.5);
|
||||
}
|
||||
.api-input-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
|
||||
.api-input {
|
||||
flex: 1; max-width: 440px; padding: 10px 14px; font-size: 13px;
|
||||
border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; outline: none;
|
||||
background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8);
|
||||
font-family: 'SF Mono', 'Fira Code', monospace;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
.api-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
|
||||
.api-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
|
||||
.api-status.ok { color: #6ee7b7; background: rgba(16,185,129,0.12); }
|
||||
.api-status.na { color: #fcd34d; background: rgba(251,191,36,0.1); }
|
||||
|
||||
/* ===== 高级设置 ===== */
|
||||
.advanced-config { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
|
||||
.advanced-form {
|
||||
display: flex; flex-direction: column; gap: 14px; margin-top: 14px;
|
||||
padding: 20px; background: rgba(255,255,255,0.03);
|
||||
border-radius: 14px; border: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
.form-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
|
||||
.form-label {
|
||||
min-width: 110px; font-size: 13px; font-weight: 600;
|
||||
color: rgba(255,255,255,0.65); display: flex; flex-direction: column; gap: 3px;
|
||||
}
|
||||
.form-hint { font-weight: 400; font-size: 11px; color: rgba(255,255,255,0.3); }
|
||||
.form-input {
|
||||
flex: 1; padding: 9px 14px; font-size: 13px;
|
||||
border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; outline: none;
|
||||
background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8);
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
.form-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
|
||||
.form-input.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
|
||||
.form-input.narrow { max-width: 130px; }
|
||||
.form-slider { flex: 1; max-width: 300px; height: 6px; accent-color: #667eea; }
|
||||
|
||||
/* ===== 多列表单行 ===== */
|
||||
.form-row--cols { flex-wrap: nowrap; }
|
||||
.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
|
||||
.toggle-input {
|
||||
width: 40px; height: 22px; appearance: none;
|
||||
background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
|
||||
border-radius: 11px; position: relative; cursor: pointer; outline: none;
|
||||
transition: background 0.25s;
|
||||
}
|
||||
.toggle-input::after {
|
||||
content: ''; position: absolute; top: 2px; left: 2px;
|
||||
width: 16px; height: 16px; border-radius: 50%;
|
||||
background: rgba(255,255,255,0.5); transition: transform 0.25s;
|
||||
}
|
||||
.toggle-input:checked { background: #667eea; border-color: #667eea; }
|
||||
.toggle-input:checked::after { transform: translateX(18px); background: white; }
|
||||
.toggle-text { font-size: 12px; color: rgba(255,255,255,0.55); }
|
||||
|
||||
/* ===== 过渡动画 ===== */
|
||||
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s ease; }
|
||||
.fade-enter-from, .fade-leave-to { opacity: 0; }
|
||||
.slide-enter-active, .slide-leave-active { transition: all 0.25s ease; overflow: hidden; }
|
||||
.slide-enter-from, .slide-leave-to { max-height: 0; opacity: 0; }
|
||||
.slide-enter-to, .slide-leave-from { max-height: 400px; opacity: 1; }
|
||||
</style>
|
||||
93
frontend/src/assets/fonts/OFL.txt
Normal file
93
frontend/src/assets/fonts/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2016 The Nunito Project Authors (contact@sansoxygen.com),
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
frontend/src/assets/fonts/nunito-v16-latin-regular.woff2
Normal file
BIN
frontend/src/assets/fonts/nunito-v16-latin-regular.woff2
Normal file
Binary file not shown.
BIN
frontend/src/assets/images/logo-universal.png
Normal file
BIN
frontend/src/assets/images/logo-universal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
5
frontend/src/main.js
Normal file
5
frontend/src/main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import {createApp} from 'vue'
|
||||
import App from './App.vue'
|
||||
import './style.css';
|
||||
|
||||
createApp(App).mount('#app')
|
||||
33
frontend/src/style.css
Normal file
33
frontend/src/style.css
Normal file
@@ -0,0 +1,33 @@
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
|
||||
background-attachment: fixed;
|
||||
color: #e2e8f0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
||||
'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
#app {
|
||||
min-height: 100vh;
|
||||
background: radial-gradient(ellipse at 20% 50%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
|
||||
radial-gradient(ellipse at 80% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar { width: 6px; height: 6px; }
|
||||
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
|
||||
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
|
||||
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
|
||||
::selection { background: rgba(118, 75, 162, 0.4); color: #fff; }
|
||||
11
frontend/vite.config.js
Normal file
11
frontend/vite.config.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import {defineConfig} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
port: 34115,
|
||||
strictPort: true,
|
||||
},
|
||||
})
|
||||
29
frontend/wailsjs/go/main/App.d.ts
vendored
Normal file
29
frontend/wailsjs/go/main/App.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {main} from '../models';
|
||||
|
||||
export function CalculateSimilarity(arg1:string,arg2:string):Promise<number>;
|
||||
|
||||
export function CleanString(arg1:string):Promise<string>;
|
||||
|
||||
export function DeepseekEnhanceMatching(arg1:string,arg2:string):Promise<Array<main.MatchResult>>;
|
||||
|
||||
export function ExportResults(arg1:Array<main.MatchResult>):Promise<string>;
|
||||
|
||||
export function GetDeepseekStatus():Promise<boolean>;
|
||||
|
||||
export function OpenDailyReport():Promise<string>;
|
||||
|
||||
export function OpenFileA():Promise<string>;
|
||||
|
||||
export function OpenFileB():Promise<string>;
|
||||
|
||||
export function OpenMonthlyReport():Promise<string>;
|
||||
|
||||
export function ParseHeaders(arg1:string):Promise<Array<string>>;
|
||||
|
||||
export function RunMatch(arg1:main.MatchConfig):Promise<Array<main.MatchResult>>;
|
||||
|
||||
export function SetDeepseekAPIKey(arg1:string):Promise<string>;
|
||||
|
||||
export function StartMatching(arg1:string,arg2:string):Promise<Array<main.MatchResult>>;
|
||||
55
frontend/wailsjs/go/main/App.js
Normal file
55
frontend/wailsjs/go/main/App.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function CalculateSimilarity(arg1, arg2) {
|
||||
return window['go']['main']['App']['CalculateSimilarity'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function CleanString(arg1) {
|
||||
return window['go']['main']['App']['CleanString'](arg1);
|
||||
}
|
||||
|
||||
export function DeepseekEnhanceMatching(arg1, arg2) {
|
||||
return window['go']['main']['App']['DeepseekEnhanceMatching'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ExportResults(arg1) {
|
||||
return window['go']['main']['App']['ExportResults'](arg1);
|
||||
}
|
||||
|
||||
export function GetDeepseekStatus() {
|
||||
return window['go']['main']['App']['GetDeepseekStatus']();
|
||||
}
|
||||
|
||||
export function OpenDailyReport() {
|
||||
return window['go']['main']['App']['OpenDailyReport']();
|
||||
}
|
||||
|
||||
export function OpenFileA() {
|
||||
return window['go']['main']['App']['OpenFileA']();
|
||||
}
|
||||
|
||||
export function OpenFileB() {
|
||||
return window['go']['main']['App']['OpenFileB']();
|
||||
}
|
||||
|
||||
export function OpenMonthlyReport() {
|
||||
return window['go']['main']['App']['OpenMonthlyReport']();
|
||||
}
|
||||
|
||||
export function ParseHeaders(arg1) {
|
||||
return window['go']['main']['App']['ParseHeaders'](arg1);
|
||||
}
|
||||
|
||||
export function RunMatch(arg1) {
|
||||
return window['go']['main']['App']['RunMatch'](arg1);
|
||||
}
|
||||
|
||||
export function SetDeepseekAPIKey(arg1) {
|
||||
return window['go']['main']['App']['SetDeepseekAPIKey'](arg1);
|
||||
}
|
||||
|
||||
export function StartMatching(arg1, arg2) {
|
||||
return window['go']['main']['App']['StartMatching'](arg1, arg2);
|
||||
}
|
||||
75
frontend/wailsjs/go/models.ts
Normal file
75
frontend/wailsjs/go/models.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
export namespace main {
|
||||
|
||||
export class MatchConfig {
|
||||
fileAPath: string;
|
||||
fileBPath: string;
|
||||
colAMatchIndex: number;
|
||||
colATimeIndex: number;
|
||||
colBMatchIndex: number;
|
||||
colBTimeIndex: number;
|
||||
colBExtractIndex: number;
|
||||
regexPattern: string;
|
||||
timeWindow: number;
|
||||
threshold: number;
|
||||
allMatches: boolean;
|
||||
caseSensitive: boolean;
|
||||
sortBy: string;
|
||||
maxPreview: number;
|
||||
exportFormat: string;
|
||||
includeHeader: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new MatchConfig(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.fileAPath = source["fileAPath"];
|
||||
this.fileBPath = source["fileBPath"];
|
||||
this.colAMatchIndex = source["colAMatchIndex"];
|
||||
this.colATimeIndex = source["colATimeIndex"];
|
||||
this.colBMatchIndex = source["colBMatchIndex"];
|
||||
this.colBTimeIndex = source["colBTimeIndex"];
|
||||
this.colBExtractIndex = source["colBExtractIndex"];
|
||||
this.regexPattern = source["regexPattern"];
|
||||
this.timeWindow = source["timeWindow"];
|
||||
this.threshold = source["threshold"];
|
||||
this.allMatches = source["allMatches"];
|
||||
this.caseSensitive = source["caseSensitive"];
|
||||
this.sortBy = source["sortBy"];
|
||||
this.maxPreview = source["maxPreview"];
|
||||
this.exportFormat = source["exportFormat"];
|
||||
this.includeHeader = source["includeHeader"];
|
||||
}
|
||||
}
|
||||
export class MatchResult {
|
||||
rowAData: string[];
|
||||
rowBKey: string;
|
||||
extractValue: string;
|
||||
monthlyCellName: string;
|
||||
dailyCellId: string;
|
||||
interruptReason: string;
|
||||
timeDiff: string;
|
||||
similarityScore: number;
|
||||
aiMatched: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new MatchResult(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.rowAData = source["rowAData"];
|
||||
this.rowBKey = source["rowBKey"];
|
||||
this.extractValue = source["extractValue"];
|
||||
this.monthlyCellName = source["monthlyCellName"];
|
||||
this.dailyCellId = source["dailyCellId"];
|
||||
this.interruptReason = source["interruptReason"];
|
||||
this.timeDiff = source["timeDiff"];
|
||||
this.similarityScore = source["similarityScore"];
|
||||
this.aiMatched = source["aiMatched"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
24
frontend/wailsjs/runtime/package.json
Normal file
24
frontend/wailsjs/runtime/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@wailsapp/runtime",
|
||||
"version": "2.0.0",
|
||||
"description": "Wails Javascript runtime library",
|
||||
"main": "runtime.js",
|
||||
"types": "runtime.d.ts",
|
||||
"scripts": {
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/wailsapp/wails.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Wails",
|
||||
"Javascript",
|
||||
"Go"
|
||||
],
|
||||
"author": "Lea Anthony <lea.anthony@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/wailsapp/wails/issues"
|
||||
},
|
||||
"homepage": "https://github.com/wailsapp/wails#readme"
|
||||
}
|
||||
330
frontend/wailsjs/runtime/runtime.d.ts
vendored
Normal file
330
frontend/wailsjs/runtime/runtime.d.ts
vendored
Normal file
@@ -0,0 +1,330 @@
|
||||
/*
|
||||
_ __ _ __
|
||||
| | / /___ _(_) /____
|
||||
| | /| / / __ `/ / / ___/
|
||||
| |/ |/ / /_/ / / (__ )
|
||||
|__/|__/\__,_/_/_/____/
|
||||
The electron alternative for Go
|
||||
(c) Lea Anthony 2019-present
|
||||
*/
|
||||
|
||||
export interface Position {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export interface Size {
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
export interface Screen {
|
||||
isCurrent: boolean;
|
||||
isPrimary: boolean;
|
||||
width : number
|
||||
height : number
|
||||
}
|
||||
|
||||
// Environment information such as platform, buildtype, ...
|
||||
export interface EnvironmentInfo {
|
||||
buildType: string;
|
||||
platform: string;
|
||||
arch: string;
|
||||
}
|
||||
|
||||
// [EventsEmit](https://wails.io/docs/reference/runtime/events#eventsemit)
|
||||
// emits the given event. Optional data may be passed with the event.
|
||||
// This will trigger any event listeners.
|
||||
export function EventsEmit(eventName: string, ...data: any): void;
|
||||
|
||||
// [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name.
|
||||
export function EventsOn(eventName: string, callback: (...data: any) => void): () => void;
|
||||
|
||||
// [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple)
|
||||
// sets up a listener for the given event name, but will only trigger a given number times.
|
||||
export function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void;
|
||||
|
||||
// [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce)
|
||||
// sets up a listener for the given event name, but will only trigger once.
|
||||
export function EventsOnce(eventName: string, callback: (...data: any) => void): () => void;
|
||||
|
||||
// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff)
|
||||
// unregisters the listener for the given event name.
|
||||
export function EventsOff(eventName: string, ...additionalEventNames: string[]): void;
|
||||
|
||||
// [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall)
|
||||
// unregisters all listeners.
|
||||
export function EventsOffAll(): void;
|
||||
|
||||
// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint)
|
||||
// logs the given message as a raw message
|
||||
export function LogPrint(message: string): void;
|
||||
|
||||
// [LogTrace](https://wails.io/docs/reference/runtime/log#logtrace)
|
||||
// logs the given message at the `trace` log level.
|
||||
export function LogTrace(message: string): void;
|
||||
|
||||
// [LogDebug](https://wails.io/docs/reference/runtime/log#logdebug)
|
||||
// logs the given message at the `debug` log level.
|
||||
export function LogDebug(message: string): void;
|
||||
|
||||
// [LogError](https://wails.io/docs/reference/runtime/log#logerror)
|
||||
// logs the given message at the `error` log level.
|
||||
export function LogError(message: string): void;
|
||||
|
||||
// [LogFatal](https://wails.io/docs/reference/runtime/log#logfatal)
|
||||
// logs the given message at the `fatal` log level.
|
||||
// The application will quit after calling this method.
|
||||
export function LogFatal(message: string): void;
|
||||
|
||||
// [LogInfo](https://wails.io/docs/reference/runtime/log#loginfo)
|
||||
// logs the given message at the `info` log level.
|
||||
export function LogInfo(message: string): void;
|
||||
|
||||
// [LogWarning](https://wails.io/docs/reference/runtime/log#logwarning)
|
||||
// logs the given message at the `warning` log level.
|
||||
export function LogWarning(message: string): void;
|
||||
|
||||
// [WindowReload](https://wails.io/docs/reference/runtime/window#windowreload)
|
||||
// Forces a reload by the main application as well as connected browsers.
|
||||
export function WindowReload(): void;
|
||||
|
||||
// [WindowReloadApp](https://wails.io/docs/reference/runtime/window#windowreloadapp)
|
||||
// Reloads the application frontend.
|
||||
export function WindowReloadApp(): void;
|
||||
|
||||
// [WindowSetAlwaysOnTop](https://wails.io/docs/reference/runtime/window#windowsetalwaysontop)
|
||||
// Sets the window AlwaysOnTop or not on top.
|
||||
export function WindowSetAlwaysOnTop(b: boolean): void;
|
||||
|
||||
// [WindowSetSystemDefaultTheme](https://wails.io/docs/next/reference/runtime/window#windowsetsystemdefaulttheme)
|
||||
// *Windows only*
|
||||
// Sets window theme to system default (dark/light).
|
||||
export function WindowSetSystemDefaultTheme(): void;
|
||||
|
||||
// [WindowSetLightTheme](https://wails.io/docs/next/reference/runtime/window#windowsetlighttheme)
|
||||
// *Windows only*
|
||||
// Sets window to light theme.
|
||||
export function WindowSetLightTheme(): void;
|
||||
|
||||
// [WindowSetDarkTheme](https://wails.io/docs/next/reference/runtime/window#windowsetdarktheme)
|
||||
// *Windows only*
|
||||
// Sets window to dark theme.
|
||||
export function WindowSetDarkTheme(): void;
|
||||
|
||||
// [WindowCenter](https://wails.io/docs/reference/runtime/window#windowcenter)
|
||||
// Centers the window on the monitor the window is currently on.
|
||||
export function WindowCenter(): void;
|
||||
|
||||
// [WindowSetTitle](https://wails.io/docs/reference/runtime/window#windowsettitle)
|
||||
// Sets the text in the window title bar.
|
||||
export function WindowSetTitle(title: string): void;
|
||||
|
||||
// [WindowFullscreen](https://wails.io/docs/reference/runtime/window#windowfullscreen)
|
||||
// Makes the window full screen.
|
||||
export function WindowFullscreen(): void;
|
||||
|
||||
// [WindowUnfullscreen](https://wails.io/docs/reference/runtime/window#windowunfullscreen)
|
||||
// Restores the previous window dimensions and position prior to full screen.
|
||||
export function WindowUnfullscreen(): void;
|
||||
|
||||
// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen)
|
||||
// Returns the state of the window, i.e. whether the window is in full screen mode or not.
|
||||
export function WindowIsFullscreen(): Promise<boolean>;
|
||||
|
||||
// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize)
|
||||
// Sets the width and height of the window.
|
||||
export function WindowSetSize(width: number, height: number): void;
|
||||
|
||||
// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize)
|
||||
// Gets the width and height of the window.
|
||||
export function WindowGetSize(): Promise<Size>;
|
||||
|
||||
// [WindowSetMaxSize](https://wails.io/docs/reference/runtime/window#windowsetmaxsize)
|
||||
// Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions.
|
||||
// Setting a size of 0,0 will disable this constraint.
|
||||
export function WindowSetMaxSize(width: number, height: number): void;
|
||||
|
||||
// [WindowSetMinSize](https://wails.io/docs/reference/runtime/window#windowsetminsize)
|
||||
// Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions.
|
||||
// Setting a size of 0,0 will disable this constraint.
|
||||
export function WindowSetMinSize(width: number, height: number): void;
|
||||
|
||||
// [WindowSetPosition](https://wails.io/docs/reference/runtime/window#windowsetposition)
|
||||
// Sets the window position relative to the monitor the window is currently on.
|
||||
export function WindowSetPosition(x: number, y: number): void;
|
||||
|
||||
// [WindowGetPosition](https://wails.io/docs/reference/runtime/window#windowgetposition)
|
||||
// Gets the window position relative to the monitor the window is currently on.
|
||||
export function WindowGetPosition(): Promise<Position>;
|
||||
|
||||
// [WindowHide](https://wails.io/docs/reference/runtime/window#windowhide)
|
||||
// Hides the window.
|
||||
export function WindowHide(): void;
|
||||
|
||||
// [WindowShow](https://wails.io/docs/reference/runtime/window#windowshow)
|
||||
// Shows the window, if it is currently hidden.
|
||||
export function WindowShow(): void;
|
||||
|
||||
// [WindowMaximise](https://wails.io/docs/reference/runtime/window#windowmaximise)
|
||||
// Maximises the window to fill the screen.
|
||||
export function WindowMaximise(): void;
|
||||
|
||||
// [WindowToggleMaximise](https://wails.io/docs/reference/runtime/window#windowtogglemaximise)
|
||||
// Toggles between Maximised and UnMaximised.
|
||||
export function WindowToggleMaximise(): void;
|
||||
|
||||
// [WindowUnmaximise](https://wails.io/docs/reference/runtime/window#windowunmaximise)
|
||||
// Restores the window to the dimensions and position prior to maximising.
|
||||
export function WindowUnmaximise(): void;
|
||||
|
||||
// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised)
|
||||
// Returns the state of the window, i.e. whether the window is maximised or not.
|
||||
export function WindowIsMaximised(): Promise<boolean>;
|
||||
|
||||
// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise)
|
||||
// Minimises the window.
|
||||
export function WindowMinimise(): void;
|
||||
|
||||
// [WindowUnminimise](https://wails.io/docs/reference/runtime/window#windowunminimise)
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised)
|
||||
// Returns the state of the window, i.e. whether the window is minimised or not.
|
||||
export function WindowIsMinimised(): Promise<boolean>;
|
||||
|
||||
// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal)
|
||||
// Returns the state of the window, i.e. whether the window is normal or not.
|
||||
export function WindowIsNormal(): Promise<boolean>;
|
||||
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
|
||||
// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
|
||||
export function ScreenGetAll(): Promise<Screen[]>;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
export function BrowserOpenURL(url: string): void;
|
||||
|
||||
// [Environment](https://wails.io/docs/reference/runtime/intro#environment)
|
||||
// Returns information about the environment
|
||||
export function Environment(): Promise<EnvironmentInfo>;
|
||||
|
||||
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
|
||||
// Quits the application.
|
||||
export function Quit(): void;
|
||||
|
||||
// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
|
||||
// Hides the application.
|
||||
export function Hide(): void;
|
||||
|
||||
// [Show](https://wails.io/docs/reference/runtime/intro#show)
|
||||
// Shows the application.
|
||||
export function Show(): void;
|
||||
|
||||
// [ClipboardGetText](https://wails.io/docs/reference/runtime/clipboard#clipboardgettext)
|
||||
// Returns the current text stored on clipboard
|
||||
export function ClipboardGetText(): Promise<string>;
|
||||
|
||||
// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext)
|
||||
// Sets a text on the clipboard
|
||||
export function ClipboardSetText(text: string): Promise<boolean>;
|
||||
|
||||
// [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop)
|
||||
// OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
|
||||
export function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void
|
||||
|
||||
// [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff)
|
||||
// OnFileDropOff removes the drag and drop listeners and handlers.
|
||||
export function OnFileDropOff() :void
|
||||
|
||||
// Check if the file path resolver is available
|
||||
export function CanResolveFilePaths(): boolean;
|
||||
|
||||
// Resolves file paths for an array of files
|
||||
export function ResolveFilePaths(files: File[]): void
|
||||
|
||||
// Notification types
|
||||
export interface NotificationOptions {
|
||||
id: string;
|
||||
title: string;
|
||||
subtitle?: string; // macOS and Linux only
|
||||
body?: string;
|
||||
categoryId?: string;
|
||||
data?: { [key: string]: any };
|
||||
}
|
||||
|
||||
export interface NotificationAction {
|
||||
id?: string;
|
||||
title?: string;
|
||||
destructive?: boolean; // macOS-specific
|
||||
}
|
||||
|
||||
export interface NotificationCategory {
|
||||
id?: string;
|
||||
actions?: NotificationAction[];
|
||||
hasReplyField?: boolean;
|
||||
replyPlaceholder?: string;
|
||||
replyButtonTitle?: string;
|
||||
}
|
||||
|
||||
// [InitializeNotifications](https://wails.io/docs/reference/runtime/notification#initializenotifications)
|
||||
// Initializes the notification service for the application.
|
||||
// This must be called before sending any notifications.
|
||||
export function InitializeNotifications(): Promise<void>;
|
||||
|
||||
// [CleanupNotifications](https://wails.io/docs/reference/runtime/notification#cleanupnotifications)
|
||||
// Cleans up notification resources and releases any held connections.
|
||||
export function CleanupNotifications(): Promise<void>;
|
||||
|
||||
// [IsNotificationAvailable](https://wails.io/docs/reference/runtime/notification#isnotificationavailable)
|
||||
// Checks if notifications are available on the current platform.
|
||||
export function IsNotificationAvailable(): Promise<boolean>;
|
||||
|
||||
// [RequestNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#requestnotificationauthorization)
|
||||
// Requests notification authorization from the user (macOS only).
|
||||
export function RequestNotificationAuthorization(): Promise<boolean>;
|
||||
|
||||
// [CheckNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#checknotificationauthorization)
|
||||
// Checks the current notification authorization status (macOS only).
|
||||
export function CheckNotificationAuthorization(): Promise<boolean>;
|
||||
|
||||
// [SendNotification](https://wails.io/docs/reference/runtime/notification#sendnotification)
|
||||
// Sends a basic notification with the given options.
|
||||
export function SendNotification(options: NotificationOptions): Promise<void>;
|
||||
|
||||
// [SendNotificationWithActions](https://wails.io/docs/reference/runtime/notification#sendnotificationwithactions)
|
||||
// Sends a notification with action buttons. Requires a registered category.
|
||||
export function SendNotificationWithActions(options: NotificationOptions): Promise<void>;
|
||||
|
||||
// [RegisterNotificationCategory](https://wails.io/docs/reference/runtime/notification#registernotificationcategory)
|
||||
// Registers a notification category that can be used with SendNotificationWithActions.
|
||||
export function RegisterNotificationCategory(category: NotificationCategory): Promise<void>;
|
||||
|
||||
// [RemoveNotificationCategory](https://wails.io/docs/reference/runtime/notification#removenotificationcategory)
|
||||
// Removes a previously registered notification category.
|
||||
export function RemoveNotificationCategory(categoryId: string): Promise<void>;
|
||||
|
||||
// [RemoveAllPendingNotifications](https://wails.io/docs/reference/runtime/notification#removeallpendingnotifications)
|
||||
// Removes all pending notifications from the notification center.
|
||||
export function RemoveAllPendingNotifications(): Promise<void>;
|
||||
|
||||
// [RemovePendingNotification](https://wails.io/docs/reference/runtime/notification#removependingnotification)
|
||||
// Removes a specific pending notification by its identifier.
|
||||
export function RemovePendingNotification(identifier: string): Promise<void>;
|
||||
|
||||
// [RemoveAllDeliveredNotifications](https://wails.io/docs/reference/runtime/notification#removealldeliverednotifications)
|
||||
// Removes all delivered notifications from the notification center.
|
||||
export function RemoveAllDeliveredNotifications(): Promise<void>;
|
||||
|
||||
// [RemoveDeliveredNotification](https://wails.io/docs/reference/runtime/notification#removedeliverednotification)
|
||||
// Removes a specific delivered notification by its identifier.
|
||||
export function RemoveDeliveredNotification(identifier: string): Promise<void>;
|
||||
|
||||
// [RemoveNotification](https://wails.io/docs/reference/runtime/notification#removenotification)
|
||||
// Removes a notification by its identifier (cross-platform convenience function).
|
||||
export function RemoveNotification(identifier: string): Promise<void>;
|
||||
298
frontend/wailsjs/runtime/runtime.js
Normal file
298
frontend/wailsjs/runtime/runtime.js
Normal file
@@ -0,0 +1,298 @@
|
||||
/*
|
||||
_ __ _ __
|
||||
| | / /___ _(_) /____
|
||||
| | /| / / __ `/ / / ___/
|
||||
| |/ |/ / /_/ / / (__ )
|
||||
|__/|__/\__,_/_/_/____/
|
||||
The electron alternative for Go
|
||||
(c) Lea Anthony 2019-present
|
||||
*/
|
||||
|
||||
export function LogPrint(message) {
|
||||
window.runtime.LogPrint(message);
|
||||
}
|
||||
|
||||
export function LogTrace(message) {
|
||||
window.runtime.LogTrace(message);
|
||||
}
|
||||
|
||||
export function LogDebug(message) {
|
||||
window.runtime.LogDebug(message);
|
||||
}
|
||||
|
||||
export function LogInfo(message) {
|
||||
window.runtime.LogInfo(message);
|
||||
}
|
||||
|
||||
export function LogWarning(message) {
|
||||
window.runtime.LogWarning(message);
|
||||
}
|
||||
|
||||
export function LogError(message) {
|
||||
window.runtime.LogError(message);
|
||||
}
|
||||
|
||||
export function LogFatal(message) {
|
||||
window.runtime.LogFatal(message);
|
||||
}
|
||||
|
||||
export function EventsOnMultiple(eventName, callback, maxCallbacks) {
|
||||
return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
|
||||
}
|
||||
|
||||
export function EventsOn(eventName, callback) {
|
||||
return EventsOnMultiple(eventName, callback, -1);
|
||||
}
|
||||
|
||||
export function EventsOff(eventName, ...additionalEventNames) {
|
||||
return window.runtime.EventsOff(eventName, ...additionalEventNames);
|
||||
}
|
||||
|
||||
export function EventsOffAll() {
|
||||
return window.runtime.EventsOffAll();
|
||||
}
|
||||
|
||||
export function EventsOnce(eventName, callback) {
|
||||
return EventsOnMultiple(eventName, callback, 1);
|
||||
}
|
||||
|
||||
export function EventsEmit(eventName) {
|
||||
let args = [eventName].slice.call(arguments);
|
||||
return window.runtime.EventsEmit.apply(null, args);
|
||||
}
|
||||
|
||||
export function WindowReload() {
|
||||
window.runtime.WindowReload();
|
||||
}
|
||||
|
||||
export function WindowReloadApp() {
|
||||
window.runtime.WindowReloadApp();
|
||||
}
|
||||
|
||||
export function WindowSetAlwaysOnTop(b) {
|
||||
window.runtime.WindowSetAlwaysOnTop(b);
|
||||
}
|
||||
|
||||
export function WindowSetSystemDefaultTheme() {
|
||||
window.runtime.WindowSetSystemDefaultTheme();
|
||||
}
|
||||
|
||||
export function WindowSetLightTheme() {
|
||||
window.runtime.WindowSetLightTheme();
|
||||
}
|
||||
|
||||
export function WindowSetDarkTheme() {
|
||||
window.runtime.WindowSetDarkTheme();
|
||||
}
|
||||
|
||||
export function WindowCenter() {
|
||||
window.runtime.WindowCenter();
|
||||
}
|
||||
|
||||
export function WindowSetTitle(title) {
|
||||
window.runtime.WindowSetTitle(title);
|
||||
}
|
||||
|
||||
export function WindowFullscreen() {
|
||||
window.runtime.WindowFullscreen();
|
||||
}
|
||||
|
||||
export function WindowUnfullscreen() {
|
||||
window.runtime.WindowUnfullscreen();
|
||||
}
|
||||
|
||||
export function WindowIsFullscreen() {
|
||||
return window.runtime.WindowIsFullscreen();
|
||||
}
|
||||
|
||||
export function WindowGetSize() {
|
||||
return window.runtime.WindowGetSize();
|
||||
}
|
||||
|
||||
export function WindowSetSize(width, height) {
|
||||
window.runtime.WindowSetSize(width, height);
|
||||
}
|
||||
|
||||
export function WindowSetMaxSize(width, height) {
|
||||
window.runtime.WindowSetMaxSize(width, height);
|
||||
}
|
||||
|
||||
export function WindowSetMinSize(width, height) {
|
||||
window.runtime.WindowSetMinSize(width, height);
|
||||
}
|
||||
|
||||
export function WindowSetPosition(x, y) {
|
||||
window.runtime.WindowSetPosition(x, y);
|
||||
}
|
||||
|
||||
export function WindowGetPosition() {
|
||||
return window.runtime.WindowGetPosition();
|
||||
}
|
||||
|
||||
export function WindowHide() {
|
||||
window.runtime.WindowHide();
|
||||
}
|
||||
|
||||
export function WindowShow() {
|
||||
window.runtime.WindowShow();
|
||||
}
|
||||
|
||||
export function WindowMaximise() {
|
||||
window.runtime.WindowMaximise();
|
||||
}
|
||||
|
||||
export function WindowToggleMaximise() {
|
||||
window.runtime.WindowToggleMaximise();
|
||||
}
|
||||
|
||||
export function WindowUnmaximise() {
|
||||
window.runtime.WindowUnmaximise();
|
||||
}
|
||||
|
||||
export function WindowIsMaximised() {
|
||||
return window.runtime.WindowIsMaximised();
|
||||
}
|
||||
|
||||
export function WindowMinimise() {
|
||||
window.runtime.WindowMinimise();
|
||||
}
|
||||
|
||||
export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function ScreenGetAll() {
|
||||
return window.runtime.ScreenGetAll();
|
||||
}
|
||||
|
||||
export function WindowIsMinimised() {
|
||||
return window.runtime.WindowIsMinimised();
|
||||
}
|
||||
|
||||
export function WindowIsNormal() {
|
||||
return window.runtime.WindowIsNormal();
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
window.runtime.BrowserOpenURL(url);
|
||||
}
|
||||
|
||||
export function Environment() {
|
||||
return window.runtime.Environment();
|
||||
}
|
||||
|
||||
export function Quit() {
|
||||
window.runtime.Quit();
|
||||
}
|
||||
|
||||
export function Hide() {
|
||||
window.runtime.Hide();
|
||||
}
|
||||
|
||||
export function Show() {
|
||||
window.runtime.Show();
|
||||
}
|
||||
|
||||
export function ClipboardGetText() {
|
||||
return window.runtime.ClipboardGetText();
|
||||
}
|
||||
|
||||
export function ClipboardSetText(text) {
|
||||
return window.runtime.ClipboardSetText(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
|
||||
*
|
||||
* @export
|
||||
* @callback OnFileDropCallback
|
||||
* @param {number} x - x coordinate of the drop
|
||||
* @param {number} y - y coordinate of the drop
|
||||
* @param {string[]} paths - A list of file paths.
|
||||
*/
|
||||
|
||||
/**
|
||||
* OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
|
||||
*
|
||||
* @export
|
||||
* @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
|
||||
* @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target)
|
||||
*/
|
||||
export function OnFileDrop(callback, useDropTarget) {
|
||||
return window.runtime.OnFileDrop(callback, useDropTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* OnFileDropOff removes the drag and drop listeners and handlers.
|
||||
*/
|
||||
export function OnFileDropOff() {
|
||||
return window.runtime.OnFileDropOff();
|
||||
}
|
||||
|
||||
export function CanResolveFilePaths() {
|
||||
return window.runtime.CanResolveFilePaths();
|
||||
}
|
||||
|
||||
export function ResolveFilePaths(files) {
|
||||
return window.runtime.ResolveFilePaths(files);
|
||||
}
|
||||
|
||||
export function InitializeNotifications() {
|
||||
return window.runtime.InitializeNotifications();
|
||||
}
|
||||
|
||||
export function CleanupNotifications() {
|
||||
return window.runtime.CleanupNotifications();
|
||||
}
|
||||
|
||||
export function IsNotificationAvailable() {
|
||||
return window.runtime.IsNotificationAvailable();
|
||||
}
|
||||
|
||||
export function RequestNotificationAuthorization() {
|
||||
return window.runtime.RequestNotificationAuthorization();
|
||||
}
|
||||
|
||||
export function CheckNotificationAuthorization() {
|
||||
return window.runtime.CheckNotificationAuthorization();
|
||||
}
|
||||
|
||||
export function SendNotification(options) {
|
||||
return window.runtime.SendNotification(options);
|
||||
}
|
||||
|
||||
export function SendNotificationWithActions(options) {
|
||||
return window.runtime.SendNotificationWithActions(options);
|
||||
}
|
||||
|
||||
export function RegisterNotificationCategory(category) {
|
||||
return window.runtime.RegisterNotificationCategory(category);
|
||||
}
|
||||
|
||||
export function RemoveNotificationCategory(categoryId) {
|
||||
return window.runtime.RemoveNotificationCategory(categoryId);
|
||||
}
|
||||
|
||||
export function RemoveAllPendingNotifications() {
|
||||
return window.runtime.RemoveAllPendingNotifications();
|
||||
}
|
||||
|
||||
export function RemovePendingNotification(identifier) {
|
||||
return window.runtime.RemovePendingNotification(identifier);
|
||||
}
|
||||
|
||||
export function RemoveAllDeliveredNotifications() {
|
||||
return window.runtime.RemoveAllDeliveredNotifications();
|
||||
}
|
||||
|
||||
export function RemoveDeliveredNotification(identifier) {
|
||||
return window.runtime.RemoveDeliveredNotification(identifier);
|
||||
}
|
||||
|
||||
export function RemoveNotification(identifier) {
|
||||
return window.runtime.RemoveNotification(identifier);
|
||||
}
|
||||
46
go.mod
Normal file
46
go.mod
Normal file
@@ -0,0 +1,46 @@
|
||||
module data-matcher
|
||||
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.12.0
|
||||
github.com/xuri/excelize/v2 v2.10.1
|
||||
)
|
||||
|
||||
require (
|
||||
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.3 // indirect
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
|
||||
github.com/labstack/echo/v4 v4.13.3 // indirect
|
||||
github.com/labstack/gommon v0.4.2 // indirect
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
|
||||
github.com/leaanthony/gosod v1.0.4 // indirect
|
||||
github.com/leaanthony/slicer v1.6.0 // indirect
|
||||
github.com/leaanthony/u v1.1.1 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.6 // indirect
|
||||
github.com/richardlehane/msoleps v1.0.6 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/samber/lo v1.49.1 // indirect
|
||||
github.com/tiendc/go-deepcopy v1.7.2 // indirect
|
||||
github.com/tkrajina/go-reflector v0.5.8 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasttemplate v1.2.2 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.22 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
github.com/xuri/efp v0.0.1 // indirect
|
||||
github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 // indirect
|
||||
golang.org/x/crypto v0.48.0 // indirect
|
||||
golang.org/x/net v0.50.0 // indirect
|
||||
golang.org/x/sys v0.41.0 // indirect
|
||||
golang.org/x/text v0.34.0 // indirect
|
||||
)
|
||||
|
||||
// replace github.com/wailsapp/wails/v2 v2.12.0 => C:\Users\chena\go\pkg\mod
|
||||
97
go.sum
Normal file
97
go.sum
Normal file
@@ -0,0 +1,97 @@
|
||||
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 h1:N3IGoHHp9pb6mj1cbXbuaSXV/UMKwmbKLf53nQmtqMA=
|
||||
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3/go.mod h1:QtOLZGz8olr4qH2vWK0QH0w0O4T9fEIjMuWpKUsH7nc=
|
||||
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
|
||||
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
|
||||
github.com/labstack/echo/v4 v4.13.3 h1:pwhpCPrTl5qry5HRdM5FwdXnhXSLSY+WE+YQSeCaafY=
|
||||
github.com/labstack/echo/v4 v4.13.3/go.mod h1:o90YNEeQWjDozo584l7AwhJMHN0bOC4tAfg+Xox9q5g=
|
||||
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
|
||||
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
|
||||
github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
|
||||
github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
|
||||
github.com/leaanthony/gosod v1.0.4 h1:YLAbVyd591MRffDgxUOU1NwLhT9T1/YiwjKZpkNFeaI=
|
||||
github.com/leaanthony/gosod v1.0.4/go.mod h1:GKuIL0zzPj3O1SdWQOdgURSuhkF+Urizzxh26t9f1cw=
|
||||
github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=
|
||||
github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
|
||||
github.com/leaanthony/u v1.1.1 h1:TUFjwDGlNX+WuwVEzDqQwC2lOv0P4uhTQw7CMFdiK7M=
|
||||
github.com/leaanthony/u v1.1.1/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ=
|
||||
github.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/richardlehane/mscfb v1.0.6 h1:eN3bvvZCp00bs7Zf52bxNwAx5lJDBK1tCuH19qq5aC8=
|
||||
github.com/richardlehane/mscfb v1.0.6/go.mod h1:pe0+IUIc0AHh0+teNzBlJCtSyZdFOGgV4ZK9bsoV+Jo=
|
||||
github.com/richardlehane/msoleps v1.0.6 h1:9BvkpjvD+iUBalUY4esMwv6uBkfOip/Lzvd93jvR9gg=
|
||||
github.com/richardlehane/msoleps v1.0.6/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew=
|
||||
github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/tiendc/go-deepcopy v1.7.2 h1:Ut2yYR7W9tWjTQitganoIue4UGxZwCcJy3orjrrIj44=
|
||||
github.com/tiendc/go-deepcopy v1.7.2/go.mod h1:4bKjNC2r7boYOkD2IOuZpYjmlDdzjbpTRyCx+goBCJQ=
|
||||
github.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ=
|
||||
github.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
|
||||
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/wailsapp/go-webview2 v1.0.22 h1:YT61F5lj+GGaat5OB96Aa3b4QA+mybD0Ggq6NZijQ58=
|
||||
github.com/wailsapp/go-webview2 v1.0.22/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
|
||||
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
|
||||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
github.com/wailsapp/wails/v2 v2.12.0 h1:BHO/kLNWFHYjCzucxbzAYZWUjub1Tvb4cSguQozHn5c=
|
||||
github.com/wailsapp/wails/v2 v2.12.0/go.mod h1:mo1bzK1DEJrobt7YrBjgxvb5Sihb1mhAY09hppbibQg=
|
||||
github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8=
|
||||
github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
|
||||
github.com/xuri/excelize/v2 v2.10.1 h1:V62UlqopMqha3kOpnlHy2CcRVw1V8E63jFoWUmMzxN0=
|
||||
github.com/xuri/excelize/v2 v2.10.1/go.mod h1:iG5tARpgaEeIhTqt3/fgXCGoBRt4hNXgCp3tfXKoOIc=
|
||||
github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 h1:+C0TIdyyYmzadGaL/HBLbf3WdLgC29pgyhTjAT/0nuE=
|
||||
github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
||||
golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
|
||||
golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
|
||||
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
|
||||
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=
|
||||
golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
|
||||
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
|
||||
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
46
main.go
Normal file
46
main.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"embed"
|
||||
|
||||
"github.com/wailsapp/wails/v2"
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/linux"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/windows"
|
||||
)
|
||||
|
||||
//go:embed all:frontend/dist
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
app := NewApp()
|
||||
|
||||
err := wails.Run(&options.App{
|
||||
Title: "数据智能匹配工具",
|
||||
Width: 1280,
|
||||
Height: 860,
|
||||
MinWidth: 960,
|
||||
MinHeight: 640,
|
||||
AssetServer: &assetserver.Options{
|
||||
Assets: assets,
|
||||
},
|
||||
BackgroundColour: &options.RGBA{R: 245, G: 247, B: 250, A: 1},
|
||||
OnStartup: app.startup,
|
||||
Windows: &windows.Options{
|
||||
WebviewIsTransparent: false,
|
||||
WindowIsTranslucent: false,
|
||||
Theme: windows.SystemDefault,
|
||||
},
|
||||
Linux: &linux.Options{
|
||||
WindowIsTranslucent: false,
|
||||
},
|
||||
Bind: []interface{}{
|
||||
app,
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
println("Error:", err.Error())
|
||||
}
|
||||
}
|
||||
13
wails.json
Normal file
13
wails.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://wails.io/schemas/config.v2.json",
|
||||
"name": "data-matcher",
|
||||
"outputfilename": "data-matcher",
|
||||
"frontend:install": "npm install",
|
||||
"frontend:build": "npm run build",
|
||||
"frontend:dev:watcher": "npm run dev",
|
||||
"frontend:dev:serverUrl": "http://localhost:34115",
|
||||
"author": {
|
||||
"name": "RainySY",
|
||||
"email": "chendairong@outlook.com"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user