房屋信息字段调整

main
hansha 2 years ago
parent 1f1acf725a
commit ec8e6de5cf

@ -1,31 +1,25 @@
package com.ruoyi.szxc.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.szxc.domain.SzxcHouseInfo;
import com.ruoyi.szxc.service.ISzxcHouseInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-03-15
* @date 2024-03-21
*/
@RestController
@RequestMapping("/szxc/houseinfo")
@ -96,7 +90,7 @@ public class SzxcHouseInfoController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('szxc:houseinfo:remove')")
@Log(title = "房屋信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(szxcHouseInfoService.deleteSzxcHouseInfoByIds(ids));

@ -7,9 +7,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* szxc_house_info
*
*
* @author hs
* @date 2024-03-15
* @date 2024-03-21
*/
public class SzxcHouseInfo extends BaseEntity
{
@ -30,13 +30,29 @@ public class SzxcHouseInfo extends BaseEntity
@Excel(name = "身份证号")
private String cardId;
/** 房屋名称 */
@Excel(name = "房屋名称")
/** 小区id */
@Excel(name = "小区id")
private Long xqId;
/** 小区名称 */
@Excel(name = "小区名称")
private String houseName;
/** 房号 */
@Excel(name = "房号")
private String houseNo;
/** 楼栋id */
@Excel(name = "楼栋id")
private Long buildId;
/** 楼栋名称 */
@Excel(name = "楼栋名称")
private String ldName;
/** 单元 */
@Excel(name = "单元")
private String unit;
/** 门牌号 */
@Excel(name = "门牌号")
private String doorNo;
/** 房屋类型 */
@Excel(name = "房屋类型")
@ -50,18 +66,6 @@ public class SzxcHouseInfo extends BaseEntity
@Excel(name = "房屋性质")
private String houseProp;
/** 楼栋 */
@Excel(name = "楼栋")
private String buildNo;
/** 单元 */
@Excel(name = "单元")
private String unit;
/** 门牌号 */
@Excel(name = "门牌号")
private String doorNo;
/** 取暖方式 */
@Excel(name = "取暖方式")
private String qnfs;
@ -90,174 +94,183 @@ public class SzxcHouseInfo extends BaseEntity
@Excel(name = "创建者ID")
private Long userId;
public void setId(Long id)
public void setId(Long id)
{
this.id = id;
}
public Long getId()
public Long getId()
{
return id;
}
public void setOwnerId(Long ownerId)
public void setOwnerId(Long ownerId)
{
this.ownerId = ownerId;
}
public Long getOwnerId()
public Long getOwnerId()
{
return ownerId;
}
public void setOwnerName(String ownerName)
public void setOwnerName(String ownerName)
{
this.ownerName = ownerName;
}
public String getOwnerName()
public String getOwnerName()
{
return ownerName;
}
public void setCardId(String cardId)
public void setCardId(String cardId)
{
this.cardId = cardId;
}
public String getCardId()
public String getCardId()
{
return cardId;
}
public void setHouseName(String houseName)
public void setXqId(Long xqId)
{
this.xqId = xqId;
}
public Long getXqId()
{
return xqId;
}
public void setHouseName(String houseName)
{
this.houseName = houseName;
}
public String getHouseName()
public String getHouseName()
{
return houseName;
}
public void setHouseNo(String houseNo)
public void setBuildId(Long buildId)
{
this.houseNo = houseNo;
this.buildId = buildId;
}
public String getHouseNo()
public Long getBuildId()
{
return houseNo;
return buildId;
}
public void setHouseType(String houseType)
public void setLdName(String ldName)
{
this.houseType = houseType;
this.ldName = ldName;
}
public String getHouseType()
public String getLdName()
{
return houseType;
return ldName;
}
public void setHouseArea(String houseArea)
public void setUnit(String unit)
{
this.houseArea = houseArea;
this.unit = unit;
}
public String getHouseArea()
public String getUnit()
{
return houseArea;
return unit;
}
public void setHouseProp(String houseProp)
public void setDoorNo(String doorNo)
{
this.houseProp = houseProp;
this.doorNo = doorNo;
}
public String getHouseProp()
public String getDoorNo()
{
return houseProp;
return doorNo;
}
public void setBuildNo(String buildNo)
public void setHouseType(String houseType)
{
this.buildNo = buildNo;
this.houseType = houseType;
}
public String getBuildNo()
public String getHouseType()
{
return buildNo;
return houseType;
}
public void setUnit(String unit)
public void setHouseArea(String houseArea)
{
this.unit = unit;
this.houseArea = houseArea;
}
public String getUnit()
public String getHouseArea()
{
return unit;
return houseArea;
}
public void setDoorNo(String doorNo)
public void setHouseProp(String houseProp)
{
this.doorNo = doorNo;
this.houseProp = houseProp;
}
public String getDoorNo()
public String getHouseProp()
{
return doorNo;
return houseProp;
}
public void setQnfs(String qnfs)
public void setQnfs(String qnfs)
{
this.qnfs = qnfs;
}
public String getQnfs()
public String getQnfs()
{
return qnfs;
}
public void setToiletType(String toiletType)
public void setToiletType(String toiletType)
{
this.toiletType = toiletType;
}
public String getToiletType()
public String getToiletType()
{
return toiletType;
}
public void setHouseIntro(String houseIntro)
public void setHouseIntro(String houseIntro)
{
this.houseIntro = houseIntro;
}
public String getHouseIntro()
public String getHouseIntro()
{
return houseIntro;
}
public void setHousePicture(String housePicture)
public void setHousePicture(String housePicture)
{
this.housePicture = housePicture;
}
public String getHousePicture()
public String getHousePicture()
{
return housePicture;
}
public void setDeptId(Long deptId)
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
public Long getDeptId()
{
return deptId;
}
public void setDeptName(String deptName)
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getDeptName()
public String getDeptName()
{
return deptName;
}
public void setUserId(Long userId)
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
public Long getUserId()
{
return userId;
}
@ -265,29 +278,30 @@ public class SzxcHouseInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ownerId", getOwnerId())
.append("ownerName", getOwnerName())
.append("cardId", getCardId())
.append("houseName", getHouseName())
.append("houseNo", getHouseNo())
.append("houseType", getHouseType())
.append("houseArea", getHouseArea())
.append("houseProp", getHouseProp())
.append("buildNo", getBuildNo())
.append("unit", getUnit())
.append("doorNo", getDoorNo())
.append("qnfs", getQnfs())
.append("toiletType", getToiletType())
.append("houseIntro", getHouseIntro())
.append("housePicture", getHousePicture())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("userId", getUserId())
.toString();
.append("id", getId())
.append("ownerId", getOwnerId())
.append("ownerName", getOwnerName())
.append("cardId", getCardId())
.append("xqId", getXqId())
.append("houseName", getHouseName())
.append("buildId", getBuildId())
.append("ldName", getLdName())
.append("unit", getUnit())
.append("doorNo", getDoorNo())
.append("houseType", getHouseType())
.append("houseArea", getHouseArea())
.append("houseProp", getHouseProp())
.append("qnfs", getQnfs())
.append("toiletType", getToiletType())
.append("houseIntro", getHouseIntro())
.append("housePicture", getHousePicture())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("userId", getUserId())
.toString();
}
}

