Pārlūkot izejas kodu

部分页面布局调整

Koishi 3 gadi atpakaļ
vecāks
revīzija
3ee5012769

+ 5 - 14
src/components/chart/combination/bar-line-chart.vue

@@ -77,7 +77,7 @@ export default {
     // 颜色
     color: {
       type: Array,
-      default: () => ["#323E6F", "#1DA0D7", "#02BB4C", "#DB5520", "#EDB32F", "#EDEB2F"],
+      default: () => ["#323E6F", "#e17e23", "#ba3237#", "c531c7", "#ffffff", "#EDEB2F"],
     },
     // 每页显示个数
     pageSize: {
@@ -97,16 +97,14 @@ export default {
       return this.bardata.legend;
     },
     end() {
-      var result = 100;
-      if (this.areaData && this.areaData.length > 0) {
+      var result = 20;
+      if (this.areaData) {
         result = parseInt((this.pageSize / this.areaData.length) * 100);
       }
-
       return result;
     },
   },
   methods: {
-    resize() {},
     initChart() {
       let chart = echarts.init(this.$el);
       let option = {
@@ -278,14 +276,7 @@ export default {
           },
         });
       }
-console.log(JSON.stringify(option))
       chart.setOption(option);
-
-      this.resize = function() {
-        chart.resize();
-      };
-
-      window.addEventListener("resize", this.resize);
     },
   },
   created() {
@@ -309,8 +300,8 @@ console.log(JSON.stringify(option))
       this.initChart();
     });
   },
