feat: 设计师选择器增加搜索功能,优化显示样式
This commit is contained in:
parent
3d7106fd7b
commit
f18b3da725
@ -128,20 +128,25 @@
|
|||||||
<div v-if="formData.releaseType === 'assigned'" class="task-type-receiver">
|
<div v-if="formData.releaseType === 'assigned'" class="task-type-receiver">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="item.receiverId"
|
v-model:value="item.receiverId"
|
||||||
placeholder="指定设计师"
|
placeholder="搜索设计师姓名"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
show-search
|
show-search
|
||||||
allow-clear
|
allow-clear
|
||||||
size="large"
|
size="large"
|
||||||
:filter-option="filterOption"
|
:filter-option="filterDesignerOption"
|
||||||
|
option-filter-prop="label"
|
||||||
@focus="loadDesignersForItem(item)"
|
@focus="loadDesignersForItem(item)"
|
||||||
>
|
>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="designer in getDesignersForItem(item)"
|
v-for="designer in getDesignersForItem(item)"
|
||||||
:key="designer.id"
|
:key="designer.id"
|
||||||
:value="designer.id"
|
:value="designer.id"
|
||||||
|
:label="designer.realName"
|
||||||
>
|
>
|
||||||
{{ designer.realName }} (进行中: {{ designer.inProgressCount || 0 }})
|
<div class="designer-option">
|
||||||
|
<span class="designer-name">{{ designer.realName }}</span>
|
||||||
|
<span class="designer-workload">进行中: {{ designer.inProgressCount || 0 }}</span>
|
||||||
|
</div>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
@ -1235,9 +1240,11 @@ const calculateScore = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选选项
|
// 筛选设计师选项
|
||||||
const filterOption = (input: string, option: any) => {
|
const filterDesignerOption = (input: string, option: any) => {
|
||||||
return option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
// 搜索设计师姓名
|
||||||
|
const designerName = option.label || ''
|
||||||
|
return designerName.toLowerCase().includes(input.toLowerCase())
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消
|
// 取消
|
||||||
@ -2591,4 +2598,22 @@ onUnmounted(() => {
|
|||||||
color: #31f08b !important;
|
color: #31f08b !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设计师选择器选项样式
|
||||||
|
.designer-option {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.designer-name {
|
||||||
|
color: #e5e5e5;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.designer-workload {
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -58,22 +58,22 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: flex; align-items: center; gap: 12px;">
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
<!-- 月份选择器 -->
|
<!-- 月份选择器 -->
|
||||||
<div class="month-selector" @click.stop>
|
<div class="month-selector" @click.stop>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="selectedMonth"
|
v-model:value="selectedMonth"
|
||||||
placeholder="选择月份"
|
placeholder="选择月份"
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
@change="handleMonthChange"
|
@change="handleMonthChange"
|
||||||
|
>
|
||||||
|
<a-select-option
|
||||||
|
v-for="month in availableMonths"
|
||||||
|
:key="month.value"
|
||||||
|
:value="month.value"
|
||||||
>
|
>
|
||||||
<a-select-option
|
{{ month.label }}
|
||||||
v-for="month in availableMonths"
|
</a-select-option>
|
||||||
:key="month.value"
|
</a-select>
|
||||||
:value="month.value"
|
|
||||||
>
|
|
||||||
{{ month.label }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 展开/折叠按钮 -->
|
<!-- 展开/折叠按钮 -->
|
||||||
<a-button type="link" size="small" style="color: #31f08b;">
|
<a-button type="link" size="small" style="color: #31f08b;">
|
||||||
@ -112,7 +112,7 @@
|
|||||||
<!-- 设计师列表 -->
|
<!-- 设计师列表 -->
|
||||||
<div class="designers-section">
|
<div class="designers-section">
|
||||||
<div class="section-header">
|
<div class="section-header">
|
||||||
<h2 class="section-title">设计师列表</h2>
|
<h2 class="section-title">设计师列表</h2>
|
||||||
<div class="filter-area">
|
<div class="filter-area">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="selectedDeptId"
|
v-model:value="selectedDeptId"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user