Browse Source

优化

master
陈裕财 4 years ago
parent
commit
f38d95763a
  1. 12
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  2. 28
      src/views/xm/core/xmMenu/XmEpicFeaturesSelect.vue
  3. 10
      src/views/xm/core/xmMenu/XmMenuSelect.vue
  4. 18
      src/views/xm/core/xmTask/XmPhase.vue
  5. 5
      src/views/xm/core/xmTask/XmPhaseSelect.vue
  6. 7
      src/views/xm/core/xmTask/XmTaskMng.vue

12
src/views/xm/core/xmMenu/XmEpicFeatures.vue

@ -3,8 +3,12 @@
<el-row>
<el-col :span="24" class="padding-left">
<el-row >
<span style="float:left;">
<xm-product-select ref="xmProductSelect1" style="display:inline;" v-if="!xmProduct && !xmIteration" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" :iterationId="xmIteration?xmIteration.id:null" @clear="onProductClearSelect"></xm-product-select>
<span style="float:right;" v-if="!disabledMng">
<el-input style="width:120px;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button icon="el-icon-search" @click="searchXmMenus()"></el-button>
<el-popover style="padding-left:10px;"
placement="top-start"
width="250"
@ -62,6 +66,12 @@
<i class="el-icon-document"></i>
</div>
<span>{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
<span
:style="{borderRadius: '30px',color:scope.row.rate >= 100 ? 'green' : 'blue'}"
>
{{ (scope.row.rate != null ? scope.row.rate : 0) + "%" }}
</span>
<div class="tool-bar" v-if="!disabledMng">
<span class="u-btn">
<el-tooltip v-if=" scope.row.dclass==='1' " :content=" '新建特性'">

28
src/views/xm/core/xmMenu/XmEpicFeaturesSelect.vue

@ -3,8 +3,11 @@
<el-row>
<el-col :span="24" class="padding-left">
<el-row >
<xm-product-select ref="xmProductSelect1" style="display:inline;" v-if="!xmProduct && !xmIteration" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" :iterationId="xmIteration?xmIteration.id:null" @clear="onProductClearSelect"></xm-product-select>
<el-input style="width:120px;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button icon="el-icon-search" @click="searchXmMenus()"></el-button>
</el-row>
<el-row>
<el-table stripe fit border ref="table" :height="maxTableHeight" :data="xmMenusTreeData" current-row-key="menuId" row-key="menuId" :tree-props="{children: 'children'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick">
@ -23,7 +26,7 @@
<span>{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
</template>
</el-table-column>
<template>
<template v-if="showSelect!==false">
<el-table-column label="操作" width="100" >
<template slot-scope="scope">
<el-button @click="select( scope.row,scope.$index)" title="选择" type="primary"> 选择</el-button>
@ -53,7 +56,7 @@
import { mapGetters } from 'vuex'
export default {
props:['selProject','xmIteration','xmProduct','disabledMng'],
props:['selProject','xmIteration','xmProduct','disabledMng','showSelect'],
computed: {
...mapGetters([
'userInfo','roles'
@ -71,7 +74,7 @@
this.filters.iteration=this.xmIteration
this.getXmMenus()
},
xmProduct:function(){
"xmProduct.id":function(){
this.filters.product=this.xmProduct
this.getXmMenus()
},
@ -296,16 +299,16 @@
this.sels = sels;
},
onProductSelected:function(product){
this.filters.product=product
this.productVisible=false;
this.filters.product=product
this.xmMenus=[]
this.getXmMenus()
this.$emit("prodcut-select",product)
},
onProductClearSelect:function(){
this.filters.product=null
this.productVisible=false;
this.filters.product=null
this.xmMenus=[]
this.getXmMenus()
this.getXmMenus()
this.$emit("prodcut-select",null)
},
select(row){
this.$emit("select",row)
@ -332,9 +335,6 @@
Object.assign(this.dicts,res.data.data)
})
this.filters.product=this.xmProduct
if(this.xmProduct && this.xmProduct.id){
this.productVisible=false;
}
if(this.xmIteration && this.xmIteration.id){
this.filters.iterationFilterType='join-curr-iteration'
@ -342,7 +342,11 @@
}
this.$nextTick(() => {
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
this.getXmMenus();
if(this.xmProduct && this.xmProduct.id){
this.getXmMenus();
}
});
}
}

10
src/views/xm/core/xmMenu/XmMenuSelect.vue

@ -1,13 +1,11 @@
<template>
<section>
<el-row v-if="xmProduct">
<el-row>
<el-col :span="7">
<xm-epic-features class="padding-right" :xm-product="xmProduct" @row-click="onEpicFeaturesRowClick" :disabledMng="true"></xm-epic-features>
<xm-epic-features class="padding-right" :xm-product="xmProduct" @row-click="onEpicFeaturesRowClick" :show-select="false"></xm-epic-features>
</el-col>
<el-col :span="17" >
<el-row>
<xm-product-select style="display:inline;" v-if="!xmProduct&&!xmIteration" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" ref="xmProductMng" :iteration-id="xmIteration?xmIteration.id:null" @clear="onProductClearSelect"></xm-product-select>
<el-row>
<xm-iteration-select style="display:inline;" v-if="!xmIteration" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onIterationSelected" ref="xmIterationMng" :product-id="xmProduct?xmProduct.id:null" @clear="onIterationClearSelect"></xm-iteration-select>
<el-select v-model="filters.taskFilterType" placeholder="已分配任务的需求?" clearable v-if="taskFilterType">
@ -205,7 +203,7 @@
import {sn} from '@/common/js/sequence'
import { mapGetters } from 'vuex'
import XmEpicFeatures from './XmEpicFeatures.vue';
import XmEpicFeatures from './XmEpicFeaturesSelect.vue';
export default {
props:['isSelectMenu','multi','visible','xmIteration','xmProduct','selProject','checkScope'/**1-史诗,2-特性,3-用户故事 */,'iterationFilterType','taskFilterType'],

18
src/views/xm/core/xmTask/XmPhase.vue

@ -5,9 +5,12 @@
:span="24"
class="padding-left"
>
<el-row>
<el-row>
<span style="float:left;">
<xm-project-select style="display:inline;" v-if="!selProject||!selProject.id" :auto-select="isTaskCenter?false:true" :link-iteration-id="xmIteration?xmIteration.id:null" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear="onProjectClear" ></xm-project-select>
<span style="float:right;">
<el-input style="width:120px;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button icon="el-icon-search" @click="searchXmTasks()"></el-button>
<el-popover
placement="top-start"
title="选择创建计划/任务的方式"
@ -54,10 +57,7 @@
</el-col>
</el-row>
<el-button
slot="reference"
v-if="
queryScope=='plan'||queryScope=='planTask'
"
slot="reference"
type="primary"
round
icon="el-icon-plus"
@ -518,6 +518,12 @@ export default {
this.load.calcProgress=true
calcProgress({id:row.id}).then(res=>{
this.load.calcProgress=false
var tips =res.data.tips;
this.$notify({
showClose: true,
message: tips.msg,
type: tips.isOk?"success":"error",
});
this.getXmTasks();
})
},

5
src/views/xm/core/xmTask/XmPhaseSelect.vue

@ -6,8 +6,9 @@
class="padding-left"
>
<el-row>
<xm-project-select style="display:inline;" v-if="!selProject||!selProject.id" :auto-select="isTaskCenter?false:true" :link-iteration-id="xmIteration?xmIteration.id:null" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear="onProjectClear" ></xm-project-select>
<xm-project-select style="display:inline;" v-if="!selProject||!selProject.id" :auto-select="isTaskCenter?false:true" :link-iteration-id="xmIteration?xmIteration.id:null" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear="onProjectClear" ></xm-project-select>
<el-input style="width:150px;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button icon="el-icon-search" @click="searchXmTasks()" type="primary"></el-button>
</el-row>
<el-row class="padding-top">

7
src/views/xm/core/xmTask/XmTaskMng.vue

@ -804,16 +804,15 @@
<el-drawer
append-to-body
title="需求选择"
title="选择需要关联的故事"
:visible.sync="batchRelTasksWithMenuVisible"
size="60%"
:close-on-click-modal="false"
>
<xm-menu-select
:visible="batchRelTasksWithMenuVisible"
:is-select-menu="true"
checkScope="3"
@selected="onBatchRelTasksWithMenu"
:is-select-menu="true"
@select="onBatchRelTasksWithMenu"
:xm-product="filters.product"
:sel-project="filters.selProject"
></xm-menu-select>

Loading…
Cancel
Save