123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <template>
- <div class="tower">
- <Wave></Wave>
- <Windmill class="windmill-1"></Windmill>
- <Windmill class="windmill-2"></Windmill>
- <Windmill class="windmill-3"></Windmill>
- <Windmill class="windmill-4"></Windmill>
- <Windmill class="windmill-5"></Windmill>
- <WindTower :data="cftmap"></WindTower>
- <dash-pie-chart class="pie-left" title="密度" :value="cftmap.KQMD || 0" height="9.722vh" width="9.722vh" />
- <dash-pie-chart class="pie-right" title="压强" :value="cftmap.FCCFTYQ || 0" height="9.722vh" width="9.722vh" />
- <Panel class="panel-top" title="日资源玫瑰图">
- <div class="direction-chart">
- <DirectionRadarChart width="70%" height="152px" :value="rmgtmap" />
- <div class="legend">
- <span class="dot bg-purple"></span>
- <span>{{rmgtTitle || ""}}</span>
- </div>
- </div>
- </Panel>
- <Panel class="panel-bottom" title="月资源玫瑰图">
- <div class="direction-chart">
- <DirectionRadarChart width="70%" height="152px" :value="ymgtmap" />
- <div class="legend">
- <span class="dot bg-purple"></span>
- <span>{{ymgtTitle || ""}}</span>
- </div>
- </div>
- </Panel>
- <toolbar-panel class="rose-chart" title="月资源玫瑰图">
- <template v-slot:tools>
- <div class="tools">
- <div class="tool-block">
- <div class="legend bg-green"></div>
- <div class="legend-text">风速</div>
- </div>
- <div class="tool-block">
- <div class="legend bg-purple"></div>
- <div class="legend-text">实际功率</div>
- </div>
- <div class="tool-block">
- <div class="legend bg-orange"></div>
- <div class="legend-text">理论功率</div>
- </div>
- <div class="tool-block">
- <div class="legend bg-yellow"></div>
- <div class="legend-text">保证功率</div>
- </div>
- <div class="tool-block">
- <div class="legend bg-blue"></div>
- <div class="legend-text">预测功率4小时</div>
- </div>
- <div class="tool-block">
- <div class="legend bg-pink"></div>
- <div class="legend-text">预测功率72小时</div>
- </div>
- </div>
- </template>
- <template v-slot:default>
- <!-- 日发电量 -->
- <multiple-line-chart :list="Powertrend.value" :units="Powertrend.units" height="28vh" />
- </template>
- </toolbar-panel>
- </div>
- </template>
- <script>
- import Wave from "@com/three/wave.vue";
- import Windmill from "../components/Windmill.vue";
- import ToolbarPanel from "@com/coms/panel/toolbar-panel.vue";
- import Panel from "@com/coms/panel/panel.vue";
- import MultipleLineChart from "@com/chart/line/multiple-line-chart.vue";
- import WindTower from "./Tower/WindTower.vue";
- import DashPieChart from "@com/chart/pie/dash-pie-chart.vue";
- import DirectionRadarChart from "@com/chart/radar/radar-chart.vue";
- export default {
- // 名称
- name: "Tower",
- // 使用组件
- components: {
- Wave,
- Windmill,
- ToolbarPanel,
- MultipleLineChart,
- WindTower,
- DashPieChart,
- Panel,
- DirectionRadarChart,
- },
- // 传入参数
- props: {},
- // 自定义事件
- emits: {},
- // 数据
- data () {
- return {
- timmer: null, // 计时器
- cftmap: {},
- glvos: [],
- rmgtmap: {
- indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
- data: [
- {
- value: [44200, 14200, 20000, 35000, 50000, 38000],
- name: ""
- }
- ]
- },
- rmgtTitle: "",
- ymgtmap: {
- indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
- data: [
- {
- value: [44200, 14200, 20000, 35000, 50000, 38000],
- name: ""
- }
- ]
- },
- ymgtTitle: "",
- // 日发电量
- Powertrend: {
- // 图表所用单位
- units: [""],
- value: [{
- title: "",
- yAxisIndex: 0, // 使用单位
- value: []
- }],
- }
- };
- },
- // 函数
- methods: {
- // 请求服务
- requestData (showLoading) {
- let that = this;
- that.API.requestData({
- showLoading,
- method: "POST",
- subUrl: "monitor/findCftInfo",
- data: {
- wpId: "MHS_FDC"
- },
- success (res) {
- let rmgtmap = {
- indicator: [],
- data: [
- {
- value: [],
- name: "",
- },
- ],
- };
- let ymgtmap = {
- indicator: [],
- data: [
- {
- value: [],
- name: "",
- },
- ],
- };
- res.data.rmgtmap.data.forEach(ele => {
- rmgtmap.indicator.push(ele.name);
- rmgtmap.data[0].value.push(ele.data1);
- });
- res.data.ymgtmap.data.forEach(ele => {
- ymgtmap.indicator.push(ele.name);
- ymgtmap.data[0].value.push(ele.data1);
- });
- that.rmgtmap = rmgtmap;
- that.rmgtTitle = res.data.rmgtmap.jfpl;
- that.ymgtmap = ymgtmap;
- that.ymgtTitle = res.data.ymgtmap.jfpl;
- let units = ["(万kw)", "(米/s)"];
- let keyArray = ["value1", "value2", "value3", "value4", "value5", "value6"];
- let Powertrend = {
- units,
- value: [{
- title: "应发功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "实发功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "理论功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "预测功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "保证功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "保证功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "平均风速",
- yAxisIndex: 1, // 使用单位
- value: []
- }, {
- title: "72小时预测功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }, {
- title: "最优功率",
- yAxisIndex: 0, // 使用单位
- value: []
- }]
- };
- keyArray.forEach((key, keyIndex) => {
- res.data.glvos.forEach(ele => {
- Powertrend.value[keyIndex].value.push({
- text: new Date(ele.time).formatDate("yyyy-MM-dd"),
- value: ele[key],
- })
- });
- });
- that.cftmap = res.data.cftmap;
- that.Powertrend = Powertrend;
- }
- });
- },
- },
- created () {
- let that = this;
- that.$nextTick(() => {
- that.requestData(false);
- that.timmer = setInterval(() => {
- that.requestData(false);
- }, that.$store.state.websocketTimeSec);
- });
- },
- unmounted () {
- clearInterval(this.timmer);
- this.timmer = null;
- },
- };
- </script>
- <style lang="less">
- .tower {
- position: relative;
- width: 100%;
- height: 100%;
- .windmill-1,
- .windmill-2,
- .windmill-3,
- .windmill-4,
- .windmill-5 {
- position: absolute;
- }
- .windmill-1 {
- top: 23.148vh;
- left: 28.333vh;
- width: 4.167vh;
- }
- .windmill-2 {
- top: 8.333vh;
- left: 11.111vh;
- width: 3.426vh;
- }
- .windmill-3 {
- top: 4.63vh;
- left: 38.889vh;
- width: 2.593vh;
- }
- .windmill-4 {
- top: 21.296vh;
- left: 122.87vh;
- width: 3.426vh;
- }
- .windmill-5 {
- top: 5.556vh;
- left: 121.296vh;
- width: 2.407vh;
- }
- .direction-chart {
- .legend {
- display: flex;
- align-items: center;
- justify-content: center;
- .dot {
- width: 7px;
- height: 7px;
- display: inline-block;
- margin-right: 8px;
- }
- }
- }
- .pie-left,
- .pie-right {
- position: fixed;
- top: 8vh;
- }
- .pie-left {
- left: 5vh;
- }
- .pie-right {
- left: 20vh;
- }
- .panel-top,
- .panel-bottom {
- position: fixed;
- right: 10vh;
- width: 36vh;
- height: 24vh;
- }
- .panel-top {
- top: 7vh;
- }
- .panel-bottom {
- top: 35vh;
- }
- .rose-chart {
- position: absolute;
- left: 0;
- bottom: 1.852vh;
- height: 31.481vh;
- width: 100%;
- }
- .tools {
- display: flex;
- .tool-block {
- display: flex;
- align-items: center;
- margin-left: 0.741vh;
- .legend {
- flex: auto;
- width: 0.741vh;
- height: 0.741vh;
- margin-right: 0.741vh;
- &.long {
- width: 2.963vh;
- height: 0.37vh;
- }
- }
- .legend-text {
- color: #ffffff4d;
- }
- }
- }
- }
- </style>
|