Browse Source

优化

master
陈裕财 3 years ago
parent
commit
e37b39d5f1
  1. 2
      src/styles/mdp.scss
  2. 2
      src/views/xm/core/components/XmProjectSelect.vue
  3. 66
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  4. 15
      src/views/xm/core/xmMenu/XmEpicFeaturesSelect.vue
  5. 75
      src/views/xm/core/xmTask/XmPhase.vue

2
src/styles/mdp.scss

@ -309,7 +309,7 @@ table tr.hover-row{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width:20vw;
max-width:15vw;
}
/**
*解决表格固定列无法滚动问题

2
src/views/xm/core/components/XmProjectSelect.vue

@ -200,7 +200,7 @@
}}
</div>
</el-link>
<el-button type="text" size="mini" title="取消选中状态" circle plain v-if="editForm&&editForm.id" icon="el-icon-circle-close" @click.stop="clearSelect"></el-button>&nbsp;
<el-button type="text" size="mini" title="取消选中状态" circle plain v-if="editForm&&editForm.id" icon="el-icon-circle-close" @click.stop="clearSelect"></el-button>
</slot>
</span>
</slot>

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

@ -1,13 +1,12 @@
<template>
<section class="padding">
<el-row>
<div style="display:flex;">
<el-row v-show="!batchVisible">
<div style="display:flex;justify-content: space-between;">
<xm-product-select v-if=" !xmProduct || !xmProduct.id" ref="xmProductSelect1" style="display:inline;" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" @clear="onProductClearSelect" ></xm-product-select>
<el-input v-else v-model="filters.key" style="width:50%;" placeholder="名称模糊查询" clearable></el-input>
&nbsp;&nbsp;
<span style="margin-left: auto;">
<el-popover
<el-input v-else v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<span style="display:flex;">
<el-popover
style="margin-left:5px;"
placement="top-start"
width="250"
trigger="click" >
@ -38,9 +37,11 @@
<el-button @click="showImportFromMenuTemplate()" icon="el-icon-upload2">由模板快速导入需求</el-button>
</el-row>
</el-row>
<el-button type="primary" v-if="!disabledMng" round slot="reference" icon="el-icon-plus"></el-button>
<el-button type="primary" v-if="!disabledMng" circle plain slot="reference" icon="el-icon-plus"></el-button>
</el-popover>
<el-popover
<el-popover
style="margin-left:5px;"
placement="top-start"
title="更多操作"
width="400"
@ -73,26 +74,43 @@
<el-row>
<el-button type="primary" @click="searchXmMenus" icon="el-icon-search" title="查询" style="float:right;">查询</el-button>
</el-row>
<el-button slot="reference" @click="moreVisible=!moreVisible" icon="el-icon-more"></el-button>
</el-popover>
</span>
</div>
<el-button slot="reference" @click="moreVisible=!moreVisible" icon="el-icon-more" circle plain></el-button>
</el-popover>
</span>
</div>
</el-row>
<el-row v-show="batchVisible">
<div style="display:flex;">
<el-input v-if=" xmProduct && xmProduct.id" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button type="danger"
style="margin-left:5px;"
@click="batchDel"
v-loading="load.del"
icon="el-icon-delete"
title="批量删除" v-if="!disabledMng"
>删除</el-button>
<el-button type="primary" @click="showParentMenu" icon="el-icon-top" title="更换上级">更换上级</el-button>
</div>
</el-row>
<el-row >
<el-table ref="table" :row-style="{height:'46px'}" :cell-style="cellStyleCalc" :expand-row-keys="expandRowKeysCpd" :header-cell-style="cellStyleCalc" stripe fit border :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"
element-loading-text="努力加载中"
element-loading-spinner="el-icon-loading"
>
<template v-if="!disabledMng">
<template v-if="batchVisible">
<el-table-column sortable type="selection" width="40"></el-table-column>
</template>
<el-table-column prop="menuName" label="史诗、特性名称" min-width="150" >
<template slot="header">
<el-table-column prop="menuName" label="史诗特性" min-width="150" >
<template slot="header" slot-scope="scope">
<div style="display:flex;">
<div style="text-align: center;line-height: 32px;" title="史诗特性名称">史诗特性</div>
<el-input v-if=" !xmProduct || !xmProduct.id" v-model="filters.key" style="width:50%;margin-left: auto;" placeholder="名称模糊查询" clearable></el-input>
<div style="width:40%;text-align: left;line-height: 32px;" title="史诗特性名称">史诗特性
</div>
<div style="line-height: 32px;display:flex;justify-content: right;width:60%;">
<el-checkbox v-if="!disabledMng" title="您可以批量删除、批量更换上级等操作" v-model="batchVisible"><span style="color:#C0C4CC;">批量</span></el-checkbox>
<el-input size="mini" v-if=" !xmProduct || !xmProduct.id" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
</div>
</div>
</template>
<template slot-scope="scope">
@ -200,6 +218,7 @@
},
data() {
return {
batchVisible:false,
columnsConfig:[/**{label:'',property:'',isShow:true} */],
filters: {
key: '',
@ -416,6 +435,10 @@
},
//xmMenu
batchDel: function () {
if(!this.batchVisible){
this.$notify.warning("请先开启【批量】操作模式")
return;
}
if(this.sels.length==0){
this.$notify({position:'bottom-left',showClose:true,message: "请先选择要删除的需求", type: 'warning'});
return;
@ -589,6 +612,11 @@
}).catch( err => this.load.edit=false );
},
showParentMenu(){
if(!this.batchVisible){
this.$notify.warning("请先开启【批量】操作模式")
return;
}
if(this.filters.product && this.filters.product.id){
if(this.sels.length==0){
this.$notify({position:'bottom-left',showClose:true,message:'请先选择一个或者多个需求',type:'warning'})

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

@ -1,12 +1,15 @@
<template>
<section class="padding">
<el-row >
<el-row>
<div style="display:flex;">
<xm-product-select ref="xmProductSelect1" style="display:inline;" v-if="!xmProduct || !xmProduct.id" :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 v-if="xmProduct && xmProduct.id" style="width:10em;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button icon="el-icon-search" @click="searchXmMenus()"></el-button>
<el-button v-if="showSelect!==false && multi===true" type="primary" @click="selectConfirm()">确认选择</el-button>
</el-row>
<el-input v-else v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<el-button style="margin-left:5px;" icon="el-icon-search" @click="searchXmMenus()"></el-button>
<el-button style="margin-left:5px;" v-if="showSelect!==false && multi===true" type="primary" @click="selectConfirm()">确认选择</el-button>
</div>
</el-row>
<el-row>
<el-table element-loading-text="努力加载中" :row-style="{height:'46px'}" element-loading-spinner="el-icon-loading" 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">
<template v-if="showSelect!==false && multi===true">
@ -14,7 +17,7 @@
</el-table-column>
</template>
<el-table-column prop="menuName" label="史诗、特性名称" min-width="150" >
<template slot="header">史诗特性名称
<template slot="header">史诗特性
<el-input v-if="!xmProduct || !xmProduct.id" style="width:10em;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
</template>
<template slot-scope="scope">

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

@ -1,12 +1,12 @@
<template>
<section class="padding">
<el-row>
<span>
<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:50%;" v-else v-model="filters.key" placeholder="名称模糊查询" clearable @keyup.enter.native="searchXmTasks()"></el-input>
<span style="float:right;">
<el-popover
<el-row v-show="!batchVisible">
<div style="display:flex;justify-content: space-between;">
<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 v-else v-model="filters.key" placeholder="名称模糊查询" clearable @keyup.enter.native="searchXmTasks()"></el-input>
<span style="display:flex;">
<el-popover
style="margin-left:5px;"
placement="top-start"
title="选择创建计划/任务的方式"
width="300"
@ -50,12 +50,14 @@
<el-button
slot="reference"
type="primary"
round
circle
plain
icon="el-icon-plus"
title="新建计划"
></el-button>
</el-popover>
<el-popover
style="margin-left:5px;"
placement="top-start"
title="更多条件、操作"
width="400"
@ -92,12 +94,27 @@
>
</span>
</el-row>
<el-button slot="reference" @click="moreVisible=!moreVisible">更多</el-button>
<el-button slot="reference" @click="moreVisible=!moreVisible" icon="el-icon-more" circle plain></el-button>
</el-popover>
</span>
</span>
</div>
</el-row>
<el-row v-show="batchVisible">
<el-button type="danger"
@click="batchDel"
v-loading="load.del"
icon="el-icon-delete"
title="批量删除"
>删除</el-button
>
<el-button
@click="showParentTaskList"
title="更换任务的上级,实现任务搬家功能"
icon="el-icon-upload2"
v-loading="load.edit"
> 更换上级</el-button>
</el-row>
<el-row>
<el-table class="task-table" :row-style="{height:'46px'}"
element-loading-text="努力加载中" element-loading-spinner="el-icon-loading"
@ -117,22 +134,29 @@
row-key="id"
ref="table"
>
<el-table-column
label="全选"
type="selection"
width="50"
>
</el-table-column>
<template v-if="batchVisible">
<el-table-column
label="全选"
type="selection"
width="50"
>
</el-table-column>
</template>
<el-table-column
prop="name"
class-name="title"
label="计划名称"
>
<template slot="header">
<template slot="header" slot-scope="scope">
<div style="display:flex;">
<div style="text-align: center;line-height: 32px;">计划名称</div>
<el-input v-if=" !selProject || !selProject.id" v-model="filters.key" style="width:50%;margin-left: auto;" placeholder="名称模糊查询" clearable></el-input>
</div>
<div style="width:40%;text-align: left;line-height: 32px;">计划名称</div>
<div style="line-height: 32px;width:60%;display: flex;justify-content: right;">
<el-checkbox title="您可以批量删除、批量更换上级等操作" v-model="batchVisible"><span style="color:#C0C4CC;">批量</span></el-checkbox>
<el-input v-if="!selProject||!selProject.id" v-model="filters.key" size="mini" style="margin-left:5px;" placeholder="名称模糊查询" clearable></el-input>
</div>
</div>
</template>
<template slot-scope="scope">
<!--
@ -390,6 +414,7 @@ export default {
},
data() {
return {
batchVisible:false,
filters: {
key: "",
isMyTask: "0", //01
@ -773,6 +798,10 @@ export default {
},
//xmTask
batchDel: function () {
if(!this.batchVisible){
this.$notify.warning("请先开启【批量】操作模式")
return;
}
if(this.sels.length==0){
this.$notify.warning("请先选中要删除的记录")
return;
@ -976,6 +1005,10 @@ export default {
return params;
},
showParentTaskList(){
if(!this.batchVisible){
this.$notify.warning("请先开启【批量】操作模式")
return;
}
if(this.sels.length==0){
this.$notify({position:'bottom-left',showClose:true,message:"请先选择一个或者多个需要更换上级的计划/任务",type:'warning'})
return;

Loading…
Cancel
Save