Browse Source

优化

master
陈裕财 4 years ago
parent
commit
f6afc1f1cd
  1. 1137
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  2. 20
      src/views/xm/core/xmMenu/XmMenuAdd.vue
  3. 60
      src/views/xm/core/xmMenu/XmMenuBox.vue
  4. 99
      src/views/xm/core/xmMenu/XmMenuMng.vue
  5. 9
      src/views/xm/core/xmProduct/XmProductInfo.vue

1137
src/views/xm/core/xmMenu/XmEpicFeatures.vue
File diff suppressed because it is too large
View File

20
src/views/xm/core/xmMenu/XmMenuAdd.vue

@ -271,16 +271,18 @@
this.addForm.pmenuId=this.parentMenu.menuId
this.addForm.pmenuName=this.parentMenu.menuName
this.addForm.menuName=this.parentMenu.menuName+'-请修改补充'
if(this.parentMenu.dclass==='3'){
this.addForm.dclass='4'
}else if(this.parentMenu.dclass==='2'){
this.addForm.dclass='3'
}else if(this.parentMenu.dclass==='1'){
this.addForm.dclass='2'
}else if(this.parentMenu.dclass==='0'){
this.addForm.dclass='1'
if(!this.addForm.dclass){
if(this.parentMenu.dclass==='3'){
this.addForm.dclass='4'
}else if(this.parentMenu.dclass==='2'){
this.addForm.dclass='3'
}else if(this.parentMenu.dclass==='1'){
this.addForm.dclass='2'
}else if(this.parentMenu.dclass==='0'){
this.addForm.dclass='1'
}
}
if(this.addForm.dclass<3){
this.addForm.calcType="3"
}else{

60
src/views/xm/core/xmMenu/XmMenuBox.vue

@ -0,0 +1,60 @@
<template>
<section>
<el-row>
<el-col :span="8">
<xm-epic-features :xm-product="xmProduct" :sel-project="selProject" queryScope="plan" @row-click="onEpicFeaturesRowClick"></xm-epic-features>
</el-col>
<el-col :span="16">
<xm-menu-mng :xm-product="xmProduct" :sel-project="selProject" queryScope="task" :parent-menu="parentMenu"></xm-menu-mng>
</el-col>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import XmEpicFeatures from '@/views/xm/core/xmMenu/XmEpicFeatures';//
import XmMenuMng from '@/views/xm/core/xmMenu/XmMenuMng';//
export default {
components: {
XmEpicFeatures,XmMenuMng
},
props:['xmProduct','selProject'],
computed: {
...mapGetters([
'userInfo','roles'
]),
},
watch: {
},
data() {
return {
parentMenu:null,
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
}//end return
},//end data
methods: {
onEpicFeaturesRowClick(menu){
this.parentMenu=menu
}
},//end method
mounted() {
}//end mounted
}
</script>
<style scoped>
</style>

99
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -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}} &nbsp; {{scope.row.menuName}} </span>
<span >{{scope.row.seqNo}} &nbsp; {{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

9
src/views/xm/core/xmProduct/XmProductInfo.vue

@ -159,7 +159,7 @@
<xm-product-overview-complex v-if="infotype=='产品概览'" :xm-product="xmProduct"></xm-product-overview-complex>
<xm-iteration-for-link-complex v-if="infotype=='迭代'" ref="xmIterationMng" :xm-product="xmProduct"></xm-iteration-for-link-complex>
<xm-project-for-link-complex v-if="infotype=='项目'" ref="xmProjectForLink" :xm-product="xmProduct"></xm-project-for-link-complex>
<xm-menu-mng v-if="infotype=='需求'" :xm-product="xmProduct"></xm-menu-mng>
<xm-menu-box v-if="infotype=='需求'" :xm-product="xmProduct"></xm-menu-box>
<xm-task-mng v-if="infotype=='产品任务'" ptype="1" queryScope="task" ref="productXmTaskMng" :xm-product="xmProduct" key="productXmTaskMng"></xm-task-mng>
<xm-task-mng v-if="infotype=='项目任务'" ptype="0" queryScope="task" ref="projectXmTaskMng" :xm-product="xmProduct" key="projectXmTaskMng"></xm-task-mng>
<xm-question v-if="infotype=='缺陷'" :xm-product='xmProduct' ref="xmQuestion"></xm-question>
@ -211,8 +211,7 @@
import xmBudget from '../xmProject/XmProjectBudgetCost';
import xmContract from '../xmContract/XmContractMng';
import xmEnvList from '../xmProjectEnvList/XmProjectEnvListMng';
import xmPhaseForProduct from '../xmPhase/xmPhaseForProduct';
import xmMenuMng from '../xmMenu/XmMenuMng';
import xmPhaseForProduct from '../xmPhase/xmPhaseForProduct';
import xmMenuWithPlan from '../xmMenu/XmMenuWithPlan';
import xmProjectStateMng from '../xmProjectState/XmProjectStateMng';
import xmTestCaseExecMng from '../xmTestCaseExec/XmTestCaseExecMng';
@ -222,6 +221,7 @@
import XmProjectForLink from '../xmProject/XmProjectForLink.vue';
import XmReport from '@/views/xm/rpt/reportIndex';
import XmMenuBox from '../xmMenu/XmMenuBox.vue';
export default {
@ -442,7 +442,7 @@
xmBudget,
xmContract,
xmEnvList,
xmMenuMng,
XmMenuBox,
xmMenuWithPlan,
xmProjectStateMng,
xmTestCaseExecMng,
@ -454,6 +454,7 @@
XmProjectForLink,
XmReport,
xmPlan,
XmMenuBox,
//
},
mounted() {

Loading…
Cancel
Save