From 881ae3d485c5bc3fd7be22e5ae1baed308b59fdf Mon Sep 17 00:00:00 2001 From: zhuyu Date: Fri, 27 Jun 2025 10:17:46 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=8E=92=E7=8F=AD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/js/backend/oa/custom_schedule.js | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/public/assets/js/backend/oa/custom_schedule.js b/public/assets/js/backend/oa/custom_schedule.js index 28ad88d..26af232 100644 --- a/public/assets/js/backend/oa/custom_schedule.js +++ b/public/assets/js/backend/oa/custom_schedule.js @@ -57,7 +57,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function if (row.editable === 1) { return false; } else { - return value; + const map = { + '0': '', + '1': '早班', + '2': '中班', + '3': '晚班', + '4': '行政班' + }; + return map[value] ?? value; } }, } @@ -111,7 +118,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function {value: '2', text: '中班'}, {value: '3', text: '晚班'}, {value: '4', text: '行政班'}, - ] + ], + noeditFormatter: function (value, row, index) { + if (row.editable === 1) { + return false; + } else { + const map = { + '0': '', + '1': '早班', + '2': '中班', + '3': '晚班', + '4': '行政班' + }; + return map[value] ?? value; + } + }, } }); }