-
+
+
+
选择需求
{{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个
+
@@ -17,8 +20,8 @@
width="400"
trigger="click" >
-
-
+
+
@@ -91,9 +94,9 @@
-
-
-
+
+ bug
+ 查bug
@@ -106,15 +109,23 @@
-
+
-
+
+
+
+
+
+
+
+
+
@@ -131,6 +142,9 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';
import XmGroupMng from '../xmGroup/XmGroupMng';
+ import XmQuestionMng from '../xmQuestion/XmQuestionMng';
+ import XmQuestionAdd from '../xmQuestion/XmQuestionAdd';
+ import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//修改界面
export default {
computed: {
@@ -138,7 +152,25 @@
'userInfo','roles'
])
},
- props:['multiSelect','selProject'],
+ props:['multiSelect','selProject','xmProduct','xmMenu'],
+ watch:{
+ 'xmProduct.id':function(val){
+ if(this.xmProduct && this.xmProduct.id){
+ this.filters.product=this.xmProduct
+ }else{
+ this.filters.product=null
+ }
+ this.searchXmTestCases();
+ },
+ 'xmMenu.menuId':function(val){
+
+ if(this.xmMenu && this.xmMenu.menuId){
+ this.filters.menus=[this.xmMenu]
+ }else{
+ this.filters.menus=[]
+ }
+ }
+ },
data() {
const beginDate = new Date();
const endDate = new Date();
@@ -149,6 +181,7 @@
product:null,
selProject:null,
luser:null,
+ iteration:null,
},
xmTestCases: [],//查询结果
pageInfo:{//分页数据
@@ -187,6 +220,8 @@
nextAction:'',
dateRanger: [ ],
pickerOptions: util.getPickerOptions('datarange'),
+ addBugVisible:false,
+ bugsVisible:false,
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
@@ -254,6 +289,9 @@
params.projectId=this.filters.selProject.id
}
+ if(this.filters.iteration){
+ params.iterationId=this.filters.iteration.id
+ }
if(this.filters.key){
params.key='%'+this.filters.key+'%'
}
@@ -295,14 +333,7 @@
},
//删除xmTestCase
handleDel: function (row,index) {
- if( !this.roles.some(i=>i.roleid=='testAdmin') && !this.roles.some(i=>i.roleid=='tester') && !this.roles.some(i=>i.roleid=='testTeamAdmin') ){
- this.$notify({position:'bottom-left',showClose: true,message:"只有测试经理、测试组长、测试员可以操作",type:"error"});
- return ;
- }
- if(!this.roles.some(i=>i.roleid=='testAdmin')){
- this.$notify({position:'bottom-left',showClose:true,message: "只有测试管理员才能删除测试用例", type: 'error' });
- return;
- }
+
this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning'
}).then(() => {
@@ -321,14 +352,7 @@
},
//批量删除xmTestCase
batchDel: function () {
- if( !this.roles.some(i=>i.roleid=='testAdmin') && !this.roles.some(i=>i.roleid=='tester') && !this.roles.some(i=>i.roleid=='testTeamAdmin') ){
- this.$notify({position:'bottom-left',showClose: true,message:"只有测试经理、测试组长、测试员可以操作",type:"error"});
- return ;
- }
- if(!this.roles.some(i=>i.roleid=='testAdmin')){
- this.$notify({position:'bottom-left',showClose:true,message: "只有测试管理员才能删除测试用例", type: 'error' });
- return;
- }
+
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
@@ -429,19 +453,48 @@
setFiltersHandlerAsMySelf(){
this.filters.luser=this.userInfo;
this.searchXmTestCases();
- }
+ },
+ showBugs(row){
+ this.editForm=row
+ this.bugsVisible=true;
+ },
+ showAddBug(row){
+ this.editForm=row
+ this.addBugVisible=true;
+
+ },
+
+ onIterationSelected(iteration){
+ this.filters.iteration=iteration
+ this.searchXmTestCases()
+ },
+
+ onIterationClear(){
+ this.filters.iteration=null
+ this.searchXmTestCases()
+ },
/**end 自定义函数请在上面加**/
},//end methods
components: {
'xm-test-case-add':XmTestCaseAdd,
'xm-test-case-edit':XmTestCaseEdit,
- xmMenuSelect,XmProductSelect,XmProjectSelect,XmGroupMng
+ xmMenuSelect,XmProductSelect,XmProjectSelect,XmGroupMng,XmQuestionAdd,
+ XmQuestionMng,XmIterationSelect,
//在下面添加其它组件
},
mounted() {
this.$nextTick(() => {
- this.filters.luser=this.userInfo;
+ if(this.xmProduct && this.xmProduct.id){
+ this.filters.product=this.xmProduct
+ }else{
+ this.filters.product=null
+ }
+ if(this.xmMenu && this.xmMenu.menuId){
+ this.filters.menus=[this.xmMenu]
+ }else{
+ this.filters.menus=[]
+ }
this.getXmTestCases();
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
});
diff --git a/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue b/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue
index b1eca560..b62357f2 100644
--- a/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue
+++ b/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue
@@ -740,7 +740,7 @@
mounted() {
this.filters.selProject=this.selProject;
- this.filters.execUser=this.userInfo;
+ //this.filters.execUser=this.userInfo;
this.$nextTick(() => {
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
this.getXmTestCaseExecs();