ZengTao
2024-03-05 6960cf34f94360bc0e01c4b6dd2af26c0dfde67c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<template>
  <div>
 
    磨边速度:<el-input style="width: 150px" v-model="input" placeholder="请输入参数" clearable></el-input>
    &nbsp;
    <el-button type="primary" @click="dianji()" style="margin-left: 5px">查询</el-button>
 
    <div>
      设备1开关:
      <el-switch v-model="kg1" @change="load()" active-color="#13ce66" active-value="true" inactive-value="false">
      </el-switch>
 
      设备2开关:
      <el-switch v-model="kg2" @change="load()" active-color="#13ce66" active-value="true" inactive-value="false">
      </el-switch>
    </div>
    <div>
      <el-button id="deng"></el-button>
    </div>
  </div>
</template>
<script >
 
export default {
  name: "Electrical",
 
  data () {
    return {
      input: "开",
      kg1: "false",
      kg2: "false"
    }
  },
  methods: {
    load () {
      if (this.input == "开") {
        this.kg1 = "true"
 
      }
      else {
        this.kg1 = "false"
 
      }
    },
    dianji () {
      this.load();
    },
 
 
  }
}
 
</script>
 
<style>
#deng {
  background: #A0A0A0;
  border: 0.1875em solid white;
  border-radius: 50%;
  height: 5em;
  width: 5em;
  box-shadow: 0.375em 0.375em 0 0 rgba(214, 214, 214, 0.125);
}
</style>