NEZ-2505 fix:发送文本到所有窗口bug

This commit is contained in:
zhangyu
2023-01-11 11:24:56 +08:00
parent b5c0fccdf6
commit ae07979e90
3 changed files with 8 additions and 8 deletions

View File

@@ -276,8 +276,8 @@ export default {
},
enterStr (message) {
if (this.terminalSocket && this.terminal.isLogin) {
this.terminalSocket.send(message)
this.terminalSocket.send('\n')
this.term.send(message)
this.term.send('\n')
this.term.scrollToBottom()
this.historyChange(message)
}

View File

@@ -94,10 +94,10 @@ export default {
const data = JSON.parse(e.data)
self.$get('asset/asset/' + data.id).then(res => {
const asset = res.data
self.$refs.websshNew.addConsole(asset.id, asset.manageIp, '', '', 'asset')
self.$refs.websshNew.addConsole(asset.id, asset.manageIp, '', '', 'asset', asset)
})
} catch (e) {
// console.log(e)
console.log(e)
}
}
})

View File

@@ -654,7 +654,7 @@ export default {
terminal.userName = res.data.authUsername + '@' + res.data.host
terminal.host = res.data.host
if (id) {
console.terminal.terminalType = asset.type.authProtocol
console.terminal.terminalType = asset ? asset.type.authProtocol : console.terminal.terminalType
console.terminal.username = ''
this.editableTabsValue = newTabName
this.editableTabs.push(console)
@@ -689,7 +689,7 @@ export default {
console.name = newTabName
console.terminal.name = newTabName
console.terminal.isLogin = false
this.editableTabs.push(console)
this.addConsole(item.terminal.assetId, item.terminal.host, '', '', 'asset')
} else {
this.customConnect = {
...item.terminal.custom,