diff --git a/src/views/statistics/zt_batch_gx.vue b/src/views/statistics/zt_batch_gx.vue index 7ca9c99b..6687d05f 100644 --- a/src/views/statistics/zt_batch_gx.vue +++ b/src/views/statistics/zt_batch_gx.vue @@ -64,7 +64,7 @@ @@ -148,6 +148,29 @@ export default { let s = row.data.直通_子批次; return s ? s.split(";").length : 0; }, + displayData(data) { + // count_* 字段后缀翻译为中文展示(注意 _count_ok_full 须在 _count_ok 之前替换) + const map = [ + ["_count_ok_full", "_完全合格数"], + ["_count_notok", "_不合格数"], + ["_count_ok", "_合格数"], + ["_count_use", "_领用数"], + ["_count_real", "_生产数"], + ["_count_pn_jgqbl", "_加工前不良"], + ]; + const out = {}; + for (const k in data) { + let nk = k; + for (const [en, cn] of map) { + if (nk.includes(en)) { + nk = nk.replace(en, cn); + break; + } + } + out[nk] = data[k]; + } + return out; + }, getList(val) { let that = this; that.params.page = val ? val : 1;