From 539a56279625242c497b4b4093f2defbb9d80334 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 29 一月 2026 14:05:44 +0800
Subject: [PATCH] #i18n翻译

---
 src/main/webapp/views/handWrkMast/wrkDetlLog.html |  120 +++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 75 insertions(+), 45 deletions(-)

diff --git a/src/main/webapp/views/handWrkMast/wrkDetlLog.html b/src/main/webapp/views/handWrkMast/wrkDetlLog.html
index 5621805..9aaad6f 100644
--- a/src/main/webapp/views/handWrkMast/wrkDetlLog.html
+++ b/src/main/webapp/views/handWrkMast/wrkDetlLog.html
@@ -12,7 +12,7 @@
 </head>
 <body>
 <div class="layui-inline"  style="width:31%;margin-top: 20px">
-    <label class="layui-form-label">宸� 浣� 鍙凤細</label>
+    <label class="layui-form-label" data-i18n="work_no_label">宸� 浣� 鍙凤細</label>
     <div class="layui-input-inline">
         <input id="wrkNo" class="layui-input" type="text" disabled="disabled">
     </div>
@@ -24,16 +24,20 @@
 <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
 <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/i18n/i18n-helper.js"></script>
 <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
 
 <script type="text/javascript">
     var pageCur;
     function getCol() {
+        var t = function(key, def) {
+            return (typeof I18n !== 'undefined' && typeof I18n.t === 'function') ? I18n.t(key) : def;
+        };
         var cols = [
-            {field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�'}
-            ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿'}
+            {field: 'wrkNo', align: 'center',title: t('work_no', '宸ヤ綔鍙�')}
+            ,{field: 'ioTime$', align: 'center',title: t('work_time', '宸ヤ綔鏃堕棿')}
         ];
-        cols.push.apply(cols, detlCols);
+        cols.push.apply(cols, getDetlCols());
         return cols;
     }
     layui.use(['table','laydate', 'form'], function() {
@@ -42,48 +46,74 @@
         var form = layui.form;
 
         $('#wrkNo').val(parent.wrkNo);
-        // 鏁版嵁娓叉煋
-        tableIns1 = table.render({
-            elem: '#wrkDetlLogByMast',
-            headers: {token: localStorage.getItem('token')},
-            url: baseUrl+'/wrkDetlLog/list/auth',
-            where: {wrk_no: parent.wrkNo},
-            page: true,
-            limit: 16,
-            limits: [16, 30, 50, 100, 200, 500],
-            even: true,
-            toolbar: '#toolbar',
-            cellMinWidth: 50,
-            cols: [getCol()],
-            request: {
-                pageName: 'curr',
-                pageSize: 'limit'
-            },
-            parseData: function (res) {
-                return {
-                    'code': res.code,
-                    'msg': res.msg,
-                    'count': res.data.total,
-                    'data': res.data.records
-                }
-            },
-            response: {
-                statusCode: 200
-            },
-            done: function(res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCur=curr;
-                form.on('checkbox(tableCheckbox)', function (data) {
-                    var _index = $(data.elem).attr('table-index')||0;
-                    if(data.elem.checked){
-                        res.data[_index][data.value] = 'Y';
-                    }else{
-                        res.data[_index][data.value] = 'N';
+        
+        // 鍒濆鍖栬〃鏍煎嚱鏁�
+        var initTable = function() {
+            // 鏁版嵁娓叉煋
+            tableIns1 = table.render({
+                elem: '#wrkDetlLogByMast',
+                headers: {token: localStorage.getItem('token')},
+                url: baseUrl+'/wrkDetlLog/list/auth',
+                where: {wrk_no: parent.wrkNo},
+                page: true,
+                limit: 16,
+                limits: [16, 30, 50, 100, 200, 500],
+                even: true,
+                toolbar: '#toolbar',
+                cellMinWidth: 50,
+                cols: [getCol()],
+                text: {
+                    none: (typeof I18n !== 'undefined' && typeof I18n.t === 'function') ? I18n.t('no_data') : '鏆傛棤鏁版嵁'
+                },
+                request: {
+                    pageName: 'curr',
+                    pageSize: 'limit'
+                },
+                parseData: function (res) {
+                    return {
+                        'code': res.code,
+                        'msg': res.msg,
+                        'count': res.data.total,
+                        'data': res.data.records
                     }
-                });
-            }
+                },
+                response: {
+                    statusCode: 200
+                },
+                done: function(res, curr, count) {
+                    if (res.code === 403) {
+                        top.location.href = baseUrl+"/";
+                    }
+                    pageCur=curr;
+                    form.on('checkbox(tableCheckbox)', function (data) {
+                        var _index = $(data.elem).attr('table-index')||0;
+                        if(data.elem.checked){
+                            res.data[_index][data.value] = 'Y';
+                        }else{
+                            res.data[_index][data.value] = 'N';
+                        }
+                    });
+                    
+                    // Update pagination translation
+                    if (typeof I18n !== 'undefined' && I18n.updateLayuiPagination) {
+                        I18n.updateLayuiPagination();
+                    }
+                }
+            });
+        };
+
+        // 妫�鏌� I18n 鏄惁灏辩华
+        if (typeof I18n !== 'undefined' && I18n.isReady && I18n.isReady()) {
+            initTable();
+        } else {
+            $(document).on('i18n:ready', function() {
+                initTable();
+            });
+        }
+        
+        // 鐩戝惉璇█鍒囨崲
+        $(document).on('i18n:languageChanged', function() {
+            initTable();
         });
     });
 </script>

--
Gitblit v1.9.1