init
This commit is contained in:
58
public/assets/js/backend/yq/vehicle/line_log.js
Normal file
58
public/assets/js/backend/yq/vehicle/line_log.js
Normal file
@@ -0,0 +1,58 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'yq/vehicle/line_log/index' + location.search,
|
||||
add_url: 'yq/vehicle/line_log/add',
|
||||
edit_url: 'yq/vehicle/line_log/edit',
|
||||
del_url: 'yq/vehicle/line_log/del',
|
||||
multi_url: 'yq/vehicle/line_log/multi',
|
||||
import_url: 'yq/vehicle/line_log/import',
|
||||
table: 'vehicle_line_log',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'vehicleNo', title: __('VehicleNo'), operate: 'LIKE'},
|
||||
{field: 'up_coordinate', title: __('Up_coordinate'), operate: 'LIKE'},
|
||||
{field: 'coordinate', title: __('Coordinate'), operate: 'LIKE'},
|
||||
{field: 'perimeter_id', title: __('Perimeter_id')},
|
||||
{field: 'type', title: __('Type')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'is_del', title: __('Is_del')},
|
||||
{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;
|
||||
});
|
||||
78
public/assets/js/backend/yq/vehicle/log.js
Normal file
78
public/assets/js/backend/yq/vehicle/log.js
Normal file
@@ -0,0 +1,78 @@
|
||||
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;
|
||||
});
|
||||
57
public/assets/js/backend/yq/vehicle/park_line_log.js
Normal file
57
public/assets/js/backend/yq/vehicle/park_line_log.js
Normal file
@@ -0,0 +1,57 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'yq/vehicle/park_line_log/index' + location.search,
|
||||
add_url: 'yq/vehicle/park_line_log/add',
|
||||
edit_url: 'yq/vehicle/park_line_log/edit',
|
||||
del_url: 'yq/vehicle/park_line_log/del',
|
||||
multi_url: 'yq/vehicle/park_line_log/multi',
|
||||
import_url: 'yq/vehicle/park_line_log/import',
|
||||
table: 'vehicle_park_line_log',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'vehicleNo', title: __('VehicleNo'), operate: 'LIKE'},
|
||||
{field: 'up_coordinate', title: __('Up_coordinate'), operate: 'LIKE'},
|
||||
{field: 'coordinate', title: __('Coordinate'), operate: 'LIKE'},
|
||||
{field: 'type', title: __('Type')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'is_del', title: __('Is_del')},
|
||||
{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;
|
||||
});
|
||||
163
public/assets/js/backend/yq/vehicle/vehicle.js
Normal file
163
public/assets/js/backend/yq/vehicle/vehicle.js
Normal file
@@ -0,0 +1,163 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'yq/vehicle/vehicle/index' + location.search,
|
||||
add_url: 'yq/vehicle/vehicle/add',
|
||||
edit_url: 'yq/vehicle/vehicle/edit',
|
||||
del_url: 'yq/vehicle/vehicle/del',
|
||||
multi_url: 'yq/vehicle/vehicle/multi',
|
||||
import_url: 'yq/vehicle/vehicle/import',
|
||||
table: 'vehicle',
|
||||
}
|
||||
});
|
||||
|
||||
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'), searchList: {"1":__('蓝色'),"2":__('黄色'),"3":__('黑色'),"4":__('白色'),"5":__('浅绿'),"9":__('其他'),"223":__('黄绿'),"224":__('渐变绿')}, formatter: Table.api.formatter.normal},
|
||||
// {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'), searchList: {"-1":__('区域外行驶'),"0":__('正常'),"1":__('超速'),"2":__('禁行'),"3":__('禁停'),"4":__('未上报'),"5":__('超最大数量')}, formatter: Table.api.formatter.normal},
|
||||
// {field: 'ownerName', title: __('OwnerName'), operate: 'LIKE'},
|
||||
// {field: 'transCertificateCode', title: __('TransCertificateCode'), operate: 'LIKE'},
|
||||
// {field: 'certificateEffdate', title: __('CertificateEffdate'), operate: 'LIKE'},
|
||||
// {field: 'certificateExpdate', title: __('CertificateExpdate'), operate: 'LIKE'},
|
||||
// {field: 'licenseIssueOrganCode', title: __('LicenseIssueOrganCode'), operate: 'LIKE'},
|
||||
// {field: 'transCertificateWord', title: __('TransCertificateWord'), operate: 'LIKE'},
|
||||
// {field: 'versions', title: __('Versions'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {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'), searchList: {"1":__('无运单'),"2":__('有运单')}, formatter: Table.api.formatter.status},
|
||||
// {field: 'is_violations', title: __('Is_violations'), searchList: {"1":__('正常'),"2":__('有违章')}, formatter: Table.api.formatter.status},
|
||||
{field: 'perimeter_id', title: __('Perimeter_id')},
|
||||
{field: 'qr_color', title: __('Qr_color'), searchList: {"1":__('绿码'),"2":__('黄码'),"3":__('红码')}, formatter: Table.api.formatter.label},
|
||||
// {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'sendTime', title: __('SendTime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'old_longitude', title: __('Old_longitude'), operate:'BETWEEN'},
|
||||
// {field: 'old_latitude', title: __('Old_latitude'), operate:'BETWEEN'},
|
||||
{field: 'distance', title: __('Distance'), operate:'BETWEEN',formatter: function (row,value,index) {
|
||||
if(value.distance >= 3000){
|
||||
return '<span style="color: #e6281d">GPS正常(间距'+value.distance+'米)</span>'
|
||||
}else{
|
||||
return '<span style="color: #00d600">GPS正常(间距'+value.distance+'米)</span>'
|
||||
}
|
||||
}},
|
||||
{field: 'operate',
|
||||
title: __('Operate'),
|
||||
table: table,
|
||||
events: Table.api.events.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: '重置车辆码',
|
||||
text: __('重置车辆码'),
|
||||
title: __('重置车辆码'),
|
||||
classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
|
||||
url: 'yq/vehicle/vehicle/reset',
|
||||
confirm: '确定清楚该车红码状态和报警记录吗?',
|
||||
visible:function (row) {
|
||||
if (row.qr_color == 3){
|
||||
return true
|
||||
}
|
||||
},
|
||||
success: function (data, ret) {
|
||||
// Layer.alert(ret.msg + ",返回数据:" + JSON.stringify(data));
|
||||
//如果需要阻止成功提示,则必须使用return false;
|
||||
//return false;
|
||||
$(".btn-refresh").trigger("click");
|
||||
},
|
||||
error: function (data, ret) {
|
||||
console.log(data, ret);
|
||||
Layer.alert(ret.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: '入园明细',
|
||||
text: __('入园明细'),
|
||||
title: __('入园明细'),
|
||||
classname: 'btn btn-xs btn-info btn-addtabs',
|
||||
url: function (value,row,index) {
|
||||
return 'yq/park/park/index?vehicleNo='+value.vehicleNo
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '运单明细',
|
||||
text: __('运单明细'),
|
||||
title: __('运单明细'),
|
||||
classname: 'btn btn-xs btn-info btn-addtabs',
|
||||
url: function (value,row,index) {
|
||||
return 'yq/electronic_waybill/waybill/index?vehicleNo='+value.vehicleNo
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '报警明细',
|
||||
text: __('报警明细'),
|
||||
title: __('报警明细'),
|
||||
classname: 'btn btn-xs btn-warning btn-addtabs',
|
||||
url: function (value,row,index) {
|
||||
return 'yq/alarm/alarm/index?vehicleNo='+value.vehicleNo
|
||||
}
|
||||
},{
|
||||
name: '行驶记录',
|
||||
text: __('行驶记录'),
|
||||
title: __('行驶记录'),
|
||||
classname: 'btn btn-xs btn-danger btn-addtabs',
|
||||
url: function (value,row,index) {
|
||||
return 'yq/vehicle/vehicle/vehicle_history?vehicleNo='+value.vehicleNo
|
||||
}
|
||||
},{
|
||||
name: '所经企业',
|
||||
text: __('所经企业'),
|
||||
title: __('所经企业'),
|
||||
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||
url: function (value,row,index) {
|
||||
return 'yq/vehicle/vehicle/vehicle_after_list?vehicleNo='+value.vehicleNo
|
||||
}
|
||||
},
|
||||
],
|
||||
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;
|
||||
});
|
||||
103
public/assets/js/backend/yq/vehicle/vehicle_black.js
Normal file
103
public/assets/js/backend/yq/vehicle/vehicle_black.js
Normal file
@@ -0,0 +1,103 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'yq/vehicle/vehicle_black/index' + location.search,
|
||||
add_url: 'yq/vehicle/vehicle_black/add',
|
||||
edit_url: 'yq/vehicle/vehicle_black/edit',
|
||||
del_url: 'yq/vehicle/vehicle_black/del',
|
||||
multi_url: 'yq/vehicle/vehicle_black/multi',
|
||||
import_url: 'yq/vehicle/vehicle_black/import',
|
||||
table: 'vehicle_blacklist',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
||||
{field: 'license', title: __('License'), operate: 'LIKE'},
|
||||
{field: 'num', title: __('Num')},
|
||||
{field: 'perimeter', title: __('Perimeter'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'perimeter_point', title: __('Perimeter_point'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'is_del', title: __('Is_del')},
|
||||
{field: 'operate',
|
||||
title: __('Operate'),
|
||||
table: table,
|
||||
events: Table.api.events.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'ajax',
|
||||
text: __('移除黑名单'),
|
||||
title: __('发送Ajax'),
|
||||
classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
|
||||
url: 'yq/vehicle/vehicle_black/reset',
|
||||
confirm: '确定移除该车黑名单记录吗?',
|
||||
visible:function (row) {
|
||||
if (row.is_search == 1){
|
||||
return true
|
||||
}
|
||||
},
|
||||
success: function (data, ret) {
|
||||
// Layer.alert(ret.msg + ",返回数据:" + JSON.stringify(data));
|
||||
//如果需要阻止成功提示,则必须使用return false;
|
||||
//return false;
|
||||
$(".btn-refresh").trigger("click");
|
||||
},
|
||||
error: function (data, ret) {
|
||||
console.log(data, ret);
|
||||
Layer.alert(ret.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '违规明细',
|
||||
text: __('违规明细'),
|
||||
title: __('违规明细'),
|
||||
classname: 'btn btn-xs btn-warning btn-dialog',
|
||||
visible:function (row) {
|
||||
if (row.is_search == 1){
|
||||
return true
|
||||
}
|
||||
},
|
||||
url: function (value,row,index) {
|
||||
return 'yq/vehicle/vehicle_black/index?vehicleNo='+value.license
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
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;
|
||||
});
|
||||
Reference in New Issue
Block a user