修改 设备管理查询

master
wangh 2 years ago
parent 4fc3e50675
commit 8846f84238

@ -2,6 +2,8 @@ package com.haiwei.web.controller.common;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

@ -16,7 +16,7 @@ import com.haiwei.common.core.text.Convert;
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@Service @Service("baseDeviceTypeService")
public class BaseDeviceTypeServiceImpl implements IBaseDeviceTypeService public class BaseDeviceTypeServiceImpl implements IBaseDeviceTypeService
{ {
@Autowired @Autowired

@ -25,7 +25,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户介绍:</label> <label class="col-sm-3 control-label">客户介绍:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="customerInfo" class="form-control" type="text"> <textarea name="customerInfo" class="form-control" type="text"></textarea>
</div> </div>
</div> </div>
</form> </form>

@ -70,7 +70,10 @@
}, },
{ {
field: 'customerLogo', field: 'customerLogo',
title: '客户logo' title: '客户logo',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
}, },
{ {
field: 'customerInfo', field: 'customerInfo',

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

@ -81,7 +81,10 @@
}, },
{ {
field: 'deviceMode', field: 'deviceMode',
title: '设备模型图片' title: '设备模型图片',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
}, },
{ {
field: 'deviceSpe', field: 'deviceSpe',

@ -17,10 +17,11 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">设备类型:</label> <label class="col-sm-3 control-label">设备类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="deviceTypeName" class="form-control m-b"> <select name="deviceTypeName" id="deviceTypeName" class="form-control m-b"
<option value="">所有</option> th:with="type=${@baseDeviceTypeService.selectBaseDeviceTypeList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceTypeName}"
th:value="${dict.deviceTypeName}" th:field="*{deviceTypeName}" ></option>
</select> </select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save