Skip to content

Commit 4f59fe7

Browse files
author
zhangxiaoyin
committed
feat: update 4.9.0
1 parent b062d2e commit 4f59fe7

File tree

6 files changed

+69
-7
lines changed

6 files changed

+69
-7
lines changed

CHANGELOG.EN.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-07-15)
1+
## [4.8.9](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.9) (2024-08-01)
22

33

44
### Features
55

66
* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589))
77
* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74))
88
* template ([3484162](https://github.com/dgiot/iotStudio/commit/3484162577145de32e3f5735bb3fadd72327f9c7))
9+
* update 4.8.9 ([b062d2e](https://github.com/dgiot/iotStudio/commit/b062d2e88c229c5cf5d7986e7068e9a20a9e982d))
910

1011

1112

CHANGELOG.ZH.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-07-15)
1+
## [4.8.9](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.9) (2024-08-01)
22

33

44
### Features
55

66
* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589))
77
* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74))
88
* template ([3484162](https://github.com/dgiot/iotStudio/commit/3484162577145de32e3f5735bb3fadd72327f9c7))
9+
* update 4.8.9 ([b062d2e](https://github.com/dgiot/iotStudio/commit/b062d2e88c229c5cf5d7986e7068e9a20a9e982d))
910

1011

1112

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
## [4.8.7](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.7) (2024-07-15)
1+
## [4.8.9](https://github.com/dgiot/iotStudio/compare/v4.8.6...v4.8.9) (2024-08-01)
22

33

44
### Features
55

66
* import modbusxtcp ([6f1bc81](https://github.com/dgiot/iotStudio/commit/6f1bc81511d09ee2be0d62c3baa8f370b48e7589))
77
* import wmx ([83c0b64](https://github.com/dgiot/iotStudio/commit/83c0b64afa28d6332765a3efc962c0e5ca238a74))
88
* template ([3484162](https://github.com/dgiot/iotStudio/commit/3484162577145de32e3f5735bb3fadd72327f9c7))
9+
* update 4.8.9 ([b062d2e](https://github.com/dgiot/iotStudio/commit/b062d2e88c229c5cf5d7986e7068e9a20a9e982d))
910

1011

1112

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dgiot/dgiot-dashboard",
3-
"version": "4.8.9",
3+
"version": "4.9.0",
44
"author": "dgiot",
55
"license": "MPL-2.0",
66
"private": false,

src/views/DeviceCloud/manage/editdevices.vue

+26-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@
7878
type="datetime"
7979
/>
8080
</el-form-item>
81+
<el-form-item label="物模型指标">
82+
<el-select
83+
multiple
84+
filterable
85+
collapse-tags
86+
v-model="params.keys"
87+
placeholder="请选择"
88+
size="mini"
89+
style="width: 300px"
90+
>
91+
<el-option
92+
v-for="(item, index) in wmxkeys"
93+
:key="index"
94+
:label="item.label"
95+
:value="item.value"
96+
/>
97+
</el-select>
98+
</el-form-item>
8199
<el-form-item :label="$translateTitle('developer.type')">
82100

83101
<el-select
@@ -639,6 +657,10 @@
639657
<script src="./js/editdevices.js"></script>
640658
<style lang="scss" scoped>
641659
::v-deep {
660+
.el-select__tags {
661+
white-space: nowrap;
662+
overflow: hidden;
663+
}
642664
.el-tabs__header {
643665
margin: 0;
644666
}
@@ -662,7 +684,10 @@
662684
transition: 0.3s;
663685
}
664686
}
665-
687+
.el-select__tags {
688+
white-space: nowrap;
689+
overflow: hidden;
690+
}
666691
.chartsinfo {
667692
margin-top: 15px;
668693

src/views/DeviceCloud/manage/js/editdevices.js

+36-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { getCardDevice, getDabDevice, getDevice } from '@/api/Device/index.js'
77
import Instruct from '@/views/DeviceCloud/category/instruct_manage'
88
import { queryView } from '@/api/View'
99
import runningState from '@/views/DeviceCloud/manage/component/Device/runningState'
10+
import { getProduct } from '../../../../api/Product'
11+
1012
const columns = [
1113
{
1214
title: '图片',
@@ -238,7 +240,7 @@ export default {
238240
number: 1,
239241
interval: 'h',
240242
datetimerange: '',
241-
keys: '*',
243+
keys: [],
242244
limit: 100,
243245
endTime: new Date().getTime(),
244246
startTime: new Date().getTime() - 3600 * 1000 * 24 * 7,
@@ -392,6 +394,7 @@ export default {
392394
dirlength: 20,
393395
selectproduct: '',
394396
watchNum: 0,
397+
wmxkeys: [],
395398
chartType: [
396399
{ type: 'line', name: '折线图' },
397400
{ type: 'histogram', name: '柱状图' },
@@ -431,6 +434,7 @@ export default {
431434
mounted() {
432435
// this.deviceInfo.product.objectId = this.$route.query.productid
433436
this.getDeviceInfo(this.$route.query.deviceid)
437+
this.getwmxkey()
434438
this.setTreeFlag(false)
435439
this.params.style = this.chartType[0].type
436440
console.log(' this.params.style', this.params.style)
@@ -453,6 +457,28 @@ export default {
453457
this.Unbscribe()
454458
},
455459
methods: {
460+
async getwmxkey() {
461+
const productdetail = await getProduct(this.$route.query.productid)
462+
let wmxList = productdetail.thing?.properties || []
463+
let options = []
464+
if (wmxList.length > 0) {
465+
wmxList.forEach((item) => {
466+
if (item.isshow == true) {
467+
let o = {
468+
label: item.name,
469+
value: item.identifier,
470+
}
471+
options.push(o)
472+
}
473+
})
474+
this.params.keys = [wmxList[0].identifier]
475+
}
476+
options.unshift({
477+
label: '全选',
478+
value: '*',
479+
})
480+
this.wmxkeys = options
481+
},
456482
/**
457483
* @Author: dext7r
458484
* @Date: 2021-12-24 12:13:39
@@ -740,11 +766,19 @@ export default {
740766
startTime,
741767
endTime,
742768
} = this.params
769+
let newkeys = 'not'
770+
if (keys.length > 0) {
771+
newkeys = keys.join(',')
772+
}
773+
if (newkeys.indexOf('*') != -1) {
774+
newkeys = '*'
775+
}
776+
this.params.keys = ['*']
743777
let params = {
744778
starttime: moment(startTime).valueOf(),
745779
endtime: moment(endTime).valueOf(),
746780
interval: number + interval,
747-
keys: keys,
781+
keys: newkeys,
748782
limit: limit,
749783
function: _function,
750784
style: style,

0 commit comments

Comments
 (0)