Skip to content

Commit

Permalink
feat(dashboard): 更新设备管理参数条件
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 30, 2022
1 parent 131ecfd commit 49f716a
Show file tree
Hide file tree
Showing 6 changed files with 306 additions and 66 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)


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

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)


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

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-28)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-29)


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

Expand Down
101 changes: 101 additions & 0 deletions src/dgiot/components/DgiotThreeCheckbox/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!--
* @Author: dgiot-fe <dgiot@foxmail.com>
* @Date: 2022-06-30 11:35:32
* @LastEditors: 11:35
* @LastEditTime: 2022-06-30 11:35:32
* @Description: 不断点击勾选框,在未选中、半选、已选中三种状态之间切换
* @FilePath: src\dgiot\components\DgiotThreeCheckbox\index.vue
* @DocumentLink: https://dev.iotn2n.com
* @github: https://github.com/dgiot/dgiot-dashboard.git
* @name: index
-->
<template>
<span class="stateCheckBox">
<el-checkbox
v-model="check"
:disabled="data.disabled"
:indeterminate="mid"
@change="change"
>
<span
class="label"
:class="[check ? 'active' : '', data.disabled ? 'disabled' : '']"
>
{{ data.label }}
</span>
</el-checkbox>
</span>
</template>

<script>
export default {
name: 'DgiotThreeCheckbox',
components: {},
model: {
prop: 'value',
event: 'input',
},
props: {
value: {
type: [Number, String, Boolean],
default: 0,
required: true,
},
data: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
check: false,
mid: false,
num: 0,
}
},
computed: {},
watch: {
num() {
this.$emit('input', this.num)
},
},
mounted() {
this.loadState(this.value)
},
methods: {
// 初始化状态
loadState(num) {
this.num = Number(num)
this.chooseState(this.num)
},
// 改变状态
chooseState(num) {
this.check = num == 2 ? true : false
this.mid = num == 1 ? true : false
},
// 点击多选框
change() {
this.num++
this.num > 2 ? (this.num = 0) : ''
this.chooseState(this.num)
},
},
}
</script>

<style lang="scss" scoped>
.stateCheckBox {
margin-right: 30px;
.label {
color: #606266;
}
.active {
color: #409eff;
}
.disabled {
color: #c0c4cc;
}
}
</style>
Loading

0 comments on commit 49f716a

Please sign in to comment.