feat: 桌面端工作计划/商机/要客列表新增搜索框

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-13 01:06:56 +08:00
parent 04f701b27c
commit f89638b3f0
3 changed files with 25 additions and 3 deletions
+9 -1
View File
@@ -27,6 +27,9 @@ const planStatuses = ['计划中', '已完成', '已取消']
// ── Filters ──
const filterManager = ref('')
const filterStatus = ref('')
const searchText = ref('')
function onSearch() { loadPlans() }
const isLight = computed(() => themeStore.currentTheme === 'light')
@@ -107,7 +110,9 @@ async function handleQuickCreate() {
async function loadPlans() {
loading.value = true
try {
const res = await api.get('/work-plans/')
const params: any = {}
if (searchText.value) params.search = searchText.value
const res = await api.get('/work-plans/', { params })
workPlans.value = res.data
} catch (e: any) { ElMessage.error('加载失败') }
finally { loading.value = false }
@@ -200,6 +205,9 @@ async function quickStatusChange(row: any, newStatus: string) {
<!-- Filter Bar -->
<div class="filter-bar">
<div class="filter-row">
<div class="filter-item">
<el-input v-model="searchText" placeholder="搜索..." clearable size="small" style="width:180px" @keyup.enter="onSearch" @clear="onSearch" />
</div>
<div class="filter-item">
<label class="filter-label">客户经理</label>
<el-select v-model="filterManager" clearable placeholder="全部" size="small" style="width:150px">