Browse Source

优化

master
陈裕财 4 years ago
parent
commit
6e5e0dd855
  1. 38
      src/views/xm/core/components/XmIterationSelect.vue
  2. 125
      src/views/xm/core/components/XmProductSelect.vue
  3. 355
      src/views/xm/core/components/XmProjectSelect.vue
  4. 21
      src/views/xm/core/xmGroup/XmGroupMng.vue
  5. 30
      src/views/xm/core/xmGroup/XmGroupSelect.vue
  6. 12
      src/views/xm/core/xmIteration/XmIterationAdd.vue
  7. 11
      src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue
  8. 3
      src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue
  9. 33
      src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue
  10. 141
      src/views/xm/core/xmMenu/XmMenuMng.vue
  11. 36
      src/views/xm/core/xmMenu/XmMenuSelect.vue
  12. 8
      src/views/xm/core/xmProduct/XmProductForLinkComplex.vue
  13. 6
      src/views/xm/core/xmProduct/XmProductMng.vue
  14. 29
      src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue
  15. 14
      src/views/xm/core/xmProject/XmProjectForLinkComplex.vue
  16. 10
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  17. 2
      src/views/xm/core/xmTask/XmTaskList.vue
  18. 2
      src/views/xm/core/xmTask/XmTaskMng.vue
  19. 10
      src/views/xm/core/xmTestCase/XmTestCaseMng.vue

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

