123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <template>
- <div class="status-panel">
- <div class="pause" v-if="true">中断</div>
- <ComPanel class="status-com-panel" :title="'海子井电站'">
- <div class="p-body">
- <div class="category-box">
- <div class="score">
- <span>0</span>
- </div>
- <div class="box">
- <div class="category-item" v-for="(item, index) of datas" :key="index">
- <div>{{ item.text }}</div>
- <div :class="item.color">{{ item.num }}</div>
- </div>
- </div>
- </div>
- <div class="item-box">
- <div class="data-item" v-for="(item, index) of items" :key="index" :class="{ light: item.is_light }">
- <div class="f1">{{ item.f1 }}</div>
- <div class="f2">{{ item.f2 }}</div>
- <div class="f3">{{ item.f3 }}</div>
- <div class="f4">{{ item.f4 }}</div>
- <div class="f5">{{ item.f5 }}</div>
- </div>
- </div>
- </div>
- </ComPanel>
- </div>
- </template>
- <script>
- import ComPanel from "@com/coms/panel/panel.vue";
- export default {
- // 名称
- name: "StatusPanel",
- // 使用组件
- components: {
- ComPanel,
- },
- props: {
- data: Object,
- },
- // 数据
- data() {
- return {
- datas:[
- {text:'运行',num:0,color:'green'},
- {text:'待机',num:0,color:'purple'},
- {text:'限电',num:0,color:'yellow'},
- {text:'检修',num:0,color:'orange'},
- {text:'故障',num:0,color:'red'},
- {text:'受累',num:0,color:'blue'},
- {text:'离线',num:0,color:'gray'},
- ],
- items: [
- {
- // f1: ("AGC" + ele.name.replace(/风电场/g, "") + ":"),
- f1: "AGC:",
- f2: "设定",
- f3: 0,
- f4: "出线",
- f5: 0,
- is_light: true,
- },
- {
- f1: "升压站:",
- f2: "Uab",
- f3: 0,
- f4: "Ia",
- f5: 0,
- is_light: false,
- },
- {
- f1: "风功:",
- f2: "未来15分钟",
- f3: 0,
- f4: "",
- f5: "",
- is_light: false,
- },
- {
- f1: "测风塔:",
- f2: "风速",
- f3: 0 + "m/s",
- f4: "风向",
- f5: 0,
- is_light: false,
- },
- {
- f1: "电能量表:",
- f2: "",
- f3: 0,
- f4: "",
- f5: "",
- is_light: false,
- },
- ],
- };
- },
- // 函数
- methods: {
- jumpPage(wpId) {
- this.$router.push({
- path: `/monitor/windsite/home/${wpId}`,
- // query: { wpId: id },
- });
- },
- },
- // 生命周期钩子
- beforeCreate() {
- // 创建前
- },
- created() {
- // 创建后
- },
- beforeMount() {
- // 渲染前
- },
- mounted() {
- // 渲染后
- },
- beforeUpdate() {
- // 数据更新前
- },
- updated() {
- // 数据更新后
- },
- };
- </script>
- <style lang="less" scoped>
- .status-panel {
- position: relative;
- height: 22.315vh;
- cursor: pointer;
- .pause {
- position: absolute;
- width: 100%;
- height: 100%;
- z-index: 1;
- left: 0;
- top: 0;
- background-color: fade(@darkgray, 50%);
- color: fade(@write, 60%);
- font-size: 5.556vh;
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0.9;
- backdrop-filter: blur(0.37vh);
- }
- .status-com-panel {
- width: 100%;
- height: 100%;
- .p-body {
- width: 100%;
- height: 19.074vh;
- display: flex;
- flex-direction: column;
- margin-top: -0.926vh;
- .category-box {
- width: 100%;
- background-color: fade(@darkgray, 30%);
- display: flex;
- margin-bottom: 0.37vh;
- .score {
- padding: 0.833vh 1.481vh;
- span {
- width: 3.889vh;
- height: 3.889vh;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- color: @green;
- border: 0.093vh solid @green;
- background-color: fade(@green, 20%);
- font-size: @fontsize;
- }
- }
- .box {
- flex-grow: 1;
- display: flex;
- .category-item {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-weight: 600;
- div {
- flex: 1;
- font-size: @fontsize-s;
- &:first-child {
- display: flex;
- align-items: flex-end;
- color: @gray;
- }
- }
- }
- }
- }
- .item-box {
- flex-grow: 1;
- display: flex;
- flex-direction: column;
- .data-item {
- flex: 1;
- display: flex;
- flex-direction: row;
- background-color: fade(@darkgray, 20%);
- margin-top: 0.278vh;
- div {
- font-size: @fontsize-s;
- overflow: hidden;
- display: flex;
- align-items: center;
- }
- .f1,
- .f2,
- .f4 {
- text-align: right;
- color: @gray;
- justify-content: flex-end;
- }
- .f3,
- .f5 {
- font-family: "Bicubik";
- text-align: left;
- color: @green;
- justify-content: flex-start;
- }
- .f1 {
- flex: 2;
- }
- .f2 {
- flex: 3;
- margin-right: 0.556vh;
- }
- .f3 {
- flex: 3;
- }
- .f4 {
- flex: 1;
- margin-right: 0.556vh;
- }
- .f5 {
- flex: 2;
- margin-right: 0;
- }
- &.light {
- background-color: fade(@darkgray, 50%);
- position: relative;
- &::after {
- content: "";
- position: absolute;
- height: 100%;
- width: 0.278vh;
- background-color: @green;
- top: 0;
- left: 0;
- }
- .f1,
- .f2,
- .f4 {
- color: @write;
- }
- .f3,
- .f5 {
- color: fade(@write, 60%);
- }
- }
- }
- }
- }
- }
- }
- </style>
|