-  unmounted() {
-    window.removeEventListener("resize", this.resize);
+  beforeUpdate(){
+	  this.areaData = this.bardata.area;
   },
   watch: {
     bardata(val) {

+ 0 - 2
src/components/chart/combination/multiple-bar-line-chart.vue

@@ -210,7 +210,6 @@ export default {
   watch: {
     barData: {
       handler(newValue, oldValue) {
-        console.warn(newValue);
         this.newbarData = newValue;
         this.initChart();
       },
@@ -218,7 +217,6 @@ export default {
     },
     lineData : {
       handler(newValue, oldValue) {
-        console.warn(newValue);
         this.newlineData = newValue;
         this.initChart();
       },

+ 26 - 67
src/views/Decision/Decision1.vue

@@ -67,56 +67,16 @@
 		<el-row :type="'flex'" class="content">
 			<el-col :span="12" class="pd-r-8">
 				<toolbar-panel title="风机绩效榜" :showLine="false">
-					<bar-line-chart :height="'calc(100vh - 180px)'" :bardata="bardata" :lineData="lineData"
-						:color="barColor" lineName="理论发电量" />
+					<bar-line-chart :height="'calc(100vh - 200px)'" :bardata="bardata" :lineData="lineData" :color="barColor" lineName="理论发电量"/>
 				</toolbar-panel>
 			</el-col>
 			<el-col :span="12" class="pd-l-8">
 				<panel :title="'项目列表'" :showLine="false">
-					<div class="project-table">
+                    <div class="project-table">
 						<!-- 分页Table -->
-						<Table :data="tableData"
-							:height="'calc(80vh - 50px)'">
-							<template v-slot:tr v-if="tableData.data.length > 0">
-								<tr>
-									<td style="width: 50px;">
-										{{tableDataEnd.index}}
-									</td>
-									<td>
-										{{tableDataEnd.name}}
-									</td>
-									<td>
-										{{tableDataEnd.llfdl}}
-									</td>
-									<td>
-										{{tableDataEnd.sjfdl}}
-									</td>
-									<td>
-										{{tableDataEnd.speed}}
-									</td>
-									<td>
-										{{tableDataEnd.fjhjx}}
-									</td>
-									<td>
-										{{tableDataEnd.jhjx}}
-									</td>
-									<td>
-										{{tableDataEnd.sl}}
-									</td>
-									<td>
-										{{tableDataEnd.xd}}
-									</td>
-									<td>
-										{{tableDataEnd.xn}}
-									</td>
-									<td>
-										{{tableDataEnd.fnlly}}
-									</td>
-								</tr>
-							</template>
-						</Table>
-						<!-- <Table :data="tableData"></Table> -->
-					</div>
+                        <Table :data="tableData" :pageSize="20" @onPagging="onChangePage" :height="'calc(100vh - 32vh)'"></Table>
+                        <!-- <Table :data="tableData"></Table> -->
+                    </div>
 				</panel>
 			</el-col>
 		</el-row>
@@ -128,7 +88,7 @@
 	import Panel from "../../components/coms/panel/panel.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
-	import Table from "./table.vue";
+	import Table from "../../components/coms/table/table.vue";
 	import partten from "@/helper/partten.js";
 	export default {
 		components: {
@@ -147,7 +107,7 @@
 							field: "index",
 							is_num: false,
 							is_light: false,
-							width: "50px",
+                            width: "50px",
 						},
 						{
 							name: "名称",
@@ -160,68 +120,67 @@
 							field: "llfdl",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "SCADA发电量",
 							field: "sjfdl",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "风速",
 							field: "speed",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "非计划检修",
 							field: "fjhjx",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "计划检修",
 							field: "jhjx",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "受累",
 							field: "sl",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "限电",
 							field: "xd",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "性能",
 							field: "xn",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						},
 						{
 							name: "风能利用率%",
 							field: "fnlly",
 							is_num: false,
 							is_light: false,
-							sortable: true
+							sortable:true
 						}
 					],
 					data: [],
 				},
-				tableDataEnd: [], //合计
 				ChangZhan: [], //场站
 				XiangMu: [], //项目
 				XianLu: [], //线路
@@ -230,7 +189,9 @@
 				value3: [],
 				value4: "",
 				value5: "",
-				barColor:['#4b55ae','#e17e23','#ba3237','#c531c7','#ffffff','#05bb4c'],
+				barColor: [partten.getColor("purple"), partten.getColor("green"), partten.getColor("red"), partten
+					.getColor("pink"), partten.getColor("grayl"), partten.getColor("orange")
+				],
 				TypeClass: 1, //风场,项目,集电线路 的按钮颜色,默认第一个
 				bardata: [],
 				lineData: [],
@@ -247,7 +208,7 @@
 				var that = this;
 				that.API.requestData({
 					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
+					baseURL : "http://10.155.32.4:9001/",
 					subUrl: "benchmarking/wplist",
 					success(res) {
 						that.ChangZhan = res.data;
@@ -266,7 +227,7 @@
 				var that = this;
 				that.API.requestData({
 					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
+					baseURL : "http://10.155.32.4:9001/",
 					subUrl: "benchmarking/projectList",
 					data: {
 						wpids: val
@@ -287,7 +248,7 @@
 				var that = this;
 				that.API.requestData({
 					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
+					baseURL : "http://10.155.32.4:9001/",
 					subUrl: "benchmarking/lineList",
 					data: {
 						projects: val
@@ -340,7 +301,7 @@
 				var that = this;
 				that.API.requestData({
 					method: "GET",
-					baseURL: "http://10.155.32.4:9001/",
+					baseURL : "http://10.155.32.4:9001/",
 					subUrl: "benchmarking/fjjxb",
 					data: {
 						wpids: that.value1,
@@ -399,8 +360,6 @@
 							};
 
 						}
-						that.tableDataEnd = data2[data2.length - 1];
-						data2.pop();
 						that.tableData.data = data2;
 					}
 				});
@@ -408,9 +367,9 @@
 			mxClick() {
 				this.$router.push("/decision/decision1Mx")
 			},
-			onChangePage(params) {
-				console.log(params);
-			},
+     onChangePage(params) {
+      console.log(params);
+    },
 		}
 	};
 </script>

+ 6 - 15
src/views/Decision/Decision2Xmdb.vue

@@ -53,7 +53,7 @@
 			<toolbar-panel title="项目对标" :showLine="false"></toolbar-panel>
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef"></Table>
 				</div>
 			</div>
 			<el-row class="mg-b-16">
@@ -79,7 +79,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
+						<Table :data="tableDataDetail" ref="curRef"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -98,7 +98,7 @@
 	import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 	import Panel from "../../components/coms/panel/panel.vue";
-	import Table from "./table.vue";
+	import Table from "../../components/coms/table/table.vue";
 	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
 	import Dayinfo from "./dayinfo.vue";
 	export default {
@@ -355,7 +355,6 @@
 
 											dataTab.push({ //表格
 												index: index + 1,
-												fdl:item.fdl,
 												name: item.name,
 												zhpm: item.zhpm,
 												gzssdl: item.gzssdl,
@@ -399,13 +398,6 @@
 						},
 						{
 							name: "",
-							field: "fdl",
-							is_num: false,
-							is_light: false,
-							display:"none",
-						},
-						{
-							name: "",
 							field: "check",
 							is_num: false,
 							is_light: false,
@@ -597,7 +589,7 @@
 			this.ChangZhanVal();
 			this.value4 = this.getTime(1);
 			this.value5 = this.getTime(2);
-			this.AjaxCommon();
+			// this.AjaxCommon();
 		},
 		methods: {
 			ChangZhanVal() {
@@ -607,7 +599,9 @@
 					baseURL: "http://10.155.32.4:9001/",
 					subUrl: "benchmarking/wplist",
 					success(res) {
+						that.value1.push(res.data[0].id)
 						that.ChangZhan = res.data;
+						that.AjaxCommon();
 					}
 				});
 			},
@@ -938,9 +932,6 @@
 			back() {
 				this.detailShow = 1;
 				this.clearDb();
-			},
-			onSort(){
-				this.clearDb();
 			}
 		}
 	};

+ 6 - 2
src/views/Home/Home.vue

@@ -571,7 +571,7 @@ export default {
             }]
           };
 
-          let glKey = ["value1", "value2", "value3", "value4", "value5", "value6"];
+          let glKey = ["value1", "value2", "value3", "value4", "value5", "value6", "value7"];
           let Powertrend = {
             // 图表所用单位
             units: ["(MW)", "(m/s)"],
@@ -599,6 +599,10 @@ export default {
               title: "平均风速",
               yAxisIndex: 1,
               value: []
+            }, {
+              title: "24小时功率",
+              yAxisIndex: 0,
+              value: []
             }]
           };
 
@@ -614,7 +618,7 @@ export default {
           glKey.forEach((keyEle, keyIndex) => {
             res.data.glvos.forEach(cEle => {
               Powertrend.value[keyIndex].value.push({
-                text: new Date(cEle.time).formatDate("hh:mm:ss"),
+                text: new Date(cEle.time).formatDate("hh:mm"),
                 value: cEle[keyEle]
               });
             });

+ 3 - 5
src/views/NewPages/dj1.vue

@@ -767,7 +767,7 @@ export default {
           recorddate: that.recorddate
         },
         success (res) {
-          const keyArray = ["value1", "value2", "value3", "value4"];
+          const keyArray = ["value1", "value2", "value3"];
 
           let lostChartData = [{
             text: "实发功率",
@@ -781,9 +781,6 @@ export default {
           }, {
             text: "风速",
             value: []
-          }, {
-            text: "状态",
-            value: []
           }];
           const lostChartUnit = ["实发功率", "保证功率", "风速", "状态"];
 
@@ -887,7 +884,7 @@ export default {
             name: "风速",
             unit: "(m/s)",
             data: []
-          }
+          };
 
           keyArray.forEach((keyEle, keyIndex) => {
             res.data.forEach(ele => {
@@ -900,6 +897,7 @@ export default {
           });
           that.powerChartData = powerChartData;
           that.powerChartLineData = powerChartLineData;
+          console.log(1111,powerChartLineData)
         }
       });
     },