8 changed files with 375 additions and 22 deletions
-
20src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue
-
3src/views/xm/core/xmMenu/XmMenuMng.vue
-
2src/views/xm/core/xmProduct/XmProductForProjectComplex.vue
-
8src/views/xm/core/xmProduct/XmProductInfo.vue
-
177src/views/xm/core/xmProject/XmProjectComplex.vue
-
8src/views/xm/core/xmProject/XmProjectForLink.vue
-
159src/views/xm/core/xmProject/XmProjectSelect.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> |
|||
@ -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}} {{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> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue