任务执行人添加检索功能
This commit is contained in:
@@ -185,9 +185,18 @@
|
||||
<text>选择执行人</text>
|
||||
<text class="close-btn" @click="closeUserPopup">×</text>
|
||||
</view>
|
||||
<!-- 新增:搜索框 -->
|
||||
<view style="padding: 16rpx;">
|
||||
<input
|
||||
v-model="userSearchKeyword"
|
||||
placeholder="请输入昵称搜索"
|
||||
class="form-input"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</view>
|
||||
<scroll-view scroll-y class="user-list" style="height: 400rpx;">
|
||||
<view
|
||||
v-for="user in userList"
|
||||
v-for="user in filteredUserList"
|
||||
:key="user.userId"
|
||||
class="user-row"
|
||||
@click="toggleUser(user)"
|
||||
@@ -196,6 +205,10 @@
|
||||
<text>{{ user.nickName }}</text>
|
||||
<text class="user-dept">{{ user.deptName }}</text>
|
||||
</view>
|
||||
<!-- 新增:无匹配提示 -->
|
||||
<view v-if="filteredUserList.length === 0" style="text-align:center;color:#999;padding:20rpx;">
|
||||
暂无匹配用户
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<button type="primary" size="mini" @click="confirmUserSelect">确定</button>
|
||||
@@ -299,11 +312,22 @@ export default {
|
||||
projectIndex: -1,
|
||||
userList: [],
|
||||
selectedUsers: [],
|
||||
userSearchKeyword: '', // 新增:用户搜索关键字
|
||||
// userPopupVisible: false, // 不再需要
|
||||
fileList: [],
|
||||
uploadedFiles: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredUserList() {
|
||||
if (!this.userSearchKeyword.trim()) {
|
||||
return this.userList;
|
||||
}
|
||||
return this.userList.filter(user =>
|
||||
user.nickName && user.nickName.includes(this.userSearchKeyword.trim())
|
||||
);
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.initData()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user