|
|
|
@ -5,18 +5,6 @@ |
|
|
|
<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> |
|
|
|
|
|
|
|
<xm-iteration-select v-if="!xmIteration || !xmIteration.id" style="display:inline;" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="selProject?selProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClearSelect"> |
|
|
|
</xm-iteration-select> |
|
|
|
<el-select v-if=" !selProject || !selProject.id" v-model="filters.iterationFilterType" placeholder="加入过迭代?" clearable> |
|
|
|
<el-option value="not-join-any-iteration" label="未加入过迭代"></el-option> |
|
|
|
<el-option value="join-any-iteration" label="已加入过迭代"></el-option> |
|
|
|
<el-option value="not-join-curr-iteration" :label="'未加入迭代【'+filters.iteration.iterationName+'】'" v-if="filters.iteration && filters.iteration.id"></el-option> |
|
|
|
<el-option value="join-curr-iteration" :label="'已加入本迭代【'+filters.iteration.iterationName+'】'" v-if="filters.iteration && filters.iteration.id"></el-option> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-select v-model="filters.dclasss" placeholder="分类" clearable multiple> |
|
|
|
<el-option v-for="i in dicts.dclass" :label="i.name" :key="i.id" :value="i.id"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="filters.priority" placeholder="优先级" clearable style="width: 100px;"> |
|
|
|
<el-option v-for="i in dicts.priority" :label="i.name" :key="i.id" :value="i.id"></el-option> |
|
|
|
</el-select> |
|
|
|
@ -61,8 +49,11 @@ |
|
|
|
<el-tag v-if="filters.mmUser" closable @close="clearFiltersMmUser()">{{filters.mmUser.username}}</el-tag> |
|
|
|
<el-button v-else @click="selectFiltersMmUser()">选责任人</el-button> |
|
|
|
<el-button @click="setFiltersMmUserAsMySelf()">我的</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24" v-if="!xmIteration || !xmIteration.id" style="padding-top:5px;"> |
|
|
|
<xm-iteration-select v-if="!xmIteration || !xmIteration.id" style="display:inline;" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="selProject?selProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClearSelect"> |
|
|
|
</xm-iteration-select> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24" style="padding-top:5px;"> |
|
|
|
<font class="more-label-font"> |
|
|
|
需求是否已加入迭代: |
|
|
|
@ -155,19 +146,21 @@ |
|
|
|
width="250" |
|
|
|
trigger="click" > |
|
|
|
<el-row> |
|
|
|
<!-- |
|
|
|
<el-col :span="24" style="padding-top:5px;"> |
|
|
|
<div class="icon" style="background-color: rgb(255, 153, 51);"> |
|
|
|
<i class="el-icon-s-promotion"></i> |
|
|
|
</div> |
|
|
|
<el-button @click="showAdd('1')">新建史诗</el-button> |
|
|
|
</el-col> |
|
|
|
<!-- |
|
|
|
|
|
|
|
<el-col :span="24" style="padding-top:5px;"> |
|
|
|
<div class="icon" style="background-color: rgb(0, 153, 51);"> |
|
|
|
<i class="el-icon-s-flag"></i> |
|
|
|
</div> |
|
|
|
<el-button @click="showAdd('2')">新建特性</el-button> |
|
|
|
</el-col> |
|
|
|
--> |
|
|
|
<el-col :span="24" style="padding-top:5px;"> |
|
|
|
|
|
|
|
<div class="icon" style="background-color: rgb(79, 140, 255);"> |
|
|
|
@ -175,7 +168,7 @@ |
|
|
|
</div> |
|
|
|
<el-button @click="showAdd('3')" >新建用户故事</el-button> |
|
|
|
</el-col> |
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24" style="padding-top:5px;"> |
|
|
|
<el-button @click="showImportFromMenuTemplate()" icon="el-icon-upload2">由模板快速导入需求</el-button> |
|
|
|
@ -196,7 +189,7 @@ |
|
|
|
<el-table :cell-style="cellStyleCalc" :expand-row-keys="expandRowKeysCpd" :header-cell-style="cellStyleCalc" :row-style="{height:'60px'}" 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"> |
|
|
|
<el-table-column sortable type="selection" width="40"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="menuName" label="需求名称" min-width="300" fixed="left"> |
|
|
|
<el-table-column prop="menuName" label="故事名称" min-width="300" fixed="left"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.dclass=='1'" class="icon" style="background-color: rgb(255, 153, 51);"> |
|
|
|
<i class="el-icon-s-promotion"></i> |
|
|
|
@ -207,16 +200,10 @@ |
|
|
|
<div v-if="scope.row.dclass=='3'" class="icon" style="background-color: rgb(79, 140, 255);"> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
</div> |
|
|
|
<span class="vlink" @click="showEdit(scope.row)" >{{scope.row.seqNo}} {{scope.row.menuName}} </span> |
|
|
|
<span >{{scope.row.seqNo}} {{scope.row.menuName}} </span> |
|
|
|
<div class="tool-bar"> |
|
|
|
<span class="u-btn"> |
|
|
|
<el-tooltip v-if="scope.row.dclass==='2'||scope.row.dclass==='1'" :content="scope.row.dclass==='1'?'新建特性':'新建用户故事'"> |
|
|
|
<el-button @click="showSubAdd( scope.row,scope.$index)" icon="el-icon-plus" title="新建" circle plain size="mini"> </el-button> |
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
<el-tooltip v-if="scope.row.dclass==='2'||scope.row.dclass==='1'" :content="scope.row.dclass==='1'?'新建特性':'新建用户故事'"> |
|
|
|
<el-button @click="showImportFromMenuTemplate(scope.row)" icon="el-icon-upload2" title="批量导入" circle plain size="mini"> </el-button> |
|
|
|
</el-tooltip> |
|
|
|
<span class="u-btn"> |
|
|
|
<el-button @click="showEdit( scope.row,scope.$index)" icon="el-icon-edit" title="编辑" circle plain size="mini"> </el-button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -444,7 +431,7 @@ |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
export default { |
|
|
|
props:['selProject','xmIteration','xmProduct','disabledMng'], |
|
|
|
props:['selProject','xmIteration','xmProduct','disabledMng','parentMenu'], |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'userInfo','roles' |
|
|
|
@ -469,6 +456,10 @@ |
|
|
|
selProject:function(){ |
|
|
|
this.getXmMenus(); |
|
|
|
} |
|
|
|
, |
|
|
|
"parentMenu.menuId":function(){ |
|
|
|
this.searchXmMenus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
const beginDate = new Date(); |
|
|
|
@ -489,7 +480,7 @@ |
|
|
|
dtype:'', |
|
|
|
priority:'', |
|
|
|
source:'', |
|
|
|
dclasss:[], |
|
|
|
dclasss:['3'], |
|
|
|
menuId:'',//需求编号 |
|
|
|
productId:'',//产品编号 |
|
|
|
}, |
|
|
|
@ -533,8 +524,7 @@ |
|
|
|
//编辑xmMenu界面初始化数据 |
|
|
|
editForm: { |
|
|
|
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1' |
|
|
|
}, |
|
|
|
parentMenu:null, |
|
|
|
}, |
|
|
|
menuTemplateVisible:false, |
|
|
|
valueChangeRows:[], |
|
|
|
menuDetailVisible:false, |
|
|
|
@ -671,6 +661,9 @@ |
|
|
|
if(this.filters.productId){ |
|
|
|
params.productId=this.filters.productId |
|
|
|
} |
|
|
|
if(this.parentMenu && this.parentMenu.menuId){ |
|
|
|
params.pmenuId=this.parentMenu.menuId |
|
|
|
} |
|
|
|
return params; |
|
|
|
}, |
|
|
|
loadXmMenusLazy(tree, treeNode, resolve) { |
|
|
|
@ -713,8 +706,7 @@ |
|
|
|
if( this.filters.product && this.filters.product.id){ |
|
|
|
params.productId=this.filters.product.id |
|
|
|
} |
|
|
|
params=this.getParams(params); |
|
|
|
params.withParents="1" |
|
|
|
params=this.getParams(params); |
|
|
|
let callback= (res)=>{ |
|
|
|
var tips=res.data.tips; |
|
|
|
if(tips.isOk){ |
|
|
|
@ -742,14 +734,12 @@ |
|
|
|
//显示新增界面 XmMenu xm_project_menu |
|
|
|
showAdd: function (dclass) { |
|
|
|
this.addForm={...this.addFormInit} |
|
|
|
if(this.filters.product && this.filters.product.id){ |
|
|
|
this.parentMenu=null; |
|
|
|
if(this.filters.product && this.filters.product.id){ |
|
|
|
this.addForm.productId=this.filters.product.id |
|
|
|
this.addForm.productName=this.filters.product.productName |
|
|
|
this.addForm.dclass=dclass |
|
|
|
this.addFormVisible = true; |
|
|
|
}else if(this.filters.iteration && this.filters.iteration.id){ |
|
|
|
this.parentMenu=null; |
|
|
|
}else if(this.filters.iteration && this.filters.iteration.id){ |
|
|
|
this.addForm.productId=this.filters.iteration.productId |
|
|
|
this.addForm.iterationId=this.filters.iteration.id |
|
|
|
this.addForm.iterationName=this.filters.iteration.iterationName |
|
|
|
@ -764,10 +754,9 @@ |
|
|
|
//this.addForm=Object.assign({}, this.editForm); |
|
|
|
}, |
|
|
|
showSubAdd:function(row){ |
|
|
|
|
|
|
|
|
|
|
|
this.addForm={...this.addFormInit} |
|
|
|
this.editForm=row |
|
|
|
this.parentMenu=row |
|
|
|
this.editForm=row |
|
|
|
this.expandRowKeysCpd.push(row.pmenuId); |
|
|
|
this.addForm.productId=row.productId |
|
|
|
if(this.filters.product && row.productId==this.filters.product.id){ |
|
|
|
@ -788,21 +777,14 @@ |
|
|
|
}, |
|
|
|
afterAddSubmit(row){ |
|
|
|
this.addFormVisible=false; |
|
|
|
this.pageInfo.count=true; |
|
|
|
//this.getXmMenus(); |
|
|
|
this.pageInfo.count=true; |
|
|
|
this.xmMenus.push(row); |
|
|
|
if(this.parentMenu){ |
|
|
|
this.parentMenu.childrenCnt=this.parentMenu.childrenCnt?this.parentMenu.childrenCnt+1:1; |
|
|
|
} |
|
|
|
treeTool.reloadAllChildren(this.$refs.table,this.maps,[row,{...this.parentMenu}],'pmenuId',this.loadXmMenusLazy) |
|
|
|
|
|
|
|
this.parentMenu=null; |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
afterEditSubmit(row){ |
|
|
|
this.editFormVisible=false; |
|
|
|
//this.getXmMenus(); |
|
|
|
treeTool.reloadChildren(this.$refs.table,this.maps,row.pmenuId,'pmenuId',this.loadXmMenusLazy) |
|
|
|
this.editFormVisible=false; |
|
|
|
}, |
|
|
|
//选择行xmMenu |
|
|
|
selsChange: function (sels) { |
|
|
|
@ -841,10 +823,8 @@ |
|
|
|
this.load.del=false; |
|
|
|
var tips=res.data.tips; |
|
|
|
if(tips.isOk){ |
|
|
|
this.pageInfo.count=true; |
|
|
|
|
|
|
|
treeTool.reloadChildren(this.$refs.table,this.maps,row.pmenuId,'pmenuId',this.loadXmMenusLazy) |
|
|
|
this.getXmMenus(); |
|
|
|
this.pageInfo.count=true; |
|
|
|
this.getXmMenus(); |
|
|
|
|
|
|
|
} |
|
|
|
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|
|
|
@ -867,8 +847,7 @@ |
|
|
|
if( tips.isOk ){ |
|
|
|
this.pageInfo.count=true; |
|
|
|
this.getXmMenus(); |
|
|
|
treeTool.reloadAllChildren(this.$refs.table,this.maps,this.sels,'pmenuId',this.loadXmMenusLazy) |
|
|
|
} |
|
|
|
} |
|
|
|
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|
|
|
}).catch( err => this.load.del=false ); |
|
|
|
}); |
|
|
|
@ -984,10 +963,7 @@ |
|
|
|
this.load.add=false |
|
|
|
var tips =res.data.tips |
|
|
|
if(tips.isOk){ |
|
|
|
this.getXmMenus() |
|
|
|
if(this.parentMenu && this.parentMenu.menuId){ |
|
|
|
treeTool.reloadAllChildren(this.$refs.table,this.maps,this.parentMenu.menuId,'pmenuId',this.loadXmMenusLazy) |
|
|
|
} |
|
|
|
this.getXmMenus() |
|
|
|
}else{ |
|
|
|
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' }); |
|
|
|
} |
|
|
|
@ -1131,9 +1107,7 @@ |
|
|
|
batchChangeParentMenu(params).then(res=>{ |
|
|
|
var tips = res.data.tips; |
|
|
|
if(tips.isOk){ |
|
|
|
this.searchXmMenus(); |
|
|
|
var rows=[...this.sels,{menuId:'',pmenuId:menu.menuId}] |
|
|
|
treeTool.reloadAllChildren(this.$refs.table,this.maps,rows,'pmenuId',this.loadXmMenusLazy) |
|
|
|
this.searchXmMenus(); |
|
|
|
} |
|
|
|
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'}) |
|
|
|
}) |
|
|
|
@ -1339,8 +1313,7 @@ |
|
|
|
onEditSomeFields(params){ |
|
|
|
Object.assign(this.editForm,params) |
|
|
|
}, |
|
|
|
onAddSubMenu(row){ |
|
|
|
treeTool.reloadAllChildren(this.$refs.table,this.maps,[this.editForm,row],'pmenuId',this.loadXmMenusLazy) |
|
|
|
onAddSubMenu(row){ |
|
|
|
} |
|
|
|
|
|
|
|
},//end methods |
|
|
|
|