From 8b66ef0d6c44636306f99a502f8bf8cf679a55b0 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期一, 28 四月 2025 15:37:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/mainPlan/gasPlanning/index.vue |   62 +++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 15 deletions(-)

diff --git a/src/views/mainPlan/gasPlanning/index.vue b/src/views/mainPlan/gasPlanning/index.vue
index 33b6b60..4848927 100644
--- a/src/views/mainPlan/gasPlanning/index.vue
+++ b/src/views/mainPlan/gasPlanning/index.vue
@@ -7,7 +7,7 @@
       :inline="true"
       label-width="68px"
     >
-      <el-row type="flex" justify="left" @click.stop="handleCancleStaus">
+      <el-row type="flex" justify="left">
         <el-col :span="6">
           <el-form-item label="閫夋嫨鏈堜唤" prop="description">
             <el-date-picker
@@ -32,10 +32,16 @@
     </el-form>
     <div class="box_container">
       <el-row>
-        <el-col :span="22" @click="handleCancleStaus">
+        <el-col :span="!clickedTableRef?22:20">
           <div class="title_text">绠¤矾瑙勫垝浜ц兘</div>
         </el-col>
-        <el-col :span="2">
+        <el-col :span="1" v-if="!clickedTableRef">
+          <el-button 
+            class="title_btn"
+            type="default"
+            @click="editRowEvent" >缂栬緫</el-button>
+        </el-col>
+        <el-col :span="1.8" v-if="clickedTableRef">
           <el-button
             class="title_btn"
             type="primary"
@@ -44,6 +50,12 @@
           >
             淇濆瓨
           </el-button>
+        </el-col>
+        <el-col :span="1" v-if="clickedTableRef"> 
+          <el-button 
+            class="title_btn ml20"
+            type="default"
+            @click="handleCancleStaus">鍙栨秷</el-button>
         </el-col>
       </el-row>
 
@@ -75,7 +87,7 @@
           size="small"
           @cell-click="cellClickEvent"
         >
-          <vxe-column field="processName" title="鏍囧噯宸ュ簭鍚嶇О" min-width="150">
+          <vxe-column field="processName" title="鏍囧噯宸ュ簭鍚嶇О" min-width="150" fixed="left">
           </vxe-column>
           <vxe-column
             field="dayProduceType"
@@ -275,10 +287,16 @@
     </div>
     <div class="box_container">
       <el-row>
-        <el-col :span="22" @click="handleCancleStausGas">
+        <el-col :span="!clickedTableRefGas?22:20">
           <div class="title_text">姘旀煖瑙勫垝浜ц兘</div>
         </el-col>
-        <el-col :span="2">
+        <el-col :span="1" v-if="!clickedTableRefGas">
+          <el-button 
+            class="title_btn"
+            type="default"
+            @click="editRowEventGas" >缂栬緫</el-button>
+        </el-col>
+        <el-col :span="1.8" v-if="clickedTableRefGas">
           <el-button
             class="title_btn"
             type="primary"
@@ -287,6 +305,12 @@
           >
             淇濆瓨
           </el-button>
+        </el-col>
+        <el-col :span="1" v-if="clickedTableRefGas"> 
+          <el-button 
+            class="title_btn ml20"
+            type="default"
+            @click="handleCancleStausGas">鍙栨秷</el-button>
         </el-col>
       </el-row>
       <div class="tabel_container">
@@ -309,7 +333,7 @@
           :data="gasPlanList"
           @cell-click="cellClickEventGas"
         >
-          <vxe-column field="processName" title="鏍囧噯宸ュ簭鍚嶇О" min-width="150">
+          <vxe-column field="processName" title="鏍囧噯宸ュ簭鍚嶇О" min-width="150" fixed="left">
           </vxe-column>
           <vxe-column
             field="dayProduceType"
@@ -624,12 +648,12 @@
 //     return $table.isEditByRow(row);
 //   }
 // };
-// const editRowEvent = (row) => {
-//   const $table = tableRef.value;
-//   if ($table) {
-//     $table.setEditRow(row);
-//   }
-// };
+const editRowEvent = () => {
+  clickedTableRef.value = true;
+};
+const editRowEventGas = () => {
+  clickedTableRefGas.value = true;
+};
 const saveRowEvent = (row) => {
   if (!queryParams.value.date) {
     ElMessage({
@@ -657,9 +681,16 @@
 }
 const handleCancleStaus = () => {
   clickedTableRef.value = false;
+  const year = queryParams.value.date.split("-")[0];
+  const month = parseInt(queryParams.value.date.split("-")[1]);
+  getRouteList(year, month);
+
 };
 const handleCancleStausGas = () => {
   clickedTableRefGas.value = false;
+  const year = queryParams.value.date.split("-")[0];
+  const month = parseInt(queryParams.value.date.split("-")[1]);
+  getGasList(year, month);
 }
 // const cancelRowEvent = () => {
 //   const $table = tableRef.value;
@@ -768,12 +799,10 @@
   loading2.value = false;
 }
 function cellClickEvent({ row, column }) {
-  clickedTableRef.value = true;
   row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber;
   row.monthProduceAllNum = row.dayProduceAllNum * row.days;
 }
 function cellClickEventGas({ row, column }) {
-  clickedTableRefGas.value = true;
   row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber;
   row.monthProduceAllNum = row.dayProduceAllNum * row.days;
 }
@@ -877,6 +906,9 @@
   }
   .title_btn {
     margin-top: 20px;
+    &.ml20{
+      margin-left:20px;
+    }
   }
   .tabel_container {
     width: 98%;

--
Gitblit v1.9.3