1
This commit is contained in:
@@ -34,7 +34,7 @@ class VehicleController
|
|||||||
$vehicle->vin = $this->maskVin($vehicle->vin);
|
$vehicle->vin = $this->maskVin($vehicle->vin);
|
||||||
}
|
}
|
||||||
|
|
||||||
$vehicle->status = $this->status[$vehicle->status]??$this->status[0];
|
// $vehicle->status = $this->status[$vehicle->status]??$this->status[0];
|
||||||
// $location = Location::find($vehicle->locations_id);
|
// $location = Location::find($vehicle->locations_id);
|
||||||
// $vehicle->location_name = $location ? $location->name : '';
|
// $vehicle->location_name = $location ? $location->name : '';
|
||||||
// $final_location = Location::find($vehicle->final_locations_id);
|
// $final_location = Location::find($vehicle->final_locations_id);
|
||||||
|
|||||||
@@ -18,14 +18,11 @@ class OssService
|
|||||||
try {
|
try {
|
||||||
$this->accessKeyId = env('OSS_ACCESS_KEY_ID');
|
$this->accessKeyId = env('OSS_ACCESS_KEY_ID');
|
||||||
$this->accessKeySecret = env('OSS_ACCESS_KEY_SECRET');
|
$this->accessKeySecret = env('OSS_ACCESS_KEY_SECRET');
|
||||||
$this->bucket = env('OSS_BUCKET', 'vehicle-album');
|
$this->bucket = 'vehicle-album';
|
||||||
$this->endpoint = env('OSS_ENDPOINT', 'https://oss-cn-beijing.aliyuncs.com');
|
$this->endpoint = env('OSS_ENDPOINT', 'https://oss-cn-beijing.aliyuncs.com');
|
||||||
|
var_dump($this->endpoint);
|
||||||
|
|
||||||
// 记录配置信息
|
// 记录配置信息
|
||||||
error_log("OSS Configuration:");
|
|
||||||
error_log("AccessKeyId: " . substr($this->accessKeyId, 0, 4) . "****");
|
|
||||||
error_log("Bucket: " . $this->bucket);
|
|
||||||
error_log("Endpoint: " . $this->endpoint);
|
|
||||||
|
|
||||||
$this->ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint);
|
$this->ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint);
|
||||||
|
|
||||||
|
|||||||
@@ -296,6 +296,9 @@ class VehicleController extends Crud
|
|||||||
try {
|
try {
|
||||||
$ossservice = new OssService();
|
$ossservice = new OssService();
|
||||||
$img_url = $ossservice->generatePrivateUrl($item['img_url']);
|
$img_url = $ossservice->generatePrivateUrl($item['img_url']);
|
||||||
|
|
||||||
|
// $ossservice = new OssService();
|
||||||
|
// $oss_picture = $ossservice->generatePrivateUrl($follow['picture'],86400);
|
||||||
Log::info("Vehicle image URL generation:", [
|
Log::info("Vehicle image URL generation:", [
|
||||||
'original_url' => $item['img_url'],
|
'original_url' => $item['img_url'],
|
||||||
'generated_url' => $img_url,
|
'generated_url' => $img_url,
|
||||||
@@ -310,6 +313,12 @@ class VehicleController extends Crud
|
|||||||
'trace' => $e->getTraceAsString()
|
'trace' => $e->getTraceAsString()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$ossservice = new OssService();
|
||||||
|
$img_url = $ossservice->generatePrivateUrl($item['img_url']);
|
||||||
|
|
||||||
|
$item['img_url'] = $img_url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ return [
|
|||||||
'edit' => 'تعديل',
|
'edit' => 'تعديل',
|
||||||
'delete' => 'حذف',
|
'delete' => 'حذف',
|
||||||
'remove' => 'حذف',
|
'remove' => 'حذف',
|
||||||
'detail' => 'التفاصيل',
|
'detail' => 'عرض',
|
||||||
'submit' => 'إرسال',
|
'submit' => 'تأكيد',
|
||||||
'reset' => 'إعادة تعيين',
|
'reset' => 'إعادة تعيين',
|
||||||
'operation_success' => 'تمت العملية بنجاح',
|
'operation_success' => 'تمت العملية بنجاح',
|
||||||
'data_not_found' => 'لم يتم العثور على البيانات',
|
'data_not_found' => 'لم يتم العثور على البيانات',
|
||||||
@@ -19,9 +19,9 @@ return [
|
|||||||
'name_placeholder' => 'الرجاء إدخال الاسم',
|
'name_placeholder' => 'الرجاء إدخال الاسم',
|
||||||
'name_en' => 'الاسم بالإنجليزية',
|
'name_en' => 'الاسم بالإنجليزية',
|
||||||
'name_en_placeholder' => 'الرجاء إدخال الاسم بالإنجليزية',
|
'name_en_placeholder' => 'الرجاء إدخال الاسم بالإنجليزية',
|
||||||
'classify' => 'الفئة',
|
'classify' => 'التصنيف',
|
||||||
'classify_placeholder' => 'الرجاء اختيار الفئة',
|
'classify_placeholder' => 'الرجاء اختيار الفئة',
|
||||||
'brand' => 'ماركة السيارة',
|
'brand' => 'علامة السيارة التجارية',
|
||||||
'brand_placeholder' => 'الرجاء إدخال ماركة السيارة',
|
'brand_placeholder' => 'الرجاء إدخال ماركة السيارة',
|
||||||
'model' => 'طراز السيارة',
|
'model' => 'طراز السيارة',
|
||||||
'model_placeholder' => 'الرجاء إدخال طراز السيارة',
|
'model_placeholder' => 'الرجاء إدخال طراز السيارة',
|
||||||
@@ -35,15 +35,15 @@ return [
|
|||||||
'purchase_location_placeholder' => 'الرجاء إدخال موقع الشراء',
|
'purchase_location_placeholder' => 'الرجاء إدخال موقع الشراء',
|
||||||
'procedure_location' => 'موقع الإجراءات',
|
'procedure_location' => 'موقع الإجراءات',
|
||||||
'procedure_location_placeholder' => 'الرجاء إدخال موقع الإجراءات',
|
'procedure_location_placeholder' => 'الرجاء إدخال موقع الإجراءات',
|
||||||
'location' => 'الموقع الحالي',
|
'current_location' => 'الموقع الحالي',
|
||||||
'location_placeholder' => 'الرجاء اختيار الموقع الحالي',
|
'current_location_placeholder' => 'الرجاء اختيار الموقع الحالي',
|
||||||
'final_location' => 'الموقع النهائي',
|
'final_location' => 'الوجهة النهائية',
|
||||||
'final_location_placeholder' => 'الرجاء اختيار الموقع النهائي',
|
'final_location_placeholder' => 'الرجاء اختيار الوجهة النهائية',
|
||||||
'fbo_location' => 'موقع FBO',
|
'fbo_location' => 'موقع FBO',
|
||||||
'fbo_location_placeholder' => 'الرجاء اختيار موقع FBO',
|
'fbo_location_placeholder' => 'الرجاء اختيار موقع FBO',
|
||||||
'departure_time' => 'وقت مغادرة FBO',
|
'departure_time' => 'وقت المغادرة',
|
||||||
'departure_time_placeholder' => 'الرجاء اختيار وقت المغادرة',
|
'departure_time_placeholder' => 'الرجاء اختيار وقت المغادرة',
|
||||||
'arrival_time' => 'وقت وصول FBO',
|
'arrival_time' => 'وقت الوصول',
|
||||||
'arrival_time_placeholder' => 'الرجاء اختيار وقت الوصول',
|
'arrival_time_placeholder' => 'الرجاء اختيار وقت الوصول',
|
||||||
'shipping_cycle' => 'دورة الشحن',
|
'shipping_cycle' => 'دورة الشحن',
|
||||||
'shipping_cycle_placeholder' => 'الرجاء إدخال دورة الشحن',
|
'shipping_cycle_placeholder' => 'الرجاء إدخال دورة الشحن',
|
||||||
@@ -59,5 +59,14 @@ return [
|
|||||||
'upload_image' => 'رفع صورة',
|
'upload_image' => 'رفع صورة',
|
||||||
'select_location' => 'اختر الموقع',
|
'select_location' => 'اختر الموقع',
|
||||||
'select_final_location' => 'اختر الوجهة',
|
'select_final_location' => 'اختر الوجهة',
|
||||||
'select_fbo_location' => 'اختر ميناء FBO'
|
'select_fbo_location' => 'اختر ميناء FBO',
|
||||||
|
|
||||||
|
// الترقيم
|
||||||
|
'pagination_total' => 'إجمالي {total} عنصر',
|
||||||
|
'pagination_page' => 'الصفحة {page}',
|
||||||
|
'pagination_limit' => '{limit} عنصر في الصفحة',
|
||||||
|
'pagination_prev' => 'السابق',
|
||||||
|
'pagination_next' => 'التالي',
|
||||||
|
'pagination_jump' => 'انتقل إلى',
|
||||||
|
'pagination_go' => 'انتقل'
|
||||||
];
|
];
|
||||||
@@ -59,5 +59,14 @@ return [
|
|||||||
'upload_image' => 'Upload Image',
|
'upload_image' => 'Upload Image',
|
||||||
'select_location' => 'Select Location',
|
'select_location' => 'Select Location',
|
||||||
'select_final_location' => 'Select Destination',
|
'select_final_location' => 'Select Destination',
|
||||||
'select_fbo_location' => 'Select FBO Port'
|
'select_fbo_location' => 'Select FBO Port',
|
||||||
|
|
||||||
|
// 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'
|
||||||
];
|
];
|
||||||
@@ -40,9 +40,9 @@ return [
|
|||||||
'final_location_placeholder' => 'Выберите конечное местоположение',
|
'final_location_placeholder' => 'Выберите конечное местоположение',
|
||||||
'fbo_location' => 'Местоположение FBO',
|
'fbo_location' => 'Местоположение FBO',
|
||||||
'fbo_location_placeholder' => 'Выберите местоположение FBO',
|
'fbo_location_placeholder' => 'Выберите местоположение FBO',
|
||||||
'departure_time' => 'Время отправления FBO',
|
'departure_time' => 'Время отправления',
|
||||||
'departure_time_placeholder' => 'Выберите время отправления',
|
'departure_time_placeholder' => 'Выберите время отправления',
|
||||||
'arrival_time' => 'Время прибытия FBO',
|
'arrival_time' => 'Время прибытия',
|
||||||
'arrival_time_placeholder' => 'Выберите время прибытия',
|
'arrival_time_placeholder' => 'Выберите время прибытия',
|
||||||
'shipping_cycle' => 'Цикл доставки',
|
'shipping_cycle' => 'Цикл доставки',
|
||||||
'shipping_cycle_placeholder' => 'Введите цикл доставки',
|
'shipping_cycle_placeholder' => 'Введите цикл доставки',
|
||||||
@@ -58,5 +58,14 @@ return [
|
|||||||
'upload_image' => 'Загрузить изображение',
|
'upload_image' => 'Загрузить изображение',
|
||||||
'select_location' => 'Выбрать местоположение',
|
'select_location' => 'Выбрать местоположение',
|
||||||
'select_final_location' => 'Выбрать пункт назначения',
|
'select_final_location' => 'Выбрать пункт назначения',
|
||||||
'select_fbo_location' => 'Выбрать порт FBO'
|
'select_fbo_location' => 'Выбрать порт FBO',
|
||||||
|
|
||||||
|
// Пагинация
|
||||||
|
'pagination_total' => 'Всего {total} записей',
|
||||||
|
'pagination_page' => 'Страница {page}',
|
||||||
|
'pagination_limit' => '{limit} записей на странице',
|
||||||
|
'pagination_prev' => 'Предыдущая',
|
||||||
|
'pagination_next' => 'Следующая',
|
||||||
|
'pagination_jump' => 'Перейти к',
|
||||||
|
'pagination_go' => 'Перейти'
|
||||||
];
|
];
|
||||||
@@ -11,7 +11,7 @@ return [
|
|||||||
'submit' => '提交',
|
'submit' => '提交',
|
||||||
'reset' => '重置',
|
'reset' => '重置',
|
||||||
'operation_success' => '操作成功',
|
'operation_success' => '操作成功',
|
||||||
'data_not_found' => '数据不存在',
|
'data_not_found' => '未找到数据',
|
||||||
'no_data_selected' => '未选择数据',
|
'no_data_selected' => '未选择数据',
|
||||||
'confirm_delete' => '确定要删除吗?',
|
'confirm_delete' => '确定要删除吗?',
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ return [
|
|||||||
'brand_placeholder' => '请输入车辆品牌',
|
'brand_placeholder' => '请输入车辆品牌',
|
||||||
'model' => '车辆型号',
|
'model' => '车辆型号',
|
||||||
'model_placeholder' => '请输入车辆型号',
|
'model_placeholder' => '请输入车辆型号',
|
||||||
'status' => '车辆状态',
|
'status' => '状态',
|
||||||
'status_placeholder' => '请选择状态',
|
'status_placeholder' => '请选择状态',
|
||||||
'status_1' => '正常',
|
'status_1' => '正常',
|
||||||
'status_0' => '禁用',
|
'status_0' => '禁用',
|
||||||
@@ -62,12 +62,21 @@ return [
|
|||||||
'export' => '导出',
|
'export' => '导出',
|
||||||
'operation' => '操作',
|
'operation' => '操作',
|
||||||
'upload_image' => '上传图片',
|
'upload_image' => '上传图片',
|
||||||
'select_location' => '选择位置',
|
'select_location' => '选择地点',
|
||||||
'select_final_location' => '选择目的地',
|
'select_final_location' => '选择目的地',
|
||||||
'select_fbo_location' => '选择FBO港口',
|
'select_fbo_location' => '选择FBO港口',
|
||||||
'please_select' => '请选择',
|
'please_select' => '请选择',
|
||||||
'self_owned' => '自主',
|
'self_owned' => '自主',
|
||||||
'agent' => '代理',
|
'agent' => '代理',
|
||||||
'classify' => '分类',
|
'classify' => '分类',
|
||||||
'classify_placeholder' => '请选择分类'
|
'classify_placeholder' => '请选择分类',
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
'pagination_total' => '共 {total} 条',
|
||||||
|
'pagination_page' => '第 {page} 页',
|
||||||
|
'pagination_limit' => '每页 {limit} 条',
|
||||||
|
'pagination_prev' => '上一页',
|
||||||
|
'pagination_next' => '下一页',
|
||||||
|
'pagination_jump' => '跳转',
|
||||||
|
'pagination_go' => '确定'
|
||||||
];
|
];
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
<!-- 表格行工具栏 -->
|
<!-- 表格行工具栏 -->
|
||||||
<script type="text/html" id="table-bar">
|
<script type="text/html" id="table-bar">
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="edit" permission="app.admin.vehicle.update"><?= $translations['edit'] ?? '编辑' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="edit" permission="app.admin.vehicle.update"><?= $translations['edit'] ?? '编辑' ?></button>
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="remove" permission="app.admin.vehicle.delete"><?= $translations['remove'] ?? '删除' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="remove" permission="app.admin.vehicle.delete"><?= $translations['delete'] ?? '删除' ?></button>
|
||||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="detail" permission="app.admin.vehicle.detail"><?= $translations['detail'] ?? '详情' ?></button>
|
<button class="pear-btn pear-btn-xs tool-btn" lay-event="detail" permission="app.admin.vehicle.detail"><?= $translations['detail'] ?? '详情' ?></button>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/app/admin/component/layui/layui.js?v=2.8.12"></script>
|
<script src="/app/admin/component/layui/layui.js"></script>
|
||||||
<script src="/app/admin/component/pear/pear.js"></script>
|
<script src="/app/admin/component/pear/pear.js"></script>
|
||||||
<script src="/app/admin/admin/js/permission.js"></script>
|
<script src="/app/admin/admin/js/permission.js"></script>
|
||||||
<script src="/app/admin/admin/js/common.js"></script>
|
<script src="/app/admin/admin/js/common.js"></script>
|
||||||
@@ -111,7 +111,20 @@
|
|||||||
table.render({
|
table.render({
|
||||||
elem: "#data-table",
|
elem: "#data-table",
|
||||||
url: SELECT_API,
|
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,
|
cols: cols,
|
||||||
skin: "line",
|
skin: "line",
|
||||||
size: "lg",
|
size: "lg",
|
||||||
@@ -122,6 +135,9 @@
|
|||||||
layEvent: "refresh",
|
layEvent: "refresh",
|
||||||
icon: "layui-icon-refresh",
|
icon: "layui-icon-refresh",
|
||||||
}, translations.filter, translations.print, translations.export],
|
}, translations.filter, translations.print, translations.export],
|
||||||
|
text: {
|
||||||
|
none: translations.data_not_found
|
||||||
|
},
|
||||||
done: function () {
|
done: function () {
|
||||||
layer.photos({photos: 'div[lay-id="data-table"]', anim: 5});
|
layer.photos({photos: 'div[lay-id="data-table"]', anim: 5});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,10 +141,10 @@
|
|||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-md" lay-submit=""
|
<button type="submit" class="pear-btn pear-btn-primary pear-btn-md" lay-submit=""
|
||||||
lay-filter="save">
|
lay-filter="save">
|
||||||
提交
|
<?= $translations['submit'] ?? '提交' ?>
|
||||||
</button>
|
</button>
|
||||||
<button type="reset" class="pear-btn pear-btn-md">
|
<button type="reset" class="pear-btn pear-btn-md">
|
||||||
重置
|
<?= $translations['reset'] ?? '重置' ?>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user