Browse Source

优化代码

master
陈裕财 5 years ago
parent
commit
5e537b5df5
  1. 16
      src/views/xm/core/xmIteration/XmIterationMng.vue
  2. 434
      src/views/xm/core/xmMenu/XmMenuMng.vue
  3. 1126
      src/views/xm/core/xmMenu/XmMenuMngBatch.vue
  4. 14
      src/views/xm/core/xmProduct/XmProductMng.vue
  5. 4
      src/views/xm/core/xmProduct/XmProductSelect.vue
  6. 10
      src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue
  7. 6
      src/views/xm/core/xmTask/XmTaskList.vue
  8. 10
      src/views/xm/core/xmTask/XmTaskListForMenu.vue
  9. 1
      src/views/xm/core/xmTask/XmTaskMng.vue
  10. 4
      src/views/xm/core/xmTask/XmTaskMngBatch.vue

16
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -75,9 +75,9 @@
<!--列表 XmIteration 迭代定义-->
<el-table ref="table" :max-height="tableHeight" v-if="!gstcVisible" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column type="selection" aria-disabled width="55"></el-table-column>
<el-table-column prop="iterationName" label="迭代名称" min-width="160" >
<el-table-column prop="iterationName" label="迭代名称" min-width="160" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.seqNo}} &nbsp;&nbsp;<el-link type="primary" @click="showEdit( scope.row,scope.$index)"> {{scope.row.iterationName}} </el-link>
<span>{{scope.row.seqNo}} &nbsp;&nbsp;<el-link type="primary" @click="showEdit( scope.row,scope.$index)"> {{scope.row.iterationName}} </el-link></span>
</template>
</el-table-column>
<el-table-column prop="finishRate" label="总进度" min-width="80" >
@ -85,12 +85,12 @@
{{scope.row.finishRate}}%
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间" min-width="80" :formatter="formatterDate" ></el-table-column>
<el-table-column prop="endTime" label="结束时间" min-width="80" :formatter="formatterDate"></el-table-column>
<el-table-column prop="onlineTime" label="上线时间" min-width="80" :formatter="formatterDate"></el-table-column>
<el-table-column prop="adminUsername" label="负责人姓名" min-width="80" ></el-table-column>
<el-table-column prop="distBudgetWorkload" label="已分配工作量" min-width="80" ></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量" min-width="80" ></el-table-column>
<el-table-column prop="startTime" label="开始时间" min-width="80" :formatter="formatterDate" show-overflow-tooltip></el-table-column>
<el-table-column prop="endTime" label="结束时间" min-width="80" :formatter="formatterDate" show-overflow-tooltip></el-table-column>
<el-table-column prop="onlineTime" label="上线时间" min-width="80" :formatter="formatterDate" show-overflow-tooltip></el-table-column>
<el-table-column prop="adminUsername" label="负责人姓名" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="distBudgetWorkload" label="已分配工作量" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="400" fixed="right">
<template slot-scope="scope">
<el-button type="primary" @click="showSubAdd( scope.row,scope.$index)" icon="el-icon-plus"></el-button>

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

