|
|
@ -50,7 +50,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group" id="product"/>
|
|
|
|
<div class="form-group" id="product"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -67,9 +66,6 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function submitHandler() {
|
|
|
|
function submitHandler() {
|
|
|
|
/*if ($.validate.form()) {
|
|
|
|
|
|
|
|
$.operate.save(prefix + "/set", $('#form-sensorInfo-edit').serialize());
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($.validate.form()) {
|
|
|
|
if ($.validate.form()) {
|
|
|
|
if (arrList.length<1){
|
|
|
|
if (arrList.length<1){
|
|
|
@ -120,10 +116,34 @@
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
success: function(result) {
|
|
|
|
success: function(result) {
|
|
|
|
result.forEach(function (value,index) {
|
|
|
|
result.forEach(function (value,index) {
|
|
|
|
arrList.push(value.alarmtypeId);
|
|
|
|
/*arrList.push(value.alarmtypeId);
|
|
|
|
|
|
|
|
console.log(value);*/
|
|
|
|
|
|
|
|
createParams(value);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const createParams = function (paramNames) {
|
|
|
|
|
|
|
|
$("#product").append(
|
|
|
|
|
|
|
|
"<div><label class=\"col-sm-2 control-label is-required\">参数名称:</label>\n" +
|
|
|
|
|
|
|
|
" <div class=\"col-sm-2\">\n" +
|
|
|
|
|
|
|
|
" <input name=\"paramCode\" value='" + paramNames.alarmTypeName + "' data-id='" + paramNames.alarmtypeId + "' class=\"form-control\" type=\"text\" readonly='true' required>\n" +
|
|
|
|
|
|
|
|
" </div>\n" +
|
|
|
|
|
|
|
|
" <label class=\"col-sm-2 control-label is-required\" style='margin-left: -35px'>最小值:</label>" +
|
|
|
|
|
|
|
|
" <div class=\"col-sm-2\">\n" +
|
|
|
|
|
|
|
|
" <input name=\"minValue\" class=\"form-control\" value='" + paramNames.minValue + "' type=\"text\" required>\n" +
|
|
|
|
|
|
|
|
" </div>\n" +
|
|
|
|
|
|
|
|
" <label class=\"col-sm-2 control-label is-required\" style='margin-left: -35px'>最大值:</label>" +
|
|
|
|
|
|
|
|
" <div class=\"col-sm-2\">\n" +
|
|
|
|
|
|
|
|
" <input name=\"maxValue\" class=\"form-control\" value='" + paramNames.maxValue + "' type=\"text\" required>\n" +
|
|
|
|
|
|
|
|
" </div>\n" +
|
|
|
|
|
|
|
|
" <div class=\"col-sm-1\">\n" +
|
|
|
|
|
|
|
|
" <p style=\"margin-top: 10px\" class=\"glyphicon glyphicon-trash\" aria-hidden=\"true\"></p>\n" +
|
|
|
|
|
|
|
|
" </div>" +
|
|
|
|
|
|
|
|
"</div>"
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
arrList.push(paramNames.alarmtypeId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var productid;
|
|
|
|
var productid;
|
|
|
|
//动态添加成品数量
|
|
|
|
//动态添加成品数量
|
|
|
@ -135,6 +155,7 @@
|
|
|
|
effectiveFieldsAlias: {paramCode: "参数编码", paramName: "参数名称"},
|
|
|
|
effectiveFieldsAlias: {paramCode: "参数编码", paramName: "参数名称"},
|
|
|
|
searchFields: ["paramName"],
|
|
|
|
searchFields: ["paramName"],
|
|
|
|
}).on('onDataRequestSuccess', function (e, result) {
|
|
|
|
}).on('onDataRequestSuccess', function (e, result) {
|
|
|
|
|
|
|
|
console.log(arrList);
|
|
|
|
console.log('onDataRequestSuccess: ', result);
|
|
|
|
console.log('onDataRequestSuccess: ', result);
|
|
|
|
}).on('onSetSelectValue', function (e, keyword) {
|
|
|
|
}).on('onSetSelectValue', function (e, keyword) {
|
|
|
|
productid = keyword.id;
|
|
|
|
productid = keyword.id;
|
|
|
|