|
@@ -423,9 +423,13 @@
|
|
|
<!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
|
|
|
<div class="tree" style="height:400px">
|
|
|
<el-scrollbar style="height:100%">
|
|
|
+ <el-input
|
|
|
+ placeholder="输入关键字进行过滤"
|
|
|
+ v-model="filterText">
|
|
|
+ </el-input>
|
|
|
<el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
|
|
|
ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
|
|
|
- highlight-current ></el-tree>
|
|
|
+ highlight-current :filter-node-method="filterNode" default-expand-all></el-tree>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div>已选中 {{chosenMembCount}} 人</div>
|
|
@@ -598,7 +602,8 @@ a {
|
|
|
},
|
|
|
ause: [],
|
|
|
auseList: [],
|
|
|
- yonghuUser: []
|
|
|
+ yonghuUser: [],
|
|
|
+ filterText: ''
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -620,9 +625,18 @@ a {
|
|
|
return intPartFormat + '.' + floatPart
|
|
|
}
|
|
|
return intPartFormat + floatPart
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ filterText(val) {
|
|
|
+ this.$refs.chooseMembTree.filter(val);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterNode(value, data) {
|
|
|
+ if (!value) return true;
|
|
|
+ return data.label.indexOf(value) !== -1;
|
|
|
+ },
|
|
|
//重启项目
|
|
|
restartPro(row) {
|
|
|
this.http.post('/project/start',{id: row.id},
|