Compare commits

..

No commits in common. "master" and "V1.0" have entirely different histories.
master ... V1.0

15 changed files with 401 additions and 249 deletions

BIN
dist_1.zip Normal file

Binary file not shown.

View File

@ -21,8 +21,7 @@ export default {
this.$store.dispatch('user/setUrlToken', token).then(() => { this.$store.dispatch('user/setUrlToken', token).then(() => {
this.$router.push('/') this.$router.push('/')
}) })
} } else {
else {
this.$router.push('/login') this.$router.push('/login')
return return
} }

View File

@ -172,7 +172,7 @@ export function deteleLog(data) {
} }
// 获取网络抓包信息 // 获取网络抓包信息
export function getPacketCaptureInfo(data){ export function getPacketCaptureInfo(data) {
return request({ return request({
url: '/pcap/status', url: '/pcap/status',
method: 'get', method: 'get',
@ -180,7 +180,7 @@ export function getPacketCaptureInfo(data){
}) })
} }
// 开始抓包 // 开始抓包
export function startPacketCapture(data){ export function startPacketCapture(data) {
return request({ return request({
url: '/pcap/start', url: '/pcap/start',
method: 'post', method: 'post',
@ -188,7 +188,7 @@ export function startPacketCapture(data){
}) })
} }
// 停止抓包 // 停止抓包
export function stopPacketCapture(data){ export function stopPacketCapture(data) {
return request({ return request({
url: '/pcap/stop', url: '/pcap/stop',
method: 'post', method: 'post',
@ -196,7 +196,7 @@ export function stopPacketCapture(data){
}) })
} }
// 删除抓包文件 // 删除抓包文件
export function deletePacketCapture(data){ export function deletePacketCapture(data) {
return request({ return request({
url: '/pcap/delete', url: '/pcap/delete',
method: 'post', method: 'post',

View File

@ -29,7 +29,7 @@ export default {
// message: 'Switch Language Success', // message: 'Switch Language Success',
// type: 'success' // type: 'success'
// }) // })
window.location.reload(); window.location.reload()
} }
} }
} }

View File

@ -10,7 +10,7 @@ export default {
firmwareUpdate: 'Firmware Update', firmwareUpdate: 'Firmware Update',
factorySetting: 'System Management', factorySetting: 'System Management',
profile: 'Profile', profile: 'Profile',
urlTitle: 'Network Broadcast Terminal', urlTitle: 'IP Speaker',
operationLog: 'Operation Log' operationLog: 'Operation Log'
}, },
navbar: { navbar: {
@ -25,65 +25,62 @@ export default {
logIn: 'Login', logIn: 'Login',
register: 'Register', register: 'Register',
logCancel: 'Cancel', logCancel: 'Cancel',
username: 'UserName', username: 'Username',
password: 'Password', password: 'Password',
any: 'any', any: 'any',
thirdparty: 'Or connect with', thirdparty: 'Or connect with',
thirdpartyTips: thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation!',
'Can not be simulated on local, so please combine you own business simulation! ! !', confirmLogout: 'Are you sure you want to log out?',
confirmLogout: 'Confirm Logout', loggedOut: 'You have been logged out, you can cancel to stay on this page or log in again.',
loggedOut:
'You have been logged out, you can cancel to stay on this page or log in again!',
toLogin: 'To Login', toLogin: 'To Login',
changePassword: 'Change Password', changePassword: 'Edit Password',
changePasswordTip: changePasswordTip: 'Your password is too weak or has expired. Please change your password and log in again.',
'Detected that the password is too weak or has expired. Please modify the password before logging in', changePasswordMsg: 'Your password has expired. Please change your password and log in again.',
changePasswordMsg: upDateMsg: 'Firmware is being upgraded, please wait for a while.'
'Password expired, please modify the password before logging in!',
upDateMsg: 'Firmware is being upgraded, please wait for a while。'
}, },
table: { table: {
DNS1:"Preferred DNS Server", DNS1: 'Preferred DNS Server',
DNS2:"Alternate DNS Server", DNS2: 'Alternate DNS Server',
productName: 'Product Name', productName: 'Device Name',
productMode: 'Product Model', productMode: 'Device Model',
serialNumber: 'Serial Number', serialNumber: 'SN',
firmwareVercion: 'Firmware Version', firmwareVercion: 'Firmware Version',
deviceID: 'Terminal ID', deviceID: 'Device ID',
deviceIP: 'Terminal IP', deviceIP: 'IP Address',
WAN_IP_AddressIP: 'WAN DomainName', WAN_IP_AddressIP: 'NAT DomainName',
WAN_IP_Address: 'WAN IP address', WAN_IP_Address: 'NAT IP Address',
WAN_IP_DomainName: 'WAN domain name', WAN_IP_DomainName: 'NAT Domain Name',
WAN_IP_Type: 'WAN Type', WAN_IP_Type: 'NAT Type',
WAN_Port: 'WAN Port', WAN_Port: 'NAT ONVIF Port',
WAN_RTSP_Port: 'WAN RTSP Port', WAN_RTSP_Port: 'NAT RTSP Port',
gatewal: 'Gateway', gatewal: 'Default Gateway',
suonetMask: 'Subnet Mask', suonetMask: 'Subnet Mask',
storageSpaces: 'Storage Spaces', storageSpaces: 'Storage Capacity',
serverIP: 'Server IP', serverIP: 'Server IP',
corverCommandDort: 'Server Command Port', corverCommandDort: 'Server Port',
deviceCommandPort: 'Terminal Command Port', deviceCommandPort: 'Command Port',
deviceStreamPort: 'Terminal Code Stream Port', deviceStreamPort: 'Stream Port',
macAddress: 'MAC Address', macAddress: 'MAC Address',
serverPort: 'Server Port', serverPort: 'Server Port',
isEmpty: ' cannot be empty', isEmpty: ' cannot be empty.',
isRight: ' is invalid.', isRight: ' is invalid.',
isRight1: ' is out of range (10000-49999).', isRight1: ' is out of range (10000-49999).',
isRight2: ' is out of range (1000-9999).', isRight2: ' is out of range (1000-9999).',
isRight3: ' is out of range (1-9999).', isRight3: ' is out of range (1-9999).',
isRight4: 'The IP address format is incorrect.', isRight4: 'The IP address is invalid.',
isRight5: 'The public network port is out of range (1-65535).', isRight5: 'The NAT ONVIF port is out of range (1-65535).',
isRight6: 'The public network RTSP port is out of range (1-65535).', isRight6: 'The NAT RTSP port is out of range (1-65535).',
isRight7: 'The public network domain name format is incorrect.', isRight7: 'The NAT domain name is invalid.',
open: 'Enable', open: 'Enable',
close: 'Disable', close: 'Disable',
close1: 'Close',
save: 'Save', save: 'Save',
submit: 'Submit', submit: 'Submit',
toTop: 'Back to top', toTop: 'Back to top',
toBottom: 'Back to bottom', toBottom: 'Back to bottom',
clear: 'Clear Screen', clear: 'Clear Screen',
NetworkPacketCapture: 'Network packet capture', NetworkPacketCapture: 'Network packet capture',
CapturingPacket: 'Capturing packets (Max 10 MB)......', CapturingPacket: 'Capturing packets (Max 10 MB) ......',
PacketCaptureHasBeenStopped: 'Packet capture is stopped and saved as tcpdump.pcap.', PacketCaptureHasBeenStopped: 'Packet capture is stopped and saved as tcpdump.pcap.',
StartPacketCapture: 'Start', StartPacketCapture: 'Start',
StopPacketCapture: 'Stop', StopPacketCapture: 'Stop',
@ -91,33 +88,28 @@ export default {
Delete: 'Delete', Delete: 'Delete',
refresh: 'Auto Refresh', refresh: 'Auto Refresh',
update: 'Update', update: 'Update',
choose: 'Choice', choose: 'Browse',
tips: 'Tips', tips: 'Tips',
factorySettings: 'Restore Factory Settings', factorySettings: 'Restore Factory Settings',
routerRestart: 'Reboot The Device', routerRestart: 'Restart',
SIPserver: 'SIP Server IP', SIPserver: 'SIP Server IP',
SIPUserName: 'SIP UserName', SIPUserName: 'SIP Username',
SIPPassword: 'SIP PassWord', SIPPassword: 'SIP Password',
programTip: programTip: 'Tip: The total size of uploaded files cannot exceed the storage capacity.',
'Tip: the total size of uploaded files cannot exceed the capacity of the device storage space!', firmwareUpdateTip: '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!',
firmwareUpdateTip: factoryTip: 'After restoring factory settings, the device configuration will be restored to its factory state. Please use with caution!',
'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!', routerRestartTips: 'Are you sure you want to restart the device?',
factoryTip: programDeteleTip: 'Are you sure you want to delete?',
'After returning to the factory setting, the configuration of the device will return to the factory state. Please use with caution!', logDeteleTip: 'Are you sure you want to delete?',
routerRestartTips: freeSpace: 'Available Space',
'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',
chooseFile: 'Upgrade File', chooseFile: 'Upgrade File',
microphoneSwitch: 'Microphone Switch', microphoneSwitch: 'Microphone Input',
factorySettingsTips: factorySettingsTips:
'The default IP address of the device in the factory state is 192.168.1.101. 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...', fileUpload: 'File uploading...',
fileSave: 'Saving...', fileSave: 'Saving...',
routerRestartIng: 'Device Rebooting...', routerRestartIng: 'Device Restarting...',
upDateTips: upDateTips: 'The firmware is being upgraded, please keep the network connection, power off, and refresh the webpage.',
'The firmware is being updated, please keep the network connected, do not cut off the power and refresh the web page.',
dynamicTips1: 'Fixed header, sorted by header order', dynamicTips1: 'Fixed header, sorted by header order',
dynamicTips2: 'Not fixed header, sorted by click order', dynamicTips2: 'Not fixed header, sorted by click order',
dragTips1: 'The default order', dragTips1: 'The default order',
@ -153,21 +145,20 @@ export default {
stop: 'Stop', stop: 'Stop',
upload: 'Upload', upload: 'Upload',
fileName: 'Program Name', fileName: 'Program Name',
fileEditTip: fileEditTip: 'The file name cannot be empty and the file format cannot be modified',
'The file name cannot be empty and the file format cannot be modified', fileSizeTip: 'The size of the uploaded file cannot exceed 40MB.',
fileSizeTip: 'The uploaded file size cannot exceed 40MB!', fileTypeTip: 'Only MP3 format files can be uploaded.',
fileTypeTip: 'The uploaded file can only be in MP3 format!', updateFileTypeTip: 'The uploaded file can only be in Bin format.',
updateFileTypeTip: 'The uploaded file can only be in Bin format', fileSurplusSizeTip: 'Insufficient storage space!',
fileSurplusSizeTip: 'Insufficient remaining storage space', upDateTip: 'Please select a file before upgrading.',
upDateTip: 'Please select a file before upgrading!', audio: 'Audio Format',
audio: 'AudioFormat', playStatus: 'Status',
playStatus: 'Playing status',
aoVol: 'Play Volume', aoVol: 'Playback Volume',
aiVol: 'Recording Volume', aiVol: 'Recording Volume',
auth: 'Authentication', auth: 'Authentication',
httpAuth: 'Http Authentication', httpAuth: 'HTTP Authentication',
warningTitle: 'Alarm File', warningTitle: 'Alarm File',
warningFormTitle: 'AlarmIn', warningFormTitle: 'AlarmIn',
@ -175,7 +166,7 @@ export default {
noneText: 'None', noneText: 'None',
dhcp: 'DHCP', dhcp: 'DHCP',
port: 'Port', port: 'ONVIF Port',
on: 'On', on: 'On',
off: 'Off', off: 'Off',
number: 'Number', number: 'Number',
@ -183,29 +174,35 @@ export default {
slyCode: 'Please login again.', // 401code slyCode: 'Please login again.', // 401code
sleCode: 'Login expired, please login again.', // 402code sleCode: 'Login expired, please login again.', // 402code
lllCode: 'The password is too weak, please change it.', // 600code lllCode: 'The password is too weak, please change it.', // 600code
llyCode: 'The firmware is being updated, please wait.', // 601code llyCode: 'The firmware is being upgraded, please wait.', // 601code
lleCode: '用户登录名称/密码错误.', // 602code lleCode: 'The username or password is incorrect.', // 602code
llsCode: 'Too many failed login attempts, the account has been locked (30 minutes).', // 603code 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 llssCode: 'The account has been logged in elsewhere. Do you want to force login?', // 604code
lylCode: 'The old password is wrong.', // 610code lylCode: 'The old password is incorrect.', // 610code
lyyCode: 'The new password must be different from the old password.', // 611code 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 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 lesCode: 'The file does not exist, please refresh.', // 623Code
lessCode: 'Failed to rename, please avoid using special characters.', // 624Code lessCode: 'Failed to rename, please avoid using special characters.', // 624Code
lewCode: 'Failed to delete, because the file is playing.', // 625Code lewCode: 'Failed to delete, because the file is playing.', // 625Code
lslCode: '节目文件开始播放失败,节目已在播放中.', // 630code lslCode: 'Failed to start playing, because the file is already playing.', // 630code
lsyCode: '节目文件停止播放失败,节目未在播放中.', // 631code lsyCode: 'Failed to stop playing, because the file is not playing.', // 631code
lsslCode: 'The firmware update has not started.', // 640code lsslCode: 'The firmware upgraded has not started.', // 640code
lssyCode: 'The firmware is being updated, please wait.', // 641code lssyCode: 'The firmware is being upgraded, please wait.', // 641code
lsseCode: 'The firmware update completed, the device will reboot soon.', // 642code lsseCode: 'The firmware upgrade completed, the device will restart soon.', // 642code
lssCode: 'Failed to update the firmware, because the file cannot be parsed.', // 643code lssCode: 'Failed to upgrade the firmware, because the file cannot be parsed.', // 643code
lsssCode: 'Failed to update the firmware, because the file version is too low.', // 644code lsssCode: 'Failed to upgrade the firmware, because the file version is too low.', // 644code
EnableCalling: 'Whether or not to enable calling', EnableCalling: 'Whether or not to enable calling',
CallButton0: 'SIP Username (Button 1)', CallButton0: 'SIP Username (Button 1)',
CallButton1: 'SIP Username (Button 2)', CallButton1: 'SIP Username (Button 2)',
webPort: 'Web Port',
httpPort: 'HTTP API Port',
rtspPort: 'RTSP Port',
rtpPort: 'RTP Port',
SIP_Port: 'SIP Port',
SIP_RTP_Port: 'SIP RTP Port'
}, },
theme: { theme: {
change: 'Change Theme', change: 'Change Theme',
@ -234,20 +231,18 @@ export default {
password2: 'Confirm Password', password2: 'Confirm Password',
update: 'Update', update: 'Update',
oldPassword: 'Please enter your old password', oldPassword: 'Please enter your old password',
newPassword: 'Please enter a new password', newPassword: 'Please enter a new password!',
newPassword2: 'Please enter the new password again', newPassword2: 'Please enter the new password again!',
passwordDifferent: 'The two password entered is inconsistent', passwordDifferent: 'The two password entered is inconsistent!',
newAndOldPassword: newAndOldPassword: 'Operation exception: the new password is the same as the old password.',
'Operation exception: the new password is the same as the old password', updatePasswordSuccess: 'Password updated successfully.',
updatePasswordSuccess: 'User password updated successfully', passwordLengthError: 'Enter a password of at least 8 digits.',
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!',
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', confirmPassword: 'Confirm Password',
inputusername: 'Please enter your username!', inputusername: 'Please enter the username!',
inputpassword: 'Please enter the password', inputpassword: 'Please enter the password!',
inputpassword2: 'Please enter the password again', inputpassword2: 'Please enter the password again!',
registerSuccess: 'User registration successful', registerSuccess: 'User registration successful!',
gologin: 'Do you want to login' gologin: 'Do you want to login?'
} }
} }

View File

@ -2,8 +2,8 @@ import Vue from 'vue'
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
import enLocale from './en' import enLocale from './en'
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
import zhLocale from './zh' import zhLocale from './zh'
Vue.use(VueI18n) Vue.use(VueI18n)

View File

@ -1,3 +1,4 @@
export default { export default {
route: { route: {
dashboard: '首页', dashboard: '首页',
@ -36,11 +37,11 @@ export default {
changePassword: '修改密码', changePassword: '修改密码',
changePasswordTip: '监测到密码过弱或者密码已过期,请先修改密码后登录', changePasswordTip: '监测到密码过弱或者密码已过期,请先修改密码后登录',
changePasswordMsg: '密码过期,请先修改密码后登录!', changePasswordMsg: '密码过期,请先修改密码后登录!',
upDateMsg: '固件正在升级,请稍等一段时间。', upDateMsg: '固件正在升级,请稍等一段时间。'
}, },
table: { table: {
DNS1:"首选DNS服务器", DNS1: '首选DNS服务器',
DNS2:"备用DNS服务器", DNS2: '备用DNS服务器',
productName: '产品名称', productName: '产品名称',
productMode: '型号', productMode: '型号',
serialNumber: '序列号', serialNumber: '序列号',
@ -104,7 +105,7 @@ export default {
chooseFile: '选择文件', chooseFile: '选择文件',
microphoneSwitch: '内置麦克风开关', microphoneSwitch: '内置麦克风开关',
factorySettingsTips: factorySettingsTips:
'出厂状态默认设备IP地址为192.168.1.101,恢复完成后需重新登录。', '出厂状态默认设备IP地址为192.168.1.108,恢复完成后需重新登录。', // LX分支的是192.168.1.101其他的基线版本是192.168.1.108
routerRestartTips: '设备即将重启,是否确认继续!', routerRestartTips: '设备即将重启,是否确认继续!',
fileUpload: '文件上传中...', fileUpload: '文件上传中...',
fileSave: '正在保存...', fileSave: '正在保存...',
@ -198,6 +199,13 @@ export default {
EnableCalling: '是否启用呼叫', EnableCalling: '是否启用呼叫',
CallButton0: 'SIP用户名称 (按键1)', CallButton0: 'SIP用户名称 (按键1)',
CallButton1: 'SIP用户名称 (按键2)', CallButton1: 'SIP用户名称 (按键2)',
webPort: '网络端口',
httpPort: 'http端口',
rtspPort: 'RTSP端口',
rtpPort: 'RTP端口',
close1: '关闭',
SIP_Port: 'SIP端口',
SIP_RTP_Port: 'SIP RTP端口'
}, },
theme: { theme: {
change: '换肤', change: '换肤',

View File

@ -98,19 +98,19 @@ export const constantRoutes = [
} }
] ]
}, },
{ // 报警音频 // { // 报警音频
path: '/warning', // path: '/warning',
component: Layout, // component: Layout,
redirect: '/warning', // redirect: '/warning',
children: [ // children: [
{ // {
path: 'warning', // path: 'warning',
component: () => import('@/views/warning/index'), // component: () => import('@/views/warning/index'),
name: 'Warning', // name: 'Warning',
meta: { title: 'warning', icon: 'guide', affix: true, noCache: true } // meta: { title: 'warning', icon: 'guide', affix: true, noCache: true }
} // }
] // ]
}, // },
{ // 接口协议 { // 接口协议
path: '/agreement', path: '/agreement',
component: Layout, component: Layout,

View File

@ -12,7 +12,7 @@
/> />
</el-tabs> </el-tabs>
<el-form <el-form
v-show="selectIndex === '2'" v-show="selectIndex === '3'"
class="detail-form agree-form" class="detail-form agree-form"
label-width="180px" label-width="180px"
label-position="right" label-position="right"
@ -45,14 +45,14 @@
<el-input v-model="formUDPData.corestreamPort" /> <el-input v-model="formUDPData.corestreamPort" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.httpAuth')"> <!-- <el-form-item :label="$t('table.httpAuth')">-->
<el-radio v-model="formUDPData.httpApiAuth" label="on">{{ <!-- <el-radio v-model="formUDPData.httpApiAuth" label="on">{{-->
$t("table.open") <!-- $t("table.open")-->
}}</el-radio> <!-- }}</el-radio>-->
<el-radio v-model="formUDPData.httpApiAuth" label="off">{{ <!-- <el-radio v-model="formUDPData.httpApiAuth" label="off">{{-->
$t("table.close") <!-- $t("table.close")-->
}}</el-radio> <!-- }}</el-radio>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="SSH"> <el-form-item label="SSH">
<el-radio v-model="formUDPData.ssh" label="on">{{ <el-radio v-model="formUDPData.ssh" label="on">{{
@ -73,12 +73,12 @@
> >
<el-form-item label=" "> <el-form-item label=" ">
<el-radio v-model="formSIPData.sip" label="on">{{ <el-radio v-model="formSIPData.sip" label="on">{{
$t("table.open") $t("table.open")
}} }}
</el-radio> </el-radio>
<el-radio v-model="formSIPData.sip" label="off">{{ <el-radio v-model="formSIPData.sip" label="off">{{
$t("table.close") $t("table.close")
}} }}
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.deviceID')"> <el-form-item :label="$t('table.deviceID')">
@ -105,12 +105,18 @@
<svg-icon :icon-class="sip2PasswordType === 'password' ? 'eye' : 'eye-open'" /> <svg-icon :icon-class="sip2PasswordType === 'password' ? 'eye' : 'eye-open'" />
</span> </span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.CallButton0')" v-if="formSIPData.sipCallFunc === 'on'"> <el-form-item v-if="formSIPData.sipCallFunc === 'on'" :label="$t('table.CallButton0')">
<el-input v-model="formSIPData.sipCallUsername0" /> <el-input v-model="formSIPData.sipCallUsername0" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.CallButton1')" v-if="formSIPData.sipCallFunc === 'on'"> <el-form-item v-if="formSIPData.sipCallFunc === 'on'" :label="$t('table.CallButton1')">
<el-input v-model="formSIPData.sipCallUsername1" /> <el-input v-model="formSIPData.sipCallUsername1" />
</el-form-item> </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>
<el-form <el-form
v-show="selectIndex === '0'" v-show="selectIndex === '0'"
@ -154,7 +160,7 @@
<el-form-item :label="$t('table.audio')"> <el-form-item :label="$t('table.audio')">
<el-select <el-select
v-model="formONVIFData.rtspAudioType" v-model="formONVIFData.rtspAudioType"
style="width:350px;" style="width:100%;"
placeholder="请选择" placeholder="请选择"
@change="selectChange" @change="selectChange"
> >
@ -174,31 +180,70 @@
$t("table.close") $t("table.close")
}}</el-radio> }}</el-radio>
</el-form-item> </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-form-item :label="$t('table.WAN_IP_Type')">
<el-select <el-select
v-model="formONVIFData.wanType" v-model="formONVIFData.wanType"
style="width:350px;" style="width:100%;"
@change="selectChangeNet" @change="selectChangeNet"
> >
<el-option <el-option
v-for="item in NetType" v-for="item in NetType"
:key="item.key" :key="item.key"
:label="item.label" :label="item.label"
:value="item.key" :value="item.key"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.WAN_IP_DomainName')" v-if="formONVIFData.wanType === '1'"> <el-form-item v-if="formONVIFData.wanType === '1'" :label="$t('table.WAN_IP_DomainName')">
<el-input v-model="formONVIFData.wanDomainName" /> <el-input v-model="formONVIFData.wanDomainName" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.WAN_IP_Address')" v-if="formONVIFData.wanType === '0'"> <el-form-item v-if="formONVIFData.wanType === '0'" :label="$t('table.WAN_IP_Address')">
<el-input v-model="formONVIFData.wanIP" /> <el-input v-model="formONVIFData.wanIP" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.WAN_Port')"> <el-form-item :label="$t('table.WAN_Port')">
<el-input v-model="formONVIFData.wanOnvifPort" type="number" :min="0" :max="65535"/> <el-input v-model="formONVIFData.wanOnvifPort" type="number" :min="0" :max="65535" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.WAN_RTSP_Port')"> <!-- <el-form-item :label="$t('table.WAN_RTSP_Port')">-->
<el-input v-model="formONVIFData.wanRTSPPort" type="number" :min="0" :max="65535"/> <!-- <el-input v-model="formONVIFData.wanRTSPPort" type="number" :min="0" :max="65535" />-->
<!-- </el-form-item>-->
</el-form>
<el-form
v-show="selectIndex === '2'"
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-item>
</el-form> </el-form>
<el-button <el-button
@ -216,7 +261,6 @@
import { deviceInfo, deviceEdit } from '@/api/index.js' import { deviceInfo, deviceEdit } from '@/api/index.js'
import { encryptData, decryptData } from '@/utils/encryption/entrypt' import { encryptData, decryptData } from '@/utils/encryption/entrypt'
export default { export default {
name: 'Agreement', name: 'Agreement',
data() { data() {
@ -225,25 +269,29 @@ export default {
tabOptions: [ tabOptions: [
{ {
label: 'ONVIF', label: 'ONVIF',
key: '2' key: '0'
}, },
{ {
label: 'SIP', label: 'SIP',
key: '1' key: '1'
}, },
{ {
label: 'UDP', label: 'HTTP',
key: '0' key: '3'
},
{
label: 'SPDCP',
key: '2'
} }
], ],
NetType: [ NetType: [
{ {
label: this.$t('table.WAN_IP_Address'), label: this.$t('table.WAN_IP_Address'),
key:"0", key: '0'
}, },
{ {
label: this.$t('table.WAN_IP_DomainName'), label: this.$t('table.WAN_IP_DomainName'),
key:"1", key: '1'
} }
], ],
selectIndex: '0', selectIndex: '0',
@ -266,9 +314,11 @@ export default {
sipUsername: '', sipUsername: '',
sipPassword: '', sipPassword: '',
sipPassword2: '', sipPassword2: '',
sipCallFunc:'off', sipCallFunc: 'off',
sipCallUsername0:'', sipCallUsername0: '',
sipCallUsername1:'', sipCallUsername1: '',
sipPort: '',
sipRtpPort: ''
}, },
formONVIFData: { formONVIFData: {
onvif: '', onvif: '',
@ -285,7 +335,14 @@ export default {
wanOnvifPort: '', wanOnvifPort: '',
wanRTSPPort: '', wanRTSPPort: '',
wanDomainName: '', wanDomainName: '',
wanType:"0", wanType: '0',
rtspPort: '',
rtpPort: ''
},
formHTTPData: {
httpPort: '',
webPort: '',
httpApiAuth: ''
}, },
sipPasswordType: 'password', sipPasswordType: 'password',
@ -361,6 +418,9 @@ export default {
res.data.sipPassword = decryptData(res.data.sipPassword) res.data.sipPassword = decryptData(res.data.sipPassword)
this.formSIPData.sipPassword = res.data.sipPassword this.formSIPData.sipPassword = res.data.sipPassword
this.formSIPData.sipPassword2 = res.data.sipPassword this.formSIPData.sipPassword2 = res.data.sipPassword
this.formSIPData.sipPort = res.data.sipPort
this.formSIPData.sipRtpPort = res.data.sipRtpPort
this.formSIPData.sipCallFunc = res.data.sipCallFunc this.formSIPData.sipCallFunc = res.data.sipCallFunc
// this.formSIPData.sipCallFunc = 'on' // this.formSIPData.sipCallFunc = 'on'
this.formSIPData.sipCallUsername0 = res.data.sipCallUsername0 this.formSIPData.sipCallUsername0 = res.data.sipCallUsername0
@ -377,6 +437,8 @@ export default {
this.formONVIFData.rtspAudioTypeArr = res.data.rtspAudioTypeArr this.formONVIFData.rtspAudioTypeArr = res.data.rtspAudioTypeArr
this.formONVIFData.rtspAudioType = res.data.rtspAudioType this.formONVIFData.rtspAudioType = res.data.rtspAudioType
this.formONVIFData.onvifAuth = res.data.onvifAuth 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.wanIP = res.data.wanIP
this.formONVIFData.wanOnvifPort = res.data.wanOnvifPort this.formONVIFData.wanOnvifPort = res.data.wanOnvifPort
@ -384,6 +446,10 @@ export default {
this.formONVIFData.wanDomainName = res.data.wanDomainName this.formONVIFData.wanDomainName = res.data.wanDomainName
this.formONVIFData.wanType = res.data.wanType this.formONVIFData.wanType = res.data.wanType
this.formHTTPData.httpPort = res.data.httpPort
this.formHTTPData.webPort = res.data.webPort
this.formHTTPData.httpApiAuth = res.data.httpApiAuth
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
@ -397,6 +463,55 @@ export default {
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]?)$/ 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]?)$/
const wanDName = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/ const wanDName = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/
// const wanDIP = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/ // const wanDIP = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
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)
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 === '2') { if (this.selectIndex === '2') {
param = { param = {
...this.formUDPData ...this.formUDPData
@ -457,8 +572,7 @@ export default {
}) })
return return
} }
} } else if (this.selectIndex === '1') {
else if (this.selectIndex === '1') {
param = { param = {
...this.formSIPData ...this.formSIPData
} }
@ -487,13 +601,12 @@ export default {
} }
param.sipPassword = encryptData(param.sipPassword) param.sipPassword = encryptData(param.sipPassword)
param.sipPassword2 = encryptData(param.sipPassword2) param.sipPassword2 = encryptData(param.sipPassword2)
} } else if (this.selectIndex === '0') {
else if (this.selectIndex === '0') {
param = { param = {
...this.formONVIFData ...this.formONVIFData
} }
if(this.formONVIFData.wanDomainName !== ''){ if (this.formONVIFData.wanDomainName !== '') {
if(!wanDName.test(param.wanDomainName)){ if (!wanDName.test(param.wanDomainName)) {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: this.$i18n.t('table.isRight7') message: this.$i18n.t('table.isRight7')
@ -501,8 +614,8 @@ export default {
return return
} }
} }
if(this.formONVIFData.wanIP !== ''){ if (this.formONVIFData.wanIP !== '') {
if(!ipv4Regex.test(param.wanIP)){ if (!ipv4Regex.test(param.wanIP)) {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: this.$i18n.t('table.isRight4') message: this.$i18n.t('table.isRight4')
@ -510,30 +623,30 @@ export default {
return return
} }
} }
if(this.formONVIFData.wanOnvifPort !== ''){ if (this.formONVIFData.wanOnvifPort !== '') {
const l = Number(this.formONVIFData.wanOnvifPort); const l = Number(this.formONVIFData.wanOnvifPort)
if(l > 0 && l < 65536){ // eslint-disable-next-line no-empty
if (l > 0 && l < 65536) {
} } else {
else {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: this.$i18n.t('table.isRight5') message: this.$i18n.t('table.isRight5')
}) })
return; return
} }
} }
if(this.formONVIFData.wanRTSPPort !== ''){ if (this.formONVIFData.wanRTSPPort !== '') {
const l = Number(this.formONVIFData.wanRTSPPort); const l = Number(this.formONVIFData.wanRTSPPort)
if(l > 0 && l < 65536){ // eslint-disable-next-line no-empty
if (l > 0 && l < 65536) {
} } else {
else {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: this.$i18n.t('table.isRight6') message: this.$i18n.t('table.isRight6')
}) })
return; return
} }
} }
if (!param.onvifUsername) { if (!param.onvifUsername) {
@ -587,6 +700,38 @@ export default {
}) })
return return
} }
if (!param.rtspPort) {
this.$message({
type: 'warning',
message: this.$i18n.t('table.rtspPort') + this.$i18n.t('table.isEmpty')
})
return
}
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) console.log(param)
deviceEdit(param).then((res) => { deviceEdit(param).then((res) => {
@ -603,12 +748,12 @@ export default {
} }
}) })
}, },
IPV4Single(ip){ IPV4Single(ip) {
// //
const IPV4 = /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/; const IPV4 = /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/
// true false // true false
return IPV4.test(ip) return IPV4.test(ip)
}, }
} }
} }
</script> </script>

