Merge branch 'dev' into hugo-shipping-notice
# Conflicts: # backend/app/services/maintenance_chat_service.py # backend/tests/test_maintenance_chat_service.py # frontend/src/features/chat/components/ChatViewContent.vue
This commit is contained in:
commit
2ce1aca023
25 files changed
+1609
-304
No files matched your search
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* features/chat/components/ChatInputBar.vue
|
||||
* 聊天输入栏:文本框、附件、语音、知识库选择与发送按钮。
|
||||
* 逻辑:设备维保助手的管理入口(设备台账、登记维修)与语音按钮同侧排列,发送按钮独占右侧。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
@@ -259,27 +260,6 @@ watch(
|
||||
<span>点发送开始处理</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isMaintenanceAgent && canManageMaintenance"
|
||||
class="flex flex-wrap items-center gap-2 px-3 pb-1 text-xs text-muted"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-brand-200 bg-brand-50 px-3 py-1 font-medium text-brand-700 transition-colors hover:bg-brand-100"
|
||||
@click="emit('maintenance-ledger-config')"
|
||||
>
|
||||
▦ {{ $t('maintenance.panel.ledgerTitle') }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-brand-200 bg-brand-50 px-3 py-1 font-medium text-brand-700 transition-colors hover:bg-brand-100"
|
||||
@click="emit('maintenance-create-record')"
|
||||
>
|
||||
{{ $t('maintenance.panel.recordTitle') }}
|
||||
</button>
|
||||
<span>{{ $t('maintenance.panel.adminOnly') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-1.5 flex items-center justify-between px-1.5 pb-0.5">
|
||||
<div class="flex items-center gap-3">
|
||||
<button
|
||||
@@ -359,7 +339,7 @@ watch(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ref="kbMenuRef" class="relative">
|
||||
<div v-if="!isMaintenanceAgent" ref="kbMenuRef" class="relative">
|
||||
<button
|
||||
type="button"
|
||||
:disabled="kbDropdownDisabled"
|
||||
@@ -386,6 +366,27 @@ watch(
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isMaintenanceAgent && canManageMaintenance"
|
||||
class="flex flex-wrap items-center gap-2"
|
||||
:title="$t('maintenance.panel.adminOnly')"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border border-brand-300 bg-brand-50 px-3 py-1.5 text-xs font-semibold text-brand-700 transition-colors hover:bg-brand-100"
|
||||
@click="emit('maintenance-ledger-config')"
|
||||
>
|
||||
{{ $t('maintenance.chat.manageLedger') }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border border-brand-300 bg-brand-50 px-3 py-1.5 text-xs font-semibold text-brand-700 transition-colors hover:bg-brand-100"
|
||||
@click="emit('maintenance-create-record')"
|
||||
>
|
||||
{{ $t('maintenance.chat.logRepair') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
@@ -402,7 +403,7 @@ watch(
|
||||
v-else
|
||||
type="button"
|
||||
:disabled="!canSendMessage"
|
||||
class="flex h-10 w-10 items-center justify-center rounded-full border shadow-sm transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full border shadow-sm transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:class="!canSendMessage
|
||||
? 'border-default bg-slate-100 text-muted'
|
||||
: 'border-brand-500 bg-brand-500 text-white shadow-[0_0_0_4px_rgba(59,130,246,0.18)] hover:scale-105 hover:bg-brand-600 hover:shadow-[0_0_0_6px_rgba(59,130,246,0.24)] active:scale-95'"
|
||||
|
||||
Reference in new issue
Block a user