Browse Source

优化

master
陈裕财 3 years ago
parent
commit
1b30167ef5
  1. 12
      src/styles/mdp.scss
  2. 27
      src/views/xm/core/components/XmIterationSelect.vue
  3. 32
      src/views/xm/core/components/XmProductSelect.vue
  4. 27
      src/views/xm/core/components/XmProjectSelect.vue
  5. 38
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  6. 15
      src/views/xm/core/xmMenu/XmEpicFeaturesSelect.vue
  7. 18
      src/views/xm/core/xmMenu/XmMenuBox.vue
  8. 9
      src/views/xm/core/xmMenu/XmMenuMng.vue
  9. 27
      src/views/xm/core/xmProduct/XmProductForLinkComplex.vue

12
src/styles/mdp.scss

@ -284,6 +284,18 @@ table tr.hover-row{
.cell-text{
display:none;
}
}
.lg-text{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width:250px;
}
.sm-text{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width:200px;
}
/**
*解决表格固定列无法滚动问题

27
src/views/xm/core/components/XmIterationSelect.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-popover style="display:inline;"
<el-popover
placement="bottom"
width="400"
v-model="iterationVisible"
@ -118,7 +118,28 @@
<el-pagination layout="total, 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>
</el-row>
<el-link title="点击选中迭代" @click="referenceClick" type="primary" slot="reference" icon="el-icon-connection"><font style="font-size:14px;"><slot name="title">{{editForm&&editForm.id?editForm.iterationName:'选择迭代'}} &nbsp;<el-button v-if="editForm&&editForm.id" type="text" plain icon="el-icon-circle-close" @click.stop="clearSelectIteration">清除</el-button>&nbsp;&nbsp;</slot></font></el-link>
<div slot="reference" @click="referenceClick">
<slot name="reference">
<span class="title">
<slot name="title">
<el-link title="点击选中迭代" type="primary" icon="el-icon-connection">
<div class="lg-text hidden-md-and-down">
{{
editForm&&editForm.id?editForm.iterationName:'选择迭代'
}}
</div>
<div class="sm-text hidden-lg-and-up">
{{
editForm&&editForm.id?editForm.iterationName:'选择迭代'
}}
</div>
</el-link>
<el-button v-if="editForm&&editForm.id" type="text" icon="el-icon-circle-close" @click.stop="clearSelectIteration"></el-button>&nbsp;
</slot>
</span>
</slot>
</div>
</el-popover>
@ -444,7 +465,7 @@
float: right;
}
.title {
display: flex;
height: 32px;
line-height: 32px;
text-align: left;

32
src/views/xm/core/components/XmProductSelect.vue

@ -181,24 +181,36 @@
style="float: right"
></el-pagination>
</el-row>
<slot name="reference">
<div slot="reference" @click="referenceClick">
<slot name="reference" v-bind:product="editForm">
<div class="title">
<slot name="title" v-bind:product="editForm">
<el-link
title="产品,点击选择、清除选择"
@click="referenceClick"
type="primary"
slot="reference"
v-loading="load.list"
icon="el-icon-s-opportunity"
>
<span class="title">
<slot name="title">
<div class="lg-text hidden-md-and-down">
{{
editForm && editForm.id ? editForm.productName : "选择产品"
}} &nbsp;<el-button v-if="editForm&&editForm.id" type="text" plain icon="el-icon-circle-close" @click.stop="clearSelect">清除</el-button>&nbsp;&nbsp;</slot>
</span>
</el-link
>
}}
</div>
<div class="sm-text hidden-lg-and-up">
{{
editForm && editForm.id ? editForm.productName : "选择产品"
}}
</div>
</el-link>
<el-button v-if="editForm&&editForm.id" type="text" icon="el-icon-circle-close" @click.stop="clearSelect"></el-button>&nbsp;
</slot>
</div>
</slot>
</div>
</el-popover>
<el-dialog append-to-body :visible.sync="addProductVisible" width="70%">
@ -523,7 +535,7 @@ export default {
float: right;
}
.title {
display: flex;
height: 32px;
line-height: 32px;
text-align: left;

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

@ -186,16 +186,29 @@
</el-row>
<span slot="reference" @click="referenceClick">
<slot name="reference"
><el-link
>
<span class="title">
<slot name="title">
<el-link
title="项目,点击选择、清除选择"
type="warning"
icon="el-icon-odometer"
>
<span class="title">
<slot name="title">{{
<div class="lg-text hidden-md-and-down">
{{
editForm && editForm.id ? editForm.name: "选择项目"
}}
</div>
<div class="sm-text hidden-lg-and-up">
{{
editForm && editForm.id ? editForm.name: "选择项目"
}}&nbsp;<el-button v-if="editForm&&editForm.id" type="text" plain icon="el-icon-circle-close" @click.stop="clearSelect">清除</el-button>&nbsp;&nbsp;</slot></span>
}}
</div>
</el-link>
<el-button v-if="editForm&&editForm.id" type="text" icon="el-icon-circle-close" @click.stop="clearSelect"></el-button>&nbsp;
</slot>
</span>
</slot>
</span>
</el-popover>
@ -524,15 +537,11 @@ export default {
float: right;
}
.title {
display: flex;
height: 32px;
line-height: 32px;
text-align: left;
float: left;
min-width: 100px;
max-width: 300px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
</style>

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

@ -2,9 +2,15 @@
<section>
<el-row>
<el-col :span="24">
<el-row >
<xm-product-select ref="xmProductSelect1" v-if=" !xmProduct || !xmProduct.id" style="display:inline;" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" @clear="onProductClearSelect" ></xm-product-select>
<span style="float:right;">
<el-row>
<div style="display:flex;">
<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
placement="top-start"
width="250"
@ -69,15 +75,15 @@
<el-divider></el-divider>
<el-row>
<el-input style="width:250px;" v-model="filters.key" placeholder="名称模糊查询" clearable></el-input>
<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-row>
<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-row ref="table">
<el-table :cell-style="cellStyleCalc" :expand-row-keys="expandRowKeysCpd" :header-cell-style="cellStyleCalc" :row-style="{height:'60px'}" 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"
>
@ -86,7 +92,14 @@
</template>
<el-table-column prop="menuName" label="史诗、特性名称" min-width="150" >
<template slot="header">史诗特性名称 &nbsp;<el-button type="text" @click="unselectRow()">清除选中的行</el-button></template>
<template slot="header">
<div style="display:flex;">
<div style="text-align: center;line-height: 32px;">史诗特性</div>
&nbsp;&nbsp;
<el-button type="text" icon="el-icon-circle-close" @click="unselectRow()">清除选中</el-button>
<el-input v-if=" !xmProduct || !xmProduct.id" v-model="filters.key" style="width:50%;margin-left: auto;" placeholder="名称模糊查询" clearable></el-input>
</div>
</template>
<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>
@ -115,8 +128,9 @@
</template>
</el-table-column>
</el-table>
</el-row>
<el-row>
<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>
</el-row>
<!--编辑 XmMenu xm_project_menu界面-->
<el-dialog :title="'编辑'+(editForm&&editForm.dclass=='1'?'史诗':'特性')" :visible.sync="editFormVisible" width="90%" top="20px" append-to-body :close-on-click-modal="false" >
@ -175,6 +189,9 @@
xmMenusTreeData() {
let xmMenus = JSON.parse(JSON.stringify(this.xmMenus || []));
if(this.filters.key){
xmMenus=xmMenus.filter(k=>k.menuName.indexOf(this.filters.key)>=0)
}
let xmMenusTreeData = treeTool.translateDataToTree(xmMenus,"pmenuId","menuId");
return xmMenusTreeData;
},
@ -209,8 +226,8 @@
xmMenus: [],//
pageInfo:{//
total:0,//0>0
pageSize:100,//
count:true,//
pageSize:500,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
@ -522,6 +539,7 @@
});
},
unselectRow(){
this.$refs.table.clearSelection()
this.editForm=null;
this.$emit('row-click',null)
this.$refs.table.setCurrentRow();

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

@ -79,7 +79,6 @@
return xmMenusTreeData;
},
toSearchCpd(){
debugger;
var key={iterationId:'',projectId:'',productId:''};
if(this.xmIteration&&this.xmIteration.id){
key.iterationId=this.xmIteration.id
@ -137,8 +136,8 @@
xmMenus: [],//
pageInfo:{//
total:0,//0>0
pageSize:100,//
count:true,//
pageSize:500,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
@ -202,7 +201,7 @@
this.getXmMenus();
},
searchXmMenus(){
this.pageInfo.count=true;
//this.pageInfo.count=true;
this.getXmMenus();
},
getParams(params){
@ -291,10 +290,10 @@
// XmMenu xm_project_menu
getXmMenus() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count
//pageSize: this.pageInfo.pageSize,
//pageNum: this.pageInfo.pageNum,
//total: this.pageInfo.total,
//count:this.pageInfo.count
};
//this.xmMenus=[]
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){

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

@ -1,25 +1,23 @@
<template>
<section>
<el-row class="padding-left padding-right">
<el-row>
<el-col :span="8">
<!--
<el-row class="padding-left padding-right" v-if="!xmProduct||!xmProduct.id" >
<xm-product-select ref="xmProductSelect1" style="display:inline;" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" @clear="onProductClearSelect" ></xm-product-select>
</el-row>
-->
<xm-epic-features :xm-product="xmProductCpd" :sel-project="selProject" @row-click="onEpicFeaturesRowClick" @product-selected="onProductSelected" @product-clear="onProductClearSelect"></xm-epic-features>
<xm-epic-features class="padding-left padding-right" :xm-product="xmProductCpd" :sel-project="selProject" @row-click="onEpicFeaturesRowClick" @product-selected="onProductSelected" @product-clear="onProductClearSelect"></xm-epic-features>
</el-col>
<el-col :span="16" v-if="xmProductCpd && xmProductCpd.id">
<xm-menu-mng class="padding-left" :xm-product="xmProductCpd" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" ></xm-menu-mng>
<el-col :span="16" v-if="xmProductCpd && xmProductCpd.id" class="row-right">
<xm-menu-mng class="padding-left padding-right" :xm-product="xmProductCpd" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" ></xm-menu-mng>
</el-col>
<el-col :span="16" v-else-if="filters.xmProduct && filters.xmProduct.id">
<xm-menu-mng class="padding-left" :xm-product="filters.xmProduct" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" ></xm-menu-mng>
<el-col :span="16" v-else-if="filters.xmProduct && filters.xmProduct.id" class="row-right">
<xm-menu-mng class="padding-left padding-right" :xm-product="filters.xmProduct" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" ></xm-menu-mng>
</el-col>
</el-row>
</section>
</template>
<script>
@ -91,5 +89,7 @@
</script>
<style lang="less" scoped>
.row-left{
background-color: aliceblue;
}
</style>

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

@ -1,6 +1,6 @@
<template>
<section>
<el-row class="padding-left padding-right">
<el-row>
<el-col :span="24">
<el-row>
<xm-product-select ref="xmProductSelect1" style="display:inline;" v-if="(!xmProduct||!xmProduct.id)&&(!xmIteration||!xmIteration.id)" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" :iterationId="xmIteration?xmIteration.id:null" @clear="onProductClearSelect"></xm-product-select>
@ -344,15 +344,14 @@
</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>
</el-row>
<el-row v-else-if="displayType=='agileUser'">
<xm-menu-agile-kanban-user :xm-menus="xmMenus" :xm-product="xmProduct" ref="table" :table-height="maxTableHeight"></xm-menu-agile-kanban-user>
<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-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-row>
<!--编辑 XmMenu xm_project_menu界面-->
<el-dialog title="编辑故事" :visible.sync="editFormVisible" :with-header="false" fullscreen width="90%" top="20px" append-to-body :close-on-click-modal="false" >
<xm-menu-edit :xm-menu="editForm" :sel-project="selProject" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit" @add-sub-menu="onAddSubMenu" @edit-fields="onEditSomeFields"></xm-menu-edit>

27
src/views/xm/core/xmProduct/XmProductForLinkComplex.vue

@ -2,6 +2,7 @@
<section>
<el-row>
<el-col :span="4" class="padding-left">
<div class="border">
<el-row>
<xm-product-select
ref="xmProductSelect"
@ -10,15 +11,20 @@
:iterationId="xmIteration ? xmIteration.id : null"
@row-click="onProductRowClick"
@clear="onProductClearSelect"
></xm-product-select>
>
<template v-slot:title="{product}">
<h4 href="#" class="product-title"><div class="lg-text hidden-md-and-down"><i style="font-size:16px;" class="el-icon-sort"></i> {{product?product.productName:'请选择一个产品'}}</div></h4>
<h4 href="#" class="product-title"><div class="sm-text hidden-lg-and-up"><i style="font-size:16px;" class="el-icon-sort"></i> {{product?product.productName:'请选择一个产品'}}</div></h4>
</template>
</xm-product-select>
</el-row>
<el-row
ref="pageBody"
class="padding"
:class="{border:xmProduct && xmProduct.id}"
:style="{ maxHeight: maxTableHeight + 'px', overflowY: 'auto' }"
>
<h4 class="padding-bottom" v-if="xmProduct && xmProduct.id">常用功能导航</h4>
<el-steps v-if="xmProduct && xmProduct.id"
:active="calcProductPstatusStep"
finish-status="success"
@ -144,6 +150,7 @@
</el-step>
</el-steps>
</el-row>
</div>
</el-col>
<el-col :span="20" class="padding-left padding-right">
<el-tabs :value="showPanel" @tab-click="tabClick">
@ -567,7 +574,7 @@ export default {
};
</script>
<style scoped>
<style lang="less" scoped>
.more-label-font {
text-align: center;
float: left;
@ -577,4 +584,16 @@ export default {
margin-left: 0px;
margin-bottom: 5px;
}
.product-title{
cursor: pointer;
width:250px;
display: block;
.text{
font-size: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width:100%;
}
}
</style>
Loading…
Cancel
Save