Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
A
ai-chat-xy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Yang
ai-chat-xy
Commits
c49ab07e
Commit
c49ab07e
authored
Jun 15, 2026
by
David Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 应用切换
parent
3489b2a6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
169 additions
and
25 deletions
+169
-25
.umirc.ts
.umirc.ts
+3
-3
manifest.json
public/manifest.json
+6
-3
附件1_费用开支明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
...ic/templates/附件1_费用开支明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
+0
-0
附件2_可抵扣交通费明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
.../templates/附件2_可抵扣交通费明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
+0
-0
附件3_电子发票登记表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
...ic/templates/附件3_电子发票登记表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
+0
-0
index.jsx
src/components/ApplicationSwitcherDialog/index.jsx
+0
-0
index.jsx
src/components/LoginModal/index.jsx
+124
-8
index.jsx
src/layouts/index.jsx
+15
-10
index.jsx
src/pages/Chat/index.jsx
+0
-0
index.jsx
src/pages/Home/index.jsx
+0
-0
DataService.js
src/services/DataService.js
+21
-1
No files found.
.umirc.ts
View file @
c49ab07e
import
{
defineConfig
}
from
'@umijs/max'
;
import
{
defineConfig
}
from
'@umijs/max'
;
export
default
defineConfig
({
export
default
defineConfig
({
base
:
'
ai
'
,
base
:
'
/ai_chat/
'
,
publicPath
:
'/ai/'
,
publicPath
:
'/ai
_chat
/'
,
antd
:
{},
antd
:
{},
access
:
{},
access
:
{},
model
:
{},
model
:
{},
...
@@ -33,7 +33,7 @@ export default defineConfig({
...
@@ -33,7 +33,7 @@ export default defineConfig({
npmClient
:
'pnpm'
,
npmClient
:
'pnpm'
,
proxy
:
{
proxy
:
{
'/api'
:
{
'/api'
:
{
target
:
'https://
awm.rsmchina.com.cn
/api'
,
target
:
'https://
xy.streams7.com
/api'
,
// target: 'http://localhost:3000',
// target: 'http://localhost:3000',
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
},
pathRewrite
:
{
'^/api'
:
''
},
...
...
public/manifest.json
View file @
c49ab07e
{
{
"name"
:
"S-Agent"
,
"name"
:
"ai_chat"
,
"version"
:
"1.0.26"
,
"version"
:
"1.0.1"
,
"build"
:
"1"
"build"
:
"abc"
,
"description"
:
"merge master"
,
"date"
:
"2025-07-14 19:27:20"
,
"author"
:
"yang"
}
}
public/templates/附件1_费用开支明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
deleted
100644 → 0
View file @
3489b2a6
File deleted
public/templates/附件2_可抵扣交通费明细表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
deleted
100644 → 0
View file @
3489b2a6
File deleted
public/templates/附件3_电子发票登记表_XXX_XXX有限公司2024年产品审计及其他鉴证业务.xlsx
deleted
100644 → 0
View file @
3489b2a6
File deleted
src/components/ApplicationSwitcherDialog/index.jsx
0 → 100644
View file @
c49ab07e
This diff is collapsed.
Click to expand it.
src/components/LoginModal/index.jsx
View file @
c49ab07e
import
{
login
}
from
'@/services/DataService'
;
import
{
getCaptcha
,
login
}
from
'@/services/DataService'
;
import
{
LockOutlined
,
UserOutlined
}
from
'@ant-design/icons'
;
import
{
LockOutlined
,
ReloadOutlined
,
SafetyCertificateOutlined
,
UserOutlined
,
}
from
'@ant-design/icons'
;
import
{
LoginForm
,
ProFormText
}
from
'@ant-design/pro-components'
;
import
{
LoginForm
,
ProFormText
}
from
'@ant-design/pro-components'
;
import
{
Alert
,
Flex
,
Modal
,
Typography
}
from
'antd'
;
import
{
Alert
,
Button
,
Flex
,
Modal
,
Typography
}
from
'antd'
;
import
{
createStyles
}
from
'antd-style'
;
import
{
createStyles
}
from
'antd-style'
;
import
{
useState
}
from
'react'
;
import
{
use
Callback
,
useEffect
,
useRef
,
use
State
}
from
'react'
;
const
useStyle
=
createStyles
(({
css
})
=>
{
const
useStyle
=
createStyles
(({
css
})
=>
{
return
{
return
{
...
@@ -14,10 +19,10 @@ const useStyle = createStyles(({ css }) => {
...
@@ -14,10 +19,10 @@ const useStyle = createStyles(({ css }) => {
overflow: hidden;
overflow: hidden;
background: radial-gradient(
background: radial-gradient(
circle at top right,
circle at top right,
rgba(
125, 211, 252, 0.22
),
rgba(
251, 207, 232, 0.26
),
transparent 20%
transparent 20%
),
),
linear-gradient(180deg, #ffffff 0%, #f
8fbff
100%);
linear-gradient(180deg, #ffffff 0%, #f
ff7f7
100%);
}
}
.ant-modal-body {
.ant-modal-body {
...
@@ -33,7 +38,7 @@ const useStyle = createStyles(({ css }) => {
...
@@ -33,7 +38,7 @@ const useStyle = createStyles(({ css }) => {
padding: 38px 34px;
padding: 38px 34px;
background: radial-gradient(
background: radial-gradient(
circle at top left,
circle at top left,
rgba(
0, 166, 232
, 0.22),
rgba(
200, 30, 58
, 0.22),
transparent 22%
transparent 22%
),
),
linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
...
@@ -132,6 +137,8 @@ const useStyle = createStyles(({ css }) => {
...
@@ -132,6 +137,8 @@ const useStyle = createStyles(({ css }) => {
height: 46px;
height: 46px;
border-radius: 16px;
border-radius: 16px;
font-weight: 600;
font-weight: 600;
background: linear-gradient(135deg, #c81e3a 0%, #9f1239 100%);
border: none;
}
}
`
,
`
,
formInner
:
css
`
formInner
:
css
`
...
@@ -142,14 +149,76 @@ const useStyle = createStyles(({ css }) => {
...
@@ -142,14 +149,76 @@ const useStyle = createStyles(({ css }) => {
margin-bottom: 20px;
margin-bottom: 20px;
border-radius: 14px;
border-radius: 14px;
`
,
`
,
captchaRow
:
css
`
display: grid;
grid-template-columns: minmax(0, 1fr) 128px;
gap: 12px;
align-items: flex-start;
.ant-form-item {
margin-bottom: 0;
}
`
,
captchaButton
:
css
`
height: 48px;
border-radius: 16px;
padding: 0 10px;
overflow: hidden;
border-color: #e2e8f0;
color: #64748b;
.ant-btn-icon {
display: inline-flex;
}
`
,
captchaImage
:
css
`
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
svg {
width: 100%;
height: 100%;
display: block;
}
`
,
};
};
});
});
export
default
(
props
)
=>
{
export
default
(
props
)
=>
{
const
{
onError
,
onSuccess
}
=
props
;
const
{
onError
,
onSuccess
}
=
props
;
const
[
errorMessage
,
setErrorMessage
]
=
useState
(
null
);
const
[
errorMessage
,
setErrorMessage
]
=
useState
(
null
);
const
[
captchaData
,
setCaptchaData
]
=
useState
(
null
);
const
[
captchaLoading
,
setCaptchaLoading
]
=
useState
(
false
);
const
formRef
=
useRef
();
const
{
styles
}
=
useStyle
();
const
{
styles
}
=
useStyle
();
const
refreshCaptcha
=
useCallback
(
async
()
=>
{
setCaptchaLoading
(
true
);
try
{
const
nextCaptcha
=
await
getCaptcha
();
setCaptchaData
(
nextCaptcha
||
null
);
}
catch
(
error
)
{
const
nextErrorMessage
=
error
.
response
?.
data
?.
message
||
error
.
message
||
'验证码加载失败'
;
setCaptchaData
(
null
);
setErrorMessage
(
nextErrorMessage
);
}
finally
{
setCaptchaLoading
(
false
);
}
},
[]);
useEffect
(()
=>
{
if
(
props
.
open
)
{
setErrorMessage
(
null
);
formRef
.
current
?.
setFieldsValue
({
captcha
:
undefined
});
refreshCaptcha
();
}
},
[
props
.
open
,
refreshCaptcha
]);
return
(
return
(
<
Modal
<
Modal
{
...
props
}
{
...
props
}
...
@@ -189,12 +258,18 @@ export default (props) => {
...
@@ -189,12 +258,18 @@ export default (props) => {
<
div
className=
{
styles
.
formPane
}
>
<
div
className=
{
styles
.
formPane
}
>
<
div
className=
{
styles
.
formInner
}
>
<
div
className=
{
styles
.
formInner
}
>
<
LoginForm
<
LoginForm
formRef=
{
formRef
}
logo=
"https://oss.streams7.com/rsm/BfNsqGPGTKE2.svg"
logo=
"https://oss.streams7.com/rsm/BfNsqGPGTKE2.svg"
title=
"智能助手"
title=
"智能助手"
subTitle=
"登录后继续使用统一 AI 对话工作台"
subTitle=
"登录后继续使用统一 AI 对话工作台"
onFinish=
{
async
(
form
)
=>
{
onFinish=
{
async
(
form
)
=>
{
try
{
try
{
const
userInfo
=
await
login
(
form
.
username
,
form
.
password
);
const
userInfo
=
await
login
(
form
.
username
,
form
.
password
,
form
.
captcha
,
captchaData
?.
token
,
);
localStorage
.
setItem
(
localStorage
.
setItem
(
'current_user'
,
'current_user'
,
...
@@ -211,6 +286,8 @@ export default (props) => {
...
@@ -211,6 +286,8 @@ export default (props) => {
error
.
message
||
error
.
message
||
'网络错误'
;
'网络错误'
;
setErrorMessage
(
nextErrorMessage
);
setErrorMessage
(
nextErrorMessage
);
formRef
.
current
?.
setFieldsValue
({
captcha
:
undefined
});
refreshCaptcha
();
onError
?.(
nextErrorMessage
,
error
);
onError
?.(
nextErrorMessage
,
error
);
}
}
}
}
}
}
...
@@ -244,6 +321,45 @@ export default (props) => {
...
@@ -244,6 +321,45 @@ export default (props) => {
},
},
]
}
]
}
/>
/>
<
div
className=
{
styles
.
captchaRow
}
>
<
ProFormText
name=
"captcha"
fieldProps=
{
{
size
:
'large'
,
prefix
:
(
<
SafetyCertificateOutlined
className=
{
'prefixIcon'
}
/>
),
}
}
placeholder=
"验证码"
rules=
{
[
{
required
:
true
,
message
:
'请输入验证码'
,
},
]
}
/>
<
Button
htmlType=
"button"
className=
{
styles
.
captchaButton
}
loading=
{
captchaLoading
}
disabled=
{
captchaLoading
}
icon=
{
captchaData
?.
image
?
undefined
:
<
ReloadOutlined
/>
}
onClick=
{
()
=>
{
setErrorMessage
(
null
);
formRef
.
current
?.
setFieldsValue
({
captcha
:
undefined
});
refreshCaptcha
();
}
}
>
{
captchaData
?.
image
?
(
<
span
className=
{
styles
.
captchaImage
}
dangerouslySetInnerHTML=
{
{
__html
:
captchaData
.
image
}
}
/>
)
:
(
'刷新'
)
}
</
Button
>
</
div
>
{
errorMessage
&&
(
{
errorMessage
&&
(
<
Alert
<
Alert
className=
{
styles
.
error
}
className=
{
styles
.
error
}
...
...
src/layouts/index.jsx
View file @
c49ab07e
...
@@ -12,17 +12,19 @@ const GlobalStyle = createGlobalStyle`
...
@@ -12,17 +12,19 @@ const GlobalStyle = createGlobalStyle`
--app-shell-bg:
--app-shell-bg:
radial-gradient(
radial-gradient(
circle at top left,
circle at top left,
rgba(
0, 156, 217, 0.16
),
rgba(
200, 30, 58, 0.14
),
transparent 26%
transparent 26%
),
),
radial-gradient(
radial-gradient(
circle at
bottom right
,
circle at
right center
,
rgba(1
26, 34, 206
, 0.08),
rgba(1
59, 18, 57
, 0.08),
transparent 2
6
%
transparent 2
4
%
),
),
linear-gradient(180deg, #f
8fbff 0%, #eef4fb
100%);
linear-gradient(180deg, #f
ff7f7 0%, #fff1f2
100%);
--app-surface: rgba(255, 255, 255, 0.86);
--app-surface: rgba(255, 255, 255, 0.86);
--app-surface-strong: #ffffff;
--app-surface-strong: #ffffff;
--app-brand: #c81e3a;
--app-brand-strong: #9f1239;
--app-sidebar: #0f172a;
--app-sidebar: #0f172a;
--app-sidebar-soft: rgba(30, 41, 59, 0.9);
--app-sidebar-soft: rgba(30, 41, 59, 0.9);
--app-border: rgba(148, 163, 184, 0.2);
--app-border: rgba(148, 163, 184, 0.2);
...
@@ -38,7 +40,10 @@ const GlobalStyle = createGlobalStyle`
...
@@ -38,7 +40,10 @@ const GlobalStyle = createGlobalStyle`
html,
html,
body,
body,
#root {
#root {
width: 100%;
height: 100%;
min-height: 100%;
min-height: 100%;
overflow: hidden;
}
}
body {
body {
...
@@ -84,12 +89,12 @@ const GlobalStyle = createGlobalStyle`
...
@@ -84,12 +89,12 @@ const GlobalStyle = createGlobalStyle`
export
default
()
=>
{
export
default
()
=>
{
const
themeToken
=
defaultAlgorithm
({
const
themeToken
=
defaultAlgorithm
({
...
defaultSeed
,
...
defaultSeed
,
colorPrimary
:
'#
009cd9
'
,
colorPrimary
:
'#
c81e3a
'
,
colorInfo
:
'#
009cd9
'
,
colorInfo
:
'#
c81e3a
'
,
colorSuccess
:
'#1d9b62'
,
colorSuccess
:
'#1d9b62'
,
colorWarning
:
'#d97706'
,
colorWarning
:
'#d97706'
,
colorError
:
'#dc2626'
,
colorError
:
'#dc2626'
,
colorBgBase
:
'#f
6f9fc
'
,
colorBgBase
:
'#f
ff7f7
'
,
colorBgContainer
:
'#ffffff'
,
colorBgContainer
:
'#ffffff'
,
colorTextBase
:
'#0f172a'
,
colorTextBase
:
'#0f172a'
,
borderRadius
:
18
,
borderRadius
:
18
,
...
@@ -121,7 +126,7 @@ export default () => {
...
@@ -121,7 +126,7 @@ export default () => {
},
},
Input
:
{
Input
:
{
borderRadius
:
14
,
borderRadius
:
14
,
activeShadow
:
'0 0 0 3px rgba(
0, 156, 217, 0.12
)'
,
activeShadow
:
'0 0 0 3px rgba(
200, 30, 58, 0.14
)'
,
},
},
Modal
:
{
Modal
:
{
borderRadiusLG
:
24
,
borderRadiusLG
:
24
,
...
@@ -134,7 +139,7 @@ export default () => {
...
@@ -134,7 +139,7 @@ export default () => {
colorBgElevated
:
'#0f172a'
,
colorBgElevated
:
'#0f172a'
,
},
},
Steps
:
{
Steps
:
{
colorPrimary
:
'#
009cd9
'
,
colorPrimary
:
'#
c81e3a
'
,
},
},
},
},
}
}
}
}
...
...
src/pages/Chat/index.jsx
View file @
c49ab07e
This diff is collapsed.
Click to expand it.
src/pages/Home/index.jsx
View file @
c49ab07e
This diff is collapsed.
Click to expand it.
src/services/DataService.js
View file @
c49ab07e
...
@@ -12,6 +12,18 @@ export function getApplication(name) {
...
@@ -12,6 +12,18 @@ export function getApplication(name) {
});
});
}
}
export
function
getSystemInfo
()
{
return
request
(
'/api/info'
,
{
method
:
'get'
,
});
}
export
function
getApplications
()
{
return
request
(
'/api/application/info'
,
{
method
:
'get'
,
});
}
export
function
getRecord
(
name
)
{
export
function
getRecord
(
name
)
{
return
request
(
`/api/record/
${
name
}
`
,
{
return
request
(
`/api/record/
${
name
}
`
,
{
method
:
'get'
,
method
:
'get'
,
...
@@ -50,13 +62,21 @@ export function getUserInfo() {
...
@@ -50,13 +62,21 @@ export function getUserInfo() {
return
currentUser
&&
JSON
.
parse
(
currentUser
);
return
currentUser
&&
JSON
.
parse
(
currentUser
);
}
}
export
async
function
login
(
username
,
password
)
{
export
function
getCaptcha
()
{
return
request
(
'/api/auth/captcha'
,
{
method
:
'get'
,
});
}
export
async
function
login
(
username
,
password
,
captcha
,
token
)
{
await
request
(
'/api/auth/login'
,
{
await
request
(
'/api/auth/login'
,
{
method
:
'post'
,
method
:
'post'
,
data
:
{
data
:
{
type
:
'password'
,
type
:
'password'
,
identity
:
username
,
identity
:
username
,
password
:
password
,
password
:
password
,
captcha
,
token
,
},
},
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment