Forráskód Böngészése

合计不加人统计bug;点击table重置checkbox状态

mw_666 3 éve
szülő
commit
84d3eb95b0

+ 48 - 13
src/views/Decision/Decision1.vue

@@ -72,12 +72,49 @@
 			</el-col>
 			<el-col :span="12" class="pd-l-8">
 				<panel :title="'项目列表'" :showLine="false">
-                    <div class="project-table">
-						<!-- 分页Table -->
-                        <Table :data="tableData" :pageSize="20" @onPagging="onChangePage" :height="'calc(100vh - 32vh)'"></Table>
-                        <!-- <Table :data="tableData"></Table> -->
-                    </div>
+					<div class="project-table">
+						<Table :data="tableData">
+							<template v-slot:tr v-if="tableData.data.length > 0">
+								<tr slot="tr">
+									<td>
+										{{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>
+					</div>
 				</panel>
+				
 			</el-col>
 		</el-row>
 	</div>
@@ -106,8 +143,7 @@
 							name: "",
 							field: "index",
 							is_num: false,
-							is_light: false,
-                            width: "50px",
+							is_light: false
 						},
 						{
 							name: "名称",
@@ -181,6 +217,7 @@
 					],
 					data: [],
 				},
+				tableDataEnd:[],//合计
 				ChangZhan: [], //场站
 				XiangMu: [], //项目
 				XianLu: [], //线路
@@ -356,18 +393,16 @@
 								legend: legend,
 								data: arr1
 							};
-
 						}
+						that.tableDataEnd = data2[data2.length - 1];
+						data2.pop();
 						that.tableData.data = data2;
 					}
 				});
 			},
 			mxClick() {
 				this.$router.push("/decision/decision1Mx")
-			},
-     onChangePage(params) {
-      console.log(params);
-    },
+			}
 		}
 	};
 </script>
@@ -408,7 +443,7 @@
 
 		.project-table {
 			overflow: auto;
-
+// height: calc(100vh - 24.5vh);
 			tbody {
 				height: calc(100vh - 24.5vh);
 			}

+ 64 - 3
src/views/Decision/Decision1Mx.vue

@@ -75,7 +75,66 @@
 					<el-col :span="14" class="pd-l-8">
 						<panel :title="'项目列表'" :showLine="false">
 							<div class="project-table">
-								<Table :data="tableData"></Table>
+								<Table :data="tableData">
+									<template v-slot:tr v-if="tableData.data.length > 0">
+										<tr slot="tr">
+											<td>
+												{{tableDataEnd.index}}
+											</td>
+											<td>
+												{{tableDataEnd.name}}
+											</td>
+											<td>
+												{{tableDataEnd.llfdl}}
+											</td>
+											<td>
+												{{tableDataEnd.sjfdl}}
+											</td>
+											<td>
+												{{tableDataEnd.speed}}
+											</td>
+											<td>
+												{{tableDataEnd.fjhjx1}}
+											</td>
+											<td>
+												{{tableDataEnd.fjhjx2}}
+											</td>
+											<td>
+												{{tableDataEnd.jhjx1}}
+											</td>
+											<td>
+												{{tableDataEnd.jhjx2}}
+											</td>
+											<td>
+												{{tableDataEnd.sl1}}
+											</td>
+											<td>
+												{{tableDataEnd.sl2}}
+											</td>
+											<td>
+												{{tableDataEnd.xd1}}
+											</td>
+											<td>
+												{{tableDataEnd.xd2}}
+											</td>
+											<td>
+												{{tableDataEnd.xn1}}
+											</td>
+											<td>
+												{{tableDataEnd.xn2}}
+											</td>
+											<td>
+												{{tableDataEnd.xn3}}
+											</td>
+											<td>
+												{{tableDataEnd.xn4}}
+											</td>
+											<td>
+												{{tableDataEnd.fnlly}}
+											</td>
+										</tr>
+									</template>
+								</Table>
 							</div>
 						</panel>
 					</el-col>
@@ -231,6 +290,7 @@
 					],
 					data: [],
 				},
