update 前端页面字段更新

add 登记页面读取信息接口
This commit is contained in:
2021-06-02 14:29:57 +08:00
parent 1488a0ef2d
commit 6e87e8add7
17 changed files with 985 additions and 92 deletions

View File

@@ -358,7 +358,7 @@ namespace Ewide.Application
/// </summary>
[Comment("竣工验收备案")]
[MaxLength(2000)]
public string CompletionRecord { get; set; }
public string CompletedRecord { get; set; }
/// <summary>
/// 监理资料

View File

@@ -269,7 +269,7 @@
规划许可
</summary>
</member>
<member name="P:Ewide.Application.BsHouseInfo.CompletionRecord">
<member name="P:Ewide.Application.BsHouseInfo.CompletedRecord">
<summary>
竣工验收备案
</summary>
@@ -539,7 +539,22 @@
是否选中
</summary>
</member>
<member name="F:Ewide.Application.ZoneRole.ZoneManager">
<member name="F:Ewide.Application.HouseManagerRole.CityManager">
<summary>
市住建部门
</summary>
</member>
<member name="F:Ewide.Application.HouseManagerRole.AreaManager">
<summary>
区住建部门
</summary>
</member>
<member name="F:Ewide.Application.HouseManagerRole.RoadManager">
<summary>
街道管理员
</summary>
</member>
<member name="F:Ewide.Application.HouseManagerRole.ZoneManager">
<summary>
片区监管员
</summary>
@@ -561,6 +576,11 @@
<param name="projectId"></param>
<returns></returns>
</member>
<member name="T:Ewide.Application.Service.HouseSafety.HouseInfo.HouseInfoService">
<summary>
房屋详细信息
</summary>
</member>
<member name="M:Ewide.Application.Service.HouseMemberService.QueryMemberPageList(Ewide.Core.Service.UserInput)">
<summary>
分页查询用户
@@ -749,6 +769,227 @@
<param name="userId"></param>
<returns></returns>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.TotalArea">
<summary>
总建筑面积
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.HouseHolds">
<summary>
总户数(户)
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.Units">
<summary>
房屋单元数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.UnitFloorHolds">
<summary>
各单元每层户数(户)
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.TotalFloor">
<summary>
总层数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandFloorCount">
<summary>
地上层数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandBsFloorStart">
<summary>
地上商业层数开始
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandBsFloorEnd">
<summary>
地上商业层数结束
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandBikeFloorStart">
<summary>
地上车棚层开始
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandResidenceFloorStart">
<summary>
地上住宅层开始
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.LandResidenceFloorEnd">
<summary>
地上住宅层结束
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.UnderFloorCount">
<summary>
地下层数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.PropertyRights">
<summary>
产权性质
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.HouseCount">
<summary>
总共套数
</summary>
</member>
<!-- Badly formed XML comment ignored for member "P:Ewide.Application.HouseInfoOutput.StraightHouseCount" -->
<member name="P:Ewide.Application.HouseInfoOutput.SelfHouseCount">
<summary>
自管公房套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.PrivateHouseCount">
<summary>
私房套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.BusinessCount">
<summary>
商品房套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.ChangeHouseCount">
<summary>
房改房套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.ResettlementHouseCount">
<summary>
拆迁安置房套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.OtherCount">
<summary>
其它套数
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.HouseSite">
<summary>
房屋场地
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.AdjacentConstruction">
<summary>
相邻施工
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.ChemicalErosion">
<summary>
化学侵蚀
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.StructuralDismantling">
<summary>
结构拆改
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.AddingLayer">
<summary>
加层改造
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.RepairAndReinforce">
<summary>
修缮加固
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.HistoricalCalamity">
<summary>
历史灾害
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.FunctionalChange">
<summary>
使用功能变更
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.OtherContents">
<summary>
其他调查内容
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.HouseLevel">
<summary>
房屋等级 1,2,3,4,C,d
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.UsedStatus">
<summary>
房屋使用状态
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.DrawingMaterial">
<summary>
图纸资料存档处
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.DrawingMaterialText">
<summary>
其他图纸存档
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.AnEntryDocument">
<summary>
立项文件
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.PlanningPermission">
<summary>
规划许可
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.CompletedRecord">
<summary>
竣工验收备案
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.MonitorDocument">
<summary>
监理资料
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.IdentificationReport">
<summary>
鉴定报告
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.OtherDocument">
<summary>
其它资料
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.FacadePhoto">
<summary>
外立面照片
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.InvestigateAgency">
<summary>
调查登记机构
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.InvestigateUser">
<summary>
纸质资料调查人
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.OfflineAuditor">
<summary>
纸质资料审核人
</summary>
</member>
<member name="P:Ewide.Application.HouseInfoOutput.CompetentDepartment">
<summary>
主管部门
</summary>
</member>
<member name="P:Ewide.Application.HouseTaskInput.SettlementTilt">
<summary>
沉降倾斜

