广丰卷烟厂数采质量分析系统
zhuguifei
7 天以前 2b31fa203f3435a582be51f45899d99164c9917a
ruoyi-plus-soybean/src/views/analy/store-silk/index.vue
@@ -21,8 +21,6 @@
const { download } = useDownload();
const { hasAuth } = useAuth();
const selectedRollerDetailList = ref<any[]>([]);
const selectedPackerDetailList = ref<any[]>([]);
@@ -140,11 +138,9 @@
        render: row => {
          const box = calcRollerBox((row as any).rollerOutput);
          if (box === null || box <= 0) return '-';
          const jobinput = Number((row as any).jobinput);
          const weight = Number((row as any).weight);
          const diff = jobinput - weight;
          if (!Number.isFinite(diff)) return '-';
          const val = diff / box;
          if (!Number.isFinite(weight)) return '-';
          const val = weight / box;
          if (!Number.isFinite(val)) return '-';
          return val.toFixed(2);
        }
@@ -168,11 +164,9 @@
        render: row => {
          const box = calcPackerBox((row as any).packerOutput);
          if (box === null || box <= 0) return '-';
          const jobinput = Number((row as any).jobinput);
          const weight = Number((row as any).weight);
          const diff = jobinput - weight;
          if (!Number.isFinite(diff)) return '-';
          const val = diff / box;
          if (!Number.isFinite(weight)) return '-';
          const val = weight / box;
          if (!Number.isFinite(val)) return '-';
          return val.toFixed(2);
        }
@@ -247,7 +241,6 @@
  if (!Number.isFinite(v)) return null;
  return v;
}
function calcPackerBox(val: unknown) {
  if (val === null || val === undefined) return null;
  const v = Number(val) / 10 / 250;
@@ -284,12 +277,7 @@
          @refresh="getData"
        >
          <template #prefix>
            <NButton
              size="small"
              ghost
              :type="showSankey ? 'primary' : 'default'"
              @click="showSankey = !showSankey"
            >
            <NButton size="small" ghost :type="showSankey ? 'primary' : 'default'" @click="showSankey = !showSankey">
              {{ showSankey ? '列表' : '桑基图' }}
            </NButton>
          </template>