|
|
@@ -104,6 +104,13 @@
|
|
|
<text class="modal-title">选择工作负责人</text>
|
|
|
<text class="modal-close" @click="showLeaderPicker = false">取消</text>
|
|
|
</view>
|
|
|
+ <view class="search-bar">
|
|
|
+ <view class="search-box">
|
|
|
+ <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
|
|
|
+ <input class="search-input" type="text" placeholder="搜索姓名" v-model="keyword" @input="handleSearch" />
|
|
|
+ <text v-if="keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<scroll-view class="modal-body" scroll-y="true">
|
|
|
<view
|
|
|
v-for="(option, index) in teamLeaderList"
|
|
|
@@ -172,7 +179,8 @@
|
|
|
const statusDictList = ref<SysDictData[]>([]) // 工单状态字典列表
|
|
|
// 添加字典加载状态
|
|
|
const dictLoaded = ref<boolean>(false)
|
|
|
-
|
|
|
+ let keyword = ref<string>("")
|
|
|
+
|
|
|
// 详情数据
|
|
|
const detailData = ref<acceptOrderInfo2>({
|
|
|
orderType: 0,
|
|
|
@@ -216,6 +224,7 @@
|
|
|
const selectedTeamLeaderIndex = ref<number>(-1)
|
|
|
const showLeaderPicker = ref<boolean>(false)
|
|
|
const teamLeaderList = ref<UserInfo[]>([])
|
|
|
+ const teamAllLeaderList = ref<UserInfo[]>([])
|
|
|
|
|
|
// 获取负责人列表(使用用户列表接口)
|
|
|
const loadTeamLeaderList = async (): Promise<void> => {
|
|
|
@@ -244,6 +253,7 @@
|
|
|
}
|
|
|
|
|
|
teamLeaderList.value = leaders
|
|
|
+ teamAllLeaderList.value = teamLeaderList.value
|
|
|
}
|
|
|
} catch (e: any) {
|
|
|
console.error('获取负责人列表失败:', e.message)
|
|
|
@@ -478,6 +488,19 @@
|
|
|
loading.value = false
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 搜索
|
|
|
+ const handleSearch = (): void => {
|
|
|
+ teamLeaderList.value = teamAllLeaderList.value.filter(leader =>
|
|
|
+ leader.nickName.includes(keyword.value)
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ // 清空搜索
|
|
|
+ const clearSearch = (): void => {
|
|
|
+ keyword.value = ""
|
|
|
+ teamLeaderList.value = teamAllLeaderList.value
|
|
|
+ }
|
|
|
|
|
|
// 页面加载
|
|
|
onLoad((options: any) => {
|
|
|
@@ -777,5 +800,36 @@
|
|
|
color: #999999;
|
|
|
margin-left: 12rpx;
|
|
|
}
|
|
|
+ .search-bar {
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+ background-color: #d7eafe;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-box {
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ height: 72rpx;
|
|
|
+ padding: 0 24rpx;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-radius: 36rpx;
|
|
|
+
|
|
|
+ .search-icon {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ margin-right: 12rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-input {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .clear-icon {
|
|
|
+ margin-left: 12rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #999999;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|
|
|
|