View File

@@ -5,19 +5,23 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ewide.Application.Service.HouseCode.Dto
namespace Ewide.Application
{
public class HouseCodeOutput : PageInputBase
public class HouseCodeOutput
{
public string HouseCode { get; set; }
public string Id { get; set; }
public string Address { get; set; }
public string ProjectId { get; set; }
public string ZoonId { get; set; }
public string ZoneId { get; set; }
public int Type { get; set; }
public int ProjectFullName { get; set; }
public int ProjectName { get; set; }
public int AreaName { get; set; }
public int RoadName { get; set; }
public int CommName { get; set; }
public string AreaName { get; set; }
public string RoadName { get; set; }
public string CommName { get; set; }
public string ZoneName { get; set; }
public string ProjectNote { get; set; }
public string ProjectFullName { get; set; }
public string HouseCode { get; set; }
public string Lng { get; set; }
public string Lat { get; set; }
}
}

View File

@@ -1,5 +1,4 @@
using Ewide.Application.Entity;
using Ewide.Application.Service.HouseCode.Dto;
using Ewide.Core;
using Furion.DatabaseAccessor;
using Furion.DatabaseAccessor.Extensions;

View File

@@ -1,5 +1,4 @@
using Ewide.Application.Service.HouseCode.Dto;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Ewide.Application
{
class HouseInfoInput
public class HouseInfoInput
{
}
}

View File

@@ -6,7 +6,285 @@ using System.Threading.Tasks;
namespace Ewide.Application
{
public class HouseInfoOutput
public class HouseInfoOutput
{
#region building
public string BuildingName { get; set; }
public int? LandAttribute { get; set; }
public int? StructureType { get; set; }
public int? SeismicGrade { get; set; }
public int? BaseInfo { get; set; }
public string InsulationMaterial { get; set; }
public string WallMaterial { get; set; }
public string FireproofGrade { get; set; }
public int? CurtainWall { get; set; }
public int? FaceBrick { get; set; }
public int? WhiteWash { get; set; }
public int? Coating { get; set; }
public string Elevator { get; set; }
public DateTime? CompletedDate { get; set; }
public int? UsefulYear { get; set; }
/// <summary>
/// 总建筑面积
/// </summary>
public float? TotalArea { get; set; }
/// <summary>
/// 总户数(户)
/// </summary>
public int? HouseHolds { get; set; }
/// <summary>
/// 房屋单元数
/// </summary>
public int? Units { get; set; }
/// <summary>
/// 各单元每层户数(户)
/// </summary>
public int? UnitFloorHolds { get; set; }
/// <summary>
/// 总层数
/// </summary>
public int? TotalFloor { get; set; }
/// <summary>
/// 地上层数
/// </summary>
public int? LandFloorCount { get; set; }
/// <summary>
/// 地上商业层数开始
/// </summary>
public int? LandBsFloorStart { get; set; }
/// <summary>
/// 地上商业层数结束
/// </summary>
public int? LandBsFloorEnd { get; set; }
/// <summary>
/// 地上车棚层开始
/// </summary>
public int? LandBikeFloorStart { get; set; }
/// <summary>
/// 地上住宅层开始
/// </summary>
public int? LandResidenceFloorStart { get; set; }
/// <summary>
/// 地上住宅层结束
/// </summary>
public int? LandResidenceFloorEnd { get; set; }
/// <summary>
/// 地下层数
/// </summary>
public int? UnderFloorCount { get; set; }
#endregion
#region ownership
/// <summary>
/// 产权性质
/// </summary>
public string PropertyRights { get; set; }
/// <summary>
/// 总共套数
/// </summary>
public int? HouseCount { get; set; }
/// 直管公房套数
/// </summary>
public int? StraightHouseCount { get; set; }
/// <summary>
/// 自管公房套数
/// </summary>
public int? SelfHouseCount { get; set; }
/// <summary>
/// 私房套数
/// </summary>
public int? PrivateHouseCount { get; set; }
/// <summary>
/// 商品房套数
/// </summary>
public int? BusinessCount { get; set; }
/// <summary>
/// 房改房套数
/// </summary>
public int? ChangeHouseCount { get; set; }
/// <summary>
/// 拆迁安置房套数
/// </summary>
public int? ResettlementHouseCount { get; set; }
/// <summary>
/// 其它套数
/// </summary>
public int? OtherCount { get; set; }
#endregion
#region manager
#endregion
#region investigation
/// <summary>
/// 房屋场地
/// </summary>
public string HouseSite { get; set; }
/// <summary>
/// 相邻施工
/// </summary>
public string AdjacentConstruction { get; set; }
/// <summary>
/// 化学侵蚀
/// </summary>
public string ChemicalErosion { get; set; }
/// <summary>
/// 结构拆改
/// </summary>
public int? StructuralDismantling { get; set; }
/// <summary>
/// 加层改造
/// </summary>
public int? AddingLayer { get; set; }
/// <summary>
/// 修缮加固
/// </summary>
public string RepairAndReinforce { get; set; }
/// <summary>
/// 历史灾害
/// </summary>
public string HistoricalCalamity { get; set; }
/// <summary>
/// 使用功能变更
/// </summary>
public string FunctionalChange { get; set; }
/// <summary>
/// 其他调查内容
/// </summary>
public string OtherContents { get; set; }
#endregion
#region identification
/// <summary>
/// 房屋等级 1,2,3,4,C,d
/// </summary>
public int? HouseLevel { get; set; }
/// <summary>
/// 房屋使用状态
/// </summary>
public int? UsedStatus { get; set; }
#endregion
#region drawing
/// <summary>
/// 图纸资料存档处
/// </summary>
public string DrawingMaterial { get; set; }
/// <summary>
/// 其他图纸存档
/// </summary>
public string DrawingMaterialText { get; set; }
#endregion
#region attachments
/// <summary>
/// 立项文件
/// </summary>
public string AnEntryDocument { get; set; }
/// <summary>
/// 规划许可
/// </summary>
public string PlanningPermission { get; set; }
/// <summary>
/// 竣工验收备案
/// </summary>
public string CompletedRecord { get; set; }
/// <summary>
/// 监理资料
/// </summary>
public string MonitorDocument { get; set; }
/// <summary>
/// 鉴定报告
/// </summary>
public string IdentificationReport { get; set; }
/// <summary>
/// 其它资料
/// </summary>
public string OtherDocument { get; set; }
#endregion
#region aspect
/// <summary>
/// 外立面照片
/// </summary>
public string FacadePhoto { get; set; }
#endregion
#region unit
/// <summary>
/// 调查登记机构
/// </summary>
public string InvestigateAgency { get; set; }
/// <summary>
/// 纸质资料调查人
/// </summary>
public string InvestigateUser { get; set; }
/// <summary>
/// 纸质资料审核人
/// </summary>
public string OfflineAuditor { get; set; }
/// <summary>
/// 主管部门
/// </summary>
public string CompetentDepartment { get; set; }
#endregion
}
public class HouseInfoOutputForDetailPage
{
#region header
public HouseCodeOutput houseCode { get; set; }
#endregion
public HouseInfoOutput houseInfoOutput { get; set; }
public PatrolInfo PatrolInfo { get; set; }
}
public class PatrolInfo
{
public DateTime? PatrolDate { get; set; }
public string PatrolUser { get; set; }
}
}

