From af1c9e588f1de0240390648f9bb56aa486870aff Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期五, 16 五月 2025 17:40:18 +0800
Subject: [PATCH] 提交高度修改;

---
 src/views/basicData/processRouteDataPreparate/index.vue |  165 ++++++++++++++++++++++++++++++++----------------------
 1 files changed, 97 insertions(+), 68 deletions(-)

diff --git a/src/views/basicData/processRouteDataPreparate/index.vue b/src/views/basicData/processRouteDataPreparate/index.vue
index dd00a50..f05d3f8 100644
--- a/src/views/basicData/processRouteDataPreparate/index.vue
+++ b/src/views/basicData/processRouteDataPreparate/index.vue
@@ -1,78 +1,79 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="20">
-      <el-form
-        :model="queryParams"
-        ref="queryRef"
-        :rules="rules"
-        :inline="true"
-        v-show="showSearch"
-        :label-width="locale === 'zh' ? '90px' : '160px'"
-      >
-        <el-row :gutter="20">
-          <el-col :span="9">
-            <el-form-item :label="$t('plan.query.itemNumber')" prop="itemCode">
-              <el-input
-                style="width: 240px"
-                v-model="queryParams.itemCode"
-                :placeholder="`${$t('common.common.placeholder')}${$t(
-                  'plan.query.itemNumber'
-                )}`"
-                clearable
-                @keyup.enter="handleQuery"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="9">
-            <el-form-item
-              :label="$t('plan.table.applicableFactories')"
-              prop="orgCode"
+    <el-form
+      :model="queryParams"
+      ref="queryRef"
+      :rules="rules"
+      :inline="true"
+      v-show="showSearch"
+      label-position="left"
+    >
+      <el-row type="flex" justify="left" :gutter="20">
+        <el-col :span="locale === 'zh' ? 5 : 8">
+          <el-form-item :label="$t('plan.query.itemNumber')" :label-width="locale === 'zh' ? '50px' : '110px'"  prop="itemCode">
+            <el-input
+              :style="{ width: locale === 'zh' ? '140px' : '220px' }"
+              v-model="queryParams.itemCode"
+              :placeholder="`${$t('common.common.placeholder')}${$t(
+                'plan.query.itemNumber'
+              )}`"
+              clearable
+              @keyup.enter="handleQuery"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="locale === 'zh' ? 7 : 10">
+          <el-form-item
+            :label="$t('plan.table.applicableFactories')"
+            :label-width="locale === 'zh' ? '70px' : '150px'"
+            prop="orgCode"
+          >
+            <el-select
+              clearable
+              v-model="queryParams.orgCode"
+              :style="{ width: locale === 'zh' ? '180px' : '280px' }"
+              :placeholder="`${$t('common.common.placeholder')}${$t(
+                'plan.table.applicableFactories'
+              )}`"
             >
-              <el-select
-                clearable
-                v-model="queryParams.orgCode"
-                :style="{ width: locale == 'zh' ? '160px' : '250px' }"
-                :placeholder="`${$t('common.common.placeholder')}${$t(
-                  'plan.table.applicableFactories'
-                )}`"
+              <el-option
+                v-for="plant in plantList"
+                :key="plant.id"
+                :label="plant.plantName"
+                :value="plant.plantCode"
               >
-                <el-option
-                  v-for="plant in plantList"
-                  :key="plant.id"
-                  :label="plant.plantName"
-                  :value="plant.plantCode"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6" style="text-align: right">
-            <el-form-item>
-              <el-button type="primary" icon="Search" @click="handleQuery">{{
-                $t("common.common.query")
-              }}</el-button>
-              <el-button icon="Refresh" @click="resetQuery">{{
-                $t("common.common.reset")
-              }}</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <!-- <el-col :span="locale === 'zh' ? 11 : 6" style="text-align: right">
+          <el-form-item class="column-with-margin">
+            <el-button type="primary" icon="Search" @click="handleQuery">{{
+              $t("common.common.query")
+            }}</el-button>
+            <el-button icon="Refresh" @click="resetQuery">{{
+              $t("common.common.reset")
+            }}</el-button>
+          </el-form-item>
+        </el-col> -->
+      </el-row>
+    </el-form>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="success"
           plain
           icon="Refresh"
+          :disabled="loadingRefresh"
           @click="handleRefresh"
-          v-hasPermi="['apsPartRouteStat:edit']"
+          v-hasPermi="['Aps:ApsStandardProcessRouteHeader:refreshProcessRouteData']"
           >{{ $t("common.common.update") }}</el-button
         >
       </el-col>
       <right-toolbar
         v-model:showSearch="showSearch"
-        @queryTable="getList"
+        @queryTable="handleQuery"
+        @resetTable="resetQuery"
       ></right-toolbar>
     </el-row>
 
@@ -82,6 +83,8 @@
       :data="processRouteList"
       :loading="loading"
       :height="height"
+      :virtualYConfig="virtualYConfig"
+      :showOverflow="true"
       @on-checkbox="handleCheckboxChange"
       :page="page"
       @changePageNo="changePageNo"
@@ -94,7 +97,7 @@
           type="primary"
           link
           @click="handleCheckView(row)"
-          v-hasPermi="['aps:calendar:update']"
+          v-hasPermi="['Aps:ApsStandardProcessRouteLine:list']"
           >{{ $t("common.common.view") }}</el-button
         >
       </template>
@@ -103,6 +106,7 @@
       :title="$t('common.common.viewDetails')"
       v-model="openDialog"
       width="900px"
+      style="height: 400px; overflow: hidden"
       append-to-body
     >
       <HxlhTable
@@ -110,13 +114,13 @@
         :columns="subGridOptions"
         :data="subList"
         :loading="loading"
-        :height="heightSub"
+        :height="'280px;'"
       >
       </HxlhTable>
       <template #footer>
         <span class="dialog-footer">
           <el-button @click="openDialog = false">{{
-            $t("common.common.cancel")
+            $t("common.common.close")
           }}</el-button>
         </span>
       </template>
@@ -124,11 +128,12 @@
   </div>
 </template>
 
-<script setup name="ApsPlatePlan">
+<script setup name="ProcessRouteDataPreparate">
 import { listAll_plant } from "@/api/basicData/plant";
 import {
   apsStandardProcessRouteHeaderList,
   apsStandardProcessRouteLineList,
+  apsRefreshProcessRouteDataList
 } from "@/api/basicData/processRoute.js";
 import { listAll_shop } from "@/api/basicData/shop";
 import HxlhTable from "@/components/HxlhTable/index.vue";
@@ -138,6 +143,11 @@
 import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
 const { t, locale } = useI18n();
 const { proxy } = getCurrentInstance();
+const virtualYConfig = {
+  enabled: true,
+  gt: 0,
+  threshold: 50,
+};
 // 鍒嗛〉灞炴��
 const page = ref({
   total: 0,
@@ -150,11 +160,12 @@
 const subGridOptions = ref([]);
 const subList = ref([]);
 const loading = ref(false);
+const loadingRefresh = ref(false);
 const showSearch = ref(true);
 const single = ref(true);
 const total = ref(0);
 
-const height = ref(document.documentElement.clientHeight - 210 + "px;");
+const height = ref(document.documentElement.clientHeight - 220 + "px;");
 const heightSub = ref(document.documentElement.clientHeight - 320 + "px;");
 // 琛ㄦ牸閰嶇疆
 const columns = ref([]);
@@ -233,7 +244,7 @@
         },
       },
       {
-        title: "鎿嶄綔",
+        title: t("common.common.operate"),
         width: 100,
         fixed: "right",
         slots: { default: "buttons" },
@@ -262,19 +273,19 @@
       {
         title: t("basic.table.effectiveDate"),
         field: "startDate",
-        width: 200,
+        width: 230,
         align: "center",
       },
       {
         title: t("basic.table.expiringDate"),
         field: "endDate",
-        width: 200,
+        width: 230,
         align: "center",
       },
       {
         title: t("basic.table.integrationDate"),
         field: "createTime",
-        width: 200,
+        width: 230,
         align: "center",
       },
       {
@@ -324,6 +335,20 @@
   },
   { immediate: true, deep: true }
 );
+async function handleRefresh() {
+  loadingRefresh.value = true;
+  const res = await apsRefreshProcessRouteDataList();
+  if (res.code == 200) {
+    ElMessage({
+      message: t("plan.message.update"),
+      type: "success",
+    });
+    loadingRefresh.value = false;
+    getList();
+  } else {
+    loadingRefresh.value = false;
+  }
+}
 function changePageNo(currentPage) {
   queryParams.value.pageNum = currentPage;
   page.value.current = currentPage;
@@ -343,6 +368,7 @@
   apsStandardProcessRouteHeaderList(queryParams.value)
     .then((response) => {
       processRouteList.value = response.rows;
+      page.value.total = response.total;
       loading.value = false;
     })
     .catch(() => {
@@ -403,4 +429,7 @@
 h4 {
   font-weight: bold;
 }
+.column-with-margin {
+  margin-right: 0px;
+}
 </style>

--
Gitblit v1.9.3