From ed0dfdc354bb2f0e6f7030caae6b2503ee6d8cda Mon Sep 17 00:00:00 2001 From: jiangyuying Date: Thu, 10 Aug 2023 15:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=AE=A1=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/management/edit-main.scss | 57 +- .../modules/base/community/buildForm.vue | 189 +- .../modules/base/community/buildTable.vue | 45 +- .../modules/base/community/community copy.vue | 883 ------ .../modules/base/community/community.vue | 475 ++-- .../modules/base/community/communityForm.vue | 27 +- .../base/community/communityTable copy.vue | 1302 +++++++++ .../modules/base/community/communityTable.vue | 2403 ++++++++--------- 8 files changed, 2874 insertions(+), 2507 deletions(-) delete mode 100644 src/views/modules/base/community/community copy.vue create mode 100644 src/views/modules/base/community/communityTable copy.vue diff --git a/src/assets/scss/modules/management/edit-main.scss b/src/assets/scss/modules/management/edit-main.scss index 79904ea6c..4add1c529 100644 --- a/src/assets/scss/modules/management/edit-main.scss +++ b/src/assets/scss/modules/management/edit-main.scss @@ -1,54 +1,50 @@ +@import '@/assets/scss/c/config.scss'; +@import '@/assets/scss/c/function.scss'; -@import "@/assets/scss/c/config.scss"; -@import "@/assets/scss/c/function.scss"; - -.g-edit-form{ +.g-edit-form { margin-top: 30px; - /deep/ .el-form-item{ - margin-bottom:19px; + /deep/ .el-form-item { + margin-bottom: 19px; } //编辑框-普通form宽度 - .u-edit-width-normal{ - width:320px; + .u-edit-width-normal { + width: 320px; } //编辑框-房屋级联选择 楼号-单元-放号宽度 - .u-edit-width-build{ - width:100px; + .u-edit-width-build { + width: 100px; } - .u-edit-width-radiolong{ - /deep/ .el-radio-group{ - margin-top:10px; + .u-edit-width-radiolong { + /deep/ .el-radio-group { + margin-top: 10px; line-height: 30px; } - } - .m-edit-map{ - - .m-edit-map-search{ + .m-edit-map { + .m-edit-map-search { margin-bottom: 8px; } - .m-map-item{ + .m-map-item { // margin-top:10px; - height:225px; - width:400px; - padding-bottom:10px; + height: 225px; + width: 400px; + padding-bottom: 10px; } - } } -.m-edit-btn{ +.m-edit-btn { display: flex; justify-content: flex-end; padding-right: 16px; - height: 50px; + height: 70px; align-items: center; } //取消按钮 ::v-deep .el-button--default { - font-size: 14px !important; + font-size: 14px !important; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #0056d6 !important; @@ -56,12 +52,11 @@ min-width: 60px !important; height: 30px !important; // padding:0 8px !important; - background: #FFFFFF !important; + background: #ffffff !important; border-radius: 2px !important; border: 1px solid #0056d6 !important; -} -::v-deep .el-button--default:hover{ -border: 1px solid #0042a3 !important; -color: #0042a3 !important; } - +::v-deep .el-button--default:hover { + border: 1px solid #0042a3 !important; + color: #0042a3 !important; +} diff --git a/src/views/modules/base/community/buildForm.vue b/src/views/modules/base/community/buildForm.vue index ee695991a..24350d092 100644 --- a/src/views/modules/base/community/buildForm.vue +++ b/src/views/modules/base/community/buildForm.vue @@ -2,24 +2,47 @@
- - - {{ dataForm.agencyName }}—{{ agencyObj.gridName }}—{{ agencyObj.label }} + + + + {{ agencyObj.label }} - - + + - - + + - 生成 + 生成 - + 商品房 @@ -35,54 +58,103 @@ v-model="dataForm.sort" label="排序"> --> - - + + - - + + - - + + - - + + - - + + - - + + - +
- - + + -
+
- + - +
- 取 消 - 保 + 取 消 + 保 存
@@ -99,7 +171,7 @@ var markers var infoWindowList let loading // 加载动画 export default { - data() { + data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 searchOptions: [], @@ -138,12 +210,13 @@ export default { } }, components: {}, - mounted() { + mounted () { }, methods: { - async initForm(type, row, agencyObj) { + async initForm (type, row, agencyObj) { + console.log(agencyObj) this.$refs.ref_form.resetFields(); let { latitude, longitude } = this.$store.state.user; this.agencyObj = agencyObj @@ -153,7 +226,8 @@ export default { this.formType = type if (row) { - this.dataForm = JSON.parse(JSON.stringify(row)) + this.dataForm = { ...JSON.parse(JSON.stringify(row)) } + this.buildingId = this.dataForm.buildingId // this.buildType = this.dataForm.buildingTypeKey this.buildType = this.dataForm.type @@ -162,18 +236,19 @@ export default { this.dataForm.latitude = latitude this.dataForm.longitude = longitude } + console.log(this.dataForm) this.$nextTick(() => { const latitudeParam = this.dataForm.latitude !== undefined && this.dataForm.latitude != 0 - ? this.dataForm.latitude - : latitude; + ? this.dataForm.latitude + : latitude; const longitudeParam = this.dataForm.longitude !== undefined && this.dataForm.longitude != 0 - ? this.dataForm.longitude - : longitude; + ? this.dataForm.longitude + : longitude; this.initMap(latitudeParam, longitudeParam); }) }, - async handleComfirm() { + async handleComfirm () { this.btnDisable = true setTimeout(() => { this.btnDisable = false @@ -189,7 +264,7 @@ export default { }) }, - async handleCode() { + async handleCode () { const { data, code, msg } = await requestPost( "/actual/base/communityBuilding/getBuildingCoding/" + this.dataForm.neighborHoodId); if (msg == "success" && code == 0) { @@ -198,7 +273,7 @@ export default { } }, - async addBuild() { + async addBuild () { if (this.dataForm.buildingLeaderMobile) { const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //联系电话 if (this.dataForm.buildingLeaderMobile && regPhone.test(this.dataForm.buildingLeaderMobile) === false) { @@ -237,13 +312,13 @@ export default { }, - handleCancle() { + handleCancle () { this.resetData() this.$emit('dialogCancle') }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 - initMap(latitude, longitude) { + initMap (latitude, longitude) { map = new daiMap( document.getElementById("app_build"), { latitude, longitude }, @@ -265,7 +340,7 @@ export default { }, - async handleMoveCenter() { + async handleMoveCenter () { //修改地图中心点 const { lat, lng } = map.getCenter(); this.dataForm.latitude = lat; @@ -281,7 +356,7 @@ export default { } }, - async remoteMethod(query) { + async remoteMethod (query) { if (query !== '') { this.loading = true; @@ -312,7 +387,7 @@ export default { } }, - handleClickKey(index) { + handleClickKey (index) { let selPosition = this.resultList[index] let lonlat = selPosition.lonlat.split(" ") map.setCenter(lonlat[1], lonlat[0]); @@ -323,7 +398,7 @@ export default { }, - resetData() { + resetData () { this.searchValue = '' this.searchOptions = [] this.resultList = [] @@ -352,7 +427,7 @@ export default { } }, // 开启加载动画 - startLoading() { + startLoading () { loading = Loading.service({ lock: true, // 是否锁定 text: '正在加载……', // 加载中需要显示的文字 @@ -360,7 +435,7 @@ export default { }) }, // 结束加载动画 - endLoading() { + endLoading () { // clearTimeout(timer); if (loading) { loading.close() @@ -368,7 +443,7 @@ export default { } }, computed: { - dataRule() { + dataRule () { return { buildingName: [ { required: true, message: '楼栋名称不能为空', trigger: 'blur' }, diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index b038502e5..4e5adbe65 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -7,6 +7,7 @@ class="diy-button--blue" icon="el-icon-plus" size="small" + :disabled="addDisabled" @click="handleAdd">新增楼栋
查看 - 编辑 - { this.$refs.ref_form_detail.initForm(_data, this.agencyObj) @@ -515,6 +515,7 @@ export default { this.formShow = true this.$nextTick(() => { this.$refs.ref_form.initForm('add', null, this.agencyObj) + }) }, @@ -812,15 +813,15 @@ export default { return false } this.$message({ - showClose: true, - dangerouslyUseHTMLString: true, - message: "导入中,请到系统管理-导入记录中查看进度", - duration: 3000 - }); - let than = this - document.getElementById('clickA').addEventListener('click',function(){ - than.$router.replace('/main/importRecord-index'); - }) + showClose: true, + dangerouslyUseHTMLString: true, + message: "导入中,请到系统管理-导入记录中查看进度", + duration: 3000 + }); + let than = this + document.getElementById('clickA').addEventListener('click', function () { + than.$router.replace('/main/importRecord-index'); + }) //清空上传列表 @@ -991,7 +992,7 @@ export default { padding-left: 0px; padding-right: 0px; } -::v-deep .el-dialog__body{ - padding: 0; - } +::v-deep .el-dialog__body { + padding: 0; +} diff --git a/src/views/modules/base/community/community copy.vue b/src/views/modules/base/community/community copy.vue deleted file mode 100644 index aa5901415..000000000 --- a/src/views/modules/base/community/community copy.vue +++ /dev/null @@ -1,883 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 3966a4640..701da524c 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -1,30 +1,29 @@