Browse Source

优化

master
陈裕财 4 years ago
parent
commit
2388254219
  1. 17
      src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue
  2. 23
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  3. 6
      src/views/xm/core/xmMenu/XmMenuBox.vue
  4. 6
      src/views/xm/core/xmMenu/XmMenuMng.vue
  5. 43
      src/views/xm/core/xmMenu/XmMenuSelect.vue

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

@ -1,15 +1,16 @@
<template>
<section class="page-container">
<section>
<el-row class="padding-top">
<el-col :span="10">
<el-col :span="24">
<el-row class="padding-left">
<el-input v-model="filters.key" style="width: 60%;" placeholder="模糊查询">
</el-input>
<el-button v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmIterationMenus" icon="el-icon-search"></el-button>
<span style="float:right;">
<el-button type="primary" @click="batchDel" icon="el-icon-right">批量移出</el-button>
<el-button type="danger" @click="batchDel" icon="el-icon-delete">批量移出</el-button>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">选择故事</el-button>
</span>
</el-row>
@ -37,17 +38,17 @@
</el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" @click="handleDel(scope.row,scope.$index)" icon="el-icon-right">移出</el-button>
<el-button type="danger" @click="handleDel(scope.row,scope.$index)" icon="el-icon-delete">移出</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
</el-col>
<el-col :span="14">
<xm-menu-select ref="menusSelect" iterationFilterType="not-join-curr-iteration" checkScope="3" :xm-product="xmIteration?{id:xmIteration.productId}:null" :xm-iteration="xmIteration" :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-col>
</el-col>
</el-row>
<el-dialog :visible.sync="menuVisible" width="80%" top="20" append-to-body title="选择用户故事加入迭代">
<xm-menu-select ref="menusSelect" iterationFilterType="not-join-curr-iteration" checkScope="3" :xm-product="xmIteration?{id:xmIteration.productId}:null" :xm-iteration="xmIteration" :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-dialog>
</section>
</template>

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

