|
|
|
@ -17,9 +17,12 @@
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">设备类型:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<select name="deviceTypeName" class="form-control m-b" >
|
|
|
|
|
<!-- <option value="">所有</option>-->
|
|
|
|
|
<select name="deviceTypeName" id="deviceTypeName" class="form-control m-b"
|
|
|
|
|
th:with="type=${@baseDeviceTypeService.selectBaseDeviceTypeList(null)}">
|
|
|
|
|
<option value=""></option>
|
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.deviceTypeName}" th:value="${dict.deviceTypeName}"></option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
@ -61,6 +64,12 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function submitHandler() {
|
|
|
|
|
var res= $('#deviceTypeName').select2('val');
|
|
|
|
|
console.log(res)
|
|
|
|
|
if(res==undefined || res == '') {
|
|
|
|
|
$.modal.alertError("你没有选中任何项");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if ($.validate.form()) {
|
|
|
|
|
$.operate.save(prefix + "/add", $('#form-base_device_info-add').serialize());
|
|
|
|
|
}
|
|
|
|
@ -75,6 +84,13 @@
|
|
|
|
|
}).on('fileremoved', function (event, id, index) {
|
|
|
|
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
$('#deviceTypeName').select2({
|
|
|
|
|
placeholder: "请选择设备类型",
|
|
|
|
|
allowClear: true
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|