From 19aaa8ee42f0dbe5ce0ef801c6ee5964e4fdc090 Mon Sep 17 00:00:00 2001
From: z_yu <1534695664@qq.com>
Date: Fri, 12 Aug 2022 17:34:06 +0800
Subject: [PATCH] =?UTF-8?q?3d=E5=BA=93=E6=88=BF=E9=85=8D=E7=BD=AE=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../storeManage/warehouse3DConfig/index.vue | 30 +++++++++++--------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/views/storeManage/warehouse3DConfig/index.vue b/src/views/storeManage/warehouse3DConfig/index.vue
index 1713d47..3225d84 100644
--- a/src/views/storeManage/warehouse3DConfig/index.vue
+++ b/src/views/storeManage/warehouse3DConfig/index.vue
@@ -25,8 +25,8 @@
- {{ scope.row.displayParams.map(x => x.paramName).join(',') }}
- {{ scope.row.displayParams?scope.row.displayParams:'' }}
+ {{ scope.row.deviceSpecParams.map(x => x.paramName).join(',') }}
+ {{ scope.row.deviceSpecParams?scope.row.deviceSpecParams:'' }}
@@ -58,9 +58,9 @@
-
-
-
+
+
+
{{ item.label }} - {{ item.info }}
@@ -158,6 +158,11 @@ export default {
if (!isCAM && this.form.deviceInfo.id) {
this.getParamsOptionsList()
}
+ if (this.form.deviceSpecParams && this.form.deviceSpecParams.length > 0) {
+ const deviceSpecParams = this.form.deviceSpecParams.map((item) => { return item.id })
+ this.$set(this.form, 'deviceSpecParams', deviceSpecParams)
+ // this.form.deviceSpecParams.splice(0, this.form.deviceSpecParams.length, ...deviceSpecParams)
+ }
this.dialogVisible = true
} else {
this.$message({
@@ -172,17 +177,16 @@ export default {
},
handleConfirm() {
this.form.deviceInfo = this.devOptions.find((option) => { return option.value === this.form.deviceInfo.id }).self
- if (Array.isArray(this.form.displayParams)) {
- const paramValues = this.paramsOptions.filter((option) => { return this.form.displayParams.includes(option.value) })
- this.form.displayParams = paramValues.map((paramValue) => { return { paramName: paramValue.self.paramName, paramValue: paramValue.self.paramId, unit: paramValue.self.unit } })
- } else if (this.form.displayParams !== null) {
- const paramValue = this.paramsOptions.find((option) => { return option.value === this.form.displayParams })
+ if (Array.isArray(this.form.deviceSpecParams)) {
+ const paramValues = this.paramsOptions.filter((option) => { return this.form.deviceSpecParams.includes(option.value) })
+ this.form.deviceSpecParams = paramValues.map((paramValue) => { return paramValue.self })
+ } else if (this.form.deviceSpecParams !== null) {
+ const paramValue = this.paramsOptions.find((option) => { return option.value === this.form.deviceSpecParams })
if (paramValue) {
- this.form.displayParams = []
- this.form.displayParams.push({ paramName: paramValue.self.paramName, paramValue: paramValue.self.paramId, unit: paramValue.self.paramId })
+ this.form.deviceSpecParams = []
+ this.form.deviceSpecParams.push(paramValue.self)
}
}
- this.form.id = null
displayConfigApi.bind(this.form).then(() => {
this.$message.success('绑定成功 ')
this.dialogVisible = false