View File

@@ -1,8 +1,12 @@
using Dapper;
using Ewide.Core;
using Furion.DatabaseAccessor;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -12,21 +16,67 @@ using System.Threading.Tasks;
namespace Ewide.Application.Service.HouseSafety.HouseInfo
{
/// <summary>
/// 房屋详细信息
/// </summary>
[ApiDescriptionSettings(Name = "HouseInfo", Order = 200)]
public class HouseInfoService : IHouseInfoService, IDynamicApiController, ITransient
{
private readonly IRepository<BsHouseCode> _houseCodeRep;
private readonly IRepository<BsHouseInfo> _houseInfoRep;
private readonly IUserManager _userManager;
private readonly IDapperRepository _dapperRepository;
public HouseInfoService(IRepository<BsHouseInfo> HouseInfoRep, IDapperRepository dapperRepository)
public HouseInfoService(IRepository<BsHouseCode> HouseCodeRep,IRepository<BsHouseInfo> HouseInfoRep, IUserManager userManager, IDapperRepository dapperRepository)
{
_houseCodeRep = HouseCodeRep;
_houseInfoRep = HouseInfoRep;
_userManager = userManager;
_dapperRepository = dapperRepository;
}
//[HttpGet("/houseInfo/getByTaskId")]
//public async Task<HouseInfoOutput> GetByTaskId([Required] string taskId)
//{
[HttpGet("/houseInfo/getByTaskId")]
[AllowAnonymous]
public async Task<HouseInfoOutputForDetailPage> GetByTaskId([Required] string taskId)
{
var houseTaskRep = Db.GetRepository<BsHouseTask>();
var houseTask = await houseTaskRep.DetachedEntities.FirstOrDefaultAsync(t=>t.Id == taskId);
if(houseTask == null) throw Oops.Oh("任务不存在");
//}
var houseCodeOutputAsync = await _dapperRepository.QueryAsync<HouseCodeOutput>(
@"SELECT HC.Id,HC.Address,HC.ProjectId,HC.ZoneId,HC.Type,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.Note ProjectNote,CONCAT(Proj.Name,'(',Proj.Note,')') ProjectFullName,HC.HouseCode,HC.Lng,HC.Lat FROM bs_house_code HC
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode
LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9)
LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)
WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
);
var houseCodeOutput= houseCodeOutputAsync.SingleOrDefault();
if (houseCodeOutput == null) throw Oops.Oh("任务已失效:房屋编码不存在");
var currentUser = await _userManager.CheckUserAsync();
var houseInfo = await _houseInfoRep.DetachedEntities.FirstOrDefaultAsync(h => h.HouseCodeId == houseTask.HouseCodeId);
var houseInfoOutputForDetailPage = new HouseInfoOutputForDetailPage
{
houseCode = houseCodeOutput
};
houseInfoOutputForDetailPage.PatrolInfo = new PatrolInfo();
houseInfoOutputForDetailPage.PatrolInfo.PatrolDate = houseTask.PatrolDate.GetValueOrDefault(DateTime.Now);
houseInfoOutputForDetailPage.PatrolInfo.PatrolUser = String.IsNullOrEmpty(houseTask.PatrolUser) ? currentUser.Name : houseTask.PatrolUser;
if (houseInfo == null)
{
houseInfoOutputForDetailPage.houseInfoOutput = new HouseInfoOutput();
return houseInfoOutputForDetailPage;
}
var houseInfoOutputAsync = await _dapperRepository.QueryAsync<HouseInfoOutput>("SELECT * FROM bs_house_info HI WHERE Id = @HouseCodeId", new { houseTask.HouseCodeId });
var houseInfoOutput = houseInfoOutputAsync.SingleOrDefault();
houseInfoOutputForDetailPage.houseInfoOutput = houseInfoOutput;
return houseInfoOutputForDetailPage;
}
}
}

