From 1cfc7fa6cce20261c01058bd9e48d06fc21885ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 15 Mar 2022 11:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmIteration/XmIterationInfo.vue | 6 +++--- src/views/xm/core/xmPhase/XmPhaseBatch.vue | 6 +++--- src/views/xm/core/xmPhase/XmPhaseForProduct.vue | 6 +++--- src/views/xm/core/xmPhase/XmPhaseMng.vue | 6 +++--- src/views/xm/core/xmPhase/XmPhaseSelect.vue | 6 +++--- src/views/xm/core/xmProduct/XmProductInfo.vue | 6 +++--- src/views/xm/core/xmProject/XmProjectInfo.vue | 6 +++--- .../XmProjectMBudgetCostNouserAdd.vue | 4 ++-- .../XmProjectMBudgetCostNouserEdit.vue | 4 ++-- .../XmProjectMBudgetCostUserAdd.vue | 4 ++-- .../XmProjectMBudgetCostUserEdit.vue | 4 ++-- .../core/xmProjectMCostNouser/XmProjectMCostNouserAdd.vue | 4 ++-- .../xm/core/xmProjectMCostUser/XmProjectMCostUserAdd.vue | 4 ++-- src/views/xm/core/xmTask/XmTaskMng.vue | 6 +++--- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/views/xm/core/xmIteration/XmIterationInfo.vue b/src/views/xm/core/xmIteration/XmIterationInfo.vue index 008582f2..e1f7c094 100644 --- a/src/views/xm/core/xmIteration/XmIterationInfo.vue +++ b/src/views/xm/core/xmIteration/XmIterationInfo.vue @@ -251,11 +251,11 @@ } else { return v[j]; } - const options = this.$refs.xmMenuWithPlan.dicts; - if(options[key]==undefined || options[key]==null || options[key].length==0 ){ + const dicts = this.$refs.xmMenuWithPlan.dicts; + if(dicts[key]==undefined || dicts[key]==null || dicts[key].length==0 ){ return v[j]; } - var rowData=options[key].filter(i=>i.id==v[j]) + var rowData=dicts[key].filter(i=>i.id==v[j]) if(rowData.length>0){ return rowData[0].name }else{ diff --git a/src/views/xm/core/xmPhase/XmPhaseBatch.vue b/src/views/xm/core/xmPhase/XmPhaseBatch.vue index 617652b5..fe485a9f 100644 --- a/src/views/xm/core/xmPhase/XmPhaseBatch.vue +++ b/src/views/xm/core/xmPhase/XmPhaseBatch.vue @@ -1588,11 +1588,11 @@ export default { /**end 自定义函数请在上面加**/ formateOption: function (itemCode, value) { if (this.dicts[itemCode]) { - var options = this.dicts[itemCode].filter( + var dicts = this.dicts[itemCode].filter( (i) => i.id == value ); - if (options && dicts.length > 0) { - return options[0].name; + if (dicts && dicts.length > 0) { + return dicts[0].name; } else { return value; } diff --git a/src/views/xm/core/xmPhase/XmPhaseForProduct.vue b/src/views/xm/core/xmPhase/XmPhaseForProduct.vue index 8da2aa0e..e8e7efad 100644 --- a/src/views/xm/core/xmPhase/XmPhaseForProduct.vue +++ b/src/views/xm/core/xmPhase/XmPhaseForProduct.vue @@ -1106,9 +1106,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue'; /**end 自定义函数请在上面加**/ formateOption:function(itemCode,value){ if(this.dicts[itemCode]){ - var options=this.dicts[itemCode].filter(i=>i.id==value); - if(options && dicts.length > 0){ - return options[0].name + var dicts=this.dicts[itemCode].filter(i=>i.id==value); + if(dicts && dicts.length > 0){ + return dicts[0].name }else{ return value; } diff --git a/src/views/xm/core/xmPhase/XmPhaseMng.vue b/src/views/xm/core/xmPhase/XmPhaseMng.vue index 579155bf..b1a6800b 100644 --- a/src/views/xm/core/xmPhase/XmPhaseMng.vue +++ b/src/views/xm/core/xmPhase/XmPhaseMng.vue @@ -1141,9 +1141,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue'; /**end 自定义函数请在上面加**/ formateOption:function(itemCode,value){ if(this.dicts[itemCode]){ - var options=this.dicts[itemCode].filter(i=>i.id==value); - if(options && dicts.length > 0){ - return options[0].name + var dicts=this.dicts[itemCode].filter(i=>i.id==value); + if(dicts && dicts.length > 0){ + return dicts[0].name }else{ return value; } diff --git a/src/views/xm/core/xmPhase/XmPhaseSelect.vue b/src/views/xm/core/xmPhase/XmPhaseSelect.vue index cd8b54f3..16424855 100644 --- a/src/views/xm/core/xmPhase/XmPhaseSelect.vue +++ b/src/views/xm/core/xmPhase/XmPhaseSelect.vue @@ -441,9 +441,9 @@ /**end 自定义函数请在上面加**/ formateOption:function(itemCode,value){ if(this.dicts[itemCode]){ - var options=this.dicts[itemCode].filter(i=>i.id==value); - if(options && dicts.length > 0){ - return options[0].name + var dicts=this.dicts[itemCode].filter(i=>i.id==value); + if(dicts && dicts.length > 0){ + return dicts[0].name }else{ return value; } diff --git a/src/views/xm/core/xmProduct/XmProductInfo.vue b/src/views/xm/core/xmProduct/XmProductInfo.vue index 6151b5e8..64c356f3 100644 --- a/src/views/xm/core/xmProduct/XmProductInfo.vue +++ b/src/views/xm/core/xmProduct/XmProductInfo.vue @@ -365,11 +365,11 @@ import XmProjectForLink from '../xmProject/XmProjectForLink.vue'; } else { return v[j]; } - const options = this.$refs.xmMenuWithPlan.dicts; - if(options[key]==undefined || options[key]==null || options[key].length==0 ){ + const dicts = this.$refs.xmMenuWithPlan.dicts; + if(dicts[key]==undefined || dicts[key]==null || dicts[key].length==0 ){ return v[j]; } - var rowData=options[key].filter(i=>i.id==v[j]) + var rowData=dicts[key].filter(i=>i.id==v[j]) if(rowData.length>0){ return rowData[0].name }else{ diff --git a/src/views/xm/core/xmProject/XmProjectInfo.vue b/src/views/xm/core/xmProject/XmProjectInfo.vue index 323a8654..3d73993b 100644 --- a/src/views/xm/core/xmProject/XmProjectInfo.vue +++ b/src/views/xm/core/xmProject/XmProjectInfo.vue @@ -362,11 +362,11 @@ } else { return v[j]; } - const options = this.$refs.xmMenuWithPlan.dicts; - if(options[key]==undefined || options[key]==null || options[key].length==0 ){ + const dicts = this.$refs.xmMenuWithPlan.dicts; + if(dicts[key]==undefined || dicts[key]==null || dicts[key].length==0 ){ return v[j]; } - var rowData=options[key].filter(i=>i.id==v[j]) + var rowData=dicts[key].filter(i=>i.id==v[j]) if(rowData.length>0){ return rowData[0].name }else{ diff --git a/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserAdd.vue b/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserAdd.vue index 020c0669..5c7dce0a 100644 --- a/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserAdd.vue +++ b/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserAdd.vue @@ -98,9 +98,9 @@ this.addForm.budgetCost=totalBudgetCost/this.allMonths.length; } , 'addForm.subjectId':function(subjectId) { - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.addForm.subjectName=options[0].name + this.addForm.subjectName=dicts[0].name }else{ this.addForm.subjectName=""; } diff --git a/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserEdit.vue b/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserEdit.vue index 2c50ace4..fa842297 100644 --- a/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserEdit.vue +++ b/src/views/xm/core/xmProjectMBudgetCostNouser/XmProjectMBudgetCostNouserEdit.vue @@ -63,9 +63,9 @@ } }, 'editForm.subjectId':function(subjectId) { - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.editForm.subjectName=options[0].name + this.editForm.subjectName=dicts[0].name }else{ this.editForm.subjectName=""; } diff --git a/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserAdd.vue b/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserAdd.vue index d8f3e105..3558c82e 100644 --- a/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserAdd.vue +++ b/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserAdd.vue @@ -100,9 +100,9 @@ this.addForm.budgetCost=totalBudgetCost/this.allMonths.length; }, 'addForm.subjectId':function(subjectId) { - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.addForm.subjectName=options[0].name + this.addForm.subjectName=dicts[0].name }else{ this.addForm.subjectName=""; } diff --git a/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserEdit.vue b/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserEdit.vue index e30829b3..2097d920 100644 --- a/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserEdit.vue +++ b/src/views/xm/core/xmProjectMBudgetCostUser/XmProjectMBudgetCostUserEdit.vue @@ -69,9 +69,9 @@ } , 'editForm.subjectId':function(subjectId) { console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxlg" + subjectId); - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.editForm.subjectName=options[0].name + this.editForm.subjectName=dicts[0].name }else{ this.editForm.subjectName=""; } diff --git a/src/views/xm/core/xmProjectMCostNouser/XmProjectMCostNouserAdd.vue b/src/views/xm/core/xmProjectMCostNouser/XmProjectMCostNouserAdd.vue index 015cb310..8885053a 100644 --- a/src/views/xm/core/xmProjectMCostNouser/XmProjectMCostNouserAdd.vue +++ b/src/views/xm/core/xmProjectMCostNouser/XmProjectMCostNouserAdd.vue @@ -63,9 +63,9 @@ } }, 'addForm.subjectId':function(subjectId) { - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.addForm.subjectName=options[0].name + this.addForm.subjectName=dicts[0].name }else{ this.addForm.subjectName=""; } diff --git a/src/views/xm/core/xmProjectMCostUser/XmProjectMCostUserAdd.vue b/src/views/xm/core/xmProjectMCostUser/XmProjectMCostUserAdd.vue index a08df84d..b56d12c2 100644 --- a/src/views/xm/core/xmProjectMCostUser/XmProjectMCostUserAdd.vue +++ b/src/views/xm/core/xmProjectMCostUser/XmProjectMCostUserAdd.vue @@ -76,9 +76,9 @@ } , 'addForm.subjectId':function(subjectId) { console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxlg" + subjectId); - var options=this.dicts.projectSubject.filter(i=>i.id==subjectId) + var dicts=this.dicts.projectSubject.filter(i=>i.id==subjectId) if(options!=null && dicts.length>0){ - this.addForm.subjectName=options[0].name + this.addForm.subjectName=dicts[0].name }else{ this.addForm.subjectName=""; } diff --git a/src/views/xm/core/xmTask/XmTaskMng.vue b/src/views/xm/core/xmTask/XmTaskMng.vue index c15c830c..5c45a4da 100644 --- a/src/views/xm/core/xmTask/XmTaskMng.vue +++ b/src/views/xm/core/xmTask/XmTaskMng.vue @@ -1983,11 +1983,11 @@ export default { }, formateOption: function (itemCode, value) { if (this.dicts[itemCode]) { - var options = this.dicts[itemCode].filter( + var dicts = this.dicts[itemCode].filter( (i) => i.id == value ); - if (options && dicts.length > 0) { - return options[0].name; + if (dicts && dicts.length > 0) { + return dicts[0].name; } else { return value; }