From af36af4cab6056b05b53d7465f9aaa7868de3155 Mon Sep 17 00:00:00 2001 From: lixiaolong <702156524@qq.com> Date: Sun, 18 Oct 2026 22:30:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=B7=BB=E5=8A=A0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=8C=87=E5=BC=95=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=99=BB=E5=BD=95=E5=92=8C=E7=9B=98=E7=82=B9=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在页面标题栏添加操作指引图标,显示相关功能说明 - 实现登录页面连接状态提示和验证码刷新机制 - 优化盘点功能,区分账面数量和实际盘点数量 - 改进AI助手附件上传状态反馈和错误处理 - 添加BOM编辑器和采购页面操作指引 - 实现登录页面连接状态提示和验证码刷新机制 --- mobile-app/src/App.tsx | 15 ++-- mobile-app/src/core/assistant-display.ts | 26 +++++++ mobile-app/src/core/modules.ts | 11 ++- mobile-app/src/core/network.ts | 9 ++- mobile-app/src/core/search-query.ts | 13 ++++ mobile-app/src/screens/Assistant.tsx | 23 +++--- mobile-app/tests/blackbox-followup.test.mjs | 25 +++++++ mobile-app/tests/operation-guide.test.mjs | 23 ++++++ mobile-app/tests/search-query.test.mjs | 20 ++++++ .../AssistantConversationService.java | 61 ++++++++++++++-- .../assistant/AssistantModelClient.java | 12 ++++ .../assistant/BusinessActionRegistry.java | 2 +- .../common/SearchQueryNormalizerTest.java | 59 +++++++++++++++ .../AssistantFollowupRegressionTest.java | 35 +++++++++ .../AssistantSessionPermissionTest.java | 26 ++++++- .../common/filter/SearchQueryFilter.java | 37 ++++++++++ .../common/utils/SearchQueryNormalizer.java | 56 +++++++++++++++ .../ruoyi/framework/config/FilterConfig.java | 10 +++ .../src/components/BomEditor/ItemPicker.vue | 3 +- .../components/BomEditor/ProductPicker.vue | 4 +- .../src/components/BomEditor/RemotePicker.vue | 13 ++-- .../src/components/BomEditor/index.vue | 1 + .../components/BusinessPageHeader/index.vue | 19 ++++- .../components/Production/StockOperations.vue | 6 +- .../src/components/PurchaseSheet/index.vue | 1 + ruoyi-ui-vue3/src/utils/request.js | 5 ++ ruoyi-ui-vue3/src/utils/search-query.js | 17 +++++ .../src/views/production/bom/index.vue | 1 + .../src/views/production/product/index.vue | 5 +- .../src/views/production/tasks/index.vue | 2 +- .../src/views/warehouse/inRecord/index.vue | 2 +- .../src/views/warehouse/product/index.vue | 6 +- .../src/views/warehouse/purchase/index.vue | 2 +- .../src/views/warehouse/stockCheck/index.vue | 2 +- .../tests/runtime/operation-guide.spec.js | 71 +++++++++++++++++++ .../tests/runtime/search-request.spec.js | 26 +++++++ .../tests/unit/search-query.test.mjs | 21 ++++++ 37 files changed, 624 insertions(+), 46 deletions(-) create mode 100644 mobile-app/src/core/assistant-display.ts create mode 100644 mobile-app/src/core/search-query.ts create mode 100644 mobile-app/tests/blackbox-followup.test.mjs create mode 100644 mobile-app/tests/operation-guide.test.mjs create mode 100644 mobile-app/tests/search-query.test.mjs create mode 100644 ruoyi-admin/src/test/java/com/ruoyi/common/SearchQueryNormalizerTest.java create mode 100644 ruoyi-admin/src/test/java/com/ruoyi/web/service/assistant/AssistantFollowupRegressionTest.java create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/filter/SearchQueryFilter.java create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/utils/SearchQueryNormalizer.java create mode 100644 ruoyi-ui-vue3/src/utils/search-query.js create mode 100644 ruoyi-ui-vue3/tests/runtime/operation-guide.spec.js create mode 100644 ruoyi-ui-vue3/tests/runtime/search-request.spec.js create mode 100644 ruoyi-ui-vue3/tests/unit/search-query.test.mjs diff --git a/mobile-app/src/App.tsx b/mobile-app/src/App.tsx index 7382508..9af2272 100644 --- a/mobile-app/src/App.tsx +++ b/mobile-app/src/App.tsx @@ -65,6 +65,7 @@ function Root(){ {page&&} {selected?.title||titles[page||tab]} + {!!selected?.guide&&Alert.alert(selected.title+' · 操作指引',selected.guide)} style={{padding:10}}>} {!page&&{variant==='prod'?'内网工作空间':'开发环境'}} @@ -83,9 +84,9 @@ function Root(){ } function Login({api,onLogin}:{api:ApiClient;onLogin:(token:string)=>Promise}){ const [username,setUsername]=useState(''),[password,setPassword]=useState(''),[code,setCode]=useState(''); - const [captcha,setCaptcha]=useState(null),[error,setError]=useState(''),[busy,setBusy]=useState(false); + const [captcha,setCaptcha]=useState(null),[error,setError]=useState(''),[busy,setBusy]=useState(false),[connecting,setConnecting]=useState(true); const lock=useRef(false),seq=useRef(0); - const refresh=useCallback(async()=>{const current=++seq.current;try{const data=await api.request('/captchaImage',{anonymous:true});if(current===seq.current){setCaptcha(data);setCode('');setError('');}}catch(e){if(current===seq.current)setError((e as Error).message);}},[api]); + const refresh=useCallback(async()=>{const current=++seq.current;setConnecting(true);setCaptcha(null);setError('');try{let data:Row;try{data=await api.request('/captchaImage',{anonymous:true});}catch(e){if((e as {code?:number}).code!==409)throw e;data=await api.request('/captchaImage',{anonymous:true});}if(current===seq.current){setCaptcha(data);setCode('');}}catch(e){if(current===seq.current)setError((e as Error).message);}finally{if(current===seq.current)setConnecting(false);}},[api]); useEffect(()=>{void refresh();return()=>{seq.current++;};},[refresh]); async function submit(){if(lock.current)return;if(!captcha){setError('请先连接服务获取登录信息。');return;} if(!username.trim()||!password||captcha.captchaEnabled!==false&&!code.trim()){setError('请填写账号、密码和验证码。');return;} @@ -94,10 +95,11 @@ function Login({api,onLogin}:{api:ApiClient;onLogin:(token:string)=>Promise CMVR · 项目物资管理欢迎回到工作空间请连接公司内网,使用现有账号登录。 - {captcha?.captchaEnabled!==false&&<> + {connecting&&正在连接内网服务,准备登录信息…} + {!!captcha&&captcha.captchaEnabled!==false&&<> {!!captcha?.img&&void refresh()}>}} {!!error&&{error}}