surprise
2024-04-17 f560ccccd3878497339daeee3241a81c263898f7
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
  <div class="changePic" v-if="showdia">
    <div>
      <span class="value">最大值:</span>
      <el-input v-model="maxValue" placeholder="请输入内容"></el-input>
      <el-color-picker v-model="maxColor"></el-color-picker>
    </div>
    <div>
      <span class="value">最小值:</span>
      <el-input v-model="minValue" placeholder="请输入内容"></el-input>
      <el-color-picker v-model="minColor"></el-color-picker>
    </div>
    <div class="btns">
      <span @click="getcolor">保存</span>
      <span @click="close">取消</span>
    </div>
  </div>
</template>
 
<script>
import bus from "../../utils/bus"
export default {
  name: "changePic",
  data() {
    return {
      maxColor: "#FF0000",
      maxValue: "100",
      minValue: "0",
      minColor: "#0000FF",
      showdia:false
    };
  },
  mounted(){
    bus.$on("changeColor",(e)=>{
      this.showdia = true
    })
  },
  methods: {
    close(){
      this.showdia = false
    },
    getcolor() {
      let obj = {};
      obj.maxColor = this.maxColor;
      obj.maxValue = this.maxValue;
      obj.minValue = this.minValue;
      obj.minColor = this.minColor;
 
      this.$emit("colordata", obj);
    },
  },
};
</script>
 
<style scoped>
.changePic {
  width: 700px;
  height: 500px;
  position: absolute;
  top: 1180px;
  left: 0px;
  background: url(~@/assets/image/test/22.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.changePic > div {
  display: flex;
  justify-content: center;
  margin-top: 70px;
}
.changePic > div > span {
  font-size: 40px;
  color: #fff;
}
.value {
  transform: translateY(10px);
}
.changePic >>> .el-color-picker__trigger {
  height: 55px;
  width: 55px;
  margin-top: 10px;
}
.changePic >>> .el-input {
  width: 40%;
  margin: 0% 50px;
}
.btns > span {
  display: block;
  width: 200px;
  height: 70px;
  text-align: center;
  font-size: 35px;
  margin: 0 50px;
  line-height: 70px;
  cursor: pointer;
  background: #23609b;
}
.btns {
  margin-top: 100px;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
}
</style>