View File

@ -109,12 +109,12 @@ export default {
aoVol: 0, // aoVol: 0, //
dhcp: 'on', dhcp: 'on',
playStatus: '',// playStatus: '', //
dns0: '',// dns1 dns0: '', // dns1
dns1: '',// dns2 dns1: '', // dns2
wanDomainName: '',// Wan wanDomainName: '', // Wan
wanIP: '',// wan IP wanIP: '', // wan IP
wanInfo: '',// wan wanInfo: ''// wan
} }
} }
}, },
@ -131,12 +131,11 @@ export default {
this.formData.dns0 = res.data.dns0 || '' this.formData.dns0 = res.data.dns0 || ''
this.formData.dns1 = res.data.dns1 || '' this.formData.dns1 = res.data.dns1 || ''
this.formData.wanIP = res.data.wanIP || '' this.formData.wanIP = res.data.wanIP || ''
if(res.data.wanDomainName !== undefined){ if (res.data.wanDomainName !== undefined) {
this.formData.wanDomainName = res.data.wanDomainName || '' this.formData.wanDomainName = res.data.wanDomainName || ''
console.log('AAA', res) console.log('AAA', res)
} }
this.formData.wanInfo = `${this.formData.wanDomainName} (${this.formData.wanIP})` this.formData.wanInfo = `${this.formData.wanDomainName} (${this.formData.wanIP})`
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }

