|
@@ -217,9 +217,14 @@ export default {
|
|
|
},
|
|
|
//获取tree点击
|
|
|
treeNodeClick (data) {
|
|
|
- const filterItem = this.formatDefault(this.treeParameters, data)
|
|
|
- if (!Object.keys(filterItem).length) return
|
|
|
- this.defaultfilter = filterItem
|
|
|
+ const dataValues = Object.values(data)
|
|
|
+ if (dataValues.includes('全部') || dataValues.includes(-1)) {
|
|
|
+ this.defaultfilter = { 1: 1 }
|
|
|
+ } else {
|
|
|
+ const filterItem = this.formatDefault(this.treeParameters, data)
|
|
|
+ if (!Object.keys(filterItem).length) return
|
|
|
+ this.defaultfilter = filterItem
|
|
|
+ }
|
|
|
this.queryTableData(true)
|
|
|
},
|
|
|
//格式化传递参数数据
|
|
@@ -252,8 +257,8 @@ export default {
|
|
|
this.tableType = "add";
|
|
|
this.tableTitle = "新增";
|
|
|
this.tableForm = {};
|
|
|
- for(let k in this.defaultfilter){
|
|
|
- if(k!=1){
|
|
|
+ for (let k in this.defaultfilter) {
|
|
|
+ if (k != 1) {
|
|
|
this.tableForm[k] = this.defaultfilter[k]
|
|
|
}
|
|
|
}
|