Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3fbf43870 | ||
|
|
0acbe3b9d1 | ||
|
|
5627b466bf | ||
|
|
bc09fd7b6e | ||
|
|
34a9cadc02 | ||
|
|
1eeca994ab | ||
|
|
1ed30f7ebe | ||
|
|
714dd6de29 |
@ -109,7 +109,7 @@
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
"pre-commit": ""
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@ -188,3 +188,36 @@ export function getNetLang(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取网络抓包信息
|
||||
export function getPacketCaptureInfo(data) {
|
||||
return request({
|
||||
url: '/pcap/status',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 开始抓包
|
||||
export function startPacketCapture(data) {
|
||||
return request({
|
||||
url: '/pcap/start',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 停止抓包
|
||||
export function stopPacketCapture(data) {
|
||||
return request({
|
||||
url: '/pcap/stop',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 删除抓包文件
|
||||
export function deletePacketCapture(data) {
|
||||
return request({
|
||||
url: '/pcap/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">
|
||||
<span v-if="item.redirect==='noRedirect'||index === levelList.length - 1" class="no-redirect">
|
||||
{{ generateTitle(item.meta.title) }}
|
||||
</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
|
||||
|
||||
160
src/lang/en.js
160
src/lang/en.js
@ -10,7 +10,7 @@ export default {
|
||||
firmwareUpdate: 'Firmware Update',
|
||||
factorySetting: 'System Management',
|
||||
profile: 'Profile',
|
||||
urlTitle: 'Network Broadcast Terminal',
|
||||
urlTitle: 'IP Speaker',
|
||||
operationLog: 'Operation Log'
|
||||
},
|
||||
navbar: {
|
||||
@ -25,46 +25,47 @@ export default {
|
||||
logIn: 'Login',
|
||||
register: 'Register',
|
||||
logCancel: 'Cancel',
|
||||
username: 'UserName',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
any: 'any',
|
||||
thirdparty: 'Or connect with',
|
||||
thirdpartyTips:
|
||||
'Can not be simulated on local, so please combine you own business simulation! ! !',
|
||||
confirmLogout: 'Confirm Logout',
|
||||
'Can not be simulated on local, so please combine you own business simulation!',
|
||||
confirmLogout: 'Are you sure you want to log out?',
|
||||
loggedOut:
|
||||
'You have been logged out, you can cancel to stay on this page or log in again!',
|
||||
toLogin: 'To Login',
|
||||
changePassword: 'Change Password',
|
||||
changePassword: 'Edit Password',
|
||||
changePasswordTip:
|
||||
'Detected that the password is too weak or has expired. Please modify the password before logging in',
|
||||
'Your password is too weak or has expired. Please change your password and log in again.',
|
||||
changePasswordMsg:
|
||||
'Password expired, please modify the password before logging in!',
|
||||
upDateMsg: 'Firmware is being upgraded, please wait for a while。'
|
||||
'Your password has expired. Please change your password and log in again.',
|
||||
upDateMsg: 'Firmware is being updated, please wait for a while.'
|
||||
},
|
||||
table: {
|
||||
productName: 'Product Name',
|
||||
productMode: 'Product Model',
|
||||
productName: 'Device Name',
|
||||
productMode: 'Device Model',
|
||||
serialNumber: 'Serial Number',
|
||||
firmwareVercion: 'Firmware Version',
|
||||
deviceID: 'Terminal ID',
|
||||
deviceIP: 'Terminal IP',
|
||||
gatewal: 'Gateway',
|
||||
deviceID: 'Device ID',
|
||||
deviceIP: 'IP Address',
|
||||
gatewal: 'Default Gateway',
|
||||
suonetMask: 'Subnet Mask',
|
||||
storageSpaces: 'Storage Spaces',
|
||||
storageSpaces: 'Storage Capacity',
|
||||
serverIP: 'Server IP',
|
||||
corverCommandDort: 'Server Command Port',
|
||||
deviceCommandPort: 'Terminal Command Port',
|
||||
deviceStreamPort: 'Terminal Code Stream Port',
|
||||
corverCommandDort: 'Server Port',
|
||||
deviceCommandPort: 'Command Port',
|
||||
deviceStreamPort: 'Stream Port',
|
||||
macAddress: 'MAC Address',
|
||||
serverPort: 'Server Port',
|
||||
isEmpty: ' cannot be empty',
|
||||
isEmpty: ' cannot be empty.',
|
||||
isRight: ' is invalid.',
|
||||
isRight1: ' is out of range (10000-49999).',
|
||||
isRight2: ' is out of range (1000-9999).',
|
||||
isRight3: ' is out of range (1-9999).',
|
||||
open: 'Enable',
|
||||
close: 'Disable',
|
||||
close1: 'Close',
|
||||
save: 'Save',
|
||||
submit: 'Submit',
|
||||
toTop: 'Back to top',
|
||||
@ -72,33 +73,40 @@ export default {
|
||||
clear: 'Clear Screen',
|
||||
refresh: 'Auto Refresh',
|
||||
update: 'Update',
|
||||
choose: 'Choice',
|
||||
choose: 'Browse',
|
||||
tips: 'Tips',
|
||||
NetworkPacketCapture: 'Network packet capture',
|
||||
CapturingPacket: 'Capturing packets (Max 10 MB) ......',
|
||||
PacketCaptureHasBeenStopped: 'Packet capture is stopped and saved as tcpdump.pcap.',
|
||||
StartPacketCapture: 'Start',
|
||||
StopPacketCapture: 'Stop',
|
||||
Download: 'Download',
|
||||
Delete: 'Delete',
|
||||
factorySettings: 'Restore Factory Settings',
|
||||
routerRestart: 'Reboot The Device',
|
||||
routerRestart: 'Restart',
|
||||
SIPserver: 'SIP Server IP',
|
||||
SIPUserName: 'SIP UserName',
|
||||
SIPPassword: 'SIP PassWord',
|
||||
SIPUserName: 'SIP Username',
|
||||
SIPPassword: 'SIP Password',
|
||||
programTip:
|
||||
'Tip: the total size of uploaded files cannot exceed the capacity of the device storage space!',
|
||||
'Tip: The total size of uploaded files cannot exceed the storage capacity.',
|
||||
firmwareUpdateTip:
|
||||
'Tip: Firmware upgrade can improve equipment performance and functions only when its version matched. If not, the hardware might not be able to work! Please use with caution!',
|
||||
'Tip: Firmware upgrade can only improve device performance and functionality if the firmware version is compatible. Otherwise, the equipment may not work properly! Please use with caution!',
|
||||
factoryTip:
|
||||
'After returning to the factory setting, the configuration of the device will return to the factory state. Please use with caution!',
|
||||
'After restoring factory settings, the device configuration will be restored to its factory state. Please use with caution!',
|
||||
routerRestartTips:
|
||||
'The device is about to reboot. Are you sure to continue!',
|
||||
programDeteleTip: 'Confirm to delete this file!',
|
||||
logDeteleTip: 'Confirm to delete this log!',
|
||||
freeSpace: 'Free Space',
|
||||
'Are you sure you want to restart the device?',
|
||||
programDeteleTip: 'Are you sure you want to delete?',
|
||||
logDeteleTip: 'Are you sure you want to delete?',
|
||||
freeSpace: 'Available Space',
|
||||
chooseFile: 'Upgrade File',
|
||||
microphoneSwitch: 'Microphone Switch',
|
||||
microphoneSwitch: 'Microphone Input',
|
||||
factorySettingsTips:
|
||||
'The default IP address of the device in the factory state is 192.168.1.108. After the restoration, you need to log in again.',
|
||||
'The device\'s default IP address is 192.168.1.108. You will need to log in again after restoring factory settings.', // The baseline version of the LX branch is 192.168.1.101, while the other baseline versions are 192.168.1.108
|
||||
fileUpload: 'File uploading ...',
|
||||
fileSave: 'Saving...',
|
||||
routerRestartIng: 'Device Rebooting...',
|
||||
routerRestartIng: 'Device Restarting ...',
|
||||
upDateTips:
|
||||
'The firmware is being updated, please keep the network connected, do not cut off the power and refresh the web page.',
|
||||
'The firmware is being upgraded, please keep the network connection, power off, and refresh the webpage.',
|
||||
dynamicTips1: 'Fixed header, sorted by header order',
|
||||
dynamicTips2: 'Not fixed header, sorted by click order',
|
||||
dragTips1: 'The default order',
|
||||
@ -135,20 +143,20 @@ export default {
|
||||
upload: 'Upload',
|
||||
fileName: 'Program Name',
|
||||
fileEditTip:
|
||||
'The file name cannot be empty and the file format cannot be modified',
|
||||
fileSizeTip: 'The uploaded file size cannot exceed 5MB!',
|
||||
fileTypeTip: 'The uploaded file can only be in MP3 format!',
|
||||
updateFileTypeTip: 'The uploaded file can only be in Bin format!',
|
||||
fileSurplusSizeTip: 'Insufficient remaining storage space!',
|
||||
upDateTip: 'Please select a file before upgrading!',
|
||||
'The file name cannot be empty and the file format cannot be modified.',
|
||||
fileSizeTip: 'The size of the uploaded file cannot exceed 40MB.',
|
||||
fileTypeTip: 'Only MP3 format files can be uploaded.',
|
||||
updateFileTypeTip: 'The uploaded file can only be in Bin format.',
|
||||
fileSurplusSizeTip: 'Insufficient storage space!',
|
||||
upDateTip: 'Please select a file before upgrading.',
|
||||
audio: 'Audio Format',
|
||||
playStatus: 'Playing status',
|
||||
playStatus: 'Status',
|
||||
|
||||
aoVol: 'Play Volume',
|
||||
aoVol: 'Playback Volume',
|
||||
aiVol: 'Recording Volume',
|
||||
|
||||
auth: 'Authentication',
|
||||
httpAuth: 'Http Authentication',
|
||||
httpAuth: 'HTTP Authentication',
|
||||
|
||||
warningTitle: 'Alarm File',
|
||||
warningFormTitle: 'AlarmIn',
|
||||
@ -164,32 +172,40 @@ export default {
|
||||
slyCode: 'Please login again.', // 401code
|
||||
sleCode: 'Login expired, please login again.', // 402code
|
||||
lllCode: 'The password is too weak, please change it.', // 600code
|
||||
llyCode: 'The firmware is being updated, please wait.', // 601code
|
||||
lleCode: '用户登录名称/密码错误.', // 602code
|
||||
llyCode: 'The firmware is being upgraded, please wait.', // 601code
|
||||
lleCode: 'The username or password is incorrect.', // 602code
|
||||
llsCode: 'Too many failed login attempts, the account has been locked (30 minutes).', // 603code
|
||||
llssCode: 'The account has been logged in elsewhere. Do you want to force logout?.', // 604code
|
||||
lylCode: 'The old password is wrong.', // 610code
|
||||
llssCode: 'The account has been logged in elsewhere. Do you want to force login?', // 604code
|
||||
lylCode: 'The old password is incorrect.', // 610code
|
||||
lyyCode: 'The new password must be different from the old password.', // 611code
|
||||
lelCode: 'The file upload failed because it cannot be played.', // 620code
|
||||
lelCode: 'The file upload failed because it is not a playable MP3 file.', // 620code
|
||||
leyCode: 'The file upload failed because a file with the same name already exists.', // 621code
|
||||
leeCode: 'The file upload failed because of a network failure.', // 622code
|
||||
leeCode: 'The file upload failed because there was a network error.', // 622code
|
||||
lesCode: 'The file does not exist, please refresh.', // 623Code
|
||||
lessCode: 'Failed to rename, please avoid using special characters.', // 624Code
|
||||
lewCode: 'Failed to delete, because the file is playing.', // 625Code
|
||||
|
||||
lslCode: '节目文件开始播放失败,节目已在播放中.', // 630code
|
||||
lsyCode: '节目文件停止播放失败,节目未在播放中.', // 631code
|
||||
lsslCode: 'The firmware update has not started.', // 640code
|
||||
lssyCode: 'The firmware is being updated, please wait.', // 641code
|
||||
lsseCode: 'The firmware update completed, the device will reboot soon.', // 642code
|
||||
lssCode: 'Failed to update the firmware, because the file cannot be parsed.', // 643code
|
||||
lsssCode: 'Failed to update the firmware, because the file version is too low.', // 644code
|
||||
WAN_IP_AddressIP: 'WAN DomainName',
|
||||
WAN_IP_Address: 'WAN IP address',
|
||||
WAN_IP_DomainName: 'WAN domain name',
|
||||
WAN_IP_Type: 'WAN Type',
|
||||
WAN_Port: 'WAN Port',
|
||||
WAN_RTSP_Port: 'WAN RTSP Port'
|
||||
lslCode: 'Failed to start playing, because the file is already playing.', // 630code
|
||||
lsyCode: 'Failed to stop playing, because the file is not playing.', // 631code
|
||||
lsslCode: 'The firmware upgrade has not started.', // 640code
|
||||
lssyCode: 'The firmware is being upgraded, please wait.', // 641code
|
||||
lsseCode: 'The firmware upgrade completed, the device will restart soon.', // 642code
|
||||
lssCode: 'Failed to upgrade the firmware, because the file cannot be parsed.', // 643code
|
||||
lsssCode: 'Failed to upgrade the firmware, because the file version is too low.', // 644code
|
||||
WAN_IP_AddressIP: 'NAT Domain Name',
|
||||
WAN_IP_Address: 'NAT IP Address',
|
||||
WAN_IP_DomainName: 'NAT Domain Name',
|
||||
WAN_IP_Type: 'NAT Type',
|
||||
WAN_Port: 'NAT ONVIF Port',
|
||||
WAN_RTSP_Port: 'NAT RTSP Port',
|
||||
httpPort: 'HTTP API Port',
|
||||
webPort: 'Web Port',
|
||||
rtspPort: 'RTSP Port',
|
||||
rtpPort: 'RTP Port',
|
||||
portConflict: ' Conflict',
|
||||
PortNumbersCannotBeTheSame: 'The ports cannot be the same',
|
||||
SIP_Port:'SIP Port',
|
||||
SIP_RTP_Port:'SIP RTP Port'
|
||||
},
|
||||
theme: {
|
||||
change: 'Change Theme',
|
||||
@ -218,20 +234,20 @@ export default {
|
||||
password2: 'Confirm Password',
|
||||
update: 'Update',
|
||||
oldPassword: 'Please enter your old password!',
|
||||
newPassword: 'Please enter a new password!',
|
||||
newPassword2: 'Please enter the new password again!',
|
||||
passwordDifferent: 'The two password entered is inconsistent!',
|
||||
newPassword: 'Please enter a new password!',
|
||||
newPassword2: 'Please enter the new password again!',
|
||||
passwordDifferent: 'The two password entered is inconsistent!',
|
||||
newAndOldPassword:
|
||||
'Operation exception: the new password is the same as the old password',
|
||||
updatePasswordSuccess: 'User password updated successfully',
|
||||
passwordLengthError: 'Enter a password of at least 8 digits',
|
||||
'Operation exception: the new password is the same as the old password.',
|
||||
updatePasswordSuccess: 'Password updated successfully.',
|
||||
passwordLengthError: 'Enter a password of at least 8 digits.',
|
||||
passwordStrongError:
|
||||
'The Password strength is insufficient. Please ensure that the length is at least 8 digits and at most 16 digits, and must contain at least three of numbers, Minuscule, uppercase letters, and special symbols!',
|
||||
confirmPassword: 'Confirm Password',
|
||||
inputusername: 'Please enter your username!',
|
||||
inputpassword: 'Please enter the password!',
|
||||
inputpassword2: 'Please enter the password again!',
|
||||
registerSuccess: 'User registration successful!',
|
||||
gologin: 'Do you want to login?'
|
||||
inputusername: 'Please enter the username!',
|
||||
inputpassword: 'Please enter the password!',
|
||||
inputpassword2: 'Please enter the password again!',
|
||||
registerSuccess: 'User registration successful!',
|
||||
gologin: 'Do you want to login?'
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ export default {
|
||||
factorySetting: 'Sistema',
|
||||
profile: 'Usuário',
|
||||
urlTitle: 'Corneta Khomp',
|
||||
operationLog: 'Registros'
|
||||
operationLog: 'Registros',
|
||||
},
|
||||
navbar: {
|
||||
dashboard: 'Configurações',
|
||||
@ -31,30 +31,30 @@ export default {
|
||||
thirdparty: 'Ou conectar-se com',
|
||||
thirdpartyTips:
|
||||
'Não pode ser simulado localmente, então combine com sua própria simulação de negócios!',
|
||||
confirmLogout: 'Confirmar Logout',
|
||||
confirmLogout: 'Tem certeza de que deseja sair?',
|
||||
loggedOut:
|
||||
'Você foi desconectado. Você pode cancelar para permanecer nesta página ou fazer login novamente.',
|
||||
toLogin: 'Ir para o Login',
|
||||
changePassword: 'Alterar Senha',
|
||||
changePasswordTip:
|
||||
'Detectado que a senha é muito fraca ou expirou. Por favor, modifique a senha antes de fazer login.',
|
||||
changePasswordMsg: 'Senha expirada, por favor, modifique a senha antes de fazer login.',
|
||||
'Sua senha é muito fraca ou expirou. Por favor, altere sua senha e faça login novamente.',
|
||||
changePasswordMsg: 'Sua senha expirou. Por favor, altere sua senha e faça login novamente.',
|
||||
upDateMsg: 'O firmware está sendo atualizado, por favor, aguarde um momento.'
|
||||
},
|
||||
table: {
|
||||
productName: 'Nome do Produto',
|
||||
productMode: 'Modelo do Produto',
|
||||
productName: 'Nome do Dispositivo',
|
||||
productMode: 'Modelo do Dispositivo',
|
||||
serialNumber: 'Número de Série',
|
||||
firmwareVercion: 'Versão do Firmware',
|
||||
deviceID: 'ID do Dispositivo',
|
||||
deviceIP: 'IP do Dispositivo',
|
||||
gatewal: 'Gateway',
|
||||
gatewal: 'Gateway Padrão',
|
||||
suonetMask: 'Máscara de Sub-rede',
|
||||
storageSpaces: 'Espaços de Armazenamento',
|
||||
serverIP: 'IP do Servidor',
|
||||
corverCommandDort: 'Porta de Comando do Servidor',
|
||||
deviceCommandPort: 'Porta de Comando do Dispositivo',
|
||||
deviceStreamPort: 'Porta de Fluxo de Código do Terminal',
|
||||
serverIP: 'Endereço IP',
|
||||
corverCommandDort: 'Porta do servidor',
|
||||
deviceCommandPort: 'Porta de Comando',
|
||||
deviceStreamPort: 'Porta de Fluxo',
|
||||
macAddress: 'Endereço de MAC',
|
||||
serverPort: 'Porta do Servidor',
|
||||
isEmpty: 'não pode estar vazio',
|
||||
@ -64,6 +64,7 @@ export default {
|
||||
isRight3: 'está fora do intervalo (1-9999).',
|
||||
open: 'Ativar',
|
||||
close: 'Desativar',
|
||||
close1: 'Fechar',
|
||||
save: 'Salvar',
|
||||
submit: 'Enviar',
|
||||
toTop: 'Voltar ao topo',
|
||||
@ -71,33 +72,40 @@ export default {
|
||||
clear: 'Limpar Tela',
|
||||
refresh: 'Atualização Automática',
|
||||
update: 'Atualizar',
|
||||
choose: 'Escolher',
|
||||
choose: 'Navegar',
|
||||
tips: 'Dica',
|
||||
NetworkPacketCapture: 'Captura de pacotes de rede',
|
||||
CapturingPacket: 'Captura de pacotes em andamento (máximo de 10 MB)...',
|
||||
PacketCaptureHasBeenStopped: 'A captura de pacotes foi interrompida.',
|
||||
StartPacketCapture: 'Começar',
|
||||
StopPacketCapture: 'Parar',
|
||||
Download: 'Download',
|
||||
Delete: 'Excluir',
|
||||
factorySettings: 'Restaurar Configurações de Fábrica',
|
||||
routerRestart: 'Reiniciar Dispositivo',
|
||||
routerRestart: 'Reiniciar',
|
||||
SIPserver: 'IP do Servidor SIP',
|
||||
SIPUserName: 'Nome de Usuário SIP',
|
||||
SIPPassword: 'Senha SIP',
|
||||
programTip:
|
||||
'Dica: o tamanho total dos arquivos enviados não pode exceder a capacidade do espaço de armazenamento do dispositivo!',
|
||||
'Dica: O tamanho total dos arquivos enviados não pode exceder a capacidade de armazenamento.',
|
||||
firmwareUpdateTip:
|
||||
'Dica: A atualização do firmware pode melhorar o desempenho e as funções do equipamento apenas quando a versão corresponder. Caso contrário, o hardware pode não funcionar! Por favor use com cuidado!',
|
||||
'Dica: A atualização do firmware só melhora o desempenho e a funcionalidade do dispositivo se a versão do firmware for compatível. Caso contrário, o equipamento pode não funcionar corretamente! Use com cautela!',
|
||||
factoryTip:
|
||||
'Após retornar às configurações de fábrica, a configuração do dispositivo voltará ao estado de fábrica. Use com cuidado!',
|
||||
'Após restaurar as configurações de fábrica, a configuração do dispositivo será restaurada ao seu estado original de fábrica. Use com cautela!',
|
||||
routerRestartTips:
|
||||
'O dispositivo está prestes a reiniciar. Tem certeza de que deseja continuar?',
|
||||
programDeteleTip: 'Confirmar exclusão deste arquivo?',
|
||||
logDeteleTip: 'Confirmar exclusão deste registro?',
|
||||
'Tem certeza de que deseja reiniciar o dispositivo?',
|
||||
programDeteleTip: 'Tem certeza de que deseja excluir?',
|
||||
logDeteleTip: 'Tem certeza de que deseja excluir?',
|
||||
freeSpace: 'Espaço Livre',
|
||||
chooseFile: 'Arquivo de Atualização',
|
||||
microphoneSwitch: 'Microfone',
|
||||
factorySettingsTips:
|
||||
'O endereço IP padrão do dispositivo no estado de fábrica é 192.168.1.108. Após a restauração, você precisa fazer login novamente.',
|
||||
'O endereço IP padrão do dispositivo é 192.168.1.108. Você precisará fazer login novamente após restaurar as configurações de fábrica.', // A versão base da ramificação LX é 192.168.1.101, enquanto as outras versões base são 192.168.1.108
|
||||
fileUpload: 'Carregando arquivo...',
|
||||
fileSave: 'Salvando...',
|
||||
routerRestartIng: 'Reiniciando Dispositivo...',
|
||||
routerRestartIng: 'Dispositivo reiniciando...',
|
||||
upDateTips:
|
||||
'O firmware está sendo atualizado, por favor, mantenha a rede conectada, não desligue a energia e atualize a página da web.',
|
||||
'O firmware está sendo atualizado. Mantenha a conexão de rede, desligue o dispositivo e atualize a página.',
|
||||
dynamicTips1: 'Cabeçalho fixo, ordenado pela ordem do cabeçalho',
|
||||
dynamicTips2: 'Cabeçalho não fixo, ordenado por ordem de clique',
|
||||
dragTips1: 'Ordem padrão',
|
||||
@ -134,17 +142,17 @@ export default {
|
||||
upload: 'Enviar',
|
||||
fileName: 'Nome do Programa',
|
||||
fileEditTip:
|
||||
'O nome do arquivo não pode estar vazio e o formato do arquivo não pode ser modificado!',
|
||||
fileSizeTip: 'O tamanho do arquivo enviado não pode exceder 5MB!',
|
||||
fileTypeTip: 'O arquivo enviado só pode estar no formato MP3!',
|
||||
updateFileTypeTip: 'O arquivo enviado só pode estar no formato Bin!',
|
||||
fileSurplusSizeTip: 'Espaço de armazenamento restante insuficiente!',
|
||||
upDateTip: 'Por favor, selecione um arquivo antes de atualizar!',
|
||||
'O nome do arquivo não pode estar vazio e o formato do arquivo não pode ser modificado.',
|
||||
fileSizeTip: 'O tamanho do arquivo enviado não pode exceder 40 MB.',
|
||||
fileTypeTip: 'Somente arquivos no formato MP3 podem ser enviados.',
|
||||
updateFileTypeTip: 'O arquivo enviado só pode estar no formato Bin.',
|
||||
fileSurplusSizeTip: 'Espaço de armazenamento insuficiente!',
|
||||
upDateTip: 'Por favor, selecione um arquivo antes de atualizar.',
|
||||
audio: 'Formato de Áudio',
|
||||
playStatus: 'Status de Reprodução',
|
||||
|
||||
microphone: 'Interruptor MacPhen incorporado',
|
||||
aoVol: 'Volume de Alto-falante',
|
||||
aoVol: 'Volume de Reprodução',
|
||||
aiVol: 'Volume do Microfone',
|
||||
|
||||
auth: 'Autenticação',
|
||||
@ -170,9 +178,9 @@ export default {
|
||||
llssCode: 'A conta foi logada em outro lugar. Deseja fazer logout forçado?', // 604code
|
||||
lylCode: 'A senha antiga está errada.', // 610code
|
||||
lyyCode: 'A nova senha deve ser diferente da senha antiga.', // 611code
|
||||
lelCode: 'O upload do arquivo falhou porque não pode ser reproduzido.', // 620code
|
||||
lelCode: 'O envio do arquivo falhou porque não se trata de um arquivo MP3 reproduzível.', // 620code
|
||||
leyCode: 'O upload do arquivo falhou porque um arquivo com o mesmo nome já existe.', // 621code
|
||||
leeCode: 'O upload do arquivo falhou devido a uma falha na rede.', // 622code
|
||||
leeCode: 'O envio do arquivo falhou devido a um erro de rede.', // 622code
|
||||
lesCode: 'O arquivo não existe, por favor, atualize.', // 623Code
|
||||
lessCode: 'Falha ao renomear, evite usar caracteres especiais.', // 624Code
|
||||
lewCode: 'Falha ao excluir, porque o arquivo está sendo reproduzido.', // 625Code
|
||||
@ -184,12 +192,20 @@ export default {
|
||||
lsseCode: 'A atualização do firmware foi concluída, o dispositivo será reiniciado em breve.', // 642code
|
||||
lssCode: 'Falha ao atualizar o firmware, porque o arquivo não pode ser analisado.', // 643code
|
||||
lsssCode: 'Falha ao atualizar o firmware, porque a versão do arquivo é muito baixa.', // 644code
|
||||
WAN_IP_AddressIP: 'Nome de domínio de rede ampla',
|
||||
WAN_IP_Address: 'Endereço IP de rede ampla',
|
||||
WAN_IP_DomainName: 'Nome de domínio de rede de longa distância',
|
||||
WAN_IP_Type: 'Formato de rede de longa distância',
|
||||
WAN_Port: 'Número da porta pública',
|
||||
WAN_RTSP_Port: 'Porta RTSP pública'
|
||||
WAN_IP_AddressIP: 'Nome de Domínio NAT',
|
||||
WAN_IP_Address: 'Endereço IP NAT',
|
||||
WAN_IP_DomainName: 'Nome de Domínio NAT',
|
||||
WAN_IP_Type: 'Tipo de NAT',
|
||||
WAN_Port: 'ONVIF Porta NAT',
|
||||
WAN_RTSP_Port: 'RTSP Porta NAT',
|
||||
httpPort: 'Porta da API HTTP',
|
||||
webPort: 'Porta WEB',
|
||||
rtspPort: 'Porta RTSP',
|
||||
rtpPort: 'Porta RTP',
|
||||
portConflict: ' Conflito',
|
||||
PortNumbersCannotBeTheSame: 'As portas não podem ser iguais',
|
||||
SIP_Port:'Porta SIP',
|
||||
SIP_RTP_Port:'Porta SIP RTP',
|
||||
},
|
||||
theme: {
|
||||
change: 'Mudar Tema',
|
||||
|
||||
@ -70,6 +70,13 @@ export default {
|
||||
refresh: '自动刷新',
|
||||
choose: '选择',
|
||||
tips: '提示',
|
||||
NetworkPacketCapture: '网络抓包',
|
||||
CapturingPacket: '正在抓包(最大10兆)......',
|
||||
PacketCaptureHasBeenStopped: '抓包已停止,保存为tcpdump.pcap。',
|
||||
StartPacketCapture: '开始',
|
||||
StopPacketCapture: '停止',
|
||||
Download: '下载',
|
||||
Delete: '删除',
|
||||
factorySettings: '恢复出厂设置',
|
||||
routerRestart: '重启设备',
|
||||
SIPserver: 'SIP服务器',
|
||||
@ -181,7 +188,15 @@ export default {
|
||||
WAN_IP_DomainName: '广域网域名',
|
||||
WAN_IP_Type: '广域网格式',
|
||||
WAN_Port: '公网端口号',
|
||||
WAN_RTSP_Port: '公网RTSP端口号'
|
||||
WAN_RTSP_Port: '公网RTSP端口号',
|
||||
httpPort: 'http端口',
|
||||
webPort: 'Web端口',
|
||||
rtspPort: 'RTSP端口',
|
||||
rtpPort: 'RTP端口',
|
||||
portConflict: ' 冲突',
|
||||
PortNumbersCannotBeTheSame: '端口号不能相同',
|
||||
SIP_Port:'SIP端口',
|
||||
SIP_RTP_Port:'SIP RTP端口',
|
||||
},
|
||||
theme: {
|
||||
change: '换肤',
|
||||
|
||||
@ -56,6 +56,9 @@ export default {
|
||||
// TODO: refactor with render function
|
||||
this.onlyOneChild = null
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
hasOneShowingChild(children = [], parent) {
|
||||
|
||||
@ -12,7 +12,12 @@
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
>
|
||||
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
|
||||
<sidebar-item
|
||||
v-for="route in filteredRoutes"
|
||||
:key="route.path"
|
||||
:item="route"
|
||||
:base-path="route.path"
|
||||
/>
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -26,11 +31,21 @@ import variables from '@/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
mounted(){
|
||||
console.log(this.permission_routes);
|
||||
// if(this.alarmPage === 'off'){
|
||||
//
|
||||
// }
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'permission_routes',
|
||||
'sidebar'
|
||||
'sidebar',
|
||||
'alarmPage'
|
||||
]),
|
||||
filteredRoutes() {
|
||||
return this.permission_routes
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route
|
||||
const { meta, path } = route
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
import ScrollPane from './ScrollPane'
|
||||
import { generateTitle } from '@/utils/i18n'
|
||||
import path from 'path'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
components: { ScrollPane },
|
||||
@ -42,6 +43,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'alarmPage'
|
||||
]),
|
||||
visitedViews() {
|
||||
return this.$store.state.tagsView.visitedViews
|
||||
},
|
||||
|
||||
@ -21,7 +21,8 @@ function hasPermission(roles, route) {
|
||||
*/
|
||||
export function filterAsyncRoutes(routes, roles) {
|
||||
const res = []
|
||||
const data = JSON.parse(getLoginData())?.menuRole || 1
|
||||
const loginData = getLoginData()
|
||||
const data = loginData?.menuRole || 1
|
||||
routes.forEach(route => {
|
||||
const tmp = { ...route }
|
||||
if (hasPermission(roles, tmp)) {
|
||||
|
||||
@ -20,6 +20,7 @@ const mutations = {
|
||||
},
|
||||
SET_LOGIN_DATA: (state, data) => {
|
||||
state.loginData = data
|
||||
console.log(state, data)
|
||||
setLoginData(data)
|
||||
},
|
||||
SET_KEY: (state, key) => {
|
||||
@ -55,7 +56,10 @@ const actions = {
|
||||
commit('SET_TOKEN', data.token)
|
||||
commit('SET_NAME', username)
|
||||
data.menuRole = 1
|
||||
if (data.alarmPage === 'off') data.menuRole = 2
|
||||
if (data.alarmPage !== 'off') {
|
||||
data.menuRole = 2
|
||||
// console.log('data.alarmPage',data.alarmPage)
|
||||
}
|
||||
commit('SET_LOGIN_DATA', data)
|
||||
if (response.code === 200) {
|
||||
resolve()
|
||||
|
||||
@ -15,11 +15,14 @@ export function setToken(token) {
|
||||
}
|
||||
|
||||
export function getLoginData() {
|
||||
return Cookies.get(LoginData)
|
||||
const data = Cookies.get(LoginData)
|
||||
return data ? JSON.parse(data) : null
|
||||
// return Cookies.get(LoginData)
|
||||
}
|
||||
|
||||
export function setLoginData(data) {
|
||||
return Cookies.set(LoginData, data)
|
||||
// return Cookies.set(LoginData, data)
|
||||
return Cookies.set(LoginData, JSON.stringify(data))
|
||||
}
|
||||
|
||||
export function getKey() {
|
||||
|
||||
@ -4,15 +4,19 @@
|
||||
{{ $t("route.agreement") }}
|
||||
</div>
|
||||
<div class="pageCon pageCon2">
|
||||
<el-tabs v-model="selectIndex" style="margin-top: 15px">
|
||||
<el-tabs
|
||||
v-model="selectIndex"
|
||||
style="margin-top: 15px"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in tabOptions"
|
||||
:key="index"
|
||||
:key="item.key"
|
||||
:label="item.label"
|
||||
:name="item.key"
|
||||
/>
|
||||
</el-tabs>
|
||||
<el-form
|
||||
v-show="selectIndex === '2'"
|
||||
v-show="selectIndex === '0'"
|
||||
class="detail-form agree-form"
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
@ -44,14 +48,6 @@
|
||||
<el-form-item :label="$t('table.deviceStreamPort')">
|
||||
<el-input v-model="formUDPData.corestreamPort" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.httpAuth')">
|
||||
<el-radio v-model="formUDPData.httpApiAuth" label="on">{{
|
||||
$t("table.open")
|
||||
}}</el-radio>
|
||||
<el-radio v-model="formUDPData.httpApiAuth" label="off">{{
|
||||
$t("table.close")
|
||||
}}</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="SSH">
|
||||
<el-radio v-model="formUDPData.ssh" label="on">{{
|
||||
$t("table.open")
|
||||
@ -100,9 +96,15 @@
|
||||
<svg-icon :icon-class="sip2PasswordType === 'password' ? 'eye' : 'eye-open'" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.SIP_Port')">
|
||||
<el-input v-model="formSIPData.sipPort" type="number" :min="1" :max="65535"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.SIP_RTP_Port')">
|
||||
<el-input v-model="formSIPData.sipRtpPort" type="number" :min="1" :max="65535"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form
|
||||
v-show="selectIndex === '0'"
|
||||
v-show="selectIndex === '2'"
|
||||
class="detail-form agree-form"
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
@ -143,8 +145,8 @@
|
||||
<el-form-item :label="$t('table.audio')">
|
||||
<el-select
|
||||
v-model="formONVIFData.rtspAudioType"
|
||||
style="width:350px;"
|
||||
placeholder="请选择"
|
||||
style="width:100%;"
|
||||
placeholder="Please select"
|
||||
@change="selectChange"
|
||||
>
|
||||
<el-option
|
||||
@ -163,10 +165,27 @@
|
||||
$t("table.close")
|
||||
}}</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.rtspPort')">
|
||||
<el-input v-model="formONVIFData.rtspPort" type="number" :min="0" :max="65535" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.rtpPort')">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<el-input
|
||||
v-model="formONVIFData.rtpPort"
|
||||
type="number"
|
||||
:min="0"
|
||||
:max="65535"
|
||||
style="flex: 1;"
|
||||
/>
|
||||
<span style="color: #909399; font-size: 14px; white-space: nowrap;">
|
||||
{{ Number(formONVIFData.rtpPort) }} - {{ Number(formONVIFData.rtpPort) + 5 || 5 }}
|
||||
</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.WAN_IP_Type')">
|
||||
<el-select
|
||||
v-model="formONVIFData.wanType"
|
||||
style="width:350px;"
|
||||
style="width:100%;"
|
||||
@change="selectChangeNet"
|
||||
>
|
||||
<el-option
|
||||
@ -190,6 +209,28 @@
|
||||
<el-input v-model="formONVIFData.wanRTSPPort" type="number" :min="0" :max="65535" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form
|
||||
v-show="selectIndex === '3'"
|
||||
class="detail-form agree-form"
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
:model="formHTTPData"
|
||||
>
|
||||
<el-form-item :label="$t('table.webPort')">
|
||||
<el-input v-model="formHTTPData.webPort" type="number" :min="0" :max="65535" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.httpPort')">
|
||||
<el-input v-model="formHTTPData.httpPort" type="number" :min="0" :max="65535" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.httpAuth')">
|
||||
<el-radio v-model="formHTTPData.httpApiAuth" label="on">{{
|
||||
$t("table.open")
|
||||
}}</el-radio>
|
||||
<el-radio v-model="formHTTPData.httpApiAuth" label="off">{{
|
||||
$t("table.close")
|
||||
}}</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 10%; margin-left: 40%;margin-top: 20px;"
|
||||
@ -205,6 +246,7 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import { deviceInfo, deviceEdit } from '@/api/index.js'
|
||||
import { encryptData, decryptData } from '@/utils/encryption/entrypt'
|
||||
|
||||
export default {
|
||||
name: 'Agreement',
|
||||
data() {
|
||||
@ -222,6 +264,10 @@ export default {
|
||||
{
|
||||
label: 'UDP',
|
||||
key: '0'
|
||||
},
|
||||
{
|
||||
label: 'HTTP',
|
||||
key: '3'
|
||||
}
|
||||
],
|
||||
NetType: [
|
||||
@ -234,7 +280,7 @@ export default {
|
||||
key: '1'
|
||||
}
|
||||
],
|
||||
selectIndex: '0',
|
||||
selectIndex: '2',
|
||||
formUDPData: {
|
||||
udp: '',
|
||||
id: '',
|
||||
@ -243,7 +289,6 @@ export default {
|
||||
serverPort: '',
|
||||
instructPort: '',
|
||||
corestreamPort: '',
|
||||
httpApiAuth: '',
|
||||
ssh: ''
|
||||
},
|
||||
formSIPData: {
|
||||
@ -253,7 +298,9 @@ export default {
|
||||
sipAddress: '',
|
||||
sipUsername: '',
|
||||
sipPassword: '',
|
||||
sipPassword2: ''
|
||||
sipPassword2: '',
|
||||
sipPort: '',
|
||||
sipRtpPort: ''
|
||||
},
|
||||
formONVIFData: {
|
||||
onvif: '',
|
||||
@ -270,7 +317,14 @@ export default {
|
||||
wanOnvifPort: '',
|
||||
wanRTSPPort: '',
|
||||
wanDomainName: '',
|
||||
wanType: '0'
|
||||
wanType: '0',
|
||||
rtspPort: '',
|
||||
rtpPort: ''
|
||||
},
|
||||
formHTTPData: {
|
||||
httpPort: '',
|
||||
webPort: '',
|
||||
httpApiAuth: ''
|
||||
},
|
||||
|
||||
sipPasswordType: 'password',
|
||||
@ -282,9 +336,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'udpPage'
|
||||
])
|
||||
...mapGetters(['udpPage']) // 获取到 'on' 或 'off'
|
||||
},
|
||||
mounted() {
|
||||
if (this.udpPage === 'off') {
|
||||
@ -343,7 +395,6 @@ export default {
|
||||
this.formUDPData.serverPort = res.data.serverPort
|
||||
this.formUDPData.instructPort = res.data.instructPort
|
||||
this.formUDPData.corestreamPort = res.data.corestreamPort
|
||||
this.formUDPData.httpApiAuth = res.data.httpApiAuth
|
||||
this.formUDPData.ssh = res.data.ssh
|
||||
|
||||
this.formSIPData.sip = res.data.sip
|
||||
@ -354,6 +405,8 @@ export default {
|
||||
res.data.sipPassword = decryptData(res.data.sipPassword)
|
||||
this.formSIPData.sipPassword = res.data.sipPassword
|
||||
this.formSIPData.sipPassword2 = res.data.sipPassword
|
||||
this.formSIPData.sipPort = res.data.sipPort
|
||||
this.formSIPData.sipRtpPort = res.data.sipRtpPort
|
||||
|
||||
this.formONVIFData.onvif = res.data.onvif
|
||||
this.formONVIFData.id = res.data.id
|
||||
@ -366,6 +419,8 @@ export default {
|
||||
this.formONVIFData.rtspAudioTypeArr = res.data.rtspAudioTypeArr
|
||||
this.formONVIFData.rtspAudioType = res.data.rtspAudioType
|
||||
this.formONVIFData.onvifAuth = res.data.onvifAuth
|
||||
this.formONVIFData.rtspPort = res.data.rtspPort
|
||||
this.formONVIFData.rtpPort = res.data.rtpPort
|
||||
|
||||
this.formONVIFData.wanIP = res.data.wanIP
|
||||
this.formONVIFData.wanOnvifPort = res.data.wanOnvifPort
|
||||
@ -373,6 +428,11 @@ export default {
|
||||
this.formONVIFData.wanDomainName = res.data.wanDomainName
|
||||
this.formONVIFData.wanType = res.data.wanType
|
||||
|
||||
this.formHTTPData.httpApiAuth = res.data.httpApiAuth
|
||||
this.formHTTPData.httpPort = res.data.httpPort
|
||||
this.formHTTPData.webPort = res.data.webPort
|
||||
|
||||
// console.log('data', res.data)
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
@ -384,7 +444,56 @@ export default {
|
||||
const portRegex = /^(1\d{4}|[2-4]\d{4}|49999)$/
|
||||
const portRegex2 = /^(?:[2-9]\d{0,3}|1\d{0,3}|9999)$/
|
||||
const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
||||
if (this.selectIndex === '2') {
|
||||
const ports = [
|
||||
this.formHTTPData.webPort,
|
||||
this.formHTTPData.httpPort,
|
||||
this.formONVIFData.onvifPort,
|
||||
this.formONVIFData.rtspPort,
|
||||
this.formONVIFData.rtpPort,
|
||||
this.formSIPData.sipPort,
|
||||
this.formSIPData.sipRtpPort
|
||||
]
|
||||
console.log('ports', ports)
|
||||
|
||||
// 使用 HashMap 检测端口冲突 - O(n) 时间复杂度
|
||||
const portNames = ['webPort', 'httpPort', 'onvifPort', 'rtspPort', 'rtpPort', 'sipPort', 'sipRtpPort']
|
||||
const portMap = new Map()
|
||||
const conflicts = []
|
||||
|
||||
for (let i = 0; i < ports.length; i++) {
|
||||
const portValue = Number(ports[i])
|
||||
|
||||
// 跳过空值
|
||||
if (ports[i] === '' || ports[i] === null || ports[i] === undefined || isNaN(portValue)) {
|
||||
continue
|
||||
}
|
||||
|
||||
// 检查该端口值是否已存在
|
||||
if (portMap.has(portValue)) {
|
||||
const existingPort = portMap.get(portValue)
|
||||
conflicts.push({
|
||||
port1: { name: existingPort.name, value: existingPort.value, index: existingPort.index },
|
||||
port2: { name: portNames[i], value: ports[i], index: i }
|
||||
})
|
||||
} else {
|
||||
// 将端口值和对应的索引存入 Map
|
||||
portMap.set(portValue, { name: portNames[i], value: ports[i], index: i })
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有冲突,显示错误信息
|
||||
if (conflicts.length > 0) {
|
||||
const conflictMessages = conflicts.map(item =>
|
||||
`${item.port1.name}(${item.port1.value}) & ${item.port2.name}(${item.port2.value})`
|
||||
)
|
||||
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$i18n.t('table.PortNumbersCannotBeTheSame') + ' : ' + conflictMessages.join(', ')
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.selectIndex === '0') {
|
||||
param = {
|
||||
...this.formUDPData
|
||||
}
|
||||
@ -444,7 +553,8 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
} else if (this.selectIndex === '1') {
|
||||
}
|
||||
else if (this.selectIndex === '1') {
|
||||
param = {
|
||||
...this.formSIPData
|
||||
}
|
||||
@ -473,7 +583,8 @@ export default {
|
||||
}
|
||||
param.sipPassword = encryptData(param.sipPassword)
|
||||
param.sipPassword2 = encryptData(param.sipPassword2)
|
||||
} else if (this.selectIndex === '0') {
|
||||
}
|
||||
else if (this.selectIndex === '2') {
|
||||
param = {
|
||||
...this.formONVIFData
|
||||
}
|
||||
@ -528,8 +639,41 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!param.rtspPort) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$i18n.t('table.rtspPort') + this.$i18n.t('table.isEmpty')
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log(param)
|
||||
if (!param.rtpPort) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$i18n.t('table.rtpPort') + this.$i18n.t('table.isEmpty')
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
else if (this.selectIndex === '3') {
|
||||
param = {
|
||||
...this.formHTTPData
|
||||
}
|
||||
if (!param.webPort) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$i18n.t('table.webPort') + this.$i18n.t('table.isEmpty')
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!param.httpPort) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: this.$i18n.t('table.httpPort') + this.$i18n.t('table.isEmpty')
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
// console.log(param)
|
||||
deviceEdit(param).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
@ -543,10 +687,14 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTab(item, index) {
|
||||
console.log(item, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.agree-form .el-form-item {
|
||||
width: 50%;
|
||||
@ -565,7 +713,6 @@ export default {
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
|
||||
.pageCon2{
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
|
||||
@ -23,16 +23,48 @@
|
||||
<!-- <el-button type="primary" style="margin-top: 48px;" @click="factorySetting">
|
||||
{{ $t('table.factorySettings') }}
|
||||
</el-button> -->
|
||||
<div class="formbox">
|
||||
<div class="formbox-l">{{ $t('table.NetworkPacketCapture') }}</div>
|
||||
<el-button type="primary" v-if="DataDB.status === 0 || DataDB.status === 2" @click.stop="StartPacketCapture(1)">
|
||||
{{ $t('table.StartPacketCapture') }}
|
||||
</el-button>
|
||||
<el-button type="danger" v-else @click.stop="StartPacketCapture(0)">
|
||||
{{ $t('table.StopPacketCapture') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click.stop="DownloadFile" :disabled="DataDB.status !== 2">
|
||||
{{ $t('table.Download') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click.stop="DeletePacketCaptureRecords" :disabled="DataDB.status !== 2">
|
||||
{{ $t('table.Delete') }}
|
||||
</el-button>
|
||||
<span v-if="DataDB.status === 1" class="SpanBox1">
|
||||
{{ $t('table.CapturingPacket') }}
|
||||
</span>
|
||||
<span v-else-if="DataDB.status === 2" class="SpanBox1">
|
||||
{{ $t('table.PacketCaptureHasBeenStopped') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deviceReset, deviceReboot } from '@/api/index.js'
|
||||
import {
|
||||
deviceReset,
|
||||
deviceReboot,
|
||||
getPacketCaptureInfo,
|
||||
deletePacketCapture,
|
||||
startPacketCapture,
|
||||
stopPacketCapture
|
||||
} from '@/api/index.js'
|
||||
export default {
|
||||
name: 'FactorySetting',
|
||||
data() {
|
||||
return {
|
||||
DataDB: {
|
||||
status: 0,
|
||||
file: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
@ -103,6 +135,49 @@ export default {
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
getPacketInfo() {
|
||||
getPacketCaptureInfo({}).then(res => {
|
||||
const data = res.data
|
||||
this.DataDB.status = data.status
|
||||
this.DataDB.file = data.file
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
StartPacketCapture(Flag) {
|
||||
if (Flag === 1) {
|
||||
startPacketCapture({}).then(res => {
|
||||
setTimeout(() => {
|
||||
this.getPacketInfo()
|
||||
}, 300)
|
||||
})
|
||||
} else if (Flag === 0) {
|
||||
stopPacketCapture({}).then(res => {
|
||||
setTimeout(() => {
|
||||
this.getPacketInfo()
|
||||
}, 300)
|
||||
})
|
||||
}
|
||||
},
|
||||
DeletePacketCaptureRecords() {
|
||||
const data = {
|
||||
name: this.DataDB.file
|
||||
}
|
||||
// console.log(data);
|
||||
deletePacketCapture(data).then(res => {
|
||||
this.DataDB.status = 0
|
||||
this.$message.success(this.$i18n.t('table.Delete') + this.$i18n.t('table.success'))
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
DownloadFile() {
|
||||
if (this.DataDB.file === '') {
|
||||
return
|
||||
}
|
||||
const URL = '/prod-api/pcap/' + this.DataDB.file
|
||||
window.open(URL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (files.size / 1024 / 1024 > 5) {
|
||||
if (files.size / 1024 / 1024 > 30) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: this.$i18n.t('table.fileSizeTip')
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
:label="$t('table.actions')"
|
||||
align="center"
|
||||
width="160"
|
||||
width="220"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -59,11 +59,11 @@
|
||||
<el-button class="ftbtn ftbtn2" @click="toBottom">{{
|
||||
$t("table.toBottom")
|
||||
}}</el-button>
|
||||
<el-button class="ftbtn ftbtn2" @click="clearCon">{{
|
||||
$t("table.clear")
|
||||
}}</el-button>
|
||||
<!-- <el-button class="ftbtn ftbtn2" @click="clearCon">{{-->
|
||||
<!-- $t("table.clear")-->
|
||||
<!-- }}</el-button>-->
|
||||
<el-button class="ftbtn ftbtn3" @click="closeDia">{{
|
||||
$t("table.close")
|
||||
$t("table.close1")
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -180,9 +180,9 @@ export default {
|
||||
toBottom() {
|
||||
this.$refs.scrollbar.wrap.scrollTop = this.$refs.scrollbar.wrap.scrollHeight
|
||||
},
|
||||
clearCon() {
|
||||
this.logData = ''
|
||||
},
|
||||
// clearCon() {
|
||||
// this.logData = ''
|
||||
// },
|
||||
closeDia() {
|
||||
this.dialogVisible = false
|
||||
this.rowName = ''
|
||||
|
||||
@ -39,8 +39,8 @@
|
||||
v-model="formData.aiVol"
|
||||
:step="1"
|
||||
:max="10"
|
||||
@change="aiVolChange"
|
||||
style="width: 120px;"
|
||||
@change="aiVolChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('table.aoVol')" style="margin-left: 12px;">
|
||||
@ -48,8 +48,8 @@
|
||||
v-model="formData.aoVol"
|
||||
:step="1"
|
||||
:max="10"
|
||||
@change="aoVolChange"
|
||||
style="width: 120px;"
|
||||
@change="aoVolChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -255,7 +255,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (files.size / 1024 / 1024 > 5) {
|
||||
if (files.size / 1024 / 1024 > 30) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: this.$i18n.t('table.fileSizeTip')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user