Browse Source

优化

master
陈裕财 5 years ago
parent
commit
5d5184e91b
  1. 20
      src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue
  2. 3
      src/views/xm/core/xmMenu/XmMenuMng.vue
  3. 2
      src/views/xm/core/xmProduct/XmProductForProjectComplex.vue
  4. 8
      src/views/xm/core/xmProduct/XmProductInfo.vue
  5. 177
      src/views/xm/core/xmProject/XmProjectComplex.vue
  6. 8
      src/views/xm/core/xmProject/XmProjectForLink.vue
  7. 159
      src/views/xm/core/xmProject/XmProjectSelect.vue

20
src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue

@ -2,7 +2,7 @@
<section class="page-container border"> <section class="page-container border">
<el-row> <el-row>
<el-col :span="iterationVisible==true?3:0" > <el-col :span="iterationVisible==true?3:0" >
<xm-iteration-select :sel-project="selProject" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-select>
<xm-iteration-select :sel-project="selProject" :product-id="xmProduct?xmProduct.id:null" @row-click="onIterationRowClick" @clear-select="onIterationClearSelect"></xm-iteration-select>
</el-col> </el-col>
<el-col :span="iterationVisible==true?21:24" > <el-col :span="iterationVisible==true?21:24" >
<el-tabs type="border-card" :v-model="showPanel" activate-name="iterationOverview" @tab-click="tabClick"> <el-tabs type="border-card" :v-model="showPanel" activate-name="iterationOverview" @tab-click="tabClick">
@ -13,9 +13,9 @@
<xm-iteration-state-show v-show="xmIteration && showPanel=='iterationOverview'" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-state-show> <xm-iteration-state-show v-show="xmIteration && showPanel=='iterationOverview'" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-state-show>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="产品、战略" name="products" v-if="!xmProduct"> <el-tab-pane label="产品、战略" name="products" v-if="!xmProduct">
<xm-product-mng v-show="xmIteration && showPanel=='products'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-mng>
<xm-product-mng v-show="xmIteration && showPanel=='products' && !xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-mng>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="项目" name="projects">
<el-tab-pane label="项目" name="projects" v-if="!selProject">
<xm-project-for-link v-show="xmIteration && showPanel=='projects'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-project-for-link> <xm-project-for-link v-show="xmIteration && showPanel=='projects'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-project-for-link>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="故事" lazy name="menus" > <el-tab-pane label="故事" lazy name="menus" >
@ -42,7 +42,8 @@
import util from '@/common/js/util';// import util from '@/common/js/util';//
import config from '@/common/config';// import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmIteration,listXmIterationWithState, delXmIteration, batchDelXmIteration,loadTasksToXmIterationState } from '@/api/xm/core/xmIteration';
import { delXmIterationProductLink } from '@/api/xm/core/xmIterationProductLink';
import XmIterationSelect from './XmIterationSelect.vue' import XmIterationSelect from './XmIterationSelect.vue'
import XmMenuMng from '../xmMenu/XmMenuMng.vue' import XmMenuMng from '../xmMenu/XmMenuMng.vue'
import XmIterationStateShow from '../xmIterationState/XmIterationStateShow.vue' import XmIterationStateShow from '../xmIterationState/XmIterationStateShow.vue'
@ -138,6 +139,17 @@ import XmQuestionMng from '../xmQuestion/XmQuestionMng.vue';
}, },
tabClick(tab){ tabClick(tab){
this.showPanel=tab.name this.showPanel=tab.name
},
doDelXmIterationProductLink(){
this.$confirm('移出后,迭代试图将看不到该产品信息,确认将产品【'+this.xmProduct.productName+'】从迭代【'+this.xmIteration.iterationName+'】移出吗?', '提示', {}).then(() => {
var params={iterationId:this.xmIteration.id,productId:this.xmProduct.id}
delXmIterationProductLink(params).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
this.$message({showClose: true, message:"移出成功", type: tips.isOk?'success':'error' });
}
})
})
} }
},//end methods },//end methods
components: { components: {

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

@ -267,6 +267,9 @@
xmProduct:function(){ xmProduct:function(){
this.filters.product=this.xmProduct this.filters.product=this.xmProduct
this.getXmMenus() this.getXmMenus()
},
selProject:function(){
this.getXmMenus();
} }
}, },
data() { data() {

2
src/views/xm/core/xmProduct/XmProductForProjectComplex.vue

@ -14,7 +14,7 @@
<el-tab-pane label="迭代" name="iterations" v-if=" !xmIteration" > <el-tab-pane label="迭代" name="iterations" v-if=" !xmIteration" >
<xm-iteration-mng v-show=" xmProduct && showPanel=='iterations' && !xmIteration" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-mng> <xm-iteration-mng v-show=" xmProduct && showPanel=='iterations' && !xmIteration" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-mng>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="项目" lazy name="projects">
<el-tab-pane label="项目" lazy name="projects" v-if="!selProject">
<xm-product-project-for-link v-show="xmProduct && showPanel=='projects'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-project-for-link> <xm-product-project-for-link v-show="xmProduct && showPanel=='projects'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-project-for-link>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="故事" lazy name="menus" > <el-tab-pane label="故事" lazy name="menus" >

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

@ -142,7 +142,7 @@
<xm-product-overview-complex v-if="infotype=='产品概览'" :xm-product="xmProduct"></xm-product-overview-complex> <xm-product-overview-complex v-if="infotype=='产品概览'" :xm-product="xmProduct"></xm-product-overview-complex>
<xm-iteration-for-project-complex v-if="infotype=='迭代'" ref="xmIterationMng" :xm-product="xmProduct"></xm-iteration-for-project-complex> <xm-iteration-for-project-complex v-if="infotype=='迭代'" ref="xmIterationMng" :xm-product="xmProduct"></xm-iteration-for-project-complex>
<xm-project-for-link v-if="infotype=='项目'" ref="xmProjectForLink" :xm-product="xmProduct"></xm-project-for-link>
<xm-project-complex v-if="infotype=='项目'" ref="xmProjectForLink" :xm-product="xmProduct"></xm-project-complex>
<xm-menu-mng v-if="infotype=='用户故事'" :xm-product="xmProduct"></xm-menu-mng> <xm-menu-mng v-if="infotype=='用户故事'" :xm-product="xmProduct"></xm-menu-mng>
<xm-task-mng v-if="infotype=='任务'" ref="xmTaskMng" :xm-product="xmProduct" ></xm-task-mng> <xm-task-mng v-if="infotype=='任务'" ref="xmTaskMng" :xm-product="xmProduct" ></xm-task-mng>
<xm-question v-if="infotype=='缺陷'" :qtype="'bug'" :xm-product='xmProduct' ref="xmQuestion"></xm-question> <xm-question v-if="infotype=='缺陷'" :qtype="'bug'" :xm-product='xmProduct' ref="xmQuestion"></xm-question>
@ -173,6 +173,8 @@
import { listXmProject,editStatus , delXmProject, batchDelXmProject } from '@/api/xm/core/xmProject'; import { listXmProject,editStatus , delXmProject, batchDelXmProject } from '@/api/xm/core/xmProject';
import XmProjectAdd from '../xmProject/XmProjectAdd';// import XmProjectAdd from '../xmProject/XmProjectAdd';//
import XmProjectEdit from '../xmProject/XmProjectEdit';// import XmProjectEdit from '../xmProject/XmProjectEdit';//
import XmProjectComplex from '../xmProject/XmProjectComplex';//
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import xmTaskMng from '../xmTask/XmTaskMng'; import xmTaskMng from '../xmTask/XmTaskMng';
import xmGroupMng from '../xmProjectGroup/XmProjectGroupMng'; import xmGroupMng from '../xmProjectGroup/XmProjectGroupMng';
@ -199,6 +201,7 @@
import XmProjectForLink from '../xmProject/XmProjectForLink.vue'; import XmProjectForLink from '../xmProject/XmProjectForLink.vue';
export default { export default {
props: ["xmProduct","visible"], props: ["xmProduct","visible"],
computed: { computed: {
@ -221,7 +224,7 @@ import XmProjectForLink from '../xmProject/XmProjectForLink.vue';
return { return {
platformViewVisible:false, platformViewVisible:false,
tabPosition:'left', tabPosition:'left',
infotype:"项目概览",
infotype:"产品概览",
load:{list:false,edit:false}, load:{list:false,edit:false},
groupUserVisible:false, groupUserVisible:false,
exportArr: ['任务', '阶段计划', '故事监控'] exportArr: ['任务', '阶段计划', '故事监控']
@ -419,6 +422,7 @@ import XmProjectForLink from '../xmProject/XmProjectForLink.vue';
XmIterationForProjectComplex, XmIterationForProjectComplex,
XmProductOverviewComplex, XmProductOverviewComplex,
XmProductForProjectComplex, XmProductForProjectComplex,
XmProjectComplex,
XmProjectForLink, XmProjectForLink,
// //
}, },

177
src/views/xm/core/xmProject/XmProjectComplex.vue

@ -0,0 +1,177 @@
<template>
<section class="page-container border">
<el-row>
<el-col :span="projectVisible==true?3:0" >
<xm-project-select :xm-iteration="xmIteration" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear-select="onProjectClearSelect"></xm-project-select>
</el-col>
<el-col :span="projectVisible==true?21:24" >
<el-tabs type="border-card" :v-model="showPanel" activate-name="projectOverview" @tab-click="tabClick">
<el-tab-pane label="项目概览" name="projectOverview">
<span v-show="projectVisible==true" slot="label" ><i class="el-icon-d-arrow-left" @click.stop="projectVisible=false"></i> 项目概览</span>
<span v-show="projectVisible==false" slot="label" ><i class="el-icon-d-arrow-right" @click.stop="projectVisible=true"></i> 项目概览</span>
</el-tab-pane>
<el-tab-pane label="迭代" name="iterations" v-if=" !xmIteration" >
<xm-iteration-mng v-if=" selProject && showPanel=='iterations' && !xmIteration" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-mng>
</el-tab-pane>
<el-tab-pane label="产品、战略" name="products" v-if=" !xmProduct" >
<xm-product-mng v-if=" selProject && showPanel=='products'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-mng>
</el-tab-pane>
<el-tab-pane label="项目" lazy name="projects" v-if="!selProject">
<xm-product-project-for-link v-if="selProject && showPanel=='projects'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-product-project-for-link>
</el-tab-pane>
<el-tab-pane label="故事" lazy name="menus" >
<xm-menu-mng v-if="selProject && showPanel=='menus'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-menu-mng>
</el-tab-pane>
<el-tab-pane label="任务" lazy name="tasks" >
<xm-task-mng v-if="selProject && showPanel=='tasks'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-task-mng>
</el-tab-pane>
<el-tab-pane label="缺陷" lazy name="bugs" >
<xm-question-mng v-if="selProject && showPanel=='bugs'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject"></xm-question-mng>
</el-tab-pane>
</el-tabs>
<el-row>
</el-row>
</el-col>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';//
import XmIterationMng from '../xmIteration/XmIterationMng.vue'
import XmMenuMng from '../xmMenu/XmMenuMng.vue'
import XmIterationStateShow from '../xmIterationState/XmIterationStateShow.vue'
import { mapGetters } from 'vuex'
import XmProductMng from '../xmProduct/XmProductMng.vue';
import XmTaskMng from '../xmTask/XmTaskMng.vue';
import XmQuestionMng from '../xmQuestion/XmQuestionMng.vue';
import XmProjectSelect from './XmProjectSelect.vue';
import XmProjectForLink from './XmProjectForLink.vue';
import XmProductSelect from '../xmProduct/XmProductSelect.vue';
import XmProductProjectForLink from '../xmProduct/XmProductProjectForLink.vue';
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
},
props:['visible','xmIteration','xmProduct'],
watch:{
visible:function(visible){
if(visible==true){
}
}
},
data() {
return{
selProject:null,
showPanel:'tasks',//menus,tasks,bugs,iterationStateShow
topModules:
[
{
moduleName:"项目",
topModuleId:'xm',
link:"/xm/core/xmProject/XmProjectMng",
icon: require("@/assets/image/platform/module-project.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
},
{
moduleName:"产品",
topModuleId:'xm',
link:"/xm/core/xmProduct/XmProductMng",
icon: require("@/assets/image/platform/module-marketing.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
},
{
moduleName:"故事",
topModuleId:'xm',
link:"/xm/core/xmMenu/XmMenuMng",
icon: require("@/assets/image/platform/module-intelligentForms.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
},
{
moduleName:"迭代",
topModuleId:'xm',
link:"/xm/core/xmIteration/XmIterationMng",
icon: require("@/assets/image/platform/module-iteration.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
},
{
moduleName:"任务",
topModuleId:'xm',
link:"/xm/core/xmTask/XmMyTaskCenter",
icon: require("@/assets/image/platform/module-task.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
},
{
moduleName:"缺陷",
topModuleId:'xm',
link:"/xm/core/xmQuestion/XmQuestionMng",
icon: require("@/assets/image/platform/anti-fake.png"),
isHighlight:false,
moduleType : '1' // 1- 2-
}
],
projectVisible:true,
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
/**end 自定义函数请在上面加**/
onProjectRowClick(xmProject){
this.selProject=xmProject
},
onProjectClearSelect(){
this.selProject=null;
},
tabClick(tab){
this.showPanel=tab.name
}
},//end methods
components: {
//
XmIterationMng,
XmMenuMng,
XmIterationStateShow,
XmProductMng,
XmTaskMng,
XmQuestionMng,
XmProductSelect,
XmProjectSelect,
XmProjectForLink,
XmProductProjectForLink,
},
mounted() {
this.$nextTick(() => {
});
}
}
</script>
<style scoped>
.more-label-font{
text-align:center;
float:left;
padding-top:5px;
}
</style>

8
src/views/xm/core/xmProject/XmProjectForLink.vue

@ -1,12 +1,10 @@
<template> <template>
<section> <section>
<el-row> <el-row>
<el-input v-model="filters.key" style="width:30%;" placeholder="请输入关键字进行查找项目">
<template slot="append">
<el-button @click="searchXmProjects" icon="el-icon-search"></el-button>
</template>
</el-input>
<el-input v-model="filters.key" style="width:30%;" placeholder="请输入关键字进行查找项目" v-if="!xmIteration && !xmProduct">
</el-input>
<el-button @click="searchXmProjects" icon="el-icon-search" v-if="!xmIteration && !xmProduct"></el-button>
<el-button icon="el-icon-plus" @click="xmProjectListVisible=true" v-if="!xmIteration"> <el-button icon="el-icon-plus" @click="xmProjectListVisible=true" v-if="!xmIteration">
加入更多项目到产品中 加入更多项目到产品中
</el-button> </el-button>

159
src/views/xm/core/xmProject/XmProjectSelect.vue

@ -0,0 +1,159 @@
<template>
<section>
<el-row class="page-main page-height-90">
<el-table ref="table" :height="tableHeight" stripe :data="xmProjects" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;" >
<el-table-column prop="name" label="项目名称" min-width="80" >
<template slot-scope="scope">
{{scope.row.name}}&nbsp;&nbsp;{{parseInt(scope.row.totalProgress)}}%
</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>
</section>
</template>
<script>
import Vue from 'vue'
import util from '@/common/js/util';//
//import Sticky from '@/components/Sticky' // header
import config from "@/common/config"; //
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmProject, } from '@/api/xm/core/xmProject';
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
},
data() {
return {
filters: {
key: ''
},
xmProjects: [],//
pageInfo:{//
total:0,//0>0
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:['create_time'],// ['sex','student_id']
orderDirs:['desc']// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
addFormVisible: false,//xmProject
//xmProject
addForm: {
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planInnerUserAt:'',planOutUserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planInnerUserPrice:'',budgetOutUserPrice:'',planOutUserCnt:'',planInnerUserCnt:'',planWorkingHours:''
},
editFormVisible: false,//
tableHeight:300,
//xmProject
editForm: {
id:'',code:'',name:'',xmType:'',startTime:'',endTime:'',urgent:'',priority:'',description:'',createUserid:'',createUsername:'',createTime:'',assess:'',assessRemarks:'',status:'',branchId:'',planTotalCost:'',bizProcInstId:'',bizFlowState:'',planNouserAt:'',planInnerUserAt:'',planOutUserAt:'',locked:'',baseTime:'',baseRemark:'',baselineId:'',planWorkload:'',totalReceivables:'',budgetMarginRate:'',contractAmt:'',planInnerUserPrice:'',budgetOutUserPrice:'',planOutUserCnt:'',planInnerUserCnt:'',planWorkingHours:''
},
/**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();
},
rowClick(row){
this.editForm=row;
this.$emit("row-click",row);
},
// XmProject xm_project
getXmProjects() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count,
};
if(this.filters.key){
params.key='%'+this.filters.key+'%'
}
this.load.list = true;
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(",")
}
params.branchId = this.userInfo.branchId;
listXmProject(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
console.log(res.data);
this.pageInfo.total = res.data.total;
this.pageInfo.count=false;
this.xmProjects = res.data.data;
}else{
this.$message({showClose: true, message: tips.msg, type: 'error' });
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
selectProject:function(row){
this.editForm=row
this.$emit('project-confirm',this.editForm);
}
/**end 自定义函数请在上面加**/
},//end methods
components: {
//
},
mounted() {
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=70/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.showInfo = false;
this.getXmProjects();
});
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save