diff --git a/xiuosiot-frontend/src/views/rule/ruleManage/index.vue b/xiuosiot-frontend/src/views/rule/ruleManage/index.vue index 7286665..8997b0a 100644 --- a/xiuosiot-frontend/src/views/rule/ruleManage/index.vue +++ b/xiuosiot-frontend/src/views/rule/ruleManage/index.vue @@ -55,7 +55,7 @@ >生效状态 - {{ ruleStatusList[item.ruleStatus] }} + {{ ruleStatusList[item.ruleStatus] }}

@@ -198,7 +198,7 @@ @@ -384,8 +384,15 @@ export default { } }) }, - start() {}, - stop() {}, + execute(id, ruleStatus) { + update({ id, ruleStatus }).then(res => { + if (res.code === '200000') { + const msg = ruleStatus === 1 ? '启动成功' : '停止成功' + this.$message.success(msg) + this.getList() + } + }) + }, removeTrigger(index) { if (this.form.triggerList.length > 1) { this.form.triggerList.splice(index, 1) @@ -483,9 +490,16 @@ export default { display: inline-block; width: 7px; height: 7px; - background-color: #FF4E00; border-radius: 50%; margin-right: 8px; + margin-bottom: 2px; + vertical-align: middle; + } + .green::before{ + background-color: #20BE0B; + } + .red::before{ + background-color: #FF4E00; } .font { font-size: 17px;