| | |
| | | generator.url="47.97.1.152:51433;databasename=zypms"; |
| | | generator.username="sa"; |
| | | generator.password="Zoneyung@zy56$"; |
| | | generator.table="man_issue_type"; |
| | | |
| | | generator.table="man_issue"; |
| | | // ------------------------------------------------------- |
| | | generator.packagePath="com.zy.sc.manager"; |
| | | // generator.js = false; |
New file |
| | |
| | | package com.zy.sc.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.sc.common.service.GeoService; |
| | | import com.zy.sc.common.web.BaseController; |
| | | import com.zy.sc.manager.entity.IssueType; |
| | | import com.zy.sc.manager.service.IssueTypeService; |
| | | import com.zy.sc.system.entity.Host; |
| | | import com.zy.sc.system.service.HostService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2021/12/20 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("app") |
| | | public class AppController extends BaseController { |
| | | |
| | | @Autowired |
| | | private HostService hostService; |
| | | @Autowired |
| | | private IssueTypeService issueTypeService; |
| | | @Autowired |
| | | private GeoService geoService; |
| | | |
| | | @RequestMapping("/host/list/auth") |
| | | @ManagerAuth |
| | | public R hostList(){ |
| | | Long hostId = getHostId(); |
| | | Wrapper<Host> wrapper = new EntityWrapper<Host>().orderBy("id"); |
| | | if (hostId != null) { |
| | | wrapper.eq("id", hostId); |
| | | } |
| | | List<Host> hostList = hostService.selectList(wrapper); |
| | | return R.ok().add(hostList); |
| | | } |
| | | |
| | | @RequestMapping("/issue/type/auth") |
| | | public R issueType(){ |
| | | List<IssueType> issueTypes = issueTypeService.selectList(new EntityWrapper<IssueType>().orderBy("id")); |
| | | return R.ok().add(issueTypes); |
| | | } |
| | | |
| | | // @RequestMapping("/sensor/save/auth") |
| | | // @ManagerAuth(memo = "移动端添加设备") |
| | | // public R issueSave(MobileSensorParam param){ |
| | | // Long hostId = getHostId(); |
| | | // if (hostId == null) { |
| | | // return R.error("请使用正确账号登录"); |
| | | // } |
| | | // if (Cools.isEmpty(param.getUuid())) { |
| | | // return R.error("请填写设备编号"); |
| | | // } |
| | | // if (Cools.isEmpty(param.getSensorType())) { |
| | | // return R.error("请选择设备类型"); |
| | | // } |
| | | // SensorType sensorType = sensorTypeService.selectById(param.getSensorType()); |
| | | // if (sensorType == null) { |
| | | // return R.error("请选择正确的设备类型"); |
| | | // } |
| | | // Sensor sensor = sensorService.selectByCode(param.getUuid()); |
| | | // if (sensor != null) { |
| | | // return R.error("设备编号已存在,请联系管理员"); |
| | | // } else { |
| | | // sensor = new Sensor(); |
| | | // } |
| | | // Date now = new Date(); |
| | | // sensor.setUuid(param.getUuid()); |
| | | // sensor.setHostId(hostId); |
| | | // sensor.setSensorType(param.getSensorType()); |
| | | // sensor.setCcid(param.getCcid()); |
| | | // sensor.setAddr(param.getAddr()); |
| | | // sensor.setDesc(param.getDesc()); |
| | | // sensor.setThreshold(String.valueOf(param.getThreshold())); |
| | | // List<String> imgArr = param.getImgArr(); |
| | | // if (!Cools.isEmpty(imgArr)) { |
| | | // sensor.setImg(JSONArray.toJSONString(imgArr)); |
| | | // } |
| | | // if (!Cools.isEmpty(param.getLocationObj())) { |
| | | // LocationObj locationObj = JSON.parseObject(param.getLocationObj(), LocationObj.class); |
| | | // sensor.setLon(Double.parseDouble(locationObj.getLongitude())); |
| | | // sensor.setLat(Double.parseDouble(locationObj.getLatitude())); |
| | | // GeoCodeDto geoCode = geoService.getGeoCode(sensor.getLon(), sensor.getLat()); |
| | | // if (geoCode != null && geoCode.getAddressComponent() != null) { |
| | | // sensor.setProvince(geoCode.getAddressComponent().getProvince()); |
| | | // sensor.setCity(geoCode.getAddressComponent().getCity()); |
| | | // sensor.setDistrict(geoCode.getAddressComponent().getDistrict()); |
| | | // sensor.setTownship(geoCode.getAddressComponent().getTownship()); |
| | | // } |
| | | // } |
| | | // sensor.setStatus(1); |
| | | // sensor.setCreateBy(getUserId()); |
| | | // sensor.setCreateTime(now); |
| | | // sensor.setUpdateBy(getUserId()); |
| | | // sensor.setUpdateTime(now); |
| | | // sensor.setMemo(param.getMemo()); |
| | | // if (!sensorService.insert(sensor)) { |
| | | // throw new CoolException("添加失败,请联系管理员"); |
| | | // } |
| | | // return R.ok("添加设备成功"); |
| | | // } |
| | | // |
| | | // @RequestMapping("/sensor/list/auth") |
| | | // @ManagerAuth |
| | | // public R sensorList(@RequestParam(required = false) String condition){ |
| | | // Wrapper<Sensor> wrapper = new EntityWrapper<Sensor>() |
| | | // .like("uuid", condition) |
| | | // .orderBy("sensor_type").orderBy("create_time"); |
| | | // Long hostId = getHostId(); |
| | | // if (hostId != null) { |
| | | // wrapper.eq("host_id", hostId); |
| | | // } |
| | | // List<Sensor> sensors = sensorService.selectList(wrapper); |
| | | // List<AppSensorTypeVo> result = new ArrayList<>(); |
| | | // Set<Long> sensorTypeSet = new HashSet<>(); |
| | | // for (Sensor sensor : sensors) { |
| | | // AppSensorVo sensorVo = new AppSensorVo(); |
| | | // sensorVo.setSensorId(sensor.getId()); |
| | | // sensorVo.setUuid(sensor.getUuid()); |
| | | // String addr = sensor.getProvince()+sensor.getCity()+sensor.getDistrict(); |
| | | //// String addr = sensor.getProvince()+","+sensor.getCity()+","+sensor.getDistrict(); |
| | | // if (Cools.isEmpty(addr)) { |
| | | // addr = "未知定位"; |
| | | // } |
| | | // sensorVo.setAddr(addr); |
| | | // |
| | | // if (!sensorTypeSet.contains(sensor.getSensorType())) { |
| | | // sensorTypeSet.add(sensor.getSensorType()); |
| | | // SensorType sensorType = sensorTypeService.selectById(sensor.getSensorType()); |
| | | // AppSensorTypeVo vo = new AppSensorTypeVo(); |
| | | // vo.setSensorTypeFlag(sensorType.getFlag()); |
| | | // vo.setSensorTypeId(sensor.getSensorType()); |
| | | // vo.setSensorTypeName(sensorType.getName()); |
| | | // result.add(vo); |
| | | // vo.getSensors().add(sensorVo); |
| | | // } else { |
| | | // for (AppSensorTypeVo vo : result) { |
| | | // if (vo.getSensorTypeId().equals(sensor.getSensorType())) { |
| | | // vo.getSensors().add(sensorVo); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // return R.ok().add(result); |
| | | // } |
| | | // |
| | | // @RequestMapping("/sensor/detl/auth") |
| | | // @ManagerAuth |
| | | // public R sensorDetl(@RequestParam Long sensorId){ |
| | | // return R.ok().add(sensorService.selectById(sensorId)); |
| | | // } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.sc.manager.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.sc.manager.entity.Issue; |
| | | import com.zy.sc.manager.service.IssueService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.sc.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class IssueController extends BaseController { |
| | | |
| | | @Autowired |
| | | private IssueService issueService; |
| | | |
| | | @RequestMapping(value = "/issue/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(issueService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Issue> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(issueService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/add/auth") |
| | | @ManagerAuth |
| | | public R add(Issue issue) { |
| | | issueService.insert(issue); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/update/auth") |
| | | @ManagerAuth |
| | | public R update(Issue issue){ |
| | | if (Cools.isEmpty(issue) || null==issue.getId()){ |
| | | return R.error(); |
| | | } |
| | | issueService.updateById(issue); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | issueService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<Issue> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("issue")); |
| | | convert(map, wrapper); |
| | | List<Issue> list = issueService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issueQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Issue> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<Issue> page = issueService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Issue issue : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", issue.getId()); |
| | | map.put("value", issue.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/issue/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<Issue> wrapper = new EntityWrapper<Issue>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != issueService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(Issue.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | @RequestMapping(value = "/issueType/add/auth") |
| | | @ManagerAuth |
| | | public R add(IssueType issueType) { |
| | | issueType.setStatus(1); |
| | | issueType.setCreateBy(getUserId()); |
| | | issueType.setCreateTime(new Date()); |
| | | issueType.setUpdateBy(getUserId()); |
New file |
| | |
| | | package com.zy.sc.manager.entity; |
| | | |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.sc.system.service.HostService; |
| | | import com.zy.sc.system.entity.Host; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.sc.manager.service.IssueTypeService; |
| | | import com.zy.sc.manager.entity.IssueType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.sc.system.service.UserService; |
| | | import com.zy.sc.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.sc.system.service.UserService; |
| | | import com.zy.sc.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @TableName("man_issue") |
| | | public class Issue implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 故障编号 |
| | | */ |
| | | @ApiModelProperty(value= "故障编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 所属项目 |
| | | */ |
| | | @ApiModelProperty(value= "所属项目") |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 故障类型 |
| | | */ |
| | | @ApiModelProperty(value= "故障类型") |
| | | @TableField("issue_type") |
| | | private Long issueType; |
| | | |
| | | /** |
| | | * 问题概述 |
| | | */ |
| | | @ApiModelProperty(value= "问题概述") |
| | | private String title; |
| | | |
| | | /** |
| | | * 故障原因 |
| | | */ |
| | | @ApiModelProperty(value= "故障原因") |
| | | private String reason; |
| | | |
| | | /** |
| | | * 解决办法 |
| | | */ |
| | | @ApiModelProperty(value= "解决办法") |
| | | private String deal; |
| | | |
| | | /** |
| | | * 文件列表 |
| | | */ |
| | | @ApiModelProperty(value= "文件列表") |
| | | private String files; |
| | | |
| | | /** |
| | | * 图片 |
| | | */ |
| | | @ApiModelProperty(value= "图片") |
| | | private String img; |
| | | |
| | | /** |
| | | * 发生日期 |
| | | */ |
| | | @ApiModelProperty(value= "发生日期") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 处理日期 |
| | | */ |
| | | @ApiModelProperty(value= "处理日期") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 更新日期 |
| | | */ |
| | | @ApiModelProperty(value= "更新日期") |
| | | @TableField("last_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date lastTime; |
| | | |
| | | /** |
| | | * 发现人 |
| | | */ |
| | | @ApiModelProperty(value= "发现人") |
| | | private String discoverer; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @ApiModelProperty(value= "联系方式") |
| | | private String tel; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | private String dealer; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Integer settle; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public Issue() {} |
| | | |
| | | public Issue(String uuid,Long hostId,Long issueType,String title,String reason,String deal,String files,String img,Date startTime,Date endTime,Date lastTime,String discoverer,String tel,String dealer,Integer settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.hostId = hostId; |
| | | this.issueType = issueType; |
| | | this.title = title; |
| | | this.reason = reason; |
| | | this.deal = deal; |
| | | this.files = files; |
| | | this.img = img; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.lastTime = lastTime; |
| | | this.discoverer = discoverer; |
| | | this.tel = tel; |
| | | this.dealer = dealer; |
| | | this.settle = settle; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // Issue issue = new Issue( |
| | | // null, // 故障编号 |
| | | // null, // 所属项目 |
| | | // null, // 故障类型 |
| | | // null, // 问题概述 |
| | | // null, // 故障原因 |
| | | // null, // 解决办法 |
| | | // null, // 文件列表 |
| | | // null, // 图片 |
| | | // null, // 发生日期 |
| | | // null, // 处理日期 |
| | | // null, // 更新日期 |
| | | // null, // 发现人 |
| | | // null, // 联系方式 |
| | | // null, // 供应商 |
| | | // null, // |
| | | // null, // 状态 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getUuid() { |
| | | return uuid; |
| | | } |
| | | |
| | | public void setUuid(String uuid) { |
| | | this.uuid = uuid; |
| | | } |
| | | |
| | | public Long getHostId() { |
| | | return hostId; |
| | | } |
| | | |
| | | public String getHostId$(){ |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.selectById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return String.valueOf(host.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setHostId(Long hostId) { |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | public Long getIssueType() { |
| | | return issueType; |
| | | } |
| | | |
| | | public String getIssueType$(){ |
| | | IssueTypeService service = SpringUtils.getBean(IssueTypeService.class); |
| | | IssueType issueType = service.selectById(this.issueType); |
| | | if (!Cools.isEmpty(issueType)){ |
| | | return String.valueOf(issueType.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setIssueType(Long issueType) { |
| | | this.issueType = issueType; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getReason() { |
| | | return reason; |
| | | } |
| | | |
| | | public void setReason(String reason) { |
| | | this.reason = reason; |
| | | } |
| | | |
| | | public String getDeal() { |
| | | return deal; |
| | | } |
| | | |
| | | public void setDeal(String deal) { |
| | | this.deal = deal; |
| | | } |
| | | |
| | | public String getFiles() { |
| | | return files; |
| | | } |
| | | |
| | | public void setFiles(String files) { |
| | | this.files = files; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Date getLastTime() { |
| | | return lastTime; |
| | | } |
| | | |
| | | public String getLastTime$(){ |
| | | if (Cools.isEmpty(this.lastTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.lastTime); |
| | | } |
| | | |
| | | public void setLastTime(Date lastTime) { |
| | | this.lastTime = lastTime; |
| | | } |
| | | |
| | | public String getDiscoverer() { |
| | | return discoverer; |
| | | } |
| | | |
| | | public void setDiscoverer(String discoverer) { |
| | | this.discoverer = discoverer; |
| | | } |
| | | |
| | | public String getTel() { |
| | | return tel; |
| | | } |
| | | |
| | | public void setTel(String tel) { |
| | | this.tel = tel; |
| | | } |
| | | |
| | | public String getDealer() { |
| | | return dealer; |
| | | } |
| | | |
| | | public void setDealer(String dealer) { |
| | | this.dealer = dealer; |
| | | } |
| | | |
| | | public Integer getSettle() { |
| | | return settle; |
| | | } |
| | | |
| | | public void setSettle(Integer settle) { |
| | | this.settle = settle; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Long getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setCreateBy(Long createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Long getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.sc.manager.mapper; |
| | | |
| | | import com.zy.sc.manager.entity.Issue; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface IssueMapper extends BaseMapper<Issue> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.sc.manager.service; |
| | | |
| | | import com.zy.sc.manager.entity.Issue; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface IssueService extends IService<Issue> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.sc.manager.service.impl; |
| | | |
| | | import com.zy.sc.manager.mapper.IssueMapper; |
| | | import com.zy.sc.manager.entity.Issue; |
| | | import com.zy.sc.manager.service.IssueService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("issueService") |
| | | public class IssueServiceImpl extends ServiceImpl<IssueMapper, Issue> implements IssueService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.sc.manager.mapper.IssueMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.sc.manager.entity.Issue"> |
| | | <id column="id" property="id" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="host_id" property="hostId" /> |
| | | <result column="issue_type" property="issueType" /> |
| | | <result column="title" property="title" /> |
| | | <result column="reason" property="reason" /> |
| | | <result column="deal" property="deal" /> |
| | | <result column="files" property="files" /> |
| | | <result column="img" property="img" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="last_time" property="lastTime" /> |
| | | <result column="discoverer" property="discoverer" /> |
| | | <result column="tel" property="tel" /> |
| | | <result column="dealer" property="dealer" /> |
| | | <result column="settle" property="settle" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#issue', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/issue/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'uuid', align: 'center',title: '故障编号'} |
| | | ,{field: 'hostId$', align: 'center',title: '所属项目'} |
| | | ,{field: 'issueType$', align: 'center',title: '故障类型'} |
| | | ,{field: 'title', align: 'center',title: '问题概述'} |
| | | ,{field: 'reason', align: 'center',title: '故障原因'} |
| | | ,{field: 'deal', align: 'center',title: '解决办法'} |
| | | ,{field: 'files', align: 'center',title: '文件列表'} |
| | | ,{field: 'img', align: 'center',title: '图片'} |
| | | ,{field: 'startTime$', align: 'center',title: '发生日期'} |
| | | ,{field: 'endTime$', align: 'center',title: '处理日期'} |
| | | ,{field: 'lastTime$', align: 'center',title: '更新日期'} |
| | | ,{field: 'discoverer', align: 'center',title: '发现人'} |
| | | ,{field: 'tel', align: 'center',title: '联系方式'} |
| | | ,{field: 'dealer', align: 'center',title: '供应商'} |
| | | ,{field: 'settle', align: 'center',title: ''} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(issue)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(issue)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkStatus.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | del(ids); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'issue': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/issue/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(issue)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | var ids = [data.id]; |
| | | del(ids); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/issue/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/issue/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender() { |
| | | layDate.render({ |
| | | elem: '#startTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#endTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#lastTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="issue" lay-filter="issue"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/issue/issue.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">故障编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="uuid" placeholder="请输入故障编号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属项目: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="hostId" placeholder="请输入所属项目" style="display: none"> |
| | | <input id="hostId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入所属项目" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="hostQueryByhostId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="hostQueryByhostIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">故障类型: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="issueType" placeholder="请输入故障类型" style="display: none"> |
| | | <input id="issueType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入故障类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="issueTypeQueryByissueType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="issueTypeQueryByissueTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">问题概述: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="title" placeholder="请输入问题概述"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">故障原因: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="reason" placeholder="请输入故障原因"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">解决办法: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="deal" placeholder="请输入解决办法"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">文件列表: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="files" placeholder="请输入文件列表"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">图片: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="img" placeholder="请输入图片"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">发生日期: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="startTime" id="startTime$" placeholder="请输入发生日期"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">处理日期: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="endTime" id="endTime$" placeholder="请输入处理日期"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">更新日期: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lastTime" id="lastTime$" placeholder="请输入更新日期"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">发现人: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="discoverer" placeholder="请输入发现人"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">联系方式: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="tel" placeholder="请输入联系方式"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">供应商: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dealer" placeholder="请输入供应商"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="settle" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <input class="layui-input" name="name" placeholder="请输入类型名称"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">状态: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <select name="status">--> |
| | | <!-- <option value="">请选择状态</option>--> |
| | | <!-- <option value="1">正常</option>--> |
| | | <!-- <option value="0">禁用</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |