From cc03769aaf628a2830e132fe22a4b224e138bf7d Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期四, 16 五月 2024 13:36:53 +0800
Subject: [PATCH] feat: 新增调度分析

---
 customer_list/ch/static/config/route.js                                   |    9 +
 src/views/project/ch/efficiencyAnalysis/scheduling/SchedulingAnalysis.vue |  250 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 259 insertions(+), 0 deletions(-)

diff --git a/customer_list/ch/static/config/route.js b/customer_list/ch/static/config/route.js
index b18239b..6f24694 100644
--- a/customer_list/ch/static/config/route.js
+++ b/customer_list/ch/static/config/route.js
@@ -8,6 +8,15 @@
 		component: '/project/ch/efficiencyAnalysis/curveAnalysis/RunPointAnalysis.vue',
 		redirect: null,
 	},
+	//璋冨害鍒嗘瀽
+	{
+		name: 'SchedulingAnalysis',
+		isKeepAlive: true,
+		isAffix: false,
+		path: '/efficiencyAnalysis/schedulingAnalysis',
+		component: '/project/ch/efficiencyAnalysis/scheduling/SchedulingAnalysis.vue',
+		redirect: null,
+	},
 	{ name: 'UserManage', isKeepAlive: true, isAffix: false, path: '/auth/userManage', component: '/auth/userManage/UserManage.vue' },
 	{ name: 'AccessLog', isKeepAlive: true, isAffix: false, path: '/auth/accessLog', component: '/auth/accessLog/AccessLog.vue' },
 	{
diff --git a/src/views/project/ch/efficiencyAnalysis/scheduling/SchedulingAnalysis.vue b/src/views/project/ch/efficiencyAnalysis/scheduling/SchedulingAnalysis.vue
new file mode 100644
index 0000000..2c30bdc
--- /dev/null
+++ b/src/views/project/ch/efficiencyAnalysis/scheduling/SchedulingAnalysis.vue
@@ -0,0 +1,250 @@
+<template>
+	<el-row :gutter="8" class="h100">
+		<el-col :span="4" :xs="24" class="h100">
+			<el-card shadow="hover" class="h100 left-tree-card" v-loading="treeLoading">
+				<LeftTreeByMgr :treedata="listTreeData" title-name="娉电珯鍒楄〃" :current-node-key="currentListID" @click="handleClickNode">
+				</LeftTreeByMgr>
+			</el-card>
+		</el-col>
+		<el-col :span="20" :xs="24" class="flex-column h100">
+			<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
+				<el-form :inline="true" :model="queryParams">
+					<el-form-item label="杩涘彛姘翠綅" prop="WaterLevel">
+						<el-input v-model="queryParams.WaterLevel" style="width: 226.4px" placeholder="鍚嶇О" clearable></el-input>
+					</el-form-item>
+					<el-form-item label="鐩爣娴侀噺(m鲁/h)" prop="TargetFlow">
+						<el-input v-model="queryParams.TargetFlow" style="width: 226.4px" placeholder="缂栫爜" clearable />
+					</el-form-item>
+					<el-form-item label="鐩爣鍘嬪姏(MPa)" prop="TargetPressure">
+						<el-input v-model="queryParams.TargetPressure" style="width: 226.4px" placeholder="缂栫爜" clearable />
+					</el-form-item>
+					<el-form-item>
+						<el-button icon="ele-Refresh" @click="resetQuery" type="primary">璋冨害 </el-button>
+					</el-form-item>
+				</el-form>
+				<div style="width: 100%; height: 100px; padding: 10px" class="aside_main" :class="{ aside_main_show: !asideStatus }">
+					<el-form :inline="true" :model="pumpPanel">
+						<div class="flex flex-center">
+							<el-form-item label="鎬绘祦閲�">
+								<el-input v-model="pumpPanel.TotalFlow" style="width: 126.4px" readonly></el-input>
+							</el-form-item>
+							<el-form-item label="鎬诲帇鍔�">
+								<el-input v-model="pumpPanel.TotalPressure" style="width: 126.4px" readonly />
+							</el-form-item>
+							<el-form-item label="鎬诲姛鐜�">
+								<el-input v-model="pumpPanel.TotalPower" style="width: 126.4px" readonly />
+							</el-form-item>
+							<el-form-item label="鎬绘晥鐜�">
+								<el-input v-model="pumpPanel.TotalEfficiency" style="width: 126.4px" readonly />
+							</el-form-item>
+						</div>
+						<div class="flex flex-center">
+							<el-form-item label="鎬诲崈鍚ㄨ兘鑰�">
+								<el-input v-model="pumpPanel.WP" style="width: 126.4px" readonly />
+							</el-form-item>
+							<el-form-item label="鎬诲崟浣嶈兘鑰�">
+								<el-input v-model="pumpPanel.UWP" style="width: 126.4px" readonly />
+							</el-form-item>
+							<el-form-item label="寮�娉靛彴鏁�">
+								<el-input v-model="pumpPanel.UWP" style="width: 126.4px" readonly />
+							</el-form-item>
+						</div>
+					</el-form>
+				</div>
+				<!-- 鏀剁缉鍥炬爣 -->
+				<div :class="aside_open_close ? 'aside_open' : 'aside_close'" @click="asideChange">
+					<el-icon>
+						<ArrowUp v-if="aside_open_close" />
+						<ArrowDown v-else />
+					</el-icon>
+				</div>
+			</el-card>
+
+			<el-card class="flex-auto scroll-table-card" shadow="hover" style="margin-top: 8px">
+				<el-table
+					v-loading="tableLoading"
+					ref="draggableTableRef"
+					border
+					row-key="ID"
+					:row-class-name="isDragStatus ? 'cursor-move' : 'cursor-pointer'"
+					:cell-style="{ textAlign: 'center' }"
+					:header-cell-style="{ textAlign: 'center' }"
+					:data="displayTableData"
+					highlight-current-row
+					style="width: 100%"
+				>
+					<el-table-column prop="Name" label="鏈烘车" fixed="left" show-overflow-tooltip />
+					<el-table-column prop="Flow" label="娴侀噺(m鲁/h)" show-overflow-tooltip width="140" />
+					<el-table-column prop="Head" width="140" label="鎵▼(m)" show-overflow-tooltip />
+					<el-table-column prop="Power" width="140" label="鍔熺巼(kW/h)" show-overflow-tooltip />
+					<el-table-column prop="Efficiency" width="140" label="鏁堢巼(%)" show-overflow-tooltip />
+					<el-table-column prop="Frequency" label="棰戠巼(hz)" show-overflow-tooltip width="140" />
+					<el-table-column prop="Speed" width="140" label="杞��(rpm)" show-overflow-tooltip />
+					<el-table-column prop="Status" width="140" label="鐘舵��" show-overflow-tooltip> </el-table-column>
+					<el-table-column label="鎿嶄綔" width="150" fixed="right" show-overflow-tooltip>
+						<template #default="scope">
+							<!-- <el-button icon="ele-Edit" size="small" text type="primary" @click="openOperateDialog(scope.row)"> 缂栬緫 </el-button>
+							<el-button icon="ele-Delete" size="small" text type="danger" @click="deleteCurrentRow(scope.row)"> 鍒犻櫎 </el-button> -->
+						</template>
+					</el-table-column>
+				</el-table>
+			</el-card>
+		</el-col>
+	</el-row>
+</template>
+
+<script setup lang="ts">
+import { ElMessage } from 'element-plus';
+import { computed, onMounted, ref } from 'vue';
+// import {
+// 	GetAllChObjectByID,
+// 	GetCatalogObjectListTreeData,
+// 	GetIsExistChObjectCode,
+// 	UpdateChObjectSorter,
+// } from '/@/api/project\ch\efficiencyAnalysis/scheduling';
+import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue';
+//#region ====================== 宸︿晶鏍戞暟鎹紝tree init ======================
+const treeLoading = ref(false);
+const listTreeData = ref([]);
+const currentTreeNode = ref(null);
+const currentListID = computed(() => currentTreeNode.value?.StationID);
+const handleClickNode = (data) => {
+	currentTreeNode.value = data;
+	getTableData();
+};
+const getListTreeData = async () => {
+	return;
+	treeLoading.value = true;
+	const res = await GetCatalogObjectListTreeData().finally(() => {
+		treeLoading.value = false;
+	});
+	if (res?.Code === 0) {
+		const resData = (res.Data || []) as [];
+		listTreeData.value = resData;
+		const firstListTreeNode = listTreeData.value[0];
+		if (firstListTreeNode) {
+			handleClickNode(firstListTreeNode);
+		} else {
+			tableData.value = [];
+			currentTreeNode.value = null;
+		}
+	}
+};
+//#endregion
+
+//#region ====================== 琛ㄦ牸鏁版嵁锛宼able init ======================
+const aside_open_close = ref(false);
+const asideStatus = ref(false);
+const tableLoading = ref(false);
+const tableData = ref([]);
+const isDragStatus = ref(false);
+const getTableData = async () => {
+	return;
+	tableLoading.value = true;
+	const res = await GetAllChObjectByID({ CatalogObjectID: currentListID.value }).finally(() => {
+		tableLoading.value = false;
+	});
+	if (res?.Code === 0) {
+		const resData = (res.Data || []) as [];
+		tableData.value = resData;
+	} else {
+		ElMessage.error('鑾峰彇澶辫触' + (res?.Message ? `锛�${JSON.stringify(res.Message)}` : ''));
+	}
+};
+// 渚ц竟鏍忔敹缂╀笌灞曞紑
+const asideChange = () => {
+	asideStatus.value = !asideStatus.value;
+	if (asideStatus.value) {
+		aside_open_close.value = true;
+	} else {
+		aside_open_close.value = false;
+	}
+};
+//#endregion
+
+//#region ====================== 琛ㄦ牸鏌ヨ銆佹帓搴忥紝search form init ======================
+const queryParams = ref({
+	StationID: 1,
+	WaterLevel: 11,
+	TargetFlow: 20000,
+	TargetPressure: 0.43,
+});
+//娉电珯淇℃伅闈㈡澘
+const pumpPanel = ref({
+	TotalFlow: 124,
+	TotalPressure: 12345,
+	TotalPower: 123,
+	TotalEfficiency: 79,
+	WP: 123,
+	UWP: 123,
+});
+// const { resetQuery, handleQueryTable, displayTableData } = useQueryTable(tableData, queryParams, getTableData);
+
+//#endregion
+
+onMounted(() => {
+	getListTreeData();
+});
+</script>
+<style scoped lang="scss">
+/* 渚ц竟鏍忔牱寮� */
+.aside_main {
+	height: 140px !important;
+	transition: width 0.3s;
+	box-sizing: border-box;
+	// box-shadow: inset 0px 0px 1px #3d3d3d;
+}
+
+/* 渚ц竟鏍忔寜閽牱寮� */
+.aside_open {
+	position: absolute;
+	left: 50%;
+	top: 185px;
+	width: 60px;
+	height: 16px;
+	line-height: 60px;
+	color: #fff;
+	background-color: #2a333a;
+	border-radius: 0 6px 6px 0;
+	font-size: 20px;
+	z-index: 1000;
+	cursor: pointer;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+	&:hover {
+		background-color: #ff8e2b;
+		color: #fff;
+	}
+}
+.aside_main_show {
+	height: 17px !important;
+
+	.el-form {
+		display: none;
+	}
+}
+.aside_close {
+	position: absolute;
+	left: 50%;
+	top: 75px;
+	width: 60px;
+	height: 16px;
+	line-height: 60px;
+	color: #fff;
+	background-color: #2a333a;
+	border-radius: 0 6px 6px 0;
+	font-size: 20px;
+	z-index: 1000;
+	cursor: pointer;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+	&:hover {
+		background-color: #ff8e2b;
+		color: #fff;
+	}
+}
+</style>

--
Gitblit v1.9.3