Browse Source

优化

master
陈裕财 4 years ago
parent
commit
0c48999292
  1. 10
      src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue
  2. 13
      src/views/xm/core/xmMenu/XmEpicFeaturesSelect.vue
  3. 2
      src/views/xm/core/xmMenu/XmMenuMng.vue
  4. 14
      src/views/xm/core/xmMenu/XmMenuSelect.vue
  5. 1
      src/views/xm/core/xmProject/XmProjectInfo.vue
  6. 26
      src/views/xm/core/xmTask/XmPhase.vue

10
src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue

@ -218,9 +218,7 @@
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.pageInfo.count=true;
this.$refs.menusSelect.reloadChildren([row]);
this.pageInfo.count=true;
this.getXmIterationMenus(); this.getXmIterationMenus();
} }
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
@ -243,8 +241,7 @@
batchDelXmIterationMenu(params).then((res) => { batchDelXmIterationMenu(params).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if( tips.isOk ){
this.$refs.menusSelect.reloadChildren(this.sels);
if( tips.isOk ){
this.pageInfo.count=true; this.pageInfo.count=true;
this.getXmIterationMenus(); this.getXmIterationMenus();
} }
@ -269,8 +266,7 @@
this.menuVisible=false this.menuVisible=false
var tips = res.data.tips var tips = res.data.tips
if(tips.isOk){ if(tips.isOk){
this.getXmIterationMenus()
this.$refs.menusSelect.reloadChildren(menus);
this.getXmIterationMenus()
} }
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'});
}) })

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

