1
This commit is contained in:
@@ -313,12 +313,6 @@ class VehicleController extends Crud
|
||||
'trace' => $e->getTraceAsString()
|
||||
]);
|
||||
}
|
||||
}else{
|
||||
|
||||
$ossservice = new OssService();
|
||||
$img_url = $ossservice->generatePrivateUrl($item['img_url']);
|
||||
|
||||
$item['img_url'] = $img_url;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,5 +26,15 @@ return [
|
||||
'updated_at' => 'تاريخ التحديث',
|
||||
'operation' => 'عملية',
|
||||
'submit' => 'إرسال',
|
||||
'reset' => 'إعادة تعيين'
|
||||
'reset' => 'إعادة تعيين',
|
||||
|
||||
// الترقيم
|
||||
'pagination_total' => 'إجمالي {total} عنصر',
|
||||
'pagination_page' => 'الصفحة {page}',
|
||||
'pagination_limit' => '{limit} عنصر في الصفحة',
|
||||
'pagination_prev' => 'السابق',
|
||||
'pagination_next' => 'التالي',
|
||||
'pagination_jump' => 'انتقل إلى',
|
||||
'pagination_go' => 'انتقل',
|
||||
'data_not_found' => 'لم يتم العثور على البيانات'
|
||||
];
|
||||
@@ -26,5 +26,15 @@ return [
|
||||
'updated_at' => 'Updated At',
|
||||
'operation' => 'Operation',
|
||||
'submit' => 'Submit',
|
||||
'reset' => 'Reset'
|
||||
'reset' => 'Reset',
|
||||
|
||||
// Pagination related
|
||||
'pagination_total' => 'Total {total} items',
|
||||
'pagination_page' => 'Page {page}',
|
||||
'pagination_limit' => '{limit} items per page',
|
||||
'pagination_prev' => 'Previous',
|
||||
'pagination_next' => 'Next',
|
||||
'pagination_jump' => 'Jump to',
|
||||
'pagination_go' => 'Go',
|
||||
'data_not_found' => 'Data not found'
|
||||
];
|
||||
@@ -26,5 +26,15 @@ return [
|
||||
'updated_at' => 'Дата обновления',
|
||||
'operation' => 'Операция',
|
||||
'submit' => 'Отправить',
|
||||
'reset' => 'Сбросить'
|
||||
'reset' => 'Сбросить',
|
||||
|
||||
// Пагинация
|
||||
'pagination_total' => 'Всего {total} записей',
|
||||
'pagination_page' => 'Страница {page}',
|
||||
'pagination_limit' => '{limit} записей на странице',
|
||||
'pagination_prev' => 'Предыдущая',
|
||||
'pagination_next' => 'Следующая',
|
||||
'pagination_jump' => 'Перейти к',
|
||||
'pagination_go' => 'Перейти',
|
||||
'data_not_found' => 'Данные не найдены'
|
||||
];
|
||||
@@ -26,5 +26,15 @@ return [
|
||||
'updated_at' => '更新时间',
|
||||
'operation' => '操作',
|
||||
'submit' => '提交',
|
||||
'reset' => '重置'
|
||||
'reset' => '重置',
|
||||
|
||||
// 分页相关
|
||||
'pagination_total' => '共 {total} 条',
|
||||
'pagination_page' => '第 {page} 页',
|
||||
'pagination_limit' => '每页 {limit} 条',
|
||||
'pagination_prev' => '上一页',
|
||||
'pagination_next' => '下一页',
|
||||
'pagination_jump' => '跳转',
|
||||
'pagination_go' => '确定',
|
||||
'data_not_found' => '未找到数据'
|
||||
];
|
||||
@@ -122,14 +122,56 @@
|
||||
table.render({
|
||||
elem: '#data-table',
|
||||
url: SELECT_API,
|
||||
page: true,
|
||||
page: {
|
||||
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
|
||||
groups: 5,
|
||||
theme: '#FF5722',
|
||||
text: {
|
||||
count: translations.pagination_total,
|
||||
limit: translations.pagination_limit,
|
||||
page: translations.pagination_page,
|
||||
prev: translations.pagination_prev,
|
||||
next: translations.pagination_next,
|
||||
jump: translations.pagination_jump,
|
||||
go: translations.pagination_go
|
||||
}
|
||||
},
|
||||
cols: cols,
|
||||
skin: 'line',
|
||||
toolbar: '#table-toolbar',
|
||||
defaultToolbar: [{
|
||||
layEvent: 'refresh',
|
||||
icon: 'layui-icon-refresh',
|
||||
}, 'filter', 'print', 'exports']
|
||||
}, 'filter', 'print', 'exports'],
|
||||
text: {
|
||||
none: translations.data_not_found
|
||||
},
|
||||
done: function () {
|
||||
// 更新分页文本
|
||||
$('.layui-laypage a').each(function() {
|
||||
let text = $(this).text();
|
||||
if (text === '上一页') {
|
||||
$(this).text(translations.pagination_prev);
|
||||
} else if (text === '下一页') {
|
||||
$(this).text(translations.pagination_next);
|
||||
}
|
||||
});
|
||||
|
||||
// 更新分页信息
|
||||
let pageInfo = $('.layui-laypage-count').text();
|
||||
let total = pageInfo.match(/\d+/)[0];
|
||||
$('.layui-laypage-count').text(translations.pagination_total.replace('{total}', total));
|
||||
|
||||
// 更新每页条数
|
||||
$('.layui-laypage-limits option').each(function() {
|
||||
let value = $(this).val();
|
||||
$(this).text(translations.pagination_limit.replace('{limit}', value));
|
||||
});
|
||||
|
||||
// 更新跳转文本
|
||||
$('.layui-laypage-skip').prev().text(translations.pagination_jump);
|
||||
$('.layui-laypage-btn').text(translations.pagination_go);
|
||||
}
|
||||
});
|
||||
|
||||
// 工具条点击事件
|
||||
|
||||
@@ -139,6 +139,31 @@
|
||||
none: translations.data_not_found
|
||||
},
|
||||
done: function () {
|
||||
// 更新分页文本
|
||||
$('.layui-laypage a').each(function() {
|
||||
let text = $(this).text();
|
||||
if (text === '上一页') {
|
||||
$(this).text(translations.pagination_prev);
|
||||
} else if (text === '下一页') {
|
||||
$(this).text(translations.pagination_next);
|
||||
}
|
||||
});
|
||||
|
||||
// 更新分页信息
|
||||
let pageInfo = $('.layui-laypage-count').text();
|
||||
let total = pageInfo.match(/\d+/)[0];
|
||||
$('.layui-laypage-count').text(translations.pagination_total.replace('{total}', total));
|
||||
|
||||
// 更新每页条数
|
||||
$('.layui-laypage-limits option').each(function() {
|
||||
let value = $(this).val();
|
||||
$(this).text(translations.pagination_limit.replace('{limit}', value));
|
||||
});
|
||||
|
||||
// 更新跳转文本
|
||||
$('.layui-laypage-skip').prev().text(translations.pagination_jump);
|
||||
$('.layui-laypage-btn').text(translations.pagination_go);
|
||||
|
||||
layer.photos({photos: 'div[lay-id="data-table"]', anim: 5});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user