Browse Source

迭代添加关注

master
陈裕财 4 years ago
parent
commit
639cf5c841
  1. 2
      src/api/xm/core/xmMyFocus.js
  2. 1
      src/router/routes_xm.js
  3. 25
      src/views/xm/core/xmIteration/XmIterationMng.vue
  4. 32
      src/views/xm/core/xmMyFocus/XmMyFocusList.vue

2
src/api/xm/core/xmMyFocus.js

@ -47,7 +47,7 @@ export const myFocusForIndex = params => {
//初始化页面上的字典
export const initDicts = (that) => {
var itemCodes=[];//在此添加要加载的字典 如['sex','grade','lvl']
that.dicts['focusType']=[{id:'1',name:'项目'},{id:'2',name:'任务'},{id:'3',name:'产品'},{id:'4',name:'需求'},{id:'5',name:'缺陷'},]
that.dicts['focusType']=[{id:'1',name:'项目'},{id:'2',name:'任务'},{id:'3',name:'产品'},{id:'4',name:'需求'},{id:'5',name:'缺陷'},{id:'6',name:'迭代'},]
if(itemCodes.length>0){
initSimpleDicts('all',itemCodes).then(res=>{
Object.assign(that.dicts,res.data.data)

1
src/router/routes_xm.js

@ -113,6 +113,7 @@ export default {
{ path: 'xmMenu/XmMenuMng', component: _import('xm/core/xmMenu/XmMenuMng'), name: 'XmMenuMng', meta: { title: '需求管理' }},
{ path: 'xmMenuExchange/XmMenuExchangeMng', component: _import('xm/core/xmMenuExchange/XmMenuExchangeMng'), name: 'XmMenuExchangeMng', meta: { title: '互动评论' }},
{ path: 'xmIteration/XmIterationMng', component: _import('xm/core/xmIteration/XmIterationMng'), name: 'XmIterationMng', meta: { title: '迭代管理' }},
]
},

25
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -73,8 +73,11 @@
<el-table-column prop="adminUsername" label="负责人姓名" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="distBudgetWorkload" label="已分配工作量" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button v-if="menukey=='myFocus'" type="primary" @click.stop="focusOrUnfocus(scope.row)" >取消关注</el-button>
<el-button v-else type="text" @click.stop="focusOrUnfocus(scope.row)" >关注</el-button>
<el-button type="danger" @click="handleDel(scope.row,scope.$index)" icon="el-icon-delete"></el-button>
</template>
</el-table-column>
@ -118,7 +121,7 @@
import { mapGetters } from 'vuex'
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';
import { addXmMyFocus , delXmMyFocus } from '@/api/xm/core/xmMyFocus';
export default {
computed: {
...mapGetters([
@ -450,7 +453,23 @@ import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue'
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'});
})
})
}
},
focusOrUnfocus:function(row){
if(this.menukey=="myFocus"){
delXmMyFocus({pbizId:row.productId,focusType:'6',bizId:row.id,bizName:row.iterationName}).then(res=>{
var tips=res.data.tips;
if(tips.isOk){
this.getXmIterations();
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})
}else{
addXmMyFocus({pbizId:row.productId,focusType:'6',bizId:row.id,bizName:row.iterationName}).then(res=>{
var tips=res.data.tips;
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})
}
},
},//end methods
components: {
'xm-iteration-add':XmIterationAdd,

32
src/views/xm/core/xmMyFocus/XmMyFocusList.vue

@ -7,11 +7,12 @@
<div class="avatar-container">
<div class="avatar-wrapper">
<img class="user-avatar" src="../../../myWork/img/cp.png">
<span class="username"> 产品</span>
<span class="username"> 产品项目</span>
</div>
</div>
</div>
<div v-for="(o,index) in cps" :key="index" class="list-item">
<div v-for="(o,index) in pps" :key="index" class="list-item">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'focusType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag>
<el-link @click="toBizPage(o)">{{o.bizName }}</el-link>
<div class="tool-bar">
<span class="u-btn">
@ -29,11 +30,12 @@
<div class="avatar-container">
<div class="avatar-wrapper">
<img class="user-avatar" src="../../../myWork/img/xmgl.png">
<span class="username"> 项目</span>
<span class="username"> 迭代需求</span>
</div>
</div>
</div>
<div v-for="(o,index) in xms" :key="index" class="list-item">
<div v-for="(o,index) in ims" :key="index" class="list-item">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'focusType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag>
<el-link @click="toBizPage(o)">{{o.bizName }}</el-link>
<div class="tool-bar">
<span class="u-btn">
@ -49,11 +51,11 @@
<div class="avatar-container">
<div class="avatar-wrapper">
<img class="user-avatar" src="../../../myWork/img/xqgl.png">
<span class="username">需求任务缺陷</span>
<span class="username">任务缺陷</span>
</div>
</div>
</div>
<div v-for="(o,index) in oths" :key="index" class="list-item">
<div v-for="(o,index) in tbs" :key="index" class="list-item">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'focusType',o.focusType)" :key="index" :type="item.className">{{item.name}}</el-tag>
<el-link @click="toBizPage(o)"> {{o.bizName }}</el-link>
<div class="tool-bar">
@ -84,14 +86,14 @@ export default {
props:['visible'],
computed: {
...mapGetters(['userInfo']),
cps(){
return this.xmMyFocuss.filter(k=>k.focusType=='3')
pps(){
return this.xmMyFocuss.filter(k=>k.focusType=='1'||k.focusType=='3')
},
xms(){
return this.xmMyFocuss.filter(k=>k.focusType=='1')
ims(){
return this.xmMyFocuss.filter(k=>k.focusType=='4'||k.focusType=='6')
},
oths(){
return this.xmMyFocuss.filter(k=>k.focusType!='1' && k.focusType!='3')
tbs(){
return this.xmMyFocuss.filter(k=>k.focusType=='2' || k.focusType=='5')
}
},
@ -222,7 +224,11 @@ export default {
this.$router.push({path:'/xm/core/xmMenu/XmMenuDetailRoute',query:{id:bizObj.bizId}})
}else if(bizObj.focusType=='5'){
this.$router.push({path:'/xm/core/xmQuestion/XmQuestionDetailRoute',query:{id:bizObj.bizId}})
}else if(bizObj.focusType=='6'){
this.$router.push({path:'/xm/core/xmIteration/XmIterationInfoRoute',query:{id:bizObj.bizId}})
}
},
// XmMyFocus
showAdd: function () {
@ -371,7 +377,7 @@ export default {
}
.list-item{
margin-bottom: 20px;
margin-bottom: 15px;
}
.list-item:hover{

Loading…
Cancel
Save