@ -276,6 +276,9 @@
params.productId=this.filters.product.id params.productId=this.filters.product.id
} }
params=this.getParams(params); params=this.getParams(params);
if(!params.productId){
return;
}
let callback= (res)=>{ let callback= (res)=>{
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
@ -302,13 +305,13 @@
this.filters.product=product this.filters.product=product
this.xmMenus=[] this.xmMenus=[]
this.getXmMenus() this.getXmMenus()
this.$emit("prodcut-select",product)
this.$emit("product-select",product)
}, },
onProductClearSelect:function(){ onProductClearSelect:function(){
this.filters.product=null this.filters.product=null
this.xmMenus=[] this.xmMenus=[]
this.getXmMenus() this.getXmMenus()
this.$emit("prodcut-select",null)
this.$emit("product-select",null)
}, },
select(row){ select(row){
this.$emit("select",row) this.$emit("select",row)
@ -323,8 +326,12 @@
params={label:'用户故事',icon:'el-icon-document',color:' rgb(79, 140, 255)'}; params={label:'用户故事',icon:'el-icon-document',color:' rgb(79, 140, 255)'};
} }
return params; return params;
},
},
rowClick: function(row, event, column){
this.editForm=row
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
},//end methods },//end methods
components: { components: {
XmProductSelect, XmProductSelect,

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

@ -854,7 +854,7 @@
this.editForm=row this.editForm=row
this.editFormBak=Object.assign({},row) this.editFormBak=Object.assign({},row)
this.$emit('row-click',row, event, column);// @row-click="rowClick" this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
},
handleExport() { handleExport() {
this.downloadLoading = true this.downloadLoading = true
const pageNum = this.pageInfo.pageNum; const pageNum = this.pageInfo.pageNum;

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

@ -2,11 +2,11 @@
<section> <section>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<xm-epic-features class="padding-right" :xm-product="xmProduct" @row-click="onEpicFeaturesRowClick" :show-select="false"></xm-epic-features>
<xm-epic-features class="padding-right" :xm-product="xmProduct" @row-click="onEpicFeaturesRowClick" :show-select="false" @product-select="onProductSelected"></xm-epic-features>
</el-col> </el-col>
<el-col :span="17" >
<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-col :span="17" ref="table">
<el-row v-if="filters.product && filters.product.id">
<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="filters.product?filters.product.id:null" @clear="onIterationClearSelect"></xm-iteration-select>
<el-select v-model="filters.taskFilterType" placeholder="已分配任务的需求?" clearable v-if="taskFilterType"> <el-select v-model="filters.taskFilterType" placeholder="已分配任务的需求?" clearable v-if="taskFilterType">
<el-option value="not-join-any-project" label="未分配过任务的需求"></el-option> <el-option value="not-join-any-project" label="未分配过任务的需求"></el-option>
@ -138,8 +138,8 @@
<el-button style="float:right;" type="primary" v-if="multi" v-on:click="multiSelectedConfirm">确认</el-button> <el-button style="float:right;" type="primary" v-if="multi" v-on:click="multiSelectedConfirm">确认</el-button>
</el-row> </el-row>
<el-row>
<el-table ref="table" class="menu-table" :height="maxTableHeight" :data="xmMenusTreeData" row-key="menuId" :tree-props="{children: 'children'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-row v-if="filters.product && filters.product.id">
<el-table class="menu-table" :height="maxTableHeight" :data="xmMenusTreeData" row-key="menuId" :tree-props="{children: 'children'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column v-if="multi" type="selection" width="50"></el-table-column> <el-table-column v-if="multi" type="selection" width="50"></el-table-column>
<el-table-column prop="menuName" label="需求名称" min-width="140" > <el-table-column prop="menuName" label="需求名称" min-width="140" >
@ -162,7 +162,7 @@
<template v-if="!multi"> <template v-if="!multi">
<el-table-column label="操作" width="100" fixed="right" > <el-table-column label="操作" width="100" fixed="right" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled=" checkScope!==scope.row.dclass" type="primary" @click="selectedMenu( scope.row,scope.$index)">选择</el-button>
<el-button type="primary" @click="selectedMenu( scope.row,scope.$index)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>

1
src/views/xm/core/xmProject/XmProjectInfo.vue

@ -33,6 +33,7 @@
<el-menu-item index="计划"> <el-menu-item index="计划">
<span slot="title"><i class="el-icon-odometer"></i>计划</span> <span slot="title"><i class="el-icon-odometer"></i>计划</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="任务"> <el-menu-item index="任务">
<span slot="title"><i class="el-icon-s-operation"></i>任务</span> <span slot="title"><i class="el-icon-s-operation"></i>任务</span>
</el-menu-item> </el-menu-item>

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

@ -605,18 +605,11 @@ export default {
}else if(this.queryScope==='task'){ }else if(this.queryScope==='task'){
params.ntype="0" params.ntype="0"
} }
if(this.ptype==='1' && !this.isTaskCenter){
if(!params.productId){
this.$notify.warning("请先选中产品")
return;
}
}else if(this.ptype==='0' && !this.isTaskCenter){
if(!params.projectId){ if(!params.projectId){
this.$notify.warning("请先选中项目") this.$notify.warning("请先选中项目")
return; return;
} }
}
//params.ptype=this.ptype //params.ptype=this.ptype
getTask(params) getTask(params)
@ -799,27 +792,14 @@ export default {
}, },
rowClick: function (row) { rowClick: function (row) {
this.editForm = row; this.editForm = row;
this.editFormBak=Object.assign({},row)
this.editFormBak=Object.assign({},row)
this.$emit('row-click',row,);// @row-click="rowClick" this.$emit('row-click',row,);// @row-click="rowClick"
},
showDrawer: function (row) {
this.editFormVisible = true;
this.editForm = row;
this.editFormBak=Object.assign({},row)
// this.$emit('row-click',row,);// @row-click="rowClick"
}, },
selectVisible(row,visible){ selectVisible(row,visible){
if(visible==true){ if(visible==true){
this.rowClick(row); this.rowClick(row);
} }
},
showExecusers(row) {
this.editForm = row;
this.execUserVisible = true;
},
},
showSkill(row) { showSkill(row) {
this.editForm = row; this.editForm = row;
this.skillVisible = true; this.skillVisible = true;

Loading…
Cancel
Save