From bdff5f1cb708ca72c88a21a945af98187a3dad6c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 9 Nov 2021 18:24:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/buttonstyle.scss | 61 ++++++++ src/assets/scss/common.scss | 104 +++++++++++-- .../modules/base/community/buildForm.vue | 26 +++- .../modules/base/community/buildTable.vue | 49 +++--- .../modules/base/community/community.vue | 145 +++++++++++------- .../modules/base/community/communityForm.vue | 18 ++- .../modules/base/community/communityTable.vue | 53 +++---- src/views/modules/base/community/roomForm.vue | 34 +++- .../modules/base/community/roomTable.vue | 42 ++--- 9 files changed, 365 insertions(+), 167 deletions(-) create mode 100644 src/assets/scss/buttonstyle.scss diff --git a/src/assets/scss/buttonstyle.scss b/src/assets/scss/buttonstyle.scss new file mode 100644 index 00000000..1665c1b3 --- /dev/null +++ b/src/assets/scss/buttonstyle.scss @@ -0,0 +1,61 @@ +.el-button--green { + color: #fff; + background-color: #22c1c3; + border-color: #22c1c3; +} +.el-button--green:hover { + color: #fff; + background-color: #05b1b4; + border-color: #05b1b4; +} +.el-button--green:focus { + color: #fff; + background-color: #22c1c3; + border-color: #22c1c3; +} + +.el-button--yellow:hover { + color: #fff; + background-color: #fa9200; + border-color: #fa9200; +} +.el-button--yellow:focus { + color: #fff; + background-color: #feb349; + border-color: #feb349; +} +.el-button--yellow { + color: #fff; + background-color: #feb349; + border-color: #feb349; +} +.el-button--blue:focus { + color: #fff; + background-color: #2195fe; + border-color: #2195fe; +} +.el-button--blue:hover { + color: #fff; + background-color: #0083fd; + border-color: #0083fd; +} +.el-button--blue { + color: #fff; + background-color: #2195fe; + border-color: #2195fe; +} +.el-button--red:focus { + color: #fff; + background-color: #fe6252; + border-color: #fe6252; +} +.el-button--red:hover { + color: #fff; + background-color: #fd341e; + border-color: #fd341e; +} +.el-button--red { + color: #fff; + background-color: #fe6252; + border-color: #fe6252; +} diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index ba5139f8..c16afbd5 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -4,8 +4,8 @@ box-sizing: border-box; } body { - font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, - sans-serif; + font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-size: $--font-size-base; line-height: $base--line-height; color: $--color-text-primary; @@ -35,7 +35,7 @@ img { } .clearfix:before, .clearfix:after { - content: " "; + content: ' '; display: table; } .clearfix:after { @@ -144,8 +144,8 @@ img { background-color: transparent; } &-add { - > span > *[class*="el-icon-"], - > span > *[class*="icon"] { + > span > *[class*='el-icon-'], + > span > *[class*='icon'] { vertical-align: middle; font-size: 18px; margin-right: 5px; @@ -383,7 +383,7 @@ img { &::after { position: absolute; - content: ""; + content: ''; right: 0; top: 0; bottom: 0; @@ -448,8 +448,8 @@ img { } } &__search { - > *[class*="el-icon-"], - > *[class*="icon"] { + > *[class*='el-icon-'], + > *[class*='icon'] { display: inline-block; vertical-align: middle; } @@ -572,7 +572,9 @@ img { min-height: calc(#{$content--fill-height} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px); + min-height: calc( + #{$content--fill-height} - #{$content--card-header-height} - 2px + ); } &--tabs { padding: $content--tabs-header-height 0 0; @@ -644,7 +646,7 @@ img { position: absolute; bottom: 0; left: 0; - content: ""; + content: ''; width: 100%; height: 2px; background-color: $--color-primary; @@ -677,10 +679,15 @@ img { min-height: calc(#{$content--fill-height-tabs} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); + min-height: calc( + #{$content--fill-height-tabs} - #{$content--card-header-height} - + 2px + ); } &.is-iframe { - height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2}); + height: calc( + #{$content--fill-height-tabs} + #{$content--padding * 2} + ); margin: -$content--padding; min-height: auto; > .aui-card--fill { @@ -699,7 +706,10 @@ img { background-color: #fff; } > .aui-card--fill > .el-card__header + .el-card__body { - height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); + height: calc( + #{$content--fill-height-tabs} - #{$content--card-header-height} - + 2px + ); } } } @@ -729,7 +739,7 @@ img { /* Page ------------------------------ */ -*[class*="aui-page__"] { +*[class*='aui-page__'] { padding-top: 0; .aui-content { min-height: auto; @@ -741,7 +751,71 @@ img { min-height: calc(100vh - #{$content--padding * 2} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px); + min-height: calc( + 100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px + ); } } } + +.el-button--green { + color: #fff; + background-color: #22c1c3; + border-color: #22c1c3; +} +.el-button--green:hover { + color: #fff; + background-color: #05b1b4; + border-color: #05b1b4; +} +.el-button--green:focus { + color: #fff; + background-color: #22c1c3; + border-color: #22c1c3; +} + +.el-button--yellow:hover { + color: #fff; + background-color: #fa9200; + border-color: #fa9200; +} +.el-button--yellow:focus { + color: #fff; + background-color: #feb349; + border-color: #feb349; +} +.el-button--yellow { + color: #fff; + background-color: #feb349; + border-color: #feb349; +} +.el-button--blue:focus { + color: #fff; + background-color: #2195fe; + border-color: #2195fe; +} +.el-button--blue:hover { + color: #fff; + background-color: #0083fd; + border-color: #0083fd; +} +.el-button--blue { + color: #fff; + background-color: #2195fe; + border-color: #2195fe; +} +.el-button--red:focus { + color: #fff; + background-color: #fe6252; + border-color: #fe6252; +} +.el-button--red:hover { + color: #fff; + background-color: #fd341e; + border-color: #fd341e; +} +.el-button--red { + color: #fff; + background-color: #fe6252; + border-color: #fe6252; +} diff --git a/src/views/modules/base/community/buildForm.vue b/src/views/modules/base/community/buildForm.vue index e7d957e5..96a222c0 100644 --- a/src/views/modules/base/community/buildForm.vue +++ b/src/views/modules/base/community/buildForm.vue @@ -35,14 +35,14 @@ 别墅 - - + --> - @@ -108,6 +108,7 @@ 取 消 确 定 @@ -126,7 +127,7 @@ export default { data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - + btnDisable: false, buildingId: '', //楼栋ID buildType: "1", dataForm: { @@ -135,7 +136,7 @@ export default { gridId: '', //所属网格ID neighborHoodId: '',//所属小区id buildingName: '',//房屋名称 - sort: 0,//排序 + // sort: 0,//排序 totalUnitNum: 0,//单元数 totalFloorNum: 0,//层数 totalHouseNum: 0,//户数 @@ -176,9 +177,14 @@ export default { }, async handleComfirm () { + this.btnDisable = true + setTimeout(() => { + this.btnDisable = false + }, 10000) this.dataForm.type = this.buildType this.$refs['ref_form'].validate((valid, messageObj) => { if (!valid) { + this.btnDisable = false app.util.validateRule(messageObj) } else { this.addBuild() @@ -187,6 +193,7 @@ export default { }) }, async addBuild () { + let url = '' if (this.formType === 'add') { url = '/gov/org/building/buildingadd' @@ -196,7 +203,6 @@ export default { this.dataForm.buildingId = this.buildingId } - const { data, code, msg } = await requestPost(url, this.dataForm) if (code === 0) { @@ -205,8 +211,11 @@ export default { message: '操作成功' }) this.resetData() + this.btnDisable = false this.$emit('dialogOk') + } else { + this.btnDisable = false this.$message.error(msg) } @@ -305,7 +314,7 @@ export default { gridId: '', //所属网格ID neighborHoodId: '',//所属小区id buildingName: '',//房屋名称 - sort: 0,//排序 + // sort: 0,//排序 totalUnitNum: 0,//单元数 totalFloorNum: 0,//层数 totalHouseNum: 0,//户数 @@ -376,6 +385,9 @@ export default { margin-left: 10px; width: 200px; } +.item_width_4 { + width: 200px; +} .div_map { margin-top: 10px; diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 651a961c..3ca4fdd4 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -61,6 +61,7 @@