@ -1,13 +1,7 @@
<template>
<section>
<el-row class="app-container" v-if=" !batchEditVisible">
<el-row>
<el-row >
<el-col v-show="!batchEditVisible&& !filters.product" :span="24" class="app-container">
<xm-product-mng :sel-project="selProject" @row-click="onProductSelected" ref="xmProductMng" :simple="true"></xm-product-mng>
</el-col>
<el-col v-show="filters.product" :span="24" >
<el-row class="app-container">
<el-select v-model="filters.taskFilterType" placeholder="是否分配了任务?" clearable >
<el-option value="not-join" label="未分配任何任务的故事"></el-option>
<el-option value="join" label="已分配任务的故事"></el-option>
@ -32,15 +26,9 @@
</el-input>
<el-button v-if=" batchEditVisible==false " type="primary" @click="showAdd" icon="el-icon-plus">故事</el-button>
<el-button v-if=" batchEditVisible==false" @click="toBatchEdit" icon="el-icon-edit">修改</el-button>
<el-button v-if=" batchEditVisible==true " type="warning" @click="batchSaveMenu" icon="el-icon-finished">保存</el-button>
<el-button v-if=" batchEditVisible==true" type="success" @click="handlePopover(null,'add')" icon="el-icon-plus">故事</el-button>
<el-button v-if=" batchEditVisible==true " @click="noBatchEdit" icon="el-icon-back">返回</el-button>
<el-button v-if=" batchEditVisible==false && filters.product " @click="toSelectProduct" icon="el-icon-back">返回</el-button>
<el-button v-if=" batchEditVisible==true " type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0 || load.del==true">批量删除</el-button>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">故事</el-button>
<el-button @click="toBatchEdit" icon="el-icon-edit">修改</el-button>
<el-button @click="toSelectProduct" icon="el-icon-back">产品</el-button>
<el-popover
placement="top-start"
title=""
@ -101,68 +89,22 @@
</el-popover>
</el-row>
<el-row ref="table">
<el-row v-show="batchEditVisible" class="app-container">
<el-table ref="table1" :max-height="tableHeight" :data="xmMenusTreeData" class="drag-table" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="45"></el-table-column>
<el-table-column sortable prop="seqNo" label="序号" min-width="100">
<template slot-scope="scope">
<div style="display:flex;width:100%;">
<el-popover
placement="top"
width="400"
trigger="click">
<div style="text-align: center; margin: 0">
<div :ref="'menu_'+scope.$index" :data-menu-id="scope.row.menuId"></div>
<el-button type="primary" size="mini" @click="handlePopover(scope.row,'highestPmenuId')">成为顶级节点</el-button>
<el-button type="danger" size="mini" @click="handlePopover(scope.row,'delete')">删除当前行</el-button>
<el-button type="success" size="mini" @click="handlePopover(scope.row,'addSub')">增加子行</el-button>
</div>
<el-button slot="reference" :type="scope.row.opType?'success':'plain'" size="mini" icon="el-icon-more" circle></el-button>
</el-popover>
<el-input style="width:100%;" v-model="scope.row.seqNo" @change="fieldChange(scope.row,'seqNo')"></el-input>
</div>
</template>
</el-table-column>
<el-table-column prop="menuName" label="故事名称" min-width="140" >
<template slot-scope="scope">
<el-input v-model="scope.row.menuName" @change="fieldChange(scope.row,'menuName')"></el-input>
</template>
</el-table-column>
<el-table-column prop="mmUsername" label="负责人" min-width="100" >
<template slot-scope="scope">
<el-tag v-if="scope.row.mmUserid" closable @close="clearPmUser(scope.row)">{{scope.row.mmUsername}}</el-tag>
<el-tag v-else>未配置</el-tag>
<el-button @click="selectUser(scope.row)">选人</el-button>
</template>
</el-table-column>
<el-table-column prop="remark" label="描述" min-width="140" >
<template slot-scope="scope">
<el-input v-model="scope.row.remark" type="textarea" @change="fieldChange(scope.row,'remark')"></el-input>
</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>
<el-row v-show="!batchEditVisible" class="app-container">
<el-table ref="table2" :max-height="tableHeight" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-row style="padding-top:12px;">
<el-table ref="table" :max-height="tableHeight" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick">
<el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column prop="menuName" label="故事名称" min-width="140" >
<el-table-column prop="menuName" label="故事名称" min-width="160" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.seqNo}}&nbsp;&nbsp;<el-link type="primary" @click="showMenuExchange(scope.row)">{{scope.row.menuName}}</el-link>
<span>{{scope.row.seqNo}}&nbsp;&nbsp;<el-link type="primary" @click="showMenuExchange(scope.row)">{{scope.row.menuName}}</el-link></span>
</template>
</el-table-column>
<el-table-column prop="mmUsername" label="负责人" min-width="80" >
<el-table-column prop="mmUsername" label="负责人" min-width="80" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="finishRate" label="总体进度" width="100" >
<template slot-scope="scope">
{{scope.row.finishRate}}%
</template>
</el-table-column>
<el-table-column prop="remark" label="描述" min-width="140" >
<el-table-column prop="remark" label="描述" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<el-popover
v-if="scope.row.remark && scope.row.remark.length>20"
@ -213,8 +155,6 @@
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
</el-row>
</el-col>
<!--编辑 XmMenu xm_project_menu界面-->
<el-dialog title="编辑故事" :visible.sync="editFormVisible" width="50%" append-to-body :close-on-click-modal="false">
<xm-menu-edit :xm-menu="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-menu-edit>
@ -232,6 +172,9 @@
<xm-menu-rich-detail :visible="menuDetailVisible" :reload="false" :xm-menu="editForm" ></xm-menu-rich-detail>
</el-dialog>
<el-dialog title="选择产品" :visible.sync="productVisible" width="60%" append-to-body :close-on-click-modal="false">
<xm-product-mng :sel-project="selProject" @row-click="onProductSelected" ref="xmProductMng" :simple="true"></xm-product-mng>
</el-dialog>
<el-dialog title="选中任务" :visible.sync="selectTaskVisible" width="80%" append-to-body :close-on-click-modal="false">
<xm-task-list :sel-project="selProject" :is-multi-select="true" @tasks-selected="onSelectedTasks"></xm-task-list>
</el-dialog>
@ -260,6 +203,9 @@
<users-select @confirm="onUserSelected" ref="usersSelect"></users-select>
</el-dialog>
</el-row>
<el-row v-if="batchEditVisible && filters.product" :span="24">
<xm-menu-mng-batch @no-batch-edit=noBatchEdit :product="filters.product"></xm-menu-mng-batch>
</el-row>
</section>
</template>
@ -275,6 +221,7 @@
import XmMenuAdd from './XmMenuAdd';//
import XmMenuEdit from './XmMenuEdit';//
import XmMenuMngBatch from './XmMenuMngBatch';//
import XmProductMng from '../xmProduct/XmProductSelect';//
import XmMenuTemplateMng from '../xmMenuTemplate/XmMenuTemplateMng';//
import XmMenuRichDetail from './XmMenuRichDetail';
@ -308,9 +255,6 @@
}
const xmMenusTreeData = this.translateDataToTree(xmMenus);
if (this.batchEditVisible) {
this.rowDrop();
}
return xmMenusTreeData;
},
@ -324,6 +268,11 @@
}
},
watch:{
'filters.product'(product){
if(product==null){
this.productVisible=true;
}
}
},
data() {
const beginDate = new Date();
@ -378,6 +327,7 @@
util.formatDate.format(endDate, "yyyy-MM-dd")
],
pickerOptions: util.pickerOptions('datarange'),
productVisible:false,
/**begin 自定义属性请在下面加 请加备注**/
/**end 自定义属性请在上面加 请加备注**/
@ -518,6 +468,7 @@
},
onProductSelected:function(product){
this.filters.product=product
this.productVisible=false;
this.getXmMenus()
},
//xmMenu
@ -567,159 +518,6 @@
rowClick: function(row, event, column){
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
//
rowDrop() {
const _this = this
//
let dragged = null;
//
let draggedIndex = -1;
//
let target = document.querySelector('.drag-table .el-table__body-wrapper .el-table__body tbody');
console.log('rowDrop--target==', target);
let rows = 0;//
setTimeout(function () {
rows = target.childElementCount
console.log('rowDrop--rows==', rows);
for (let i = 0; i < target.childElementCount; i++) {
const child = target.children[i]
child.draggable = true
// child.style.cursor = 'copy'
child.ondragstart = function(e){
console.log('开始--ondragstart--e==', e);
dragged = e.path[0]
draggedIndex = e.path[0].rowIndex
console.log('child'+i+'开始拖拽'+draggedIndex);
_this.cellMouseIndex = -1
dragged.style.cursor = 'grabbing'
}
child.ondragend = function(){
console.log('child'+i+'拖拽结束');
}
}
},0)
//
let dragIndex = -1
target.ondragenter = function(e){
clearTimeout(loop)
// tbody,
if(e.path[0].nodeName === 'TD'){
// throughRow
const throughRow = e.path.find(path => {
if(path.className.split(' ').includes('el-table__row')){
return path
}
})
if(dragIndex !== throughRow.rowIndex){
if(dragIndex > -1){
//
const last = target.children[dragIndex];
clearClass(last)
}
// console.log(''+selectRow.rowIndex);
//
if(draggedIndex !== throughRow.rowIndex ){
//
dragged.style.cursor = 'copy'
throughRow.style.height = 60+'px'
throughRow.style.backgroundColor = '#e9fdcf'
}
dragIndex = throughRow.rowIndex
}
}
leaveIndex = -1
}
target.ondragover = function(e){
// console.log('...');
e.preventDefault();
leaveIndex = -1
}
let loop = null
let leaveIndex = -1 // table, -1table
target.ondragleave = function(e){
console.log('ondragleave--e==', e);
clearTimeout(loop)
if(e.path[0].nodeName){
const throughRow = e.path.find(path => {
if(path.className.split(' ').includes('el-table__row')){
return path;
}
})
if(throughRow && dragIndex !== throughRow.rowIndex){
// console.log(''+selectRow.rowIndex);
// selectRow.style.height = 'unset'
// selectRow.style.backgroundColor = '#fff'
// dragIndex = selectRow.rowIndex
}
if(throughRow.rowIndex === 0 || throughRow.rowIndex === rows-1){
//
leaveIndex = throughRow.rowIndex
loop = setTimeout(function () {
if(leaveIndex > -1){
console.log("离开了",leaveIndex)
const leave = target.children[leaveIndex];
clearClass(leave)
dragIndex = -1
}
},100)
}``
}
}
target.ondrop = function(){
console.log('ondrop--放下了'+draggedIndex);
//
const last = target.children[dragIndex];
clearClass(last)
dragged.style.cursor = 'default'
console.log('ondrop--draggedIndex==', draggedIndex);
console.log('ondrop--dragIndex==', dragIndex);
const form = _this.xmMenusTreeData[draggedIndex];
const to = _this.xmMenusTreeData[dragIndex];
const startId = _this.$refs['menu_'+draggedIndex].dataset.menuId;;
const endId = _this.$refs['menu_'+dragIndex].dataset.menuId;
if (startId !== endId) {
_this.changePmenuId(startId, endId)
}
}
let clearClass = function (node) {
if(node){
node.style.height = 'unset'
node.style.backgroundColor = '#fff'
}
dragged.style.cursor = 'grabbing'
}
// if(last && form.menuId !== to.menuId && to.isFolder){
// // /
// _this.copyOrMoveApi('move', form.menuId, to.menuId)
// }
},
//
// dict sIdmenuId; ePmeuId menuId;
judgePmenuId(dict, sId, ePmeuId) {
if (sId === ePmeuId) {
return true;
} else if (dict[ePmeuId]) {
return this.judgePmenuId(dict, sId, dict[ePmeuId]);
} else {
return false;
}
},
handleExport() {
this.downloadLoading = true
@ -758,35 +556,7 @@
})
return dataList;
},
changePmenuId(sId, eId) {
let dict = {};
this.xmMenus.forEach(d => {
dict[d.menuId] = d.pmenuId || '';
});
if (!dict[eId]) {
this.xmMenus.find(d => {
if (d.menuId === sId) {
d.pmenuId = eId;
console.log('更新关系1');
this.fieldChange(d,'pmenuId',true);
}
})
} else {
const isSynezesis = this.judgePmenuId(dict, sId, dict[eId]);
if (!isSynezesis) {
this.xmMenus.find(d => {
if (d.menuId === sId) {
d.pmenuId = eId;
console.log('更新关系2');
this.fieldChange(d,'pmenuId',true);
}
})
} else {
console.log('形成闭合回路--拖拽不更新');
}
}
},
/**begin 自定义函数请在下面加**/
translateDataToTree(data2) {
@ -918,66 +688,14 @@
this.$message({ message: "只有产品经理、产品组长能够修改故事", type: 'error'});
return false;
}
this.valueChangeRows=[];
this.batchEditVisible=true;
},
noBatchEdit(){
this.batchEditVisible=false;
if(this.valueChangeRows.length>0){
this.getXmMenus();
}
this.valueChangeRows=[];
},
batchSaveMenu(){
if(!this.roles.some(i=>i.roleid=='productAdmin') && !this.roles.some(i=>i.roleid=='productTeamAdmin')){
this.$message({ message: "只有产品经理、产品组长能够修改故事", type: 'error'});
return false;
}
if(this.valueChangeRows.length==0){
this.$message.success("没有数据被修改");
return
}
batchEditXmMenu(this.valueChangeRows).then(res=>{
var tips=res.data.tips;
if(tips.isOk){
this.valueChangeRows=[]
this.getXmMenus()
}
this.$message({ message: tips.msg, type: tips.isOk?'success':'error'});
});
},
fieldChange:function(row,fieldName,nextReplace){
console.log('fieldChange--row==', row);
if(nextReplace){
row.nextReplace=nextReplace
}
if(row.opType){
var index=this.valueChangeRows.findIndex(i=>i.menuId==row.menuId);
if(index>=0){
this.valueChangeRows.splice(index,1);
this.valueChangeRows.push(row)
}else{
this.valueChangeRows.push(row)
}
}else{
var oneRow=this.valueChangeRows.find(i=>i.menuId==row.menuId);
if( oneRow ){
if(oneRow.nextReplace){
var index=this.valueChangeRows.findIndex(i=>i.menuId==row.menuId);
this.valueChangeRows.splice(index,1);
this.valueChangeRows.push(row)
}else{
return;
}
}else{
this.valueChangeRows.push(row)
}
}
},
showTaskList(row){
if(!this.roles.some(i=>i.roleid=='productAdmin') && !this.roles.some(i=>i.roleid=='productTeamAdmin')){
@ -1033,57 +751,7 @@
this.editForm=row
this.taskListForMenuVisible=true
},
/**end 自定义函数请在上面加**/
handlePopover:function(row,opType){
if('add'==opType){
var subRow=JSON.parse(JSON.stringify(this.addForm));
subRow.pmenuId=null
subRow.menuId=sn();
subRow.seqNo="1"
subRow.opType=opType
subRow.productId=this.filters.product.id
subRow.productName=this.filters.product.productName
this.fieldChange(subRow,'seqNo');
this.xmMenus.unshift(subRow);
}else if('addSub'==opType){
var subRow=JSON.parse(JSON.stringify(row));
subRow.children=[];
subRow.pmenuId=row.menuId
subRow.menuId=sn();
subRow.seqNo=row.seqNo+".1"
subRow.opType=opType
this.fieldChange(subRow,'seqNo');
this.xmMenus.unshift(subRow);
}else if('delete'==opType){
if(row.opType && (row.opType=='addSub' || row.opType=='add')){
if(row.children && row.children.length>0){
this.$message.error("请先删除子元素");
return;
}else{
var index=this.xmMenus.findIndex(i=>i.menuId==row.menuId)
var indexValueChanges=this.valueChangeRows.findIndex(i=>i.menuId==row.menuId)
this.valueChangeRows.splice(indexValueChanges,1);
this.xmMenus.splice(index,1);
}
}else{
this.$message.error("只能删除未保存的行");
return;
}
} else if ('highestPmenuId' === opType) {
if (row.pmenuId) {
this.xmMenus.find(d => {
if (d.menuId === row.menuId) {
d.pmenuId = '';
this.fieldChange(d,'seqNo', true);
}
});
}
}
},
loadTasksToXmMenuState: function () {
this.load.edit=true;
if(!this.filters.product){
@ -1104,21 +772,6 @@
this.editForm=row
this.userSelectVisible=true;
},
onUserSelected(users){
if(users && users.length>0){
this.editForm.mmUserid=users[0].userid
this.editForm.mmUsername=users[0].username
this.fieldChange(this.editForm,"mmUsername");
}
this.userSelectVisible=false
},
clearPmUser:function(row){
this.editForm=row
row.mmUserid=''
row.mmUsername=''
this.fieldChange(row,"mmUsername");
},
clearFiltersMmUser:function(){
this.filters.mmUser=null;
this.searchXmMenus();
@ -1141,7 +794,7 @@
this.searchXmMenus();
},
toSelectProduct(){
this.filters.product=null;
this.productVisible=true;
}
},//end methods
components: {
@ -1155,29 +808,20 @@
XmTaskListForMenu,
XmIterationMng,
UsersSelect,
XmMenuMngBatch,
//
},
mounted() {
this.$nextTick(() => {
var subHeight=350/1000 * window.innerHeight
if(this.selProject){
subHeight=400/1000 * window.innerHeight
}
this.tableHeight = window.innerHeight - subHeight
let self = this;
window.onresize = function() {
self.tableHeight = window.innerHeight - subHeight;
if(this.filters.product==null){
this.productVisible=true;
}
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.getXmMenus();
});
//
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
this.rowDrop();
}
}
@ -1189,19 +833,5 @@
text-align:center;
float:left;
padding-top:5px;
}
.el-table{
box-sizing: border-box;
/deep/ .cell {
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
word-break: break-all;
line-height: 23px;
padding-right: 10px;
display: flex;
}
}
</style>

