diff --git a/src/views/xm/core/xmProject/XmProjectInfo.vue b/src/views/xm/core/xmProject/XmProjectInfo.vue
index b1711396..d0f349fa 100644
--- a/src/views/xm/core/xmProject/XmProjectInfo.vue
+++ b/src/views/xm/core/xmProject/XmProjectInfo.vue
@@ -22,11 +22,19 @@
-
+
+
论坛
即聊
客服
- 导出
+ 导出
+
+
@@ -410,7 +418,7 @@
}
.info-type{
background: #fafbfc;
- border-bottom: 1px solid #efefef;
+ border-bottom: 1px solid #efefef;
}
.info-type>div{
padding-left: 10px;
diff --git a/src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue b/src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue
index 05c047f1..481951c9 100644
--- a/src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue
+++ b/src/views/xm/core/xmProjectPhase/XmProjectPhaseMng.vue
@@ -29,7 +29,7 @@
- 阶段名称 {{editForm.seqNo}} {{editForm.phaseName}}
+ 阶段名称 {{editForm.seqNo}} {{editForm.phaseName}}
{{scope.row.seqNo}} {{scope.row.phaseName}}
diff --git a/src/views/xm/core/xmTask/XmTaskMng.vue b/src/views/xm/core/xmTask/XmTaskMng.vue
index 394fbbfb..7e09f91a 100644
--- a/src/views/xm/core/xmTask/XmTaskMng.vue
+++ b/src/views/xm/core/xmTask/XmTaskMng.vue
@@ -1,295 +1,188 @@
-
-
-
-
-
-
-
-
- 阶段总预算: {{((projectPhase.phaseBudgetNouserAt+projectPhase.phaseBudgetInnerUserAt+projectPhase.phaseBudgetOutUserAt)/10000).toFixed(2)}}万,剩{{(taskBudgetData.surplusPhaseBudgetCostAt/10000).toFixed(2)}}万
- 非人力总预算:{{(projectPhase.phaseBudgetNouserAt/10000).toFixed(2)}}万,剩{{(taskBudgetData.surplusPhaseBudgetNouserAt/10000).toFixed(2)}}万
- 内部人力总预算:{{(projectPhase.phaseBudgetInnerUserAt/10000).toFixed(2)}}万,剩{{(taskBudgetData.surplusPhaseBudgetInnerUserAt/10000).toFixed(2)}}万
- 外购人力总预算:{{(projectPhase.phaseBudgetOutUserAt/10000).toFixed(2)}}万,剩{{(taskBudgetData.surplusPhaseBudgetOutUserAt/10000).toFixed(2)}}万
-
-
-
-
-
-
-
-
-
- {{scope.row.sortLevel}} {{scope.row.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.sortLevel}} {{scope.row.name}}
+
+
+
+
-
-
-
-
-
- 项目
-
-
- {{scope.row.projectName}}
-
-
-
-
- {{scope.row.menuName?scope.row.menuName:'去关联故事'}}
-
-
-
-
- {{parseFloat(scope.row.budgetCost/10000).toFixed(2)}}万,{{scope.row.budgetWorkload}}人时
-
-
-
-
- {{scope.row.exeUsernames}}
- 去抢任务
-
-
-
-
-
- {{ (scope.row.rate!=null?scope.row.rate:0)+'%'}}
-
-
-
-
-
-
-
+
+ 项目
+
+
+ {{scope.row.projectName}}
+
+
+
+
+ {{scope.row.menuName?scope.row.menuName:'去关联故事'}}
+
+
+
+
+ {{parseFloat(scope.row.budgetCost/10000).toFixed(2)}}万,{{scope.row.budgetWorkload}}人时
+
+
+
+
+ {{scope.row.exeUsernames}}
+ 去抢任务
+
+
+
+
-
{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}
-
-
- {{calcTaskStateByTime(scope.row.startTime,scope.row.endTime)}}
+ {{ (scope.row.rate!=null?scope.row.rate:0)+'%'}}
-
-
-
-
-
-
-
- {{scope.row.taskSkillNames}}
- 去补充
-
-
-
-
-
-
-
-
- 更多
-
-
- +子任务
- +从模板批量导入子任务
- +由故事创建子任务
-
- 明细
- 编辑
- 执行人管理
- 技能管理
- 取关
- 关注
- 讨论
- 日志
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
成为顶级节点
-
删除当前行
-
增加子行
+
+
+
+
+
+
+
+
{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}
+
+
+ {{calcTaskStateByTime(scope.row.startTime,scope.row.endTime)}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{scope.row.taskSkillNames}}
+ 去补充
+
+
+
+
+
+
+
+
+ 更多
+
+
+ +子任务
+ +从模板批量导入子任务
+ +由故事创建子任务
+
+ 明细
+ 编辑
+ 执行人管理
+ 技能管理
+ 取关
+ 关注
+ 讨论
+ 日志
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
-
{
- var index = xmTasks.findIndex(i=>i.id==c.id);
- const oldRow = JSON.parse(JSON.stringify(xmTasks[index]));
- xmTasks.splice(index,1);
- c.parentTaskid = oldRow.parentTaskid;
- xmTasks.push(c);
- })
- }
-
- const tasksTreeData = this.translateDataToTree(xmTasks);
- if (this.batchEditVisible) {
- this.rowDrop();
- }
+ let xmTasks = JSON.parse(JSON.stringify(this.xmTasks || []));
+ if (this.valueChangeRows && this.valueChangeRows.length) {
+ this.valueChangeRows.forEach(c => {
+ var index = xmTasks.findIndex(i=>i.id==c.id);
+ const oldRow = JSON.parse(JSON.stringify(xmTasks[index]));
+ xmTasks.splice(index,1);
+ c.parentTaskid = oldRow.parentTaskid;
+ xmTasks.push(c);
+ })
+ }
+
+ const tasksTreeData = this.translateDataToTree(xmTasks);
return tasksTreeData;
},
@@ -1292,57 +1183,12 @@
return ;
}
this.batchEditVisible=true
- },
- saveBatchEdit:function(){
- if( !this.roles.some(i=>i.roleid=='projectAdmin') && !this.roles.some(i=>i.roleid=='teamAdmin')){
- this.$message.error("只有项目经理、小组长可以操作");
- return;
- }
- console.log(JSON.stringify(this.taskBudgetData))
- if(this.valueChangeRows.length==0){
- this.$message({ message:"没有改变任何数据,无需保存", type: 'success'});
- return;
- }else {
- if(this.taskBudgetData.surplusPhaseBudgetInnerUserAt<0){
- this.$message({ message:"内部人力预算不足,请调整", type: 'error'});
- return;
- }
- if(this.taskBudgetData.surplusPhaseBudgetOutUserAt<0){
- this.$message({ message:"外购人力预算不足,请调整", type: 'error'});
- return;
- }
- if(this.taskBudgetData.surplusPhaseBudgetNouserAt<0){
- this.$message({ message:"非人力预算不足请调整",type: 'error'});
- return;
- }
-
- this.load.edit=true;
- batchSaveBudget(this.valueChangeRows).then(res=>{
- this.load.edit=false;
- var tips =res.data.tips;
- if(tips.isOk){
- this.valueChangeRows=[]
- this.getXmTasks();
- }
- this.$message({ message: tips.msg, type: tips.isOk?'success':'error'});
-
- }).catch(e=>this.load.edit=false);
- }
-
- },
- noBatchEdit(){
- this.batchEditVisible=false;
- if(this.valueChangeRows.length>0){
- this.valueChangeRows=[];
- this.getXmTasks()
- }
-
- },
+ },
fieldChange:function(row,fieldName, nextReplace){
- if(nextReplace) {
- row.nextReplace = nextReplace;
- }
- console.log('fieldChange--row.opType==', row.opType);
+ if(nextReplace) {
+ row.nextReplace = nextReplace;
+ }
+ console.log('fieldChange--row.opType==', row.opType);
if(fieldName=='startTime' || fieldName=='endTime'){
if(row.startTime && row.endTime){
@@ -1562,148 +1408,7 @@
clearProject(){
this.filters.selProject=null;
this.getXmTasks()
- },
- // 行拖拽
- rowDrop() {
- console.log('rowDrop===');
-
- const _this = this
- // 被拖动的元素的索引
- let dragged = null;
- // 被拖动的元素的索引
- let draggedIndex = -1;
-
- // 目标元素
- let target = document.querySelector('.drag-table2 .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, -1表示还在table内
-
- 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 startId = _this.$refs['task_'+draggedIndex].dataset.taskId;
- const endId = _this.$refs['task_'+dragIndex].dataset.taskId;
-
- 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 为字典;sId拖拽到menuId; ePmeuId 是放置位置的祖先 menuId;
judgePmenuId(dict, sId, ePmeuId) {
@@ -1744,6 +1449,12 @@
}
}
},
+ batchEditBack:function(needReload){
+ if(needReload==true){
+ this.searchXmTasks();
+ }
+ this.batchEditVisible=false;
+ }
/**end 自定义函数请在上面加**/
},//end methods
@@ -1754,7 +1465,7 @@
xmSkillMng,
skillMng,
xmProjectPhaseMng,
- xmTaskTemplateMng, XmProjectList,xmExchangeMng,xmMenuSelect,XmMenuRichDetail,XmGantt
+ xmTaskTemplateMng, XmProjectList,xmExchangeMng,xmMenuSelect,XmMenuRichDetail,XmGantt,XmTaskMngBatch
//在下面添加其它组件
},
mounted() {
@@ -1773,13 +1484,7 @@
,{categoryId:'all',itemCode:'priority'}]).then(res=>{
this.options=res.data.data;
})
- });
- // 阻止默认行为
- document.body.ondrop = function (event) {
- event.preventDefault();
- event.stopPropagation();
- };
- this.rowDrop();
+ });
}
}
diff --git a/src/views/xm/core/xmTask/XmTaskMngBatch.vue b/src/views/xm/core/xmTask/XmTaskMngBatch.vue
new file mode 100644
index 00000000..afdde3af
--- /dev/null
+++ b/src/views/xm/core/xmTask/XmTaskMngBatch.vue
@@ -0,0 +1,1412 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
成为顶级节点
+
删除当前行
+
增加子行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file