From 08114b7451615854cb01556a7c477e32e17f520e Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期五, 03 四月 2026 09:47:04 +0800
Subject: [PATCH] refactor: 调整储丝单柜卷包产量计算逻辑

---
 ruoyi-plus-soybean/src/views/analy/roller/index.vue |  355 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 177 insertions(+), 178 deletions(-)

diff --git a/ruoyi-plus-soybean/src/views/analy/roller/index.vue b/ruoyi-plus-soybean/src/views/analy/roller/index.vue
index faf1d54..1573e1e 100755
--- a/ruoyi-plus-soybean/src/views/analy/roller/index.vue
+++ b/ruoyi-plus-soybean/src/views/analy/roller/index.vue
@@ -15,7 +15,6 @@
   name: 'RollerDataList'
 });
 
-
 const appStore = useAppStore();
 const { download } = useDownload();
 const { hasAuth } = useAuth();
@@ -51,188 +50,188 @@
 
 const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination, scrollX } =
   useNaivePaginatedTable({
-  api: () => fetchGetRollerDataList(searchParams.value),
-  transform: response => defaultTransform(response),
-  onPaginationParamsChange: params => {
-    searchParams.value.pageNum = params.page;
-    searchParams.value.pageSize = params.pageSize;
-  },
-  columns: () => [
-    {
-      type: 'selection',
-      align: 'center',
-      width: 48
+    api: () => fetchGetRollerDataList(searchParams.value),
+    transform: response => defaultTransform(response),
+    onPaginationParamsChange: params => {
+      searchParams.value.pageNum = params.page;
+      searchParams.value.pageSize = params.pageSize;
     },
-    {
-      key: 'index',
-      title: $t('common.index'),
-      align: 'center',
-      width: 64,
-      render: (_, index) => index + 1
-    },
-    {
-      key: 'time',
-      title: '鏃堕棿',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'key',
-      title: 'key',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'online',
-      title: '缃戠粶鐘舵��',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'qty',
-      title: '浜ч噺',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'badQty',
-      title: '鍓旈櫎浜ч噺',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'lvbangVal',
-      title: '婊ゆ娑堣��',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'juanyanzhiVal',
-      title: '鍗风儫绾告秷鑰�',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'shuisongzhiVal',
-      title: '姘存澗绾告秷鑰�',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'runTime',
-      title: '杩愯鏃堕棿',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'stopTime',
-      title: '鍋滄満鏃堕棿',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'stopTimes',
-      title: '鍋滄満娆℃暟',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'speed',
-      title: '杞﹂��',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'runStatus',
-      title: '杩愯鐘舵��',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'cy',
-      title: '鍌ㄧ儫璁惧鍌ㄩ噺',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'cyCs',
-      title: '鍌ㄧ儫璁惧杞﹂��',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'cyOnline',
-      title: '鍌ㄧ儫璁惧缃戠粶',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'recQty1',
-      title: '鎺ユ敹鏈轰骇閲�',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'recQty2',
-      title: '鎺ユ敹鏈轰骇閲�2',
-      align: 'center',
-      minWidth: 120
-    },
-    {
-      key: 'operate',
-      title: $t('common.operate'),
-      align: 'center',
-      width: 130,
-      render: row => {
-        const divider = () => {
-          if (!hasAuth('qa:rollerData:edit') || !hasAuth('qa:rollerData:remove')) {
-            return null;
-          }
-          return <NDivider vertical />;
-        };
+    columns: () => [
+      {
+        type: 'selection',
+        align: 'center',
+        width: 48
+      },
+      {
+        key: 'index',
+        title: $t('common.index'),
+        align: 'center',
+        width: 64,
+        render: (_, index) => index + 1
+      },
+      {
+        key: 'time',
+        title: '鏃堕棿',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'key',
+        title: 'key',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'online',
+        title: '缃戠粶鐘舵��',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'qty',
+        title: '浜ч噺',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'badQty',
+        title: '鍓旈櫎浜ч噺',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'lvbangVal',
+        title: '婊ゆ娑堣��',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'juanyanzhiVal',
+        title: '鍗风儫绾告秷鑰�',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'shuisongzhiVal',
+        title: '姘存澗绾告秷鑰�',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'runTime',
+        title: '杩愯鏃堕棿',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'stopTime',
+        title: '鍋滄満鏃堕棿',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'stopTimes',
+        title: '鍋滄満娆℃暟',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'speed',
+        title: '杞﹂��',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'runStatus',
+        title: '杩愯鐘舵��',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'cy',
+        title: '鍌ㄧ儫璁惧鍌ㄩ噺',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'cyCs',
+        title: '鍌ㄧ儫璁惧杞﹂��',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'cyOnline',
+        title: '鍌ㄧ儫璁惧缃戠粶',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'recQty1',
+        title: '鎺ユ敹鏈轰骇閲�',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'recQty2',
+        title: '鎺ユ敹鏈轰骇閲�2',
+        align: 'center',
+        minWidth: 120
+      },
+      {
+        key: 'operate',
+        title: $t('common.operate'),
+        align: 'center',
+        width: 130,
+        render: row => {
+          const divider = () => {
+            if (!hasAuth('qa:rollerData:edit') || !hasAuth('qa:rollerData:remove')) {
+              return null;
+            }
+            return <NDivider vertical />;
+          };
 
-        const editBtn = () => {
-          if (!hasAuth('qa:rollerData:edit')) {
-            return null;
-          }
+          const editBtn = () => {
+            if (!hasAuth('qa:rollerData:edit')) {
+              return null;
+            }
+            return (
+              <ButtonIcon
+                text
+                type="primary"
+                icon="material-symbols:drive-file-rename-outline-outline"
+                tooltipContent={$t('common.edit')}
+                onClick={() => edit(row.time)}
+              />
+            );
+          };
+
+          const deleteBtn = () => {
+            if (!hasAuth('qa:rollerData:remove')) {
+              return null;
+            }
+            return (
+              <ButtonIcon
+                text
+                type="error"
+                icon="material-symbols:delete-outline"
+                tooltipContent={$t('common.delete')}
+                popconfirmContent={$t('common.confirmDelete')}
+                onPositiveClick={() => handleDelete(row.time)}
+              />
+            );
+          };
+
           return (
-            <ButtonIcon
-              text
-              type="primary"
-              icon="material-symbols:drive-file-rename-outline-outline"
-              tooltipContent={$t('common.edit')}
-              onClick={() => edit(row.time)}
-            />
+            <div class="flex-center gap-8px">
+              {editBtn()}
+              {divider()}
+              {deleteBtn()}
+            </div>
           );
-        };
-
-        const deleteBtn = () => {
-          if (!hasAuth('qa:rollerData:remove')) {
-            return null;
-          }
-          return (
-            <ButtonIcon
-              text
-              type="error"
-              icon="material-symbols:delete-outline"
-              tooltipContent={$t('common.delete')}
-              popconfirmContent={$t('common.confirmDelete')}
-              onPositiveClick={() => handleDelete(row.time)}
-            />
-          );
-        };
-
-        return (
-          <div class="flex-center gap-8px">
-            {editBtn()}
-            {divider()}
-            {deleteBtn()}
-          </div>
-        );
+        }
       }
-    }
-  ]
-});
+    ]
+  });
 
 const { drawerVisible, operateType, editingData, handleAdd, handleEdit, checkedRowKeys, onBatchDeleted, onDeleted } =
   useTableOperate(data, 'time', getData);

--
Gitblit v1.9.3