Skip to content

Commit 49f716a

Browse files
committed
feat(dashboard): 更新设备管理参数条件
1 parent 131ecfd commit 49f716a

File tree

6 files changed

+306
-66
lines changed

6 files changed

+306
-66
lines changed

CHANGELOG.EN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
1+
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)
22

33

44
### Bug Fixes
@@ -20,6 +20,7 @@
2020
* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
2121
* **components:** 云压测 ([ed99eee](https://github.com/dgiot/dgiot-dashboard/commit/ed99eee177a5947609cfa35998bdd1f8b3d3a9ab))
2222
* **dashboard:** 新增百度统计 ([396c7be](https://github.com/dgiot/dgiot-dashboard/commit/396c7be11d010deae48bd915265a904202df0be2))
23+
* **equipmentCloud:** 修復設備列表查询条件更新后pagination组件不更新 ([28115a9](https://github.com/dgiot/dgiot-dashboard/commit/28115a982d253e11fbd2ec1cfd64b40409c5e122))
2324
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
2425
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))
2526

CHANGELOG.ZH.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
1+
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)
22

33

44
### Bug Fixes
@@ -20,6 +20,7 @@
2020
* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
2121
* **components:** 云压测 ([ed99eee](https://github.com/dgiot/dgiot-dashboard/commit/ed99eee177a5947609cfa35998bdd1f8b3d3a9ab))
2222
* **dashboard:** 新增百度统计 ([396c7be](https://github.com/dgiot/dgiot-dashboard/commit/396c7be11d010deae48bd915265a904202df0be2))
23+
* **equipmentCloud:** 修復設備列表查询条件更新后pagination组件不更新 ([28115a9](https://github.com/dgiot/dgiot-dashboard/commit/28115a982d253e11fbd2ec1cfd64b40409c5e122))
2324
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
2425
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))
2526

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
1+
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)
22

33

44
### Bug Fixes
@@ -20,6 +20,7 @@
2020
* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
2121
* **components:** 云压测 ([ed99eee](https://github.com/dgiot/dgiot-dashboard/commit/ed99eee177a5947609cfa35998bdd1f8b3d3a9ab))
2222
* **dashboard:** 新增百度统计 ([396c7be](https://github.com/dgiot/dgiot-dashboard/commit/396c7be11d010deae48bd915265a904202df0be2))
23+
* **equipmentCloud:** 修復設備列表查询条件更新后pagination组件不更新 ([28115a9](https://github.com/dgiot/dgiot-dashboard/commit/28115a982d253e11fbd2ec1cfd64b40409c5e122))
2324
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
2425
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))
2526

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!--
2+
* @Author: dgiot-fe <dgiot@foxmail.com>
3+
* @Date: 2022-06-30 11:35:32
4+
* @LastEditors: 11:35
5+
* @LastEditTime: 2022-06-30 11:35:32
6+
* @Description: 不断点击勾选框,在未选中、半选、已选中三种状态之间切换
7+
* @FilePath: src\dgiot\components\DgiotThreeCheckbox\index.vue
8+
* @DocumentLink: https://dev.iotn2n.com
9+
* @github: https://github.com/dgiot/dgiot-dashboard.git
10+
* @name: index
11+
-->
12+
<template>
13+
<span class="stateCheckBox">
14+
<el-checkbox
15+
v-model="check"
16+
:disabled="data.disabled"
17+
:indeterminate="mid"
18+
@change="change"
19+
>
20+
<span
21+
class="label"
22+
:class="[check ? 'active' : '', data.disabled ? 'disabled' : '']"
23+
>
24+
{{ data.label }}
25+
</span>
26+
</el-checkbox>
27+
</span>
28+
</template>
29+
30+
<script>
31+
export default {
32+
name: 'DgiotThreeCheckbox',
33+
components: {},
34+
model: {
35+
prop: 'value',
36+
event: 'input',
37+
},
38+
props: {
39+
value: {
40+
type: [Number, String, Boolean],
41+
default: 0,
42+
required: true,
43+
},
44+
data: {
45+
type: Object,
46+
default: () => {
47+
return {}
48+
},
49+
},
50+
},
51+
data() {
52+
return {
53+
check: false,
54+
mid: false,
55+
num: 0,
56+
}
57+
},
58+
computed: {},
59+
watch: {
60+
num() {
61+
this.$emit('input', this.num)
62+
},
63+
},
64+
mounted() {
65+
this.loadState(this.value)
66+
},
67+
methods: {
68+
// 初始化状态
69+
loadState(num) {
70+
this.num = Number(num)
71+
this.chooseState(this.num)
72+
},
73+
// 改变状态
74+
chooseState(num) {
75+
this.check = num == 2 ? true : false
76+
this.mid = num == 1 ? true : false
77+
},
78+
// 点击多选框
79+
change() {
80+
this.num++
81+
this.num > 2 ? (this.num = 0) : ''
82+
this.chooseState(this.num)
83+
},
84+
},
85+
}
86+
</script>
87+
88+
<style lang="scss" scoped>
89+
.stateCheckBox {
90+
margin-right: 30px;
91+
.label {
92+
color: #606266;
93+
}
94+
.active {
95+
color: #409eff;
96+
}
97+
.disabled {
98+
color: #c0c4cc;
99+
}
100+
}
101+
</style>

0 commit comments

Comments
 (0)