Files
park/public/assets/js/backend/yq/vehicle/log.js
MeSHard b22d09bd39 init
2025-12-01 11:19:23 +08:00

79 lines
3.9 KiB
JavaScript

define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'yq/vehicle/log/index' + location.search,
add_url: 'yq/vehicle/log/add',
edit_url: 'yq/vehicle/log/edit',
del_url: 'yq/vehicle/log/del',
multi_url: 'yq/vehicle/log/multi',
import_url: 'yq/vehicle/log/import',
table: 'vehicle_log',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'vehicleNo', title: __('VehicleNo'), operate: 'LIKE'},
{field: 'plateColor', title: __('PlateColor')},
{field: 'longitude', title: __('Longitude'), operate:'BETWEEN'},
{field: 'latitude', title: __('Latitude'), operate:'BETWEEN'},
{field: 'vec1', title: __('Vec1'), operate:'BETWEEN'},
{field: 'alititude', title: __('Alititude')},
{field: 'direction', title: __('Direction')},
{field: 'positionTime', title: __('PositionTime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'is_del', title: __('Is_del')},
{field: 'vehicle_type', title: __('Vehicle_type')},
{field: 'certificateEffdate', title: __('CertificateEffdate'), operate: 'LIKE'},
{field: 'certificateExpdate', title: __('CertificateExpdate'), operate: 'LIKE'},
{field: 'transCertificateCode', title: __('TransCertificateCode'), operate: 'LIKE'},
{field: 'ownerName', title: __('OwnerName'), operate: 'LIKE'},
{field: 'licenseIssueOrganCode', title: __('LicenseIssueOrganCode'), operate: 'LIKE'},
{field: 'transCertificateWord', title: __('TransCertificateWord'), operate: 'LIKE'},
{field: 'vinNo', title: __('VinNo'), operate: 'LIKE'},
{field: 'vehicleType', title: __('VehicleType'), operate: 'LIKE'},
{field: 'longitude_84', title: __('Longitude_84'), operate:'BETWEEN'},
{field: 'latitude_84', title: __('Latitude_84'), operate:'BETWEEN'},
{field: 'is_waybill', title: __('Is_waybill')},
{field: 'is_violations', title: __('Is_violations')},
{field: 'perimeter_id', title: __('Perimeter_id')},
{field: 'qr_color', title: __('Qr_color')},
{field: 'v_carettime', title: __('V_carettime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});