1126
src/views/xm/core/xmMenu/XmMenuMngBatch.vue
File diff suppressed because it is too large
View File

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

@ -96,19 +96,19 @@
<el-table ref="table" :max-height="tableHeight" :data="xmProducts" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="55"></el-table-column>
<el-table-column sortable type="index" width="55"></el-table-column>
<el-table-column prop="productName" label="产品名称" min-width="150" >
<el-table-column prop="productName" label="产品名称" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.id}}&nbsp;&nbsp;<el-link type="primary" @click="showEdit(scope.row)">{{scope.row.productName}}</el-link>
<span>{{scope.row.id}}&nbsp;&nbsp;<el-link type="primary" @click="showEdit(scope.row)">{{scope.row.productName}}</el-link></span>
</template>
</el-table-column>
<el-table-column prop="finishRate" label="进度" width="80" >
<el-table-column prop="finishRate" label="进度" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.finishRate}}%
</template>
</el-table-column>
<el-table-column prop="pmUsername" label="产品经理" width="100" ></el-table-column>
<el-table-column prop="planWorkload" label="预计工作量.人时" width="150" ></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量.人时" width="150" ></el-table-column>
<el-table-column prop="pmUsername" label="产品经理" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="planWorkload" label="预计工作量.人时" width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="actWorkload" label="实际工作量.人时" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope">
<el-button type="primary" @click="toIterationList(scope.row)" icon="el-icon-document">迭代计划</el-button>
@ -471,7 +471,7 @@
mounted() {
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=65/1000 * window.innerHeight;
var subHeight=70/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.getXmProducts();
});