View File

@@ -8,6 +8,6 @@ namespace Ewide.Application.Service
{
public interface IHouseInfoService
{
//async Task<HouseInfoOutput> GetByTaskId(string taskId);
Task<HouseInfoOutputForDetailPage> GetByTaskId(string taskId);
}
}

View File

@@ -46,12 +46,12 @@
</a-col>
<a-col :span="24">
<a-form-model-item class="ant-row-flex" label="竣工验收备案" prop="completionRecord">
<a-form-model-item class="ant-row-flex" label="竣工验收备案" prop="completedRecord">
<a-upload
:custom-request="onFileUpload"
:file-list="form.completionRecord"
:file-list="form.completedRecord"
:showUploadList=" { showRemoveIcon: true, showDownloadIcon: true }"
@change="(data) => onFileChange(data, 'completionRecord')"
@change="(data) => onFileChange(data, 'completedRecord')"
@download="onFileDownload"
>
<a-button icon="upload" type="dashed">上传竣工验收备案</a-button>
@@ -60,12 +60,12 @@
</a-col>
<a-col :span="24">
<a-form-model-item class="ant-row-flex" label="监理文件" prop="monitor">
<a-form-model-item class="ant-row-flex" label="监理文件" prop="monitorDocument">
<a-upload
:custom-request="onFileUpload"
:file-list="form.monitor"
:file-list="form.monitorDocument"
:showUploadList=" { showRemoveIcon: true, showDownloadIcon: true }"
@change="(data) => onFileChange(data, 'monitor')"
@change="(data) => onFileChange(data, 'monitorDocument')"
@download="onFileDownload"
>
<a-button icon="upload" type="dashed">上传监理文件</a-button>

View File

