From 6334e520effb0f6f2a9ea44a154a6c654acb4c5f Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Fri, 2 Feb 2024 14:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E9=80=89=E6=8B=A9=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=97=B6=EF=BC=8C=E5=AF=B9=E6=A8=A1=E5=BC=8F=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/instrument/index.vue | 83 +++++++++++++------ 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue index ed17aa2..b0e3227 100644 --- a/flossom-ui/src/views/system/instrument/index.vue +++ b/flossom-ui/src/views/system/instrument/index.vue @@ -505,7 +505,7 @@ - + @@ -1683,13 +1683,15 @@ export default { this.open = true this.title = '添加仪器列' /* 所有模式选项 */ - this.mode.modeIdsOptions = [] - listAllMode().then((response) => { - if (response.code != 200) { - this.$message.error('模式获取失败') - } - this.mode.modeIdsOptions = response.data - }) + this.mode.modeIdsOptions = []; + listAllMode({ + instrumentType: this.form.type + }).then((response) => { + if (response.code != 200) { + this.$message.error('模式获取失败') + } + this.mode.modeIdsOptions = response.data + }) }, /** 修改按钮操作 */ handleUpdate(row) { @@ -1798,9 +1800,12 @@ export default { this.introduceList = response.data.introduceList } - /* 所有模式选项 */ + /* 模式选项 */ this.mode.modeIdsOptions = [] - listAllMode().then((response) => { + listAllMode({ + instrumentType: this.form.type, + instrumentModel: this.form.model + }).then((response) => { if (response.code != 200) { this.$message.error('模式获取失败') } @@ -2012,22 +2017,48 @@ export default { typeChange() { // 非IOT仪器 if (this.form.type == 1) { - this.form.model = 'WL200' - this.form.nursingTime = null - this.form.iotVersion = null - this.form.iotUpgradeData = null - this.form.bluetoothConnecting = null - this.form.bluetoothConnectingTitle = null - this.form.bluetoothConnectingContent = null - this.form.bluetoothConnectFail = null - this.form.bluetoothConnectFailTitle = null - this.form.bluetoothConnectFailContent = null - this.form.bluetoothClosed = null - this.form.bluetoothClosedTitle = null - this.form.bluetoothClosedContent = null - this.form.iotVersionUpgrade = null - } - }, + this.form.model = null; + this.form.nursingTime = null; + this.form.iotVersion = null; + this.form.iotUpgradeData = null; + this.form.bluetoothConnecting = null; + this.form.bluetoothConnectingTitle = null; + this.form.bluetoothConnectingContent = null; + this.form.bluetoothConnectFail = null; + this.form.bluetoothConnectFailTitle = null; + this.form.bluetoothConnectFailContent = null; + this.form.bluetoothClosed = null; + this.form.bluetoothClosedTitle = null; + this.form.bluetoothClosedContent = null; + this.form.iotVersionUpgrade = null; + } else { + this.form.model = 'WL200'; + } + /* 模式选项 */ + this.mode.modeIdsOptions = []; + listAllMode({ + instrumentType: this.form.type, + instrumentModel: this.form.model + }).then((response) => { + if (response.code != 200) { + this.$message.error('模式获取失败') + } + this.mode.modeIdsOptions = response.data + }) + }, + modelChange() { + /* 模式选项 */ + this.mode.modeIdsOptions = []; + listAllMode({ + instrumentType: this.form.type, + instrumentModel: this.form.model + }).then((response) => { + if (response.code != 200) { + this.$message.error('模式获取失败') + } + this.mode.modeIdsOptions = response.data + }) + }, /* 是否购买切换 */ isPurchaseChang() { if (this.form.isPurchase == 0) {