|
|
@ -347,20 +347,21 @@ export default {
|
|
|
|
this.formInline.projectClassify = this.$route.params.projectId + '';
|
|
|
|
this.formInline.projectClassify = this.$route.params.projectId + '';
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(this.$route.params.projectYear || (this.$route.params.projectBigType || this.$route.params.projectMiddleType || this.$route.params.projectSmallType)) {
|
|
|
|
if(this.$route.params.projectBigType || this.$route.params.projectMiddleType || this.$route.params.projectSmallType) {
|
|
|
|
let arr = [];
|
|
|
|
let arr = [];
|
|
|
|
arr.push(this.$route.params.projectBigType + '')
|
|
|
|
arr.push(this.$route.params.projectBigType + '')
|
|
|
|
this.$route.params.projectMiddleType ? arr.push(this.$route.params.projectMiddleType + '') : null;
|
|
|
|
this.$route.params.projectMiddleType ? arr.push(this.$route.params.projectMiddleType + '') : null;
|
|
|
|
this.$route.params.projectSmallType ? arr.push(this.$route.params.projectSmallType + '') : null;
|
|
|
|
this.$route.params.projectSmallType ? arr.push(this.$route.params.projectSmallType + '') : null;
|
|
|
|
this.echoCascader(arr)
|
|
|
|
this.echoCascader(arr)
|
|
|
|
this.formInline.projectYear = this.$route.params.projectYear ? this.$route.params.projectYear + '' : '';
|
|
|
|
|
|
|
|
this.formInline.projectBigType = arr[0];
|
|
|
|
this.formInline.projectBigType = arr[0];
|
|
|
|
this.formInline.projectMiddleType = arr[1] ? arr[1] : null;
|
|
|
|
this.formInline.projectMiddleType = arr[1] ? arr[1] : null;
|
|
|
|
this.formInline.projectSmallType = arr[2] ? arr[2] : null;
|
|
|
|
this.formInline.projectSmallType = arr[2] ? arr[2] : null;
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
this.formInline.projectClassify = arr;
|
|
|
|
this.formInline.projectClassify = arr;
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
this.getDataList();
|
|
|
|
if(this.$route.params.projectYear) {
|
|
|
|
|
|
|
|
this.formInline.projectYear = this.$route.params.projectYear ? this.$route.params.projectYear + '' : '';
|
|
|
|
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if(this.$route.params.projectName) {
|
|
|
|
// if(this.$route.params.projectName) {
|
|
|
|
// this.formInline.projectName = this.$route.params.projectName;
|
|
|
|
// this.formInline.projectName = this.$route.params.projectName;
|
|
|
@ -378,6 +379,7 @@ export default {
|
|
|
|
if(this.userType == "01") {
|
|
|
|
if(this.userType == "01") {
|
|
|
|
this.pagination.creditCode = this.$store.state.user.name
|
|
|
|
this.pagination.creditCode = this.$store.state.user.name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getDataList();
|
|
|
|
this.cancalDebounce();
|
|
|
|
this.cancalDebounce();
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
|
|
|
|
|
|
@ -390,51 +392,59 @@ export default {
|
|
|
|
/** 回显Cascader 级联选择器数据 */
|
|
|
|
/** 回显Cascader 级联选择器数据 */
|
|
|
|
echoCascader(arr){
|
|
|
|
echoCascader(arr){
|
|
|
|
getAllList({dictType:"project_categories"}).then(res=>{
|
|
|
|
getAllList({dictType:"project_categories"}).then(res=>{
|
|
|
|
let obj = {};
|
|
|
|
let arrOne = [];
|
|
|
|
let objTwo = {};
|
|
|
|
let arrTwo = [];
|
|
|
|
let objThree = {};
|
|
|
|
let arrTree = [];
|
|
|
|
res.data.map(item => {
|
|
|
|
res.data.map(item => {
|
|
|
|
if(arr[0] == item.dictValue) {
|
|
|
|
let obj = {};
|
|
|
|
obj.value = item.dictValue;
|
|
|
|
obj.value = item.dictValue;
|
|
|
|
obj.label = item.dictLabel;
|
|
|
|
obj.label = item.dictLabel;
|
|
|
|
obj.dict = item.remark;
|
|
|
|
obj.dict = item.remark;
|
|
|
|
if(!arr[1]) {
|
|
|
|
arrOne.push(obj);
|
|
|
|
this.options.push(obj);
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
if(!arr[1]) {
|
|
|
|
} else {
|
|
|
|
this.options = arrOne;
|
|
|
|
obj.children = [];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else if(arr[1]){
|
|
|
|
getAllList({dictType: item.remark}).then(resTwo=>{
|
|
|
|
for (let index = 0; index < arrOne.length; index++) {
|
|
|
|
resTwo.data.map((itemTwo)=>{
|
|
|
|
if(arr[0] == arrOne[index].value) {
|
|
|
|
if(arr[1] == itemTwo.dictValue) {
|
|
|
|
arrOne[index].children = [];
|
|
|
|
objTwo.value = itemTwo.dictValue;
|
|
|
|
getAllList({dictType: arrOne[index].dict}).then(resTwo=>{
|
|
|
|
objTwo.label = itemTwo.dictLabel;
|
|
|
|
resTwo.data.map(item => {
|
|
|
|
objTwo.dict = itemTwo.remark;
|
|
|
|
let objTwo = {};
|
|
|
|
if(!arr[2]) {
|
|
|
|
objTwo.value = item.dictValue;
|
|
|
|
obj.children.push(objTwo)
|
|
|
|
objTwo.label = item.dictLabel;
|
|
|
|
this.options.push(obj);
|
|
|
|
objTwo.dict = item.remark;
|
|
|
|
return;
|
|
|
|
arrTwo.push(objTwo)
|
|
|
|
} else {
|
|
|
|
arrOne[index].children.push(objTwo)
|
|
|
|
objTwo.children = [];
|
|
|
|
})
|
|
|
|
obj.children.push(objTwo)
|
|
|
|
if(!arr[2]) {
|
|
|
|
|
|
|
|
this.options = arrOne;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else if(arr[2]) {
|
|
|
|
|
|
|
|
for (let index = 0; index < arrTwo.length; index++) {
|
|
|
|
|
|
|
|
if(arr[1] == arrTwo[index].value) {
|
|
|
|
|
|
|
|
arrTwo[index].children = [];
|
|
|
|
|
|
|
|
getAllList({dictType: arrTwo[index].dict}).then(resThree => {
|
|
|
|
|
|
|
|
resThree.data.map((itemThree)=>{
|
|
|
|
|
|
|
|
let objThree = {};
|
|
|
|
|
|
|
|
objThree.value = itemThree.dictValue;
|
|
|
|
|
|
|
|
objThree.label = itemThree.dictLabel;
|
|
|
|
|
|
|
|
objThree.dict = itemThree.remark;
|
|
|
|
|
|
|
|
objThree.leaf = 'leaf';
|
|
|
|
|
|
|
|
arrTree.push(objThree)
|
|
|
|
|
|
|
|
arrTwo[index].children.push(objThree)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.options = arrOne;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getAllList({dictType: itemTwo.remark}).then(resThree => {
|
|
|
|
|
|
|
|
resThree.data.map((itemThree)=>{
|
|
|
|
|
|
|
|
if(arr[2] == itemThree.dictValue) {
|
|
|
|
|
|
|
|
objThree.value = itemThree.dictValue;
|
|
|
|
|
|
|
|
objThree.label = itemThree.dictLabel;
|
|
|
|
|
|
|
|
objThree.dict = itemThree.remark;
|
|
|
|
|
|
|
|
objThree.leaf = 'leaf';
|
|
|
|
|
|
|
|
objTwo.children.push(objThree)
|
|
|
|
|
|
|
|
this.options.push(obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleItemChange(value){
|
|
|
|
handleItemChange(value){
|
|
|
@ -445,16 +455,18 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getDataList(){
|
|
|
|
getDataList(){
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
getAllList({dictType:"project_categories"}).then(res=>{
|
|
|
|
getAllList({dictType:"project_categories"}).then(res=>{
|
|
|
|
res.data.map(item => {
|
|
|
|
res.data.map(item => {
|
|
|
|
let obj = {};
|
|
|
|
let obj = {};
|
|
|
|
obj.value = item.dictValue;
|
|
|
|
obj.value = item.dictValue;
|
|
|
|
obj.label = item.dictLabel;
|
|
|
|
obj.label = item.dictLabel;
|
|
|
|
obj.dict = item.remark;
|
|
|
|
obj.dict = item.remark;
|
|
|
|
this.options.push(obj);
|
|
|
|
arr.push(obj)
|
|
|
|
this.optionsTwo.push(obj);
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.options = arr;
|
|
|
|
|
|
|
|
this.optionsTwo = arr;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 列表获取
|
|
|
|
// 列表获取
|
|
|
|
getList(){
|
|
|
|
getList(){
|
|
|
|