From 4738a1520a588c48e61c592a876689fd70d0cabe Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Tue, 8 Jun 2021 18:33:32 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=A1=A8=E5=8D=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=BF=9D=E5=AD=98/=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Application/Ewide.Application.xml | 12 +- .../HouseInfo/Dto/HouseInfoInput.cs | 2 +- .../HouseInfo/Dto/HouseInfoOutput.cs | 2 +- Api/Ewide.Core/Ewide.Core.xml | 291 +++++++++++++----- .../business/house/info/form/base/aspect.vue | 4 +- .../house/info/form/base/attachments.vue | 34 +- .../house/info/form/base/building.vue | 32 +- .../business/house/info/form/base/index.vue | 22 +- .../house/info/form/base/ownership.vue | 35 ++- .../pages/business/house/info/form/index.vue | 7 + .../business/house/info/form/patrol/grade.vue | 9 +- .../business/house/info/form/patrol/index.vue | 12 +- .../house/info/form/patrol/inspection.vue | 73 ++++- 13 files changed, 402 insertions(+), 133 deletions(-) diff --git a/Api/Ewide.Application/Ewide.Application.xml b/Api/Ewide.Application/Ewide.Application.xml index d54baee..52e25ca 100644 --- a/Api/Ewide.Application/Ewide.Application.xml +++ b/Api/Ewide.Application/Ewide.Application.xml @@ -839,7 +839,11 @@ 总共套数 - + + + 直管公房套数 + + 自管公房套数 @@ -1060,7 +1064,11 @@ 总共套数 - + + + 直管公房套数 + + 自管公房套数 diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs index 4cc0e85..412297c 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs @@ -100,7 +100,7 @@ namespace Ewide.Application /// 总共套数 /// public int? HouseCount { get; set; } - + /// /// 直管公房套数 /// public int? StraightHouseCount { 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 2684430..b1f225c 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs @@ -100,7 +100,7 @@ namespace Ewide.Application /// 总共套数 /// public int? HouseCount { get; set; } - + /// /// 直管公房套数 /// public int? StraightHouseCount { get; set; } diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml index 7d593bf..51a582c 100644 --- a/Api/Ewide.Core/Ewide.Core.xml +++ b/Api/Ewide.Core/Ewide.Core.xml @@ -2017,6 +2017,41 @@ 账号已冻结 + + + 发送验证流程错误 + + + + + 没有可验证方式 + + + + + 验证错误 + + + + + 绑定失败 + + + + + 验证码失效 + + + + + 请不要频繁发送验证码 + + + + + 请不要频繁发送验证码 + + 父机构不存在 @@ -6859,6 +6894,26 @@ 员工信息 + + + 绑定的值 + + + + + 发送验证码类型,1为发送给原邮箱,2为发送给原手机号 + + + + + 第一次验证码 + + + + + 第二次验证码 + + 用户数据范围服务 @@ -7092,102 +7147,96 @@ - + - 获取服务器信息 + 发送验证码 + + + + + 检验验证码并且绑定 + + + + + 发送验证码间隔时间(秒) - + - 获取资源使用信息 + 验证code + + + + 邮箱Code + + + + + 手机Code + + + + + 将code存入缓存 + + 验证方式 + 验证码 + code的类型 + + + + 判断是否含有code + + + + - + - 获取基本参数 + 判断是否含有code + + + - + - 动态获取网络信息 + 删除相应缓存 + + + + + + code60秒才可再次发送 + + 验证类型 + 值 + - + - 是否Linux + 发送验证码倒计时 + - + - 获取CPU使用率 - - - - - - 获取系统运行时间 - - - - - - 获取内存信息 - - - - - - 毫秒转天时分秒 - - - - - - - 获取外网IP和地理位置 - - - - - - 系统Shell命令 + 发送手机验证码 - + - Bash命令 + 发送邮箱 - - - - - - cmd命令 - - - - - - - - - - - - - 当前正在联网的网卡信息 - - - - - - 获取当前网卡的网络速度 - - + + @@ -7295,6 +7344,104 @@ 写入种子数据 --不常用 + + + 获取服务器信息 + + + + + 获取资源使用信息 + + + + + + 获取基本参数 + + + + + + 动态获取网络信息 + + + + + + 是否Linux + + + + + + 获取CPU使用率 + + + + + + 获取系统运行时间 + + + + + + 获取内存信息 + + + + + + 毫秒转天时分秒 + + + + + + + 获取外网IP和地理位置 + + + + + + 系统Shell命令 + + + + + Bash命令 + + + + + + + cmd命令 + + + + + + + + + + + + + 当前正在联网的网卡信息 + + + + + + 获取当前网卡的网络速度 + + + + 树基类 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 cd63d50..878c07e 100644 --- a/Web/src/pages/business/house/info/form/base/aspect.vue +++ b/Web/src/pages/business/house/info/form/base/aspect.vue @@ -102,7 +102,7 @@ export default { // 从数据中的文件id转换成uploader所需的格式 if (record) { - const fileList = !!record.facadePhoto ? record.facadePhoto.split(',') : []; + const fileList = !!record.houseInfo.facadePhoto ? record.houseInfo.facadePhoto.split(',') : []; for (let i = 0; i < fileList.length; i++) { const file = await PreviewFile(fileList[i]); const base64 = await BlobToBase64(file); @@ -115,7 +115,7 @@ export default { }); } } - + defaultForm.houseInfo.facadePhoto = facadePhoto; this.form = this.$_.cloneDeep({ ...defaultForm, }); 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 f092881..b33fbc7 100644 --- a/Web/src/pages/business/house/info/form/base/attachments.vue +++ b/Web/src/pages/business/house/info/form/base/attachments.vue @@ -109,22 +109,15 @@ \ No newline at end of file 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 47ea56f..552a4f5 100644 --- a/Web/src/pages/business/house/info/form/base/ownership.vue +++ b/Web/src/pages/business/house/info/form/base/ownership.vue @@ -181,6 +181,7 @@ @@ -286,7 +287,29 @@ export default { }, }; }, - + watch: { + 'form.houseInfo.straightHouseCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.selfHouseCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.otherCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.businessCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.changeHouseCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.resettlementHouseCount'(value) { + this.houseCountCal(); + }, + 'form.houseInfo.privateHouseCount'(value) { + this.houseCountCal(); + }, + }, async created() { this.onFillData(); }, @@ -361,6 +384,16 @@ export default { }; }); }, + houseCountCal() { + this.form.houseInfo.houseCount = + this.form.houseInfo.straightHouseCount + + this.form.houseInfo.selfHouseCount + + this.form.houseInfo.otherCount + + this.form.houseInfo.businessCount + + this.form.houseInfo.changeHouseCount + + this.form.houseInfo.resettlementHouseCount + + this.form.houseInfo.privateHouseCount; + }, }, }; \ No newline at end of file diff --git a/Web/src/pages/business/house/info/form/index.vue b/Web/src/pages/business/house/info/form/index.vue index 6eb979a..665b7c9 100644 --- a/Web/src/pages/business/house/info/form/index.vue +++ b/Web/src/pages/business/house/info/form/index.vue @@ -58,10 +58,12 @@ v-if="tab.show" > @@ -78,6 +80,7 @@ export default { data() { return { + completedYear: '', saving: false, loading: true, @@ -196,6 +199,10 @@ export default { pane.show = show; } }, + completedDateChanged(value) { + this.completedYear = value; + console.log('top-index' + value); + }, }, }; \ No newline at end of file diff --git a/Web/src/pages/business/house/info/form/patrol/grade.vue b/Web/src/pages/business/house/info/form/patrol/grade.vue index 701612d..3cba2ef 100644 --- a/Web/src/pages/business/house/info/form/patrol/grade.vue +++ b/Web/src/pages/business/house/info/form/patrol/grade.vue @@ -66,7 +66,7 @@ const defaultForm = { }; export default { - props: ['param'], + props: ['param', 'completedYear'], data() { return { @@ -97,9 +97,14 @@ export default { }, }; }, - + watch: { + completedYear(value) { + console.log('patrol-grade:' + value); + }, + }, async created() { this.onFillData(); + console.log(this.param); }, methods: { 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 bc82a41..e744a3f 100644 --- a/Web/src/pages/business/house/info/form/patrol/index.vue +++ b/Web/src/pages/business/house/info/form/patrol/index.vue @@ -9,6 +9,7 @@
{{part.title}}
export default { - props: ['id', 'param', 'frame'], + props: ['id', 'param', 'frame', 'completedYear'], data() { return { @@ -52,10 +53,10 @@ export default { title: '巡查基本情况', component: () => import('./base'), }, - // { - // title: '房屋检查', - // component: () => import('./inspection'), - // }, + { + title: '房屋检查', + component: () => import('./inspection'), + }, { title: '等级划分', component: () => import('./grade'), @@ -71,7 +72,6 @@ export default { ], }; }, - methods: { /** * 循环子组件中的onGetData diff --git a/Web/src/pages/business/house/info/form/patrol/inspection.vue b/Web/src/pages/business/house/info/form/patrol/inspection.vue index 6f6cfa7..7eafea1 100644 --- a/Web/src/pages/business/house/info/form/patrol/inspection.vue +++ b/Web/src/pages/business/house/info/form/patrol/inspection.vue @@ -36,8 +36,8 @@ :custom-request="onFileUpload" :file-list="form.patrolInfo.settlementTiltFiles" :preview-file="onPreviewFile" - @change="onFileChange" - @preview="onFilePreview" + @change="(data) => onFileChange(data, 'settlementTiltFiles')" + @preview="(data) => onFilePreview(data, 'settlementTiltFiles')" list-type="picture-card" >
@@ -62,8 +62,8 @@ :custom-request="onFileUpload" :file-list="form.patrolInfo.otherInfoFiles" :preview-file="onPreviewFile" - @change="onFileChange" - @preview="onFilePreview" + @change="(data) => onFileChange(data, 'otherInfoFiles')" + @preview="(data) => onFilePreview(data, 'otherInfoFiles')" list-type="picture-card" >
@@ -74,11 +74,11 @@ - + @@ -98,7 +98,7 @@ const defaultForm = { settlementTiltFiles: [], otherInfo: null, otherInfoFiles: [], - MainSafety: null, + mainSafety: null, }, }; export default { @@ -119,9 +119,14 @@ export default { /** 其他成员属性 */ codes: {}, + fileFieldArr: ['settlementTiltFiles', 'otherInfoFiles'], }; }, methods: { + /** + * 必要的方法 + * 在打开编辑页时允许填充数据 + */ async onFillData() { this.loading = true; { @@ -129,11 +134,45 @@ export default { /** 将默认数据覆盖到form */ const record = this.param && this.param.record; - const form = this.$_.cloneDeep(defaultForm); if (record) { - this.$_.giveDeep(form, record); + // this.$_.giveDeep(form, record); + // this.fileFieldArr.forEach((key) => { + // const fileValue = []; + // const fileList = !!record.patrolInfo[key] ? record.patrolInfo[key].split(',') : []; + // for (let i = 0; i < fileList.length; i++) { + // const file = await PreviewFile(fileList[i]); + // const base64 = await BlobToBase64(file); + // fileValue.push({ + // uid: fileList[i], + // response: fileList[i], // 用于和新上传的文件一同回传 + // name: file.name, + // url: base64, + // status: 'done', + // }); + // } + // defaultForm.patrolInfo[key] = fileValue; + // }); + for (var key in defaultForm.patrolInfo) { + if (key.indexOf('Files') > -1) { + const fileValue = []; + const fileList = !!record.patrolInfo[key] ? record.patrolInfo[key].split(',') : []; + for (let i = 0; i < fileList.length; i++) { + const file = await PreviewFile(fileList[i]); + const base64 = await BlobToBase64(file); + fileValue.push({ + uid: fileList[i], + response: fileList[i], // 用于和新上传的文件一同回传 + name: file.name, + url: base64, + status: 'done', + }); + } + defaultForm.patrolInfo[key] = fileValue; + } + } } + const form = this.$_.cloneDeep(defaultForm); this.form = form; } this.loading = false; @@ -150,8 +189,10 @@ export default { const record = this.$_.cloneDeep(this.form); /** 验证通过后可以对数据进行转换得到想要提交的格式 */ + this.fileFieldArr.forEach((key) => { + record.patrolInfo[key] = record.patrolInfo[key].map((p) => p.response).join(','); + }); /* ... */ - //record.facadePhoto = record.facadePhoto.map((p) => p.response).join(','); reslove(record); } else { @@ -178,8 +219,8 @@ export default { /* ... */ /* 上传图片相关 Begin */ - onFileChange({ fileList }) { - this.form.patrolInfo.settlementTiltFiles = fileList; + onFileChange({ fileList }, key) { + this.form.patrolInfo[key] = fileList; }, onPreviewFile(file) { return new Promise((resolve) => { @@ -198,10 +239,10 @@ export default { onError(); } }, - onFilePreview(file) { + onFilePreview({ file }, key) { const items = []; - for (let i = 0; i < this.form.patrolInfo.settlementTiltFiles.length; i++) { - const _file = this.form.patrolInfo.settlementTiltFiles[i]; + for (let i = 0; i < this.form.patrolInfo[key].length; i++) { + const _file = this.form.patrolInfo[key][i]; const img = new Image(); const src = _file.url || _file.thumbUrl; img.src = src; @@ -212,7 +253,7 @@ export default { }); } this.$refs['photo-swipe'].initPhotoSwipe(items, { - index: this.form.patrolInfo.settlementTiltFiles.indexOf(file), + index: this.form.patrolInfo[key].indexOf(file), }); }, /* 上传图片相关 End */