querywaterquality.js
5.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'querywaterquality/index' + location.search,
add_url: 'querywaterquality/add',
edit_url: 'querywaterquality/edit',
del_url: 'querywaterquality/del',
multi_url: 'querywaterquality/multi',
import_url: 'querywaterquality/import',
table: 'querywaterquality',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{field: 'ammoniaNitrogen', title: __('Ammonianitrogen'), operate: 'LIKE'},
{field: 'ammoniaNitrogenExc', title: __('Ammonianitrogenexc'), operate: 'LIKE'},
{field: 'ammoniaNitrogenMul', title: __('Ammonianitrogenmul'), operate: 'LIKE'},
{field: 'blueGreenAlgae', title: __('Bluegreenalgae'), operate: 'LIKE'},
{field: 'blueGreenAlgaeExc', title: __('Bluegreenalgaeexc'), operate: 'LIKE'},
{field: 'blueGreenAlgaeMul', title: __('Bluegreenalgaemul'), operate: 'LIKE'},
{field: 'chlorophyllA', title: __('Chlorophylla'), operate: 'LIKE'},
{field: 'chlorophyllAExc', title: __('Chlorophyllaexc'), operate: 'LIKE'},
{field: 'chlorophyllAMul', title: __('Chlorophyllamul'), operate: 'LIKE'},
{field: 'code', title: __('Code'), operate: 'LIKE'},
{field: 'conductivity', title: __('Conductivity'), operate: 'LIKE'},
{field: 'conductivityExc', title: __('Conductivityexc'), operate: 'LIKE'},
{field: 'conductivityMul', title: __('Conductivitymul'), operate: 'LIKE'},
{field: 'dissolvedOxygen', title: __('Dissolvedoxygen'), operate: 'LIKE'},
{field: 'dissolvedOxygenExc', title: __('Dissolvedoxygenexc'), operate: 'LIKE'},
{field: 'dissolvedOxygenMul', title: __('Dissolvedoxygenmul'), operate: 'LIKE'},
{field: 'exceedance', title: __('Exceedance'), operate: 'LIKE'},
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'markUp', title: __('Markup'), operate: 'LIKE'},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'nitrogen', title: __('Nitrogen'), operate: 'LIKE'},
{field: 'nitrogenExc', title: __('Nitrogenexc'), operate: 'LIKE'},
{field: 'nitrogenMul', title: __('Nitrogenmul'), operate: 'LIKE'},
{field: 'permanganate', title: __('Permanganate'), operate: 'LIKE'},
{field: 'permanganateExc', title: __('Permanganateexc'), operate: 'LIKE'},
{field: 'permanganateMul', title: __('Permanganatemul'), operate: 'LIKE'},
{field: 'phValue', title: __('Phvalue'), operate: 'LIKE'},
{field: 'phValueExc', title: __('Phvalueexc'), operate: 'LIKE'},
{field: 'phValueMul', title: __('Phvaluemul'), operate: 'LIKE'},
{field: 'phosphorus', title: __('Phosphorus'), operate: 'LIKE'},
{field: 'phosphorusExc', title: __('Phosphorusexc'), operate: 'LIKE'},
{field: 'phosphorusMul', title: __('Phosphorusmul'), operate: 'LIKE'},
{field: 'rvLkId', title: __('Rvlkid')},
{field: 'rvLkName', title: __('Rvlkname'), operate: 'LIKE'},
{field: 'tm', title: __('Tm'), operate: 'LIKE'},
{field: 'turbidity', title: __('Turbidity'), operate: 'LIKE'},
{field: 'turbidityExc', title: __('Turbidityexc'), operate: 'LIKE'},
{field: 'turbidityMul', title: __('Turbiditymul'), operate: 'LIKE'},
{field: 'upExc', title: __('Upexc'), operate: 'LIKE'},
{field: 'waterQualityTarget', title: __('Waterqualitytarget'), operate: 'LIKE'},
{field: 'waterTemperature', title: __('Watertemperature'), operate: 'LIKE'},
{field: 'waterTemperatureExc', title: __('Watertemperatureexc'), operate: 'LIKE'},
{field: 'waterTemperatureMul', title: __('Watertemperaturemul'), operate: 'LIKE'},
{field: 'waterType', title: __('Watertype'), operate: 'LIKE'},
{field: 'wqc', title: __('Wqc'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{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;
});