diff --git a/src/router/routes_xm.js b/src/router/routes_xm.js index abec8cb4..38e30df8 100644 --- a/src/router/routes_xm.js +++ b/src/router/routes_xm.js @@ -555,6 +555,7 @@ export default { title: '测试管理', icon: 'bug' }, + hidden:true, // leaf: true,//只有一个节点 children: [ diff --git a/src/views/xm/core/xmFunc/XmFuncSelect.vue b/src/views/xm/core/xmFunc/XmFuncSelect.vue index 41c14211..fdc7a5e1 100644 --- a/src/views/xm/core/xmFunc/XmFuncSelect.vue +++ b/src/views/xm/core/xmFunc/XmFuncSelect.vue @@ -27,7 +27,7 @@ - + diff --git a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue index 43c2f57e..74c152be 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue @@ -9,20 +9,25 @@ {{editForm.projectId}} - {{editForm.productId}} - - - {{editForm.caseName?editForm.caseName:'无'}} 选择用例 - - - {{editForm.funcName?editForm.funcName:'无'}} 选择模块 - - - -
- -
{{editForm.menuName?editForm.menuName:"未关联需求"}}
+ {{editForm.productId}} + + +
+ + + {{editForm.caseName?editForm.caseName:'无'}} 选择用例 + + + {{editForm.funcName?editForm.funcName:'无'}} 选择模块 + + + +
+ +
{{editForm.menuName?editForm.menuName:"未关联需求"}}
+
+
@@ -182,7 +187,7 @@ - + @@ -191,11 +196,11 @@ - + - + @@ -222,6 +227,7 @@ import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm/index' import TestStepConfig from '../xmTestCase/TestStepConfig.vue'; import TestStepResult from '../xmTestPlanCase/TestStepResult.vue'; + import XmProductSelect from '@/views/xm/core/components/XmProductSelect' export default { computed: { ...mapGetters([ @@ -242,7 +248,32 @@ return 0; } - } + }, + xmProductCpd(){ + if(this.xmQuestion && this.xmQuestion.id && this.xmQuestion.productId){ + return {id:this.xmQuestion.productId,productName:this.xmQuestion.productName} + } + if(this.xmProduct&& this.xmProduct.id){ + return this.xmProduct + } + if(this.xmTestPlan && this.xmTestPlan.id){ + return {id:this.xmTestPlan.productId,productName:this.xmTestPlan.productName} + } + if(this.xmTestPlanCase && this.xmTestPlanCase.id && this.xmTestPlanCase.productId){ + return {id:this.xmTestPlanCase.productId,productName:this.xmTestPlanCase.productName} + } + if(this.xmTestCase && this.xmTestCase.id){ + return {id:this.xmTestCase.productId,productName:this.xmTestCase.productName} + } + if(this.xmMenu && this.xmMenu.menuId){ + return {id:this.xmMenu.productId,productName:this.xmMenu.productName} + } + + if(this.xmIteration && this.xmIteration.id){ + return {id:this.xmIteration.productId,productName:this.xmIteration.productName} + } + return null + } }, props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu','xmIteration','xmTestPlan'], watch: { @@ -626,12 +657,12 @@ this.editForm.menuId=this.xmMenu.menuId this.editForm.menuName=this.xmMenu.menuName if(this.xmMenu.productId){ - this.editForm.productId=this.xmMenu.id + this.editForm.productId=this.xmMenu.productId this.editForm.productName=this.xmMenu.productName } if(this.xmMenu.funcId){ - this.editForm.funcId=this.xmTestPlanCase.funcId - this.editForm.funcName=this.xmTestPlanCase.funcName + this.editForm.funcId=this.xmMenu.funcId + this.editForm.funcName=this.xmMenu.funcName } } }else{ @@ -657,13 +688,21 @@ Object.assign(this.editForm,params) this.editXmQuestionSomeFields(this.editForm,"caseId",params) this.caseVisible=false; - } + }, + onProductSelected(product){ + this.editForm.productId=product.id + this.editForm.productName=product.productName + }, + onProductClearSelect(){ + this.editForm.productId="" + this.editForm.productName="" + } },//end method components: { //在下面添加其它组件 'xm-question-edit':XmQuestionEdit - 'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect, + 'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect,XmProductSelect, XmMyDoFocus,XmFuncSelect,MdpSelectUserXm,TestStepConfig,TestStepResult, - xmTestPlanCaseMng:()=>import('../xmTestPlanCase/XmTestPlanCaseMng'), + xmTestPlanCaseMng:()=>import('../xmTestPlanCase/XmTestPlanCaseSelect'), 'xm-workload-record':()=>import("../xmWorkload/XmWorkloadRecord"), }, mounted() { diff --git a/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue index 4756d68f..d68ce5f2 100644 --- a/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue +++ b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue @@ -106,7 +106,7 @@ export default { props:['visible','xmTestPlan','xmTestCasedb','xmTestCase','xmProduct','select'], computed: { ...mapGetters(['userInfo']), - xmProductCpd(){ + xmProductCpd(){ if(this.xmProduct&& this.xmProduct.id){ return this.xmProduct } @@ -228,6 +228,9 @@ export default { if(this.filters.xmFunc && this.filters.xmFunc.id){ params.funcPidPathsLike=this.filters.xmFunc.pidPaths } + if(this.xmProductCpd && this.xmProductCpd.id){ + params.productId=this.xmProductCpd.id + } this.load.list = true; listXmTestPlanCase(params).then((res) => { diff --git a/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseSelect.vue b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseSelect.vue new file mode 100644 index 00000000..d64ae60e --- /dev/null +++ b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseSelect.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file