+				tableDataEnd:[],//合计
 				ChangZhan: [], //场站
 				XiangMu: [], //项目
 				XianLu: [], //线路
@@ -362,7 +422,7 @@
 						sort: ''
 					},
 					success(res) {
-						console.log(res)
+						console.log(JSON.stringify(res))
 						var name = [],
 							data = [],
 							llfdl = [],
@@ -418,8 +478,9 @@
 								legend: legend,
 								data: arr1
 							};
-
 						}
+						that.tableDataEnd = data2[data2.length - 1];
+						data2.pop();
 						that.tableData.data = data2;
 					}
 				});

+ 5 - 2
src/views/Decision/Decision2.vue

@@ -64,7 +64,7 @@
 			<toolbar-panel title="风机绩效榜" :showLine="false"></toolbar-panel>
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" :canScroll="false" ref="curRef"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></Table>
 				</div>
 			</div>
 			<el-row class="mg-b-16">
@@ -95,7 +95,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -963,6 +963,9 @@
 			back(){
 				this.detailShow = 1;
 				this.clearDb();
+			},
+			onSort(){
+				this.clearDb();
 			}
 		}
 	};

+ 5 - 2
src/views/Decision/Decision2Cjdb.vue

@@ -43,7 +43,7 @@
 			<toolbar-panel title="场际对标" :showLine="false"></toolbar-panel>
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" :canScroll="false" ref="curRef"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></Table>
 				</div>
 			</div>
 			<el-row class="mg-b-16">
@@ -69,7 +69,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -886,6 +886,9 @@
 			back() {
 				this.detailShow = 1;
 				this.clearDb();
+			},
+			onSort(){
+				this.clearDb();
 			}
 		}
 	};

+ 5 - 2
src/views/Decision/Decision2Cndb.vue

@@ -43,7 +43,7 @@
 			<toolbar-panel title="场内对标" :showLine="false"></toolbar-panel>
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" :canScroll="false" ref="curRef"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></Table>
 				</div>
 			</div>
 			<el-row :type="'flex'" class="content">
@@ -59,7 +59,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -853,6 +853,9 @@
 			back() {
 				this.detailShow = 1;
 				this.clearDb();
+			},
+			onSort(){
+				this.clearDb();
 			}
 		}
 	};

+ 5 - 2
src/views/Decision/Decision2Xldb.vue

@@ -63,7 +63,7 @@
 			<toolbar-panel title="线路对标" :showLine="false"></toolbar-panel>
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" :canScroll="false" ref="curRef"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></Table>
 				</div>
 			</div>
 			<el-row class="mg-b-16">
@@ -89,7 +89,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -979,6 +979,9 @@
 			back() {
 				this.detailShow = 1;
 				this.clearDb();
+			},
+			onSort(){
+				this.clearDb();
 			}
 		}
 	};

+ 5 - 2
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"></Table>
+					<Table :data="tableData" :canScroll="false" ref="curRef" @onSort="onSort"></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"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -930,6 +930,9 @@
 			back() {
 				this.detailShow = 1;
 				this.clearDb();
+			},
+			onSort(){
+				this.clearDb();
 			}
 		}
 	};

+ 5 - 2
src/views/Decision/Decision3.vue

@@ -52,7 +52,7 @@
 		<div class="info" v-show="detailShow==1">
 			<div class="mg-b-16">
 				<div class="project-table">
-					<Table :data="tableData" ref="curRef"></Table>
+					<Table :data="tableData" ref="curRef" @onSort="onSort"></Table>
 				</div>
 			</div>
 			<!-- 风资源列表 -->
@@ -99,7 +99,7 @@
 			<el-col :span="24" class="pd-l-8">
 				<panel :title="'风机对标列表明细'" :showLine="false">
 					<div class="project-table">
