部门视图查询逻辑优化
This commit is contained in:
parent
7c62f5d9e5
commit
caa1246857
@ -387,8 +387,12 @@
|
||||
this.debounceTimer = setTimeout(() => {
|
||||
// 调用查询接口的方法
|
||||
this.loading=true;
|
||||
this.options = []
|
||||
this.leftTreedatabind()
|
||||
this.options = [];
|
||||
if(this.checkedInfo==true){
|
||||
this.leftTreedatabindNew();//隐藏架构的
|
||||
}else{
|
||||
this.leftTreedatabind();//不需要隐藏架构
|
||||
}
|
||||
}, 500); // 500 毫秒的延迟,可以根据实际需求调整
|
||||
},
|
||||
navtab(e){
|
||||
@ -477,14 +481,18 @@
|
||||
_this.policyFileNum = count.policyFileNum
|
||||
_this.guideFileNum = count.guideFileNum
|
||||
_this.formFileNum = count.formFileNum
|
||||
// 数据加载完成后,手动触发展开
|
||||
_this.$nextTick(() => {
|
||||
this.isExpand = true;
|
||||
_this.buildData();
|
||||
//_this.$refs.treeNode.filter(_this.filtertreeText);
|
||||
});
|
||||
}else{
|
||||
_this.processFileNum = 0
|
||||
_this.policyFileNum = 0
|
||||
_this.guideFileNum = 0
|
||||
_this.formFileNum = 0
|
||||
}
|
||||
//最后搜索一下
|
||||
//this.search();
|
||||
|
||||
});
|
||||
},
|
||||
@ -519,6 +527,18 @@
|
||||
res.data.fileMaps.forEach(element => {
|
||||
_this.defaultkey.push(element.ID)
|
||||
});
|
||||
if(newMaps!== undefined){
|
||||
let count = res.data.filesCount;
|
||||
_this.processFileNum = count.processFileNum
|
||||
_this.policyFileNum = count.policyFileNum
|
||||
_this.guideFileNum = count.guideFileNum
|
||||
_this.formFileNum = count.formFileNum
|
||||
}else{
|
||||
_this.processFileNum = 0
|
||||
_this.policyFileNum = 0
|
||||
_this.guideFileNum = 0
|
||||
_this.formFileNum = 0
|
||||
}
|
||||
//最后搜索一下
|
||||
//this.search();
|
||||
}
|
||||
@ -544,13 +564,17 @@
|
||||
this.loading=true;
|
||||
this.filetype = this.selectvalue
|
||||
this.options = []
|
||||
this.leftTreedatabind()
|
||||
if(this.checkedInfo==true){
|
||||
this.leftTreedatabindNew();//隐藏架构的
|
||||
}else{
|
||||
this.leftTreedatabind();//不需要隐藏架构
|
||||
}
|
||||
},
|
||||
filterNode(value, data) {
|
||||
filtertreeNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
filtertreeNode(value, data) {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
@ -566,21 +590,28 @@
|
||||
}
|
||||
},
|
||||
resetData(){
|
||||
this.checked1 = false;//全选,取消勾选
|
||||
let currentFilterTreeText = this.filtertreeText;
|
||||
this.idjson=[];
|
||||
this.idjson.push(this.departmentId);
|
||||
this.treelist = this.$refs.tree.getCheckedKeys()
|
||||
var nodeObj =this.$refs.tree.getNode(this.departmentId);
|
||||
var nodeArry = [];
|
||||
nodeArry.push(nodeObj.data)
|
||||
this.$refs.tree.setCheckedNodes(nodeArry);
|
||||
this.treeListNodes = this.$refs.tree.getCheckedNodes();
|
||||
//this.selectdept = [];
|
||||
if(nodeObj !== null){
|
||||
var nodeArry = [];
|
||||
nodeArry.push(nodeObj.data)
|
||||
this.$refs.tree.setCheckedNodes(nodeArry);
|
||||
this.treeListNodes = this.$refs.tree.getCheckedNodes();
|
||||
}
|
||||
this.treelist = this.$refs.tree.getCheckedKeys();
|
||||
this.selectdept = JSON.stringify(this.treelist)
|
||||
this.processFileNum = '';//流程数量
|
||||
this.policyFileNum = '';//制度数量
|
||||
if(this.checkedInfo==true){
|
||||
this.leftTreedatabindNew();//隐藏架构的
|
||||
}else{
|
||||
this.leftTreedatabind();//不需要隐藏架构
|
||||
this.filtertreeText='';
|
||||
if(currentFilterTreeText===''){//如果为,则执行。因为不为空时,filtertreeText的变化就会查询了
|
||||
if(this.checkedInfo==true){
|
||||
this.leftTreedatabindNew();//隐藏架构的
|
||||
}else{
|
||||
this.leftTreedatabind();//不需要隐藏架构
|
||||
}
|
||||
}
|
||||
},
|
||||
filterFileMaps(items) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user