Browse Source

优化

master
陈裕财 4 years ago
parent
commit
b0657f2839
  1. 6
      src/views/xm/core/xmTestCasedb/XmTestCasedbInfo.vue
  2. 74
      src/views/xm/core/xmTestPlan/XmTestPlanInfo.vue
  3. 5
      src/views/xm/core/xmTestPlan/XmTestPlanMng.vue

6
src/views/xm/core/xmTestCasedb/XmTestCasedbInfo.vue

@ -10,7 +10,7 @@
</el-row>
<el-row>
<xm-test-case-mng v-if="activeIndex=='testCase'"></xm-test-case-mng>
<xm-test-plan-mng v-else-if="activeIndex=='testPlan'"> </xm-test-plan-mng>
<xm-test-plan-info v-else-if="activeIndex=='testPlan'"> </xm-test-plan-info>
</el-row>
</section>
</template>
@ -22,14 +22,14 @@ import config from '@/common/config';//全局公共库
import { initDicts,listXmTestCasedb, delXmTestCasedb, batchDelXmTestCasedb,editSomeFieldsXmTestCasedb } from '@/api/xm/core/xmTestCasedb';
import XmTestCasedbEdit from './XmTestCasedbEdit';//
import XmTestCaseMng from '../xmTestCase/XmTestCaseMng';//
import XmTestPlanMng from '../xmTestPlan/XmTestPlanMng';//
import XmTestPlanInfo from '../xmTestPlan/XmTestPlanInfo';//
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
name:'xmTestCasedbMng',
components: {
XmTestCasedbEdit,XmProductSelect,XmTestCaseMng,XmTestPlanMng,
XmTestCasedbEdit,XmProductSelect,XmTestCaseMng,XmTestPlanInfo,
},
props:['visible','xmProduct','selProject'],
computed: {

74
src/views/xm/core/xmTestPlan/XmTestPlanInfo.vue

@ -0,0 +1,74 @@
<template>
<section>
<el-row>
</el-row>
<el-row>
<xm-test-plan-case-mng v-if="activeIndex=='testPlanCase'&& xmTestPlan && xmTestPlan.id" :xm-test-plan="xmTestPlan"></xm-test-plan-case-mng>
<xm-test-plan-mng v-else @select="onTestPlanSelect"> </xm-test-plan-mng>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import XmTestCaseMng from '../xmTestCase/XmTestCaseMng';//
import XmTestPlanMng from '../xmTestPlan/XmTestPlanMng';//
import XmTestPlanCaseMng from '../xmTestPlanCase/XmTestPlanCaseMng';//
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
name:'xmTestCasedbMng',
components: {
XmProductSelect, XmTestPlanMng,XmTestPlanCaseMng
},
props:['visible','xmProduct','selProject'],
computed: {
...mapGetters(['userInfo']),
},
watch:{
visible(val){
if(val==true){
}
}
},
data() {
return {
activeIndex:'testPlan',
xmTestPlan:null,
}
},//end data
methods: {
...util,
onTestPlanSelect(row){
this.activeIndex='testPlanCase'
this.xmTestPlan=row
}
},//end methods
mounted() {
this.$nextTick(() => {
});
}
}
</script>
<style lang="scss" scoped>
.center{
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.el-menu{
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

5
src/views/xm/core/xmTestPlan/XmTestPlanMng.vue

@ -22,7 +22,7 @@
<el-table-column prop="id" label="测试计划编号" min-width="120" show-overflow-tooltip fixed="left"></el-table-column>
<el-table-column prop="name" label="计划名称" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.name}} </span>
<span> <el-link @click="goToTestPlanCase(scope.row)"> {{scope.row.name}}</el-link> </span>
</template>
</el-table-column>
<el-table-column prop="casedbId" label="用例库编号" min-width="120" show-overflow-tooltip>
@ -363,6 +363,9 @@ export default {
initData: function(){
},
goToTestPlanCase(row){
this.$emit('select',row);// @row-click="rowClick"
}
},//end methods
mounted() {

Loading…
Cancel
Save