@ -1,19 +1,20 @@
package com.ruoyi.szxc.mapper;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcHouseInfo;
import java.util.List;
/**
* Mapper
*
*
* @author hs
* @date 2024-03-15
* @date 2024-03-21
*/
public interface SzxcHouseInfoMapper
public interface SzxcHouseInfoMapper
{
/**
*
*
*
* @param id
* @return
*/
@ -21,7 +22,7 @@ public interface SzxcHouseInfoMapper
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -29,7 +30,7 @@ public interface SzxcHouseInfoMapper
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -37,7 +38,7 @@ public interface SzxcHouseInfoMapper
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -45,7 +46,7 @@ public interface SzxcHouseInfoMapper
/**
*
*
*
* @param id
* @return
*/
@ -53,7 +54,7 @@ public interface SzxcHouseInfoMapper
/**
*
*
*
* @param ids
* @return
*/

@ -1,19 +1,20 @@
package com.ruoyi.szxc.service;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcHouseInfo;
import java.util.List;
/**
* Service
*
*
* @author hs
* @date 2024-03-15
* @date 2024-03-21
*/
public interface ISzxcHouseInfoService
public interface ISzxcHouseInfoService
{
/**
*
*
*
* @param id
* @return
*/
@ -21,7 +22,7 @@ public interface ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -29,7 +30,7 @@ public interface ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -37,7 +38,7 @@ public interface ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -45,7 +46,7 @@ public interface ISzxcHouseInfoService
/**
*
*
*
* @param ids
* @return
*/
@ -53,7 +54,7 @@ public interface ISzxcHouseInfoService
/**
*
*
*
* @param id
* @return
*/

@ -1,28 +1,29 @@
package com.ruoyi.szxc.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcHouseInfoMapper;
import com.ruoyi.szxc.domain.SzxcHouseInfo;
import com.ruoyi.szxc.mapper.SzxcHouseInfoMapper;
import com.ruoyi.szxc.service.ISzxcHouseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
*
* @author hs
* @date 2024-03-15
* @date 2024-03-21
*/
@Service
public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
{
@Autowired
private SzxcHouseInfoMapper szxcHouseInfoMapper;
/**
*
*
*
* @param id
* @return
*/
@ -34,7 +35,7 @@ public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -46,7 +47,7 @@ public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -59,7 +60,7 @@ public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
/**
*
*
*
* @param szxcHouseInfo
* @return
*/
@ -72,7 +73,7 @@ public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
/**
*
*
*
* @param ids
* @return
*/
@ -84,7 +85,7 @@ public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService
/**
*
*
*
* @param id
* @return
*/

@ -1,22 +1,23 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcHouseInfoMapper">
<resultMap type="SzxcHouseInfo" id="SzxcHouseInfoResult">
<result property="id" column="id" />
<result property="ownerId" column="owner_id" />
<result property="ownerName" column="owner_name" />
<result property="cardId" column="card_id" />
<result property="xqId" column="xq_id" />
<result property="houseName" column="house_name" />
<result property="houseNo" column="house_no" />
<result property="buildId" column="build_id" />
<result property="ldName" column="ld_name" />
<result property="unit" column="unit" />
<result property="doorNo" column="door_no" />
<result property="houseType" column="house_type" />
<result property="houseArea" column="house_area" />
<result property="houseProp" column="house_prop" />
<result property="buildNo" column="build_no" />
<result property="unit" column="unit" />
<result property="doorNo" column="door_no" />
<result property="qnfs" column="qnfs" />
<result property="toiletType" column="toilet_type" />
<result property="houseIntro" column="house_intro" />
@ -31,23 +32,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSzxcHouseInfoVo">
select id, owner_id, owner_name, card_id, house_name, house_no, house_type, house_area, house_prop, build_no, unit, door_no, qnfs, toilet_type, house_intro, house_picture, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_house_info
select id, owner_id, owner_name, card_id, xq_id, house_name, build_id, ld_name, unit, door_no, house_type, house_area, house_prop, qnfs, toilet_type, house_intro, house_picture, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_house_info
</sql>
<select id="selectSzxcHouseInfoList" parameterType="SzxcHouseInfo" resultMap="SzxcHouseInfoResult">
<include refid="selectSzxcHouseInfoVo"/>
<where>
<where>
<if test="ownerId != null "> and owner_id = #{ownerId}</if>
<if test="ownerName != null and ownerName != ''"> and owner_name like concat('%', #{ownerName}, '%')</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="xqId != null "> and xq_id = #{xqId}</if>
<if test="houseName != null and houseName != ''"> and house_name like concat('%', #{houseName}, '%')</if>
<if test="houseNo != null and houseNo != ''"> and house_no = #{houseNo}</if>
<if test="buildId != null "> and build_id = #{buildId}</if>
<if test="ldName != null and ldName != ''"> and ld_name like concat('%', #{ldName}, '%')</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="doorNo != null and doorNo != ''"> and door_no = #{doorNo}</if>
<if test="houseType != null and houseType != ''"> and house_type = #{houseType}</if>
<if test="houseArea != null and houseArea != ''"> and house_area = #{houseArea}</if>
<if test="houseProp != null and houseProp != ''"> and house_prop = #{houseProp}</if>
<if test="buildNo != null and buildNo != ''"> and build_no = #{buildNo}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="doorNo != null and doorNo != ''"> and door_no = #{doorNo}</if>
<if test="qnfs != null and qnfs != ''"> and qnfs = #{qnfs}</if>
<if test="toiletType != null and toiletType != ''"> and toilet_type = #{toiletType}</if>
<if test="houseIntro != null and houseIntro != ''"> and house_intro = #{houseIntro}</if>
@ -57,26 +59,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null "> and user_id = #{userId}</if>
</where>
</select>
<select id="selectSzxcHouseInfoById" parameterType="Long" resultMap="SzxcHouseInfoResult">
<include refid="selectSzxcHouseInfoVo"/>
where id = #{id}
</select>
<insert id="insertSzxcHouseInfo" parameterType="SzxcHouseInfo" useGeneratedKeys="true" keyProperty="id">
insert into szxc_house_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ownerId != null">owner_id,</if>
<if test="ownerName != null and ownerName != ''">owner_name,</if>
<if test="cardId != null">card_id,</if>
<if test="xqId != null">xq_id,</if>
<if test="houseName != null and houseName != ''">house_name,</if>
<if test="houseNo != null">house_no,</if>
<if test="buildId != null">build_id,</if>
<if test="ldName != null">ld_name,</if>
<if test="unit != null">unit,</if>
<if test="doorNo != null">door_no,</if>
<if test="houseType != null">house_type,</if>
<if test="houseArea != null">house_area,</if>
<if test="houseProp != null">house_prop,</if>
<if test="buildNo != null">build_no,</if>
<if test="unit != null">unit,</if>
<if test="doorNo != null">door_no,</if>
<if test="qnfs != null">qnfs,</if>
<if test="toiletType != null">toilet_type,</if>
<if test="houseIntro != null">house_intro,</if>
@ -88,19 +91,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="userId != null">user_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ownerId != null">#{ownerId},</if>
<if test="ownerName != null and ownerName != ''">#{ownerName},</if>
<if test="cardId != null">#{cardId},</if>
<if test="xqId != null">#{xqId},</if>
<if test="houseName != null and houseName != ''">#{houseName},</if>
<if test="houseNo != null">#{houseNo},</if>
<if test="buildId != null">#{buildId},</if>
<if test="ldName != null">#{ldName},</if>
<if test="unit != null">#{unit},</if>
<if test="doorNo != null">#{doorNo},</if>
<if test="houseType != null">#{houseType},</if>
<if test="houseArea != null">#{houseArea},</if>
<if test="houseProp != null">#{houseProp},</if>
<if test="buildNo != null">#{buildNo},</if>
<if test="unit != null">#{unit},</if>
<if test="doorNo != null">#{doorNo},</if>
<if test="qnfs != null">#{qnfs},</if>
<if test="toiletType != null">#{toiletType},</if>
<if test="houseIntro != null">#{houseIntro},</if>
@ -112,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="userId != null">#{userId},</if>
</trim>
</trim>
</insert>
<update id="updateSzxcHouseInfo" parameterType="SzxcHouseInfo">
@ -121,14 +125,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerId != null">owner_id = #{ownerId},</if>
<if test="ownerName != null and ownerName != ''">owner_name = #{ownerName},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="xqId != null">xq_id = #{xqId},</if>
<if test="houseName != null and houseName != ''">house_name = #{houseName},</if>
<if test="houseNo != null">house_no = #{houseNo},</if>
<if test="buildId != null">build_id = #{buildId},</if>
<if test="ldName != null">ld_name = #{ldName},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="doorNo != null">door_no = #{doorNo},</if>
<if test="houseType != null">house_type = #{houseType},</if>
<if test="houseArea != null">house_area = #{houseArea},</if>
<if test="houseProp != null">house_prop = #{houseProp},</if>
<if test="buildNo != null">build_no = #{buildNo},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="doorNo != null">door_no = #{doorNo},</if>
<if test="qnfs != null">qnfs = #{qnfs},</if>
<if test="toiletType != null">toilet_type = #{toiletType},</if>
<if test="houseIntro != null">house_intro = #{houseIntro},</if>
@ -149,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteSzxcHouseInfoByIds" parameterType="String">
delete from szxc_house_info where id in
delete from szxc_house_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -25,42 +25,34 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋名称" prop="houseName">
<el-form-item label="小区id" prop="xqId">
<el-input
v-model="queryParams.houseName"
placeholder="请输入房屋名称"
v-model="queryParams.xqId"
placeholder="请输入小区id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房号" prop="houseNo">
<el-form-item label="小区名称" prop="houseName">
<el-input
v-model="queryParams.houseNo"
placeholder="请输入房号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input
v-model="queryParams.houseArea"
placeholder="请输入房屋面积"
v-model="queryParams.houseName"
placeholder="请输入小区名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-form-item label="楼栋id" prop="buildId">
<el-input
v-model="queryParams.houseProp"
placeholder="请输入房屋性质"
v-model="queryParams.buildId"
placeholder="请输入楼栋id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="楼栋" prop="buildNo">
<el-form-item label="楼栋名称" prop="ldName">
<el-input
v-model="queryParams.buildNo"
placeholder="请输入楼栋"
v-model="queryParams.ldName"
placeholder="请输入楼栋名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -81,6 +73,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input
v-model="queryParams.houseArea"
placeholder="请输入房屋面积"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-input
v-model="queryParams.houseProp"
placeholder="请输入房屋性质"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="取暖方式" prop="qnfs">
<el-input
v-model="queryParams.qnfs"
@ -187,14 +195,15 @@
<el-table-column label="居民id" align="center" prop="ownerId" />
<el-table-column label="户主姓名" align="center" prop="ownerName" />
<el-table-column label="身份证号" align="center" prop="cardId" />
<el-table-column label="房屋名称" align="center" prop="houseName" />
<el-table-column label="房号" align="center" prop="houseNo" />
<el-table-column label="小区id" align="center" prop="xqId" />
<el-table-column label="小区名称" align="center" prop="houseName" />
<el-table-column label="楼栋id" align="center" prop="buildId" />
<el-table-column label="楼栋名称" align="center" prop="ldName" />
<el-table-column label="单元" align="center" prop="unit" />
<el-table-column label="门牌号" align="center" prop="doorNo" />
<el-table-column label="房屋类型" align="center" prop="houseType" />
<el-table-column label="房屋面积" align="center" prop="houseArea" />
<el-table-column label="房屋性质" align="center" prop="houseProp" />
<el-table-column label="楼栋" align="center" prop="buildNo" />
<el-table-column label="单元" align="center" prop="unit" />
<el-table-column label="门牌号" align="center" prop="doorNo" />
<el-table-column label="取暖方式" align="center" prop="qnfs" />
<el-table-column label="厕所类型" align="center" prop="toiletType" />
<el-table-column label="房屋简介" align="center" prop="houseIntro" />
@ -221,7 +230,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -242,20 +251,17 @@
<el-form-item label="身份证号" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="房屋名称" prop="houseName">
<el-input v-model="form.houseName" placeholder="请输入房屋名称" />
</el-form-item>
<el-form-item label="房号" prop="houseNo">
<el-input v-model="form.houseNo" placeholder="请输入房号" />
<el-form-item label="小区id" prop="xqId">
<el-input v-model="form.xqId" placeholder="请输入小区id" />
</el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input v-model="form.houseArea" placeholder="请输入房屋面积" />
<el-form-item label="小区名称" prop="houseName">
<el-input v-model="form.houseName" placeholder="请输入小区名称" />
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-input v-model="form.houseProp" placeholder="请输入房屋性质" />
<el-form-item label="楼栋id" prop="buildId">
<el-input v-model="form.buildId" placeholder="请输入楼栋id" />
</el-form-item>
<el-form-item label="楼栋" prop="buildNo">
<el-input v-model="form.buildNo" placeholder="请输入楼栋" />
<el-form-item label="楼栋名称" prop="ldName">
<el-input v-model="form.ldName" placeholder="请输入楼栋名称" />
</el-form-item>
<el-form-item label="单元" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单元" />
@ -263,6 +269,12 @@
<el-form-item label="门牌号" prop="doorNo">
<el-input v-model="form.doorNo" placeholder="请输入门牌号" />
</el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input v-model="form.houseArea" placeholder="请输入房屋面积" />
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-input v-model="form.houseProp" placeholder="请输入房屋性质" />
</el-form-item>
<el-form-item label="取暖方式" prop="qnfs">
<el-input v-model="form.qnfs" placeholder="请输入取暖方式" />
</el-form-item>
@ -291,184 +303,186 @@
</template>
<script>
import { listHouseinfo, getHouseinfo, delHouseinfo, addHouseinfo, updateHouseinfo } from "@/api/szxc/houseinfo";
import { listHouseinfo, getHouseinfo, delHouseinfo, addHouseinfo, updateHouseinfo } from "@/api/szxc/houseinfo";
export default {
name: "Houseinfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
houseinfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ownerId: null,
ownerName: null,
cardId: null,
houseName: null,
houseNo: null,
houseType: null,
houseArea: null,
houseProp: null,
buildNo: null,
unit: null,
doorNo: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: null,
deptId: null,
deptName: null,
userId: null
},
//
form: {},
//
rules: {
ownerName: [
{ required: true, message: "户主姓名不能为空", trigger: "blur" }
],
houseName: [
{ required: true, message: "房屋名称不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询房屋信息列表 */
getList() {
this.loading = true;
listHouseinfo(this.queryParams).then(response => {
this.houseinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
ownerId: null,
ownerName: null,
cardId: null,
houseName: null,
houseNo: null,
houseType: null,
houseArea: null,
houseProp: null,
buildNo: null,
unit: null,
doorNo: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
deptId: null,
deptName: null,
userId: null
export default {
name: "Houseinfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
houseinfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ownerId: null,
ownerName: null,
cardId: null,
xqId: null,
houseName: null,
buildId: null,
ldName: null,
unit: null,
doorNo: null,
houseType: null,
houseArea: null,
houseProp: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: null,
deptId: null,
deptName: null,
userId: null
},
//
form: {},
//
rules: {
ownerName: [
{ required: true, message: "户主姓名不能为空", trigger: "blur" }
],
houseName: [
{ required: true, message: "小区名称不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
}
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
created() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加房屋信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getHouseinfo(id).then(response => {
this.form = response.data;
methods: {
/** 查询房屋信息列表 */
getList() {
this.loading = true;
listHouseinfo(this.queryParams).then(response => {
this.houseinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
ownerId: null,
ownerName: null,
cardId: null,
xqId: null,
houseName: null,
buildId: null,
ldName: null,
unit: null,
doorNo: null,
houseType: null,
houseArea: null,
houseProp: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
deptId: null,
deptName: null,
userId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "修改房屋信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateHouseinfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHouseinfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.title = "添加房屋信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getHouseinfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改房屋信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateHouseinfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHouseinfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除房屋信息编号为"' + ids + '"的数据项?').then(function() {
return delHouseinfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/houseinfo/export', {
...this.queryParams
}, `houseinfo_${new Date().getTime()}.xlsx`)
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除房屋信息编号为"' + ids + '"的数据项?').then(function() {
return delHouseinfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/houseinfo/export', {
...this.queryParams
}, `houseinfo_${new Date().getTime()}.xlsx`)
}
}
}
};
};
</script>

Loading…
Cancel
Save