|
@@ -9,6 +9,7 @@
|
|
|
placeholder="输入关键字进行过滤"
|
|
|
v-model="filterText"
|
|
|
@input="filterChange"
|
|
|
+ clearable
|
|
|
></el-input>
|
|
|
<!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
|
|
|
</div>
|
|
@@ -49,6 +50,7 @@
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(1,data,node)"
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
+ v-if="data.deptCategory != 6 && data.isExistForm != 1"
|
|
|
>新增子级</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(2,data,node)"
|
|
@@ -58,6 +60,11 @@
|
|
|
@click.native="setLeftType(3,data,node)"
|
|
|
icon="el-icon-document-copy"
|
|
|
>复制节点</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="deleNode(data,node)"
|
|
|
+ icon="el-icon-close"
|
|
|
+ v-if="node.level !=1"
|
|
|
+ >删除节点</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(4,data,node)"
|
|
|
icon="iconfont hcicon-danganziliao-biaogetianxie"
|
|
@@ -119,6 +126,7 @@
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(1,data,node)"
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
+ v-if="data.deptCategory != 6 && data.isExistForm != 1"
|
|
|
>新增子级</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(2,data,node)"
|
|
@@ -128,6 +136,11 @@
|
|
|
@click.native="setLeftType(3,data,node)"
|
|
|
icon="el-icon-document-copy"
|
|
|
>复制节点</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="deleNode(data,node)"
|
|
|
+ icon="el-icon-close"
|
|
|
+ v-if="node.level !=1"
|
|
|
+ >删除节点</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
@click.native="setLeftType(4,data,node)"
|
|
|
icon="iconfont hcicon-danganziliao-biaogetianxie"
|
|
@@ -1345,7 +1358,7 @@ import {
|
|
|
saveElement, remove as removeElement, updateBatchElements, getTemplate,
|
|
|
importWbsElement
|
|
|
} from "@/api/manager/wbsformelement";
|
|
|
-import { getLazytree, getDetail, update, findNodeTableByCondition as selectByNodeTable, removeTableByCondition as removeTableById } from "@/api/manager/wbsprivate";
|
|
|
+import { getLazytree, getDetail, update, findNodeTableByCondition as selectByNodeTable, removeTableByCondition as removeTableById ,removePrivateTreeNode} from "@/api/manager/wbsprivate";
|
|
|
import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
|
|
|
import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
|
|
|
import { getDictionary } from "@/api/system/dict";
|
|
@@ -1674,6 +1687,24 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ deleNode (data, node) {
|
|
|
+ this.$confirm('此操作将删除节点【' + data.title + '】, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ removePrivateTreeNode(data.primaryKeyId).then(() => {
|
|
|
+ this.$refs.tree.remove(node);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
importHandle () {
|
|
|
|
|
|
},
|