From 35b1b26f1fe16550b4ee2881a26d599456fe59b4 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 22 一月 2026 17:01:11 +0800
Subject: [PATCH] #i18n翻译
---
src/main/webapp/views/wrkMast/wrkDetl.html | 49 ++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/views/wrkMast/wrkDetl.html b/src/main/webapp/views/wrkMast/wrkDetl.html
index 105e0f9..2438001 100644
--- a/src/main/webapp/views/wrkMast/wrkDetl.html
+++ b/src/main/webapp/views/wrkMast/wrkDetl.html
@@ -14,7 +14,7 @@
</head>
<body>
<div class="layui-inline" style="width:31%;margin-top: 20px">
- <label class="layui-form-label">宸� 浣� 鍙凤細</label>
+ <label class="layui-form-label"><span data-i18n="work_no">宸� 浣� 鍙�</span>锛�</label>
<div class="layui-input-inline">
<input id="wrkNo" class="layui-input" type="text" disabled="disabled">
</div>
@@ -22,6 +22,7 @@
<table class="layui-hide" id="wrkDetlByMast" lay-filter="wrkDetlByMast"></table>
</body>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script src="../../static/js/i18n/i18n-helper.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/cool.js" charset="utf-8"></script>
@@ -30,16 +31,44 @@
var pageCur;
function getCol() {
var cols = [
- {field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�'}
- ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿'}
+ {field: 'wrkNo', align: 'center',title: I18n.t('work_no')}
+ ,{field: 'ioTime$', align: 'center',title: I18n.t('work_time')}
];
- cols.push.apply(cols, detlCols);
+ if (typeof getDetlCols === 'function') {
+ cols.push.apply(cols, getDetlCols());
+ } else {
+ cols.push.apply(cols, detlCols);
+ }
return cols;
}
layui.use(['table','laydate', 'form'], function() {
table = layui.table;
var $ = layui.jquery;
var form = layui.form;
+
+ $(document).on('i18n:languageChanged', function() {
+ table.reload('wrkDetlByMast', {
+ cols: [getCol()],
+ 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';
+ }
+ });
+ if (typeof I18n !== 'undefined') {
+ I18n.updatePage();
+ I18n.updateLayuiPagination();
+ }
+ }
+ });
+ });
$('#wrkNo').val(parent.wrkNo);
// 鏁版嵁娓叉煋
@@ -83,16 +112,14 @@
res.data[_index][data.value] = 'N';
}
});
+ if (typeof I18n !== 'undefined') {
+ I18n.updatePage();
+ I18n.updateLayuiPagination();
+ }
}
});
});
</script>
-<script src="../../static/js/translate.js"></script>
-<script>
- translate.selectLanguageTag.show = false; //涓嶅嚭鐜扮殑select鐨勯�夋嫨璇█
- translate.service.use('client.edge'); //璁剧疆缈昏瘧鏈嶅姟
- translate.listener.start(); //寮�鍚〉闈㈠厓绱犲姩鎬佺洃鎺э紝js鏀瑰彉鐨勫唴瀹逛篃浼氳缈昏瘧锛屽弬鑰冩枃妗o細 http://translate.zvo.cn/4067.html
- translate.execute();
-</script>
+
</html>
--
Gitblit v1.9.1