4
src/views/xm/core/xmProduct/XmProductSelect.vue

@ -68,7 +68,7 @@
</el-popover>
</template>
<template slot-scope="scope">
{{scope.row.id}}&nbsp;&nbsp;<el-link type="primary">{{scope.row.productName}}</el-link>
<font>{{scope.row.id}}&nbsp;&nbsp;<el-link type="primary">{{scope.row.productName}}</el-link></font>
</template>
</el-table-column>
<el-table-column v-if="isSelectProduct==true" label="操作" width="100" fixed="right" >
@ -280,7 +280,7 @@
mounted() {
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=65/1000 * window.innerHeight;
var subHeight=70/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.getXmProducts();
});

10
src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue

@ -52,21 +52,21 @@
<!--列表 XmProjectPhase xm_project_phase-->
<el-table ref="table" :max-height="tableHeight" v-show="!gstcVisible " default-expand-all :data="projectPhaseTreeData" :summary-method="getSummariesForNoBatchEdit" :show-summary="true" row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column prop="phaseName" label="阶段名称" min-width="150" >
<el-table-column prop="phaseName" label="阶段名称" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.seqNo}} &nbsp;&nbsp;<el-link type="primary" @click="showEdit(scope.row)"> {{scope.row.phaseName}}</el-link>
<span>{{scope.row.seqNo}} &nbsp;&nbsp;<el-link type="primary" @click="showEdit(scope.row)"> {{scope.row.phaseName}}</el-link></span>
</template>
</el-table-column>
<el-table-column prop="mngUsername" label="责任人" width="80" >
<el-table-column prop="mngUsername" label="责任人" width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" v-if="!scope.row.mngUserid" v-model="scope.row.mngUsername" @click="groupUserSelectVisible=true" icon="el-icon-setting">去设置</el-button>
<el-link v-else type="primary" @click="groupUserSelectVisible=true">{{scope.row.mngUsername}}</el-link>
</template>
</el-table-column>
<el-table-column prop="beginDate" label="起止时间" min-width="120" >
<el-table-column prop="beginDate" label="起止时间" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<font class="hidden-md-and-down" >{{formatDate(scope.row.beginDate)}}<br>{{formatDate(scope.row.endDate)}} </font>
<div v-for="item in [calcTaskStateByTime(scope.row.beginDate,scope.row.endDate,scope.row.actRate,scope.phaseStatus)]" :key="item.status"><el-tag :type="item.status">{{item.remark}}</el-tag></div>
<font v-for="item in [calcTaskStateByTime(scope.row.beginDate,scope.row.endDate,scope.row.actRate,scope.phaseStatus)]" :key="item.status"><el-tag :type="item.status">{{item.remark}}</el-tag></font>
</template>
</el-table-column>
<el-table-column prop="actRate" label="进度.状态" width="100">

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