@ -3,7 +3,7 @@
<el-popover style="display:inline;"
placement="bottom"
width="400"
v-model="tableVisible"
v-model="iterationVisible"
trigger="manual" >
<el-row>
<el-table ref="table" :height="maxTableHeight" :data="xmIterations" row-key="id" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
@ -59,7 +59,7 @@
<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="tableVisible=!tableVisible" type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{editForm&&editForm.id?editForm.iterationName:'选择迭代'}}</font></el-link>
<el-link title="点击选中迭代" @click="iterationVisible=!iterationVisible" type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;"><slot name="title">{{editForm&&editForm.id?editForm.iterationName:'选择迭代'}}</slot></font></el-link>
</el-popover>
</section>
</template>
@ -131,7 +131,7 @@
},
/**begin 自定义属性请在下面加 请加备注**/
maxTableHeight:300,
tableVisible:false,
iterationVisible:false,
moreVisible:false,
/**end 自定义属性请在上面加 请加备注**/
}
@ -206,9 +206,11 @@
map.set(this.linkProjectId,this.xmIterations)
}
if(this.autoSelect===true&&this.xmIterations.length>0){
var row=this.xmIterations[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
if(this.autoSelect!==false&&this.xmIterations.length>0 && this.iterationVisible==false){
var row=this.xmIterations[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}
}else{
this.$notify({showClose: true, message: tips.msg, type: 'error' });
@ -224,10 +226,11 @@
rowClick: function(row, event, column){
var oldId=this.editForm.id
this.editForm=row
this.tableVisible=false;
this.iterationVisible=false;
this.moreVisible=false;
if(oldId!=this.editForm.id){
this.$emit("change",row)
}
}
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
/**end 自定义函数请在上面加**/
@ -239,7 +242,7 @@
}
},
close(){
this.tableVisible=false;
this.iterationVisible=false;
this.$emit("close")
},
initData(){
@ -247,11 +250,25 @@
var xmIterations=map.get(this.productId);
if(xmIterations){
this.xmIterations=xmIterations;
if(this.autoSelect!==false&&this.xmIterations.length>0 && this.iterationVisible==false){
var row=this.xmIterations[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}else{
this.searchXmIterations();
}
}else if(this.linkProjectId){
var xmIterations=map.get(this.linkProjectId);
if(xmIterations){
this.xmIterations=xmIterations;
if(this.autoSelect!==false&&this.xmIterations.length>0 && this.iterationVisible==false){
var row=this.xmIterations[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}else{
this.searchXmIterations();
}
}else{
this.searchXmIterations();
@ -266,7 +283,8 @@
if(oldId!=this.editForm.id){
this.$emit("change",null)
}
this.tableVisible=false;
this.iterationVisible=false;
this.moreVisible=false;
this.$emit('clear',null );// @row-click="rowClick"
},
},//end methods

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

@ -1,6 +1,6 @@
<template>
<section>
<el-popover
<el-popover v-if="!dialog"
placement="bottom"
width="400"
trigger="manual"
@ -60,7 +60,7 @@
<el-button @click="setFiltersPmUserAsMySelf()">我的</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button type="text" @click="moreVisible=false" >查询</el-button><el-button type="primary" @click="searchXmProducts" ></el-button>
<el-button type="text" @click="moreVisible=false" >关闭</el-button><el-button type="primary" @click="searchXmProducts" ></el-button>
</el-col>
</el-row>
<el-button type="text" slot="reference" @click="moreVisible=!moreVisible" style="float:right;">更多条件</el-button>
@ -74,11 +74,80 @@
</el-table>
<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="productVisible=!productVisible" type="warning" slot="reference" v-if="!xmProduct" icon="el-icon-search"><font style="font-size:14px;">{{filters.product?filters.product.productName:'选择产品'}}</font></el-link>
</el-popover>
<el-drawer title="选择员工" :visible.sync="selectFiltersPmUserVisible" size="60%" append-to-body>
<users-select @confirm="onFiltersPmUserSelected" ref="usersSelect"></users-select>
</el-drawer>
<slot name="reference"><el-link title="产品,点击选择、清除选择" @click="productVisible=!productVisible" type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;"><slot name="title">{{editForm && editForm.id?editForm.productName:'选择产品'}}</slot></font></el-link> </slot>
</el-popover>
<el-dialog v-if="dialog" append-to-body
v-model="productVisible">
<el-row >
<!--列表 XmProduct 产品表-->
<el-table ref="table" :height="maxTableHeight" :data="xmProducts" :row-class-name="tableRowClassName" @sort-change="sortChange" :highlight-current-row="true" current-row-key="id" v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="productName" label="产品名称">
<template slot="header" slot-scope="scope">
产品名称
<span style="float:right;">
<el-button type="text" @click="clearSelect">清空</el-button>&nbsp;&nbsp;
<el-button type="text" @click="close">关闭</el-button>&nbsp;&nbsp;
<el-popover
placement="top-start"
title=""
width="400"
v-model="moreVisible"
trigger="manual" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">产品编号:</font>
<el-input v-model="filters.id" style="width:100%;" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">创建时间:</font>
<el-date-picker
v-model="dateRanger"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
产品名称:
</font>
<el-input v-model="filters.key" style="width:100%;" placeholder="输入产品名字关键字">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
产品经理:
</font>
<el-tag v-if="filters.pmUser" closable @click="selectFiltersPmUser" @close="clearFiltersPmUser()">{{filters.pmUser.username}}</el-tag>
<el-button v-else @click="selectFiltersPmUser()">选责任人</el-button>
<el-button @click="setFiltersPmUserAsMySelf()">我的</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button type="text" @click="moreVisible=false" >关闭</el-button><el-button type="primary" @click="searchXmProducts" ></el-button>
</el-col>
</el-row>
<el-button type="text" slot="reference" @click="moreVisible=!moreVisible" style="float:right;">更多条件</el-button>
</el-popover>
</span>
</template>
<template slot-scope="scope">
<font>{{scope.row.productName}}</font>
</template>
</el-table-column>
</el-table>
<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-dialog>
</section>
</template>
@ -88,12 +157,11 @@
//import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { listXmProductWithState } from '@/api/xm/core/xmProduct';
import { mapGetters } from 'vuex'
import UsersSelect from "@/views/mdp/sys/user/UsersSelect";
import { loadTasksToXmProductState } from '@/api/xm/core/xmProductState';
import UsersSelect from "@/views/mdp/sys/user/UsersSelect";
const map=new Map();
export default {
props:['linkProjectId','iterationId','autoSelect'],
props:['dialog','linkProjectId','iterationId','autoSelect'],
computed: {
...mapGetters([
'userInfo','roles'
@ -101,11 +169,11 @@
},
watch:{
iterationId(){
this.getXmProducts();
this.initData();
},
linkProjectId(){
this.getXmProducts();
this.initData();
}
},
data() {
@ -198,7 +266,7 @@
params.key="%"+this.filters.key+"%"
}
if(this.linkProjectId){
params.linkProjectId=this.linkProjectId
params.projectId=this.linkProjectId
}
if(this.iterationId){
params.iterationId=this.iterationId
@ -222,10 +290,10 @@
}else if(this.linkProjectId){
map.set(this.linkProjectId,this.xmProducts)
}
if(this.autoSelect===true&&this.xmProducts.length>0){
var row=this.xmProducts[0];
if(this.autoSelect!==false&&this.xmProducts.length>0 && this.productVisible==false){
var row=this.xmProducts[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
this.rowClick(row);
}
}else{
this.$notify({showClose: true, message: tips.msg, type: 'error' });
@ -244,11 +312,13 @@
this.$emit('row-click',row, event, column);// @row-click="rowClick"
this.selectedProduct(row)
this.productVisible=false;
this.moreVisible=false;
},
selectedProduct:function(row){
this.editForm=row
this.$emit('selected',row);
this.productVisible=false;
this.moreVisible=false;
},
/**begin 自定义函数请在下面加**/
@ -284,22 +354,43 @@
this.$emit("clear-select");
this.selectedProduct(null);
this.productVisible=false;
this.moreVisible=false;
},
close(){
this.productVisible=false;
this.moreVisible=false;
this.$emit("close");
},
initData(){
debugger;
if(this.iterationId){
var xmProducts=map.get(this.iterationId);
if(xmProducts){
this.xmProducts=xmProducts;
if(this.productVisible==false){
if(this.autoSelect!==false && this.xmProducts.length>0){
var row=this.xmProducts[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}
}else{
this.searchXmProducts();
}
}else if(this.linkProjectId){
var xmProducts=map.get(this.linkProjectId);
if(xmProducts){
this.xmProducts=xmProducts;
this.xmProducts=xmProducts;
if(this.productVisible==false){
if(this.autoSelect!==false && this.xmProducts.length>0){
var row=this.xmProducts[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}
}else{
this.searchXmProducts();
}
}else{
this.searchXmProducts();

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

@ -0,0 +1,355 @@
<template>
<section>
<el-popover
placement="bottom"
width="400"
trigger="manual"
v-model="projectVisible">
<el-row >
<!--列表 XmProject 项目表-->
<el-table ref="table" :height="maxTableHeight" :data="xmProjects" :row-class-name="tableRowClassName" @sort-change="sortChange" :highlight-current-row="true" current-row-key="id" v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="name" label="项目名称">
<template slot="header" slot-scope="scope">
项目名称
<span style="float:right;">
<el-button type="text" @click="clearSelect">清空</el-button>&nbsp;&nbsp;
<el-button type="text" @click="close">关闭</el-button>&nbsp;&nbsp;
<el-popover
placement="top-start"
title=""
width="400"
v-model="moreVisible"
trigger="manual" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">项目编号:</font>
<el-input v-model="filters.id" style="width:100%;" placeholder="输入项目编号" @keyup.enter.native="searchXmProjects">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">创建时间:</font>
<el-date-picker
v-model="dateRanger"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
项目名称:
</font>
<el-input v-model="filters.key" style="width:100%;" placeholder="输入项目名字关键字">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
项目经理:
</font>
<el-tag v-if="filters.pmUser" closable @click="selectFiltersPmUser" @close="clearFiltersPmUser()">{{filters.pmUser.username}}</el-tag>
<el-button v-else @click="selectFiltersPmUser()">选责任人</el-button>
<el-button @click="setFiltersPmUserAsMySelf()">我的</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button type="text" @click="moreVisible=false" >关闭</el-button><el-button type="primary" @click="searchXmProjects" ></el-button>
</el-col>
</el-row>
<el-button type="text" slot="reference" @click="moreVisible=!moreVisible" style="float:right;">更多条件</el-button>
</el-popover>
</span>
</template>
<template slot-scope="scope">
<font>{{scope.row.name}}</font>
</template>
</el-table-column>
</el-table>
<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>
<slot name="reference"><el-link title="项目,点击选择、清除选择" @click="projectVisible=!projectVisible" type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;"><slot name="title">{{editForm && editForm.id?editForm.name:'选择项目'}}</slot></font></el-link> </slot>
</el-popover>
<el-drawer title="选择员工" :visible.sync="selectFiltersPmUserVisible" size="60%" append-to-body>
<users-select @confirm="onFiltersPmUserSelected" ref="usersSelect"></users-select>
</el-drawer>
</section>
</template>
<script>
import util from '@/common/js/util';//
//import Sticky from '@/components/Sticky' // header
//import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { listXmProject } from '@/api/xm/core/xmProject';
import { mapGetters } from 'vuex'
import UsersSelect from "@/views/mdp/sys/user/UsersSelect";
const map=new Map();
export default {
props:['linkProductId','linkIterationId','autoSelect'],
computed: {
...mapGetters([
'userInfo','roles'
])
},
watch:{
linkIterationId(){
this.initData();
},
linkProductId(){
this.initData();
}
},
data() {
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 12 );
return {
filters: {
key: '',
id:'',//
pmUser:null,//
},
xmProjects: [],//
pageInfo:{//
total:0,//0>0
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
//xmProject
addForm: {
id:'',name:'',branchId:'',remark:''
},
//xmProject
editForm: {
id:'',name:'',branchId:'',remark:''
},
selectFiltersPmUserVisible:false,
maxTableHeight:300,
dateRanger: [ ],
pickerOptions: util.pickerOptions('datarange'),
projectVisible:false,
moreVisible:false,
/**begin 自定义属性请在下面加 请加备注**/
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
this.getXmProjects();
},
handleCurrentChange(pageNum) {
this.pageInfo.pageNum = pageNum;
this.getXmProjects();
},
// obj.order=ascending/descending, asc/desc ; obj.prop=,
sortChange( obj ){
var dir='asc';
if(obj.order=='ascending'){
dir='asc'
}else{
dir='desc';
}
if(obj.prop=='xxx'){
this.pageInfo.orderFields=['xxx'];
this.pageInfo.orderDirs=[dir];
}
this.getXmProjects();
},
searchXmProjects(){
this.pageInfo.count=true;
this.getXmProjects();
},
// XmProject
getXmProjects() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count
};
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i])
}
params.orderBy= orderBys.join(",")
}
if(this.filters.key!==""){
params.key="%"+this.filters.key+"%"
}
if(this.linkProductId){
params.linkProductId=this.linkProductId
}
if(this.linkIterationId){
params.linkIterationId=this.linkIterationId
}
if(this.filters.id){
params.id=this.filters.id
}
if(this.filters.pmUser){
params.pmUserid=this.filters.pmUser.userid
}
this.load.list = true;
listXmProject(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.total = res.data.total;
this.pageInfo.count=false;
this.xmProjects = res.data.data;
if(this.linkIterationId){
map.set(this.linkIterationId,this.xmProjects)
}else if(this.linkProductId){
map.set(this.linkProductId,this.xmProjects)
}
if(this.autoSelect!==false&&this.xmProjects.length>0 && this.projectVisible==false){
var row=this.xmProjects[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}else{
this.$notify({showClose: true, message: tips.msg, type: 'error' });
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
//xmProject
selsChange: function (sels) {
this.sels = sels;
},
rowClick: function(row, event, column){
this.editForm=row
this.$emit('row-click',row, event, column);// @row-click="rowClick"
this.selectedProduct(row)
this.projectVisible=false;
this.moreVisible=false;
},
selectedProduct:function(row){
this.editForm=row
this.$emit('selected',row);
this.projectVisible=false;
this.moreVisible=false;
},
/**begin 自定义函数请在下面加**/
clearFiltersPmUser:function(){
this.filters.pmUser=null;
this.searchXmProjects();
},
selectFiltersPmUser(){
this.selectFiltersPmUserVisible=true;
},
onFiltersPmUserSelected(users){
if(users && users.length>0){
this.filters.pmUser=users[0]
}else{
this.filters.pmUser=null;
}
this.selectFiltersPmUserVisible=false;
this.searchXmProjects();
},
setFiltersPmUserAsMySelf(){
this.filters.pmUser=this.userInfo;
this.searchXmProjects();
},
tableRowClassName({row, rowIndex}) {
if (row.id == this.editForm.id) {
return 'success-row';
}
return '';
},
clearSelect(){
this.$refs.table.setCurrentRow();
this.$emit("clear-select");
this.selectedProduct(null);
this.projectVisible=false;
this.moreVisible=false;
},
close(){
this.projectVisible=false;
this.moreVisible=false;
this.$emit("close");
},
initData(){
debugger;
if(this.linkIterationId){
var xmProjects=map.get(this.linkIterationId);
if(xmProjects){
this.xmProjects=xmProjects;
if(this.projectVisible==false){
if(this.autoSelect!==false && this.xmProjects.length>0){
var row=this.xmProjects[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}
}else{
this.searchXmProjects();
}
}else if(this.linkProductId){
var xmProjects=map.get(this.linkProductId);
if(xmProjects){
this.xmProjects=xmProjects;
if(this.projectVisible==false){
if(this.autoSelect!==false && this.xmProjects.length>0){
var row=this.xmProjects[0];
this.$refs.table.setCurrentRow(row);
this.rowClick(row);
}
}
}else{
this.searchXmProjects();
}
}else{
this.searchXmProjects();
}
},
},//end methods
components: {
UsersSelect,
//
},
mounted() {
this.$nextTick(() => {
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
this.initData();
});
}
}
</script>
<style scoped>
.more-label-font{
text-align:center;
float:left;
padding-top:5px;
}
.align-right{
float: right;
}
</style>

21
src/views/xm/core/xmGroup/XmGroupMng.vue

@ -1,14 +1,8 @@
<template>
<section class="page-container border padding" >
<el-row>
<el-popover v-if="pgClass==='0' && (!selProject || !selProject.id)"
placement="bottom"
width="400"
trigger="click">
<xm-project-select :auto-select="true" :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{filters.selProject?filters.selProject.name:'选择项目'}}</font></el-link>
</el-popover>
<el-row>
<xm-project-select style="display:inline;" v-if="!selProject &&pgClass==='0'" :auto-select="false" :link-iteration-id="xmIteration?xmIteration.id:null" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
<el-input v-model="filters.key" style="width:15%;" clearable placeholder="名称过滤"></el-input>
<el-button type="primary" @click="searchXmGroups" icon="el-icon-search">刷新</el-button>
<el-button type="plain" @click="showGroupState" icon="el-icon-s-data">小组进度</el-button>
@ -188,16 +182,9 @@
<el-drawer v-else-if="!selProject && xmProduct" :title="xmProduct.productName+'小组进度数据查看'" center :visible.sync="xmGroupStateVisible" size="80%" :close-on-click-modal="false" append-to-body>
<xm-group-state-mng :xm-product="xmProduct" :visible="xmGroupStateVisible" ></xm-group-state-mng>
</el-drawer>
<el-drawer v-if="currNodeType=='group'&&editForm.groupName" center :title="(editForm==null?editForm.groupName:'')+'小组成员管理'" :visible.sync="groupUserVisible" size="80%" :close-on-click-modal="false" append-to-body>
<xm-group-user-mng :xm-group="editForm" :visible="groupUserVisible" ></xm-group-user-mng>
</el-drawer>
<el-drawer title="选中项目" :visible.sync="selectProjectVisible" size="80%" append-to-body :close-on-click-modal="false">
<xm-project-list @project-confirm="onPorjectConfirm"></xm-project-list>
</el-drawer>
<el-drawer title="选中产品" :visible.sync="selectProductVisible" size="80%" append-to-body :close-on-click-modal="false">
<xm-product-select :isSelectProduct="true" @selected="onProductConfirm"></xm-product-select>
</el-drawer>
</el-row>
</section>
@ -224,7 +211,7 @@
import XmGroupUserMng from '../xmGroupUser/XmGroupUserMng';//
import XmProjectList from '../xmProject/XmProjectList';
import XmProjectSelect from '../xmProject/XmProjectSelect';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect.vue'
export default {

30
src/views/xm/core/xmGroup/XmGroupSelect.vue

@ -1,20 +1,11 @@
<template>
<section class="border padding-left">
<el-row class="padding-top">
<el-popover v-if="(pgClass==='0'||!pgClass) && (!selProject || !selProject.id)"
placement="bottom"
width="400"
trigger="click">
<xm-project-select :auto-select="true" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClose"></xm-project-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{filters.selProject?filters.selProject.name:'选择项目'}}</font></el-link>
</el-popover>
<el-popover v-if="pgClass==='1' && (!xmProduct || !xmProduct.id)"
placement="bottom"
width="400"
trigger="click">
<xm-product-select :auto-select="true" :sel-project="selProject" @row-click="onProductRowClick" @clear-select="onProductClose"></xm-product-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{filters.xmProduct?filters.xmProduct.productName:'选择项目'}}</font></el-link>
</el-popover>
<xm-product-select :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductRowClick" @clear-select="onProductClose"></xm-product-select>
<el-button type="primary" @click="userConfirm" icon="el-icon-finished">确认选择</el-button>
</el-row>
<el-row class="padding-top" v-loading="load.list" :style="{overflowX:'auto',height:maxTableHeight+'px'}" ref="table">
@ -29,16 +20,7 @@
</div>
</el-col>
</el-row>
</el-row>
<el-drawer title="选中项目团队" :visible.sync="selectProjectVisible" size="80%" append-to-body :close-on-click-modal="false">
<xm-project-list @project-confirm="onProjectRowClick"></xm-project-list>
</el-drawer>
<el-drawer title="选中产品团队" :visible.sync="selectProductVisible" size="80%" append-to-body :close-on-click-modal="false">
<xm-product-select :isSelectProduct="true" @selected="onProductRowClick"></xm-product-select>
</el-drawer>
</el-row>
</section>
</template>
@ -47,7 +29,7 @@
//import Sticky from '@/components/Sticky' // header
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { getGroups } from '@/api/xm/core/xmGroup';
import XmProjectSelect from '../xmProject/XmProjectSelect';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';
import {mapGetters} from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect.vue'

12
src/views/xm/core/xmIteration/XmIterationAdd.vue

@ -3,15 +3,9 @@
<el-row>
<!--新增界面 XmIteration 迭代定义-->
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="归属产品" prop="productId">
<el-popover v-if="!xmProduct||!xmProduct.id"
placement="bottom"
width="400"
v-model="productSelectVisible"
trigger="manual">
<xm-product-select ref="xmProductSelect" :auto-select="true" :sel-project="selProject" @row-click="onProductRowClick" @clear-select="onProductClearSelect" @close="productSelectVisible=false"></xm-product-select>
<el-link type="warning" @click="productSelectVisible=true" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{addForm.productId?addForm.productName:'选择产品'}}</font></el-link>
</el-popover>
<el-form-item label="归属产品" prop="productId">
<xm-product-select v-if="!xmProduct||!xmProduct.id" ref="xmProductSelect" :auto-select="true" :sel-project="selProject" @row-click="onProductRowClick" @clear-select="onProductClearSelect" @close="productSelectVisible=false"></xm-product-select>
<span v-else>{{addForm.productName}}</span>
</el-form-item>
<el-form-item label="迭代名称" prop="iterationName">

11
src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue

@ -4,14 +4,9 @@
<el-col :span="24">
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane lazy name="iterations" disabled>
<div slot="label">
<el-popover
placement="bottom"
width="400"
trigger="click">
<xm-iteration-select ref="xmIterationSelect" :auto-select="true" :sel-project="selProject" :product-id="xmProduct?xmProduct.id:null" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{xmIteration?xmIteration.iterationName:'选择迭代'}}</font></el-link>
</el-popover>
<div slot="label">
<xm-iteration-select ref="xmIterationSelect" :auto-select="true" :link-project-id="selProject?selProject.id:null" :product-id="xmProduct?xmProduct.id:null" @row-click="onIterationRowClick" @clear="onIterationClearSelect"></xm-iteration-select>
</div>
</el-tab-pane>

3
src/views/xm/core/xmIterationLink/XmIterationLinkForProject.vue

@ -45,7 +45,8 @@
import { listXmIterationLinkWithProjectInfo,addXmIterationLink, delXmIterationLink, batchDelXmIterationLink } from '@/api/xm/core/xmIterationLink';
import { mapGetters } from 'vuex'
import XmProjectSelect from '../xmProject/XmProjectSelect.vue';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue'
;
import XmIterationSelect from '../xmIteration/XmIterationSelect.vue';
import XmIterationAdd from '../xmIteration/XmIterationAdd';//

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

@ -1,19 +1,15 @@
<template>
<section class="page-container padding">
<section class="page-container">
<el-row >
<el-col :span="8" v-if="!xmIteration">
<xm-iteration-mng :simple="true" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-mng>
</el-col>
<el-col :span="xmIteration?24:16">
<el-col :span="10">
<el-row class="padding-left">
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询">
<el-input v-model="filters.key" style="width: 60%;" placeholder="模糊查询">
</el-input>
<el-button type="primary" 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="showAdd" icon="el-icon-plus" round>加入更多需求到迭代计划</el-button>
<el-button type="danger" @click="batchDel" icon="el-icon-right">批量移出</el-button>
<el-button type="danger" @click="batchDel" icon="el-icon-right">批量移出</el-button>
</span>
</el-row>
@ -39,14 +35,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="productId" label="产品" min-width="120" >
</el-table-column>
<el-table-column prop="iterationName" label="迭代" min-width="120" >
</el-table-column>
<el-table-column prop="mmUsername" label="责任人" width="140" >
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<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>
</template>
@ -54,11 +43,11 @@
</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 checkScope="0" :xm-product="{id:xmIteration.productId}" :xm-iteration="xmIteration" :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-col>
<el-drawer append-to-body title="需求选择" :visible.sync="menuVisible" size="70%" :close-on-click-modal="false">
<xm-menu-select :xm-iteration="xmIteration" :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-drawer>
</el-row>
</el-row>
</section>
</template>
@ -200,10 +189,6 @@
},
// XmIterationMenu
showAdd: function () {
if(!this.roles.some(i=>i.roleid=='iterationAdmin')){
this.$notify({showClose: true, message: "只有迭代管理员可以操作", type: 'error' });
return ;
}
this.menuVisible = true;
//this.addForm=Object.assign({}, this.editForm);
},

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

@ -2,52 +2,88 @@
<section class="padding">
<el-row v-show=" !batchEditVisible">
<el-col :span="24" class="padding-left">
<el-row>
<el-popover v-if=" !filters.iteration || !filters.iteration.id"
placement="bottom"
width="400"
trigger="manual"
v-model="productVisible">
<xm-product-select v-if="!xmProduct" :auto-select="false" :sel-project="selProject" @row-click="onProductSelected" ref="xmProductMng" :xm-iteration="xmIteration" :simple="true" @clear-select="onProductClearSelect" @close="productVisible=false"></xm-product-select>
<el-link title="产品,点击选择、清除选择" @click="productVisible=true" type="warning" slot="reference" v-if="!xmProduct" icon="el-icon-search"><font style="font-size:14px;">{{filters.product?filters.product.productName:'选择产品'}}</font></el-link>
</el-popover>
<xm-it-select style="display:inline;" :product-id="filters.product?filters.product.id:null" :link-project-id="selProject?selProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClearSelect">
<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-select="onProductClearSelect"></xm-product-select>
<xm-it-select v-if="!xmIteration || !xmIteration.id" style="display:inline;" :product-id="filters.product?filters.product.id:null" :link-project-id="selProject?selProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClearSelect">
</xm-it-select>
<el-select v-model="filters.taskFilterType" placeholder="已分配任务的需求?" clearable style="width: 160px;">
<el-select 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.taskFilterType" placeholder="已分配任务的需求?" clearable >
<el-option value="not-join-any-project" label="未分配过任务的需求"></el-option>
<el-option value="join-any-project" label="已分配过任务的需求"></el-option>
<el-option value="not-join-curr-project" :label="'未分配任务到项目【'+selProject.name+'】'" v-if="selProject && selProject.id"></el-option>
<el-option value="join-curr-project" :label="'已分配任务到项目【'+selProject.name+'】'" v-if="selProject && selProject.id"></el-option>
</el-select>
<el-select v-model="filters.iterationFilterType" placeholder="加入过迭代?" clearable style="width: 160px;">
<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>
<span style="float:right;">
<el-popover style="padding-left:10px;"
placement="top-start"
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);">
<i class="el-icon-document"></i>
</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>
</el-col>
</el-row>
<el-button type="primary" round slot="reference" icon="el-icon-plus"></el-button>
</el-popover>
<el-button @click="showParentMenu" icon="el-icon-top" title="更换上级"></el-button>
<el-button v-if="disabledMng!=false" type="danger" @click="batchDel" icon="el-icon-delete" title="删除"></el-button>
<el-button class="hidden-md-and-down" v-if=" batchEditVisible==false&&disabledMng!=false " @click="loadTasksToXmMenuState" icon="el-icon-s-marketing" title="汇总进度"></el-button>
<xm-table-config ref="tableConfig" style="display:inline;" :table="$refs.table"></xm-table-config>
<el-select class="hidden-lg-and-down" v-model="filters.dtype" clearable placeholder="需求类型" style="width: 120px;">
</span>
</el-row>
<el-row>
<el-select v-model="filters.dtype" clearable placeholder="需求类型" style="width: 120px;">
<el-option v-for="i in this.dicts.demandType" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-select class="hidden-lg-and-down" v-model="filters.source" placeholder="需求来源" clearable style="width: 120px;">
<el-select class="hidden-md-and-down" v-model="filters.source" placeholder="需求来源" clearable style="width: 120px;">
<el-option v-for="i in this.dicts.demandSource" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-select class="hidden-lg-and-down" v-model="filters.dlvl" placeholder="需求层次" clearable style="width: 120px;">
<el-select class="hidden-md-and-down" v-model="filters.dlvl" placeholder="需求层次" clearable style="width: 120px;">
<el-option v-for="i in this.dicts.demandLvl" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-button class="hidden-lg-and-down" v-if="!filters.tags||filters.tags.length==0" @click.native="tagSelectVisible=true">标签条件</el-button>
<el-tag class="hidden-lg-and-down" v-else @click="tagSelectVisible=true" closable @close="clearFiltersTag(filters.tags[0])">{{filters.tags[0].tagName.substr(0,5)}}({{filters.tags.length}})</el-tag>
<el-select class="hidden-lg-and-down" v-model="filters.priority" placeholder="优先级" clearable style="width: 100px;">
<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>
<el-select class="hidden-md-and-down" v-model="filters.status" placeholder="需求状态" clearable style="width: 100px;">
<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-button class="hidden-md-and-down" v-if="!filters.tags||filters.tags.length==0" @click.native="tagSelectVisible=true">标签条件</el-button>
<el-tag class="hidden-md-and-down" v-else @click="tagSelectVisible=true" closable @close="clearFiltersTag(filters.tags[0])">{{filters.tags[0].tagName.substr(0,5)}}({{filters.tags.length}})</el-tag>
<el-input v-model="filters.key" style="width: 220px;" 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>
@ -129,9 +165,9 @@
<el-button class="hidden-lg-and-down" v-if="!filters.tags||filters.tags.length==0" @click.native="tagSelectVisible=true">标签条件</el-button>
<el-tag class="hidden-lg-and-down" v-else @click="tagSelectVisible=true" closable @close="clearFiltersTag(filters.tags[0])">{{filters.tags[0].tagName.substr(0,5)}}({{filters.tags.length}})</el-tag>
<el-button class="hidden-lg-and-down" v-if="!filters.tags||filters.tags.length==0" @click.native="tagSelectVisible=true">标签条件</el-button>
<el-tag class="hidden-lg-and-down" v-else @click="tagSelectVisible=true" closable @close="clearFiltersTag(filters.tags[0])">{{filters.tags[0].tagName.substr(0,5)}}({{filters.tags.length}})</el-tag>
<el-col :span="24" style="padding-top:5px;">
@ -144,46 +180,7 @@
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more"></el-button>
</el-popover>
<span style="float:right;">
<el-popover style="padding-left:10px;"
placement="top-start"
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);">
<i class="el-icon-document"></i>
</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>
</el-col>
</el-row>
<el-button type="primary" round slot="reference" icon="el-icon-plus"></el-button>
</el-popover>
<el-button @click="showParentMenu" icon="el-icon-top" title="更换上级"></el-button>
<el-button v-if="disabledMng!=false" type="danger" @click="batchDel" icon="el-icon-delete" title="删除"></el-button>
<el-button class="hidden-md-and-down" v-if=" batchEditVisible==false&&disabledMng!=false " @click="loadTasksToXmMenuState" icon="el-icon-s-marketing" title="汇总进度"></el-button>
<xm-table-config ref="tableConfig" style="display:inline;" :table="$refs.table"></xm-table-config>
</span>
</el-popover>
</el-row>
<el-row class="padding-top">
<el-table :cell-style="cellStyleCalc" :header-cell-style="cellStyleCalc" :row-style="{height:'60px'}" lazy :load="loadXmMenusLazy" stripe fit border ref="table" :height="maxTableHeight" :data="xmMenusTreeData" current-row-key="menuId" row-key="menuId" :tree-props="{children: 'children', hasChildren: 'childrenCnt'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick">
@ -202,7 +199,7 @@
</div>
<span class="vlink" @click="showEdit(scope.row)" >{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
<div class="tool-bar">
<span class="u-btn">
<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>
@ -747,7 +744,7 @@
this.addForm.dclass=dclass
this.addFormVisible = true;
}else{
this.productVisible=true;
this.$refs.xmProductSelect1.productVisible=true;
this.$notify({showClose: true, message: "请先选择一个产品", type: 'warning'});
}

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

@ -2,24 +2,11 @@
<section>
<el-row>
<el-col :span="24" style="padding-left:12px;" >
<el-row>
<el-popover v-if="!xmProduct&&!xmIteration"
placement="bottom"
width="400"
trigger="manual"
v-model="productVisible">
<xm-product-select v-if="!xmProduct" :auto-select="false" :sel-project="selProject" @row-click="onProductSelected" ref="xmProductMng" :xm-iteration="xmIteration" :simple="true" @clear-select="onProductClearSelect" @close="productVisible=false"></xm-product-select>
<el-link title="产品,点击选择、清除选择" @click="productVisible=true" type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{filters.product?filters.product.productName:'选择产品'}}</font></el-link>
</el-popover>
<el-popover
placement="bottom"
width="400"
trigger="manual"
v-model="iterationVisible">
<xm-iteration-select v-if="!xmIteration" :auto-select="false" :sel-project="selProject" @row-click="onIterationSelected" ref="xmProductMng" :xm-product="xmProduct" :simple="true" @clear-select="onIterationClearSelect" @close="iterationVisible=false"></xm-iteration-select>
<el-link title="迭代,点击选择、清除选择" @click="iterationVisible=true" type="warning" slot="reference" v-if="!xmIteration" icon="el-icon-search"><font style="font-size:14px;">{{filters.iteration?filters.iteration.iterationName:'选择迭代'}}</font></el-link>
</el-popover>
<el-row>
<xm-product-select 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-select="onProductClearSelect" @close="productVisible=false"></xm-product-select>
<xm-iteration-select 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-select="onIterationClearSelect" @close="iterationVisible=false"></xm-iteration-select>
<el-select v-model="filters.taskFilterType" placeholder="已分配任务的需求?" clearable style="width: 160px;">
<el-option value="not-join-any-project" label="未分配过任务的需求"></el-option>
<el-option value="join-any-project" label="已分配过任务的需求"></el-option>
@ -33,20 +20,20 @@
<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.dtype" clearable placeholder="需求类型">
<el-select v-model="filters.dtype" clearable placeholder="需求类型" style="width: 100px;">
<el-option v-for="i in this.dicts.demandType" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-select v-model="filters.source" placeholder="需求来源" clearable>
<el-select v-model="filters.source" placeholder="需求来源" clearable style="width: 100px;">
<el-option v-for="i in this.dicts.demandSource" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
<el-select v-model="filters.dlvl" placeholder="需求层次" clearable class="hidden-md-and-down">
<el-select v-model="filters.dlvl" placeholder="需求层次" clearable class="hidden-md-and-down" style="width: 100px;">
<el-option v-for="i in this.dicts.demandLvl" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-row>
<el-row>
<el-button class="hidden-md-and-down" v-if="!filters.tags||filters.tags.length==0" @click.native="tagSelectVisible=true">标签条件</el-button>
<el-tag class="hidden-md-and-down" v-else @click="tagSelectVisible=true" closable @close="clearFiltersTag(filters.tags[0])">{{filters.tags[0].tagName.substr(0,5)}}({{filters.tags.length}})</el-tag>
<el-select v-model="filters.priority" placeholder="优先级" clearable>
<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>
<el-select v-model="filters.status" placeholder="需求状态" clearable style="width: 100px;">
@ -106,7 +93,7 @@
<el-button slot="reference" icon="el-icon-more"></el-button>
</el-popover>
<el-button 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-table ref="table" class="menu-table" lazy :load="loadMenusLazy" :height="maxTableHeight" :data="xmMenusTreeData" row-key="menuId" :tree-props="{children: 'children', hasChildren: 'childrenCnt'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
@ -130,9 +117,6 @@
</el-table-column>
<el-table-column prop="productId" label="产品" min-width="100" > </el-table-column>
<el-table-column prop="iterationName" label="迭代" min-width="140" > </el-table-column>
<el-table-column prop="mmUsername" label="责任人" width="140" >
</el-table-column>
<el-table-column label="操作" width="100" fixed="right" >
<template slot-scope="scope">
<el-button :disabled="checkScope && checkScope!==scope.row.ntype" type="primary" @click="selectedMenu( scope.row,scope.$index)">选择</el-button>

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

@ -5,13 +5,7 @@
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane disabled>
<div slot="label">
<el-popover
placement="bottom"
width="400"
trigger="click">
<xm-product-select ref="xmProductSelect" :auto-select="true" :sel-project="selProject" :xm-iteration="xmIteration" @row-click="onProductRowClick" @clear-select="onProductClearSelect"></xm-product-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{xmProduct?xmProduct.productName:'选择产品'}}</font></el-link>
</el-popover>
<xm-product-select ref="xmProductSelect" :auto-select="true" :link-project-id="selProject?selProject.id:null" :iterationId="xmIteration?xmIteration.id:null" @row-click="onProductRowClick" @clear-select="onProductClearSelect"></xm-product-select>
</div>
</el-tab-pane>
<el-tab-pane disabled>

6
src/views/xm/core/xmProduct/XmProductMng.vue

@ -253,11 +253,7 @@
</el-drawer>
<el-drawer title="选择项目" :visible.sync="projectVisible" size="60%" append-to-body>
<xm-project-list @select="onProjectSelected"></xm-project-list>
</el-drawer>
<el-drawer title="选择产品" :visible.sync="productSelectVisible" size="60%" append-to-body>
<xm-product-select @row-click="onXmProductSelect"></xm-product-select>
</el-drawer>
</el-drawer>
<el-drawer title="迭代报告" :visible.sync="iterationSelectVisible" fullscreen append-to-body :close-on-click-modal="false">
<xm-iteration-select @row-click="onXmIterationSelect"></xm-iteration-select>
</el-drawer>

29
src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue

@ -2,9 +2,15 @@
<section class="app-container">
<el-row>
<span style="float:right;">
<el-button type="primary" v-if="selProject" @click="productVisible=true" icon="el-icon-plus" round> 选择更多产品加入项目 </el-button>
<el-button type="primary" v-if="xmProduct" @click="projectVisible=true" icon="el-icon-plus" round> 选择更多项目加入产品 </el-button>
</span>
<xm-product-select @row-click="onProductSelect" :autoSelect="false" v-if="selProject && selProject.id">
<font slot="title">选择更多产品加入项目</font>
</xm-product-select>
<xm-project-select :autoSelect="false" @row-click="onProjectSelect" v-if="xmProduct && xmProduct.id">
<font slot="title">
选择更多项目加入产品
</font>
</xm-project-select>
</span>
</el-row>
<el-row style="padding-top:10px;">
<!--列表 XmProductProjectLink 产品与项目的关联关系表一般由产品经理挂接项目到产品上-->
@ -21,16 +27,7 @@
</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-drawer title="选择产品" :visible.sync="productVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-product-select @row-click="onProductSelect"></xm-product-select>
</el-drawer>
<el-drawer title="选择项目" :visible.sync="projectVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-project-select @row-click="onProjectSelect"></xm-project-select>
</el-drawer>
</el-row>
</section>
</template>
@ -43,7 +40,7 @@
import XmProductProjectLinkEdit from './XmProductProjectLinkEdit';//
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect.vue'
import XmProjectSelect from '../xmProject/XmProjectSelect.vue';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue'
export default {
props:['selProject','xmProduct'],
@ -92,9 +89,7 @@ import XmProjectSelect from '../xmProject/XmProjectSelect.vue';
projectId:'',productId:'',ctime:'',cuserid:'',cusername:'',linkStatus:''
},
maxTableHeight:300,
productVisible:false,
projectVisible:false,
}
}
},//end data
methods: {
handleSizeChange(pageSize) {

14
src/views/xm/core/xmProject/XmProjectForLinkComplex.vue

@ -4,15 +4,9 @@
<el-col :span="24">
<el-tabs type="border-card" :value="showPanel" @tab-click="tabClick">
<el-tab-pane disabled>
<div slot="label">
<el-popover
placement="bottom"
width="400"
trigger="click">
<xm-project-select ref="xmProjectSelect" :auto-select="true" :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
<el-link type="warning" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{selProject?selProject.name:'选择项目'}}</font></el-link>
</el-popover>
<div slot="label">
<xm-project-select ref="xmProjectSelect" :auto-select="true" :link-iteration-id="xmIteration?xmIteration.id:null" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
</div>
</el-tab-pane>
<el-tab-pane disabled>
@ -74,7 +68,7 @@
import XmProductMng from '../xmProduct/XmProductMng.vue';
import XmTaskMng from '../xmTask/XmTaskMng.vue';
import XmQuestionMng from '../xmQuestion/XmQuestionMng.vue';
import XmProjectSelect from './XmProjectSelect.vue';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue';
import XmProjectForLink from './XmProjectForLink.vue';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect.vue'

10
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -27,8 +27,8 @@
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">产品:</font><el-tag v-if=" filters.product " closable @close="clearProduct">{{this.filters.product.productName}}</el-tag>
<el-button v-else @click="showProductVisible" type="plian">选产品</el-button>
<font class="more-label-font" v-if="!xmProduct">产品:</font>
<xm-product-select :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected"></xm-product-select>
</el-col>
<el-col :span="24" style="padding-top:12px;" v-if="!selProject">
<font class="more-label-font">项目:</font>
@ -194,11 +194,7 @@
<el-drawer append-to-body title="需求选择" :visible.sync="menuVisible" size="70%" :close-on-click-modal="false">
<xm-menu-select :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-drawer>
<el-drawer title="选择产品" :visible.sync="productSelectVisible" size="70%" append-to-body :close-on-click-modal="false">
<xm-product-select :isSelectProduct="true" :selProject="filters.selProject" :visible="productSelectVisible" @cancel="productSelectVisible=false" @selected="onProductSelected"></xm-product-select>
</el-drawer>
</el-drawer>
<el-drawer append-to-body title="标签条件" :visible.sync="tagSelectVisible" :close-on-click-modal="false" size="60%">
<tag-mng :tagIds="filters.tags?filters.tags.map(i=>i.tagId):[]" :jump="true" @select-confirm="onTagSelected">

2
src/views/xm/core/xmTask/XmTaskList.vue

@ -99,7 +99,7 @@
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { getTask ,listXmTask,editXmTask,editRate, delXmTask, batchDelXmTask,batchImportTaskFromTemplate,batchSaveBudget } from '@/api/xm/core/xmTask';
import { mapGetters } from 'vuex';
import XmProjectSelect from '../xmProject/XmProjectSelect';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';
export default {
computed: {

2
src/views/xm/core/xmTask/XmTaskMng.vue

@ -1122,7 +1122,7 @@ import xmMenuSelect from "../xmMenu/XmMenuSelect";
import { addXmMyFocus, delXmMyFocus } from "@/api/xm/core/xmMyFocus";
import XmProjectSelect from "../xmProject/XmProjectSelect";
import XmProjectSelect from "@/views/xm/core/components/XmProjectSelect";
import XmMenuRichDetail from "../xmMenu/XmMenuRichDetail";
import XmProductSelect from "@/views/xm/core/components/XmProductSelect"; //

10
src/views/xm/core/xmTestCase/XmTestCaseMng.vue

@ -22,8 +22,8 @@
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">产品:</font><el-tag v-if=" filters.product " closable @close="clearProduct">{{this.filters.product.productName}}</el-tag>
<el-button v-else @click="showProductVisible" type="plian">选产品</el-button>
<font class="more-label-font" v-if="!xmProduct">产品:</font>
<xm-product-select :link-project-id="filters.selProject?filters.selProject.id:null" @row-click="onProductSelected"></xm-product-select>
</el-col>
<el-col :span="24" style="padding-top:5px;" v-if="!selProject" >
<font class="more-label-font">项目:</font><el-tag v-if=" filters.selProject " closable @close="clearProject">{{this.filters.selProject.name}}</el-tag>
@ -117,11 +117,7 @@
</el-row>
<el-drawer append-to-body title="需求选择" :visible.sync="menuVisible" size="80%" :close-on-click-modal="false">
<xm-menu-select :visible="menuVisible" :is-select-menu="true" :multi="true" @menus-selected="onSelectedMenus" ></xm-menu-select>
</el-drawer>
<el-drawer title="选择产品" :visible.sync="productSelectVisible" size="80%" append-to-body :close-on-click-modal="false">
<xm-product-select :isSelectProduct="true" :selProject="filters.selProject" :visible="productSelectVisible" @cancel="productSelectVisible=false" @selected="onProductSelected"></xm-product-select>
</el-drawer>
</el-drawer>
</section>
</template>

Loading…
Cancel
Save