1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div class="main" v-if="values.length > 0">
- <div style="font-size:15px">{{ title }}</div>
- <div class="content">
- <WindturbineMinCard
- v-for="vs in values"
- :key="vs"
- :status="vs.status"
- :power="vs.power"
- :windSpeed="vs.windSpeed"
- :rollSpeed="vs.rollSpeed"
- :windturbineId="vs.windturbineId"
- ></WindturbineMinCard>
- </div>
- <div class="bottom"></div>
- </div>
- </template>
- <script>
- import WindturbineMinCard from "./WindturbineMinCard.vue";
- export default {
- name: "MatrixCard",
- props: ["title", "datas"],
- data() {
- return {
- values: [],
- };
- },
- mounted() {
- this.values = this.datas.value || [];
- },
- components: {
- WindturbineMinCard,
- },
- watch: {
- datas(val) {
- this.values = val.value;
- },
- },
- };
- </script>
- <style scoped>
- .content {
- display: grid;
- grid-template-columns: repeat(5, 20%);
- }
- .bottom {
- background-color: #292929;
- width: 100%;
- height: 2px;
- margin-top: 5px;
- }
- .main {
- margin-bottom: 15px;
- margin-left: 5px;
- margin-right: 5px;
- }
- </style>
|