| | |
| | | <template> |
| | | <div class="pie-list"> |
| | | <pie-chart ref="pie0" class="pie" color="#faa93e" markColor="#7b2632" :sum="sum" name="电源告警" ></pie-chart> |
| | | <pie-chart ref="pie1" class="pie" color="#6d98dc" markColor="#222d8b" :sum="sum" name="设备告警" ></pie-chart> |
| | | <pie-chart ref="pie2" class="pie" color="#f78db3" markColor="#a7476d" :sum="sum" name="电池告警" ></pie-chart> |
| | | <pie-chart |
| | | ref="pie0" |
| | | class="pie" |
| | | color="#faa93e" |
| | | markColor="#7b2632" |
| | | :sum="sum" |
| | | name="电源告警" |
| | | ></pie-chart> |
| | | <pie-chart |
| | | ref="pie1" |
| | | class="pie" |
| | | color="#6d98dc" |
| | | markColor="#222d8b" |
| | | :sum="sum" |
| | | name="设备告警" |
| | | ></pie-chart> |
| | | <pie-chart |
| | | ref="pie2" |
| | | class="pie" |
| | | color="#f78db3" |
| | | markColor="#a7476d" |
| | | :sum="sum" |
| | | name="电池告警" |
| | | ></pie-chart> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | values: { |
| | | type: Array, |
| | | default() { |
| | | return [0, 0, 0] |
| | | } |
| | | return [0, 0, 0]; |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | this.$refs.pie1.setData(values[1]); |
| | | this.$refs.pie2.setData(values[2]); |
| | | }, |
| | | resize() { |
| | | this.$refs.pie0.resize(); |
| | | this.$refs.pie1.resize(); |
| | | this.$refs.pie2.resize(); |
| | | }, |
| | | }, |
| | | |
| | | mounted() {}, |