Compare commits

...

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

12 changed files with 126 additions and 135 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.$router.push('/')
})
}
else {
} else {
this.$router.push('/login')
return
}

View File

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

View File

@ -43,8 +43,8 @@ export default {
upDateMsg: 'Firmware is being upgraded, please wait for a while。'
},
table: {
DNS1:"Preferred DNS Server",
DNS2:"Alternate DNS Server",
DNS1: 'Preferred DNS Server',
DNS2: 'Alternate DNS Server',
productName: 'Product Name',
productMode: 'Product Model',
serialNumber: 'Serial Number',
@ -112,7 +112,7 @@ export default {
chooseFile: 'Upgrade File',
microphoneSwitch: 'Microphone Switch',
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 default IP address of the device in the factory state is 192.168.1.108. After the restoration, you need to log in again.',
fileUpload: 'File uploading...',
fileSave: 'Saving...',
routerRestartIng: 'Device Rebooting...',
@ -205,7 +205,7 @@ export default {
lsssCode: 'Failed to update the firmware, because the file version is too low.', // 644code
EnableCalling: 'Whether or not to enable calling',
CallButton0: 'SIP Username (Button 1)',
CallButton1: 'SIP Username (Button 2)',
CallButton1: 'SIP Username (Button 2)'
},
theme: {
change: 'Change Theme',

View File

@ -36,11 +36,11 @@ export default {
changePassword: '修改密码',
changePasswordTip: '监测到密码过弱或者密码已过期,请先修改密码后登录',
changePasswordMsg: '密码过期,请先修改密码后登录!',
upDateMsg: '固件正在升级,请稍等一段时间。',
upDateMsg: '固件正在升级,请稍等一段时间。'
},
table: {
DNS1:"首选DNS服务器",
DNS2:"备用DNS服务器",
DNS1: '首选DNS服务器',
DNS2: '备用DNS服务器',
productName: '产品名称',
productMode: '型号',
serialNumber: '序列号',
@ -104,7 +104,7 @@ export default {
chooseFile: '选择文件',
microphoneSwitch: '内置麦克风开关',
factorySettingsTips:
'出厂状态默认设备IP地址为192.168.1.101,恢复完成后需重新登录。',
'出厂状态默认设备IP地址为192.168.1.108,恢复完成后需重新登录。',
routerRestartTips: '设备即将重启,是否确认继续!',
fileUpload: '文件上传中...',
fileSave: '正在保存...',
@ -197,7 +197,7 @@ export default {
lsssCode: '固件升级失败,此固件升级文件的版本号低于当前版本。', // 644code
EnableCalling: '是否启用呼叫',
CallButton0: 'SIP用户名称 (按键1)',
CallButton1: 'SIP用户名称 (按键2)',
CallButton1: 'SIP用户名称 (按键2)'
},
theme: {
change: '换肤',

View File

@ -105,10 +105,10 @@
<svg-icon :icon-class="sip2PasswordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</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-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-form-item>
</el-form>
@ -188,10 +188,10 @@
/>
</el-select>
</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-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-form-item>
<el-form-item :label="$t('table.WAN_Port')">
@ -216,7 +216,6 @@
import { deviceInfo, deviceEdit } from '@/api/index.js'
import { encryptData, decryptData } from '@/utils/encryption/entrypt'
export default {
name: 'Agreement',
data() {
@ -239,11 +238,11 @@ export default {
NetType: [
{
label: this.$t('table.WAN_IP_Address'),
key:"0",
key: '0'
},
{
label: this.$t('table.WAN_IP_DomainName'),
key:"1",
key: '1'
}
],
selectIndex: '0',
@ -268,7 +267,7 @@ export default {
sipPassword2: '',
sipCallFunc: 'off',
sipCallUsername0: '',
sipCallUsername1:'',
sipCallUsername1: ''
},
formONVIFData: {
onvif: '',
@ -285,7 +284,7 @@ export default {
wanOnvifPort: '',
wanRTSPPort: '',
wanDomainName: '',
wanType:"0",
wanType: '0'
},
sipPasswordType: 'password',
@ -457,8 +456,7 @@ export default {
})
return
}
}
else if (this.selectIndex === '1') {
} else if (this.selectIndex === '1') {
param = {
...this.formSIPData
}
@ -487,8 +485,7 @@ export default {
}
param.sipPassword = encryptData(param.sipPassword)
param.sipPassword2 = encryptData(param.sipPassword2)
}
else if (this.selectIndex === '0') {
} else if (this.selectIndex === '0') {
param = {
...this.formONVIFData
}
@ -511,29 +508,27 @@ export default {
}
}
if (this.formONVIFData.wanOnvifPort !== '') {
const l = Number(this.formONVIFData.wanOnvifPort);
const l = Number(this.formONVIFData.wanOnvifPort)
if (l > 0 && l < 65536) {
}
else {
} else {
this.$message({
type: 'warning',
message: this.$i18n.t('table.isRight5')
})
return;
return
}
}
if (this.formONVIFData.wanRTSPPort !== '') {
const l = Number(this.formONVIFData.wanRTSPPort);
const l = Number(this.formONVIFData.wanRTSPPort)
if (l > 0 && l < 65536) {
}
else {
} else {
this.$message({
type: 'warning',
message: this.$i18n.t('table.isRight6')
})
return;
return
}
}
if (!param.onvifUsername) {
@ -605,10 +600,10 @@ export default {
},
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
return IPV4.test(ip)
},
}
}
}
</script>

View File

@ -114,7 +114,7 @@ export default {
dns1: '', // dns2
wanDomainName: '', // Wan
wanIP: '', // wan IP
wanInfo: '',// wan
wanInfo: ''// wan
}
}
},
@ -136,7 +136,6 @@ export default {
console.log('AAA', res)
}
this.formData.wanInfo = `${this.formData.wanDomainName} (${this.formData.wanIP})`
} else {
this.$message.error(res.message)
}

View File

@ -23,27 +23,27 @@
<!-- <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 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>
@ -63,12 +63,12 @@ export default {
return {
DataDB: {
status: 0,
file:'',
file: ''
}
}
},
mounted() {
this.getPacketInfo();
this.getPacketInfo()
},
methods: {
factorySetting() {
@ -142,45 +142,44 @@ export default {
if (Flag === 1) {
startPacketCapture({}).then(res => {
setTimeout(() => {
this.getPacketInfo();
}, 300);
});
}
else if(Flag === 0){
this.getPacketInfo()
}, 300)
})
} else if (Flag === 0) {
stopPacketCapture({}).then(res => {
setTimeout(() => {
this.getPacketInfo();
}, 300);
this.getPacketInfo()
}, 300)
})
}
},
getPacketInfo() {
getPacketCaptureInfo({}).then(res => {
const data = res.data;
this.DataDB.status = data.status;
this.DataDB.file = data.file;
const data = res.data
this.DataDB.status = data.status
this.DataDB.file = data.file
}).catch(() => {
});
})
},
DeletePacketCaptureRecords() {
const data = {
name: this.DataDB.file,
};
name: this.DataDB.file
}
// console.log(data);
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'))
}).catch(() => {
});
})
},
DownloadFile() {
if (this.DataDB.file === '') {
return;
return
}
const URL = '/prod-api/pcap/' + this.DataDB.file;
window.open(URL);
const URL = '/prod-api/pcap/' + this.DataDB.file
window.open(URL)
}
}
}

View File

@ -197,9 +197,9 @@ export default {
this.timer = null
},
download(name) {
const URL = '/prod-api/log/download/' + name;
window.open(URL);
},
const URL = '/prod-api/log/download/' + name
window.open(URL)
}
}
}
</script>

View File

@ -133,8 +133,7 @@ export default {
this.formData.aoVol = parseInt(res.data.aoVol) || 0
this.formData.dns0 = res.data.dns0 || ''
this.formData.dns1 = res.data.dns1 || ''
}
else {
} else {
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 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 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
if (!param.id) {
this.$message({