fix(contract): 纯图片扫描 PDF 坐标高亮与 OCR 复核
This commit is contained in:
1 parent
ca312ea751
commit
ce1fd59f61
21 files changed
+1665
-54
No files matched your search
@@ -13,7 +13,7 @@ import { getAuthHeaders, logoutAuth } from '@/shared/utils/auth';
|
||||
import { isPublicPath } from '@/shared/constants/routes';
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = useI18n();
|
||||
const { locale, t } = useI18n();
|
||||
const { themePreference, initTheme, setThemePreference } = useTheme();
|
||||
const {
|
||||
messageDialogVisible,
|
||||
@@ -62,11 +62,16 @@ watch(themePreference, (newTheme) => {
|
||||
updateThemePreference(newTheme);
|
||||
});
|
||||
|
||||
/**
|
||||
* 处理接口返回未登录状态,提示用户重新登录并清理失效的本地登录信息。
|
||||
* 核心逻辑:忽略可选的 SSO 应用目录请求;其余未授权请求统一展示易懂提示,再执行登出。
|
||||
* @param event - 包含请求地址和状态码的全局未授权事件。
|
||||
*/
|
||||
const onUnauthorized = (event: Event) => {
|
||||
const url = String((event as CustomEvent<{ url?: string }>).detail?.url || '');
|
||||
// 外部应用目录是可选导航能力,加载失败只能隐藏入口,不能清除有效 HXOPS 登录态。
|
||||
if (/\/api\/sso\/apps(?:\?|$)/.test(url)) return;
|
||||
showMessageDialog('error', '认证已过期或无效,请重新登录');
|
||||
showMessageDialog('error', t('login.sessionExpiredHint'), t('login.sessionExpired'));
|
||||
logoutAuth();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/chat/components/ChatInputBar.vue
|
||||
* 聊天输入栏:文本框、附件、语音、知识库与采购合同双文件输入控件。
|
||||
* 逻辑:采购合同审查隐藏企业知识库;模板比对明确上传我方原合同和卖方回传合同,单份审核仅上传待审合同。
|
||||
* 逻辑:附件卡片和快捷操作显示在文字输入区上方;采购合同审查隐藏企业知识库,模板比对明确上传双方合同。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
@@ -374,20 +374,6 @@ watch(
|
||||
<X class="h-3.5 w-3.5" />
|
||||
</button>
|
||||
</div>
|
||||
<textarea
|
||||
ref="textareaRef"
|
||||
v-model="inputValue"
|
||||
rows="1"
|
||||
:placeholder="isVoiceTranscribing ? $t('chat.voiceTranscribing') : isVoiceRecording ? $t('chat.voiceListening') : shippingFocusTaskNo ? $t('chat.shippingNoticeUi.focusInputPlaceholder', { taskId: shippingFocusTaskNo }) : isMaintenanceAgent ? $t('maintenance.chat.inputPlaceholder') : $t('chat.askAnything')"
|
||||
class="w-full resize-none border-none bg-transparent px-2.5 py-1.5 text-[15px] leading-relaxed text-primary placeholder-slate-400 focus:border-transparent focus:outline-none focus:ring-0"
|
||||
style="min-height: 40px; max-height: 220px;"
|
||||
:disabled="isVoiceTranscribing"
|
||||
spellcheck="false"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
@keydown.enter.prevent="emit('send')"
|
||||
/>
|
||||
|
||||
<input
|
||||
:ref="bindShippingPickerRef"
|
||||
type="file"
|
||||
@@ -539,6 +525,20 @@ watch(
|
||||
<span>{{ t('chat.shippingNoticeConfirmBatchHint') }}</span>
|
||||
</div>
|
||||
|
||||
<textarea
|
||||
ref="textareaRef"
|
||||
v-model="inputValue"
|
||||
rows="1"
|
||||
:placeholder="isVoiceTranscribing ? $t('chat.voiceTranscribing') : isVoiceRecording ? $t('chat.voiceListening') : shippingFocusTaskNo ? $t('chat.shippingNoticeUi.focusInputPlaceholder', { taskId: shippingFocusTaskNo }) : isMaintenanceAgent ? $t('maintenance.chat.inputPlaceholder') : $t('chat.askAnything')"
|
||||
class="w-full resize-none border-none bg-transparent px-2.5 py-1.5 text-[15px] leading-relaxed text-primary placeholder-slate-400 focus:border-transparent focus:outline-none focus:ring-0"
|
||||
style="min-height: 40px; max-height: 220px;"
|
||||
:disabled="isVoiceTranscribing"
|
||||
spellcheck="false"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
@keydown.enter.prevent="emit('send')"
|
||||
/>
|
||||
|
||||
<div class="mt-1.5 flex items-center justify-between px-1.5 pb-0.5">
|
||||
<div class="flex items-center gap-3">
|
||||
<button
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"passwordRequired": "Password cannot be empty",
|
||||
"passwordRequiredHint": "Please enter your password",
|
||||
"loginRequired": "Please login first",
|
||||
"sessionExpired": "Sign-in expired",
|
||||
"sessionExpiredHint": "Please sign in again to continue.",
|
||||
"requestFailed": "Login request failed",
|
||||
"forgotPassword": "Forgot Password?",
|
||||
"newPassword": "New Password",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"passwordRequired": "รหัสผ่านต้องไม่ว่าง",
|
||||
"passwordRequiredHint": "กรุณากรอกรหัสผ่าน",
|
||||
"loginRequired": "กรุณาเข้าสู่ระบบก่อนเริ่มการสนทนา",
|
||||
"sessionExpired": "การเข้าสู่ระบบหมดอายุแล้ว",
|
||||
"sessionExpiredHint": "กรุณาเข้าสู่ระบบอีกครั้งเพื่อใช้งานต่อ",
|
||||
"requestFailed": "คำขอเข้าสู่ระบบล้มเหลว",
|
||||
"forgotPassword": "ลืมรหัสผ่าน?",
|
||||
"rememberMe": "จดจำฉัน",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"passwordRequired": "密码不能为空",
|
||||
"passwordRequiredHint": "请输入密码",
|
||||
"loginRequired": "请先登录",
|
||||
"sessionExpired": "登录已失效",
|
||||
"sessionExpiredHint": "请重新登录后继续使用。",
|
||||
"requestFailed": "登录请求失败",
|
||||
"forgotPassword": "忘记密码?",
|
||||
"newPassword": "新密码",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"passwordRequired": "密碼不能為空",
|
||||
"passwordRequiredHint": "請輸入密碼",
|
||||
"loginRequired": "請先登錄後再進入對話",
|
||||
"sessionExpired": "登入已失效",
|
||||
"sessionExpiredHint": "請重新登入後繼續使用。",
|
||||
"requestFailed": "登錄請求失敗",
|
||||
"forgotPassword": "忘記密碼?",
|
||||
"rememberMe": "記住我",
|
||||
|
||||
Reference in new issue
Block a user