|
@@ -354,6 +354,8 @@ export default {
|
|
|
methods: {
|
|
|
transmit(appOrg){
|
|
|
this.appOrg = appOrg
|
|
|
+ this.getProjectNum();
|
|
|
+ this.getProjectNumX();
|
|
|
},
|
|
|
//前期审批数量
|
|
|
getProjectNum() {
|
|
@@ -367,8 +369,15 @@ export default {
|
|
|
getProjectNumX(this.appOrg).then((res) => {
|
|
|
if (Number(res.code) === 200) {
|
|
|
const fetchedData = res.data;
|
|
|
- for (let i = 0; i < fetchedData.length; i++) {
|
|
|
- this.parest[fetchedData[i].subdivision-1].num= fetchedData[i].num;
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ for (let i = 0; i < fetchedData.length; i++) {
|
|
|
+ this.parest[fetchedData[i].subdivision - 1].num = fetchedData[i].num;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ for (let i = 0; i < this.parest1.length; i++){
|
|
|
+ this.parest[i].num = 0
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -377,11 +386,16 @@ export default {
|
|
|
getProjectNumY(this.appOrg).then((res) => {
|
|
|
if (Number(res.code) === 200) {
|
|
|
const fetchedData = res.data;
|
|
|
- for (let i = 0; i < fetchedData.length; i++) {
|
|
|
- this.parest1[fetchedData[i].subdivision-11].num= fetchedData[i].num;
|
|
|
+ if (res.data.length > 0){
|
|
|
+ for (let i = 0; i < fetchedData.length; i++) {
|
|
|
+ this.parest1[fetchedData[i].subdivision-11].num= fetchedData[i].num;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ for (let i = 0; i < this.parest1.length; i++){
|
|
|
+ this.parest1[i].num = 0
|
|
|
+ }
|
|
|
}
|
|
|
- this.leftShow = false;
|
|
|
- this.rightShow = true;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -475,6 +489,8 @@ export default {
|
|
|
showDialog(type) {
|
|
|
if (type === 1) {
|
|
|
this.getProjectNumY();
|
|
|
+ this.leftShow = false;
|
|
|
+ this.rightShow = true;
|
|
|
} else {
|
|
|
this.rightShow = false;
|
|
|
this.leftShow = true;
|