@ -49,13 +49,13 @@
:max-height="tableHeight"
>
<el-table-column v-show="isMultiSelect" reserve-selection sortable width="70" type="selection"></el-table-column>
<el-table-column prop="name" label="任务名称" min-width="260" >
<el-table-column prop="name" label="任务名称" min-width="260" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.sortLevel}}&nbsp;{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="menuName" min-width="150" label="故事"></el-table-column>
<el-table-column prop="startTime" label="任务起止时间" min-width="260">
<el-table-column prop="menuName" min-width="150" label="故事" show-overflow-tooltip></el-table-column>
<el-table-column prop="startTime" label="任务起止时间" min-width="260" show-overflow-tooltip>
<template slot-scope="scope">
<div style="display:flex;align-items:center;">

10
src/views/xm/core/xmTask/XmTaskListForMenu.vue

@ -24,13 +24,13 @@
ref="table"
>
<el-table-column v-show="isMultiSelect" sortable width="60" type="selection"></el-table-column>
<el-table-column prop="name" label="任务名称" min-width="260" >
<el-table-column prop="name" label="任务名称" min-width="260" show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.sortLevel}}&nbsp;{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="menuName" label="故事名" min-width="160" > </el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="160" >
<el-table-column prop="menuName" label="故事名" min-width="160" show-overflow-tooltip> </el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="160" show-overflow-tooltip>
</el-table-column>
<el-table-column label="预算" prop="budgetCost" width="120" >
@ -47,7 +47,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="startTime" label="任务起止时间" width="300">
<el-table-column prop="startTime" label="任务起止时间" width="300" show-overflow-tooltip>
<template slot-scope="scope">
<div style="display:flex;align-items:center;">
@ -70,7 +70,7 @@
<el-table-column label="结算方案" prop="settleSchemel" width="120" :formatter="formatterOption">
</el-table-column>
-->
<el-table-column label="任务技能需求" prop="taskSkillNames" min-width="120" >
<el-table-column label="任务技能需求" prop="taskSkillNames" min-width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column v-if="isMultiSelect==false" header-align="center" label="操作" fixed="right" width="100">
<template slot-scope="scope">

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

@ -1907,4 +1907,5 @@ small{
}
</style>
<style lang="scss" scoped>
</style>

4
src/views/xm/core/xmTask/XmTaskMngBatch.vue

@ -1,8 +1,8 @@
<template>
<section>
<el-row class="xm-task" >
<el-row>
<el-row class="el-menu-demo" style="padding-top:10px;" v-if="projectPhase">
<el-row style="padding-top:10px;" v-if="projectPhase">
<span style="margin-left:10px;font-size:14px;">阶段总预算</span><el-tag type='success'> {{((projectPhase.phaseBudgetNouserAt+projectPhase.phaseBudgetInnerUserAt+projectPhase.phaseBudgetOutUserAt)/10000).toFixed(2)}}{{(taskBudgetData.surplusPhaseBudgetCostAt/10000).toFixed(2)}}</el-tag>
<span style="margin-left:10px;font-size:14px;">非人力总预算</span><el-tag :type="taskBudgetData.surplusPhaseBudgetNouserAt>0?'warning':'danger'">{{(projectPhase.phaseBudgetNouserAt/10000).toFixed(2)}}{{(taskBudgetData.surplusPhaseBudgetNouserAt/10000).toFixed(2)}}</el-tag>
<span style="margin-left:10px;font-size:14px;">内部人力总预算</span><el-tag :type="taskBudgetData.surplusPhaseBudgetInnerUserAt>0?'warning':'danger'">{{(projectPhase.phaseBudgetInnerUserAt/10000).toFixed(2)}}{{(taskBudgetData.surplusPhaseBudgetInnerUserAt/10000).toFixed(2)}}</el-tag>

Loading…
Cancel
Save