From 3484162577145de32e3f5735bb3fadd72327f9c7 Mon Sep 17 00:00:00 2001 From: zhangxiaoyin Date: Mon, 15 Jul 2024 11:11:13 +0800 Subject: [PATCH] feat: template --- CHANGELOG.EN.md | 10 ++ CHANGELOG.ZH.md | 10 ++ CHANGELOG.md | 10 ++ package.json | 4 +- src/api/Export/index.js | 2 +- src/config/developer.config.js | 8 +- src/views/CloudFunction/topo/topo.vue | 1 - src/views/DeviceCloud/manage/js/proddetail.js | 2 +- src/views/DeviceCloud/manage/profile.vue | 161 ++---------------- 9 files changed, 50 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.EN.md b/CHANGELOG.EN.md index 8e4f1a11cb..5c03486538 100644 --- a/CHANGELOG.EN.md +++ b/CHANGELOG.EN.md @@ -1,3 +1,13 @@ +## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-05-31) + + +### Features + +* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589)) +* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74)) + + + ## [4.8.6](https://github.com/dgiot/iotStudio/compare/v4.7.2...v4.8.6) (2023-11-03) diff --git a/CHANGELOG.ZH.md b/CHANGELOG.ZH.md index 8e4f1a11cb..5c03486538 100644 --- a/CHANGELOG.ZH.md +++ b/CHANGELOG.ZH.md @@ -1,3 +1,13 @@ +## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-05-31) + + +### Features + +* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589)) +* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74)) + + + ## [4.8.6](https://github.com/dgiot/iotStudio/compare/v4.7.2...v4.8.6) (2023-11-03) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4f1a11cb..5c03486538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-05-31) + + +### Features + +* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589)) +* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74)) + + + ## [4.8.6](https://github.com/dgiot/iotStudio/compare/v4.7.2...v4.8.6) (2023-11-03) diff --git a/package.json b/package.json index 1df54ec5f8..5a7930e174 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@dgiot/dgiot-dashboard", - "version": "4.8.6", - "author": "xxb", + "version": "4.8.7", + "author": "dgiot", "license": "MPL-2.0", "private": false, "homepage": "https://github.com/dgiot/iotStudio.git", diff --git a/src/api/Export/index.js b/src/api/Export/index.js index b406f13002..905521b890 100644 --- a/src/api/Export/index.js +++ b/src/api/Export/index.js @@ -40,7 +40,7 @@ export async function ExportParse(className, params) { console.log('_token', _token) // eslint-disable-next-line no-undef return axios - .post(`iotapi/export_data?classname=${className}`, params, { + .post(`/iotapi/export_data?classname=${className}`, params, { responseType: 'blob', headers: { Accept: 'application/json', diff --git a/src/config/developer.config.js b/src/config/developer.config.js index 14353ca5f4..95f2ba88ca 100644 --- a/src/config/developer.config.js +++ b/src/config/developer.config.js @@ -8,28 +8,28 @@ module.exports = { */ { path: 'iotapi', - target: 'https://dev.dgiotcloud.cn', + target: 'http://192.168.1.150', }, /** * @description 静态资源目录。开发使用 */ { path: 'dgiot_dashboard', - target: 'https://dev.dgiotcloud.cn', + target: 'http://192.168.1.150', }, /** * @description dgiot_file文件资源目录。开发使用 */ { path: 'dgiot_file', - target: 'https://dev.dgiotcloud.cn', + target: 'http://192.168.1.150', }, /** * @description dgiot_file文件资源目录。开发使用 */ { path: 'upload', - target: 'http://dev.dgiotcloud.cn', + target: 'http://192.168.1.150', }, /** * @description amis server 开发使用 diff --git a/src/views/CloudFunction/topo/topo.vue b/src/views/CloudFunction/topo/topo.vue index 1b56b63756..69d70929f2 100644 --- a/src/views/CloudFunction/topo/topo.vue +++ b/src/views/CloudFunction/topo/topo.vue @@ -14,7 +14,6 @@ - { - var newval = items['addr'] - das.push(newval) - }) - dgiotlog.log('sizeForm', sizeForm) - var obj = { - name: sizeForm.name, - devicetype: sizeForm.devicetype, - dataForm: { - round: sizeForm.round, - data: sizeForm.dinumber, - address: sizeForm.dis, - rate: sizeForm.rate, - offset: sizeForm.offset, - order: sizeForm.order, - protocol: sizeForm.protocol, - operatetype: sizeForm.operatetype, - originaltype: sizeForm.originaltype, - slaveid: sizeForm.slaveid, - collection: sizeForm.collection, - control: sizeForm.control, - strategy: sizeForm.strategy, - iscount: sizeForm.iscount, - countstrategy: sizeForm.countstrategy, - countround: sizeForm.countround, - countcollection: sizeForm.countcollection, - }, - ico: sizeForm.ico, - required: true, - accessMode: sizeForm.isread, - isshow: sizeForm.isshow, - identifier: sizeForm.identifier, - } - // 提交之前需要先判断类型 - if ( - sizeForm.type == 'float' || - sizeForm.type == 'double' || - sizeForm.type == 'int' || - sizeForm.type == 'long' - ) { - var obj1 = { - dataType: { - type: sizeForm.type.toLowerCase(), - specs: { - max: sizeForm.endnumber, - min: sizeForm.startnumber, - step: sizeForm.step, - precision: Number(sizeForm.precision), - unit: sizeForm.unit == '' ? '' : sizeForm.unit, - }, - das: das, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'image') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - imagevalue: sizeForm.imagevalue, - specs: {}, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'bool') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - specs: { - 0: sizeForm.false, - 1: sizeForm.true, - }, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'enum') { - var specs = {} - sizeForm.struct.map((items) => { - var newkey = items['attribute'] - specs[newkey] = items['attributevalue'] - }) - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - specs: specs, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'struct') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - specs: sizeForm.struct, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'text') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - size: sizeForm.string, - specs: {}, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'date') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - specs: {}, - }, - } - Object.assign(obj, obj1) - } else if (sizeForm.type == 'geopoint') { - obj1 = { - dataType: { - das: das, - type: sizeForm.type.toLowerCase(), - gpstype: sizeForm.gpstype, - specs: {}, - }, - } - Object.assign(obj, obj1) - } - delete obj.index - dgiotlog.log('obj', obj) + submitFormwmx(obj) { // 检测到 - // if (this.wmxSituation == '新增') { - // dgiotlog.log("新增"); if (this.wmxSituation == '新增') { - // dgiotlog.log("新增"); + console.log("新增"); this.productDetail.thing.properties.unshift(obj) } else if (this.wmxSituation == '编辑') { - // dgiotlog.log("编辑", obj); + console.log('编辑') this.productDetail.thing.properties[this.modifyIndex] = obj this.thingKey = moment(new Date()).valueOf().toString() } - dgiotlog.log(this.wmxSituation, this.productDetail.thing.properties) + console.log(this.wmxSituation, this.productDetail.thing.properties) let data = { thing: { properties: this.productDetail.thing.properties }, } putProductTemplet(this.producttempId, data).then((res) => { if (res.updatedAt) { this.$message({ - type: 'success', showClose: true, duration: 2000, + type: 'success', message: this.wmxSituation + '成功', }) - // this.getProDetail() - } else { - this.$message({ - type: 'warning', - showClose: true, - duration: 2000, - message: this.wmxSituation + '失败', - }) } }) - // } this.wmxdialogVisible = false }, // 查看物模型模板