-						<Table :data="tableDataDetail" ref="curRef"></Table>
+						<Table :data="tableDataDetail" ref="curRef" @onSort="onSort"></Table>
 					</div>
 				</panel>
 			</el-col>
@@ -937,6 +937,9 @@
 				this.detailShow = 1;
 				this.clearDb();
 			},
+			onSort(){
+				this.clearDb();
+			},
 			detailClick(data) {
 				var that = this;
 				var dataId = that.tableIdArr[data.index - 1];

+ 363 - 0
src/views/Decision/Decision3Db.vue

@@ -0,0 +1,363 @@
+<template>
+	<div class="decision-page-3">
+		<div class="query mg-b-8">
+			<div class="query-items">
+				<div class="query-item">
+					<div class="lable">场站:</div>
+					<div class="search-input">
+						<el-select v-model="value1" @change="ChangZhanChange(value1)" multiple placeholder="请选择"
+							popper-class="select">
+							<el-option v-for="item in ChangZhan" :key="item.id" :value="item.id" :label="item.name">
+							</el-option>
+						</el-select>
+					</div>
+				</div>
+				<div class="query-item">
+					<div class="lable">项目:</div>
+					<div class="search-input">
+						<el-select v-model="value2" @change="XiangMuChange(value2)" multiple placeholder="请选择"
+							popper-class="select">
+							<el-option v-for="item in XiangMu" :key="item.id" :value="item.id" :label="item.name">
+							</el-option>
+						</el-select>
+					</div>
+				</div>
+				<div class="query-item">
+					<div class="lable">开始日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="value4" @change="BeginChange(value4)" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
+			</div>
+			<div class="actions mg-b-8">
+				<button class="btn green">风场</button>
+				<button class="btn">项目</button>
+				<button class="btn">集电线路</button>
+			</div>
+		</div>
+		<!-- 列表 -->
+		<div class="info">
+			<div class="mg-b-16">
+				<div class="project-table">
+					<Table :data="tableData"></Table>
+				</div>
+			</div>
+			<!-- 风资源列表 -->
+			<div class="direction-info mg-b-16">
+				<table class="com-table">
+					<tbody>
+						<tr>
+							<td v-for="(col, i) of tableData.column" :key="i">
+								<div v-if="i == 0">22</div>
+								<div v-if="i == 1">风资源</div>
+								<div v-if="i != 0 && i != 1">
+									<div class="direction-title">3.123</div>
+									<div class="direction-chart">
+										<DirectionRadarChart :width="'70%'" :height="'232px'" :value="90" />
+										<div class="legend mg-t-16">
+											<span class="dot"></span>
+											<span>静风频率为2</span>
+										</div>
+									</div>
+								</div>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</div>
+			<!-- 日功率曲线 -->
+			<div>
+				<toolbar-panel :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-orange"></div>
+								<div class="legend-text">预测功率4小时</div>
+							</div>
+						</div>
+					</template>
+					<double-line-chart :height="'200px'" />
+					<normal-line-chart :height="'200px'" />
+				</toolbar-panel>
+			</div>
+		</div>
+	</div>
+
+</template>
+
+<script>
+	import DoubleLineChart from "../../components/chart/line/double-line-chart.vue";
+	import NormalLineChart from "../../components/chart/line/normal-line-chart.vue";
+	import DirectionRadarChart from "../../components/chart/radar/direction-radar-chart.vue";
+	import SvgIcon from "../../components/coms/icon/svg-icon.vue";
+	import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
+	import Table from "../../components/coms/table/table.vue";
+	export default {
+		components: {
+			Table,
+			SvgIcon,
+			DirectionRadarChart,
+			ToolbarPanel,
+			DoubleLineChart,
+			NormalLineChart
+		},
+		data() {
+			return {
+				tableData: {
+					column: [{
+							name: "",
+							field: "index",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "项目",
+							field: "name",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "项目",
+							field: "lqf",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "项目",
+							field: "yggl",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "项目",
+							field: "yyy",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "项目",
+							field: "pcspp",
+							is_num: false,
+							is_light: false,
+						},
+					],
+					data: [{
+						index: 1,
+						name: "MG01-01",
+						lqf: "0.1000",
+						yggl: "0.1000",
+						yyy: "0.10",
+						pcspp: "0.1000",
+						u1: "0.1000",
+						u2: "0.1000",
+						v1: "0.1000",
+						v2: "0.1000",
+						w1: "0.1000",
+						w2: "0.1000",
+						zca: "0.1000",
+						zcb: "0.1000",
+						clx: "0.1000",
+						clx1: "0.1000",
+						clx2: "0.1000",
+						jc: "0.1000",
+						hh: "0.1000",
+						hj: "0.1000",
+						is_light: false,
+					}, ],
+				},
+				options: [{
+						value: "选项1",
+						label: "黄金糕",
+					},
+					{
+						value: "选项2",
+						label: "双皮奶",
+					},
+					{
+						value: "选项3",
+						label: "蚵仔煎",
+					},
+					{
+						value: "选项4",
+						label: "龙须面",
+					},
+					{
+						value: "选项5",
+						label: "北京烤鸭",
+					},
+				],
+				value1: [],
+				value2: [],
+				value3: [],
+				value4: "",
+				value5: "",
+			};
+		},
+		created() {
+			
+		},
+		methods:{
+			ChangZhanVal() {
+				var that = this;
+				that.API.requestData({
+					method: "GET",
+					baseURL : "http://10.155.32.4:9001/",
+					subUrl: "benchmarking/wplist",
+					success(res) {
+						that.ChangZhan = res.data;
+					}
+				});
+			},
+			ChangZhanChange(val) {
+				this.value1 = val;
+				this.value2 = [];
+				this.value3 = [];
+				this.AjaxCommon();
+				this.XiangMuVal(val);
+				this.clearDb();
+			},
+			XiangMuVal(val) {
+				var that = this;
+				that.API.requestData({
+					method: "GET",
+					baseURL : "http://10.155.32.4:9001/",
+					subUrl: "benchmarking/projectList",
+					data: {
+						wpids: val
+					},
+					success(res) {
+						that.XiangMu = res.data;
+					}
+				});
+			},
+			XiangMuChange(val) {
+				this.value2 = val;
+				this.value3 = [];
+				this.AjaxCommon();
+				this.XianLuVal(val);
+				this.clearDb();
+			},
+		}
+	};
+</script>
+
+<style lang="less">
+	.decision-page-3 {
+		.com-panel {
+			.panel-title {
+				color: @gray-l;
+			}
+
+			.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: @gray-l;
+						font-size: @fontsize-s;
+					}
+				}
+			}
+		}
+
+		.info {
+			overflow: auto;
+			height: calc(100vh - 150px);
+		}
+
+		.project-table {
+			overflow: auto;
+
+			.com-table {
+				tbody {
+					padding-right: 0px;
+				}
+
+				th,
+				td {
+					color: #b2bdc0;
+
+					&:nth-child(1) {
+						width: 32px;
+					}
+
+					&:nth-child(2) {
+						width: 183px;
+					}
+				}
+			}
+		}
+
+		.direction-info {
+			.com-table {
+				tbody {
+					padding-right: 0px;
+				}
+
+				th,
+				td {
+					color: #b2bdc0;
+					padding: 0;
+
+					&:nth-child(1) {
+						width: 32px;
+						background-color: fade(#536268, 20);
+					}
+
+					&:nth-child(2) {
+						width: 183px;
+						background-color: fade(#536268, 40);
+					}
+
+					.direction-title {
+						background-color: fade(#536268, 20);
+						font-size: @fontsize-s;
+						line-height: 2.963vh;
+					}
+
+					.direction-chart {
+						padding-top: 48px;
+
+						.legend {
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							margin-top: 32px;
+							margin-bottom: 16px;
+
+							.dot {
+								width: 7px;
+								height: 7px;
+								background: @green;
+								display: inline-block;
+								margin-right: 8px;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>