@ -1,8 +1,8 @@
<template>
<section class="padding">
<section>
<el-row>
<el-col :span="24" class="padding-left">
<el-row>
<el-row v-if="!disabledMng">
<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;">
<el-popover style="padding-left:10px;"
@ -44,10 +44,13 @@
<el-button class="hidden-md-and-down" v-if=" disabledMng!=false " @click="loadTasksToXmMenuState" icon="el-icon-s-marketing" title="汇总进度"></el-button>
</span>
</el-row>
<el-row class="padding-top">
<el-row>
<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">
<template v-if="!disabledMng">
<el-table-column sortable type="selection" width="40"></el-table-column>
</template>
<el-table-column prop="menuName" label="史诗、特性名称" min-width="150" >
<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>
@ -59,9 +62,9 @@
<i class="el-icon-document"></i>
</div>
<span>{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
<div class="tool-bar">
<div class="tool-bar" v-if="!disabledMng">
<span class="u-btn">
<el-tooltip v-if=" scope.row.dclass==='1'" :content=" '新建特性'">
<el-tooltip v-if=" scope.row.dclass==='1' " :content=" '新建特性'">
<el-button @click="showSubAdd( scope.row,scope.$index)" icon="el-icon-plus" title="新建" circle plain size="mini"> </el-button>
@ -71,7 +74,8 @@
</div>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" min-width="80" sortable>
<template v-if="!disabledMng">
<el-table-column prop="status" label="状态" width="100" sortable >
<template slot-scope="scope">
<div class="cell-text">
<el-button style="display:block;" :type="item.className" plain round v-for="(item,index) in formatterMenuStatusDicts(scope.row.status)" :key="index">{{item.name}}</el-button>
@ -83,6 +87,7 @@
</span>
</template>
</el-table-column>
</template>
</el-table>
@ -122,7 +127,7 @@
</el-drawer>
</el-col>
</el-row>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
<el-pagination layout="total, sizes, prev, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
<tag-dialog ref="tagDialog" :tagIds="filters.tags?filters.tags.map(i=>i.tagId):[]" :jump="true" @select-confirm="onTagSelected">
</tag-dialog>

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

@ -1,11 +1,11 @@
<template>
<section>
<section class="padding">
<el-row>
<el-col :span="8">
<xm-epic-features :xm-product="xmProduct" :sel-project="selProject" queryScope="plan" @row-click="onEpicFeaturesRowClick"></xm-epic-features>
<xm-epic-features :xm-product="xmProduct" :sel-project="selProject" @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>
<xm-menu-mng class="padding-left" :xm-product="xmProduct" :sel-project="selProject" :parent-menu="parentMenu"></xm-menu-mng>
</el-col>
</el-row>
</section>

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

@ -1,7 +1,7 @@
<template>
<section class="padding">
<section>
<el-row>
<el-col :span="24" class="padding-left">
<el-col :span="24">
<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>
@ -185,7 +185,7 @@
</span>
</el-row>
<el-row class="padding-top">
<el-row>
<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>

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

@ -1,7 +1,10 @@
<template>
<section>
<el-row>
<el-col :span="24" style="padding-left:12px;" >
<el-col :span="7">
<xm-epic-features class="padding-right" :xm-product="xmProduct" @row-click="onEpicFeaturesRowClick" :disabledMng="true"></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>
@ -19,15 +22,15 @@
<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.priority" placeholder="优先级" clearable style="width: 100px;">
<el-select v-model="filters.priority" placeholder="优先级" clearable style="width: 9 0px;">
<el-option v-for="i in dicts.priority" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-select v-model="filters.status" placeholder="需求状态" clearable style="width: 100px;">
<el-select v-model="filters.status" placeholder="需求状态" clearable style="width: 90px;">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.menuStatus" :key="index"></el-option>
</el-select>
<el-input v-model="filters.key" style="width: 15%;" placeholder="需求名称查询" clearable>
<el-input v-model="filters.key" style="width: 100px;" placeholder="需求名称查询" clearable>
</el-input>
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmMenus" icon="el-icon-search">查询</el-button>
<el-button v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmMenus" icon="el-icon-search">查询</el-button>
<el-popover
placement="top-start"
@ -135,9 +138,9 @@
<el-button slot="reference" icon="el-icon-more"></el-button>
</el-popover>
<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 style="padding-top:12px;">
<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-table-column v-if="multi" type="selection" width="50"></el-table-column>
@ -156,14 +159,15 @@
<span class="vlink" @click="toMenu(scope.row)">{{scope.row.seqNo}}&nbsp;
{{scope.row.menuName}}</span>
</template>
</el-table-column>
<el-table-column prop="productId" label="产品" min-width="100" > </el-table-column>
</el-table-column>
<el-table-column prop="iterationName" label="迭代" min-width="140" > </el-table-column>
<template v-if="!multi">
<el-table-column label="操作" width="100" fixed="right" >
<template slot-scope="scope">
<el-button :disabled=" checkScope!==scope.row.dclass" type="primary" @click="selectedMenu( scope.row,scope.$index)">选择</el-button>
</template>
</el-table-column>
</template>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
@ -201,6 +205,7 @@
import {sn} from '@/common/js/sequence'
import { mapGetters } from 'vuex'
import XmEpicFeatures from './XmEpicFeatures.vue';
export default {
props:['isSelectMenu','multi','visible','xmIteration','xmProduct','selProject','checkScope'/**1-史诗,2-特性,3-用户故事 */,'iterationFilterType','taskFilterType'],
@ -236,7 +241,7 @@
},
"selProject"(){
this.searchXmMenus();
}
}
},
data() {
const beginDate = new Date();
@ -250,6 +255,7 @@
iterationFilterType:'',////join,not-join,''
mmUser:null,
taskFilterType:'',//join,not-join,''
dclasss:['3'],
},
xmMenus: [],//
pageInfo:{//
@ -386,6 +392,14 @@
if(this.filters.tags && this.filters.tags.length>0){
params.tagIdList=this.filters.tags.map(i=>i.tagId)
}
if(this.filters.dclasss){
params.dclasss=this.filters.dclasss
}
if(this.parentMenu && this.parentMenu.menuId){
params.pmenuId=this.parentMenu.menuId
}
return params;
},
loadMenusLazy(tree, treeNode, resolve) {
@ -434,8 +448,7 @@
if(!params.productId && !params.iterationId && !params.linkIterationId){
this.$notify({position:'bottom-left',showClose:true,message: "请先选择产品", type: 'warning' });
return;
}
params.withParents="1"
}
this.load.list = true;
listXmMenu(params).then((res) => {
var tips=res.data.tips;
@ -533,11 +546,17 @@
}
this.searchXmMenus();
},
onEpicFeaturesRowClick(menu){
this.parentMenu=menu
this.searchXmMenus();
}
/**end 自定义函数请在上面加**/
},//end methods
components: {
XmProductSelect,XmMenuRichDetail,UsersSelect,XmIterationSelect,TagMng,
XmEpicFeatures,
//
},

Loading…
Cancel
Save