feat(workbench): add expense stats detail modal
This commit is contained in:
@@ -194,7 +194,6 @@
|
||||
<article class="panel workbench-card progress-panel">
|
||||
<div class="section-head">
|
||||
<h2>费用进度</h2>
|
||||
<button type="button" class="link-action">全部进度 <i class="mdi mdi-chevron-right"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="progress-list">
|
||||
@@ -248,7 +247,9 @@
|
||||
<button
|
||||
type="button"
|
||||
class="detail-action"
|
||||
@click="openPromptAssistant('查看我的费用统计详情,并说明本月报销金额、审批中和待付款的主要变化。')"
|
||||
aria-haspopup="dialog"
|
||||
:aria-expanded="expenseStatsModalOpen"
|
||||
@click="openExpenseStatsModal"
|
||||
>
|
||||
<span>查看详情</span>
|
||||
<i class="mdi mdi-chevron-right"></i>
|
||||
@@ -308,6 +309,14 @@
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<ExpenseStatsDetailModal
|
||||
:visible="expenseStatsModalOpen"
|
||||
:user-name="displayUserName"
|
||||
:summary="workbenchSummary"
|
||||
:detail="expenseStatsDetail"
|
||||
@close="closeExpenseStatsModal"
|
||||
/>
|
||||
|
||||
<ExpenseProfileDetailModal
|
||||
:visible="expenseProfileModalOpen"
|
||||
:user-name="displayUserName"
|
||||
@@ -327,6 +336,7 @@
|
||||
<script setup>
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import PanelHead from '../shared/PanelHead.vue'
|
||||
import ExpenseStatsDetailModal from './ExpenseStatsDetailModal.vue'
|
||||
import ExpenseProfileDetailModal from './ExpenseProfileDetailModal.vue'
|
||||
import workbenchHeroBackground from '../../assets/personal-workbench-hero-bg-theme-base.webp'
|
||||
import { useSystemState } from '../../composables/useSystemState.js'
|
||||
@@ -392,6 +402,7 @@ const {
|
||||
})
|
||||
const latestExpenseConversation = ref(null)
|
||||
const hasLocalExpenseSnapshot = ref(false)
|
||||
const expenseStatsModalOpen = ref(false)
|
||||
const expenseProfileModalOpen = ref(false)
|
||||
const employeeProfile = ref(null)
|
||||
const employeeProfileRuns = ref([])
|
||||
@@ -451,6 +462,7 @@ const expenseProfileOperations = computed(() =>
|
||||
buildProfileOperationsFromAgentRuns(employeeProfileRuns.value, currentUser.value)
|
||||
)
|
||||
const expenseProfileEmptyReason = computed(() => String(employeeProfile.value?.empty_reason || '').trim())
|
||||
const expenseStatsDetail = computed(() => props.workbenchSummary.expenseStatsDetail || {})
|
||||
const currentUserProfileKey = computed(() => {
|
||||
const user = currentUser.value || {}
|
||||
return [
|
||||
@@ -700,6 +712,14 @@ async function loadCurrentEmployeeProfile() {
|
||||
employeeProfileLoading.value = false
|
||||
}
|
||||
|
||||
function openExpenseStatsModal() {
|
||||
expenseStatsModalOpen.value = true
|
||||
}
|
||||
|
||||
function closeExpenseStatsModal() {
|
||||
expenseStatsModalOpen.value = false
|
||||
}
|
||||
|
||||
function openExpenseProfileModal() {
|
||||
expenseProfileModalOpen.value = true
|
||||
if (!employeeProfile.value && !employeeProfileLoading.value) {
|
||||
|
||||
Reference in New Issue
Block a user