5 changed files with 513 additions and 157 deletions
-
285src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue
-
69src/views/xm/core/xmIteration/index.vue
-
158src/views/xm/core/xmIteration/top-nav.vue
-
15src/views/xm/core/xmProduct/top-nav.vue
-
143src/views/xm/core/xmProject/top-nav.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> |
||||
@ -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 |
||||
|
> <el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar> 迭代: {{ |
||||
|
xmIteration.iterationName.substring(0, 15) |
||||
|
}}</strong |
||||
|
></font |
||||
|
> |
||||
|
<font type="danger" v-else |
||||
|
><strong |
||||
|
> <el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar> 迭代: {{ 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" |
||||
|
> <el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar> 迭代: {{ xmIteration.iterationName.substring(0, 15) }}</font |
||||
|
> |
||||
|
<font type="danger" v-else |
||||
|
> <el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar> 迭代: {{ 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> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue