|
|
|
@ -68,7 +68,7 @@
|
|
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i>
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-white btn-sm" onclick=""><i class="fa fa-minus">
|
|
|
|
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus">
|
|
|
|
|
删除</i></button>
|
|
|
|
|
<div class="col-sm-12 select-table table-striped">
|
|
|
|
|
<table id="bootstrap-table"></table>
|
|
|
|
@ -224,6 +224,18 @@
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
title: '操作',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
|
var actions = [];
|
|
|
|
|
actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" ' +
|
|
|
|
|
'onclick="removeRow(\''+row.index+'\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
|
|
|
|
|
|
return actions.join('');
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
$.table.init(options);
|
|
|
|
@ -231,35 +243,41 @@
|
|
|
|
|
|
|
|
|
|
function addColumn() {
|
|
|
|
|
$.modal.open('选择数据', prefix + "/selectData", '900', '620');
|
|
|
|
|
//
|
|
|
|
|
// var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
|
|
|
|
// sub.editColumn();
|
|
|
|
|
//
|
|
|
|
|
// $("#" + table.options.id).bootstrapTable('insertRow', {
|
|
|
|
|
// index: count,
|
|
|
|
|
// row: {
|
|
|
|
|
// index: $.table.serialNumber(count),
|
|
|
|
|
// recordTime: "",
|
|
|
|
|
// temp: "",
|
|
|
|
|
// openNumber: "",
|
|
|
|
|
// aperture: "",
|
|
|
|
|
// nozzleNumber: "",
|
|
|
|
|
// middleTemp: "",
|
|
|
|
|
// outTemp: "",
|
|
|
|
|
// headPressure: "",
|
|
|
|
|
// screwSpeed: "",
|
|
|
|
|
// motorCurrent: "",
|
|
|
|
|
// cutterSpeed: "",
|
|
|
|
|
// waterContent: ""
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function callback(index, layero) {
|
|
|
|
|
console.log("进入了回调函数提交方法"+layero.toString());
|
|
|
|
|
// $.modal.close();
|
|
|
|
|
|
|
|
|
|
function selectUsers(rows) {
|
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
|
|
|
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
|
|
|
|
console.log('添加 id = '+count)
|
|
|
|
|
sub.editColumn();
|
|
|
|
|
$("#" + table.options.id).bootstrapTable('insertRow', {
|
|
|
|
|
index: count,
|
|
|
|
|
row: {
|
|
|
|
|
index: $.table.serialNumber(count),
|
|
|
|
|
recordTime: rows[i].recordTime,
|
|
|
|
|
temp: "",
|
|
|
|
|
openNumber: "",
|
|
|
|
|
aperture: "",
|
|
|
|
|
nozzleNumber: "",
|
|
|
|
|
middleTemp: "",
|
|
|
|
|
outTemp: rows[i].tempHead,
|
|
|
|
|
headPressure: rows[i].pressureHead,
|
|
|
|
|
screwSpeed: rows[i].speedA,
|
|
|
|
|
motorCurrent: rows[i].currentA,
|
|
|
|
|
cutterSpeed: rows[i].speedCutter,
|
|
|
|
|
waterContent: ""
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function selectUsers() {
|
|
|
|
|
alert("进入了回调函数提交方法")
|
|
|
|
|
function removeRow(ids) {
|
|
|
|
|
console.log('删除的ID='+ids)
|
|
|
|
|
("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
|
|
|
|
|
$("#" + table.options.id).bootstrapTable('remove', {
|
|
|
|
|
field: 'index',
|
|
|
|
|
values: ids
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|