Browse Source

优化

master
陈裕财 3 years ago
parent
commit
ae5ad1ed21
  1. 22
      src/router/routes_xm.js
  2. 4
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  3. 37
      src/views/xm/core/xmTestCase/XmTestCaseFlow.vue
  4. 37
      src/views/xm/core/xmTestCase/XmTestCaseList.vue
  5. 37
      src/views/xm/core/xmTestCasedb/Overview.vue
  6. 12
      src/views/xm/core/xmTestCasedb/XmTestCasedbMng.vue
  7. 68
      src/views/xm/core/xmTestCasedb/top-nav.vue
  8. 37
      src/views/xm/core/xmTestPlan/Overview.vue
  9. 47
      src/views/xm/rpt/reportIndexForTest.vue

22
src/router/routes_xm.js

@ -3,6 +3,7 @@ import Layout from '../views/layout/Layout'
import XmProjectLayout from '../views/xm/core/xmProject/index'
import XmProductLayout from '../views/xm/core/xmProduct/index'
import XmIterationLayout from '../views/xm/core/xmIteration/index'
import XmTestLayout from '../views/xm/core/xmTestCasedb/index'
const _import = require('./_import_' + process.env.NODE_ENV)
export default {
@ -527,7 +528,6 @@ export default {
]
},
{ path: '/xm/core/testCasedbRoute', component: _import('xm/core/xmTestCasedb/XmTestCasedbRoute'), name: 'XmTestCasedbRoute', meta: { title: '测试库管理',roles:["user"] },hidden:true},
{
path: '/xm/core',
component: Layout,
@ -547,6 +547,26 @@ export default {
]
},
{
path: '/xm/core/test',
component: XmTestLayout,
name: '测试管理',
iconCls: 'fa el-icon-menu',
meta: {
title: '测试管理',
icon: 'bug'
},
// leaf: true,//只有一个节点
children: [
{ path: 'overview', component: _import('xm/core/xmTestCasedb/Overview'), name: 'testOverview', meta: { title: '测试管理',roles:["user"] },hidden:true},
{ path: 'case', component: _import('xm/core/xmTestCase/XmTestCaseList'), name: 'testCase', meta: { title: '用例管理',roles:["user"] },hidden:true},
{ path: 'flow', component: _import('xm/core/xmTestCase/XmTestCaseFlow'), name: 'testFlow', meta: { title: '用例评审',roles:["user"] },hidden:true},
{ path: 'plan', component: _import('xm/core/xmTestPlan/Overview'), name: 'testPlan', meta: { title: '测试计划',roles:["user"] },hidden:true},
{ path: 'report', component: _import('xm/rpt/reportIndexForTest'), name: 'testReport', meta: { title: '统计分析',roles:["user"] },hidden:true},
]
},
{
path: '/xm/core',
component: Layout,

4
src/views/xm/core/xmQuestion/XmQuestionEdit.vue

@ -195,7 +195,7 @@
</el-dialog>
<el-dialog append-to-body title="执行用例选择" :visible.sync="caseVisible" width="80%" top="20px" :close-on-click-modal="false">
<xm-test-plan-case-mng :select="true" :visible="caseVisible" :xm-product="editForm.productId?{id:editForm.productId,productName:editForm.productName}:null" @select="onTestPlanCaseSelected" ></xm-test-plan-case-mng>
<xm-test-plan-case-mng :select="true" :visible="caseVisible" :xm-test-plan="xmTestPlan" :xm-product="editForm.productId?{id:editForm.productId,productName:editForm.productName}:null" @select="onTestPlanCaseSelected" ></xm-test-plan-case-mng>
</el-dialog>
</section>
</template>
@ -244,7 +244,7 @@
}
},
props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu','xmIteration'],
props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu','xmIteration','xmTestPlan'],
watch: {
'xmQuestion':function( xmQuestion ) {
this.editForm = {...xmQuestion};

37
src/views/xm/core/xmTestCase/XmTestCaseFlow.vue

@ -0,0 +1,37 @@
<template>
<section>
<xm-test-case-mng v-if="testCasedb&&testCasedb.id" :xm-test-casedb="testCasedb" scene="caseFlow"></xm-test-case-mng>
</section>
</template>
<script>
import { mapGetters } from 'vuex';
import XmTestCaseMng from './XmTestCaseMng'
export default {
computed: {
...mapGetters([
'userInfo','roles','testCasedb'
]),
},
watch:{
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
XmTestCaseMng,
//
},
mounted() {
}
}
</script>
<style scoped>
</style>

37
src/views/xm/core/xmTestCase/XmTestCaseList.vue

@ -0,0 +1,37 @@
<template>
<section>
<xm-test-case-mng v-if="testCasedb&&testCasedb.id" :xm-test-casedb="testCasedb"></xm-test-case-mng>
</section>
</template>
<script>
import { mapGetters } from 'vuex';
import XmTestCaseMng from './XmTestCaseMng'
export default {
computed: {
...mapGetters([
'userInfo','roles','testCasedb'
]),
},
watch:{
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
XmTestCaseMng,
//
},
mounted() {
}
}
</script>
<style scoped>
</style>

37
src/views/xm/core/xmTestCasedb/Overview.vue

@ -0,0 +1,37 @@
<template>
<section>
<xm-test-casedb-edit v-if="testCasedb&&testCasedb.id" :xm-test-casedb="testCasedb"></xm-test-casedb-edit>
</section>
</template>
<script>
import { mapGetters } from 'vuex';
import XmTestCasedbEdit from './XmTestCasedbEdit'
export default {
computed: {
...mapGetters([
'userInfo','roles','testCasedb'
]),
},
watch:{
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
XmTestCasedbEdit,
//
},
mounted() {
}
}
</script>
<style scoped>
</style>

12
src/views/xm/core/xmTestCasedb/XmTestCasedbMng.vue

@ -82,7 +82,7 @@ import XmTestCasedbEdit from './XmTestCasedbEdit';//新增修改界面
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm';//
import store from '@/store'
export default {
name:'xmTestCasedbMng',
@ -310,8 +310,14 @@ export default {
this.searchXmTestCasedbs();
},
goCasedbInfo(row){
localStorage.setItem('xm-test-casedb-info',JSON.stringify(row));
this.$router.push({path:'/xm/core/testCasedbRoute',query:{id:row.id}})
store.dispatch('setTestCasedb',row).then(res=>{
this.$router.push({
name:'testOverview',
query:{
casedbId:row.id
}
})
})
}
},//end methods
mounted() {

68
src/views/xm/core/xmTestCasedb/top-nav.vue

@ -46,69 +46,23 @@
>
</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/project?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-odometer"></i>项目</span>
<el-menu-item :index="'/xm/core/test/case?casedbId='+testCasedb.id">
<span slot="title"><i class="el-icon-odometer"></i>用例管理</span>
</el-menu-item>
<el-menu-item label="需求" :index="'/xm/core/product/menu?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-document"></i>需求</span>
<el-menu-item label="需求" :index="'/xm/core/test/flow?casedbId='+testCasedb.id">
<span slot="title"><i class="el-icon-document"></i>用例评审</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/iteration?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-connection"></i>迭代</span>
<el-menu-item :index="'/xm/core/test/plan?casedbId='+testCasedb.id">
<span slot="title"><i class="el-icon-connection"></i>测试计划</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/plan?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-time"></i>计划</span>
<el-menu-item :index="'/xm/core/test/report?casedbId='+testCasedb.id">
<span slot="title"><i class="el-icon-time"></i>统计分析</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/task?productId='+testCasedb.id" class="hidden-md-and-down">
<span slot="title"><i class="el-icon-s-operation"></i>任务</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/question?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-question"></i>缺陷</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/group?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-user-solid"></i>团队</span>
</el-menu-item>
<el-submenu index="caiwu" class="hidden-sm-and-down">
<template slot="title"><i class="el-icon-coin"></i>财务</template>
<el-menu-item :index="'/xm/core/product/contract?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-s-data"></i>合同管理</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/budget?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-coin"></i>预算</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/cost?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-coin"></i>费用</span>
</el-menu-item>
</el-submenu>
<el-menu-item :index="'/xm/core/product/report?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-s-data"></i>效能</span>
</el-menu-item>
<el-submenu index="zhishi" class="hidden-md-and-down">
<template slot="title">知识</template>
<el-menu-item :index="'/xm/core/product/file?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-document"></i>文档</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/env?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-setting"></i>环境清单</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/record?productId='+testCasedb.id">
<span slot="title"><i class="el-icon-edit-outline"></i>日志</span>
</el-menu-item>
</el-submenu>
<el-submenu index="更多">
<template slot="title">更多 </template>
<el-menu-item :index="'/xm/core/product/workloadDay?productId='+testCasedb.id">
<span slot="title"
><i class="el-icon-video-camera"></i>每日工时</span
>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/workloadMonth?productId='+testCasedb.id">
<span slot="title"
><i class="el-icon-video-camera"></i>每月工时</span
>
</el-menu-item>
<el-menu-item :index="'/xm/core/product/env?productId='+testCasedb.id">
<el-menu-item :index="'/xm/core/test/env?casedbId='+testCasedb.id">
<span slot="title"><i class="el-icon-setting"></i>环境清单</span>
</el-menu-item>
<el-menu-item index="/forum">
@ -120,9 +74,9 @@
<el-menu-item index="/helpCenter">
<span slot="title"><i class="el-icon-date"></i>客服</span>
</el-menu-item>
<el-menu-item index="/xm/core/testCasedb/XmProductMng" >
<el-menu-item index="/xm/core/testCasedb/XmTestCasedbMng" >
<span slot="title"
><i class="el-icon-back"></i>回到产品列表页</span
><i class="el-icon-back"></i>回到测试库列表页</span
>
</el-menu-item>
<el-menu-item index="/">

37
src/views/xm/core/xmTestPlan/Overview.vue

@ -0,0 +1,37 @@
<template>
<section>
<xm-test-plan-info v-if="testCasedb&&testCasedb.id" :xm-test-casedb="testCasedb"></xm-test-plan-info>
</section>
</template>
<script>
import { mapGetters } from 'vuex';
import XmTestPlanInfo from './XmTestPlanInfo'
export default {
computed: {
...mapGetters([
'userInfo','roles','testCasedb'
]),
},
watch:{
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
XmTestPlanInfo,
//
},
mounted() {
}
}
</script>
<style scoped>
</style>

47
src/views/xm/rpt/reportIndexForTest.vue

@ -0,0 +1,47 @@
<template>
<section>
<report-index :xm-product="xmProduct"></report-index>
</section>
</template>
<script>
import { mapGetters } from 'vuex';
import reportIndex from './reportIndex'
export default {
computed: {
...mapGetters([
'userInfo','roles','testCasedb'
]),
xmProduct:function(){
if(this.testCasedb&&this.testCasedb.id){
return {id:this.testCasedb.productId,productName:this.testCasedb.productName}
}else{
return null;
}
}
},
watch:{
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
reportIndex,
//
},
activated(){
},
mounted() {
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save