@@ -15,28 +15,23 @@
<a-spin :spinning="loading">
<a-icon slot="indicator" spin type="loading" />
<a-row :gutter="16" type="flex">
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="项目名称" prop="projectName">
<a-input name="projectName" placeholder="请输入项目名称" v-model="form.projectName" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="幢名称" prop="buildingName">
<a-input placeholder="请输入幢名称" v-model="form.buildingName" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="坐落地址" prop="address">
<a-input placeholder="请输入坐落地址" v-model="form.address" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item class="ant-row-flex" label="土地性质" prop="natureLand">
<a-radio-group button-style="solid" v-model="form.natureLand">
<a-form-model-item class="ant-row-flex" label="土地性质" prop="landAttribute">
<a-radio-group button-style="solid" v-model="form.landAttribute">
<a-radio-button
:key="item.code"
:value="item.code"
v-for="item in codes.natureLand"
v-for="item in codes.landAttribute"
>{{ item.value }}</a-radio-button>
</a-radio-group>
</a-form-model-item>
@@ -198,14 +193,14 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item class="ant-row-flex" label="设计使用年限" prop="useYear">
<a-form-model-item class="ant-row-flex" label="设计使用年限" prop="usefulYear">
<a-row type="flex">
<a-col flex="1">
<a-input-number
:min="0"
class="w-100-p"
placeholder="请输入设计使用年限"
v-model="form.useYear"
v-model="form.usefulYear"
/>
</a-col>
<a-col>
@@ -215,14 +210,14 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item class="ant-row-flex" label="总建筑面积" prop="areaCount">
<a-form-model-item class="ant-row-flex" label="总建筑面积" prop="totalArea">
<a-row type="flex">
<a-col flex="1">
<a-input-number
:min="0"
class="w-100-p"
placeholder="请输入总建筑面积"
v-model="form.areaCount"
v-model="form.totalArea"
/>
</a-col>
<a-col>
@@ -268,7 +263,7 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item class="ant-row-flex" label="每层每单元户数" prop="unitHouseholds">
<a-form-model-item class="ant-row-flex" label="每层每单元户数" prop="unitFloorHolds">
<a-row type="flex">
<a-col flex="1">
<a-input-number
@@ -276,7 +271,7 @@
:step="1"
class="w-100-p"
placeholder="请输入每层每单元户数"
v-model="form.unitHouseholds"
v-model="form.unitFloorHolds"
/>
</a-col>
<a-col>
@@ -317,7 +312,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item class="ant-row-flex ant-form-inline mb-none" label="建筑层数">
<a-form-model-item :colon="false" class="ant-row-flex" label="地上" prop="landLevelCount">
<a-form-model-item :colon="false" class="ant-row-flex" label="地上" prop="landFloorCount">
<a-row type="flex">
<a-col flex="1">
<a-input-number
@@ -325,7 +320,7 @@
:step="1"
class="w-100-p"
placeholder="请输入地上层"
v-model="form.landLevelCount"
v-model="form.landFloorCount"
/>
</a-col>
<a-col>
@@ -337,7 +332,7 @@
:colon="false"
class="ant-row-flex"
label="地下"
prop="undergroundLevelCount"
prop="underFloorCount"
>
<a-row type="flex">
<a-col flex="1">
@@ -346,7 +341,7 @@
:step="1"
class="w-100-p"
placeholder="请输入地下层"
v-model="form.undergroundLevelCount"
v-model="form.underFloorCount"
/>
</a-col>
<a-col>
@@ -354,7 +349,7 @@
</a-col>
</a-row>
</a-form-model-item>
<a-form-model-item :colon="false" class="ant-row-flex" label="总共" prop="levelCount">
<a-form-model-item :colon="false" class="ant-row-flex" label="总共" prop="totalFloor">
<a-row type="flex">
<a-col flex="1">
<a-input-number
@@ -363,7 +358,7 @@
class="w-100-p"
disabled
placeholder="请输入总层数"
v-model="form.levelCount"
v-model="form.totalFloor"
/>
</a-col>
<a-col>
@@ -379,12 +374,12 @@
<span class="yo-addon">地上第</span>
</a-col>
<a-col flex="1">
<a-form-model-item class="mr-none" prop="landBusiness1">
<a-form-model-item class="mr-none" prop="landBsFloorStart">
<a-input-number
:min="0"
:step="1"
placeholder="几"
v-model="form.landBusiness1"
v-model="form.landBsFloorStart"
/>
</a-form-model-item>
</a-col>
@@ -392,12 +387,12 @@
<span class="yo-addon"></span>
</a-col>
<a-col flex="1">
<a-form-model-item class="mr-none" prop="landBusiness2">
<a-form-model-item class="mr-none" prop="landBsFloorEnd">
<a-input-number
:min="0"
:step="1"
placeholder="几"
v-model="form.landBusiness2"
v-model="form.landBsFloorEnd"
/>
</a-form-model-item>
</a-col>
@@ -412,12 +407,12 @@
<span class="yo-addon">地上</span>
</a-col>
<a-col flex="1">
<a-form-model-item class="mr-none" prop="landBikeshed1">
<a-form-model-item class="mr-none" prop="landBikeFloorStart">
<a-input-number
:min="0"
:step="1"
placeholder="几"
v-model="form.landBikeshed1"
v-model="form.landBikeFloorStart"
/>
</a-form-model-item>
</a-col>
@@ -432,12 +427,12 @@
<span class="yo-addon">地上第</span>
</a-col>
<a-col flex="1">
<a-form-model-item class="mr-none" prop="landResidence1">
<a-form-model-item class="mr-none" prop="landResidenceFloorStart">
<a-input-number
:min="0"
:step="1"
placeholder="几"
v-model="form.landResidence1"
v-model="form.landResidenceFloorStart"
/>
</a-form-model-item>
</a-col>
@@ -445,12 +440,12 @@
<span class="yo-addon"></span>
</a-col>
<a-col flex="1">
<a-form-model-item class="mr-none" prop="landResidence2">
<a-form-model-item class="mr-none" prop="landResidenceFloorEnd">
<a-input-number
:min="0"
:step="1"
placeholder="几"
v-model="form.landResidence2"
v-model="form.landResidenceFloorEnd"
/>
</a-form-model-item>
</a-col>
@@ -473,10 +468,10 @@ const defaultForm = {
axisX: '',
axisY: '',
curtainWall: '1',
faceBrick: true,
whiteWash: true,
coating: true,
curtainWall: '0',
faceBrick: false,
whiteWash: false,
coating: false,
};
export default {
@@ -495,7 +490,7 @@ export default {
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
buildingName: [{ required: true, message: '请输入幢名称', trigger: 'blur' }],
address: [{ required: true, message: '请输入坐落地址', trigger: 'blur' }],
natureLand: [{ required: true, message: '请选择土地性质', trigger: 'blur' }],
landAttribute: [{ required: true, message: '请选择土地性质', trigger: 'blur' }],
axisX: [{ required: true, message: '请在地图上选择坐标', trigger: 'blur' }],
axisY: [{ required: true, message: '请在地图上选择坐标', trigger: 'blur' }],
structureType: [{ required: true, message: '请选择结构类型', trigger: 'blur' }],
@@ -504,18 +499,18 @@ export default {
curtainWall: [{ required: true, message: '请选择建筑幕墙', trigger: 'blur' }],
elevator: [{ required: true, message: '请选择电梯', trigger: 'blur' }],
completedDate: [{ required: true, message: '请选择竣工日期', trigger: 'blur' }],
useYear: [{ required: true, message: '请输入设计使用年限', trigger: 'blur' }],
areaCount: [{ required: true, message: '请输入总建筑面积', trigger: 'blur' }],
usefulYear: [{ required: true, message: '请输入设计使用年限', trigger: 'blur' }],
totalArea: [{ required: true, message: '请输入总建筑面积', trigger: 'blur' }],
households: [{ required: true, message: '请输入总户数', trigger: 'blur' }],
units: [{ required: true, message: '请输入房屋单元数', trigger: 'blur' }],
unitHouseholds: [{ required: true, message: '请输入每层每单元户数', trigger: 'blur' }],
unitFloorHolds: [{ required: true, message: '请输入每层每单元户数', trigger: 'blur' }],
buildingUnit: [{ required: true, message: '请输入建设单位', trigger: 'blur' }],
buildingUnitUser: [{ required: true, message: '请输入建设单位联系人', trigger: 'blur' }],
buildingUnitTel: [{ required: true, message: '请输入建设单位联系电话', trigger: 'blur' }],
desingerUnit: [{ required: true, message: '请输入设计单位', trigger: 'blur' }],
constructionUnit: [{ required: true, message: '请输入施工单位', trigger: 'blur' }],
landLevelCount: [{ required: true, message: '请输入地上层', trigger: 'blur' }],
undergroundLevelCount: [{ required: true, message: '请输入地下层', trigger: 'blur' }],
landFloorCount: [{ required: true, message: '请输入地上层', trigger: 'blur' }],
underFloorCount: [{ required: true, message: '请输入地下层', trigger: 'blur' }],
},
/** 加载异步数据状态 */
@@ -524,7 +519,7 @@ export default {
/** 其他成员属性 */
/* ... */
codes: {
natureLand: [],
landAttribute: [],
houseStructureType: [],
houseSseismicGrade: [],
houseBaseInfo: [],
@@ -651,7 +646,7 @@ export default {
return this.$api
.sysDictTypeDropDowns({
code: [
'dic_nature_land',
'dic_land_attribute',
'dic_house_structure_type',
'dic_house_aseismic_grade',
'dic_house_base_info',
@@ -665,7 +660,7 @@ export default {
.then(
({
data: {
dic_nature_land,
dic_land_attribute,
dic_house_structure_type,
dic_house_aseismic_grade,
dic_house_base_info,
@@ -677,7 +672,7 @@ export default {
},
}) => {
this.codes = {
natureLand: dic_nature_land,
landAttribute: dic_land_attribute,
houseStructureType: dic_house_structure_type,
houseSseismicGrade: dic_house_aseismic_grade,
houseBaseInfo: dic_house_base_info,

View File

@@ -39,21 +39,21 @@
<a-form-model-item class="ant-row-flex" label="是否已通过解危鉴定" prop="fireproofGrade">
<a-switch />
</a-form-model-item>
<a-form-model-item class="ant-row-flex" label="房屋使用状态" prop="houseStatus">
<a-radio-group button-style="solid" v-model="form.houseStatus">
<a-form-model-item class="ant-row-flex" label="房屋使用状态" prop="usedStatus">
<a-radio-group button-style="solid" v-model="form.usedStatus">
<a-radio-button
:key="item.code"
:value="item.code"
v-for="item in codes.houseStatus"
v-for="item in codes.usedStatus"
>{{ item.value }}</a-radio-button>
</a-radio-group>
</a-form-model-item>
<a-form-model-item class="ant-row-flex" label="综合等级" prop="comprehensiveGrade">
<a-radio-group button-style="solid" v-model="form.comprehensiveGrade">
<a-form-model-item class="ant-row-flex" label="综合等级" prop="houseLevel">
<a-radio-group button-style="solid" v-model="form.houseLevel">
<a-radio-button
:key="item.code"
:value="item.code"
v-for="item in codes.houseComprehensiveGrade"
v-for="item in codes.houseLevel"
>{{ item.value }}</a-radio-button>
</a-radio-group>
</a-form-model-item>

View File

@@ -112,8 +112,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item class="ant-row-flex" label="其他调查内容">
<a-textarea auto-size placeholder="请输入其他调查内容" />
<a-form-model-item class="ant-row-flex" label="其他调查内容" prop="otherContents">
<a-textarea auto-size placeholder="请输入其他调查内容" v-model="form.otherContents" />
</a-form-model-item>
</a-col>
</a-row>

View File

@@ -18,18 +18,18 @@
<!-- ... -->
<a-row :gutter="16" type="flex">
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="调查登记机构" prop="aegistrationAgency">
<a-input placeholder="请输入登记机构" v-model="form.aegistrationAgency" />
<a-form-model-item class="ant-row-flex" label="调查登记机构" prop="investigateAgency">
<a-input placeholder="请输入登记机构" v-model="form.investigateAgency" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="调查人员" prop="aegistrationUser">
<a-input placeholder="请输入调查人员" v-model="form.aegistrationUser" />
<a-form-model-item class="ant-row-flex" label="调查人员" prop="investigateUser">
<a-input placeholder="请输入调查人员" v-model="form.investigateUser" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="审核人员" prop="checkUser">
<a-input placeholder="请输入审核人员" v-model="form.checkUser" />
<a-form-model-item class="ant-row-flex" label="审核人员" prop="offlineAuditor">
<a-input placeholder="请输入审核人员" v-model="form.offlineAuditor" />
</a-form-model-item>
</a-col>
<a-col :span="12">
@@ -60,9 +60,9 @@ export default {
/** 验证格式 */
rules: {
/* ... */
aegistrationAgency: [{ required: true, message: '请输入调查登记机构' }],
aegistrationUser: [{ required: true, message: '请输入调查人员' }],
checkUser: [{ required: true, message: '请输入审核人员' }],
investigateAgency: [{ required: true, message: '请输入调查登记机构' }],
investigateUser: [{ required: true, message: '请输入调查人员' }],
offlineAuditor: [{ required: true, message: '请输入审核人员' }],
competentDepartment: [{ required: true, message: '请输入主管部门' }],
},

View File

@@ -106,6 +106,13 @@ export default {
active: false,
show: false,
},
{
title: '巡查登记',
name: 'patrol',
component: () => import('./patrol'),
active: false,
show: true,
},
],
loading: false,
@@ -121,7 +128,7 @@ export default {
created() {
this.loading = true;
setTimeout(() => {
this.$set(this.param, 'data', {});
this.$set(this.param, 'record', {});
this.loading = false;
}, 3000);
},

View File

@@ -0,0 +1,196 @@
<template>
<!--
整页表单的分片表单
v 1.0
2021-05-12
Lufthafen
-->
<a-form-model
:label-col="labelCol"
:model="form"
:rules="rules"
:wrapper-col="wrapperCol"
ref="form"
>
<a-spin :spinning="loading">
<a-icon slot="indicator" spin type="loading" />
<a-row :gutter="16" type="flex">
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="巡查日期" prop="patrolDate">
<a-date-picker class="w-100-p" placeholder="请选择巡查日期" v-model="form.patrolDate" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item class="ant-row-flex" label="巡查人/单位" prop="patrolUser">
<a-input placeholder="请输入巡查人/单位" v-model="form.patrolUser" />
</a-form-model-item>
</a-col>
</a-row>
</a-spin>
</a-form-model>
</template>
<script>
/* 表单内容默认值 */
const defaultForm = {};
export default {
props: ['param', 'frame'],
data() {
return {
labelCol: { flex: '150px' },
wrapperCol: { flex: '1' },
/** 表单数据 */
form: {},
/** 验证格式 */
rules: {
/* ... */
patrolDate: [{ required: true, message: '请选择巡查日期', trigger: 'blur' }],
patrolUser: [{ required: true, message: '请输入巡查人/单位', trigger: 'blur' }],
},
/** 加载异步数据状态 */
loading: false,
/** 其他成员属性 */
codes: {},
};
},
async created() {
await this.onInit();
this.onFillData();
},
mounted() {},
async created() {
await this.onInit();
this.onFillData();
},
mounted() {
this.onMapInit();
},
beforeDestroy() {
if (this.map) this.map.destroy();
},
methods: {
/**
* 必要的方法
* 在打开编辑页时允许填充数据
*/
onFillData() {
/** 将默认数据覆盖到form */
const record = this.param && this.param.record;
const form = this.$_.cloneDeep(defaultForm);
Object.keys(form).forEach((p) => {
if (record.hasOwnProperty(p)) {
form[p] = record[p];
}
});
this.form = form;
},
/**
* 必要方法
* 验证表单并获取表单数据
*/
onGetData() {
return new Promise((reslove, reject) => {
this.$refs.form.validate((valid) => {
if (valid) {
const record = this.$_.cloneDeep(this.form);
/** 验证通过后可以对数据进行转换得到想要提交的格式 */
/* ... */
reslove(record);
} else {
reject();
}
});
});
},
/**
* 必要的方法
* 在外部窗口进行保存时调用表单验证
*/
onValidate(callback) {
this.$refs.form.validate(callback);
},
/**
* 必要的方法
* 在外部窗口关闭或重置时对表单验证进行初始化
*/
onResetFields() {
setTimeout(() => {
this.$refs.form.resetFields();
/** 在这里可以初始化当前组件中其他属性 */
/* ... */
}, 300);
},
/**
* 必要方法
* 加载当前表单中所需要的异步数据
*/
async onInit() {
this.loading = true;
/** 可以在这里await获取一些异步数据 */
/* ... */
await this.onLoadCodes();
this.loading = false;
},
/** 当前组件的其他方法 */
/* ... */
onLoadCodes() {
return this.$api
.sysDictTypeDropDowns({
code: [
'dic_land_attribute',
'dic_house_structure_type',
'dic_house_aseismic_grade',
'dic_house_base_info',
'dic_house_insulation_material',
'dic_house_wall_material',
'dic_house_fireproof_grade',
'dic_house_building_curtain_wall',
'dic_house_elevator',
],
})
.then(
({
data: {
dic_land_attribute,
dic_house_structure_type,
dic_house_aseismic_grade,
dic_house_base_info,
dic_house_insulation_material,
dic_house_wall_material,
dic_house_fireproof_grade,
dic_house_building_curtain_wall,
dic_house_elevator,
},
}) => {
this.codes = {
landAttribute: dic_land_attribute,
houseStructureType: dic_house_structure_type,
houseSseismicGrade: dic_house_aseismic_grade,
houseBaseInfo: dic_house_base_info,
houseInsulationMaterial: dic_house_insulation_material,
houseWallMaterial: dic_house_wall_material,
houseFireproofGrade: dic_house_fireproof_grade,
houseBuildingCurtainWall: dic_house_building_curtain_wall,
houseElevator: dic_house_elevator,
};
}
);
},
},
};
</script>

View File

@@ -0,0 +1,124 @@
<template>
<container>
<!-- 如果不想使用锚点,删除a-row->a-col,只留内部的template层即可 -->
<a-row :gutter="16" type="flex">
<a-col flex="1">
<br />
<a-card class="yo-form-page--body">
<template v-for="(part, index) in parts">
<section :id="`form-${index}-${id}`" :key="index">
<h5 v-if="part.title">{{part.title}}</h5>
<component
:frame="frame"
:is="part.component"
:key="index"
:param="param"
ref="forms"
v-if="part.component"
/>
</section>
<a-divider :key="`divider-${index}`" v-if="index < parts.length - 1" />
</template>
</a-card>
</a-col>
<a-col flex="240px">
<a-anchor
:get-container="()=> $el.parentNode"
:offset-top="24"
:target-offset="48"
:wrapper-style="{ backgroundColor: 'transparent' }"
@click.prevent
>
<a-anchor-link
:href="`#form-${index}-${id}`"
:key="index"
:title="part.title"
v-for="(part, index) in parts"
/>
</a-anchor>
</a-col>
</a-row>
</container>
</template>
<script>
export default {
props: ['id', 'param', 'frame'],
data() {
return {
parts: [
{
title: '巡查基本情况',
component: () => import('./base'),
},
// {
// title: '权属情况',
// component: () => import('./ownership'),
// },
// {
// title: '管理情况',
// component: () => import('./manager'),
// },
// {
// title: '调查情况',
// component: () => import('./investigation'),
// },
// {
// title: '鉴定治理',
// component: () => import('./identification'),
// },
// {
// title: '图纸资料存档处',
// component: () => import('./drawing'),
// },
// {
// title: '相关附件资料',
// component: () => import('./attachments'),
// },
// {
// title: '物业维修资金',
// component: () => import('./fund'),
// },
// {
// title: '建筑概貌',
// component: () => import('./aspect'),
// },
// {
// title: '调查单位',
// component: () => import('./unit'),
// },
],
};
},
methods: {
/**
* 循环子组件中的onGetData
*/
onGetData() {
return new Promise(async (resolve, reject) => {
let formData = {},
flag = true;
for (let i = 0; i < this.$refs.forms.length; i++) {
const form = this.$refs.forms[i];
try {
const data = await form.onGetData();
formData = {
...formData,
...data,
};
} catch {
flag = false;
}
}
if (flag) {
resolve(formData);
} else {
reject();
}
});
},
},
};
</script>