代码初始化-前端适配
This commit is contained in:
parent
b330305c85
commit
ac0ef5c9c8
6
.gitignore
vendored
6
.gitignore
vendored
@ -65,3 +65,9 @@ rebel.xml
|
||||
application-my.yaml
|
||||
|
||||
/yudao-ui-app/unpackage/
|
||||
|
||||
# Local deployment credentials and runtime files
|
||||
/deploy/local/secrets.psd1
|
||||
/deploy/local/.runtime/
|
||||
/.run/ElderYudaoLocal.run.xml
|
||||
/yudao-server/src/main/resources/application-desktop.yaml
|
||||
|
||||
5
.run/ElderYudaoFrontend.run.xml
Normal file
5
.run/ElderYudaoFrontend.run.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ElderYudao Frontend" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="E:/BiSh/NodeJS/node.exe" path-to-js-file="$PROJECT_DIR$/yudao-ui-admin-vue3/node_modules/vite/bin/vite.js" working-dir="$PROJECT_DIR$/yudao-ui-admin-vue3" application-parameters="--mode desktop --host 127.0.0.1 --port 5173 --strictPort">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@ -1,5 +1,7 @@
|
||||
# elder-yudao
|
||||
|
||||
管理端前端源码位于 `yudao-ui-admin-vue3/`,运行与界面调整见 [管理端界面定制](docs/管理端界面定制.md)。
|
||||
|
||||
**严正声明:本项目只为了给在校学生和刚刚步入社会又囊中羞涩的年轻人提供一种选择,同时也为了打击中国式伪开源贡献一份力量。**
|
||||
|
||||
**如果哪一天芋芋撕掉遮羞布,不割年轻人韭菜,一定不是良心发现或者钱赚够了,只是因为我来过。**
|
||||
@ -49,4 +51,5 @@ Cloud 文档验证码:https://cloud.iocoder.cn/?code=p70
|
||||
## 项目文档
|
||||
|
||||
- [文档目录](docs/README.md)
|
||||
- [系统管理后台本地部署](docs/系统管理后台本地部署.md)
|
||||
- [老年健康系统迁移上下文](docs/芋道框架迁移上下文.md)
|
||||
|
||||
22
deploy/local/check.ps1
Normal file
22
deploy/local/check.ps1
Normal file
@ -0,0 +1,22 @@
|
||||
param([string]$SecretsFile = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$settings = Read-LocalSettings $SecretsFile
|
||||
$origin = "http://127.0.0.1:$($settings.ServerPort)"
|
||||
$health = Invoke-RestMethod -Uri "$origin/actuator/health" -TimeoutSec 10
|
||||
if ($health.status -ne 'UP') { throw 'Health check is not UP.' }
|
||||
$docs = Invoke-WebRequest -Uri "$origin/doc.html" -UseBasicParsing -TimeoutSec 10
|
||||
if ($docs.StatusCode -ne 200) { throw 'API documentation is unavailable.' }
|
||||
$login = Invoke-RestMethod -Uri "$origin/admin-api/system/auth/login" -Method Post -Headers @{ 'tenant-id' = '1' } `
|
||||
-ContentType 'application/json' -Body '{"username":"admin","password":"admin123"}' -TimeoutSec 15
|
||||
if ($login.code -ne 0) { throw "Seed administrator login failed: $($login.msg)" }
|
||||
$headers = @{ 'tenant-id' = '1'; Authorization = ('Bearer ' + $login.data.accessToken) }
|
||||
try {
|
||||
$permission = Invoke-RestMethod -Uri "$origin/admin-api/system/auth/get-permission-info" -Headers $headers -TimeoutSec 15
|
||||
if ($permission.code -ne 0) { throw "Permission API failed: $($permission.msg)" }
|
||||
$users = Invoke-RestMethod -Uri "$origin/admin-api/system/user/page?pageNo=1&pageSize=10" -Headers $headers -TimeoutSec 15
|
||||
if ($users.code -ne 0) { throw "User list API failed: $($users.msg)" }
|
||||
Write-Output "Health UP; API docs HTTP 200; login and permission APIs passed; user list total=$($users.data.total)."
|
||||
} finally {
|
||||
$logout = Invoke-RestMethod -Uri "$origin/admin-api/system/auth/logout" -Method Post -Headers $headers -TimeoutSec 15
|
||||
if ($logout.code -ne 0) { throw 'Logout failed.' }
|
||||
}
|
||||
77
deploy/local/common.ps1
Normal file
77
deploy/local/common.ps1
Normal file
@ -0,0 +1,77 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$repoPath = (Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
|
||||
$runtimePath = Join-Path $PSScriptRoot '.runtime'
|
||||
|
||||
function Read-LocalSettings {
|
||||
param([string]$Path = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
if (-not (Test-Path -LiteralPath $Path)) {
|
||||
throw 'Copy secrets.example.psd1 to secrets.psd1 and fill in the local database password first.'
|
||||
}
|
||||
$settings = Import-PowerShellDataFile -LiteralPath $Path
|
||||
if ($settings.DatabaseName -notmatch '^elder_yudao_[a-z0-9_]+$') {
|
||||
throw 'Use a separate database named elder_yudao_*; existing application databases are not supported by this initializer.'
|
||||
}
|
||||
return $settings
|
||||
}
|
||||
|
||||
function Resolve-LocalProgram {
|
||||
param([string]$ConfiguredPath, [string]$CommandName, [string]$FallbackPath = '')
|
||||
if ($ConfiguredPath) {
|
||||
if (-not (Test-Path -LiteralPath $ConfiguredPath -PathType Leaf)) { throw "Program not found: $ConfiguredPath" }
|
||||
return (Resolve-Path -LiteralPath $ConfiguredPath).Path
|
||||
}
|
||||
$program = Get-Command $CommandName -ErrorAction SilentlyContinue
|
||||
if ($program) { return $program.Source }
|
||||
if ($FallbackPath -and (Test-Path -LiteralPath $FallbackPath)) { return $FallbackPath }
|
||||
throw "Program not found: $CommandName. Install it or set its path in secrets.psd1."
|
||||
}
|
||||
|
||||
function Invoke-LocalMySql {
|
||||
param([hashtable]$Settings, [string]$Query, [string]$Database = '')
|
||||
$mysqlExe = Resolve-LocalProgram $Settings.MySqlExe 'mysql.exe' 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe'
|
||||
$arguments = @('--protocol=TCP', "--host=$($Settings.DatabaseHost)", "--port=$($Settings.DatabasePort)",
|
||||
"--user=$($Settings.DatabaseUser)", '--connect-timeout=5', '--default-character-set=utf8mb4', '--batch', '--skip-column-names')
|
||||
if ($Database) { $arguments += "--database=$Database" }
|
||||
$arguments += "--execute=$Query"
|
||||
$previousPassword = $env:MYSQL_PWD
|
||||
try {
|
||||
$env:MYSQL_PWD = $Settings.DatabasePassword
|
||||
$result = @(& $mysqlExe @arguments)
|
||||
if ($LASTEXITCODE -ne 0) { throw 'MySQL command failed; see the error above. No password is printed by this script.' }
|
||||
return $result
|
||||
} finally {
|
||||
if ($null -eq $previousPassword) { Remove-Item Env:\MYSQL_PWD -ErrorAction SilentlyContinue }
|
||||
else { $env:MYSQL_PWD = $previousPassword }
|
||||
}
|
||||
}
|
||||
|
||||
function Get-LocalServerProcess {
|
||||
$pidFile = Join-Path $runtimePath 'server.pid'
|
||||
if (-not (Test-Path -LiteralPath $pidFile)) { return $null }
|
||||
$serverPid = 0
|
||||
if (-not [int]::TryParse((Get-Content -LiteralPath $pidFile -Raw).Trim(), [ref]$serverPid)) {
|
||||
throw 'Invalid server.pid; inspect the runtime directory before continuing.'
|
||||
}
|
||||
$process = Get-CimInstance Win32_Process -Filter "ProcessId=$serverPid" -ErrorAction SilentlyContinue
|
||||
if (-not $process) { return $null }
|
||||
$jarPath = Join-Path $repoPath 'yudao-server/target/yudao-server.jar'
|
||||
if ($process.Name -notmatch '^java(w)?\.exe$' -or -not $process.CommandLine.Contains($jarPath)) {
|
||||
throw 'The recorded PID belongs to another process; refusing to operate on it.'
|
||||
}
|
||||
return $process
|
||||
}
|
||||
|
||||
function Get-LocalUiProcess {
|
||||
$pidFile = Join-Path $runtimePath 'ui.pid'
|
||||
if (-not (Test-Path -LiteralPath $pidFile)) { return $null }
|
||||
$uiPid = 0
|
||||
if (-not [int]::TryParse((Get-Content -LiteralPath $pidFile -Raw).Trim(), [ref]$uiPid)) { throw 'Invalid ui.pid.' }
|
||||
$process = Get-CimInstance Win32_Process -Filter "ProcessId=$uiPid" -ErrorAction SilentlyContinue
|
||||
if (-not $process) { return $null }
|
||||
$vitePaths = @((Join-Path $repoPath 'yudao-ui-admin-vue3/node_modules/vite/bin/vite.js'), (Join-Path $runtimePath 'ui-src/node_modules/vite/bin/vite.js'))
|
||||
$matchesUiPath = @($vitePaths | Where-Object { $process.CommandLine.Contains($_) }).Count -gt 0
|
||||
if ($process.Name -ne 'node.exe' -or -not $matchesUiPath) {
|
||||
throw 'The recorded UI PID belongs to another process; refusing to operate on it.'
|
||||
}
|
||||
return $process
|
||||
}
|
||||
24
deploy/local/initialize.ps1
Normal file
24
deploy/local/initialize.ps1
Normal file
@ -0,0 +1,24 @@
|
||||
param([string]$SecretsFile = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$settings = Read-LocalSettings $SecretsFile
|
||||
$databaseName = $settings.DatabaseName
|
||||
$schemaExists = [int]@(Invoke-LocalMySql $settings "SELECT COUNT(*) FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='$databaseName';")[0]
|
||||
if ($schemaExists -eq 0) {
|
||||
Invoke-LocalMySql $settings "CREATE DATABASE ``$databaseName`` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | Out-Null
|
||||
}
|
||||
$tableCount = [int]@(Invoke-LocalMySql $settings "SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA='$databaseName';")[0]
|
||||
if ($tableCount -gt 0) {
|
||||
throw "Database $databaseName already has $tableCount tables. Initialization is skipped to preserve existing data; run start.ps1 if it is already initialized."
|
||||
}
|
||||
$sqlPath = Join-Path $repoPath 'mysql_script/ruoyi-vue-pro.sql'
|
||||
$sql = Get-Content -LiteralPath $sqlPath -Raw -Encoding UTF8
|
||||
if ($sql -match '(?im)^\s*(USE\s|CREATE\s+DATABASE\s|DROP\s+DATABASE\s)') {
|
||||
throw 'The seed script changes the target database; review it before importing.'
|
||||
}
|
||||
$sourcePath = $sqlPath.Replace('\', '/')
|
||||
Invoke-LocalMySql $settings "SOURCE $sourcePath;" $databaseName | Out-Null
|
||||
# Use the seeded database file store instead of a demonstration cloud bucket.
|
||||
Invoke-LocalMySql $settings 'UPDATE infra_file_config SET master = (id = 4) WHERE deleted = 0;' $databaseName | Out-Null
|
||||
$tableCount = @(Invoke-LocalMySql $settings "SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA='$databaseName';")[0]
|
||||
$adminCount = @(Invoke-LocalMySql $settings "SELECT COUNT(*) FROM system_users WHERE username='admin' AND deleted=0 AND tenant_id=1;" $databaseName)[0]
|
||||
Write-Output "Initialized $databaseName with $tableCount tables and $adminCount administrator account. Existing databases were not imported into."
|
||||
47
deploy/local/prepare-idea.ps1
Normal file
47
deploy/local/prepare-idea.ps1
Normal file
@ -0,0 +1,47 @@
|
||||
param([string]$SecretsFile = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$settings = Read-LocalSettings $SecretsFile
|
||||
$runPath = Join-Path $repoPath '.run'
|
||||
New-Item -ItemType Directory -Path $runPath -Force | Out-Null
|
||||
|
||||
# IDEA loads this private run configuration from the project's .run directory.
|
||||
# It contains local credentials and is excluded from Git.
|
||||
[xml]$document = '<component name="ProjectRunConfigurationManager"><configuration default="false" name="ElderYudao Local" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot"><option name="ACTIVE_PROFILES" value="local,desktop" /><module name="yudao-server" /><option name="SPRING_BOOT_MAIN_CLASS" value="cn.iocoder.yudao.server.YudaoServerApplication" /><option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /><option name="VM_PARAMETERS" value="-Dfile.encoding=UTF-8" /><envs /><method v="2"><option name="Make" enabled="true" /></method></configuration></component>'
|
||||
$configuration = $document.component.configuration
|
||||
$environment = @{
|
||||
ELDER_DB_HOST = [string]$settings.DatabaseHost
|
||||
ELDER_DB_PORT = [string]$settings.DatabasePort
|
||||
ELDER_DB_NAME = [string]$settings.DatabaseName
|
||||
ELDER_DB_USER = [string]$settings.DatabaseUser
|
||||
ELDER_DB_PASSWORD = [string]$settings.DatabasePassword
|
||||
ELDER_REDIS_HOST = [string]$settings.RedisHost
|
||||
ELDER_REDIS_PORT = [string]$settings.RedisPort
|
||||
ELDER_REDIS_DATABASE = [string]$settings.RedisDatabase
|
||||
ELDER_SERVER_PORT = [string]$settings.ServerPort
|
||||
ELDER_LOG_FILE = Join-Path $runtimePath 'application.log'
|
||||
}
|
||||
if ($settings.RedisPassword) { $environment.SPRING_REDIS_PASSWORD = [string]$settings.RedisPassword }
|
||||
foreach ($key in ($environment.Keys | Sort-Object)) {
|
||||
$entry = $document.CreateElement('env')
|
||||
$entry.SetAttribute('name', $key)
|
||||
$entry.SetAttribute('value', $environment[$key])
|
||||
$configuration.SelectSingleNode('envs').AppendChild($entry) | Out-Null
|
||||
}
|
||||
if ($settings.JavaExe) {
|
||||
$javaExe = Resolve-LocalProgram $settings.JavaExe 'java.exe'
|
||||
$jdkPath = Split-Path (Split-Path $javaExe -Parent) -Parent
|
||||
foreach ($option in @(@{ name = 'ALTERNATIVE_JRE_PATH'; value = $jdkPath }, @{ name = 'ALTERNATIVE_JRE_PATH_ENABLED'; value = 'true' })) {
|
||||
$entry = $document.CreateElement('option')
|
||||
$entry.SetAttribute('name', $option.name)
|
||||
$entry.SetAttribute('value', $option.value)
|
||||
$configuration.AppendChild($entry) | Out-Null
|
||||
}
|
||||
}
|
||||
$writerSettings = New-Object System.Xml.XmlWriterSettings
|
||||
$writerSettings.Encoding = New-Object System.Text.UTF8Encoding($false)
|
||||
$writerSettings.Indent = $true
|
||||
$writerSettings.OmitXmlDeclaration = $true
|
||||
$writer = [System.Xml.XmlWriter]::Create((Join-Path $runPath 'ElderYudaoLocal.run.xml'), $writerSettings)
|
||||
try { $document.Save($writer) } finally { $writer.Dispose() }
|
||||
Write-Output 'IDEA configuration prepared: ElderYudao Local (profiles: local,desktop).'
|
||||
Write-Output 'Select it in IDEA and run YudaoServerApplication. Reopen the project if the configuration has not appeared.'
|
||||
11
deploy/local/prepare-ui.ps1
Normal file
11
deploy/local/prepare-ui.ps1
Normal file
@ -0,0 +1,11 @@
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$uiPath = Join-Path $repoPath 'yudao-ui-admin-vue3'
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $uiPath 'package.json'))) {
|
||||
throw 'The maintained frontend source is missing: yudao-ui-admin-vue3.'
|
||||
}
|
||||
Push-Location $uiPath
|
||||
try {
|
||||
& npm.cmd exec --yes --package=pnpm@8.6.12 -- pnpm install --frozen-lockfile --reporter=append-only
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Frontend dependency installation failed.' }
|
||||
} finally { Pop-Location }
|
||||
Write-Output 'Frontend dependencies are prepared in yudao-ui-admin-vue3. Run start-ui.ps1 or the IDEA frontend configuration.'
|
||||
15
deploy/local/secrets.example.psd1
Normal file
15
deploy/local/secrets.example.psd1
Normal file
@ -0,0 +1,15 @@
|
||||
@{
|
||||
DatabaseHost = '127.0.0.1'
|
||||
DatabasePort = 3306
|
||||
DatabaseName = 'elder_yudao_local'
|
||||
DatabaseUser = 'root'
|
||||
DatabasePassword = ''
|
||||
RedisHost = '127.0.0.1'
|
||||
RedisPort = 6379
|
||||
RedisDatabase = 15
|
||||
RedisPassword = ''
|
||||
ServerPort = 48080
|
||||
# Optional absolute paths; otherwise the programs are resolved from PATH.
|
||||
JavaExe = ''
|
||||
MySqlExe = ''
|
||||
}
|
||||
35
deploy/local/start-ui.ps1
Normal file
35
deploy/local/start-ui.ps1
Normal file
@ -0,0 +1,35 @@
|
||||
param([int]$Port = 5173, [string]$SecretsFile = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$settings = Read-LocalSettings $SecretsFile
|
||||
$existing = Get-LocalUiProcess
|
||||
if ($existing) { throw "The UI is already running with PID $($existing.ProcessId)." }
|
||||
if (Get-NetTCPConnection -State Listen -LocalPort $Port -ErrorAction SilentlyContinue) { throw "Port $Port is already in use." }
|
||||
$uiPath = Join-Path $repoPath 'yudao-ui-admin-vue3'
|
||||
$vitePath = Join-Path $uiPath 'node_modules/vite/bin/vite.js'
|
||||
if (-not (Test-Path -LiteralPath $vitePath)) { throw 'Run prepare-ui.ps1 first.' }
|
||||
$nodeExe = Resolve-LocalProgram '' 'node.exe'
|
||||
$apiOrigin = "http://127.0.0.1:$($settings.ServerPort)"
|
||||
$uiEnv = @"
|
||||
NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
VITE_PORT=$Port
|
||||
VITE_OPEN=false
|
||||
VITE_BASE_URL=$apiOrigin
|
||||
VITE_UPLOAD_TYPE=server
|
||||
VITE_UPLOAD_URL=$apiOrigin/admin-api/infra/file/upload
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
VITE_API_URL=/admin-api
|
||||
VITE_BASE_PATH=/
|
||||
VITE_DROP_DEBUGGER=false
|
||||
VITE_DROP_CONSOLE=false
|
||||
VITE_SOURCEMAP=false
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
VITE_APP_DOCALERT_ENABLE=false
|
||||
VITE_APP_BAIDU_CODE=
|
||||
"@
|
||||
[System.IO.File]::WriteAllText((Join-Path $uiPath '.env.desktop'), $uiEnv, (New-Object System.Text.UTF8Encoding($false)))
|
||||
$ui = Start-Process -FilePath $nodeExe -ArgumentList @(('"' + $vitePath + '"'), '--mode', 'desktop', '--host', '127.0.0.1', '--port', [string]$Port, '--strictPort') `
|
||||
-WorkingDirectory $uiPath -WindowStyle Hidden -PassThru `
|
||||
-RedirectStandardOutput (Join-Path $runtimePath 'ui-stdout.log') -RedirectStandardError (Join-Path $runtimePath 'ui-stderr.log')
|
||||
[System.IO.File]::WriteAllText((Join-Path $runtimePath 'ui.pid'), [string]$ui.Id)
|
||||
Write-Output "Started UI PID $($ui.Id): http://127.0.0.1:$Port"
|
||||
50
deploy/local/start.ps1
Normal file
50
deploy/local/start.ps1
Normal file
@ -0,0 +1,50 @@
|
||||
param([switch]$Build, [string]$SecretsFile = (Join-Path $PSScriptRoot 'secrets.psd1'))
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$settings = Read-LocalSettings $SecretsFile
|
||||
New-Item -ItemType Directory -Path $runtimePath -Force | Out-Null
|
||||
$existing = Get-LocalServerProcess
|
||||
if ($existing) { throw "The local server is already running with PID $($existing.ProcessId)." }
|
||||
$jarPath = Join-Path $repoPath 'yudao-server/target/yudao-server.jar'
|
||||
if ($Build -or -not (Test-Path -LiteralPath $jarPath)) {
|
||||
Push-Location $repoPath
|
||||
try {
|
||||
& mvn -B -ntp -pl yudao-server -am package -DskipTests
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Maven build failed.' }
|
||||
} finally { Pop-Location }
|
||||
}
|
||||
$listener = Get-NetTCPConnection -State Listen -LocalPort $settings.ServerPort -ErrorAction SilentlyContinue
|
||||
if ($listener) { throw "Port $($settings.ServerPort) is already in use. Set a different ServerPort in secrets.psd1." }
|
||||
Invoke-LocalMySql $settings 'SELECT 1 FROM system_users LIMIT 1;' $settings.DatabaseName | Out-Null
|
||||
$javaExe = Resolve-LocalProgram $settings.JavaExe 'java.exe'
|
||||
$environment = @{
|
||||
ELDER_DB_HOST = [string]$settings.DatabaseHost
|
||||
ELDER_DB_PORT = [string]$settings.DatabasePort
|
||||
ELDER_DB_NAME = [string]$settings.DatabaseName
|
||||
ELDER_DB_USER = [string]$settings.DatabaseUser
|
||||
ELDER_DB_PASSWORD = [string]$settings.DatabasePassword
|
||||
ELDER_REDIS_HOST = [string]$settings.RedisHost
|
||||
ELDER_REDIS_PORT = [string]$settings.RedisPort
|
||||
ELDER_REDIS_DATABASE = [string]$settings.RedisDatabase
|
||||
SPRING_REDIS_PASSWORD = $(if ($settings.RedisPassword) { [string]$settings.RedisPassword } else { $null })
|
||||
ELDER_SERVER_PORT = [string]$settings.ServerPort
|
||||
ELDER_LOG_FILE = Join-Path $runtimePath 'application.log'
|
||||
}
|
||||
$previousEnvironment = @{}
|
||||
try {
|
||||
foreach ($key in $environment.Keys) {
|
||||
$previousEnvironment[$key] = [Environment]::GetEnvironmentVariable($key, 'Process')
|
||||
if ($null -eq $environment[$key]) { Remove-Item -LiteralPath "Env:\$key" -ErrorAction SilentlyContinue }
|
||||
else { [Environment]::SetEnvironmentVariable($key, $environment[$key], 'Process') }
|
||||
}
|
||||
$server = Start-Process -FilePath $javaExe -ArgumentList @('-Xms256m', '-Xmx1024m', '-Dfile.encoding=UTF-8', '-jar', ('"' + $jarPath + '"'), '--spring.profiles.active=local,desktop') `
|
||||
-WorkingDirectory $repoPath -WindowStyle Hidden -PassThru `
|
||||
-RedirectStandardOutput (Join-Path $runtimePath 'stdout.log') -RedirectStandardError (Join-Path $runtimePath 'stderr.log')
|
||||
} finally {
|
||||
foreach ($key in $previousEnvironment.Keys) {
|
||||
if ($null -eq $previousEnvironment[$key]) { Remove-Item -LiteralPath "Env:\$key" -ErrorAction SilentlyContinue }
|
||||
else { [Environment]::SetEnvironmentVariable($key, $previousEnvironment[$key], 'Process') }
|
||||
}
|
||||
}
|
||||
[System.IO.File]::WriteAllText((Join-Path $runtimePath 'server.pid'), [string]$server.Id)
|
||||
Write-Output "Started PID $($server.Id). API docs: http://127.0.0.1:$($settings.ServerPort)/doc.html"
|
||||
Write-Output "Check health at http://127.0.0.1:$($settings.ServerPort)/actuator/health and logs in $runtimePath."
|
||||
8
deploy/local/stop-ui.ps1
Normal file
8
deploy/local/stop-ui.ps1
Normal file
@ -0,0 +1,8 @@
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$ui = Get-LocalUiProcess
|
||||
if ($ui) {
|
||||
Stop-Process -Id $ui.ProcessId
|
||||
Write-Output "Stopped local UI PID $($ui.ProcessId)."
|
||||
} else { Write-Output 'The local UI is not running.' }
|
||||
$pidFile = Join-Path $runtimePath 'ui.pid'
|
||||
if (Test-Path -LiteralPath $pidFile) { Remove-Item -LiteralPath $pidFile }
|
||||
10
deploy/local/stop.ps1
Normal file
10
deploy/local/stop.ps1
Normal file
@ -0,0 +1,10 @@
|
||||
. (Join-Path $PSScriptRoot 'common.ps1')
|
||||
$server = Get-LocalServerProcess
|
||||
if ($server) {
|
||||
Stop-Process -Id $server.ProcessId
|
||||
Write-Output "Stopped local server PID $($server.ProcessId)."
|
||||
} else {
|
||||
Write-Output 'The local server is not running.'
|
||||
}
|
||||
$pidFile = Join-Path $runtimePath 'server.pid'
|
||||
if (Test-Path -LiteralPath $pidFile) { Remove-Item -LiteralPath $pidFile }
|
||||
@ -1,5 +1,8 @@
|
||||
# 项目文档
|
||||
|
||||
- [管理端界面定制](管理端界面定制.md):Olive 视觉参考、前端源码目录、产品配置、菜单处理与验证结果。
|
||||
|
||||
- [系统管理后台本地部署](系统管理后台本地部署.md):系统管理后台的访问地址、环境、初始化与启动脚本、管理界面来源以及验证结果。
|
||||
- [芋道框架迁移上下文](芋道框架迁移上下文.md):旧老年健康系统的技术栈、业务模块、数据结构、接口、评分与推荐规则,以及迁移到芋道的建议和已知缺口。
|
||||
|
||||
该文档是 2026-10-05 对旧系统的分析快照。有关目标框架和实施方案的历史假设,应结合当前项目代码及后续确认的需求核实;文档中的任务示例不代表已经开始或完成迁移。
|
||||
|
||||
42
docs/管理端界面定制.md
Normal file
42
docs/管理端界面定制.md
Normal file
@ -0,0 +1,42 @@
|
||||
# 管理端界面定制
|
||||
|
||||
实施日期:2026-10-05。维护目录:`yudao-ui-admin-vue3/`,属于 `elder-yudao-pro` 仓库;分支 `axr`。`node_modules` 和构建产物忽略,源码、环境默认值、依赖锁和资源记录纳入版本管理。
|
||||
|
||||
## Olive 参考与本项目适配
|
||||
|
||||
参考 `projects/olive/Olive-Smart/ruoyi-vue-plus-master/ruoyi-ui` 的 `src/views/login.vue`、`src/views/index.vue`、`Sidebar/Logo.vue`、`assets/styles/variables.scss`。Olive 使用 Vue 2,本管理端使用 Vue 3,因此沿用视觉元素并在现有登录和权限流程上实现。
|
||||
|
||||
| 元素 | 本项目实现 |
|
||||
| --- | --- |
|
||||
| 科技蓝背景 | 复用 Olive 的 `loginBack.png`,作为登录和工作台欢迎区背景 |
|
||||
| 登录面板 | 深蓝半透明面板、浅蓝强调边框;手机尺寸采用单列 |
|
||||
| 导航 | 深蓝侧栏 `#0e2254`、白色顶部导航、蓝色激活项 |
|
||||
| 首页 | 管理模块与常用入口宫格,使用当前账号可访问菜单 |
|
||||
| 标识与文案 | 老年健康服务平台;使用健康心形 SVG,浏览器标题、加载页、侧栏、页脚统一 |
|
||||
| 模板推广 | 清理登录教程/咨询块、用户菜单文档入口和演示首页;关闭页面文档提示和模板外部统计 |
|
||||
| 动态菜单 | 过滤模板作者/文档外链,默认展示当前已启用的系统管理与基础设施 |
|
||||
| 默认头像与昵称 | 默认模板管理员在导航/工作台/锁屏显示“平台管理员”和健康标识,自定义账号昵称仍显示真实值 |
|
||||
|
||||
业务菜单、用户、部门、租户等数据库记录没有重命名或删除。管理数据页面仍展示后台真实数据,包括原来的演示账号和部门名称;若要清理这些演示数据,应单独执行数据迁移。后台 Java 包名、原始授权文件和来源记录保留。
|
||||
|
||||
## 后续维护入口
|
||||
|
||||
- 名称:`.env` 的 `VITE_APP_TITLE`。
|
||||
- 默认租户:`.env` 的 `VITE_APP_DEFAULT_TENANT_ID=1`。清空 ID 时显示“服务机构”输入框并按真实租户名称查询;不会通过关闭多租户绕过后台隔离。
|
||||
- 模块:`.env` 的 `VITE_APP_ENABLED_MODULES=system,infra`。后续实现老人业务时可加 `elder`;此过滤只负责展示,不替代接口鉴权。
|
||||
- 视觉资源:`src/assets/brand/`,资源说明见该目录的 `README.md`。
|
||||
- 布局主题:`src/store/modules/app.ts`、`src/styles/var.css`。主题缓存使用 `elderTheme`,避免旧模板主题覆盖新的默认配色。
|
||||
- 工作台:`src/views/Home/Index.vue`。无权限时显示空状态;不会展示尚未实现的预约、派单或摄像头功能数据。
|
||||
- IDEA:`.run/ElderYudaoFrontend.run.xml` 已指向新源码目录,启动方式保持 `ElderYudao Frontend`。
|
||||
- 启动脚本:`deploy/local/prepare-ui.ps1` 从仓库源码安装依赖,不再克隆模板;`start-ui.ps1` 从新目录启动。
|
||||
|
||||
正在运行的旧缓存进程本次同步了界面改动,方便立即查看。今后的修改只在新源码目录进行;在 IDEA 停止旧前端并重新运行 `ElderYudao Frontend` 后使用新目录。
|
||||
|
||||
## 验证记录
|
||||
|
||||
- 改动文件 ESLint 检查通过。
|
||||
- Vite 完整构建通过,产物位于 `yudao-ui-admin-vue3/dist/`。原模板存在未启用商城模块导出缺失提示,以及表单设计器依赖的 `eval` 提示;不影响当前系统管理页面构建和运行。
|
||||
- Chrome 实际连接本机后台:空密码校验、错误密码提示、正确登录、首页、用户管理(9 条记录)均通过,无页面脚本错误。
|
||||
- 首页按账号权限展示 2 个已启用模块、8 个常用入口,无作者动态/开发文档/教程广告;用户下拉菜单无文档推广入口。
|
||||
- 390 像素手机宽度下登录和首页通过,当前管理模块图标在本地打包。
|
||||
- 原始 MIT 许可与图标资源许可来源保留;前台展示未使用 Olive 的林区名称、备案号或团队标志。
|
||||
127
docs/系统管理后台本地部署.md
Normal file
127
docs/系统管理后台本地部署.md
Normal file
@ -0,0 +1,127 @@
|
||||
# 系统管理后台本地部署
|
||||
|
||||
实施日期:2026-10-05。项目目录:`C:\Users\Administrator\Desktop\projects\elder-yudao-pro`,分支:`axr`。
|
||||
|
||||
本阶段运行现有芋道系统管理后台,包括用户、角色、菜单、部门、字典等功能。服务由 `yudao-server` 承载,依赖已启用的 `yudao-module-system` 和 `yudao-module-infra`;其他业务模块暂未启用,老年健康业务尚未迁移。本次部署在本机运行。
|
||||
|
||||
## 当前访问方式
|
||||
|
||||
| 内容 | 地址或配置 |
|
||||
| --- | --- |
|
||||
| Vue 3 管理界面 | http://127.0.0.1:5173 |
|
||||
| 后端接口文档 | http://127.0.0.1:48080/doc.html |
|
||||
| 健康检查 | http://127.0.0.1:48080/actuator/health |
|
||||
| 登录租户 | 管理端默认使用 `tenant-id: 1`,无需填写原模板租户名 |
|
||||
| 初始化管理员 | `admin` / `admin123` |
|
||||
| MySQL 独立数据库 | `elder_yudao_local`,`127.0.0.1:3306` |
|
||||
| Redis | `127.0.0.1:6379`,15 号库 |
|
||||
|
||||
前后端只监听 `127.0.0.1`。启动的是本地开发环境,验证码关闭、模拟登录关闭、Quartz 暂停,Actuator 只开放 `health` 和 `info`,Druid 控制台关闭。
|
||||
|
||||
## 环境与本次修复
|
||||
|
||||
- 本机使用 Java 11.0.12、Maven 3.9.12、MySQL 8.0.44 和现有 Redis 服务。源码目标版本仍为 Java 8,Spring Boot 仍为 2.7.18。
|
||||
- 补回根目录 `lombok.config`。模板调用链式 setter,需要 `lombok.accessors.chain=true`;缺失时 `ApiAccessLogFilter` 等源码无法编译。
|
||||
- 新增 `application-desktop.yaml`,叠加在 `local` 配置之后。数据库连接、日志路径和端口通过环境变量传入。
|
||||
- 私有连接配置位于 `deploy/local/secrets.psd1`,已加入 Git 忽略规则。当前使用本机已有的数据库连接信息,不在本文记录数据库密码。
|
||||
- 初始化脚本只允许 `elder_yudao_*` 独立库,且拒绝向非空库重复导入。种子文件为 `mysql_script/ruoyi-vue-pro.sql`,已导入 61 张表,默认文件存储改为数据库存储。
|
||||
|
||||
现有 MySQL 服务内其他数据库和 Redis 0 号库未清空或导入数据。
|
||||
|
||||
## 后续启动与停止
|
||||
|
||||
在项目根目录打开 PowerShell。
|
||||
|
||||
启动后端、检查登录和基础接口、启动界面:
|
||||
|
||||
```powershell
|
||||
.\deploy\local\start.ps1
|
||||
.\deploy\local\check.ps1
|
||||
.\deploy\local\start-ui.ps1
|
||||
```
|
||||
|
||||
后端启动通常需要约 30 秒。健康检查返回 `UP` 后访问管理界面。若刚修改后端源码或配置,先停止服务,再重新构建启动:
|
||||
|
||||
```powershell
|
||||
.\deploy\local\stop.ps1
|
||||
.\deploy\local\start.ps1 -Build
|
||||
```
|
||||
|
||||
分别停止界面和后端:
|
||||
|
||||
```powershell
|
||||
.\deploy\local\stop-ui.ps1
|
||||
.\deploy\local\stop.ps1
|
||||
```
|
||||
|
||||
脚本通过记录的 PID 和对应程序路径核对进程,避免停止其他 Java 或 Node 项目。它们启动隐藏的后台进程,不修改系统服务。
|
||||
|
||||
日志和 PID 位于 `deploy/local/.runtime/`,已加入 Git 忽略规则:
|
||||
|
||||
- `application.log`、`stdout.log`、`stderr.log`:后端日志。
|
||||
- `ui-stdout.log`、`ui-stderr.log`:界面日志。
|
||||
- `server.pid`、`ui.pid`:运行中的进程编号。
|
||||
- `ui-src/`:历史管理界面缓存;当前维护和启动目录为仓库根目录的 `yudao-ui-admin-vue3/`。
|
||||
|
||||
## 在另一台电脑初始化
|
||||
|
||||
先安装 Java 8/11、Maven、MySQL 8、Redis,以及 Node.js(界面依赖要求 Node 18+,本机验证为 Node 24.12.0)。启动 MySQL 和 Redis。
|
||||
|
||||
```powershell
|
||||
Copy-Item .\deploy\local\secrets.example.psd1 .\deploy\local\secrets.psd1
|
||||
```
|
||||
|
||||
编辑 `secrets.psd1`,填写数据库密码;如程序不在 PATH 中,可填写 `JavaExe`、`MySqlExe`。确认数据库名为新建独立库、Redis 库编号没有被其他项目使用。
|
||||
|
||||
以下初始化命令仅在首次运行时执行。已有表时脚本会停止,不会覆盖:
|
||||
|
||||
```powershell
|
||||
.\deploy\local\initialize.ps1
|
||||
.\deploy\local\start.ps1 -Build
|
||||
.\deploy\local\prepare-ui.ps1
|
||||
.\deploy\local\start-ui.ps1
|
||||
```
|
||||
|
||||
`check.ps1` 使用种子管理员密码做检查;修改管理员密码后,应相应调整检查方式。
|
||||
|
||||
## 在 IDEA 中运行后端
|
||||
|
||||
在项目根目录的 PowerShell 终端执行:
|
||||
|
||||
```powershell
|
||||
.\deploy\local\prepare-idea.ps1
|
||||
```
|
||||
|
||||
在 IDEA 右上角选择 `ElderYudao Local` 运行配置,点击运行;若没有出现,重新打开 `elder-yudao-pro` 项目。启动类为 `cn.iocoder.yudao.server.YudaoServerApplication`,模块为 `yudao-server`,激活环境为 `local,desktop`。
|
||||
|
||||
该脚本从 `secrets.psd1` 读取本地连接参数,生成 `.run/ElderYudaoLocal.run.xml`。此文件包含数据库密码,已加入 Git 忽略规则。修改连接参数后重新执行脚本即可。脚本只生成配置,不启动进程。
|
||||
|
||||
也可以继续使用原来的 `YudaoServerApplication` 运行配置。`application.yaml` 默认激活 `local`;`application-local.yaml` 的主数据库已改为 `elder_yudao_local`,从数据库名称跟随主库。此方式使用 `application-local.yaml` 中的连接账号与密码,本机当前配置已验证能读取该库的租户表。
|
||||
|
||||
`ElderYudao Local` 启动项仍使用 `local,desktop`,通过私有运行配置传入连接参数,同时应用仅监听本机、使用 Redis 15 号库等部署设置。若手动启用 `desktop`,需要设置环境变量 `ELDER_DB_PASSWORD`,其值为 `secrets.psd1` 中的 `DatabasePassword`。
|
||||
|
||||
若日志出现 `Table 'ruoyi-vue-pro.system_tenant' doesn't exist` 或 `Table 'ruoyi-vue-pro.infra_api_error_log' doesn't exist`,说明当前进程仍指向模板原来的数据库。停止后端,在 IDEA 重新构建并启动,再刷新前端;实际应连接已初始化的 `elder_yudao_local`。不要为这两张表单独生成 DDL,系统需要的是完整的初始化数据。
|
||||
|
||||
## 在 IDEA 中运行前端
|
||||
|
||||
项目内已保存 `.run/ElderYudaoFrontend.run.xml`。在 IDEA 顶部运行配置列表选择 `ElderYudao Frontend`,点击运行按钮即可启动前端;点击停止按钮结束它。页面地址为 http://127.0.0.1:5173 。如果运行配置暂未出现,重新打开项目。
|
||||
|
||||
该配置使用 Node.js 运行 Vite,工作目录和脚本位置均相对于项目根目录,参数为 `--mode desktop --host 127.0.0.1 --port 5173 --strictPort`,与已验证的终端启动命令一致。Node.js 当前路径为 `E:/BiSh/NodeJS/node.exe`;换电脑后,可在 Edit Configurations 中选择对应的 Node interpreter。前端源码与 `.env.desktop` 已在 `yudao-ui-admin-vue3/` 中;若尚未准备依赖,先执行 `prepare-ui.ps1`。
|
||||
|
||||
前端运行日志会显示在 IDEA 的 Run 窗口中。正常登录还需要后端 `ElderYudao Local` 同时运行。
|
||||
|
||||
## 管理界面来源与依赖固定
|
||||
|
||||
此后端仓库原本没有管理界面源码。本次使用 [yudao-ui-admin-vue3](https://github.com/yudaocode/yudao-ui-admin-vue3/tree/v2.0.1) 的 `v2.0.1` 标签,对应提交 `6f38676af78349a79b5428bca082ea0d8b4f3142`。源码现已纳入 `yudao-ui-admin-vue3/`,并参考 Olive 管理端完成界面定制。`prepare-ui.ps1` 使用 `pnpm 8.6.12` 和该目录的 `pnpm-lock.yaml` 安装固定依赖,不再克隆或覆盖源码。
|
||||
|
||||
SWC 固定为 `1.4.14`。未固定时,旧版前端依赖解析到了 `1.16.13`,在本机触发 `ERR_SWC_NATIVE_CACHE`,导致 Vite 无法启动;固定后界面验证通过。前端 `.env.desktop` 已提供默认本机配置,`start-ui.ps1` 也可按部署配置生成,调用本机的 `/admin-api`,关闭验证码和外部统计。
|
||||
|
||||
这是 Vite 开发服务,用于当前本地验证;生产服务器、域名、HTTPS 和持续运行服务尚未部署。界面源码现已作为 `yudao-ui-admin-vue3/` 纳入版本管理,后续页面迁移在该目录进行。参考 [管理端界面定制](管理端界面定制.md)。
|
||||
|
||||
## 已验证结果
|
||||
|
||||
- Maven 构建:24 个参与构建的模块全部成功;打包时跳过现有单元测试,未声称执行完整测试套件。
|
||||
- MySQL 初始化:61 张表,租户 1 的管理员存在;重复初始化会拒绝非空库。
|
||||
- 健康检查:`UP`;接口文档:HTTP 200。
|
||||
- 登录、权限信息、用户分页、退出接口:业务状态码均为 0,用户分页返回 9 条记录。
|
||||
- 浏览器:登录后进入 `/index`,打开 `/system/user` 显示用户管理页面和 9 行数据,无页面脚本错误、无接口 HTTP 错误。
|
||||
4
lombok.config
Normal file
4
lombok.config
Normal file
@ -0,0 +1,4 @@
|
||||
config.stopBubbling = true
|
||||
lombok.tostring.callsuper=CALL
|
||||
lombok.equalsandhashcode.callsuper=CALL
|
||||
lombok.accessors.chain=true
|
||||
@ -47,7 +47,7 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
name: ruoyi-vue-pro
|
||||
name: elder_yudao_local
|
||||
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例
|
||||
@ -55,13 +55,13 @@ spring:
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例
|
||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
password: 200916
|
||||
# username: sa
|
||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
# password: SYSDBA # DM 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
name: ruoyi-vue-pro
|
||||
name: ${spring.datasource.dynamic.datasource.master.name}
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
||||
|
||||
12
yudao-ui-admin-vue3/.editorconfig
Normal file
12
yudao-ui-admin-vue3/.editorconfig
Normal file
@ -0,0 +1,12 @@
|
||||
root = true
|
||||
[*.{js,ts,vue}]
|
||||
charset = utf-8 # 设置文件字符集为 utf-8
|
||||
end_of_line = lf # 控制换行类型(lf | cr | crlf)
|
||||
insert_final_newline = true # 始终在文件末尾插入一个新行
|
||||
indent_style = space # 缩进风格(tab | space)
|
||||
indent_size = 2 # 缩进大小
|
||||
max_line_length = 100 # 最大行长度
|
||||
|
||||
[*.md] # 仅 md 文件适用以下规则
|
||||
max_line_length = off # 关闭最大行长度限制
|
||||
trim_trailing_whitespace = false # 关闭末尾空格修剪
|
||||
27
yudao-ui-admin-vue3/.env
Normal file
27
yudao-ui-admin-vue3/.env
Normal file
@ -0,0 +1,27 @@
|
||||
# 标题
|
||||
VITE_APP_TITLE=老年健康服务平台
|
||||
|
||||
# 项目本地运行端口号
|
||||
VITE_PORT=5173
|
||||
|
||||
# open 运行 npm run dev 时自动打开浏览器
|
||||
VITE_OPEN=false
|
||||
|
||||
# 租户开关
|
||||
VITE_APP_TENANT_ENABLE=true
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
# 文档地址的开关
|
||||
VITE_APP_DOCALERT_ENABLE=false
|
||||
|
||||
# 百度统计
|
||||
VITE_APP_BAIDU_CODE=
|
||||
|
||||
# Single-tenant management login. Leave ID empty to show the organization field.
|
||||
VITE_APP_DEFAULT_TENANT_ID=1
|
||||
VITE_APP_DEFAULT_TENANT_NAME=
|
||||
|
||||
# Only modules currently enabled by the backend. Add elder when it is implemented.
|
||||
VITE_APP_ENABLED_MODULES=system,infra
|
||||
16
yudao-ui-admin-vue3/.env.desktop
Normal file
16
yudao-ui-admin-vue3/.env.desktop
Normal file
@ -0,0 +1,16 @@
|
||||
NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
VITE_PORT=5173
|
||||
VITE_OPEN=false
|
||||
VITE_BASE_URL=http://127.0.0.1:48080
|
||||
VITE_UPLOAD_TYPE=server
|
||||
VITE_UPLOAD_URL=http://127.0.0.1:48080/admin-api/infra/file/upload
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
VITE_API_URL=/admin-api
|
||||
VITE_BASE_PATH=/
|
||||
VITE_DROP_DEBUGGER=false
|
||||
VITE_DROP_CONSOLE=false
|
||||
VITE_SOURCEMAP=false
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
VITE_APP_DOCALERT_ENABLE=false
|
||||
VITE_APP_BAIDU_CODE=
|
||||
40
yudao-ui-admin-vue3/.env.dev
Normal file
40
yudao-ui-admin-vue3/.env.dev
Normal file
@ -0,0 +1,40 @@
|
||||
# 开发环境:本地只启动前端项目,依赖开发环境(后端、APP)
|
||||
NODE_ENV=development
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL=http://127.0.0.1:48080
|
||||
# VITE_BASE_URL='http://dofast.demo.huizhizao.vip:20001'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL=http://127.0.0.1:48080/admin-api/infra/file/upload
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN=
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
36
yudao-ui-admin-vue3/.env.prod
Normal file
36
yudao-ui-admin-vue3/.env.prod
Normal file
@ -0,0 +1,36 @@
|
||||
# 生产环境:只在打包时使用
|
||||
NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-prod
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN=
|
||||
36
yudao-ui-admin-vue3/.env.stage
Normal file
36
yudao-ui-admin-vue3/.env.stage
Normal file
@ -0,0 +1,36 @@
|
||||
# 预发布环境:只在打包时使用
|
||||
NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL=http://127.0.0.1:48080
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL=http://127.0.0.1:48080/admin-api/infra/file/upload
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-stage
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN=
|
||||
36
yudao-ui-admin-vue3/.env.test
Normal file
36
yudao-ui-admin-vue3/.env.test
Normal file
@ -0,0 +1,36 @@
|
||||
# 测试环境:只在打包时使用
|
||||
NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL=http://127.0.0.1:48080
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL=http://127.0.0.1:48080/admin-api/infra/file/upload
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/admin-ui-vue3/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-test
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN=
|
||||
8
yudao-ui-admin-vue3/.eslintignore
Normal file
8
yudao-ui-admin-vue3/.eslintignore
Normal file
@ -0,0 +1,8 @@
|
||||
/build/
|
||||
/config/
|
||||
/dist/
|
||||
/*.js
|
||||
/test/unit/coverage/
|
||||
/node_modules/*
|
||||
/dist*
|
||||
/src/main.ts
|
||||
259
yudao-ui-admin-vue3/.eslintrc-auto-import.json
Normal file
259
yudao-ui-admin-vue3/.eslintrc-auto-import.json
Normal file
@ -0,0 +1,259 @@
|
||||
{
|
||||
"globals": {
|
||||
"EffectScope": true,
|
||||
"ElMessage": true,
|
||||
"ElMessageBox": true,
|
||||
"ElTag": true,
|
||||
"asyncComputed": true,
|
||||
"autoResetRef": true,
|
||||
"computed": true,
|
||||
"computedAsync": true,
|
||||
"computedEager": true,
|
||||
"computedInject": true,
|
||||
"computedWithControl": true,
|
||||
"controlledComputed": true,
|
||||
"controlledRef": true,
|
||||
"createApp": true,
|
||||
"createEventHook": true,
|
||||
"createGlobalState": true,
|
||||
"createInjectionState": true,
|
||||
"createReactiveFn": true,
|
||||
"createSharedComposable": true,
|
||||
"createUnrefFn": true,
|
||||
"customRef": true,
|
||||
"debouncedRef": true,
|
||||
"debouncedWatch": true,
|
||||
"defineAsyncComponent": true,
|
||||
"defineComponent": true,
|
||||
"eagerComputed": true,
|
||||
"effectScope": true,
|
||||
"extendRef": true,
|
||||
"getCurrentInstance": true,
|
||||
"getCurrentScope": true,
|
||||
"h": true,
|
||||
"ignorableWatch": true,
|
||||
"inject": true,
|
||||
"isDefined": true,
|
||||
"isProxy": true,
|
||||
"isReactive": true,
|
||||
"isReadonly": true,
|
||||
"isRef": true,
|
||||
"makeDestructurable": true,
|
||||
"markRaw": true,
|
||||
"nextTick": true,
|
||||
"onActivated": true,
|
||||
"onBeforeMount": true,
|
||||
"onBeforeUnmount": true,
|
||||
"onBeforeUpdate": true,
|
||||
"onClickOutside": true,
|
||||
"onDeactivated": true,
|
||||
"onErrorCaptured": true,
|
||||
"onKeyStroke": true,
|
||||
"onLongPress": true,
|
||||
"onMounted": true,
|
||||
"onRenderTracked": true,
|
||||
"onRenderTriggered": true,
|
||||
"onScopeDispose": true,
|
||||
"onServerPrefetch": true,
|
||||
"onStartTyping": true,
|
||||
"onUnmounted": true,
|
||||
"onUpdated": true,
|
||||
"pausableWatch": true,
|
||||
"provide": true,
|
||||
"reactify": true,
|
||||
"reactifyObject": true,
|
||||
"reactive": true,
|
||||
"reactiveComputed": true,
|
||||
"reactiveOmit": true,
|
||||
"reactivePick": true,
|
||||
"readonly": true,
|
||||
"ref": true,
|
||||
"refAutoReset": true,
|
||||
"refDebounced": true,
|
||||
"refDefault": true,
|
||||
"refThrottled": true,
|
||||
"refWithControl": true,
|
||||
"resolveComponent": true,
|
||||
"resolveRef": true,
|
||||
"resolveUnref": true,
|
||||
"shallowReactive": true,
|
||||
"shallowReadonly": true,
|
||||
"shallowRef": true,
|
||||
"syncRef": true,
|
||||
"syncRefs": true,
|
||||
"templateRef": true,
|
||||
"throttledRef": true,
|
||||
"throttledWatch": true,
|
||||
"toRaw": true,
|
||||
"toReactive": true,
|
||||
"toRef": true,
|
||||
"toRefs": true,
|
||||
"triggerRef": true,
|
||||
"tryOnBeforeMount": true,
|
||||
"tryOnBeforeUnmount": true,
|
||||
"tryOnMounted": true,
|
||||
"tryOnScopeDispose": true,
|
||||
"tryOnUnmounted": true,
|
||||
"unref": true,
|
||||
"unrefElement": true,
|
||||
"until": true,
|
||||
"useActiveElement": true,
|
||||
"useArrayEvery": true,
|
||||
"useArrayFilter": true,
|
||||
"useArrayFind": true,
|
||||
"useArrayFindIndex": true,
|
||||
"useArrayJoin": true,
|
||||
"useArrayMap": true,
|
||||
"useArrayReduce": true,
|
||||
"useArraySome": true,
|
||||
"useAsyncQueue": true,
|
||||
"useAsyncState": true,
|
||||
"useAttrs": true,
|
||||
"useBase64": true,
|
||||
"useBattery": true,
|
||||
"useBluetooth": true,
|
||||
"useBreakpoints": true,
|
||||
"useBroadcastChannel": true,
|
||||
"useBrowserLocation": true,
|
||||
"useCached": true,
|
||||
"useClipboard": true,
|
||||
"useColorMode": true,
|
||||
"useConfirmDialog": true,
|
||||
"useCounter": true,
|
||||
"useCssModule": true,
|
||||
"useCssVar": true,
|
||||
"useCssVars": true,
|
||||
"useCurrentElement": true,
|
||||
"useCycleList": true,
|
||||
"useDark": true,
|
||||
"useDateFormat": true,
|
||||
"useDebounce": true,
|
||||
"useDebounceFn": true,
|
||||
"useDebouncedRefHistory": true,
|
||||
"useDeviceMotion": true,
|
||||
"useDeviceOrientation": true,
|
||||
"useDevicePixelRatio": true,
|
||||
"useDevicesList": true,
|
||||
"useDisplayMedia": true,
|
||||
"useDocumentVisibility": true,
|
||||
"useDraggable": true,
|
||||
"useDropZone": true,
|
||||
"useElementBounding": true,
|
||||
"useElementByPoint": true,
|
||||
"useElementHover": true,
|
||||
"useElementSize": true,
|
||||
"useElementVisibility": true,
|
||||
"useEventBus": true,
|
||||
"useEventListener": true,
|
||||
"useEventSource": true,
|
||||
"useEyeDropper": true,
|
||||
"useFavicon": true,
|
||||
"useFetch": true,
|
||||
"useFileDialog": true,
|
||||
"useFileSystemAccess": true,
|
||||
"useFocus": true,
|
||||
"useFocusWithin": true,
|
||||
"useFps": true,
|
||||
"useFullscreen": true,
|
||||
"useGamepad": true,
|
||||
"useGeolocation": true,
|
||||
"useIdle": true,
|
||||
"useImage": true,
|
||||
"useInfiniteScroll": true,
|
||||
"useIntersectionObserver": true,
|
||||
"useInterval": true,
|
||||
"useIntervalFn": true,
|
||||
"useKeyModifier": true,
|
||||
"useLastChanged": true,
|
||||
"useLocalStorage": true,
|
||||
"useMagicKeys": true,
|
||||
"useManualRefHistory": true,
|
||||
"useMediaControls": true,
|
||||
"useMediaQuery": true,
|
||||
"useMemoize": true,
|
||||
"useMemory": true,
|
||||
"useMounted": true,
|
||||
"useMouse": true,
|
||||
"useMouseInElement": true,
|
||||
"useMousePressed": true,
|
||||
"useMutationObserver": true,
|
||||
"useNavigatorLanguage": true,
|
||||
"useNetwork": true,
|
||||
"useNow": true,
|
||||
"useObjectUrl": true,
|
||||
"useOffsetPagination": true,
|
||||
"useOnline": true,
|
||||
"usePageLeave": true,
|
||||
"useParallax": true,
|
||||
"usePermission": true,
|
||||
"usePointer": true,
|
||||
"usePointerSwipe": true,
|
||||
"usePreferredColorScheme": true,
|
||||
"usePreferredDark": true,
|
||||
"usePreferredLanguages": true,
|
||||
"useRafFn": true,
|
||||
"useRefHistory": true,
|
||||
"useResizeObserver": true,
|
||||
"useRoute": true,
|
||||
"useRouter": true,
|
||||
"useScreenOrientation": true,
|
||||
"useScreenSafeArea": true,
|
||||
"useScriptTag": true,
|
||||
"useScroll": true,
|
||||
"useScrollLock": true,
|
||||
"useSessionStorage": true,
|
||||
"useShare": true,
|
||||
"useSlots": true,
|
||||
"useSpeechRecognition": true,
|
||||
"useSpeechSynthesis": true,
|
||||
"useStepper": true,
|
||||
"useStorage": true,
|
||||
"useStorageAsync": true,
|
||||
"useStyleTag": true,
|
||||
"useSupported": true,
|
||||
"useSwipe": true,
|
||||
"useTemplateRefsList": true,
|
||||
"useTextDirection": true,
|
||||
"useTextSelection": true,
|
||||
"useTextareaAutosize": true,
|
||||
"useThrottle": true,
|
||||
"useThrottleFn": true,
|
||||
"useThrottledRefHistory": true,
|
||||
"useTimeAgo": true,
|
||||
"useTimeout": true,
|
||||
"useTimeoutFn": true,
|
||||
"useTimeoutPoll": true,
|
||||
"useTimestamp": true,
|
||||
"useTitle": true,
|
||||
"useToggle": true,
|
||||
"useTransition": true,
|
||||
"useUrlSearchParams": true,
|
||||
"useUserMedia": true,
|
||||
"useVModel": true,
|
||||
"useVModels": true,
|
||||
"useVibrate": true,
|
||||
"useVirtualList": true,
|
||||
"useWakeLock": true,
|
||||
"useWebNotification": true,
|
||||
"useWebSocket": true,
|
||||
"useWebWorker": true,
|
||||
"useWebWorkerFn": true,
|
||||
"useWindowFocus": true,
|
||||
"useWindowScroll": true,
|
||||
"useWindowSize": true,
|
||||
"watch": true,
|
||||
"watchArray": true,
|
||||
"watchAtMost": true,
|
||||
"watchDebounced": true,
|
||||
"watchEffect": true,
|
||||
"watchIgnorable": true,
|
||||
"watchOnce": true,
|
||||
"watchPausable": true,
|
||||
"watchPostEffect": true,
|
||||
"watchSyncEffect": true,
|
||||
"watchThrottled": true,
|
||||
"watchTriggerable": true,
|
||||
"watchWithFilter": true,
|
||||
"whenever": true
|
||||
}
|
||||
}
|
||||
75
yudao-ui-admin-vue3/.eslintrc.js
Normal file
75
yudao-ui-admin-vue3/.eslintrc.js
Normal file
@ -0,0 +1,75 @@
|
||||
// @ts-check
|
||||
const { defineConfig } = require('eslint-define-config')
|
||||
module.exports = defineConfig({
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
jsxPragma: 'React',
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier',
|
||||
'plugin:prettier/recommended',
|
||||
'@unocss'
|
||||
],
|
||||
rules: {
|
||||
'vue/no-setup-props-destructure': 'off',
|
||||
'vue/script-setup-uses-vars': 'error',
|
||||
'vue/no-reserved-component-names': 'off',
|
||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'vue/custom-event-name-casing': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'no-unused-vars': 'off',
|
||||
'space-before-function-paren': 'off',
|
||||
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/one-component-per-file': 'off',
|
||||
'vue/html-closing-bracket-newline': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/attribute-hyphenation': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/require-explicit-emits': 'off',
|
||||
'vue/require-toggle-inside-transition': 'off',
|
||||
'vue/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
html: {
|
||||
void: 'always',
|
||||
normal: 'never',
|
||||
component: 'always'
|
||||
},
|
||||
svg: 'always',
|
||||
math: 'always'
|
||||
}
|
||||
],
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-v-html': 'off',
|
||||
'prettier/prettier': 'off', // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件
|
||||
'@unocss/order': 'off', // 芋艿:禁用 unocss 【css】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
|
||||
'@unocss/order-attributify': 'off' // 芋艿:禁用 unocss 【属性】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
|
||||
}
|
||||
})
|
||||
13
yudao-ui-admin-vue3/.gitignore
vendored
Normal file
13
yudao-ui-admin-vue3/.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
/dist*
|
||||
*-lock.*
|
||||
!pnpm-lock.yaml
|
||||
pnpm-debug
|
||||
auto-*.d.ts
|
||||
.idea
|
||||
.history
|
||||
.image/
|
||||
11
yudao-ui-admin-vue3/.prettierignore
Normal file
11
yudao-ui-admin-vue3/.prettierignore
Normal file
@ -0,0 +1,11 @@
|
||||
/node_modules/**
|
||||
/dist/
|
||||
/dist*
|
||||
/public/*
|
||||
/docs/*
|
||||
/vite.config.ts
|
||||
/src/types/env.d.ts
|
||||
/src/types/auto-components.d.ts
|
||||
/src/types/auto-imports.d.ts
|
||||
/docs/**/*
|
||||
CHANGELOG
|
||||
6
yudao-ui-admin-vue3/.stylelintignore
Normal file
6
yudao-ui-admin-vue3/.stylelintignore
Normal file
@ -0,0 +1,6 @@
|
||||
/dist/*
|
||||
/public/*
|
||||
public/*
|
||||
/dist*
|
||||
/src/types/env.d.ts
|
||||
/docs/**/*
|
||||
21
yudao-ui-admin-vue3/LICENSE
Normal file
21
yudao-ui-admin-vue3/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Archer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
32
yudao-ui-admin-vue3/README.md
Normal file
32
yudao-ui-admin-vue3/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# 老年健康服务平台管理端
|
||||
|
||||
此目录是纳入项目版本管理的 Vue 3 管理端源码。日常修改在这里进行,`deploy/local/.runtime/ui-src` 仅保留旧运行缓存。
|
||||
|
||||
## 启动
|
||||
|
||||
在项目根目录执行 `deploy/local/prepare-ui.ps1` 安装固定依赖,随后在 IDEA 选择 `ElderYudao Frontend`;或进入本目录执行:
|
||||
|
||||
```powershell
|
||||
node .\node_modules\vite\bin\vite.js --mode desktop --host 127.0.0.1 --port 5173 --strictPort
|
||||
```
|
||||
|
||||
访问 http://127.0.0.1:5173 ,后台需要监听 48080。初始账号 `admin`,初始密码 `admin123`;密码输入框不再预填演示密码。
|
||||
|
||||
## 配置与页面
|
||||
|
||||
- `.env`:平台名称、默认租户 ID、当前启用模块;本机默认租户 1。清空 `VITE_APP_DEFAULT_TENANT_ID` 后登录页显示“服务机构”输入框,用真实租户名称查询。前端菜单过滤仅负责展示,接口权限仍由后台校验。
|
||||
- `.env.desktop`:本地端口、后台地址、上传地址和验证码开关。可直接运行,`start-ui.ps1` 也会按本地部署配置生成该文件。
|
||||
- `src/config/product.ts`:产品菜单及默认账号展示策略。默认只启用 `system,infra`;业务迁移后通过 `VITE_APP_ENABLED_MODULES` 扩展,不必改页面。
|
||||
- `src/views/Login/Login.vue`、`components/LoginForm.vue`:参考 Olive 的深蓝背景与登录面板,使用本项目名称和健康服务标识。
|
||||
- `src/views/Home/Index.vue`:参考 Olive 宫格布局,入口来源于当前账号实际菜单,不使用演示统计数据。
|
||||
- `src/assets/brand/`:背景、标识、离线图标与资源来源记录。
|
||||
|
||||
## 构建
|
||||
|
||||
```powershell
|
||||
node --max_old_space_size=8192 .\node_modules\vite\bin\vite.js build --mode desktop
|
||||
```
|
||||
|
||||
输出 `dist/`。此命令用于本地验证;生产使用 `.env.prod` 配置部署地址,然后执行 `pnpm build:prod`。修改 Vite 环境文件后需要重启前端。
|
||||
|
||||
本目录基于 `yudaocode/yudao-ui-admin-vue3` 的 `v2.0.1`,原始提交 `6f38676af78349a79b5428bca082ea0d8b4f3142`。固定 `pnpm 8.6.12`,保留 `pnpm-lock.yaml` 与 SWC `1.4.14` 覆盖项。原始 MIT 许可保存在 `LICENSE`;源码中的模块名称与技术来源记录继续保留。
|
||||
100
yudao-ui-admin-vue3/build/vite/index.ts
Normal file
100
yudao-ui-admin-vue3/build/vite/index.ts
Normal file
@ -0,0 +1,100 @@
|
||||
import { resolve } from 'path'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import VueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import progress from 'vite-plugin-progress'
|
||||
import EslintPlugin from 'vite-plugin-eslint'
|
||||
import PurgeIcons from 'vite-plugin-purge-icons'
|
||||
import { ViteEjsPlugin } from 'vite-plugin-ejs'
|
||||
// @ts-ignore
|
||||
import ElementPlus from 'unplugin-element-plus/vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
import topLevelAwait from 'vite-plugin-top-level-await'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
|
||||
export function createVitePlugins() {
|
||||
const root = process.cwd()
|
||||
|
||||
// 路径查找
|
||||
function pathResolve(dir: string) {
|
||||
return resolve(root, '.', dir)
|
||||
}
|
||||
|
||||
return [
|
||||
Vue(),
|
||||
VueJsx(),
|
||||
UnoCSS(),
|
||||
progress(),
|
||||
PurgeIcons(),
|
||||
ElementPlus({}),
|
||||
AutoImport({
|
||||
include: [
|
||||
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
||||
/\.vue$/,
|
||||
/\.vue\?vue/, // .vue
|
||||
/\.md$/ // .md
|
||||
],
|
||||
imports: [
|
||||
'vue',
|
||||
'vue-router',
|
||||
// 可额外添加需要 autoImport 的组件
|
||||
{
|
||||
'@/hooks/web/useI18n': ['useI18n'],
|
||||
'@/hooks/web/useMessage': ['useMessage'],
|
||||
'@/hooks/web/useTable': ['useTable'],
|
||||
'@/hooks/web/useCrudSchemas': ['useCrudSchemas'],
|
||||
'@/utils/formRules': ['required'],
|
||||
'@/utils/dict': ['DICT_TYPE']
|
||||
}
|
||||
],
|
||||
dts: 'src/types/auto-imports.d.ts',
|
||||
resolvers: [ElementPlusResolver()],
|
||||
eslintrc: {
|
||||
enabled: false, // Default `false`
|
||||
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
|
||||
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
|
||||
}
|
||||
}),
|
||||
Components({
|
||||
// 生成自定义 `auto-components.d.ts` 全局声明
|
||||
dts: 'src/types/auto-components.d.ts',
|
||||
// 自定义组件的解析器
|
||||
resolvers: [ElementPlusResolver()],
|
||||
globs: ["src/components/**/**.{vue, md}", '!src/components/DiyEditor/components/mobile/**']
|
||||
}),
|
||||
EslintPlugin({
|
||||
cache: false,
|
||||
include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
|
||||
}),
|
||||
VueI18nPlugin({
|
||||
runtimeOnly: true,
|
||||
compositionOnly: true,
|
||||
include: [resolve(__dirname, 'src/locales/**')]
|
||||
}),
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [pathResolve('src/assets/svgs')],
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
svgoOptions: true
|
||||
}),
|
||||
viteCompression({
|
||||
verbose: true, // 是否在控制台输出压缩结果
|
||||
disable: false, // 是否禁用
|
||||
threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
|
||||
algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
|
||||
ext: '.gz', // 生成的压缩包后缀
|
||||
deleteOriginFile: false //压缩后是否删除源文件
|
||||
}),
|
||||
ViteEjsPlugin(),
|
||||
topLevelAwait({
|
||||
// https://juejin.cn/post/7152191742513512485
|
||||
// The export name of top-level await promise for each chunk module
|
||||
promiseExportName: '__tla',
|
||||
// The function to generate import names of top-level await promise in each chunk module
|
||||
promiseImportName: (i) => `__tla_${i}`
|
||||
})
|
||||
]
|
||||
}
|
||||
112
yudao-ui-admin-vue3/build/vite/optimize.ts
Normal file
112
yudao-ui-admin-vue3/build/vite/optimize.ts
Normal file
@ -0,0 +1,112 @@
|
||||
const include = [
|
||||
'qs',
|
||||
'url',
|
||||
'vue',
|
||||
'sass',
|
||||
'mitt',
|
||||
'axios',
|
||||
'pinia',
|
||||
'dayjs',
|
||||
'qrcode',
|
||||
'unocss',
|
||||
'vue-router',
|
||||
'vue-types',
|
||||
'vue-i18n',
|
||||
'crypto-js',
|
||||
'cropperjs',
|
||||
'lodash-es',
|
||||
'nprogress',
|
||||
'web-storage-cache',
|
||||
'@iconify/iconify',
|
||||
'@vueuse/core',
|
||||
'@zxcvbn-ts/core',
|
||||
'echarts/core',
|
||||
'echarts/charts',
|
||||
'echarts/components',
|
||||
'echarts/renderers',
|
||||
'echarts-wordcloud',
|
||||
'@wangeditor/editor',
|
||||
'@wangeditor/editor-for-vue',
|
||||
'element-plus',
|
||||
'element-plus/es',
|
||||
'element-plus/es/locale/lang/zh-cn',
|
||||
'element-plus/es/locale/lang/en',
|
||||
'element-plus/es/components/avatar/style/css',
|
||||
'element-plus/es/components/space/style/css',
|
||||
'element-plus/es/components/backtop/style/css',
|
||||
'element-plus/es/components/form/style/css',
|
||||
'element-plus/es/components/radio-group/style/css',
|
||||
'element-plus/es/components/radio/style/css',
|
||||
'element-plus/es/components/checkbox/style/css',
|
||||
'element-plus/es/components/checkbox-group/style/css',
|
||||
'element-plus/es/components/switch/style/css',
|
||||
'element-plus/es/components/time-picker/style/css',
|
||||
'element-plus/es/components/date-picker/style/css',
|
||||
'element-plus/es/components/descriptions/style/css',
|
||||
'element-plus/es/components/descriptions-item/style/css',
|
||||
'element-plus/es/components/link/style/css',
|
||||
'element-plus/es/components/tooltip/style/css',
|
||||
'element-plus/es/components/drawer/style/css',
|
||||
'element-plus/es/components/dialog/style/css',
|
||||
'element-plus/es/components/checkbox-button/style/css',
|
||||
'element-plus/es/components/option-group/style/css',
|
||||
'element-plus/es/components/radio-button/style/css',
|
||||
'element-plus/es/components/cascader/style/css',
|
||||
'element-plus/es/components/color-picker/style/css',
|
||||
'element-plus/es/components/input-number/style/css',
|
||||
'element-plus/es/components/rate/style/css',
|
||||
'element-plus/es/components/select-v2/style/css',
|
||||
'element-plus/es/components/tree-select/style/css',
|
||||
'element-plus/es/components/slider/style/css',
|
||||
'element-plus/es/components/time-select/style/css',
|
||||
'element-plus/es/components/autocomplete/style/css',
|
||||
'element-plus/es/components/image-viewer/style/css',
|
||||
'element-plus/es/components/upload/style/css',
|
||||
'element-plus/es/components/col/style/css',
|
||||
'element-plus/es/components/form-item/style/css',
|
||||
'element-plus/es/components/alert/style/css',
|
||||
'element-plus/es/components/breadcrumb/style/css',
|
||||
'element-plus/es/components/select/style/css',
|
||||
'element-plus/es/components/input/style/css',
|
||||
'element-plus/es/components/breadcrumb-item/style/css',
|
||||
'element-plus/es/components/tag/style/css',
|
||||
'element-plus/es/components/pagination/style/css',
|
||||
'element-plus/es/components/table/style/css',
|
||||
'element-plus/es/components/table-v2/style/css',
|
||||
'element-plus/es/components/table-column/style/css',
|
||||
'element-plus/es/components/card/style/css',
|
||||
'element-plus/es/components/row/style/css',
|
||||
'element-plus/es/components/button/style/css',
|
||||
'element-plus/es/components/menu/style/css',
|
||||
'element-plus/es/components/sub-menu/style/css',
|
||||
'element-plus/es/components/menu-item/style/css',
|
||||
'element-plus/es/components/option/style/css',
|
||||
'element-plus/es/components/dropdown/style/css',
|
||||
'element-plus/es/components/dropdown-menu/style/css',
|
||||
'element-plus/es/components/dropdown-item/style/css',
|
||||
'element-plus/es/components/skeleton/style/css',
|
||||
'element-plus/es/components/skeleton/style/css',
|
||||
'element-plus/es/components/backtop/style/css',
|
||||
'element-plus/es/components/menu/style/css',
|
||||
'element-plus/es/components/sub-menu/style/css',
|
||||
'element-plus/es/components/menu-item/style/css',
|
||||
'element-plus/es/components/dropdown/style/css',
|
||||
'element-plus/es/components/tree/style/css',
|
||||
'element-plus/es/components/dropdown-menu/style/css',
|
||||
'element-plus/es/components/dropdown-item/style/css',
|
||||
'element-plus/es/components/badge/style/css',
|
||||
'element-plus/es/components/breadcrumb/style/css',
|
||||
'element-plus/es/components/breadcrumb-item/style/css',
|
||||
'element-plus/es/components/image/style/css',
|
||||
'element-plus/es/components/collapse-transition/style/css',
|
||||
'element-plus/es/components/timeline/style/css',
|
||||
'element-plus/es/components/timeline-item/style/css',
|
||||
'element-plus/es/components/collapse/style/css',
|
||||
'element-plus/es/components/collapse-item/style/css',
|
||||
'element-plus/es/components/button-group/style/css',
|
||||
'element-plus/es/components/text/style/css'
|
||||
]
|
||||
|
||||
const exclude = ['@iconify/json']
|
||||
|
||||
export { include, exclude }
|
||||
145
yudao-ui-admin-vue3/index.html
Normal file
145
yudao-ui-admin-vue3/index.html
Normal file
@ -0,0 +1,145 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="%BASE_URL%favicon.svg" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="keywords" content="老年健康服务平台,健康管理,运动服务,志愿服务" />
|
||||
<meta name="description" content="老年健康服务平台管理端" />
|
||||
<title>%VITE_APP_TITLE%</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
.app-loading {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: #f0f2f5;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-wrap {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
display: flex;
|
||||
-webkit-transform: translate3d(-50%, -50%, 0);
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-title {
|
||||
margin-bottom: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-logo {
|
||||
width: 100px;
|
||||
margin: 0 auto 15px auto;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-item {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
vertical-align: middle;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-outter {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 4px solid #2d8cf0;
|
||||
border-bottom: 0;
|
||||
border-left-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
|
||||
}
|
||||
|
||||
.app-loading .app-loading-inner {
|
||||
position: absolute;
|
||||
top: calc(50% - 20px);
|
||||
left: calc(50% - 20px);
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 4px solid #87bdff;
|
||||
border-right: 0;
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes loader-outter {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loader-outter {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes loader-inner {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(-360deg);
|
||||
transform: rotate(-360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loader-inner {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(-360deg);
|
||||
transform: rotate(-360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="app-loading">
|
||||
<div class="app-loading-wrap">
|
||||
<div class="app-loading-title">
|
||||
<img src="%BASE_URL%favicon.svg" class="app-loading-logo" alt="" />
|
||||
<div class="app-loading-title">%VITE_APP_TITLE%</div>
|
||||
</div>
|
||||
<div class="app-loading-item">
|
||||
<div class="app-loading-outter"></div>
|
||||
<div class="app-loading-inner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
150
yudao-ui-admin-vue3/package.json
Normal file
150
yudao-ui-admin-vue3/package.json
Normal file
@ -0,0 +1,150 @@
|
||||
{
|
||||
"name": "elder-health-admin",
|
||||
"version": "2.0.1-snapshot",
|
||||
"description": "老年健康服务平台管理端",
|
||||
"author": "xingyu",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"i": "pnpm install",
|
||||
"dev": "vite --mode desktop --host 127.0.0.1 --port 5173 --strictPort",
|
||||
"build:desktop": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode desktop",
|
||||
"dev-server": "vite --mode dev",
|
||||
"ts:check": "vue-tsc --noEmit",
|
||||
"build:local-dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
|
||||
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
|
||||
"build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
|
||||
"build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
|
||||
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
|
||||
"serve:dev": "vite preview --mode dev",
|
||||
"serve:prod": "vite preview --mode prod",
|
||||
"preview": "pnpm build:local-dev && vite preview",
|
||||
"clean": "npx rimraf node_modules",
|
||||
"clean:cache": "npx rimraf node_modules/.cache",
|
||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
||||
"lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
||||
"lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
||||
"lint:lint-staged": "lint-staged -c "
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@form-create/designer": "^3.1.3",
|
||||
"@form-create/element-ui": "^3.1.24",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@videojs-player/vue": "^1.0.0",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.10",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.6.7",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"bpmn-js-token-simulation": "^0.10.0",
|
||||
"camunda-bpmn-moddle": "^7.0.1",
|
||||
"cropperjs": "^1.6.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.10",
|
||||
"diagram-js": "^12.8.0",
|
||||
"driver.js": "^1.3.1",
|
||||
"echarts": "^5.5.0",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "2.5.3",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"highlight.js": "^11.9.0",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"min-dash": "^4.1.1",
|
||||
"mitt": "^3.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.11.2",
|
||||
"steady-xml": "^0.1.0",
|
||||
"url": "^0.11.3",
|
||||
"video.js": "^7.21.5",
|
||||
"vue": "3.4.20",
|
||||
"vue-dompurify-html": "^4.1.4",
|
||||
"vue-i18n": "9.9.1",
|
||||
"vue-router": "^4.3.0",
|
||||
"vue-types": "^5.1.1",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"web-storage-cache": "^1.1.1",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.0.1",
|
||||
"@commitlint/config-conventional": "^19.0.0",
|
||||
"@iconify/json": "^2.2.187",
|
||||
"@intlify/unplugin-vue-i18n": "^2.0.0",
|
||||
"@purge-icons/generated": "^0.9.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.11.21",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.12",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
||||
"@typescript-eslint/parser": "^7.1.0",
|
||||
"@unocss/eslint-config": "^0.57.4",
|
||||
"@unocss/transformer-variant-group": "^0.58.5",
|
||||
"@vitejs/plugin-legacy": "^5.3.1",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"bpmn-js": "8.9.0",
|
||||
"bpmn-js-properties-panel": "0.46.0",
|
||||
"consola": "^3.2.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-define-config": "^2.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-vue": "^9.22.0",
|
||||
"lint-staged": "^15.2.2",
|
||||
"postcss": "^8.4.35",
|
||||
"postcss-html": "^1.6.0",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^4.12.0",
|
||||
"sass": "^1.69.5",
|
||||
"stylelint": "^16.2.1",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-recommended": "^14.0.0",
|
||||
"stylelint-config-standard": "^36.0.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"terser": "^5.28.1",
|
||||
"typescript": "5.3.3",
|
||||
"unocss": "^0.58.5",
|
||||
"unplugin-auto-import": "^0.16.7",
|
||||
"unplugin-element-plus": "^0.8.0",
|
||||
"unplugin-vue-components": "^0.25.2",
|
||||
"vite": "5.1.4",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-ejs": "^1.7.0",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-progress": "^0.0.7",
|
||||
"vite-plugin-purge-icons": "^0.10.0",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-top-level-await": "^1.3.1",
|
||||
"vue-eslint-parser": "^9.3.2",
|
||||
"vue-tsc": "^1.8.27"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitee.com/yudaocode/yudao-ui-admin-vue3"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues"
|
||||
},
|
||||
"homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3",
|
||||
"packageManager": "pnpm@8.6.0",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0",
|
||||
"pnpm": ">=8.6.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"@swc/core": "1.4.14"
|
||||
}
|
||||
}
|
||||
}
|
||||
9983
yudao-ui-admin-vue3/pnpm-lock.yaml
Normal file
9983
yudao-ui-admin-vue3/pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
5
yudao-ui-admin-vue3/postcss.config.js
Normal file
5
yudao-ui-admin-vue3/postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
22
yudao-ui-admin-vue3/prettier.config.js
Normal file
22
yudao-ui-admin-vue3/prettier.config.js
Normal file
@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
printWidth: 100, // 每行代码长度(默认80)
|
||||
tabWidth: 2, // 每个tab相当于多少个空格(默认2)ab进行缩进(默认false)
|
||||
useTabs: false, // 是否使用tab
|
||||
semi: false, // 声明结尾使用分号(默认true)
|
||||
vueIndentScriptAndStyle: false,
|
||||
singleQuote: true, // 使用单引号(默认false)
|
||||
quoteProps: 'as-needed',
|
||||
bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true)
|
||||
trailingComma: 'none', // 多行使用拖尾逗号(默认none)
|
||||
jsxSingleQuote: false,
|
||||
// 箭头函数参数括号 默认avoid 可选 avoid| always
|
||||
// avoid 能省略括号的时候就省略 例如x => x
|
||||
// always 总是有括号
|
||||
arrowParens: 'always',
|
||||
insertPragma: false,
|
||||
requirePragma: false,
|
||||
proseWrap: 'never',
|
||||
htmlWhitespaceSensitivity: 'strict',
|
||||
endOfLine: 'auto',
|
||||
rangeStart: 0
|
||||
}
|
||||
BIN
yudao-ui-admin-vue3/public/favicon.ico
Normal file
BIN
yudao-ui-admin-vue3/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
5
yudao-ui-admin-vue3/public/favicon.svg
Normal file
5
yudao-ui-admin-vue3/public/favicon.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<rect width="64" height="64" rx="18" fill="#247CCC"/>
|
||||
<path d="M32 49s-19-11.2-19-24a10 10 0 0 1 19-4.4A10 10 0 0 1 51 25c0 12.8-19 24-19 24Z" fill="white"/>
|
||||
<path d="M18 32h8l4-8 5 16 4-8h7" stroke="#247CCC" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 361 B |
BIN
yudao-ui-admin-vue3/public/home.png
Normal file
BIN
yudao-ui-admin-vue3/public/home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
BIN
yudao-ui-admin-vue3/public/logo.gif
Normal file
BIN
yudao-ui-admin-vue3/public/logo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
57
yudao-ui-admin-vue3/src/App.vue
Normal file
57
yudao-ui-admin-vue3/src/App.vue
Normal file
@ -0,0 +1,57 @@
|
||||
<script lang="ts" setup>
|
||||
import { isDark } from '@/utils/is'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import routerSearch from '@/components/RouterSearch/index.vue'
|
||||
|
||||
defineOptions({ name: 'APP' })
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
const prefixCls = getPrefixCls('app')
|
||||
const appStore = useAppStore()
|
||||
const currentSize = computed(() => appStore.getCurrentSize)
|
||||
const greyMode = computed(() => appStore.getGreyMode)
|
||||
const { wsCache } = useCache()
|
||||
|
||||
// 根据浏览器当前主题设置系统主题色
|
||||
const setDefaultTheme = () => {
|
||||
let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK)
|
||||
if (isDarkTheme === null) {
|
||||
isDarkTheme = isDark()
|
||||
}
|
||||
appStore.setIsDark(isDarkTheme)
|
||||
}
|
||||
setDefaultTheme()
|
||||
</script>
|
||||
<template>
|
||||
<ConfigGlobal :size="currentSize">
|
||||
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
|
||||
<routerSearch />
|
||||
</ConfigGlobal>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
$prefix-cls: #{$namespace}-app;
|
||||
|
||||
.size {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
@extend .size;
|
||||
|
||||
padding: 0 !important;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
|
||||
#app {
|
||||
@extend .size;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$prefix-cls}-grey-mode {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
</style>
|
||||
8
yudao-ui-admin-vue3/src/api/bpm/activity/index.ts
Normal file
8
yudao-ui-admin-vue3/src/api/bpm/activity/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getActivityList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/activity/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
21
yudao-ui-admin-vue3/src/api/bpm/definition/index.ts
Normal file
21
yudao-ui-admin-vue3/src/api/bpm/definition/index.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getProcessDefinitionBpmnXML = async (id: number) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/get-bpmn-xml?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
56
yudao-ui-admin-vue3/src/api/bpm/form/index.ts
Normal file
56
yudao-ui-admin-vue3/src/api/bpm/form/index.ts
Normal file
@ -0,0 +1,56 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type FormVO = {
|
||||
id: number
|
||||
name: string
|
||||
conf: string
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建工作流的表单定义
|
||||
export const createForm = async (data: FormVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/form/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新工作流的表单定义
|
||||
export const updateForm = async (data: FormVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/form/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工作流的表单定义
|
||||
export const deleteForm = async (id: number) => {
|
||||
return await request.delete({
|
||||
url: '/bpm/form/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义
|
||||
export const getForm = async (id: number) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义分页
|
||||
export const getFormPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获得动态表单的精简列表
|
||||
export const getSimpleFormList = async () => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/list-all-simple'
|
||||
})
|
||||
}
|
||||
27
yudao-ui-admin-vue3/src/api/bpm/leave/index.ts
Normal file
27
yudao-ui-admin-vue3/src/api/bpm/leave/index.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type LeaveVO = {
|
||||
id: number
|
||||
result: number
|
||||
type: number
|
||||
reason: string
|
||||
processInstanceId: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建请假申请
|
||||
export const createLeave = async (data: LeaveVO) => {
|
||||
return await request.post({ url: '/bpm/oa/leave/create', data: data })
|
||||
}
|
||||
|
||||
// 获得请假申请
|
||||
export const getLeave = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得请假申请分页
|
||||
export const getLeavePage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/page', params })
|
||||
}
|
||||
59
yudao-ui-admin-vue3/src/api/bpm/model/index.ts
Normal file
59
yudao-ui-admin-vue3/src/api/bpm/model/index.ts
Normal file
@ -0,0 +1,59 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type ProcessDefinitionVO = {
|
||||
id: string
|
||||
version: number
|
||||
deploymentTIme: string
|
||||
suspensionState: number
|
||||
}
|
||||
|
||||
export type ModelVO = {
|
||||
id: number
|
||||
formName: string
|
||||
key: string
|
||||
name: string
|
||||
description: string
|
||||
category: string
|
||||
formType: number
|
||||
formId: number
|
||||
formCustomCreatePath: string
|
||||
formCustomViewPath: string
|
||||
processDefinition: ProcessDefinitionVO
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
bpmnXml: string
|
||||
}
|
||||
|
||||
export const getModelPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/model/page', params })
|
||||
}
|
||||
|
||||
export const getModel = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/model/get?id=' + id })
|
||||
}
|
||||
|
||||
export const updateModel = async (data: ModelVO) => {
|
||||
return await request.put({ url: '/bpm/model/update', data: data })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export const updateModelState = async (id: number, state: number) => {
|
||||
const data = {
|
||||
id: id,
|
||||
state: state
|
||||
}
|
||||
return await request.put({ url: '/bpm/model/update-state', data: data })
|
||||
}
|
||||
|
||||
export const createModel = async (data: ModelVO) => {
|
||||
return await request.post({ url: '/bpm/model/create', data: data })
|
||||
}
|
||||
|
||||
export const deleteModel = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/model/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const deployModel = async (id: number) => {
|
||||
return await request.post({ url: '/bpm/model/deploy?id=' + id })
|
||||
}
|
||||
70
yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts
Normal file
70
yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type Task = {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export type ProcessInstanceVO = {
|
||||
id: number
|
||||
name: string
|
||||
processDefinitionId: string
|
||||
category: string
|
||||
result: number
|
||||
tasks: Task[]
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
businessKey: string
|
||||
createTime: string
|
||||
endTime: string
|
||||
}
|
||||
|
||||
export type ProcessInstanceCCVO = {
|
||||
type: number,
|
||||
taskName: string,
|
||||
taskKey: string,
|
||||
processInstanceName: string,
|
||||
processInstanceKey: string,
|
||||
startUserId: string,
|
||||
options:string [],
|
||||
reason: string
|
||||
}
|
||||
|
||||
export const getMyProcessInstancePage = async (params) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
}
|
||||
|
||||
export const createProcessInstance = async (data) => {
|
||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
||||
}
|
||||
|
||||
export const cancelProcessInstance = async (id: number, reason: string) => {
|
||||
const data = {
|
||||
id: id,
|
||||
reason: reason
|
||||
}
|
||||
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
||||
}
|
||||
|
||||
export const getProcessInstance = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 抄送
|
||||
* @param data 抄送数据
|
||||
* @returns 是否抄送成功
|
||||
*/
|
||||
export const createProcessInstanceCC = async (data) => {
|
||||
return await request.post({ url: '/bpm/process-instance/cc/create', data: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 抄送列表
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export const getProcessInstanceCCPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/process-instance/cc/my-page', params })
|
||||
}
|
||||
81
yudao-ui-admin-vue3/src/api/bpm/task/index.ts
Normal file
81
yudao-ui-admin-vue3/src/api/bpm/task/index.ts
Normal file
@ -0,0 +1,81 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type TaskVO = {
|
||||
id: number
|
||||
}
|
||||
|
||||
export const getTodoTaskPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/todo-page', params })
|
||||
}
|
||||
|
||||
export const getDoneTaskPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/done-page', params })
|
||||
}
|
||||
|
||||
export const completeTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/complete', data })
|
||||
}
|
||||
|
||||
export const approveTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/approve', data })
|
||||
}
|
||||
|
||||
export const rejectTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/reject', data })
|
||||
}
|
||||
export const backTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/back', data })
|
||||
}
|
||||
|
||||
export const updateTaskAssignee = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/update-assignee', data })
|
||||
}
|
||||
|
||||
export const getTaskListByProcessInstanceId = async (processInstanceId) => {
|
||||
return await request.get({
|
||||
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
|
||||
})
|
||||
}
|
||||
|
||||
// 导出任务
|
||||
export const exportTask = async (params) => {
|
||||
return await request.download({ url: '/bpm/task/export', params })
|
||||
}
|
||||
|
||||
// 获取所有可回退的节点
|
||||
export const getReturnList = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/return-list', params })
|
||||
}
|
||||
|
||||
// 回退
|
||||
export const returnTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/return', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 委派
|
||||
*/
|
||||
export const delegateTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/delegate', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 加签
|
||||
*/
|
||||
export const taskAddSign = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/create-sign', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取减签任务列表
|
||||
*/
|
||||
export const getChildrenTaskList = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/task/children-list?taskId=' + id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 减签
|
||||
*/
|
||||
export const taskSubSign = async (data) => {
|
||||
return await request.delete({ url: '/bpm/task/delete-sign', data })
|
||||
}
|
||||
29
yudao-ui-admin-vue3/src/api/bpm/taskAssignRule/index.ts
Normal file
29
yudao-ui-admin-vue3/src/api/bpm/taskAssignRule/index.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type TaskAssignVO = {
|
||||
id: number
|
||||
modelId: string
|
||||
processDefinitionId: string
|
||||
taskDefinitionKey: string
|
||||
taskDefinitionName: string
|
||||
options: string[]
|
||||
type: number
|
||||
}
|
||||
|
||||
export const getTaskAssignRuleList = async (params) => {
|
||||
return await request.get({ url: '/bpm/task-assign-rule/list', params })
|
||||
}
|
||||
|
||||
export const createTaskAssignRule = async (data: TaskAssignVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/task-assign-rule/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateTaskAssignRule = async (data: TaskAssignVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/task-assign-rule/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
47
yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts
Normal file
47
yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts
Normal file
@ -0,0 +1,47 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type UserGroupVO = {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
memberUserIds: number[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建用户组
|
||||
export const createUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/user-group/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新用户组
|
||||
export const updateUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/user-group/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户组
|
||||
export const deleteUserGroup = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/user-group/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组
|
||||
export const getUserGroup = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/user-group/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组分页
|
||||
export const getUserGroupPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/user-group/page', params })
|
||||
}
|
||||
|
||||
// 获取用户组精简信息列表
|
||||
export const getSimpleUserGroupList = async (): Promise<UserGroupVO[]> => {
|
||||
return await request.get({ url: '/bpm/user-group/list-all-simple' })
|
||||
}
|
||||
98
yudao-ui-admin-vue3/src/api/crm/business/index.ts
Normal file
98
yudao-ui-admin-vue3/src/api/crm/business/index.ts
Normal file
@ -0,0 +1,98 @@
|
||||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/customer'
|
||||
|
||||
export interface BusinessVO {
|
||||
id: number
|
||||
name: string
|
||||
customerId: number
|
||||
customerName?: string
|
||||
followUpStatus: boolean
|
||||
contactLastTime: Date
|
||||
contactNextTime: Date
|
||||
ownerUserId: number
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
statusTypeId: number
|
||||
statusTypeName?: string
|
||||
statusId: number
|
||||
statusName?: string
|
||||
endStatus: number
|
||||
endRemark: string
|
||||
dealTime: Date
|
||||
totalProductPrice: number
|
||||
totalPrice: number
|
||||
discountPercent: number
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
products?: [
|
||||
{
|
||||
id: number
|
||||
productId: number
|
||||
productName: string
|
||||
productNo: string
|
||||
productUnit: number
|
||||
productPrice: number
|
||||
businessPrice: number
|
||||
count: number
|
||||
totalPrice: number
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 查询 CRM 商机列表
|
||||
export const getBusinessPage = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 商机列表,基于指定客户
|
||||
export const getBusinessPageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 商机详情
|
||||
export const getBusiness = async (id: number) => {
|
||||
return await request.get({ url: `/crm/business/get?id=` + id })
|
||||
}
|
||||
|
||||
// 获得 CRM 商机列表(精简)
|
||||
export const getSimpleBusinessList = async () => {
|
||||
return await request.get({ url: `/crm/business/simple-all-list` })
|
||||
}
|
||||
|
||||
// 新增 CRM 商机
|
||||
export const createBusiness = async (data: BusinessVO) => {
|
||||
return await request.post({ url: `/crm/business/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 商机
|
||||
export const updateBusiness = async (data: BusinessVO) => {
|
||||
return await request.put({ url: `/crm/business/update`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 商机状态
|
||||
export const updateBusinessStatus = async (data: BusinessVO) => {
|
||||
return await request.put({ url: `/crm/business/update-status`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 商机
|
||||
export const deleteBusiness = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/business/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 商机 Excel
|
||||
export const exportBusiness = async (params) => {
|
||||
return await request.download({ url: `/crm/business/export-excel`, params })
|
||||
}
|
||||
|
||||
// 联系人关联商机列表
|
||||
export const getBusinessPageByContact = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page-by-contact`, params })
|
||||
}
|
||||
|
||||
// 商机转移
|
||||
export const transferBusiness = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/business/transfer', data })
|
||||
}
|
||||
68
yudao-ui-admin-vue3/src/api/crm/business/status/index.ts
Normal file
68
yudao-ui-admin-vue3/src/api/crm/business/status/index.ts
Normal file
@ -0,0 +1,68 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface BusinessStatusTypeVO {
|
||||
id: number
|
||||
name: string
|
||||
deptIds: number[]
|
||||
statuses?: {
|
||||
id: number
|
||||
name: string
|
||||
percent: number
|
||||
}
|
||||
}
|
||||
|
||||
export const DEFAULT_STATUSES = [
|
||||
{
|
||||
endStatus: 1,
|
||||
key: '结束',
|
||||
name: '赢单',
|
||||
percent: 100
|
||||
},
|
||||
{
|
||||
endStatus: 2,
|
||||
key: '结束',
|
||||
name: '输单',
|
||||
percent: 0
|
||||
},
|
||||
{
|
||||
endStatus: 3,
|
||||
key: '结束',
|
||||
name: '无效',
|
||||
percent: 0
|
||||
}
|
||||
]
|
||||
|
||||
// 查询商机状态组列表
|
||||
export const getBusinessStatusPage = async (params: any) => {
|
||||
return await request.get({ url: `/crm/business-status/page`, params })
|
||||
}
|
||||
|
||||
// 新增商机状态组
|
||||
export const createBusinessStatus = async (data: BusinessStatusTypeVO) => {
|
||||
return await request.post({ url: `/crm/business-status/create`, data })
|
||||
}
|
||||
|
||||
// 修改商机状态组
|
||||
export const updateBusinessStatus = async (data: BusinessStatusTypeVO) => {
|
||||
return await request.put({ url: `/crm/business-status/update`, data })
|
||||
}
|
||||
|
||||
// 查询商机状态类型详情
|
||||
export const getBusinessStatus = async (id: number) => {
|
||||
return await request.get({ url: `/crm/business-status/get?id=` + id })
|
||||
}
|
||||
|
||||
// 删除商机状态
|
||||
export const deleteBusinessStatus = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/business-status/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 获得商机状态组列表
|
||||
export const getBusinessStatusTypeSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/business-status/type-simple-list` })
|
||||
}
|
||||
|
||||
// 获得商机阶段列表
|
||||
export const getBusinessStatusSimpleList = async (typeId: number) => {
|
||||
return await request.get({ url: `/crm/business-status/status-simple-list`, params: { typeId } })
|
||||
}
|
||||
78
yudao-ui-admin-vue3/src/api/crm/clue/index.ts
Normal file
78
yudao-ui-admin-vue3/src/api/crm/clue/index.ts
Normal file
@ -0,0 +1,78 @@
|
||||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/customer'
|
||||
|
||||
export interface ClueVO {
|
||||
id: number // 编号
|
||||
name: string // 线索名称
|
||||
followUpStatus: boolean // 跟进状态
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
transformStatus: boolean // 转化状态
|
||||
customerId: number // 客户编号
|
||||
customerName?: string // 客户名称
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
industryId: number // 所属行业
|
||||
level: number // 客户等级
|
||||
source: number // 客户来源
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询线索列表
|
||||
export const getCluePage = async (params: any) => {
|
||||
return await request.get({ url: `/crm/clue/page`, params })
|
||||
}
|
||||
|
||||
// 查询线索详情
|
||||
export const getClue = async (id: number) => {
|
||||
return await request.get({ url: `/crm/clue/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增线索
|
||||
export const createClue = async (data: ClueVO) => {
|
||||
return await request.post({ url: `/crm/clue/create`, data })
|
||||
}
|
||||
|
||||
// 修改线索
|
||||
export const updateClue = async (data: ClueVO) => {
|
||||
return await request.put({ url: `/crm/clue/update`, data })
|
||||
}
|
||||
|
||||
// 删除线索
|
||||
export const deleteClue = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/clue/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出线索 Excel
|
||||
export const exportClue = async (params) => {
|
||||
return await request.download({ url: `/crm/clue/export-excel`, params })
|
||||
}
|
||||
|
||||
// 线索转移
|
||||
export const transferClue = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/clue/transfer', data })
|
||||
}
|
||||
|
||||
// 线索转化为客户
|
||||
export const transformClue = async (id: number) => {
|
||||
return await request.put({ url: '/crm/clue/transform', params: { id } })
|
||||
}
|
||||
|
||||
// 获得分配给我的、待跟进的线索数量
|
||||
export const getFollowClueCount = async () => {
|
||||
return await request.get({ url: '/crm/clue/follow-count' })
|
||||
}
|
||||
113
yudao-ui-admin-vue3/src/api/crm/contact/index.ts
Normal file
113
yudao-ui-admin-vue3/src/api/crm/contact/index.ts
Normal file
@ -0,0 +1,113 @@
|
||||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/customer'
|
||||
|
||||
export interface ContactVO {
|
||||
id: number // 编号
|
||||
name: string // 联系人名称
|
||||
customerId: number // 客户编号
|
||||
customerName?: string // 客户名称
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
sex: number // 性别
|
||||
master: boolean // 是否主联系人
|
||||
post: string // 职务
|
||||
parentId: number // 上级联系人编号
|
||||
parentName?: string // 上级联系人名称
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
export interface ContactBusinessReqVO {
|
||||
contactId: number
|
||||
businessIds: number[]
|
||||
}
|
||||
|
||||
export interface ContactBusiness2ReqVO {
|
||||
businessId: number
|
||||
contactIds: number[]
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表
|
||||
export const getContactPage = async (params) => {
|
||||
return await request.get({ url: `/crm/contact/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定客户
|
||||
export const getContactPageByCustomer = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contact/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定商机
|
||||
export const getContactPageByBusiness = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contact/page-by-business`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人详情
|
||||
export const getContact = async (id: number) => {
|
||||
return await request.get({ url: `/crm/contact/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增 CRM 联系人
|
||||
export const createContact = async (data: ContactVO) => {
|
||||
return await request.post({ url: `/crm/contact/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 联系人
|
||||
export const updateContact = async (data: ContactVO) => {
|
||||
return await request.put({ url: `/crm/contact/update`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 联系人
|
||||
export const deleteContact = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/contact/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 联系人 Excel
|
||||
export const exportContact = async (params) => {
|
||||
return await request.download({ url: `/crm/contact/export-excel`, params })
|
||||
}
|
||||
|
||||
// 获得 CRM 联系人列表(精简)
|
||||
export const getSimpleContactList = async () => {
|
||||
return await request.get({ url: `/crm/contact/simple-all-list` })
|
||||
}
|
||||
|
||||
// 批量新增联系人商机关联
|
||||
export const createContactBusinessList = async (data: ContactBusinessReqVO) => {
|
||||
return await request.post({ url: `/crm/contact/create-business-list`, data })
|
||||
}
|
||||
|
||||
// 批量新增联系人商机关联
|
||||
export const createContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
|
||||
return await request.post({ url: `/crm/contact/create-business-list2`, data })
|
||||
}
|
||||
|
||||
// 解除联系人商机关联
|
||||
export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
|
||||
return await request.delete({ url: `/crm/contact/delete-business-list`, data })
|
||||
}
|
||||
|
||||
// 解除联系人商机关联
|
||||
export const deleteContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
|
||||
return await request.delete({ url: `/crm/contact/delete-business-list2`, data })
|
||||
}
|
||||
|
||||
// 联系人转移
|
||||
export const transferContact = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/contact/transfer', data })
|
||||
}
|
||||
16
yudao-ui-admin-vue3/src/api/crm/contract/config/index.ts
Normal file
16
yudao-ui-admin-vue3/src/api/crm/contract/config/index.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ContractConfigVO {
|
||||
notifyEnabled?: boolean
|
||||
notifyDays?: number
|
||||
}
|
||||
|
||||
// 获取合同配置
|
||||
export const getContractConfig = async () => {
|
||||
return await request.get({ url: `/crm/contract-config/get` })
|
||||
}
|
||||
|
||||
// 更新合同配置
|
||||
export const saveContractConfig = async (data: ContractConfigVO) => {
|
||||
return await request.put({ url: `/crm/contract-config/save`, data })
|
||||
}
|
||||
114
yudao-ui-admin-vue3/src/api/crm/contract/index.ts
Normal file
114
yudao-ui-admin-vue3/src/api/crm/contract/index.ts
Normal file
@ -0,0 +1,114 @@
|
||||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/customer'
|
||||
|
||||
export interface ContractVO {
|
||||
id: number
|
||||
name: string
|
||||
no: string
|
||||
customerId: number
|
||||
customerName?: string
|
||||
businessId: number
|
||||
businessName: string
|
||||
contactLastTime: Date
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
ownerUserDeptName?: string
|
||||
processInstanceId: number
|
||||
auditStatus: number
|
||||
orderDate: Date
|
||||
startTime: Date
|
||||
endTime: Date
|
||||
totalProductPrice: number
|
||||
discountPercent: number
|
||||
totalPrice: number
|
||||
totalReceivablePrice: number
|
||||
signContactId: number
|
||||
signContactName?: string
|
||||
signUserId: number
|
||||
signUserName: string
|
||||
remark: string
|
||||
createTime?: Date
|
||||
creator: string
|
||||
creatorName: string
|
||||
updateTime?: Date
|
||||
products?: [
|
||||
{
|
||||
id: number
|
||||
productId: number
|
||||
productName: string
|
||||
productNo: string
|
||||
productUnit: number
|
||||
productPrice: number
|
||||
contractPrice: number
|
||||
count: number
|
||||
totalPrice: number
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 查询 CRM 合同列表
|
||||
export const getContractPage = async (params) => {
|
||||
return await request.get({ url: `/crm/contract/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定客户
|
||||
export const getContractPageByCustomer = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contract/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定商机
|
||||
export const getContractPageByBusiness = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contract/page-by-business`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 合同详情
|
||||
export const getContract = async (id: number) => {
|
||||
return await request.get({ url: `/crm/contract/get?id=` + id })
|
||||
}
|
||||
|
||||
// 查询 CRM 合同下拉列表
|
||||
export const getContractSimpleList = async (customerId: number) => {
|
||||
return await request.get({
|
||||
url: `/crm/contract/simple-list?customerId=${customerId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增 CRM 合同
|
||||
export const createContract = async (data: ContractVO) => {
|
||||
return await request.post({ url: `/crm/contract/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 合同
|
||||
export const updateContract = async (data: ContractVO) => {
|
||||
return await request.put({ url: `/crm/contract/update`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 合同
|
||||
export const deleteContract = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/contract/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 合同 Excel
|
||||
export const exportContract = async (params) => {
|
||||
return await request.download({ url: `/crm/contract/export-excel`, params })
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
export const submitContract = async (id: number) => {
|
||||
return await request.put({ url: `/crm/contract/submit?id=${id}` })
|
||||
}
|
||||
|
||||
// 合同转移
|
||||
export const transferContract = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/contract/transfer', data })
|
||||
}
|
||||
|
||||
// 获得待审核合同数量
|
||||
export const getAuditContractCount = async () => {
|
||||
return await request.get({ url: '/crm/contract/audit-count' })
|
||||
}
|
||||
|
||||
// 获得即将到期(提醒)的合同数量
|
||||
export const getRemindContractCount = async () => {
|
||||
return await request.get({ url: '/crm/contract/remind-count' })
|
||||
}
|
||||
137
yudao-ui-admin-vue3/src/api/crm/customer/index.ts
Normal file
137
yudao-ui-admin-vue3/src/api/crm/customer/index.ts
Normal file
@ -0,0 +1,137 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface CustomerVO {
|
||||
id: number // 编号
|
||||
name: string // 客户名称
|
||||
followUpStatus: boolean // 跟进状态
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
lockStatus?: boolean
|
||||
dealStatus?: boolean
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
industryId: number // 所属行业
|
||||
level: number // 客户等级
|
||||
source: number // 客户来源
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询客户列表
|
||||
export const getCustomerPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer/page`, params })
|
||||
}
|
||||
|
||||
// 进入公海客户提醒的客户列表
|
||||
export const getPutPoolRemindCustomerPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer/put-pool-remind-page`, params })
|
||||
}
|
||||
|
||||
// 获得待进入公海客户数量
|
||||
export const getPutPoolRemindCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/put-pool-remind-count` })
|
||||
}
|
||||
|
||||
// 获得今日需联系客户数量
|
||||
export const getTodayContactCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/today-contact-count` })
|
||||
}
|
||||
|
||||
// 获得分配给我、待跟进的线索数量的客户数量
|
||||
export const getFollowCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/follow-count` })
|
||||
}
|
||||
|
||||
// 查询客户详情
|
||||
export const getCustomer = async (id: number) => {
|
||||
return await request.get({ url: `/crm/customer/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增客户
|
||||
export const createCustomer = async (data: CustomerVO) => {
|
||||
return await request.post({ url: `/crm/customer/create`, data })
|
||||
}
|
||||
|
||||
// 修改客户
|
||||
export const updateCustomer = async (data: CustomerVO) => {
|
||||
return await request.put({ url: `/crm/customer/update`, data })
|
||||
}
|
||||
|
||||
// 更新客户的成交状态
|
||||
export const updateCustomerDealStatus = async (id: number, dealStatus: boolean) => {
|
||||
return await request.put({ url: `/crm/customer/update-deal-status`, params: { id, dealStatus } })
|
||||
}
|
||||
|
||||
// 删除客户
|
||||
export const deleteCustomer = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/customer/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出客户 Excel
|
||||
export const exportCustomer = async (params: any) => {
|
||||
return await request.download({ url: `/crm/customer/export-excel`, params })
|
||||
}
|
||||
|
||||
// 下载客户导入模板
|
||||
export const importCustomerTemplate = () => {
|
||||
return request.download({ url: '/crm/customer/get-import-template' })
|
||||
}
|
||||
|
||||
// 导入客户
|
||||
export const handleImport = async (formData) => {
|
||||
return await request.upload({ url: `/crm/customer/import`, data: formData })
|
||||
}
|
||||
|
||||
// 客户列表
|
||||
export const getCustomerSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/customer/simple-list` })
|
||||
}
|
||||
|
||||
// ======================= 业务操作 =======================
|
||||
|
||||
export interface TransferReqVO {
|
||||
id: number | undefined // 客户编号
|
||||
newOwnerUserId: number | undefined // 新负责人的用户编号
|
||||
oldOwnerPermissionLevel: number | undefined // 老负责人加入团队后的权限级别
|
||||
}
|
||||
|
||||
// 客户转移
|
||||
export const transferCustomer = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/customer/transfer', data })
|
||||
}
|
||||
|
||||
// 锁定/解锁客户
|
||||
export const lockCustomer = async (id: number, lockStatus: boolean) => {
|
||||
return await request.put({ url: `/crm/customer/lock`, data: { id, lockStatus } })
|
||||
}
|
||||
|
||||
// 领取公海客户
|
||||
export const receiveCustomer = async (ids: any[]) => {
|
||||
return await request.put({ url: '/crm/customer/receive', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 分配公海给对应负责人
|
||||
export const distributeCustomer = async (ids: any[], ownerUserId: number) => {
|
||||
return await request.put({
|
||||
url: '/crm/customer/distribute',
|
||||
data: { ids: ids, ownerUserId }
|
||||
})
|
||||
}
|
||||
|
||||
// 客户放入公海
|
||||
export const putCustomerPool = async (id: number) => {
|
||||
return await request.put({ url: `/crm/customer/put-pool?id=${id}` })
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface CustomerLimitConfigVO {
|
||||
id?: number
|
||||
type?: number
|
||||
userIds?: string
|
||||
deptIds?: string
|
||||
maxCount?: number
|
||||
dealCountEnabled?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户限制配置类型
|
||||
*/
|
||||
export enum LimitConfType {
|
||||
/**
|
||||
* 拥有客户数限制
|
||||
*/
|
||||
CUSTOMER_QUANTITY_LIMIT = 1,
|
||||
/**
|
||||
* 锁定客户数限制
|
||||
*/
|
||||
CUSTOMER_LOCK_LIMIT = 2
|
||||
}
|
||||
|
||||
// 查询客户限制配置列表
|
||||
export const getCustomerLimitConfigPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer-limit-config/page`, params })
|
||||
}
|
||||
|
||||
// 查询客户限制配置详情
|
||||
export const getCustomerLimitConfig = async (id: number) => {
|
||||
return await request.get({ url: `/crm/customer-limit-config/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增客户限制配置
|
||||
export const createCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
|
||||
return await request.post({ url: `/crm/customer-limit-config/create`, data })
|
||||
}
|
||||
|
||||
// 修改客户限制配置
|
||||
export const updateCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
|
||||
return await request.put({ url: `/crm/customer-limit-config/update`, data })
|
||||
}
|
||||
|
||||
// 删除客户限制配置
|
||||
export const deleteCustomerLimitConfig = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/customer-limit-config/delete?id=` + id })
|
||||
}
|
||||
19
yudao-ui-admin-vue3/src/api/crm/customer/poolConfig/index.ts
Normal file
19
yudao-ui-admin-vue3/src/api/crm/customer/poolConfig/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface CustomerPoolConfigVO {
|
||||
enabled?: boolean
|
||||
contactExpireDays?: number
|
||||
dealExpireDays?: number
|
||||
notifyEnabled?: boolean
|
||||
notifyDays?: number
|
||||
}
|
||||
|
||||
// 获取客户公海规则设置
|
||||
export const getCustomerPoolConfig = async () => {
|
||||
return await request.get({ url: `/crm/customer-pool-config/get` })
|
||||
}
|
||||
|
||||
// 更新客户公海规则设置
|
||||
export const saveCustomerPoolConfig = async (data: CustomerPoolConfigVO) => {
|
||||
return await request.put({ url: `/crm/customer-pool-config/save`, data })
|
||||
}
|
||||
43
yudao-ui-admin-vue3/src/api/crm/followup/index.ts
Normal file
43
yudao-ui-admin-vue3/src/api/crm/followup/index.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 跟进记录 VO
|
||||
export interface FollowUpRecordVO {
|
||||
id: number // 编号
|
||||
bizType: number // 数据类型
|
||||
bizId: number // 数据编号
|
||||
type: number // 跟进类型
|
||||
content: string // 跟进内容
|
||||
picUrls: string[] // 图片
|
||||
fileUrls: string[] // 附件
|
||||
nextTime: Date // 下次联系时间
|
||||
businessIds: number[] // 关联的商机编号数组
|
||||
businesses: {
|
||||
id: number
|
||||
name: string
|
||||
}[] // 关联的商机数组
|
||||
contactIds: number[] // 关联的联系人编号数组
|
||||
contacts: {
|
||||
id: number
|
||||
name: string
|
||||
}[] // 关联的联系人数组
|
||||
creator: string
|
||||
creatorName?: string
|
||||
}
|
||||
|
||||
// 跟进记录 API
|
||||
export const FollowUpRecordApi = {
|
||||
// 查询跟进记录分页
|
||||
getFollowUpRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/crm/follow-up-record/page`, params })
|
||||
},
|
||||
|
||||
// 新增跟进记录
|
||||
createFollowUpRecord: async (data: FollowUpRecordVO) => {
|
||||
return await request.post({ url: `/crm/follow-up-record/create`, data })
|
||||
},
|
||||
|
||||
// 删除跟进记录
|
||||
deleteFollowUpRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/crm/follow-up-record/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
11
yudao-ui-admin-vue3/src/api/crm/operateLog/index.ts
Normal file
11
yudao-ui-admin-vue3/src/api/crm/operateLog/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OperateLogVO extends PageParam {
|
||||
bizType: number
|
||||
bizId: number
|
||||
}
|
||||
|
||||
// 获得操作日志
|
||||
export const getOperateLogPage = async (params: OperateLogVO) => {
|
||||
return await request.get({ url: `/crm/operate-log/page`, params })
|
||||
}
|
||||
64
yudao-ui-admin-vue3/src/api/crm/permission/index.ts
Normal file
64
yudao-ui-admin-vue3/src/api/crm/permission/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PermissionVO {
|
||||
id?: number // 数据权限编号
|
||||
userId: number // 用户编号
|
||||
bizType: number // Crm 类型
|
||||
bizId: number // Crm 类型数据编号
|
||||
level: number // 权限级别
|
||||
deptName?: string // 部门名称
|
||||
nickname?: string // 用户昵称
|
||||
postNames?: string[] // 岗位名称数组
|
||||
createTime?: Date
|
||||
ids?: number[]
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 业务类型枚举
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
export enum BizTypeEnum {
|
||||
CRM_CLUE = 1, // 线索
|
||||
CRM_CUSTOMER = 2, // 客户
|
||||
CRM_CONTACT = 3, // 联系人
|
||||
CRM_BUSINESS = 4, // 商机
|
||||
CRM_CONTRACT = 5, // 合同
|
||||
CRM_PRODUCT = 6, // 产品
|
||||
CRM_RECEIVABLE = 7, // 回款
|
||||
CRM_RECEIVABLE_PLAN = 8 // 回款计划
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 数据权限级别枚举
|
||||
*/
|
||||
export enum PermissionLevelEnum {
|
||||
OWNER = 1, // 负责人
|
||||
READ = 2, // 只读
|
||||
WRITE = 3 // 读写
|
||||
}
|
||||
|
||||
// 获得数据权限列表(查询团队成员列表)
|
||||
export const getPermissionList = async (params) => {
|
||||
return await request.get({ url: `/crm/permission/list`, params })
|
||||
}
|
||||
|
||||
// 创建数据权限(新增团队成员)
|
||||
export const createPermission = async (data: PermissionVO) => {
|
||||
return await request.post({ url: `/crm/permission/create`, data })
|
||||
}
|
||||
|
||||
// 编辑数据权限(修改团队成员权限级别)
|
||||
export const updatePermission = async (data) => {
|
||||
return await request.put({ url: `/crm/permission/update`, data })
|
||||
}
|
||||
|
||||
// 删除数据权限(删除团队成员)
|
||||
export const deletePermissionBatch = async (val: number[]) => {
|
||||
return await request.delete({ url: '/crm/permission/delete?ids=' + val.join(',') })
|
||||
}
|
||||
|
||||
// 删除自己的数据权限(退出团队)
|
||||
export const deleteSelfPermission = async (id: number) => {
|
||||
return await request.delete({ url: '/crm/permission/delete-self?id=' + id })
|
||||
}
|
||||
33
yudao-ui-admin-vue3/src/api/crm/product/category/index.ts
Normal file
33
yudao-ui-admin-vue3/src/api/crm/product/category/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// TODO @zange:挪到 product 下,建个 category 包,挪进去哈;
|
||||
export interface ProductCategoryVO {
|
||||
id: number
|
||||
name: string
|
||||
parentId: number
|
||||
}
|
||||
|
||||
// 查询产品分类详情
|
||||
export const getProductCategory = async (id: number) => {
|
||||
return await request.get({ url: `/crm/product-category/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增产品分类
|
||||
export const createProductCategory = async (data: ProductCategoryVO) => {
|
||||
return await request.post({ url: `/crm/product-category/create`, data })
|
||||
}
|
||||
|
||||
// 修改产品分类
|
||||
export const updateProductCategory = async (data: ProductCategoryVO) => {
|
||||
return await request.put({ url: `/crm/product-category/update`, data })
|
||||
}
|
||||
|
||||
// 删除产品分类
|
||||
export const deleteProductCategory = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/product-category/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 产品分类列表
|
||||
export const getProductCategoryList = async (params) => {
|
||||
return await request.get({ url: `/crm/product-category/list`, params })
|
||||
}
|
||||
49
yudao-ui-admin-vue3/src/api/crm/product/index.ts
Normal file
49
yudao-ui-admin-vue3/src/api/crm/product/index.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ProductVO {
|
||||
id: number
|
||||
name: string
|
||||
no: string
|
||||
unit: number
|
||||
price: number
|
||||
status: number
|
||||
categoryId: number
|
||||
categoryName?: string
|
||||
description: string
|
||||
ownerUserId: number
|
||||
}
|
||||
|
||||
// 查询产品列表
|
||||
export const getProductPage = async (params) => {
|
||||
return await request.get({ url: `/crm/product/page`, params })
|
||||
}
|
||||
|
||||
// 获得产品精简列表
|
||||
export const getProductSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/product/simple-list` })
|
||||
}
|
||||
|
||||
// 查询产品详情
|
||||
export const getProduct = async (id: number) => {
|
||||
return await request.get({ url: `/crm/product/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增产品
|
||||
export const createProduct = async (data: ProductVO) => {
|
||||
return await request.post({ url: `/crm/product/create`, data })
|
||||
}
|
||||
|
||||
// 修改产品
|
||||
export const updateProduct = async (data: ProductVO) => {
|
||||
return await request.put({ url: `/crm/product/update`, data })
|
||||
}
|
||||
|
||||
// 删除产品
|
||||
export const deleteProduct = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/product/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出产品 Excel
|
||||
export const exportProduct = async (params) => {
|
||||
return await request.download({ url: `/crm/product/export-excel`, params })
|
||||
}
|
||||
71
yudao-ui-admin-vue3/src/api/crm/receivable/index.ts
Normal file
71
yudao-ui-admin-vue3/src/api/crm/receivable/index.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ReceivableVO {
|
||||
id: number
|
||||
no: string
|
||||
planId: number
|
||||
customerId: number
|
||||
customerName?: string
|
||||
contractId: number
|
||||
contract?: {
|
||||
no: string
|
||||
totalPrice: number
|
||||
}
|
||||
auditStatus: number
|
||||
processInstanceId: number
|
||||
returnTime: Date
|
||||
returnType: string
|
||||
price: number
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询回款列表
|
||||
export const getReceivablePage = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable/page`, params })
|
||||
}
|
||||
|
||||
// 查询回款列表
|
||||
export const getReceivablePageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询回款详情
|
||||
export const getReceivable = async (id: number) => {
|
||||
return await request.get({ url: `/crm/receivable/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增回款
|
||||
export const createReceivable = async (data: ReceivableVO) => {
|
||||
return await request.post({ url: `/crm/receivable/create`, data })
|
||||
}
|
||||
|
||||
// 修改回款
|
||||
export const updateReceivable = async (data: ReceivableVO) => {
|
||||
return await request.put({ url: `/crm/receivable/update`, data })
|
||||
}
|
||||
|
||||
// 删除回款
|
||||
export const deleteReceivable = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/receivable/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出回款 Excel
|
||||
export const exportReceivable = async (params) => {
|
||||
return await request.download({ url: `/crm/receivable/export-excel`, params })
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
export const submitReceivable = async (id: number) => {
|
||||
return await request.put({ url: `/crm/receivable/submit?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得待审核回款数量
|
||||
export const getAuditReceivableCount = async () => {
|
||||
return await request.get({ url: '/crm/receivable/audit-count' })
|
||||
}
|
||||
74
yudao-ui-admin-vue3/src/api/crm/receivable/plan/index.ts
Normal file
74
yudao-ui-admin-vue3/src/api/crm/receivable/plan/index.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ReceivablePlanVO {
|
||||
id: number
|
||||
period: number
|
||||
receivableId: number
|
||||
price: number
|
||||
returnTime: Date
|
||||
remindDays: number
|
||||
returnType: number
|
||||
remindTime: Date
|
||||
customerId: number
|
||||
customerName?: string
|
||||
contractId: number
|
||||
contractNo?: string
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
receivable?: {
|
||||
price: number
|
||||
returnTime: Date
|
||||
}
|
||||
}
|
||||
|
||||
// 查询回款计划列表
|
||||
export const getReceivablePlanPage = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/page`, params })
|
||||
}
|
||||
|
||||
// 查询回款计划列表
|
||||
export const getReceivablePlanPageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询回款计划详情
|
||||
export const getReceivablePlan = async (id: number) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/get?id=` + id })
|
||||
}
|
||||
|
||||
// 查询回款计划下拉数据
|
||||
export const getReceivablePlanSimpleList = async (customerId: number, contractId: number) => {
|
||||
return await request.get({
|
||||
url: `/crm/receivable-plan/simple-list?customerId=${customerId}&contractId=${contractId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增回款计划
|
||||
export const createReceivablePlan = async (data: ReceivablePlanVO) => {
|
||||
return await request.post({ url: `/crm/receivable-plan/create`, data })
|
||||
}
|
||||
|
||||
// 修改回款计划
|
||||
export const updateReceivablePlan = async (data: ReceivablePlanVO) => {
|
||||
return await request.put({ url: `/crm/receivable-plan/update`, data })
|
||||
}
|
||||
|
||||
// 删除回款计划
|
||||
export const deleteReceivablePlan = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/receivable-plan/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出回款计划 Excel
|
||||
export const exportReceivablePlan = async (params) => {
|
||||
return await request.download({ url: `/crm/receivable-plan/export-excel`, params })
|
||||
}
|
||||
|
||||
// 获得待回款提醒数量
|
||||
export const getReceivablePlanRemindCount = async () => {
|
||||
return await request.get({ url: '/crm/receivable-plan/remind-count' })
|
||||
}
|
||||
67
yudao-ui-admin-vue3/src/api/crm/statistics/rank.ts
Normal file
67
yudao-ui-admin-vue3/src/api/crm/statistics/rank.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StatisticsRankRespVO {
|
||||
count: number
|
||||
nickname: string
|
||||
deptName: string
|
||||
}
|
||||
|
||||
// 排行 API
|
||||
export const StatisticsRankApi = {
|
||||
// 获得合同排行榜
|
||||
getContractPriceRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contract-price-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 获得回款排行榜
|
||||
getReceivablePriceRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-receivable-price-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 签约合同排行
|
||||
getContractCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contract-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 产品销量排行
|
||||
getProductSalesRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-product-sales-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 新增客户数排行
|
||||
getCustomerCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-customer-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 新增联系人数排行
|
||||
getContactsCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contacts-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 跟进次数排行
|
||||
getFollowCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-follow-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 跟进客户数排行
|
||||
getFollowCustomerCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-follow-customer-count-rank',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
61
yudao-ui-admin-vue3/src/api/erp/finance/account/index.ts
Normal file
61
yudao-ui-admin-vue3/src/api/erp/finance/account/index.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 结算账户 VO
|
||||
export interface AccountVO {
|
||||
id: number // 结算账户编号
|
||||
no: string // 账户编码
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
defaultStatus: boolean // 是否默认
|
||||
name: string // 账户名称
|
||||
}
|
||||
|
||||
// ERP 结算账户 API
|
||||
export const AccountApi = {
|
||||
// 查询结算账户分页
|
||||
getAccountPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/account/page`, params })
|
||||
},
|
||||
|
||||
// 查询结算账户精简列表
|
||||
getAccountSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/account/simple-list` })
|
||||
},
|
||||
|
||||
// 查询结算账户详情
|
||||
getAccount: async (id: number) => {
|
||||
return await request.get({ url: `/erp/account/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增结算账户
|
||||
createAccount: async (data: AccountVO) => {
|
||||
return await request.post({ url: `/erp/account/create`, data })
|
||||
},
|
||||
|
||||
// 修改结算账户
|
||||
updateAccount: async (data: AccountVO) => {
|
||||
return await request.put({ url: `/erp/account/update`, data })
|
||||
},
|
||||
|
||||
// 修改结算账户默认状态
|
||||
updateAccountDefaultStatus: async (id: number, defaultStatus: boolean) => {
|
||||
return await request.put({
|
||||
url: `/erp/account/update-default-status`,
|
||||
params: {
|
||||
id,
|
||||
defaultStatus
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除结算账户
|
||||
deleteAccount: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/account/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出结算账户 Excel
|
||||
exportAccount: async (params: any) => {
|
||||
return await request.download({ url: `/erp/account/export-excel`, params })
|
||||
}
|
||||
}
|
||||
61
yudao-ui-admin-vue3/src/api/erp/finance/payment/index.ts
Normal file
61
yudao-ui-admin-vue3/src/api/erp/finance/payment/index.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 付款单 VO
|
||||
export interface FinancePaymentVO {
|
||||
id: number // 付款单编号
|
||||
no: string // 付款单号
|
||||
supplierId: number // 供应商编号
|
||||
paymentTime: Date // 付款时间
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 付款单 API
|
||||
export const FinancePaymentApi = {
|
||||
// 查询付款单分页
|
||||
getFinancePaymentPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/finance-payment/page`, params })
|
||||
},
|
||||
|
||||
// 查询付款单详情
|
||||
getFinancePayment: async (id: number) => {
|
||||
return await request.get({ url: `/erp/finance-payment/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付款单
|
||||
createFinancePayment: async (data: FinancePaymentVO) => {
|
||||
return await request.post({ url: `/erp/finance-payment/create`, data })
|
||||
},
|
||||
|
||||
// 修改付款单
|
||||
updateFinancePayment: async (data: FinancePaymentVO) => {
|
||||
return await request.put({ url: `/erp/finance-payment/update`, data })
|
||||
},
|
||||
|
||||
// 更新付款单的状态
|
||||
updateFinancePaymentStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/finance-payment/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除付款单
|
||||
deleteFinancePayment: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/finance-payment/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出付款单 Excel
|
||||
exportFinancePayment: async (params: any) => {
|
||||
return await request.download({ url: `/erp/finance-payment/export-excel`, params })
|
||||
}
|
||||
}
|
||||
61
yudao-ui-admin-vue3/src/api/erp/finance/receipt/index.ts
Normal file
61
yudao-ui-admin-vue3/src/api/erp/finance/receipt/index.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 收款单 VO
|
||||
export interface FinanceReceiptVO {
|
||||
id: number // 收款单编号
|
||||
no: string // 收款单号
|
||||
customerId: number // 客户编号
|
||||
receiptTime: Date // 收款时间
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 收款单 API
|
||||
export const FinanceReceiptApi = {
|
||||
// 查询收款单分页
|
||||
getFinanceReceiptPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/finance-receipt/page`, params })
|
||||
},
|
||||
|
||||
// 查询收款单详情
|
||||
getFinanceReceipt: async (id: number) => {
|
||||
return await request.get({ url: `/erp/finance-receipt/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增收款单
|
||||
createFinanceReceipt: async (data: FinanceReceiptVO) => {
|
||||
return await request.post({ url: `/erp/finance-receipt/create`, data })
|
||||
},
|
||||
|
||||
// 修改收款单
|
||||
updateFinanceReceipt: async (data: FinanceReceiptVO) => {
|
||||
return await request.put({ url: `/erp/finance-receipt/update`, data })
|
||||
},
|
||||
|
||||
// 更新收款单的状态
|
||||
updateFinanceReceiptStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/finance-receipt/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除收款单
|
||||
deleteFinanceReceipt: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/finance-receipt/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出收款单 Excel
|
||||
exportFinanceReceipt: async (params: any) => {
|
||||
return await request.download({ url: `/erp/finance-receipt/export-excel`, params })
|
||||
}
|
||||
}
|
||||
49
yudao-ui-admin-vue3/src/api/erp/product/category/index.ts
Normal file
49
yudao-ui-admin-vue3/src/api/erp/product/category/index.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品分类 VO
|
||||
export interface ProductCategoryVO {
|
||||
id: number // 分类编号
|
||||
parentId: number // 父分类编号
|
||||
name: string // 分类名称
|
||||
code: string // 分类编码
|
||||
sort: number // 分类排序
|
||||
status: number // 开启状态
|
||||
}
|
||||
|
||||
// ERP 产品分类 API
|
||||
export const ProductCategoryApi = {
|
||||
// 查询产品分类列表
|
||||
getProductCategoryList: async (params) => {
|
||||
return await request.get({ url: `/erp/product-category/list`, params })
|
||||
},
|
||||
|
||||
// 查询产品分类精简列表
|
||||
getProductCategorySimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product-category/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品分类详情
|
||||
getProductCategory: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product-category/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品分类
|
||||
createProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.post({ url: `/erp/product-category/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品分类
|
||||
updateProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.put({ url: `/erp/product-category/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品分类
|
||||
deleteProductCategory: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product-category/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品分类 Excel
|
||||
exportProductCategory: async (params) => {
|
||||
return await request.download({ url: `/erp/product-category/export-excel`, params })
|
||||
}
|
||||
}
|
||||
57
yudao-ui-admin-vue3/src/api/erp/product/product/index.ts
Normal file
57
yudao-ui-admin-vue3/src/api/erp/product/product/index.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品 VO
|
||||
export interface ProductVO {
|
||||
id: number // 产品编号
|
||||
name: string // 产品名称
|
||||
barCode: string // 产品条码
|
||||
categoryId: number // 产品类型编号
|
||||
unitId: number // 单位编号
|
||||
unitName?: string // 单位名字
|
||||
status: number // 产品状态
|
||||
standard: string // 产品规格
|
||||
remark: string // 产品备注
|
||||
expiryDay: number // 保质期天数
|
||||
weight: number // 重量(kg)
|
||||
purchasePrice: number // 采购价格,单位:元
|
||||
salePrice: number // 销售价格,单位:元
|
||||
minPrice: number // 最低价格,单位:元
|
||||
}
|
||||
|
||||
// ERP 产品 API
|
||||
export const ProductApi = {
|
||||
// 查询产品分页
|
||||
getProductPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/product/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品精简列表
|
||||
getProductSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品详情
|
||||
getProduct: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品
|
||||
createProduct: async (data: ProductVO) => {
|
||||
return await request.post({ url: `/erp/product/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品
|
||||
updateProduct: async (data: ProductVO) => {
|
||||
return await request.put({ url: `/erp/product/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品
|
||||
deleteProduct: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品 Excel
|
||||
exportProduct: async (params) => {
|
||||
return await request.download({ url: `/erp/product/export-excel`, params })
|
||||
}
|
||||
}
|
||||
46
yudao-ui-admin-vue3/src/api/erp/product/unit/index.ts
Normal file
46
yudao-ui-admin-vue3/src/api/erp/product/unit/index.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品单位 VO
|
||||
export interface ProductUnitVO {
|
||||
id: number // 单位编号
|
||||
name: string // 单位名字
|
||||
status: number // 单位状态
|
||||
}
|
||||
|
||||
// ERP 产品单位 API
|
||||
export const ProductUnitApi = {
|
||||
// 查询产品单位分页
|
||||
getProductUnitPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/product-unit/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品单位精简列表
|
||||
getProductUnitSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product-unit/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品单位详情
|
||||
getProductUnit: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product-unit/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品单位
|
||||
createProductUnit: async (data: ProductUnitVO) => {
|
||||
return await request.post({ url: `/erp/product-unit/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品单位
|
||||
updateProductUnit: async (data: ProductUnitVO) => {
|
||||
return await request.put({ url: `/erp/product-unit/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品单位
|
||||
deleteProductUnit: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product-unit/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品单位 Excel
|
||||
exportProductUnit: async (params) => {
|
||||
return await request.download({ url: `/erp/product-unit/export-excel`, params })
|
||||
}
|
||||
}
|
||||
64
yudao-ui-admin-vue3/src/api/erp/purchase/in/index.ts
Normal file
64
yudao-ui-admin-vue3/src/api/erp/purchase/in/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购入库 VO
|
||||
export interface PurchaseInVO {
|
||||
id: number // 入库工单编号
|
||||
no: string // 采购入库号
|
||||
customerId: number // 客户编号
|
||||
inTime: Date // 入库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 采购出库数量
|
||||
returnCount: number // 采购退货数量
|
||||
}
|
||||
|
||||
// ERP 采购入库 API
|
||||
export const PurchaseInApi = {
|
||||
// 查询采购入库分页
|
||||
getPurchaseInPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-in/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购入库详情
|
||||
getPurchaseIn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-in/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购入库
|
||||
createPurchaseIn: async (data: PurchaseInVO) => {
|
||||
return await request.post({ url: `/erp/purchase-in/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购入库
|
||||
updatePurchaseIn: async (data: PurchaseInVO) => {
|
||||
return await request.put({ url: `/erp/purchase-in/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购入库的状态
|
||||
updatePurchaseInStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-in/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购入库
|
||||
deletePurchaseIn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-in/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购入库 Excel
|
||||
exportPurchaseIn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-in/export-excel`, params })
|
||||
}
|
||||
}
|
||||
64
yudao-ui-admin-vue3/src/api/erp/purchase/order/index.ts
Normal file
64
yudao-ui-admin-vue3/src/api/erp/purchase/order/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购订单 VO
|
||||
export interface PurchaseOrderVO {
|
||||
id: number // 订单工单编号
|
||||
no: string // 采购订单号
|
||||
customerId: number // 客户编号
|
||||
orderTime: Date // 订单时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 采购出库数量
|
||||
returnCount: number // 采购退货数量
|
||||
}
|
||||
|
||||
// ERP 采购订单 API
|
||||
export const PurchaseOrderApi = {
|
||||
// 查询采购订单分页
|
||||
getPurchaseOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购订单详情
|
||||
getPurchaseOrder: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购订单
|
||||
createPurchaseOrder: async (data: PurchaseOrderVO) => {
|
||||
return await request.post({ url: `/erp/purchase-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购订单
|
||||
updatePurchaseOrder: async (data: PurchaseOrderVO) => {
|
||||
return await request.put({ url: `/erp/purchase-order/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购订单的状态
|
||||
updatePurchaseOrderStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-order/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购订单
|
||||
deletePurchaseOrder: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-order/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购订单 Excel
|
||||
exportPurchaseOrder: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-order/export-excel`, params })
|
||||
}
|
||||
}
|
||||
62
yudao-ui-admin-vue3/src/api/erp/purchase/return/index.ts
Normal file
62
yudao-ui-admin-vue3/src/api/erp/purchase/return/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购退货 VO
|
||||
export interface PurchaseReturnVO {
|
||||
id: number // 采购退货编号
|
||||
no: string // 采购退货号
|
||||
customerId: number // 客户编号
|
||||
returnTime: Date // 退货时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 采购退货 API
|
||||
export const PurchaseReturnApi = {
|
||||
// 查询采购退货分页
|
||||
getPurchaseReturnPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-return/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购退货详情
|
||||
getPurchaseReturn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-return/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购退货
|
||||
createPurchaseReturn: async (data: PurchaseReturnVO) => {
|
||||
return await request.post({ url: `/erp/purchase-return/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购退货
|
||||
updatePurchaseReturn: async (data: PurchaseReturnVO) => {
|
||||
return await request.put({ url: `/erp/purchase-return/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购退货的状态
|
||||
updatePurchaseReturnStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-return/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购退货
|
||||
deletePurchaseReturn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-return/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购退货 Excel
|
||||
exportPurchaseReturn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-return/export-excel`, params })
|
||||
}
|
||||
}
|
||||
58
yudao-ui-admin-vue3/src/api/erp/purchase/supplier/index.ts
Normal file
58
yudao-ui-admin-vue3/src/api/erp/purchase/supplier/index.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 供应商 VO
|
||||
export interface SupplierVO {
|
||||
id: number // 供应商编号
|
||||
name: string // 供应商名称
|
||||
contact: string // 联系人
|
||||
mobile: string // 手机号码
|
||||
telephone: string // 联系电话
|
||||
email: string // 电子邮箱
|
||||
fax: string // 传真
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
taxNo: string // 纳税人识别号
|
||||
taxPercent: number // 税率
|
||||
bankName: string // 开户行
|
||||
bankAccount: string // 开户账号
|
||||
bankAddress: string // 开户地址
|
||||
}
|
||||
|
||||
// ERP 供应商 API
|
||||
export const SupplierApi = {
|
||||
// 查询供应商分页
|
||||
getSupplierPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/supplier/page`, params })
|
||||
},
|
||||
|
||||
// 获得供应商精简列表
|
||||
getSupplierSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/supplier/simple-list` })
|
||||
},
|
||||
|
||||
// 查询供应商详情
|
||||
getSupplier: async (id: number) => {
|
||||
return await request.get({ url: `/erp/supplier/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增供应商
|
||||
createSupplier: async (data: SupplierVO) => {
|
||||
return await request.post({ url: `/erp/supplier/create`, data })
|
||||
},
|
||||
|
||||
// 修改供应商
|
||||
updateSupplier: async (data: SupplierVO) => {
|
||||
return await request.put({ url: `/erp/supplier/update`, data })
|
||||
},
|
||||
|
||||
// 删除供应商
|
||||
deleteSupplier: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/supplier/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出供应商 Excel
|
||||
exportSupplier: async (params) => {
|
||||
return await request.download({ url: `/erp/supplier/export-excel`, params })
|
||||
}
|
||||
}
|
||||
58
yudao-ui-admin-vue3/src/api/erp/sale/customer/index.ts
Normal file
58
yudao-ui-admin-vue3/src/api/erp/sale/customer/index.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 客户 VO
|
||||
export interface CustomerVO {
|
||||
id: number // 客户编号
|
||||
name: string // 客户名称
|
||||
contact: string // 联系人
|
||||
mobile: string // 手机号码
|
||||
telephone: string // 联系电话
|
||||
email: string // 电子邮箱
|
||||
fax: string // 传真
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
taxNo: string // 纳税人识别号
|
||||
taxPercent: number // 税率
|
||||
bankName: string // 开户行
|
||||
bankAccount: string // 开户账号
|
||||
bankAddress: string // 开户地址
|
||||
}
|
||||
|
||||
// ERP 客户 API
|
||||
export const CustomerApi = {
|
||||
// 查询客户分页
|
||||
getCustomerPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/customer/page`, params })
|
||||
},
|
||||
|
||||
// 查询客户精简列表
|
||||
getCustomerSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/customer/simple-list` })
|
||||
},
|
||||
|
||||
// 查询客户详情
|
||||
getCustomer: async (id: number) => {
|
||||
return await request.get({ url: `/erp/customer/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客户
|
||||
createCustomer: async (data: CustomerVO) => {
|
||||
return await request.post({ url: `/erp/customer/create`, data })
|
||||
},
|
||||
|
||||
// 修改客户
|
||||
updateCustomer: async (data: CustomerVO) => {
|
||||
return await request.put({ url: `/erp/customer/update`, data })
|
||||
},
|
||||
|
||||
// 删除客户
|
||||
deleteCustomer: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/customer/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客户 Excel
|
||||
exportCustomer: async (params) => {
|
||||
return await request.download({ url: `/erp/customer/export-excel`, params })
|
||||
}
|
||||
}
|
||||
64
yudao-ui-admin-vue3/src/api/erp/sale/order/index.ts
Normal file
64
yudao-ui-admin-vue3/src/api/erp/sale/order/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售订单 VO
|
||||
export interface SaleOrderVO {
|
||||
id: number // 订单工单编号
|
||||
no: string // 销售订单号
|
||||
customerId: number // 客户编号
|
||||
orderTime: Date // 订单时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 销售出库数量
|
||||
returnCount: number // 销售退货数量
|
||||
}
|
||||
|
||||
// ERP 销售订单 API
|
||||
export const SaleOrderApi = {
|
||||
// 查询销售订单分页
|
||||
getSaleOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售订单详情
|
||||
getSaleOrder: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售订单
|
||||
createSaleOrder: async (data: SaleOrderVO) => {
|
||||
return await request.post({ url: `/erp/sale-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售订单
|
||||
updateSaleOrder: async (data: SaleOrderVO) => {
|
||||
return await request.put({ url: `/erp/sale-order/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售订单的状态
|
||||
updateSaleOrderStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-order/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售订单
|
||||
deleteSaleOrder: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-order/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售订单 Excel
|
||||
exportSaleOrder: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-order/export-excel`, params })
|
||||
}
|
||||
}
|
||||
62
yudao-ui-admin-vue3/src/api/erp/sale/out/index.ts
Normal file
62
yudao-ui-admin-vue3/src/api/erp/sale/out/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售出库 VO
|
||||
export interface SaleOutVO {
|
||||
id: number // 销售出库编号
|
||||
no: string // 销售出库号
|
||||
customerId: number // 客户编号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 销售出库 API
|
||||
export const SaleOutApi = {
|
||||
// 查询销售出库分页
|
||||
getSaleOutPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-out/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售出库详情
|
||||
getSaleOut: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-out/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售出库
|
||||
createSaleOut: async (data: SaleOutVO) => {
|
||||
return await request.post({ url: `/erp/sale-out/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售出库
|
||||
updateSaleOut: async (data: SaleOutVO) => {
|
||||
return await request.put({ url: `/erp/sale-out/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售出库的状态
|
||||
updateSaleOutStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-out/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售出库
|
||||
deleteSaleOut: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-out/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售出库 Excel
|
||||
exportSaleOut: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-out/export-excel`, params })
|
||||
}
|
||||
}
|
||||
62
yudao-ui-admin-vue3/src/api/erp/sale/return/index.ts
Normal file
62
yudao-ui-admin-vue3/src/api/erp/sale/return/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售退货 VO
|
||||
export interface SaleReturnVO {
|
||||
id: number // 销售退货编号
|
||||
no: string // 销售退货号
|
||||
customerId: number // 客户编号
|
||||
returnTime: Date // 退货时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 销售退货 API
|
||||
export const SaleReturnApi = {
|
||||
// 查询销售退货分页
|
||||
getSaleReturnPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-return/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售退货详情
|
||||
getSaleReturn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-return/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售退货
|
||||
createSaleReturn: async (data: SaleReturnVO) => {
|
||||
return await request.post({ url: `/erp/sale-return/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售退货
|
||||
updateSaleReturn: async (data: SaleReturnVO) => {
|
||||
return await request.put({ url: `/erp/sale-return/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售退货的状态
|
||||
updateSaleReturnStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-return/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售退货
|
||||
deleteSaleReturn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-return/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售退货 Excel
|
||||
exportSaleReturn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-return/export-excel`, params })
|
||||
}
|
||||
}
|
||||
28
yudao-ui-admin-vue3/src/api/erp/statistics/purchase/index.ts
Normal file
28
yudao-ui-admin-vue3/src/api/erp/statistics/purchase/index.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购全局统计 VO
|
||||
export interface ErpPurchaseSummaryRespVO {
|
||||
todayPrice: number // 今日采购金额
|
||||
yesterdayPrice: number // 昨日采购金额
|
||||
monthPrice: number // 本月采购金额
|
||||
yearPrice: number // 今年采购金额
|
||||
}
|
||||
|
||||
// ERP 采购时间段统计 VO
|
||||
export interface ErpPurchaseTimeSummaryRespVO {
|
||||
time: string // 时间
|
||||
price: number // 采购金额
|
||||
}
|
||||
|
||||
// ERP 采购统计 API
|
||||
export const PurchaseStatisticsApi = {
|
||||
// 获得采购统计
|
||||
getPurchaseSummary: async (): Promise<ErpPurchaseSummaryRespVO> => {
|
||||
return await request.get({ url: `/erp/purchase-statistics/summary` })
|
||||
},
|
||||
|
||||
// 获得采购时间段统计
|
||||
getPurchaseTimeSummary: async (): Promise<ErpPurchaseTimeSummaryRespVO[]> => {
|
||||
return await request.get({ url: `/erp/purchase-statistics/time-summary` })
|
||||
}
|
||||
}
|
||||
28
yudao-ui-admin-vue3/src/api/erp/statistics/sale/index.ts
Normal file
28
yudao-ui-admin-vue3/src/api/erp/statistics/sale/index.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售全局统计 VO
|
||||
export interface ErpSaleSummaryRespVO {
|
||||
todayPrice: number // 今日销售金额
|
||||
yesterdayPrice: number // 昨日销售金额
|
||||
monthPrice: number // 本月销售金额
|
||||
yearPrice: number // 今年销售金额
|
||||
}
|
||||
|
||||
// ERP 销售时间段统计 VO
|
||||
export interface ErpSaleTimeSummaryRespVO {
|
||||
time: string // 时间
|
||||
price: number // 销售金额
|
||||
}
|
||||
|
||||
// ERP 销售统计 API
|
||||
export const SaleStatisticsApi = {
|
||||
// 获得销售统计
|
||||
getSaleSummary: async (): Promise<ErpSaleSummaryRespVO> => {
|
||||
return await request.get({ url: `/erp/sale-statistics/summary` })
|
||||
},
|
||||
|
||||
// 获得销售时间段统计
|
||||
getSaleTimeSummary: async (): Promise<ErpSaleTimeSummaryRespVO[]> => {
|
||||
return await request.get({ url: `/erp/sale-statistics/time-summary` })
|
||||
}
|
||||
}
|
||||
61
yudao-ui-admin-vue3/src/api/erp/stock/check/index.ts
Normal file
61
yudao-ui-admin-vue3/src/api/erp/stock/check/index.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 库存盘点单 VO
|
||||
export interface StockCheckVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 库存盘点单 API
|
||||
export const StockCheckApi = {
|
||||
// 查询库存盘点单分页
|
||||
getStockCheckPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-check/page`, params })
|
||||
},
|
||||
|
||||
// 查询库存盘点单详情
|
||||
getStockCheck: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-check/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增库存盘点单
|
||||
createStockCheck: async (data: StockCheckVO) => {
|
||||
return await request.post({ url: `/erp/stock-check/create`, data })
|
||||
},
|
||||
|
||||
// 修改库存盘点单
|
||||
updateStockCheck: async (data: StockCheckVO) => {
|
||||
return await request.put({ url: `/erp/stock-check/update`, data })
|
||||
},
|
||||
|
||||
// 更新库存盘点单的状态
|
||||
updateStockCheckStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-check/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除库存盘点单
|
||||
deleteStockCheck: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-check/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出库存盘点单 Excel
|
||||
exportStockCheck: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-check/export-excel`, params })
|
||||
}
|
||||
}
|
||||
62
yudao-ui-admin-vue3/src/api/erp/stock/in/index.ts
Normal file
62
yudao-ui-admin-vue3/src/api/erp/stock/in/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 其它入库单 VO
|
||||
export interface StockInVO {
|
||||
id: number // 入库编号
|
||||
no: string // 入库单号
|
||||
supplierId: number // 供应商编号
|
||||
inTime: Date // 入库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 其它入库单 API
|
||||
export const StockInApi = {
|
||||
// 查询其它入库单分页
|
||||
getStockInPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-in/page`, params })
|
||||
},
|
||||
|
||||
// 查询其它入库单详情
|
||||
getStockIn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-in/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增其它入库单
|
||||
createStockIn: async (data: StockInVO) => {
|
||||
return await request.post({ url: `/erp/stock-in/create`, data })
|
||||
},
|
||||
|
||||
// 修改其它入库单
|
||||
updateStockIn: async (data: StockInVO) => {
|
||||
return await request.put({ url: `/erp/stock-in/update`, data })
|
||||
},
|
||||
|
||||
// 更新其它入库单的状态
|
||||
updateStockInStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-in/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除其它入库单
|
||||
deleteStockIn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-in/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出其它入库单 Excel
|
||||
exportStockIn: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-in/export-excel`, params })
|
||||
}
|
||||
}
|
||||
61
yudao-ui-admin-vue3/src/api/erp/stock/move/index.ts
Normal file
61
yudao-ui-admin-vue3/src/api/erp/stock/move/index.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 库存调度单 VO
|
||||
export interface StockMoveVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 库存调度单 API
|
||||
export const StockMoveApi = {
|
||||
// 查询库存调度单分页
|
||||
getStockMovePage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-move/page`, params })
|
||||
},
|
||||
|
||||
// 查询库存调度单详情
|
||||
getStockMove: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-move/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增库存调度单
|
||||
createStockMove: async (data: StockMoveVO) => {
|
||||
return await request.post({ url: `/erp/stock-move/create`, data })
|
||||
},
|
||||
|
||||
// 修改库存调度单
|
||||
updateStockMove: async (data: StockMoveVO) => {
|
||||
return await request.put({ url: `/erp/stock-move/update`, data })
|
||||
},
|
||||
|
||||
// 更新库存调度单的状态
|
||||
updateStockMoveStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-move/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除库存调度单
|
||||
deleteStockMove: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-move/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出库存调度单 Excel
|
||||
exportStockMove: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-move/export-excel`, params })
|
||||
}
|
||||
}
|
||||
62
yudao-ui-admin-vue3/src/api/erp/stock/out/index.ts
Normal file
62
yudao-ui-admin-vue3/src/api/erp/stock/out/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 其它出库单 VO
|
||||
export interface StockOutVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
customerId: number // 客户编号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 其它出库单 API
|
||||
export const StockOutApi = {
|
||||
// 查询其它出库单分页
|
||||
getStockOutPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-out/page`, params })
|
||||
},
|
||||
|
||||
// 查询其它出库单详情
|
||||
getStockOut: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-out/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增其它出库单
|
||||
createStockOut: async (data: StockOutVO) => {
|
||||
return await request.post({ url: `/erp/stock-out/create`, data })
|
||||
},
|
||||
|
||||
// 修改其它出库单
|
||||
updateStockOut: async (data: StockOutVO) => {
|
||||
return await request.put({ url: `/erp/stock-out/update`, data })
|
||||
},
|
||||
|
||||
// 更新其它出库单的状态
|
||||
updateStockOutStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-out/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除其它出库单
|
||||
deleteStockOut: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-out/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出其它出库单 Excel
|
||||
exportStockOut: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-out/export-excel`, params })
|
||||
}
|
||||
}
|
||||
32
yudao-ui-admin-vue3/src/api/erp/stock/record/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/erp/stock/record/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品库存明细 VO
|
||||
export interface StockRecordVO {
|
||||
id: number // 编号
|
||||
productId: number // 产品编号
|
||||
warehouseId: number // 仓库编号
|
||||
count: number // 出入库数量
|
||||
totalCount: number // 总库存量
|
||||
bizType: number // 业务类型
|
||||
bizId: number // 业务编号
|
||||
bizItemId: number // 业务项编号
|
||||
bizNo: string // 业务单号
|
||||
}
|
||||
|
||||
// ERP 产品库存明细 API
|
||||
export const StockRecordApi = {
|
||||
// 查询产品库存明细分页
|
||||
getStockRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品库存明细详情
|
||||
getStockRecord: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品库存明细 Excel
|
||||
exportStockRecord: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-record/export-excel`, params })
|
||||
}
|
||||
}
|
||||
41
yudao-ui-admin-vue3/src/api/erp/stock/stock/index.ts
Normal file
41
yudao-ui-admin-vue3/src/api/erp/stock/stock/index.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品库存 VO
|
||||
export interface StockVO {
|
||||
// 编号
|
||||
id: number
|
||||
// 产品编号
|
||||
productId: number
|
||||
// 仓库编号
|
||||
warehouseId: number
|
||||
// 库存数量
|
||||
count: number
|
||||
}
|
||||
|
||||
// ERP 产品库存 API
|
||||
export const StockApi = {
|
||||
// 查询产品库存分页
|
||||
getStockPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品库存详情
|
||||
getStock: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock/get?id=` + id })
|
||||
},
|
||||
|
||||
// 查询产品库存详情
|
||||
getStock2: async (productId: number, warehouseId: number) => {
|
||||
return await request.get({ url: `/erp/stock/get`, params: { productId, warehouseId } })
|
||||
},
|
||||
|
||||
// 获得产品库存数量
|
||||
getStockCount: async (productId: number) => {
|
||||
return await request.get({ url: `/erp/stock/get-count`, params: { productId } })
|
||||
},
|
||||
|
||||
// 导出产品库存 Excel
|
||||
exportStock: async (params) => {
|
||||
return await request.download({ url: `/erp/stock/export-excel`, params })
|
||||
}
|
||||
}
|
||||
64
yudao-ui-admin-vue3/src/api/erp/stock/warehouse/index.ts
Normal file
64
yudao-ui-admin-vue3/src/api/erp/stock/warehouse/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// ERP 仓库 VO
|
||||
export interface WarehouseVO {
|
||||
id: number // 仓库编号
|
||||
name: string // 仓库名称
|
||||
address: string // 仓库地址
|
||||
sort: number // 排序
|
||||
remark: string // 备注
|
||||
principal: string // 负责人
|
||||
warehousePrice: number // 仓储费,单位:元
|
||||
truckagePrice: number // 搬运费,单位:元
|
||||
status: number // 开启状态
|
||||
defaultStatus: boolean // 是否默认
|
||||
}
|
||||
|
||||
// ERP 仓库 API
|
||||
export const WarehouseApi = {
|
||||
// 查询仓库分页
|
||||
getWarehousePage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/warehouse/page`, params })
|
||||
},
|
||||
|
||||
// 查询仓库精简列表
|
||||
getWarehouseSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/warehouse/simple-list` })
|
||||
},
|
||||
|
||||
// 查询仓库详情
|
||||
getWarehouse: async (id: number) => {
|
||||
return await request.get({ url: `/erp/warehouse/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增仓库
|
||||
createWarehouse: async (data: WarehouseVO) => {
|
||||
return await request.post({ url: `/erp/warehouse/create`, data })
|
||||
},
|
||||
|
||||
// 修改仓库
|
||||
updateWarehouse: async (data: WarehouseVO) => {
|
||||
return await request.put({ url: `/erp/warehouse/update`, data })
|
||||
},
|
||||
|
||||
// 修改仓库默认状态
|
||||
updateWarehouseDefaultStatus: async (id: number, defaultStatus: boolean) => {
|
||||
return await request.put({
|
||||
url: `/erp/warehouse/update-default-status`,
|
||||
params: {
|
||||
id,
|
||||
defaultStatus
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除仓库
|
||||
deleteWarehouse: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/warehouse/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出仓库 Excel
|
||||
exportWarehouse: async (params) => {
|
||||
return await request.download({ url: `/erp/warehouse/export-excel`, params })
|
||||
}
|
||||
}
|
||||
30
yudao-ui-admin-vue3/src/api/infra/apiAccessLog/index.ts
Normal file
30
yudao-ui-admin-vue3/src/api/infra/apiAccessLog/index.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ApiAccessLogVO {
|
||||
id: number
|
||||
traceId: string
|
||||
userId: number
|
||||
userType: number
|
||||
applicationName: string
|
||||
requestMethod: string
|
||||
requestParams: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
beginTime: Date
|
||||
endTIme: Date
|
||||
duration: number
|
||||
resultCode: number
|
||||
resultMsg: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiAccessLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/api-access-log/page', params })
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiAccessLog = (params) => {
|
||||
return request.download({ url: '/infra/api-access-log/export-excel', params })
|
||||
}
|
||||
48
yudao-ui-admin-vue3/src/api/infra/apiErrorLog/index.ts
Normal file
48
yudao-ui-admin-vue3/src/api/infra/apiErrorLog/index.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ApiErrorLogVO {
|
||||
id: number
|
||||
traceId: string
|
||||
userId: number
|
||||
userType: number
|
||||
applicationName: string
|
||||
requestMethod: string
|
||||
requestParams: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
exceptionTime: Date
|
||||
exceptionName: string
|
||||
exceptionMessage: string
|
||||
exceptionRootCauseMessage: string
|
||||
exceptionStackTrace: string
|
||||
exceptionClassName: string
|
||||
exceptionFileName: string
|
||||
exceptionMethodName: string
|
||||
exceptionLineNumber: number
|
||||
processUserId: number
|
||||
processStatus: number
|
||||
processTime: Date
|
||||
resultCode: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiErrorLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/api-error-log/page', params })
|
||||
}
|
||||
|
||||
// 更新 API 错误日志的处理状态
|
||||
export const updateApiErrorLogPage = (id: number, processStatus: number) => {
|
||||
return request.put({
|
||||
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
||||
})
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiErrorLog = (params) => {
|
||||
return request.download({
|
||||
url: '/infra/api-error-log/export-excel',
|
||||
params
|
||||
})
|
||||
}
|
||||
123
yudao-ui-admin-vue3/src/api/infra/codegen/index.ts
Normal file
123
yudao-ui-admin-vue3/src/api/infra/codegen/index.ts
Normal file
@ -0,0 +1,123 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type CodegenTableVO = {
|
||||
id: number
|
||||
tableId: number
|
||||
isParentMenuIdValid: boolean
|
||||
dataSourceConfigId: number
|
||||
scene: number
|
||||
tableName: string
|
||||
tableComment: string
|
||||
remark: string
|
||||
moduleName: string
|
||||
businessName: string
|
||||
className: string
|
||||
classComment: string
|
||||
author: string
|
||||
createTime: Date
|
||||
updateTime: Date
|
||||
templateType: number
|
||||
parentMenuId: number
|
||||
}
|
||||
|
||||
export type CodegenColumnVO = {
|
||||
id: number
|
||||
tableId: number
|
||||
columnName: string
|
||||
dataType: string
|
||||
columnComment: string
|
||||
nullable: number
|
||||
primaryKey: number
|
||||
autoIncrement: boolean
|
||||
ordinalPosition: number
|
||||
javaType: string
|
||||
javaField: string
|
||||
dictType: string
|
||||
example: string
|
||||
createOperation: number
|
||||
updateOperation: number
|
||||
listOperation: number
|
||||
listOperationCondition: string
|
||||
listOperationResult: number
|
||||
htmlType: string
|
||||
}
|
||||
|
||||
export type DatabaseTableVO = {
|
||||
name: string
|
||||
comment: string
|
||||
}
|
||||
|
||||
export type CodegenDetailVO = {
|
||||
table: CodegenTableVO
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenPreviewVO = {
|
||||
filePath: string
|
||||
code: string
|
||||
}
|
||||
|
||||
export type CodegenUpdateReqVO = {
|
||||
table: CodegenTableVO | any
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenCreateListReqVO = {
|
||||
dataSourceConfigId: number
|
||||
tableNames: string[]
|
||||
}
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTableList = (dataSourceConfigId: number) => {
|
||||
return request.get({ url: '/infra/codegen/table/list?dataSourceConfigId=' + dataSourceConfigId })
|
||||
}
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTablePage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/codegen/table/page', params })
|
||||
}
|
||||
|
||||
// 查询详情代码生成表定义
|
||||
export const getCodegenTable = (id: number) => {
|
||||
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||
}
|
||||
|
||||
// 新增代码生成表定义
|
||||
export const createCodegenTable = (data: CodegenCreateListReqVO) => {
|
||||
return request.post({ url: '/infra/codegen/create', data })
|
||||
}
|
||||
|
||||
// 修改代码生成表定义
|
||||
export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
|
||||
return request.put({ url: '/infra/codegen/update', data })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||
export const syncCodegenFromDB = (id: number) => {
|
||||
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export const previewCodegen = (id: number) => {
|
||||
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
|
||||
}
|
||||
|
||||
// 下载生成代码
|
||||
export const downloadCodegen = (id: number) => {
|
||||
return request.download({ url: '/infra/codegen/download?tableId=' + id })
|
||||
}
|
||||
|
||||
// 获得表定义
|
||||
export const getSchemaTableList = (params) => {
|
||||
return request.get({ url: '/infra/codegen/db/table/list', params })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,创建代码生成器的表定义
|
||||
export const createCodegenList = (data) => {
|
||||
return request.post({ url: '/infra/codegen/create-list', data })
|
||||
}
|
||||
|
||||
// 删除代码生成表定义
|
||||
export const deleteCodegenTable = (id: number) => {
|
||||
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||
}
|
||||
48
yudao-ui-admin-vue3/src/api/infra/config/index.ts
Normal file
48
yudao-ui-admin-vue3/src/api/infra/config/index.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ConfigVO {
|
||||
id: number | undefined
|
||||
category: string
|
||||
name: string
|
||||
key: string
|
||||
value: string
|
||||
type: number
|
||||
visible: boolean
|
||||
remark: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询参数列表
|
||||
export const getConfigPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/config/page', params })
|
||||
}
|
||||
|
||||
// 查询参数详情
|
||||
export const getConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export const getConfigKey = (configKey: string) => {
|
||||
return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
||||
}
|
||||
|
||||
// 新增参数
|
||||
export const createConfig = (data: ConfigVO) => {
|
||||
return request.post({ url: '/infra/config/create', data })
|
||||
}
|
||||
|
||||
// 修改参数
|
||||
export const updateConfig = (data: ConfigVO) => {
|
||||
return request.put({ url: '/infra/config/update', data })
|
||||
}
|
||||
|
||||
// 删除参数
|
||||
export const deleteConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export const exportConfig = (params) => {
|
||||
return request.download({ url: '/infra/config/export', params })
|
||||
}
|
||||
35
yudao-ui-admin-vue3/src/api/infra/dataSourceConfig/index.ts
Normal file
35
yudao-ui-admin-vue3/src/api/infra/dataSourceConfig/index.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DataSourceConfigVO {
|
||||
id: number | undefined
|
||||
name: string
|
||||
url: string
|
||||
username: string
|
||||
password: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
// 新增数据源配置
|
||||
export const createDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||
return request.post({ url: '/infra/data-source-config/create', data })
|
||||
}
|
||||
|
||||
// 修改数据源配置
|
||||
export const updateDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||
return request.put({ url: '/infra/data-source-config/update', data })
|
||||
}
|
||||
|
||||
// 删除数据源配置
|
||||
export const deleteDataSourceConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 查询数据源配置详情
|
||||
export const getDataSourceConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 查询数据源配置列表
|
||||
export const getDataSourceConfigList = () => {
|
||||
return request.get({ url: '/infra/data-source-config/list' })
|
||||
}
|
||||
16
yudao-ui-admin-vue3/src/api/infra/dbDoc/index.ts
Normal file
16
yudao-ui-admin-vue3/src/api/infra/dbDoc/index.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 导出Html
|
||||
export const exportHtml = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-html' })
|
||||
}
|
||||
|
||||
// 导出Word
|
||||
export const exportWord = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-word' })
|
||||
}
|
||||
|
||||
// 导出Markdown
|
||||
export const exportMarkdown = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-markdown' })
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user