7 changed files with 288 additions and 12 deletions
-
2src/api/xm/core/xmWorkload.js
-
70src/views/xm/core/xmQuestion/XmQuestionDetail.vue
-
74src/views/xm/core/xmTestCase/XmTestCaseDetail.vue
-
74src/views/xm/core/xmTestPlanCase/XmTestPlanCaseDetail.vue
-
10src/views/xm/core/xmWorkload/XmWorkloadList.vue
-
4src/views/xm/core/xmWorkload/XmWorkloadMng.vue
-
66src/views/xm/core/xmWorkload/XmWorkloadSimpleListForBizDate.vue
@ -0,0 +1,70 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<xm-question-edit v-if="xmQuestionDb" :xm-question="xmQuestionDb" :visible="showInfo"></xm-question-edit> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
|
||||
|
import { listXmQuestion } from '@/api/xm/core/xmQuestion'; |
||||
|
import { mapGetters } from 'vuex'; |
||||
|
import XmQuestionEdit from './XmQuestionEdit' |
||||
|
|
||||
|
export default { |
||||
|
props:['xmQuestion','reload','visible'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
}, |
||||
|
watch:{ |
||||
|
visible:function(){ |
||||
|
if(this.visible==true){ |
||||
|
if(this.reload==true){ |
||||
|
if(this.xmQuestion && this.xmQuestion.id){ |
||||
|
this.getXmQuestion(this.xmQuestion.id) |
||||
|
}else{ |
||||
|
this.xmQuestionDb=true |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
xmQuestionDb:null, |
||||
|
showInfo:false, |
||||
|
} |
||||
|
},//end data |
||||
|
methods: { |
||||
|
|
||||
|
getXmQuestion(id){ |
||||
|
listXmQuestion({id:id}).then(res=>{ |
||||
|
var tips = res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.xmQuestionDb=res.data.data[0] |
||||
|
this.showInfo=true; |
||||
|
}else{ |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
},//end methods |
||||
|
components: { |
||||
|
XmQuestionEdit, |
||||
|
//在下面添加其它组件 |
||||
|
}, |
||||
|
mounted() { |
||||
|
if(this.xmQuestion && this.xmQuestion.id && this.reload==true){ |
||||
|
this.getXmQuestion(this.xmQuestion.id) |
||||
|
}else if(( !this.xmQuestion ||! this.xmQuestion.id )&& this.reload==true){ |
||||
|
this.xmQuestionDb=null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
||||
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<xm-test-case-edit v-if="xmTestCaseDb&&xmTestCaseDb.id && showInfo" :xm-test-case="xmTestCaseDb" :visible="showInfo"></xm-test-case-edit> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
import { listXmTestCase } from '@/api/xm/core/xmTestCase'; |
||||
|
import { mapGetters } from 'vuex'; |
||||
|
|
||||
|
export default { |
||||
|
props:['xmTestCase','reload','visible'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
}, |
||||
|
watch:{ |
||||
|
'visible':function(){ |
||||
|
if(this.visible){ |
||||
|
if(this.reload){ |
||||
|
this.getXmTestCase(this.xmTestCase.id) |
||||
|
}else{ |
||||
|
this.xmTestCaseDb=this.xmTestCase |
||||
|
this.showInfo=true |
||||
|
} |
||||
|
}else{ |
||||
|
this.showInfo=false |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
xmTestCaseDb:null, |
||||
|
showInfo:false, |
||||
|
} |
||||
|
},//end data |
||||
|
methods: { |
||||
|
|
||||
|
getXmTestCase(id){ |
||||
|
if(!id){ |
||||
|
this.xmTestCaseDb=null |
||||
|
return; |
||||
|
} |
||||
|
listXmTestCase({id:id}).then(res=>{ |
||||
|
var tips = res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.xmTestCaseDb=res.data.data[0] |
||||
|
this.showInfo=true |
||||
|
}else{ |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
},//end methods |
||||
|
components: { |
||||
|
XmTestCaseEdit:()=>import("./XmTestCaseEdit"), |
||||
|
//在下面添加其它组件 |
||||
|
}, |
||||
|
mounted() { |
||||
|
if(this.reload){ |
||||
|
|
||||
|
this.getXmTestCase(this.xmTestCase.id) |
||||
|
}else{ |
||||
|
this.xmTestCaseDb=this.xmTestCase |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
||||
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<xm-test-plan-case-edit v-if="xmTestPlanCaseDb&&xmTestPlanCaseDb.caseId && showInfo" :xm-test-case="xmTestPlanCaseDb" :visible="showInfo"></xm-test-plan-case-edit> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
import { listXmTestPlanCase } from '@/api/xm/core/xmTestPlanCase'; |
||||
|
import { mapGetters } from 'vuex'; |
||||
|
|
||||
|
export default { |
||||
|
props:['xmTestPlanCase','reload','visible'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
}, |
||||
|
watch:{ |
||||
|
'visible':function(){ |
||||
|
if(this.visible){ |
||||
|
if(this.reload){ |
||||
|
this.getXmTestPlanCase(this.xmTestPlanCase.planId,this.xmTestPlanCase.caseId) |
||||
|
}else{ |
||||
|
this.xmTestPlanCaseDb=this.xmTestPlanCase |
||||
|
this.showInfo=true |
||||
|
} |
||||
|
}else{ |
||||
|
this.showInfo=false |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
xmTestPlanCaseDb:null, |
||||
|
showInfo:false, |
||||
|
} |
||||
|
},//end data |
||||
|
methods: { |
||||
|
|
||||
|
getXmTestPlanCase(planId,caseId){ |
||||
|
if(!planId){ |
||||
|
this.xmTestPlanCaseDb=null |
||||
|
return; |
||||
|
} |
||||
|
listXmTestPlanCase({planId:planId,caseId:caseId}).then(res=>{ |
||||
|
var tips = res.data.tips; |
||||
|
if(tips.isOk){ |
||||
|
this.xmTestPlanCaseDb=res.data.data[0] |
||||
|
this.showInfo=true |
||||
|
}else{ |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
},//end methods |
||||
|
components: { |
||||
|
XmTestPlanCaseEdit:()=>import("./XmTestPlanCaseEdit"), |
||||
|
//在下面添加其它组件 |
||||
|
}, |
||||
|
mounted() { |
||||
|
if(this.reload){ |
||||
|
|
||||
|
this.getXmTestPlanCase(this.xmTestPlanCase.planId,this.xmTestPlanCase.caseId) |
||||
|
}else{ |
||||
|
this.xmTestPlanCaseDb=this.xmTestPlanCase |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue