diff --git a/vue/src/views/iot/product/product-things-model.vue b/vue/src/views/iot/product/product-things-model.vue index 088fe600..9b671012 100644 --- a/vue/src/views/iot/product/product-things-model.vue +++ b/vue/src/views/iot/product/product-things-model.vue @@ -39,7 +39,7 @@ - + @@ -355,6 +355,7 @@ export default { this.form.datatype = "integer" this.form.specs = { enumList: [], + arrayType: "int" }; }, /** 修改按钮操作 */ @@ -543,8 +544,6 @@ export default { value: "", text: "" }]; - } else if (val == "array") { - this.form.specs.arrayType = "int"; } }, /** 添加枚举项 */ diff --git a/vue/src/views/iot/template/index.vue b/vue/src/views/iot/template/index.vue index 51077152..0d5e8eb8 100644 --- a/vue/src/views/iot/template/index.vue +++ b/vue/src/views/iot/template/index.vue @@ -63,7 +63,7 @@ - + @@ -75,8 +75,8 @@ @@ -278,17 +278,17 @@ export default { this.init(); }, methods: { - init(){ - if (this.$store.state.user.roles.indexOf("admin") !== -1){ - this.canEdit = true - } + init() { + if (this.$store.state.user.roles.indexOf("admin") !== -1) { + this.canEdit = true + } }, /** 查询通用物模型列表 */ getList() { this.loading = true; - if (this.$store.state.user.roles.indexOf("admin") === -1){ - this.queryParams.tenantName = this.$store.state.user.name - } + if (this.$store.state.user.roles.indexOf("admin") === -1) { + this.queryParams.tenantName = this.$store.state.user.name + } listTemplate(this.queryParams).then((response) => { this.templateList = response.rows; this.total = response.total; @@ -350,6 +350,7 @@ export default { this.form.datatype = "integer" this.form.specs = { enumList: [], + arrayType: "int" }; }, /** 修改按钮操作 */ @@ -377,8 +378,8 @@ export default { this.form.isMonitor = 0; this.form.isTop = 0; } - // 添加通用物模型的修改者 - this.form.updateBy = this.$store.state.user.name + // 添加通用物模型的修改者 + this.form.updateBy = this.$store.state.user.name updateTemplate(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -428,15 +429,15 @@ export default { ); }, // 类型改变 - typeChange(label){ - if(label==2 || label==3){ - this.form.isMonitor=0; + typeChange(label) { + if (label == 2 || label == 3) { + this.form.isMonitor = 0; } }, // 实时监测改变 - changeMonitor(isMonitor){ - if(isMonitor==1 && this.form.datatype!="integer" && this.form.datatype!="decimal"){ - this.form.datatype="integer"; + changeMonitor(isMonitor) { + if (isMonitor == 1 && this.form.datatype != "integer" && this.form.datatype != "decimal") { + this.form.datatype = "integer"; } }, // 格式化物模型 @@ -467,8 +468,6 @@ export default { value: "", text: "" }]; - } else if (val == "array") { - this.form.specs.arrayType = "int"; } }, /** 添加枚举项 */