From 93c014db92d5d83176aea112f09efc698925f50d Mon Sep 17 00:00:00 2001 From: ptt <2403326863@qq.com> Date: Tue, 4 Nov 2025 17:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=87=8D=E9=87=8Fapi?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=951.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../measurement/operation/moltenironpound/index.vue | 9 +++++---- .../src/views/measurement/operation/outinpound/index.vue | 9 ++++++--- .../views/measurement/operation/shortdispound/index.vue | 8 ++++++-- .../src/views/measurement/operation/steelpound/index.vue | 8 ++++++-- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue index 637b72c..82ce4cf 100644 --- a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue @@ -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); + }) }, //单击主榜单进行单选。 //主榜单单击选中,并将车号进行赋值。(单选) diff --git a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue index 5e78868..08077e5 100644 --- a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue @@ -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() { diff --git a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue index 61eee4f..72cda5e 100644 --- a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue @@ -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(){ diff --git a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue index 6d7968a..b958166 100644 --- a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue @@ -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); + }) }, //单击主榜单进行单选。