Compare commits

..

No commits in common. "e98c8b7e82e4a4ffb1996788c3fa55e8f7213ee0" and "08f785f5163c6e1fce0706ce833f518a4ce2c041" have entirely different histories.

4 changed files with 41 additions and 95 deletions

View File

@ -45,7 +45,7 @@
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '排队数'">
<span style="font-size: 15px;">排队数</span><br />
<span style="font-size: 30px; font-weight: bold">{{ newDataArr[0].n_queue }}</span>
<span style="font-size: 30px; font-weight: bold">{{ queue }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '检测数'">
<span style="font-size: 15px;">检测数</span><br />
@ -144,6 +144,7 @@ export default {
//
flow: 0,
isRefer: true,
valueShow: {},
//
queue: '',
@ -158,8 +159,8 @@ export default {
methods: {
//
getDataArr(val) {
this.getNewQueue(val)
this.newDataArr = val
this.getNewQueue(this.newDataArr)
},
getTotal(dataArr) {
if (this.title == '类型') {
@ -170,27 +171,20 @@ export default {
},
//
getNewQueue(val) {
console.log("val",val)
this.newDataArr = val
if (val[0].n_queue) {
this.newDataArr[0].n_queue = val[0].n_queue;
}
if (val[0].ave_queue) {
this.newDataArr[0].n_queue = val[0].ave_queue;
}
if (val[0].headway) {
this.queue = val[0].n_queue;
} else if (val[0].ave_queue) {
this.queue = val[0].ave_queue;
} else if (val[0].headway) {
this.newDataArr[0].headway = val[0].headway;
}
if (val[0].ave_headway) {
} else if (val[0].ave_headway) {
this.newDataArr[0].headway = val[0].ave_headway;
}
if (val[0].n_stay) {
}else if (val[0].n_stay) {
this.newDataArr[0].n_stay = val[0].n_stay;
}
if (val[0].ave_stay) {
} else if (val[0].ave_stay) {
this.newDataArr[0].n_stay = val[0].ave_stay;
}
},
},

View File

@ -24,7 +24,7 @@ export default {
//编辑保存组件弹窗传参
setHostName: 'http://172.16.1.168:5000/api/SetHostName',
setHostTime: 'http://172.16.1.168:5000/api/SetHostTime',
changePassowrd:'http://172.16.1.168:5000/api/ChangePassword'
// changePassowrd:'http://172.16.1.168:5000/api/ChangePassword'
// `http://${ipUurl}:5000/api/AddShipjk`
// dataUrl: `http://${ipUurl}:5000/api/AddShipjk`,
// getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`,

View File

@ -757,8 +757,8 @@ export default {
OnSceneload(newV) {
var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
// this.$refs.analysisWeb.contentWindow.getIpData('http://172.16.1.168:5000');
this.$refs.analysisWeb.contentWindow.getIpData(this.ipData);
this.$refs.analysisWeb.contentWindow.getIpData('http://172.16.1.168:5000');
// this.$refs.analysisWeb.contentWindow.getIpData(this.ipData);
this.$refs.analysisWeb.contentWindow.getDianwei(this.$route.query.id);
this.unityDone = true;
window.publish('Custom',JSON.stringify({"type":'getImage',"videoid":this.$route.query.id}));

View File

@ -270,37 +270,24 @@ export default {
let valdata2 = value.split('/')[1];
console.log("valdata",valdata)
console.log("valdata2",valdata2)
let valdata3 = value.split('/')[2];
let isCorrect = true;
if (valdata.length) {
for (let i = 0; i < valdata.length; i++) {
const re = /^[0-9]*[1-9][0-9]*$/;
const rsCheck = re.test(value);
// if (regexp.test(valdata[i]) == false&&!Number(valdata2)&&(valdata2 < 1 || valdata2 > 32)&&valdata3&&!rsCheck) {
if (regexp.test(valdata[i]) == false) {
isCorrect = false;
callback(new Error('请输入正确的IP地址'));
}else{
if (!Number(valdata2)) {
if (regexp.test(valdata[i]) == false) {
if (!Number(valdata2)) {
// callback(new Error('[1,32]'));
isCorrect = false;
callback(new Error('请输入正确的IP地址'));
} else {
if (valdata2 < 1 || valdata2 > 32) {
callback(new Error('请输入整数,值为[1,32]'));
isCorrect = false;
}
if(valdata3){
isCorrect = false;
callback(new Error('请输入正确的IP地址'));
} else {
callback();
}
}
}
}
}
}
}
}
@ -375,7 +362,7 @@ export default {
}
],
sizeForm: {
name: '',
name: 'eth0',
region: '00:11:14:1a:62:fe',
MTU: '1500',
date2: '',
@ -445,8 +432,8 @@ export default {
},
options: [
{
value: '',
label: ''
value: 'eth0',
label: 'eth0'
},
// {
// value: 'wlan0',
@ -456,7 +443,7 @@ export default {
//
netWork:[
{
name: '',
name: 'eth0',
region: '00:11:14:1a:62:fe',
MTU: '1500',
date2: '',
@ -557,12 +544,12 @@ export default {
},
created() {
this.createMqtt()
setTimeout(() => {
this.publishClient()
}, 1000 * 3 );
},
mounted() {
// window.setInterval( () => { //30 this.getdata()
// this.publishClient()
// }, 1000 * 5 )
},
methods:{
//
@ -582,7 +569,7 @@ export default {
var ner = {
type:"netplanSet",
ethName:sizeForm.name,
ethName:"eth0",
dhcp4: false,
addresses:tableDataN,//
gateway4:sizeForm.gateway4,
@ -595,49 +582,12 @@ export default {
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '设置成功!'
});
// this.$message({
// type: 'success',
// message: '!'
// });
console.log("JSON.stringify(ner)",JSON.stringify(ner))
window.publish('Contorl_client',JSON.stringify(ner));
this.sizeForm={
name: '',
region: '00:11:14:1a:62:fe',
MTU: '1500',
date2: '',
delivery: false,
type: [],
resource: '',
desc: true,
ip: '192.168.1.5/24',
ip1: '192.168.50.10/24',
ip2: 'e.g.192.168.50.10/24',
ip3: 'e.g.192.168.50.10/24',
ip4: 'e.g.192.168.50.10/24',
dns1: 'e.g.1.1.1.1',
dns2: 'e.g.1.0.0.1',
dns3: 'e.g.1.0.0.1',
status:'NO',
gateway4: '',
mtu:'',
mac:'',
moren:'',
speed:'',
tableRouter: [],
tableData: [],
tableDataDNS: [],
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
loading.close();
this.publishClient()
}, 5000);
// window.publish('Contorl_client',JSON.stringify(ner));
})
.catch(() => {
this.$message({
@ -698,7 +648,9 @@ export default {
//
var topicSends = ['Contorl_server'];
window.PubScribe(topicSends,-1,this.realInfo);
setTimeout(() => {
this.publishClient()
}, 5000);
},
publishClient(){
window.publish('Contorl_client',JSON.stringify({"type":"getNet"}));
@ -732,9 +684,9 @@ export default {
changeNetstates(msg){
console.log("msg",msg)
// var optionsDataN = this.optionsData
console.log(" msg.netstates[this.optionsData]",this.optionsData)
// this.sizeForm.mtu = msg.netstatesthis.optionsData}.mtu
console.log(" msg.netstates[this.optionsData]",msg.netstates[this.optionsData])
if(msg.netstates[this.optionsData]!=undefined){
this.sizeForm.name = this.optionsData
this.sizeForm.mtu = msg.netstates[this.optionsData].mtu
var data = msg.netaddres[this.optionsData]
this.sizeForm.speed = msg.netstates[this.optionsData].speed