View File

@ -61,14 +61,14 @@ export default {
name: 'FactorySetting', name: 'FactorySetting',
data() { data() {
return { return {
DataDB:{ DataDB: {
status:0, status: 0,
file:'', file: ''
} }
} }
}, },
mounted() { mounted() {
this.getPacketInfo(); this.getPacketInfo()
}, },
methods: { methods: {
factorySetting() { factorySetting() {
@ -138,49 +138,48 @@ export default {
}) })
}, },
StartPacketCapture(Flag){ getPacketInfo() {
if(Flag === 1){ 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 => { startPacketCapture({}).then(res => {
setTimeout(()=>{ setTimeout(() => {
this.getPacketInfo(); this.getPacketInfo()
}, 300); }, 300)
}); })
} } else if (Flag === 0) {
else if(Flag === 0){
stopPacketCapture({}).then(res => { stopPacketCapture({}).then(res => {
setTimeout(()=>{ setTimeout(() => {
this.getPacketInfo(); this.getPacketInfo()
}, 300); }, 300)
}) })
} }
}, },
getPacketInfo(){ DeletePacketCaptureRecords() {
getPacketCaptureInfo({}).then(res => {
const data = res.data;
this.DataDB.status = data.status;
this.DataDB.file = data.file;
}).catch(() => {
});
},
DeletePacketCaptureRecords(){
const data = { const data = {
name: this.DataDB.file, name: this.DataDB.file
}; }
// console.log(data); // console.log(data);
deletePacketCapture(data).then(res => { deletePacketCapture(data).then(res => {
this.DataDB.status = 0; this.DataDB.status = 0
this.$message.success(this.$i18n.t('table.Delete') + this.$i18n.t('table.success')) this.$message.success(this.$i18n.t('table.Delete') + this.$i18n.t('table.success'))
}).catch(() => { }).catch(() => {
}); })
}, },
DownloadFile(){ DownloadFile() {
if(this.DataDB.file === ''){ if (this.DataDB.file === '') {
return; return
} }
const URL = '/prod-api/pcap/' + this.DataDB.file; const URL = '/prod-api/pcap/' + this.DataDB.file
window.open(URL); window.open(URL)
} }
} }
} }

