mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 15:52:32 +00:00
Merge branch 'dev' of github.com:jumpserver/lina into dev
This commit is contained in:
@@ -209,6 +209,7 @@ export default {
|
|||||||
if (!parentNode) {
|
if (!parentNode) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.zTree.expandNode(parentNode, true, false, true, false)
|
||||||
// http://localhost/api/v1/assets/nodes/85aa4ee2-0bd9-41db-9079-aa3646448d0c/children/
|
// http://localhost/api/v1/assets/nodes/85aa4ee2-0bd9-41db-9079-aa3646448d0c/children/
|
||||||
const url = `${this.treeSetting.nodeUrl}${parentNode.meta.node.id}/children/`
|
const url = `${this.treeSetting.nodeUrl}${parentNode.meta.node.id}/children/`
|
||||||
this.$axios.post(url, {}).then(data => {
|
this.$axios.post(url, {}).then(data => {
|
||||||
|
@@ -130,11 +130,7 @@ export default {
|
|||||||
items.map(v => {
|
items.map(v => {
|
||||||
newData.push(v.value)
|
newData.push(v.value)
|
||||||
})
|
})
|
||||||
return this.$axios.patch(relationUrl, { nodes: newData }).then(res => {
|
return this.$axios.patch(relationUrl, { nodes: newData })
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const itemId = item.value
|
const itemId = item.value
|
||||||
@@ -146,11 +142,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const relationUrl = `/api/v1/assets/assets/${this.object.id}/`
|
const relationUrl = `/api/v1/assets/assets/${this.object.id}/`
|
||||||
return this.$axios.patch(relationUrl, { nodes: newData }).then(res => {
|
return this.$axios.patch(relationUrl, { nodes: newData })
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
labelConfig: {
|
labelConfig: {
|
||||||
|
@@ -55,11 +55,7 @@ export default {
|
|||||||
items.map(v => {
|
items.map(v => {
|
||||||
newData.push(v.value)
|
newData.push(v.value)
|
||||||
})
|
})
|
||||||
return this.$axios.patch(relationUrl, { system_users: newData }).then(res => {
|
return this.$axios.patch(relationUrl, { system_users: newData })
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const itemId = item.value
|
const itemId = item.value
|
||||||
@@ -71,11 +67,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const relationUrl = `/api/v1/assets/cmd-filters/${this.object.id}/`
|
const relationUrl = `/api/v1/assets/cmd-filters/${this.object.id}/`
|
||||||
return this.$axios.patch(relationUrl, { system_users: newData }).then(res => {
|
return this.$axios.patch(relationUrl, { system_users: newData })
|
||||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -127,21 +127,13 @@ export default {
|
|||||||
node: v.value
|
node: v.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return this.$axios.post(relationUrl, data).then(res => {
|
return this.$axios.post(relationUrl, data)
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const itemId = item.value
|
const itemId = item.value
|
||||||
const objectId = this.object.id
|
const objectId = this.object.id
|
||||||
const relationUrl = `/api/v1/assets/system-users-nodes-relations/?systemuser=${objectId}&node=${itemId}`
|
const relationUrl = `/api/v1/assets/system-users-nodes-relations/?systemuser=${objectId}&node=${itemId}`
|
||||||
return this.$axios.delete(relationUrl).then(res => {
|
return this.$axios.delete(relationUrl)
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user