This commit is contained in:
chengdandan 2023-03-22 16:45:38 +08:00
parent 0708f9fc37
commit e98c8b7e82
3 changed files with 46 additions and 40 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">{{ queue }}</span>
<span style="font-size: 30px; font-weight: bold">{{ newDataArr[0].n_queue }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '检测数'">
<span style="font-size: 15px;">检测数</span><br />
@ -144,7 +144,6 @@ export default {
//
flow: 0,
isRefer: true,
valueShow: {},
//
queue: '',
@ -159,8 +158,8 @@ export default {
methods: {
//
getDataArr(val) {
this.newDataArr = val
this.getNewQueue(this.newDataArr)
this.getNewQueue(val)
},
getTotal(dataArr) {
if (this.title == '类型') {
@ -171,20 +170,27 @@ export default {
},
//
getNewQueue(val) {
console.log("val",val)
this.newDataArr = val
if (val[0].n_queue) {
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].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.newDataArr[0].headway = val[0].headway;
} else if (val[0].ave_headway) {
}
if (val[0].ave_headway) {
this.newDataArr[0].headway = val[0].ave_headway;
}else if (val[0].n_stay) {
}
if (val[0].n_stay) {
this.newDataArr[0].n_stay = val[0].n_stay;
} else if (val[0].ave_stay) {
}
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

@ -268,38 +268,39 @@ export default {
// value.split("/")[0]
let valdata = value.split('/')[0];
let valdata2 = value.split('/')[1];
// let valdata3 = value.split('/')[1+n];
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++) {
// if(i!=1&&i!=0){
// console.log("i111111")
// isCorrect = false;
// callback(new Error('IP'));
// }else{
console.log("i5555")
if (regexp.test(valdata[i]) == false) {
console.log("i22222")
if (!Number(valdata2)) {
// callback(new Error('[1,32]'));
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)) {
isCorrect = false;
callback(new Error('请输入正确的IP地址'));
} else {
if (valdata2 < 1 || valdata2 > 32) {
console.log("i44444")
callback(new Error('请输入整数,值为[1,32]'));
isCorrect = false;
} else {
console.log("i3333")
callback(new Error('请输入正确的IP地址'));
}
if(valdata3){
isCorrect = false;
callback(new Error('请输入正确的IP地址'));
}
}
}
}
// }
}
}
}
@ -555,14 +556,13 @@ export default {
},
created() {
// this.publishClient()
this.createMqtt()
setTimeout(() => {
this.publishClient()
}, 1000 * 3 );
},
mounted() {
setTimeout(() => {
this.publishClient()
}, 1000 * 5 );
},
methods:{
//
@ -600,7 +600,7 @@ export default {
message: '设置成功!'
});
console.log("JSON.stringify(ner)",JSON.stringify(ner))
// window.publish('Contorl_client',JSON.stringify(ner));
window.publish('Contorl_client',JSON.stringify(ner));
this.sizeForm={
name: '',
region: '00:11:14:1a:62:fe',
@ -732,9 +732,9 @@ export default {
changeNetstates(msg){
console.log("msg",msg)
// var optionsDataN = this.optionsData
// this.sizeForm.mtu = msg.netstatesthis.optionsData}.mtu
console.log(" msg.netstates[this.optionsData]",msg.netstates[this.optionsData])
console.log(" msg.netstates[this.optionsData]",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