From a15512892c34a56504d9ff25316e5fb100134261 Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Fri, 4 Jun 2021 17:57:54 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=BB=BA=E6=A1=A3=E7=99=BB=E8=AE=B0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Application/Entity/BsHouseInfo.cs | 2 +- Api/Ewide.Application/Entity/BsHouseTask.cs | 6 +- Api/Ewide.Application/Ewide.Application.xml | 109 ++++++++- .../HouseInfo/Dto/HouseInfoInput.cs | 2 +- .../HouseInfo/Dto/HouseInfoOutput.cs | 8 +- .../HouseSafety/HouseInfo/HouseInfoService.cs | 9 +- .../HouseTask/Dto/HouseTaskInput.cs | 6 +- .../HouseTask/Dto/HouseTaskOutput.cs | 97 +++++++- .../business/house/info/form/base/aspect.vue | 94 ++++---- .../house/info/form/base/attachments.vue | 101 ++++---- .../business/house/info/form/base/drawing.vue | 65 +++--- .../house/info/form/base/identification.vue | 105 ++++----- .../business/house/info/form/base/index.vue | 48 ++-- .../house/info/form/base/investigation.vue | 139 +++++------ .../house/info/form/base/ownership.vue | 112 ++++++--- .../business/house/info/form/base/unit.vue | 81 +++---- .../business/house/info/form/patrol/base.vue | 111 ++------- .../business/house/info/form/patrol/grade.vue | 177 ++++++++++++++ .../house/info/form/patrol/handling.vue | 189 +++++++++++++++ .../business/house/info/form/patrol/index.vue | 52 ++--- .../house/info/form/patrol/inspection.vue | 221 ++++++++++++++++++ .../house/info/form/patrol/result.vue | 142 +++++++++++ 22 files changed, 1352 insertions(+), 524 deletions(-) create mode 100644 Web/src/pages/business/house/info/form/patrol/grade.vue create mode 100644 Web/src/pages/business/house/info/form/patrol/handling.vue create mode 100644 Web/src/pages/business/house/info/form/patrol/inspection.vue create mode 100644 Web/src/pages/business/house/info/form/patrol/result.vue diff --git a/Api/Ewide.Application/Entity/BsHouseInfo.cs b/Api/Ewide.Application/Entity/BsHouseInfo.cs index c17580a..e0eac9c 100644 --- a/Api/Ewide.Application/Entity/BsHouseInfo.cs +++ b/Api/Ewide.Application/Entity/BsHouseInfo.cs @@ -392,7 +392,7 @@ namespace Ewide.Application /// 房屋等级 1,2,3,4,C,d /// [Comment("房屋等级 1,2,3,4,C,d")] - public int? HouseLevel { get; set; } + public int? HouseGrade { get; set; } /// /// 房屋使用状态 diff --git a/Api/Ewide.Application/Entity/BsHouseTask.cs b/Api/Ewide.Application/Entity/BsHouseTask.cs index 5372b1a..1856e29 100644 --- a/Api/Ewide.Application/Entity/BsHouseTask.cs +++ b/Api/Ewide.Application/Entity/BsHouseTask.cs @@ -62,19 +62,19 @@ namespace Ewide.Application /// 初始等级 /// [Comment("初始等级")] - public int? InitLevel { get; set; } + public int? InitGrade { get; set; } /// /// 损坏等级 /// [Comment("损坏等级")] - public int? DamageLevel { get; set; } + public int? DamageGrade { get; set; } /// /// 综合等级 /// [Comment("综合等级")] - public int? ComprehensiveLevel { get; set; } + public int? ComprehensiveGrade { get; set; } /// /// 主要安全隐患综述 diff --git a/Api/Ewide.Application/Ewide.Application.xml b/Api/Ewide.Application/Ewide.Application.xml index 297e65a..7f95702 100644 --- a/Api/Ewide.Application/Ewide.Application.xml +++ b/Api/Ewide.Application/Ewide.Application.xml @@ -294,7 +294,7 @@ 外立面照片 - + 房屋等级 1,2,3,4,C,d @@ -394,17 +394,17 @@ 其他情况附件 - + 初始等级 - + 损坏等级 - + 综合等级 @@ -915,7 +915,7 @@ 其他调查内容 - + 房屋等级 1,2,3,4,C,d @@ -1136,12 +1136,12 @@ 其他调查内容 - + 房屋等级 1,2,3,4,C,d - + 房屋使用状态 @@ -1286,5 +1286,100 @@ 上报备注 + + + 沉降倾斜 + + + + + 沉降倾斜附件 + + + + + 其他情况 + + + + + 其他情况附件 + + + + + 初始等级 + + + + + 损坏等级 + + + + + 综合等级 + + + + + 主要安全隐患综述 + + + + + 处理意见 + + + + + 处理意见备注 + + + + + 整改情况 + + + + + 整改情况备注 + + + + + 巡查结果:1正常,-1异常 + + + + + 巡查异常描述 + + + + + 上报街道 + + + + + 上报街道时间 + + + + + 上报区住建 + + + + + 上报区住建时间 + + + + + 上报备注 + + diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs index 7cbf742..931eeb6 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs @@ -189,7 +189,7 @@ namespace Ewide.Application /// /// 房屋等级 1,2,3,4,C,d /// - public int? HouseLevel { get; set; } + public int? HouseGrade { get; set; } /// /// 房屋使用状态 diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs index 6b2385b..2684430 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs @@ -189,12 +189,12 @@ namespace Ewide.Application /// /// 房屋等级 1,2,3,4,C,d /// - public int? HouseLevel { get; set; } + public int? HouseGrade { get; set; } /// /// 房屋使用状态 /// - public int? UsedStatus { get; set; } + public int? HouseUsedStatus { get; set; } #endregion #region 图纸资料存档处drawing @@ -275,10 +275,10 @@ namespace Ewide.Application public class HouseInfoOutputForDetailPage { #region header - public HouseCodeOutput houseCode { get; set; } + public HouseCodeOutput HouseCode { get; set; } #endregion - public HouseInfoOutput houseInfo { get; set; } + public HouseInfoOutput HouseInfo { get; set; } public HouseTaskOutput PatrolInfo { get; set; } } } diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs index 8771c26..477a6b8 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs @@ -81,8 +81,9 @@ namespace Ewide.Application.Service.HouseSafety.HouseInfo //获取房屋编码信息 var houseCodeOutputAsync = await _dapperRepository.QueryAsync( - @"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,HC.No FROM bs_house_code HC + @"SELECT HC.Id,HC.Address,HC.ProjectId,HC.ZoneId,HC.Type,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,O.Name ZoneName,Proj.Note ProjectNote,CONCAT(Proj.Name,'(',Proj.Note,')') ProjectFullName,HC.HouseCode,HC.Lng,HC.Lat,HC.No FROM bs_house_code HC LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId +LEFT JOIN sys_org O ON HC.ZoneId = O.Id 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) @@ -98,7 +99,7 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId } var houseInfo = await _houseInfoRep.DetachedEntities.FirstOrDefaultAsync(h => h.HouseCodeId == houseTask.HouseCodeId); var houseInfoOutputForDetailPage = new HouseInfoOutputForDetailPage { - houseCode = houseCodeOutput + HouseCode = houseCodeOutput }; houseInfoOutputForDetailPage.PatrolInfo = new HouseTaskOutput @@ -109,12 +110,12 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId } if (houseInfo == null) { - houseInfoOutputForDetailPage.houseInfo = new HouseInfoOutput(); + houseInfoOutputForDetailPage.HouseInfo = new HouseInfoOutput(); return houseInfoOutputForDetailPage; } var houseInfoOutput = (await _houseInfoRep.DetachedEntities.FirstOrDefaultAsync(p => p.HouseCodeId == houseTask.HouseCodeId)).Adapt(); - houseInfoOutputForDetailPage.houseInfo = houseInfoOutput; + houseInfoOutputForDetailPage.HouseInfo = houseInfoOutput; return houseInfoOutputForDetailPage; } diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs index 39538f0..5642484 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs @@ -37,11 +37,11 @@ namespace Ewide.Application public string OtherInfoFiles { get; set; } //[Required(ErrorMessage = "巡查初始等级不能为空")] - public int InitLevel { get; set; } + public int InitGrade { get; set; } //[Required(ErrorMessage = "巡查损坏等级不能为空")] - public int DamageLevel { get; set; } + public int DamageGrade { get; set; } //[Required(ErrorMessage = "巡查综合等级不能为空")] - public int ComprehensiveLevel { get; set; } + public int ComprehensiveGrade { get; set; } /// /// 主要安全隐患综述 diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs index 0c76088..9d7cf5a 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs @@ -10,5 +10,100 @@ namespace Ewide.Application { public DateTime? PatrolDate { get; set; } public string PatrolUser { get; set; } - } + + /// + /// 沉降倾斜 + /// + public string SettlementTilt { get; set; } + + /// + /// 沉降倾斜附件 + /// + public string SettlementTiltFiles { get; set; } + + /// + /// 其他情况 + /// + public string OtherInfo { get; set; } + + /// + /// 其他情况附件 + /// + public string OtherInfoFiles { get; set; } + + /// + /// 初始等级 + /// + public int? InitGrade { get; set; } + + /// + /// 损坏等级 + /// + public int? DamageGrade { get; set; } + + /// + /// 综合等级 + /// + public int? ComprehensiveGrade { get; set; } + + /// + /// 主要安全隐患综述 + /// + public string MainSafety { get; set; } + + /// + /// 处理意见 + /// + public int? HandlingOpinion { get; set; } + + /// + /// 处理意见备注 + /// + public string HandlingOpinionRemark { get; set; } + + /// + /// 整改情况 + /// + public int? RectifyAndReform { get; set; } + + /// + /// 整改情况备注 + /// + public string RectifyAndReformRemark { get; set; } + + /// + /// 巡查结果:1正常,-1异常 + /// + public int? PatrolResult { get; set; } + + /// + /// 巡查异常描述 + /// + public string PatrolResultRemark { get; set; } + + /// + /// 上报街道 + /// + public int? ReportRoad { get; set; } + + /// + /// 上报街道时间 + /// + public DateTime? ReportRoadTime { get; set; } + + /// + /// 上报区住建 + /// + public int? ReportArea { get; set; } + + /// + /// 上报区住建时间 + /// + public DateTime? ReportAreaTime { get; set; } + + /// + /// 上报备注 + /// + public string ReportRemark { get; set; } + } } diff --git a/Web/src/pages/business/house/info/form/base/aspect.vue b/Web/src/pages/business/house/info/form/base/aspect.vue index 4041f12..4399121 100644 --- a/Web/src/pages/business/house/info/form/base/aspect.vue +++ b/Web/src/pages/business/house/info/form/base/aspect.vue @@ -18,10 +18,10 @@ - + { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -136,20 +139,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -163,23 +158,12 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ /* 上传图片相关 Begin */ onFileChange({ fileList }) { - this.form.facadePhoto = fileList; + this.form.houseInfo.facadePhoto = fileList; }, onPreviewFile(file) { return new Promise((resolve) => { @@ -200,8 +184,8 @@ export default { }, onFilePreview(file) { const items = []; - for (let i = 0; i < this.form.facadePhoto.length; i++) { - const _file = this.form.facadePhoto[i]; + for (let i = 0; i < this.form.houseInfo.facadePhoto.length; i++) { + const _file = this.form.houseInfo.facadePhoto[i]; const img = new Image(); const src = _file.url || _file.thumbUrl; img.src = src; @@ -212,7 +196,7 @@ export default { }); } this.$refs['photo-swipe'].initPhotoSwipe(items, { - index: this.form.facadePhoto.indexOf(file), + index: this.form.houseInfo.facadePhoto.indexOf(file), }); }, /* 上传图片相关 End */ diff --git a/Web/src/pages/business/house/info/form/base/attachments.vue b/Web/src/pages/business/house/info/form/base/attachments.vue index 7729fc0..f092881 100644 --- a/Web/src/pages/business/house/info/form/base/attachments.vue +++ b/Web/src/pages/business/house/info/form/base/attachments.vue @@ -18,10 +18,10 @@ - + - + - + - + - + - + { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -178,20 +194,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -205,17 +213,6 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ @@ -232,7 +229,7 @@ export default { } }, onFileChange({ fileList }, key) { - this.form[key] = fileList; + this.form.houseInfo[key] = fileList; }, onFileDownload(file) { this.$api.sysFileInfoDownload({ id: file.response }).then((res) => { diff --git a/Web/src/pages/business/house/info/form/base/drawing.vue b/Web/src/pages/business/house/info/form/base/drawing.vue index 009e706..776cc12 100644 --- a/Web/src/pages/business/house/info/form/base/drawing.vue +++ b/Web/src/pages/business/house/info/form/base/drawing.vue @@ -18,8 +18,8 @@ - - + + @@ -43,6 +43,10 @@ /* 表单内容默认值 */ const defaultForm = { /* ... */ + houseInfo: { + drawingMaterial: null, + drawingMaterialText: null, + }, }; export default { @@ -54,11 +58,13 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ - drawingMaterial: [{ required: true, message: '请选择图纸资料存档处' }], + 'houseInfo.drawingMaterial': [{ required: true, message: '请选择图纸资料存档处' }], }, /** 加载异步数据状态 */ @@ -73,7 +79,6 @@ export default { }, async created() { - await this.onInit(); this.onFillData(); }, @@ -82,16 +87,20 @@ export default { * 必要的方法 * 在打开编辑页时允许填充数据 */ - onFillData() { - /** 将默认数据覆盖到form */ - const record = this.param && this.param.record; + async onFillData() { + this.loading = true; + { + await this.onLoadCodes(); + /** 将默认数据覆盖到form */ + const record = this.param && this.param.record; + const form = this.$_.cloneDeep(defaultForm); - this.form = this.$_.cloneDeep({ - ...defaultForm, - ...record, - /** 在此处添加其他默认数据转换 */ - /* ... */ - }); + if (record) { + this.$_.giveDeep(form, record); + } + this.form = form; + } + this.loading = false; }, /** @@ -100,7 +109,7 @@ export default { */ onGetData() { return new Promise((reslove, reject) => { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -109,20 +118,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -136,18 +137,6 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - await this.onLoadCodes(); - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ onLoadCodes() { diff --git a/Web/src/pages/business/house/info/form/base/identification.vue b/Web/src/pages/business/house/info/form/base/identification.vue index 7458f28..1012acd 100644 --- a/Web/src/pages/business/house/info/form/base/identification.vue +++ b/Web/src/pages/business/house/info/form/base/identification.vue @@ -18,8 +18,8 @@ - - + + + {{ item.value }} - - + + {{ item.value }} @@ -66,6 +66,11 @@ /* 表单内容默认值 */ const defaultForm = { /* ... */ + houseInfo: { + // identification: null, + houseUsedStatus: null, + houseGrade: null, + }, }; export default { @@ -77,13 +82,15 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ - identification: [{ required: true, message: '请选择鉴定等级' }], - houseStatus: [{ required: true, message: '请选择房屋使用状态' }], - comprehensiveGrade: [{ required: true, message: '请选择综合等级' }], + // 'houseInfo.identification': [{ required: true, message: '请选择鉴定等级' }], + 'houseInfo.houseUsedStatus': [{ required: true, message: '请选择房屋使用状态' }], + 'houseInfo.houseGrade': [{ required: true, message: '请选择综合等级' }], }, /** 加载异步数据状态 */ @@ -94,14 +101,13 @@ export default { codes: { houseIdentification: [], houseGovernment: [], - houseStatus: [], - houseComprehensiveGrade: [], + houseUsedStatus: [], + houseGrade: [], }, }; }, async created() { - await this.onInit(); this.onFillData(); }, @@ -110,16 +116,20 @@ export default { * 必要的方法 * 在打开编辑页时允许填充数据 */ - onFillData() { - /** 将默认数据覆盖到form */ - const record = this.param && this.param.record; + async onFillData() { + this.loading = true; + { + await this.onLoadCodes(); + /** 将默认数据覆盖到form */ + const record = this.param && this.param.record; + const form = this.$_.cloneDeep(defaultForm); - this.form = this.$_.cloneDeep({ - ...defaultForm, - ...record, - /** 在此处添加其他默认数据转换 */ - /* ... */ - }); + if (record) { + this.$_.giveDeep(form, record); + } + this.form = form; + } + this.loading = false; }, /** @@ -128,7 +138,7 @@ export default { */ onGetData() { return new Promise((reslove, reject) => { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -137,20 +147,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -164,39 +166,20 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - await this.onLoadCodes(); - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ onLoadCodes() { return this.$api .sysDictTypeDropDowns({ - code: [ - 'dic_house_identification', - 'dic_house_government', - 'dic_house_status', - 'dic_house_comprehensive_grade', - ], + code: ['dic_house_identification', 'dic_house_government', 'dic_house_used_status', 'dic_house_grade'], }) .then( - ({ - data: { dic_house_identification, dic_house_government, dic_house_status, dic_house_comprehensive_grade }, - }) => { + ({ data: { dic_house_identification, dic_house_government, dic_house_used_status, dic_house_grade } }) => { this.codes = { houseIdentification: dic_house_identification, houseGovernment: dic_house_government, - houseStatus: dic_house_status, - houseComprehensiveGrade: dic_house_comprehensive_grade, + houseUsedStatus: dic_house_used_status, + houseGrade: dic_house_grade, }; } ); diff --git a/Web/src/pages/business/house/info/form/base/index.vue b/Web/src/pages/business/house/info/form/base/index.vue index ade8858..dc93fd4 100644 --- a/Web/src/pages/business/house/info/form/base/index.vue +++ b/Web/src/pages/business/house/info/form/base/index.vue @@ -59,34 +59,34 @@ export default { // title: '管理情况', // component: () => import('./manager'), // }, - // { - // title: '调查情况', - // component: () => import('./investigation'), - // }, - // { - // title: '鉴定治理', - // component: () => import('./identification'), - // }, - // { - // title: '图纸资料存档处', - // component: () => import('./drawing'), - // }, - // { - // title: '相关附件资料', - // component: () => import('./attachments'), - // }, + { + 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'), - // }, + { + title: '建筑概貌', + component: () => import('./aspect'), + }, + { + title: '调查单位', + component: () => import('./unit'), + }, ], }; }, diff --git a/Web/src/pages/business/house/info/form/base/investigation.vue b/Web/src/pages/business/house/info/form/base/investigation.vue index 8a4dacc..efec6a6 100644 --- a/Web/src/pages/business/house/info/form/base/investigation.vue +++ b/Web/src/pages/business/house/info/form/base/investigation.vue @@ -18,8 +18,8 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -124,6 +132,17 @@ /* 表单内容默认值 */ const defaultForm = { /* ... */ + houseInfo: { + houseSite: null, + adjacentConstruction: null, + chemicalErosion: null, + structuralDismantling: null, + addingLayer: null, + repairAndReinforce: null, + historicalCalamity: null, + functionalChange: null, + otherContents: null, + }, }; export default { @@ -135,18 +154,20 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ - houseSite: [{ required: true, message: '请选择房屋场地' }], - adjacentConstruction: [{ required: true, message: '请选择相邻施工' }], - chemicalErosion: [{ required: true, message: '请选择化学侵蚀' }], - structuralDismantling: [{ required: true, message: '请选择结构拆改' }], - addingLayer: [{ required: true, message: '请选择加层改造' }], - repairAndReinforce: [{ required: true, message: '请选择修缮加固' }], - historicalCalamity: [{ required: true, message: '请选择历史灾害' }], - functionalChange: [{ required: true, message: '请选择使用功能变更' }], + 'houseInfo.houseSite': [{ required: true, message: '请选择房屋场地' }], + 'houseInfo.adjacentConstruction': [{ required: true, message: '请选择相邻施工' }], + 'houseInfo.chemicalErosion': [{ required: true, message: '请选择化学侵蚀' }], + 'houseInfo.structuralDismantling': [{ required: true, message: '请选择结构拆改' }], + 'houseInfo.addingLayer': [{ required: true, message: '请选择加层改造' }], + 'houseInfo.repairAndReinforce': [{ required: true, message: '请选择修缮加固' }], + 'houseInfo.historicalCalamity': [{ required: true, message: '请选择历史灾害' }], + 'houseInfo.functionalChange': [{ required: true, message: '请选择使用功能变更' }], }, /** 加载异步数据状态 */ @@ -168,25 +189,24 @@ export default { }, watch: { - 'form.adjacentConstruction'(value, oldValue) { + 'form.houseInfo.adjacentConstruction'(value, oldValue) { this.onCheckedNone(value, oldValue, 'adjacentConstruction'); }, - 'form.chemicalErosion'(value, oldValue) { + 'form.houseInfo.chemicalErosion'(value, oldValue) { this.onCheckedNone(value, oldValue, 'chemicalErosion'); }, - 'form.repairAndReinforce'(value, oldValue) { + 'form.houseInfo.repairAndReinforce'(value, oldValue) { this.onCheckedNone(value, oldValue, 'repairAndReinforce'); }, - 'form.historicalCalamity'(value, oldValue) { + 'form.houseInfo.historicalCalamity'(value, oldValue) { this.onCheckedNone(value, oldValue, 'historicalCalamity'); }, - 'form.functionalChange'(value, oldValue) { + 'form.houseInfo.functionalChange'(value, oldValue) { this.onCheckedNone(value, oldValue, 'functionalChange'); }, }, async created() { - await this.onInit(); this.onFillData(); }, @@ -195,16 +215,21 @@ export default { * 必要的方法 * 在打开编辑页时允许填充数据 */ - onFillData() { - /** 将默认数据覆盖到form */ - const record = this.param && this.param.record; + async onFillData() { + this.loading = true; + { + await this.onLoadCodes(); - this.form = this.$_.cloneDeep({ - ...defaultForm, - ...record, - /** 在此处添加其他默认数据转换 */ - /* ... */ - }); + /** 将默认数据覆盖到form */ + const record = this.param && this.param.record; + const form = this.$_.cloneDeep(defaultForm); + + if (record) { + this.$_.giveDeep(form, record); + } + this.form = form; + } + this.loading = false; }, /** @@ -213,7 +238,7 @@ export default { */ onGetData() { return new Promise((reslove, reject) => { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -222,20 +247,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -249,18 +266,6 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - await this.onLoadCodes(); - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ onLoadCodes() { @@ -306,10 +311,10 @@ export default { onCheckedNone(value, oldValue, key) { // 选中"无"时全不选,反之取消选择"无" - if (value.indexOf('0') >= 0 && oldValue.indexOf('0') === -1) { - this.form[key] = ['0']; + if (value.indexOf('0') >= 0 && (!oldValue || oldValue.indexOf('0') === -1)) { + this.form.houseInfo[key] = ['0']; } else if (value.indexOf('0') >= 0 && value.length > 1) { - this.form[key].splice(value.indexOf('0'), 1); + this.form.houseInfo[key].splice(value.indexOf('0'), 1); } }, }, diff --git a/Web/src/pages/business/house/info/form/base/ownership.vue b/Web/src/pages/business/house/info/form/base/ownership.vue index 0e26036..b610dd8 100644 --- a/Web/src/pages/business/house/info/form/base/ownership.vue +++ b/Web/src/pages/business/house/info/form/base/ownership.vue @@ -18,8 +18,8 @@ - - + + @@ -43,7 +43,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.straightHouseCount" + v-model="form.houseInfo.straightHouseCount" /> @@ -55,7 +55,7 @@ :colon="false" class="ant-row-flex" label="单位自管公房" - prop="selfHouseCount" + prop="houseInfo.selfHouseCount" > @@ -63,7 +63,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.selfHouseCount" + v-model="form.houseInfo.selfHouseCount" /> @@ -74,7 +74,12 @@ - + @@ -87,7 +92,7 @@ :colon="false" class="ant-row-flex" label="商品房" - prop="businessCount" + prop="houseInfo.businessCount" > @@ -95,7 +100,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.businessCount" + v-model="form.houseInfo.businessCount" /> @@ -107,7 +112,7 @@ :colon="false" class="ant-row-flex" label="房改房" - prop="changeHouseCount" + prop="houseInfo.changeHouseCount" > @@ -115,7 +120,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.changeHouseCount" + v-model="form.houseInfo.changeHouseCount" /> @@ -127,7 +132,7 @@ :colon="false" class="ant-row-flex" label="拆迁安置房" - prop="resettlementHouseCount" + prop="houseInfo.resettlementHouseCount" > @@ -135,7 +140,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.resettlementHouseCount" + v-model="form.houseInfo.resettlementHouseCount" /> @@ -149,7 +154,7 @@ :colon="false" class="ant-row-flex" label="私房" - prop="privateHouseCount" + prop="houseInfo.privateHouseCount" > @@ -157,7 +162,7 @@ :min="0" :step="1" placeholder="几" - v-model="form.privateHouseCount" + v-model="form.houseInfo.privateHouseCount" /> @@ -165,10 +170,20 @@ - + - + @@ -179,28 +194,36 @@ - - + + - - + + - - + + - - + + - - + + @@ -211,6 +234,22 @@ /* 表单内容默认值 */ const defaultForm = { /* ... */ + houseInfo: { + propertyRights: null, + straightHouseCount: null, + selfHouseCount: null, + otherCount: null, + businessCount: null, + changeHouseCount: null, + resettlementHouseCount: null, + privateHouseCount: null, + houseCount: null, + propertyUnit: null, + propertyUnitUser: null, + propertyUnitUserTel: null, + propertyUnitConent: null, + propertyUnitConentTel: null, + }, }; export default { @@ -222,17 +261,19 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ - propertyRights: [{ required: true, message: '请选择产权性质' }], - straightHouseCount: [{ required: true, message: '请输入直管公房' }], - selfHouseCount: [{ required: true, message: '请输入单位自管公房' }], - otherCount: [{ required: true, message: '请输入其他' }], - businessCount: [{ required: true, message: '请输入商品房' }], - changeHouseCount: [{ required: true, message: '请输入房改房' }], - resettlementHouseCount: [{ required: true, message: '请输入拆迁安置房' }], + 'houseInfo.propertyRights': [{ required: true, message: '请选择产权性质' }], + 'houseInfo.straightHouseCount': [{ required: true, message: '请输入直管公房' }], + 'houseInfo.selfHouseCount': [{ required: true, message: '请输入单位自管公房' }], + 'houseInfo.otherCount': [{ required: true, message: '请输入其他' }], + 'houseInfo.businessCount': [{ required: true, message: '请输入商品房' }], + 'houseInfo.changeHouseCount': [{ required: true, message: '请输入房改房' }], + 'houseInfo.resettlementHouseCount': [{ required: true, message: '请输入拆迁安置房' }], }, /** 加载异步数据状态 */ @@ -247,7 +288,6 @@ export default { }, async created() { - this.form = this.$_.cloneDeep(defaultForm); this.onFillData(); }, diff --git a/Web/src/pages/business/house/info/form/base/unit.vue b/Web/src/pages/business/house/info/form/base/unit.vue index 8036838..b3ab08d 100644 --- a/Web/src/pages/business/house/info/form/base/unit.vue +++ b/Web/src/pages/business/house/info/form/base/unit.vue @@ -18,23 +18,23 @@ - - + + - - + + - - + + - - + + @@ -45,6 +45,12 @@ /* 表单内容默认值 */ const defaultForm = { /* ... */ + houseInfo: { + investigateAgency: null, + investigateUser: null, + offlineAuditor: null, + competentDepartment: null, + }, }; export default { @@ -56,14 +62,16 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ - investigateAgency: [{ required: true, message: '请输入调查登记机构' }], - investigateUser: [{ required: true, message: '请输入调查人员' }], - offlineAuditor: [{ required: true, message: '请输入审核人员' }], - competentDepartment: [{ required: true, message: '请输入主管部门' }], + 'houseInfo.investigateAgency': [{ required: true, message: '请输入调查登记机构' }], + 'houseInfo.investigateUser': [{ required: true, message: '请输入调查人员' }], + 'houseInfo.offlineAuditor': [{ required: true, message: '请输入审核人员' }], + 'houseInfo.competentDepartment': [{ required: true, message: '请输入主管部门' }], }, /** 加载异步数据状态 */ @@ -75,7 +83,6 @@ export default { }, async created() { - await this.onInit(); this.onFillData(); }, @@ -84,25 +91,28 @@ export default { * 必要的方法 * 在打开编辑页时允许填充数据 */ - onFillData() { - /** 将默认数据覆盖到form */ - const record = this.param && this.param.record; + async onFillData() { + this.loading = true; + { + // await this.onLoadCodes(); + /** 将默认数据覆盖到form */ + const record = this.param && this.param.record; + const form = this.$_.cloneDeep(defaultForm); - this.form = this.$_.cloneDeep({ - ...defaultForm, - ...record, - /** 在此处添加其他默认数据转换 */ - /* ... */ - }); + if (record) { + this.$_.giveDeep(form, record); + } + this.form = form; + } + this.loading = false; }, - /** * 必要方法 * 验证表单并获取表单数据 */ onGetData() { return new Promise((reslove, reject) => { - this.$refs.form.validate((valid) => { + this.$refs.form.validate((valid, err) => { if (valid) { const record = this.$_.cloneDeep(this.form); @@ -111,20 +121,12 @@ export default { reslove(record); } else { - reject(); + reject(err); } }); }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -138,17 +140,6 @@ export default { }, 300); }, - /** - * 必要方法 - * 加载当前表单中所需要的异步数据 - */ - async onInit() { - this.loading = true; - /** 可以在这里await获取一些异步数据 */ - /* ... */ - this.loading = false; - }, - /** 当前组件的其他方法 */ /* ... */ }, diff --git a/Web/src/pages/business/house/info/form/patrol/base.vue b/Web/src/pages/business/house/info/form/patrol/base.vue index e47379e..3226b30 100644 --- a/Web/src/pages/business/house/info/form/patrol/base.vue +++ b/Web/src/pages/business/house/info/form/patrol/base.vue @@ -49,7 +49,9 @@ export default { wrapperCol: { flex: '1' }, /** 表单数据 */ - form: {}, + form: { + ...defaultForm, + }, /** 验证格式 */ rules: { /* ... */ @@ -65,9 +67,6 @@ export default { }, async created() { - this.form = this.$_.cloneDeep(defaultForm); - - await this.onInit(); this.onFillData(); }, @@ -76,28 +75,31 @@ export default { * 必要的方法 * 在打开编辑页时允许填充数据 */ - onFillData() { - /** 将默认数据覆盖到form */ - const record = this.param && this.param.record; + async onFillData() { + this.loading = true; + { + /** 将默认数据覆盖到form */ + const record = this.param && this.param.record; - const form = this.$_.cloneDeep(defaultForm); + const form = this.$_.cloneDeep(defaultForm); - if (record) { - // 此处因业务复杂, 所有数据必定包裹在单独节点中, 所以需要两层循环 - Object.keys(form).forEach((p) => { - if (record.hasOwnProperty(p) && record[p]) { - const _form = form[p], - _record = record[p]; - Object.keys(form[p]).forEach((q) => { - if (_record.hasOwnProperty(q) && (_record[q] !== null) & (_record[q] !== undefined)) { - _form[q] = _record[q]; - } - }); - } - }); + if (record) { + // 此处因业务复杂, 所有数据必定包裹在单独节点中, 所以需要两层循环 + Object.keys(form).forEach((p) => { + if (record.hasOwnProperty(p) && record[p]) { + const _form = form[p], + _record = record[p]; + Object.keys(form[p]).forEach((q) => { + if (_record.hasOwnProperty(q) && (_record[q] !== null) & (_record[q] !== undefined)) { + _form[q] = _record[q]; + } + }); + } + }); + } + this.form = form; } - - this.form = form; + this.loading = false; }, /** @@ -121,14 +123,6 @@ export default { }); }, - /** - * 必要的方法 - * 在外部窗口进行保存时调用表单验证 - */ - onValidate(callback) { - this.$refs.form.validate(callback); - }, - /** * 必要的方法 * 在外部窗口关闭或重置时对表单验证进行初始化 @@ -142,63 +136,8 @@ export default { }, 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, - }; - } - ); - }, }, }; diff --git a/Web/src/pages/business/house/info/form/patrol/grade.vue b/Web/src/pages/business/house/info/form/patrol/grade.vue new file mode 100644 index 0000000..d241699 --- /dev/null +++ b/Web/src/pages/business/house/info/form/patrol/grade.vue @@ -0,0 +1,177 @@ + + \ No newline at end of file diff --git a/Web/src/pages/business/house/info/form/patrol/handling.vue b/Web/src/pages/business/house/info/form/patrol/handling.vue new file mode 100644 index 0000000..90a75c8 --- /dev/null +++ b/Web/src/pages/business/house/info/form/patrol/handling.vue @@ -0,0 +1,189 @@ + + \ No newline at end of file diff --git a/Web/src/pages/business/house/info/form/patrol/index.vue b/Web/src/pages/business/house/info/form/patrol/index.vue index d36ad28..cbf92e0 100644 --- a/Web/src/pages/business/house/info/form/patrol/index.vue +++ b/Web/src/pages/business/house/info/form/patrol/index.vue @@ -52,42 +52,22 @@ export default { 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'), - // }, + { + title: '房屋检查', + component: () => import('./inspection'), + }, + { + title: '等级划分', + component: () => import('./grade'), + }, + { + title: '处理情况', + component: () => import('./handling'), + }, + { + title: '本期巡查结果', + component: () => import('./result'), + }, ], }; }, diff --git a/Web/src/pages/business/house/info/form/patrol/inspection.vue b/Web/src/pages/business/house/info/form/patrol/inspection.vue new file mode 100644 index 0000000..fb41029 --- /dev/null +++ b/Web/src/pages/business/house/info/form/patrol/inspection.vue @@ -0,0 +1,221 @@ + + \ No newline at end of file diff --git a/Web/src/pages/business/house/info/form/patrol/result.vue b/Web/src/pages/business/house/info/form/patrol/result.vue new file mode 100644 index 0000000..1bbf1cf --- /dev/null +++ b/Web/src/pages/business/house/info/form/patrol/result.vue @@ -0,0 +1,142 @@ + + \ No newline at end of file