From 6188520aa3d503a47b44f00b9de2fe30cdcc8d74 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 15 Aug 2023 09:50:27 +0800 Subject: [PATCH] =?UTF-8?q?bug#165=E5=B0=8F=E5=8C=BA=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=B8=AD=E5=B1=85=E6=B0=91=E5=8C=BA=E7=B1=BB=E5=9E=8B=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=B1=85=E6=B0=91=E5=8C=BA=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?,bug#148=E6=88=BF=E5=B1=8B=E4=BF=A1=E6=81=AF=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=E6=A8=A1=E6=9D=BF=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=BF=AE=E6=94=B9,=E5=B1=85=E6=B0=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B9=B4=E9=BE=84=E6=90=9C=E7=B4=A2=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=B0=8F=E4=BA=8E=E8=B5=B7=E5=A7=8B=E5=B9=B4=E9=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiInfo.vue | 4 +- src/views/components/resiSearch.vue | 59 +-- .../base/community/communityDetail.vue | 9 +- .../modules/base/community/communityTable.vue | 393 ++++++------------ 4 files changed, 153 insertions(+), 312 deletions(-) diff --git a/src/views/components/resiInfo.vue b/src/views/components/resiInfo.vue index 65b4c6952..031024b0c 100644 --- a/src/views/components/resiInfo.vue +++ b/src/views/components/resiInfo.vue @@ -946,7 +946,7 @@ -
+ diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 70eeeb43a..ae65548e2 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -46,7 +46,7 @@ - + @@ -399,16 +399,16 @@ export default { } }, pickerOptionsEnd: { - disabledDate: time => { - let dateVal = this.form.birthdayStart - if (dateVal) { - if(time.getTime() < new Date(dateVal).getTime()){ - return time.getTime(); - }else { - return time.getTime() > Date.now() - 8.64e6; - } - }else { - return time.getTime() > Date.now() - 8.64e6; + disabledDate:time=>{ + let nowData = Date.now(); + if (this.form.birthdayStart) { + let birthdayStartTime = new Date(this.form.birthdayStart); + return ( + time.getTime() nowData + ); + } else { + return (time.getTime() > nowData || time.getTime() === nowData) ; } } }, @@ -586,39 +586,16 @@ export default { // } // }, - handleOpenSearch() { - this.openSearch = !this.openSearch - }, - handleAgeChange(val) { - console.log('val----age---', val) - // console.log(v); - if(val.start){ - const s = this.computedBirth1(val.start) - const e = this.computedBirth(val.start) - this.form.BIRTHDAY = [s, e] - }else { - this.form.BIRTHDAY = [] - return + handleAgeChange() { + console.log(11>5); + console.log(11>10); + if(this.form.ageStart){ + if(this.form.ageStart>this.form.ageEnd){ + this.$message.warning('结束年龄不能小于开始年龄') + } } - }, handleChangeAgency(val) { - // let obj = this.$refs["myCascader"].getCheckedNodes()[0].data - // if (obj) { - - // this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; - // this.GRID_ID = '' - - // } else { - // this.form.agencyId = '' - // this.GRID_ID = '' - // } - - // this.form.villageId = '' - // this.form.buildId = '' - // this.form.unitId = '' - // this.form.homeId = '' - this.sarr = [] const map = new Map(); this.getLastItem( diff --git a/src/views/modules/base/community/communityDetail.vue b/src/views/modules/base/community/communityDetail.vue index aeebbd8df..e7d26e3a4 100644 --- a/src/views/modules/base/community/communityDetail.vue +++ b/src/views/modules/base/community/communityDetail.vue @@ -29,8 +29,8 @@ {{dataForm.realBuilding?dataForm.realBuilding:0 }}
- 备注: - {{ dataForm.remark||'--' }} + 居民区类型 + {{ dataForm.quartersType?dataForm.quartersType=='1'?'片区':dataForm.quartersType=='0'?'小区':'--':'--' }}
详细地址: @@ -45,7 +45,10 @@
- +
+ 备注: + {{ dataForm.remark||'--' }} +
diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 041137b67..b0e61b62d 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -2,105 +2,56 @@
- 新增小区 - -
- + 新增小区 + +
+
- - 导入小区数据 + + 导入小区数据
- - 导入楼栋数据 + + 导入楼栋数据
- - 导入房屋数据 + + 导入房屋数据
- 导入 + 导入
- 导出 + 导出 - 批量删除 + 批量删除
- -
- 下载小区模板 + +
+ 下载小区模板
-
- 下载楼栋模板 +
+ 下载楼栋模板
-
- 下载房屋模板 +
+ 下载房屋模板
-
- 智能填报 +
+ 智能填报
- 更多 + 更多
- - + + - + - + - + - + - +
- +
- - + + - - + + - - + + @@ -407,7 +268,7 @@ export default { }, }, - data () { + data() { return { searchHeight: 190, //搜索栏高度 // tableHeight: 0, @@ -459,7 +320,7 @@ export default { }, computed: { - tableHeight () { + tableHeight() { console.log(this.searchHeight); let height = this.searchHeight + 270; return this.$store.state.inIframe @@ -470,7 +331,7 @@ export default { ...mapGetters(["clientHeight", "iframeHeight"]), }, watch: { - selection (val) { + selection(val) { if (val.length > 0) { this.showDeletBtn = true; } else { @@ -478,7 +339,7 @@ export default { } }, "$store.state.sidebarFold": { - handler (newVal, oldVal) { + handler(newVal, oldVal) { if (newVal) { //收起 this.searchHeight = 155; @@ -497,9 +358,9 @@ export default { communityExportInfo, }, - activated () { }, + activated() { }, - async mounted () { + async mounted() { this.customerId = localStorage.getItem("customerId"); // this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({ // elseParams: { @@ -534,7 +395,7 @@ export default { // } // }, - reportForm () { + reportForm() { let paramMap = { pageSize: this.pageSize, pageNo: this.pageNo, @@ -557,7 +418,7 @@ export default { }, }); }, - async loadTable (fromTree, treeObj) { + async loadTable(fromTree, treeObj) { this.treeObj = { ...treeObj } @@ -627,7 +488,7 @@ export default { this.tableLoading = false; }, - checkSelect (row, index) { + checkSelect(row, index) { let isChecked = false; if (row.showBtn) { // 判断里面是否存在某个参数 @@ -638,12 +499,12 @@ export default { return isChecked; }, - diaClose () { + diaClose() { this.$refs.ref_form.resetData(); this.formShow = false; }, - async handleDetail (row) { + async handleDetail(row) { // this.formTitle = '小区详情' // this.formShow = true // const _data = await this.detail(row) @@ -659,14 +520,14 @@ export default { }); }, - handleAdd () { + handleAdd() { this.formTitle = "新增小区"; this.formShow = true; this.$nextTick(() => { this.$refs.ref_form.initForm("add", null, this.agencyObj); }); }, - async detail (row) { + async detail(row) { const url = "/actual/base/communityQuarters/getQuartersDetail/" + row.neighborHoodId; @@ -680,7 +541,7 @@ export default { } }, // 补全一房一码点击事件 - async handleYhymInfo () { + async handleYhymInfo() { this.yhymLoading = true; const url = "/gov/org/house/createBatchHouseCodeAndUrl"; @@ -707,7 +568,7 @@ export default { } }, // 补全小程序一户一码 - async createBatchNeiQrUrl () { + async createBatchNeiQrUrl() { this.xcxmLoading = true; const url = "/gov/org/neighborhood/createBatchNeiQrUrl"; @@ -733,7 +594,7 @@ export default { this.$message.error(msg); } }, - async handleEdit (row) { + async handleEdit(row) { this.formTitle = "修改小区"; this.formShow = true; const _data = await this.detail(row); @@ -742,24 +603,24 @@ export default { }); }, - handleToNextLevel (row) { + handleToNextLevel(row) { this.$emit("toNextLevel", row, "community"); }, - addFormCancle () { + addFormCancle() { this.formShow = false; }, - detailFormCancle () { + detailFormCancle() { this.$refs.ref_form_detail.diaDestroy(); this.detailShow = false; }, - addFormOk () { + addFormOk() { this.formShow = false; this.loadTable(); this.$emit("refreshTree"); }, - deleteBatch () { + deleteBatch() { if (this.selection.length > 0) { this.$confirm("确认删除选择的小区?", "提示", { confirmButtonText: "确定", @@ -781,14 +642,14 @@ export default { this.$message.warning("请先选择要删除的小区"); } }, - selectAll (selection) { + selectAll(selection) { this.selection = selection; }, - selectionChange (selection) { + selectionChange(selection) { this.selection = selection; }, - async handleDelete (row) { + async handleDelete(row) { this.$confirm("确认删除?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -807,7 +668,7 @@ export default { }); }, - async deleteCommunityBatch () { + async deleteCommunityBatch() { let ids = []; console.log(this.selection); this.selection.forEach((element) => { @@ -842,7 +703,7 @@ export default { this.$message.error(msg); } }, - async deleteCommunity (row) { + async deleteCommunity(row) { const url = "/actual/base/communityQuarters/deleteQuarters"; let params = { @@ -862,7 +723,7 @@ export default { // this.$message.error(msg); } }, - async handleDownQr (row, type) { + async handleDownQr(row, type) { let title = row.label + "二维码.png"; // const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}` const url = "/gov/org/agency/create-qrcode"; @@ -887,10 +748,10 @@ export default { }); }, // 导出按钮点击事件 - async handleExportOpen () { + async handleExportOpen() { await this.getExportList(); }, - async getExportList (type) { + async getExportList(type) { const url = "/oper/customize/icformitemgroup/list"; let params = { formCode: "community_info", @@ -976,7 +837,7 @@ export default { // } }, //导出表格 以前是导出 现在改成导出房屋数据 - async handleExport () { + async handleExport() { let title = this.agencyObj.label; title = title + "—小区列表"; @@ -997,15 +858,15 @@ export default { } ); }, - handleDiyClose () { + handleDiyClose() { this.diyDialog = false; }, - handleClose (done) { + handleClose(done) { this.diyDialog = false; }, // 下载文件 - download (data, downFileName) { + download(data, downFileName) { if (!data) { return; } @@ -1029,7 +890,7 @@ export default { } }, - handleExportModule (type) { + handleExportModule(type) { let title = ""; let url = ""; if (type === "community") { @@ -1039,7 +900,7 @@ export default { title = "楼栋导入模板"; url = "/gov/org/building/exporttemplate"; } else if (type === "room") { - title = "房间导入模板"; + title = "房屋导入模板"; url = "/gov/org/house/exporttemplate"; } @@ -1058,7 +919,7 @@ export default { }, //导出一户一档 - handleExportYihuyidang () { + handleExportYihuyidang() { this.yihuyidangDisabled = true; let title = this.agencyObj.label; title = title + "-一户一档"; @@ -1100,7 +961,7 @@ export default { // 导出一房一码 - handleExportYihuyima () { + handleExportYihuyima() { this.exportBtn = true; this.yihuyimaDisabled = true; let title = this.agencyObj.label; @@ -1129,7 +990,7 @@ export default { }, // 上传文件之前的钩子 - beforeUpload (file, type) { + beforeUpload(file, type) { this.files = file; const isText = file.type === "application/vnd.ms-excel"; @@ -1148,11 +1009,11 @@ export default { } }, // 上传文件个数超过定义的数量 - handleExceed (files, fileList) { + handleExceed(files, fileList) { this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`); }, - async uploadFile (type) { + async uploadFile(type) { if (this.fileName == "") { this.$message.warning("请选择要上传的文件!"); return false; @@ -1233,7 +1094,7 @@ export default { ); }, - showMessage (msg) { + showMessage(msg) { this.$alert(msg, "操作结果", { confirmButtonText: "关闭", callback: (action) => { @@ -1242,18 +1103,18 @@ export default { }, }); }, - handleSizeChange (val) { + handleSizeChange(val) { this.pageSize = val; this.pageNo = 1; this.loadTable(this.treeObj); }, - handleCurrentChange (val) { + handleCurrentChange(val) { this.pageNo = val; this.loadTable(this.treeObj); }, // 开启加载动画 - startLoading () { + startLoading() { loading = Loading.service({ lock: true, // 是否锁定 text: "正在加载……", // 加载中需要显示的文字 @@ -1261,7 +1122,7 @@ export default { }); }, // 结束加载动画 - endLoading () { + endLoading() { // clearTimeout(timer); if (loading) { loading.close();