View File

@ -15,7 +15,7 @@
<h3 class="title"> <h3 class="title">
IP Speaker IP Speaker
</h3> </h3>
<!-- <img src="@/assets/login/logo_white.svg" alt="">--> <!-- <img src="@/assets/login/logo_white.svg" alt="">-->
<h3 class="title"> <h3 class="title">
{{ $t('login.title') }} {{ $t('login.title') }}
</h3> </h3>

View File

@ -22,7 +22,7 @@
<el-table-column <el-table-column
:label="$t('table.actions')" :label="$t('table.actions')"
align="center" align="center"
width="160" width="220"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -33,9 +33,9 @@
{{ $t("table.check") }} {{ $t("table.check") }}
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
@click="download(scope.row.name)" @click="download(scope.row.name)"
> >
{{ $t("table.Download") }} {{ $t("table.Download") }}
</el-button> </el-button>
@ -52,25 +52,33 @@
</el-table> </el-table>
</div> </div>
<el-dialog class="logdialog" :visible.sync="dialogVisible" :title="$t('route.operationLog') + ' ' + rowName" width="75%" :before-close="closeDia" :close-on-click-modal="false" :close-on-press-escape="false"> <el-dialog
class="logdialog"
:visible.sync="dialogVisible"
:title="$t('route.operationLog') + ' ' + rowName"
width="75%"
:before-close="closeDia"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-scrollbar ref="scrollbar" style="height: 60vh;width:100%;background: #333;" wrap-style="overflow-x:hidden;"> <el-scrollbar ref="scrollbar" style="height: 60vh;width:100%;background: #333;" wrap-style="overflow-x:hidden;">
<div class="logcard" style="white-space: pre-line;" v-html="logData" /> <div class="logcard" style="white-space: pre-line;" v-html="logData" />
</el-scrollbar> </el-scrollbar>
<div class="ftbtnbox"> <div class="ftbtnbox">
<el-checkbox v-model="refreshChecked" class="refreshbox" @change="changeChecked">{{ <el-checkbox v-model="refreshChecked" class="refreshbox" @change="changeChecked">{{
$t("table.refresh") $t("table.refresh") }}
}}</el-checkbox> </el-checkbox>
<el-button class="ftbtn ftbtn2" @click="toTop">{{ <el-button class="ftbtn ftbtn2" @click="toTop">{{
$t("table.toTop") $t("table.toTop")
}}</el-button> }}</el-button>
<el-button class="ftbtn ftbtn2" @click="toBottom">{{ <el-button class="ftbtn ftbtn2" @click="toBottom">{{
$t("table.toBottom") $t("table.toBottom")
}}</el-button> }}</el-button>
<el-button class="ftbtn ftbtn2" @click="clearCon">{{ <!-- <el-button class="ftbtn ftbtn2" @click="clearCon">{{-->
$t("table.clear") <!-- $t("table.clear")-->
}}</el-button> <!-- }}</el-button>-->
<el-button class="ftbtn ftbtn3" @click="closeDia">{{ <el-button class="ftbtn ftbtn3" @click="closeDia">{{
$t("table.close") $t("table.close1")
}}</el-button> }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -187,19 +195,19 @@ export default {
toBottom() { toBottom() {
this.$refs.scrollbar.wrap.scrollTop = this.$refs.scrollbar.wrap.scrollHeight this.$refs.scrollbar.wrap.scrollTop = this.$refs.scrollbar.wrap.scrollHeight
}, },
clearCon() { // clearCon() {
this.logData = '' // this.logData = ''
}, // },
closeDia() { closeDia() {
this.dialogVisible = false this.dialogVisible = false
this.rowName = '' this.rowName = ''
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
}, },
download(name){ download(name) {
const URL = '/prod-api/log/download/' + name; const URL = '/prod-api/log/download/' + name
window.open(URL); window.open(URL)
}, }
} }
} }
</script> </script>

