广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-04 63b4909ac5d0b7355be211cc7080673b41cdb3cc
ruoyi-plus-soybean/src/views/analy/hoister/index.vue
@@ -15,7 +15,6 @@
  name: 'HoisterDataList'
});
const appStore = useAppStore();
const { download } = useDownload();
const { hasAuth } = useAuth();
@@ -34,314 +33,314 @@
const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination, scrollX } =
  useNaivePaginatedTable({
  api: () => fetchGetHoisterDataList(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: () => fetchGetHoisterDataList(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: '网络状态  0异常,1正常',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'qty',
      title: '产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState1',
      title: '1#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState2',
      title: '2#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState3',
      title: '3#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState4',
      title: '4#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState5',
      title: '5#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState6',
      title: '6#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState7',
      title: '7#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState8',
      title: '8#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState9',
      title: '9#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState10',
      title: '10#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState11',
      title: '11#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tState12',
      title: '12#提升机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pState1',
      title: '1#排包机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pState2',
      title: '2#排包机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pState3',
      title: '3#排包机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pState4',
      title: '4#排包机状态',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty1',
      title: '1#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty2',
      title: '2#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty3',
      title: '3#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty4',
      title: '4#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty5',
      title: '5#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty6',
      title: '6#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty7',
      title: '7#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty8',
      title: '8#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty9',
      title: '9#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty10',
      title: '10#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty11',
      title: '11#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'tQty12',
      title: '12#提升机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pQty1',
      title: '1#排包机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pQty2',
      title: '2#排包机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pQty3',
      title: '3#排包机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'pQty4',
      title: '4#排包机产量',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'shift',
      title: '班次',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'equNo',
      title: '设备',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'remark',
      title: '备注',
      align: 'center',
      minWidth: 120
    },
    {
      key: 'operate',
      title: $t('common.operate'),
      align: 'center',
      width: 130,
      render: row => {
        const divider = () => {
          if (!hasAuth('qa:hoisterData:edit') || !hasAuth('qa:hoisterData: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: '网络状态  0异常,1正常',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'qty',
        title: '产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState1',
        title: '1#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState2',
        title: '2#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState3',
        title: '3#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState4',
        title: '4#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState5',
        title: '5#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState6',
        title: '6#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState7',
        title: '7#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState8',
        title: '8#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState9',
        title: '9#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState10',
        title: '10#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState11',
        title: '11#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tState12',
        title: '12#提升机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pState1',
        title: '1#排包机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pState2',
        title: '2#排包机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pState3',
        title: '3#排包机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pState4',
        title: '4#排包机状态',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty1',
        title: '1#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty2',
        title: '2#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty3',
        title: '3#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty4',
        title: '4#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty5',
        title: '5#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty6',
        title: '6#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty7',
        title: '7#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty8',
        title: '8#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty9',
        title: '9#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty10',
        title: '10#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty11',
        title: '11#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'tQty12',
        title: '12#提升机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pQty1',
        title: '1#排包机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pQty2',
        title: '2#排包机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pQty3',
        title: '3#排包机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'pQty4',
        title: '4#排包机产量',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'shift',
        title: '班次',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'equNo',
        title: '设备',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'remark',
        title: '备注',
        align: 'center',
        minWidth: 120
      },
      {
        key: 'operate',
        title: $t('common.operate'),
        align: 'center',
        width: 130,
        render: row => {
          const divider = () => {
            if (!hasAuth('qa:hoisterData:edit') || !hasAuth('qa:hoisterData:remove')) {
              return null;
            }
            return <NDivider vertical />;
          };
        const editBtn = () => {
          if (!hasAuth('qa:hoisterData:edit')) {
            return null;
          }
          const editBtn = () => {
            if (!hasAuth('qa:hoisterData: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:hoisterData: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:hoisterData: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);