获取重量api接口测试1.3
This commit is contained in:
parent
cfc2451fd2
commit
93c014db92
|
|
@ -905,12 +905,13 @@ export default {
|
|||
//检查是否选中磅点。
|
||||
if (!this.checkPoundSelected())return;
|
||||
// 生成 100 到 10000 的整数(代表 1.00 到 100.00)
|
||||
const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
getWeight(this.queryParams.poundid).then(response => {
|
||||
this.queryParams.weight = response;
|
||||
})
|
||||
//const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
// 转换为两位小数,内存中是有限小数
|
||||
//this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
getWeight(this.queryParams.poundid).then(response => {
|
||||
this.queryParams.weight = response;
|
||||
console.log("返参"+response);
|
||||
})
|
||||
},
|
||||
//单击主榜单进行单选。
|
||||
//主榜单单击选中,并将车号进行赋值。(单选)
|
||||
|
|
|
|||
|
|
@ -834,10 +834,13 @@ export default {
|
|||
// 生成随机重量(两位小数,避免精度问题)
|
||||
handleGetweight() {
|
||||
// 生成 100 到 10000 的整数(代表 1.00 到 100.00)
|
||||
const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
|
||||
//const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
getWeight(this.queryParams.poundid).then(response => {
|
||||
this.queryParams.weight = response;
|
||||
console.log("返参"+response);
|
||||
})
|
||||
// 转换为两位小数,内存中是有限小数
|
||||
this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
//this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
},
|
||||
//手动停止定时器
|
||||
handleStopTimer() {
|
||||
|
|
|
|||
|
|
@ -1024,10 +1024,14 @@ watch: {
|
|||
//检查是否选中磅点。
|
||||
if (!this.checkPoundSelected())return;
|
||||
// 生成 100 到 10000 的整数(代表 1.00 到 100.00)
|
||||
const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
//const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
|
||||
// 转换为两位小数,内存中是有限小数
|
||||
this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
//this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
getWeight(this.queryParams.poundid).then(response => {
|
||||
this.queryParams.weight = response;
|
||||
console.log("返参"+response);
|
||||
})
|
||||
},
|
||||
//新增皮重,将当前重量上的数据赋值到重量中,并且打开皮重弹窗
|
||||
getEmpPoundData(){
|
||||
|
|
|
|||
|
|
@ -712,10 +712,14 @@ export default {
|
|||
//检查是否选中磅点。
|
||||
if (!this.checkPoundSelected())return;
|
||||
// 生成 100 到 10000 的整数(代表 1.00 到 100.00)
|
||||
const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
//const randomInt = Math.floor(Math.random() * 9900 + 100);
|
||||
|
||||
// 转换为两位小数,内存中是有限小数
|
||||
this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
//this.queryParams.weight = new Decimal(randomInt / 100);
|
||||
getWeight(this.queryParams.poundid).then(response => {
|
||||
this.queryParams.weight = response;
|
||||
console.log("返参"+response);
|
||||
})
|
||||
},
|
||||
|
||||
//单击主榜单进行单选。
|
||||
|
|
|
|||
Loading…
Reference in New Issue