Browse Source

迭代试图优化

master
陈裕财 3 years ago
parent
commit
2de7d4b21c
  1. 285
      src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue
  2. 69
      src/views/xm/core/xmIteration/index.vue
  3. 158
      src/views/xm/core/xmIteration/top-nav.vue
  4. 15
      src/views/xm/core/xmProduct/top-nav.vue
  5. 143
      src/views/xm/core/xmProject/top-nav.vue

285
src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue

@ -1,5 +1,268 @@
<template>
<section class="padding-left padding-right">
<el-row ref="pageMainRef">
<el-col
:span="infotype == '迭代概览' ? 4 : 0"
class="padding border"
:style="{ maxHeight: maxTableHeight + 'px', overflowY: 'auto' }"
>
<h4 class="padding-bottom">常用功能导航</h4>
<el-steps
:active="calcIterationStatusStep"
finish-status="success"
direction="vertical"
>
<el-step
v-for="(i, index) in dicts['iterationStatus']"
:title="i.name"
:key="index"
>
<el-row slot="description">
<el-row v-if="i.id == '0'"
><!--打开-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationMenu')"
>需求管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>配置需求范围</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '1')"
>开启需求评审</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationMenu')"
>需求管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>需求范围</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '1'"
><!--需求评审-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>确认需求范围</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationQuestion')"
>缺陷登记</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '2')"
>进入计划会</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '2'"
><!--计划会-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationDetail"
>迭代计划</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationTask')"
>任务管理</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '3')"
>设为研发中</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationDetail"
>迭代计划</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationTask')"
>任务管理</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '3'"
><!--研发中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationTask')"
>任务管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationReport')"
>效能分析</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '4')"
>设为测试中</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationReport')"
>效能分析</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '4'"
><!--测试中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="jumpTo('iterationQuestion')"
>缺陷管理</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '5')"
>设为待上线</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '5'"
><!--上线中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '6')"
>设为已完成</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '6'"
><!--已完成-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '7')"
>设为已关闭</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '7'"
><!--已关闭-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '0')"
>重新打开</el-button
>
</span>
</el-row>
</el-row>
</el-step>
</el-steps>
</el-col>
<el-col>
<el-menu mode="horizontal" :default-active="showPanelName" @select="onMenuToolBarSelect">
<el-menu-item index="overview">
<span slot="title">迭代概览</span>
@ -40,6 +303,8 @@
</font>
</el-row>
</div>
</el-col>
</el-row>
</section>
</template>
@ -52,18 +317,33 @@ import XmIterationEdit from './XmIterationEdit.vue';
import XmIterationMenuMng from '../xmIterationMenu/XmIterationMenuMng.vue';
import { loadTasksToXmIterationState } from '@/api/xm/core/xmIterationState';
import { listXmIterationWithState } from "@/api/xm/core/xmIteration";
import {initDicts, } from '@/api/xm/core/xmIteration';
export default {
components: {XmIterationOverview,XmIterationEdit, XmIterationMenuMng },
computed: {
...mapGetters(["userInfo"]),
...mapGetters(["userInfo","xmIteration"]),
calcIterationStatusStep() {
if (this.dicts["iterationStatus"] && this.xmIteration) {
var index = this.dicts["iterationStatus"].findIndex((i) => {
if (i.id == this.xmIteration.istatus) {
return true;
} else {
return false;
}
});
return index + 1;
} else {
return 0;
}
},
},
props:['xmIteration'],
watch:{
},
data() {
return {
dicts:{iterationStatus:[]},
load:{calcIteration:false,},
showPanelName:'overview'
};
@ -98,6 +378,7 @@ export default {
},
mounted() {
initDicts(this)
this.$nextTick(() => {
});
},

69
src/views/xm/core/xmIteration/index.vue

@ -0,0 +1,69 @@
<template>
<section>
<top-nav v-if="xmIteration&&xmIteration.id"/>
<keep-alive><router-view v-if="xmIteration && xmIteration.id"></router-view></keep-alive>
</section>
</template>
<script>
import util from "@/common/js/util"; //
//import Sticky from '@/components/Sticky' // header
//import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from "vuex";
import topNav from './top-nav.vue'
import store from '@/store'
import { listXmIterationWithState } from '@/api/xm/core/xmIteration';
export default {
computed: {
...mapGetters(["userInfo", "roles","xmIteration"]),
},
watch: {},
data() {
return {
};
}, //end data
methods: {
}, //end methods
components: {
topNav
//
},
mounted() {
debugger;
if(!this.$route.query.iterationId){
this.$message.error("地址不合规")
this.$route.back(-1)
}
if(!this.xmIteration||this.xmIteration.id!=this.$route.query.iterationId){
listXmIterationWithState({id:this.$route.query.iterationId}).then(res=>{
var tips = res.data.tips;
if(tips.isOk ){
if( res.data.data.length==1){
store.dispatch('setXmIteration',res.data.data[0])
}else{
this.$message.error("迭代编号不存在,请确保迭代编号正确")
this.$router.push({
path:'/xm/core/xmIteration/XmIterationMng'
})
}
}else{
this.$message.error(tips.msg)
this.$router.push({
path:'/xm/core/xmIteration/XmIterationMng'
})
}
})
}
},
beforeDestroy(){
store.dispatch('setXmIteration',null)
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

158
src/views/xm/core/xmIteration/top-nav.vue

@ -0,0 +1,158 @@
<template>
<section>
<el-row>
<el-menu
:default-active="infotype"
mode="horizontal"
@select="setInfotype"
class="menus"
background-color="rgb(48, 65, 86)"
text-color="rgb(191, 203, 217)"
active-text-color="#409eff"
:router="true"
>
<el-menu-item index="迭代概览">
<span
slot="title"
style="font-size: 18px; color: #ff8c00"
class="hidden-md-and-down"
:title="xmIteration.iterationName"
>
<font v-if="xmIteration.iterationName.length >= 15"
><strong
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;&nbsp;{{
xmIteration.iterationName.substring(0, 15)
}}</strong
></font
>
<font type="danger" v-else
><strong
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;&nbsp;{{ xmIteration.iterationName }}</strong
></font
>
</span>
<span
slot="title"
style="color: #ff8c00"
class="hidden-lg-and-up"
:title="xmIteration.iterationName"
>
<font v-if="xmIteration.iterationName.length >= 15"
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;{{ xmIteration.iterationName.substring(0, 15) }}</font
>
<font type="danger" v-else
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;{{ xmIteration.iterationName }}</font
>
</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/iteration/project?iterationId='+xmIteration.id">
<span slot="title"><i class="el-icon-odometer"></i>项目</span>
</el-menu-item>
<el-menu-item label="需求" :index="'/xm/core/iteration/menu?iterationId='+xmIteration.id" class="hidden-md-and-down">
<span slot="title"><i class="el-icon-document"></i>需求</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/iteration/task?iterationId='+xmIteration.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/iteration/question?iterationId='+xmIteration.id">
<span slot="title"><i class="el-icon-question"></i>缺陷</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/iteration/group?iterationId='+xmIteration.id">
<span slot="title"><i class="el-icon-user-solid"></i>团队</span>
</el-menu-item>
<el-menu-item :index="'/xm/core/iteration/report?iterationId='+xmIteration.id">
<span slot="title"><i class="el-icon-s-data"></i>效能</span>
</el-menu-item>
<el-submenu index="更多">
<template slot="title">更多 </template>
<el-menu-item :index="'/xm/core/iteration/workloadDay?iterationId='+xmIteration.id">
<span slot="title"
><i class="el-icon-video-camera"></i>每日工时</span
>
</el-menu-item>
<el-menu-item :index="'/xm/core/iteration/workloadMonth?iterationId='+xmIteration.id">
<span slot="title"
><i class="el-icon-video-camera"></i>每月工时</span
>
</el-menu-item>
<el-menu-item index="/forum">
<span slot="title"><i class="el-icon-date"></i>论坛</span>
</el-menu-item>
<el-menu-item index="/im">
<span slot="title"><i class="el-icon-date"></i>即聊</span>
</el-menu-item>
<el-menu-item index="/helpCenter">
<span slot="title"><i class="el-icon-date"></i>客服</span>
</el-menu-item>
<el-menu-item index="/xm/core/xmIteration/XmIterationMng" >
<span slot="title"
><i class="el-icon-back"></i>回到迭代列表页</span
>
</el-menu-item>
<el-menu-item index="/">
<span slot="title"
><i class="el-icon-s-home"></i>首页</span
>
</el-menu-item>
</el-submenu>
</el-menu>
</el-row>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
props: ["visible"],
computed: {
...mapGetters(["userInfo", "roles","xmIteration"]),
},
watch: {
$route:{
handler(newVal,oldValu){
this.infotype=newVal.fullPath
},
deep:true,
immediate:true,
}
},
data() {
return {
infotype:'',
};
}, //end data
methods: {
setInfotype(infotype) {
this.infotype = infotype;
},
}, //end methods
components: {
//
},
mounted() {
this.infotype=this.$route.fullPath
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menus {
.el-menu-item {
padding-left: 0px !important;
}
}
/* 超过宽度则用...代替 */
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.step-btn{
margin-left:0px;margin-bottom: 5px;
}
</style>

15
src/views/xm/core/xmProduct/top-nav.vue

@ -145,21 +145,6 @@ export default {
props: ["visible"],
computed: {
...mapGetters(["userInfo", "roles","xmProduct"]),
calcProjectStatusStep() {
if (this.dicts["productStatus"] && this.xmProduct) {
var index = this.dicts["productStatus"].findIndex((i) => {
if (i.id == this.xmProduct.status) {
return true;
} else {
return false;
}
});
return index + 1;
} else {
return 0;
}
},
},
watch: {
$route:{

143
src/views/xm/core/xmProject/top-nav.vue

@ -129,155 +129,18 @@
</el-menu-item>
</el-submenu>
</el-menu>
</el-row>
<!--
<el-row ref="pageBody">
<el-col :span="infotype=='项目概览'?20:24">
<xm-project-overview-complex
v-if="infotype == '项目概览'"
:sel-project="projectInfo"
@submit="afterEditSubmit"
@edit-fields="onEditFields"
ref="项目概览"
></xm-project-overview-complex>
<xm-product-for-link-complex
v-if="infotype == '产品'"
ref="xmProductComplex"
:sel-project="projectInfo"
></xm-product-for-link-complex>
<xm-iteration-for-link-complex
v-if="infotype == '迭代'"
ref="xmIterationMng"
:sel-project="projectInfo"
></xm-iteration-for-link-complex>
<xm-menu-mng
v-if="infotype == '需求'"
:sel-project="projectInfo"
></xm-menu-mng>
<xm-task-mng
v-if="infotype == '任务'"
ref="xmTaskMng"
:sel-project="projectInfo"
ptype="0"
queryScope="task"
key="task"
></xm-task-mng>
<xm-question
v-if="infotype == '缺陷'"
:qtype="'1'"
:sel-project="projectInfo"
ref="xmQuestion"
></xm-question>
<xm-group-mng
v-if="infotype == '团队'"
:sel-project="projectInfo"
></xm-group-mng>
<xm-file-mng
v-if="infotype == '文档'"
:sel-project="projectInfo"
></xm-file-mng>
<xm-plan
v-if="infotype == '计划'"
ref="projectPlan"
ptype="0"
queryScope="planTask"
:sel-project="projectInfo"
key="projectPlan"
></xm-plan>
<xm-test-case-exec-mng
v-if="infotype == '测试计划'"
:visible="infotype == '测试计划'"
:sel-project="projectInfo"
ref="xmQuestion"
></xm-test-case-exec-mng>
<xm-budget
v-if="infotype == '预算'"
:sel-project="projectInfo"
></xm-budget>
<xm-cost v-if="infotype == '费用'" :sel-project="projectInfo"></xm-cost>
<xm-project-kpi
v-if="infotype == '考核'"
:sel-project="projectInfo"
></xm-project-kpi>
<xm-record
v-if="infotype == '日志'"
:visible="infotype == '日志'"
:sel-project="projectInfo"
></xm-record>
<xm-contract
v-if="infotype == '合同管理'"
:sel-project="projectInfo"
></xm-contract>
<xm-env-list
v-if="infotype == '环境清单'"
:sel-project="projectInfo"
></xm-env-list>
<xm-question
v-if="infotype == '风险'"
:qtype="'2'"
:sel-project="projectInfo"
ref="xmRisk"
></xm-question>
<el-drawer
title="选中团队成员"
:visible.sync="groupUserVisible"
size="50%"
append-to-body
:close-on-click-modal="false"
>
<xm-group-select
:sel-project="projectInfo"
:visible="groupUserVisible"
is-select-multi-user="1"
@user-confirm="onUserSelected"
></xm-group-select>
</el-drawer>
<xm-report
v-if="infotype == '效能'"
:xm-project="projectInfo"
></xm-report>
<xm-workload-set-day-list
v-if="infotype == '每日工时'"
:xm-project="projectInfo"
></xm-workload-set-day-list>
<xm-workload-set-month-list
v-if="infotype == '每月工时'"
:xm-project="projectInfo"
></xm-workload-set-month-list>
</el-col>
</el-row>
-->
</el-row>
</section>
</template>
<script>
import { initDicts,getDefOptions,editXmProjectSomeFields } from "@/api/xm/core/xmProject";
<script>
import { mapGetters } from 'vuex'
export default {
props: ["visible"],
computed: {
...mapGetters(["userInfo", "roles","projectInfo"]),
calcProjectStatusStep() {
if (this.dicts["projectStatus"] && this.projectInfo) {
var index = this.dicts["projectStatus"].findIndex((i) => {
if (i.id == this.projectInfo.status) {
return true;
} else {
return false;
}
});
return index + 1;
} else {
return 0;
}
},
...mapGetters(["userInfo", "roles","projectInfo"]),
},
watch: {
$route:{

Loading…
Cancel
Save