规则状态修改的接口联调
This commit is contained in:
parent
ab4961b3a4
commit
7e915a18c2
|
@ -102,9 +102,9 @@
|
||||||
<div class="monitor-list-item-footer-actions">
|
<div class="monitor-list-item-footer-actions">
|
||||||
<span class="actions-edit" @click="editItem(item.id)"></span>
|
<span class="actions-edit" @click="editItem(item.id)"></span>
|
||||||
<span class="actions-delete" @click="deleteItem(item.id)"></span>
|
<span class="actions-delete" @click="deleteItem(item.id)"></span>
|
||||||
<span v-if="item.enabled==1" class="actions-enable">
|
<span v-if="item.enabled==1" class="actions-enable" @click="changeItemStatus(item.id,item.enabled)">
|
||||||
</span>
|
</span>
|
||||||
<span v-if="item.enabled==0" class="actions-disable">
|
<span v-if="item.enabled==0" class="actions-disable" @click="changeItemStatus(item.id,item.enabled)">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction,postAction,httpAction,deleteAction } from '@/api/manage'
|
import { getAction,postAction,httpAction,deleteAction,putAction } from '@/api/manage'
|
||||||
import BoxTitle from '../../components/boxTitle.vue';
|
import BoxTitle from '../../components/boxTitle.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -672,6 +672,16 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
changeItemStatus(id, isEnabled) {
|
||||||
|
putAction(`/alarmRule/updateStatus?alarmRuleId=${id}&enabled=${isEnabled==1?0:1}`).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success("success")
|
||||||
|
this.getAlarmRulesPage()
|
||||||
|
} else {
|
||||||
|
this.$message.warning("This operation fails. Contact your system administrator")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.$refs.al_ruleForm.resetFields();
|
this.$refs.al_ruleForm.resetFields();
|
||||||
this.form= {
|
this.form= {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user