View File

@ -92,8 +92,8 @@ export default {
data() { data() {
return { return {
formData: { formData: {
dns0:'', dns0: '',
dns1:'', dns1: '',
name: '', name: '',
model: '', model: '',
mac: '', mac: '',
@ -133,8 +133,7 @@ export default {
this.formData.aoVol = parseInt(res.data.aoVol) || 0 this.formData.aoVol = parseInt(res.data.aoVol) || 0
this.formData.dns0 = res.data.dns0 || '' this.formData.dns0 = res.data.dns0 || ''
this.formData.dns1 = res.data.dns1 || '' this.formData.dns1 = res.data.dns1 || ''
} } else {
else {
this.$message.error(res.message) this.$message.error(res.message)
} }
}) })
@ -146,7 +145,7 @@ export default {
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]?)$/ 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]?)$/
const idRegex = /^(?:[2-9]\d{0,3}|1\d{0,3}|9999)$/ const idRegex = /^(?:[2-9]\d{0,3}|1\d{0,3}|9999)$/
const subnetRegex = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/ const subnetRegex = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/
const dnsRegex = /^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*$/; // const dnsRegex = /^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*$/
// Id // Id
if (!param.id) { if (!param.id) {
this.$message({ this.$message({

View File

@ -87,7 +87,7 @@ module.exports = {
// before: require('./mock/mock-server.js'), // before: require('./mock/mock-server.js'),
proxy: { proxy: {
'/dev-api': { '/dev-api': {
target: 'http://127.0.0.1:8080', // http://127.0.0.1:8080 target: 'http://192.168.1.182:8080', // http://127.0.0.1:8080
secure: true, // 如果是https接口需要配置这个参数 secure: true, // 如果是https接口需要配置这个参数
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置 changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
pathRewrite: { '^/dev-api': '' } pathRewrite: { '^/dev-api': '' }