|
@@ -227,29 +227,35 @@ const treeMenuTap = ({ key, node, data, keys }) => {
|
|
|
getTreeNodeDetail(data)
|
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
TreeAutoExpandKeys.value = keys || []
|
|
|
- if (key === 'add') {
|
|
|
- treeModalShow.value = true
|
|
|
- }
|
|
|
- if (key === 'edit') {
|
|
|
- editModalShow.value = true
|
|
|
- }
|
|
|
- if (key === 'sort') {
|
|
|
- let nodes = [], childNodes = []
|
|
|
- childNodes = node?.parent?.childNodes || node?.parent?.children || []
|
|
|
-
|
|
|
- for (let i = 0; i < childNodes.length; i++) {
|
|
|
- const res = childNodes[i]?.data
|
|
|
- nodes.push({
|
|
|
- nodeName:res?.nodeName,
|
|
|
- id:res?.id,
|
|
|
- })
|
|
|
+ if (data?.isLock !== 1) {
|
|
|
+ if (key === 'add') {
|
|
|
+ treeModalShow.value = true
|
|
|
+ }
|
|
|
+ if (key === 'edit') {
|
|
|
+ editModalShow.value = true
|
|
|
+ }
|
|
|
+ if (key === 'sort') {
|
|
|
+ let nodes = [], childNodes = []
|
|
|
+ childNodes = node?.parent?.childNodes || node?.parent?.children || []
|
|
|
+
|
|
|
+ for (let i = 0; i < childNodes.length; i++) {
|
|
|
+ const res = childNodes[i]?.data
|
|
|
+ nodes.push({
|
|
|
+ nodeName:res?.nodeName,
|
|
|
+ id:res?.id,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ sortTableData.value = nodes
|
|
|
+ sortModalShow.value = true
|
|
|
+ }
|
|
|
+ if (key === 'del') {
|
|
|
+ delModalClick()
|
|
|
}
|
|
|
- sortTableData.value = nodes
|
|
|
- sortModalShow.value = true
|
|
|
}
|
|
|
- if (key === 'del') {
|
|
|
- delModalClick()
|
|
|
+ if (data?.isLock === 1 && key !== 'lock') {
|
|
|
+ window.$message.warning('当前节点为锁定状态,不允许操作')
|
|
|
}
|
|
|
+
|
|
|
if (key === 'lock') {
|
|
|
handleLockNode()
|
|
|
}
|