Browse Source

优化

master
陈裕财 4 years ago
parent
commit
a455ba07ec
  1. 8
      src/views/xm/core/xmProduct/XmProductMng.vue
  2. 74
      src/views/xm/core/xmProject/XmProjectMng.vue

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

@ -12,6 +12,10 @@
<el-option label="我相关的产品" value="compete"></el-option> <el-option label="我相关的产品" value="compete"></el-option>
<el-option label="按产品编号精确查找" value="productId"></el-option> <el-option label="按产品编号精确查找" value="productId"></el-option>
</el-select> </el-select>
<el-select v-model="filters.pstatus" clearable placeholder="状态">
<el-option v-for="(item,index) in dicts['xmProductPstatus']" :value="item.id" :label="item.name" :key="index"></el-option>
</el-select>
<el-input v-if="filters.queryScope=='productId'" style="width:20%;" v-model="filters.id" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts"> <el-input v-if="filters.queryScope=='productId'" style="width:20%;" v-model="filters.id" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input> </el-input>
<el-input v-model="filters.key" style="width: 20%;" placeholder="名称查询" clearable> <el-input v-model="filters.key" style="width: 20%;" placeholder="名称查询" clearable>
@ -337,6 +341,7 @@
queryScope:'compete',//compete/branchId/''/productId queryScope:'compete',//compete/branchId/''/productId
id:'',// id:'',//
pmUser:null,// pmUser:null,//
pstatus:'',
}, },
xmProducts: [],// xmProducts: [],//
pageInfo:{// pageInfo:{//
@ -472,6 +477,9 @@
if(this.filters.pmUser){ if(this.filters.pmUser){
params.pmUserid=this.filters.pmUser.userid params.pmUserid=this.filters.pmUser.userid
} }
if(this.filters.pstatus){
params.pstatus=this.filters.pstatus
}
this.load.list = true; this.load.list = true;
listXmProductWithState(params).then((res) => { listXmProductWithState(params).then((res) => {
var tips=res.data.tips; var tips=res.data.tips;

74
src/views/xm/core/xmProject/XmProjectMng.vue

@ -154,34 +154,45 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table ref="table" :height="maxTableHeight" v-cloak v-show="!showType" stripe :data="ScreenData" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column type="index" label="序号" width="80" ></el-table-column>
<el-table-column prop="code" label="项目编号" min-width="120" ></el-table-column>
<el-table-column prop="name" label="标题" min-width="200" >
<el-table ref="table" :height="maxTableHeight" v-cloak v-show="!showType" fit stripe :data="ScreenData" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column type="index" label="序号" width="60" ></el-table-column>
<el-table-column prop="code" label="项目代号" width="120" sortable show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="标题" sortable min-width="200" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click.stop="intoInfo(scope.row)">{{scope.row.name}}</el-link>
<el-link type="primary" @click.stop="intoInfo(scope.row)">{{scope.row.name}}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="menuCnt" label="需求数" min-width="80" >
<el-table-column prop="finishMenuCnt" label="已完成" min-width="80" ></el-table-column>
<el-table-column prop="menuCnt" label="总数" min-width="80" ></el-table-column>
</el-table-column>
<el-table-column prop="totalTaskCnt" label="任务数" min-width="80" >
<el-table-column prop="totalCompleteTaskCnt" label="已完成" min-width="80" ></el-table-column>
<el-table-column prop="totalTaskCnt" label="总数" min-width="80" ></el-table-column>
<el-table-column prop="status" label="状态" width="80 sortable" :formatter="formatterByDicts">
</el-table-column> </el-table-column>
<el-table-column prop="totalBugCnt" label="缺陷" min-width="80" >
<el-table-column prop="totalClosedBugCnt" label="已关闭" min-width="80" >
</el-table-column>
<el-table-column prop="totalBugCnt" label="总数" min-width="80" >
</el-table-column>
</el-table-column>
<el-table-column label="进度" min-width="80" >
<el-table-column prop="totalProgress" label="进度" width="100" sortable>
<template slot-scope="scope">
<font ><el-tag :type="scope.row.totalProgress>=100?'success':'warning'">{{scope.row.totalProgress}}%</el-tag>
<el-button id="guider-four" type="text" icon="el-icon-video-play" title="统计项目的工作量、进度、需求、bugs等数据" @click.stop="loadTasksToXmProjectState( scope.row)"></el-button>
</font>
</template>
</el-table-column>
<el-table-column prop="productCnt" label="产品数" sortable min-width="80" >
</el-table-column>
<el-table-column prop="iterationCnt" label="迭代数" sortable min-width="80" >
</el-table-column>
<el-table-column prop="menuCnt" label="需求数" sortable min-width="80" >
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.totalProgress}}%
<span title="完成的需求数 / 需求总数 ">{{scope.row.menuCnt>0?scope.row.finishMenuCnt+'&nbsp;/&nbsp;'+scope.row.menuCnt:''}}</span>
</template> </template>
</el-table-column>
<el-table-column prop="startTime" label="起止时间" min-width="150" >
</el-table-column>
<el-table-column prop="totalTaskCnt" label="任务数" sortable min-width="80" >
<template slot-scope="scope">
<span title="完成的任务数 / 任务总数 ">{{scope.row.totalTaskCnt>0?scope.row.totalCompleteTaskCnt+'&nbsp;/&nbsp;'+scope.row.totalTaskCnt:''}}</span>
</template>
</el-table-column>
<el-table-column prop="totalBugCnt" label="缺陷" sortable min-width="80" >
<template slot-scope="scope">
<span title="关闭的缺陷数 / 缺陷总数 ">{{scope.row.totalBugCnt>0?scope.row.totalClosedBugCnt+'&nbsp;/&nbsp;'+scope.row.totalBugCnt:''}}</span>
</template>
</el-table-column>
<el-table-column prop="startTime" label="起止时间" sortable min-width="150" >
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.startTime? scope.row.startTime.substr(0,10) : ""}}~{{scope.row.endTime? scope.row.endTime.substr(0,10) : ""}} {{scope.row.startTime? scope.row.startTime.substr(0,10) : ""}}~{{scope.row.endTime? scope.row.endTime.substr(0,10) : ""}}
</template> </template>
@ -197,7 +208,7 @@
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="245" fixed="right">
<el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-popover <!-- <el-popover
placement="left" placement="left"
@ -205,10 +216,10 @@
<el-button v-if="menukey=='myFocus'" type="primary" @click.stop="focusOrUnfocus(scope.row)" >取消关注</el-button> <el-button v-if="menukey=='myFocus'" type="primary" @click.stop="focusOrUnfocus(scope.row)" >取消关注</el-button>
<el-button v-else type="text" @click.stop="focusOrUnfocus(scope.row)" >关注</el-button> <el-button v-else type="text" @click.stop="focusOrUnfocus(scope.row)" >关注</el-button>
<el-button type="text" @click.stop="xmRecordVisible=true" >日志</el-button>
<el-button type="text" @click.stop="intoInfo(scope.row)" >视图</el-button>
<el-button type="text" title="通过复制快速创建新项目" @click.stop="onCopyToBtnClick(scope.row)" v-loading="load.add">复制</el-button> <el-button type="text" title="通过复制快速创建新项目" @click.stop="onCopyToBtnClick(scope.row)" v-loading="load.add">复制</el-button>
<el-button type="text" title="删除项目" @click.stop="handleDel(scope.row)" v-loading="load.del">删除</el-button> <el-button type="text" title="删除项目" @click.stop="handleDel(scope.row)" v-loading="load.del">删除</el-button>
handleDel
<!-- <!--
<el-button type="primary" @click.stop="statusChange(scope,'1')" v-if="scope.row.status==0 || scope.row.status == 2">提交审核</el-button> <el-button type="primary" @click.stop="statusChange(scope,'1')" v-if="scope.row.status==0 || scope.row.status == 2">提交审核</el-button>
<el-button type="primary" @click.stop="statusChange(scope,'3')" v-if="scope.row.status==1">批准</el-button> <el-button type="primary" @click.stop="statusChange(scope,'3')" v-if="scope.row.status==1">批准</el-button>
@ -216,7 +227,7 @@
<el-button type="primary" @click.stop="statusChange(scope,'4')" v-if="scope.row.status==3">结束</el-button> <el-button type="primary" @click.stop="statusChange(scope,'4')" v-if="scope.row.status==3">结束</el-button>
<el-button type="primary" @click.stop="statusChange(scope,'3')" v-if="scope.row.status==4">重新启动</el-button> <el-button type="primary" @click.stop="statusChange(scope,'3')" v-if="scope.row.status==4">重新启动</el-button>
<el-button type="primary" @click.stop="handleDel(scope.row,scope.$index)" v-if="isLeader(scope.row.leader)">删除</el-button> <el-button type="primary" @click.stop="handleDel(scope.row,scope.$index)" v-if="isLeader(scope.row.leader)">删除</el-button>
-->
<el-dropdown @command="handleCommand" :hide-on-click="false"> <el-dropdown @command="handleCommand" :hide-on-click="false">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
@ -232,6 +243,7 @@
<el-dropdown-item icon="el-icon-success" :command="{type:'sendToProcessApprova',row:scope.row,bizKey:'xm_project_restart_approva'}">项目重新启动发审(审核通过后生效)</el-dropdown-item> <el-dropdown-item icon="el-icon-success" :command="{type:'sendToProcessApprova',row:scope.row,bizKey:'xm_project_restart_approva'}">项目重新启动发审(审核通过后生效)</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
-->
<!-- <el-button style="width:100%;" slot="reference" class="see-more" type="text" icon="el-icon-more"></el-button> <!-- <el-button style="width:100%;" slot="reference" class="see-more" type="text" icon="el-icon-more"></el-button>
</el-popover> --> </el-popover> -->
</template> </template>
@ -462,6 +474,9 @@
if(this.filters.productId){ if(this.filters.productId){
params.productId = this.filters.productId params.productId = this.filters.productId
} }
if(this.filters.status){
params.status = this.filters.status
}
params.createTimeStart=this.dateRanger[0] params.createTimeStart=this.dateRanger[0]
params.createTimeEnd=this.dateRanger[1] params.createTimeEnd=this.dateRanger[1]
listXmProject(params).then((res) => { listXmProject(params).then((res) => {
@ -819,6 +834,11 @@
return status; return status;
} }
}, },
formatterByDicts(row,column,cellValue){
if(column.property=='status'){
return this.formatProjectStatus(cellValue);
}
},
loadTasksToXmProjectState(row){ loadTasksToXmProjectState(row){
var params={projectId:row.id} var params={projectId:row.id}
@ -857,7 +877,7 @@
initSimpleDicts('all',['projectType','urgencyLevel','priority','projectStatus']).then(res=>{ initSimpleDicts('all',['projectType','urgencyLevel','priority','projectStatus']).then(res=>{
this.dicts=res.data.data; this.dicts=res.data.data;
}) })
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table1.$el);
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
this.showInfo = false; this.showInfo = false;
this.getXmProjects(this.guiderStart); this.getXmProjects(this.guiderStart);
}); });

Loading…
Cancel
Save