diff --git a/src/common/js/treeTool.js b/src/common/js/treeTool.js
index db574163..394d0f1d 100644
--- a/src/common/js/treeTool.js
+++ b/src/common/js/treeTool.js
@@ -1,7 +1,7 @@
export default {
- reloadChildren: function(table,maps, parentId,parentIdName,loadChildren) {
+ reloadAllChildren: function(table,maps, parentId,parentIdName,loadChildren) {
var lazyTreeNodeMap=table.store.states.lazyTreeNodeMap
if (maps.get(parentId)) {
const { tree, treeNode, resolve } = maps.get(parentId)
@@ -11,12 +11,54 @@ export default {
if (tree[parentIdName]) { // 若存在爷爷结点,则执行爷爷节点加载子级操作,防止最后一个子节点被删除后父节点不显示删除按钮
const a = maps.get(tree[parentIdName])
if(a && a.tree){
- this.reloadChildren(table,maps,tree[parentIdName],parentIdName,loadChildren)
+ this.reloadAllChildren(table,maps,tree[parentIdName],parentIdName,loadChildren)
}
}
}
}
},
+
+ reloadChildrenByCount_:function(table,maps, parentId,parentIdName,loadChildren,toCount,currCount){
+ var lazyTreeNodeMap=table.store.states.lazyTreeNodeMap
+ if (maps.get(parentId)) {
+ const { tree, treeNode, resolve } = maps.get(parentId)
+ lazyTreeNodeMap[parentId]=[]
+ if (tree) { // 重新执行父节点加载子级操作
+ loadChildren(tree, treeNode, resolve)
+ if(toCount==currCount+1){
+ return;
+ }
+ currCount=currCount+1;
+ if (tree[parentIdName]) { // 若存在爷爷结点,则执行爷爷节点加载子级操作,防止最后一个子节点被删除后父节点不显示删除按钮
+ const a = maps.get(tree[parentIdName])
+ if(a && a.tree){
+ this.reloadChildrenByCount_(table,maps,tree[parentIdName],parentIdName,loadChildren,toCount,currCount)
+ }
+ }
+ }
+ }
+ },
+
+ reloadChildren: function(table,maps, parentId,parentIdName,loadChildren,toCount) {
+ if(!toCount){
+ this.reloadAllChildren(table,maps, parentId,parentIdName,loadChildren)
+ }else{
+ this.reloadParentByCount_(table,maps,parentId,parentIdName,loadChildren,toCount,0)
+ }
+
+ },
+ reloadChildrenByOpType: function(table,maps, parentId,parentIdName,loadChildren,opType) {
+ var lazyTreeNodeMap=table.store.states.lazyTreeNodeMap
+ if (maps.get(parentId)) {
+ const { tree, treeNode, resolve } = maps.get(parentId)
+ if (tree) { // 重新执行父节点加载子级操作
+ var oldDatas=lazyTreeNodeMap[parentId]
+ lazyTreeNodeMap[parentId]=[]
+ loadChildren(tree, treeNode, resolve,oldDatas,opType)
+ }
+ }
+
+ },
/**
* 将类表数据转换为如下树状结构的数据
* {
@@ -65,7 +107,8 @@ export default {
let temp = JSON.parse(JSON.stringify(children))
temp.splice(index, 1)
translator([current], temp)
- typeof parent.children !== 'undefined' ? parent.children.push(current) : parent.children = [current]
+ typeof parent.children !== 'undefined' && parent.children ? parent.children.push(current) : parent.children = [current]
+ parent.childrenCnt=parent.children.length
}
}
)
diff --git a/src/views/xm/core/xmTask/XmTaskMngBatch.vue b/src/views/xm/core/xmTask/XmTaskMngBatch.vue
index 4a607230..2690f8d9 100644
--- a/src/views/xm/core/xmTask/XmTaskMngBatch.vue
+++ b/src/views/xm/core/xmTask/XmTaskMngBatch.vue
@@ -1,1401 +1,1781 @@
-
-
-
- 保存
-
-
- 返回
-
- 计划总预算: {{((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)}}万
-
-
-
-
-
-
-
-
-
-
-
-
成为顶级节点
-
删除当前行
-
增加子行
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 保存
+
+
+ 返回
+
+ 计划总预算:
+ {{
+ (
+ (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)
+ }}万
+
+
+
+
+
+
+
+
+
+
+
成为顶级节点
+
删除当前行
+
增加子行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+