BUG 29594
This commit is contained in:
		| @@ -12,7 +12,7 @@ import Add from './components/Add' | ||||
| import BuildMsg from './components/BuildMsg' | ||||
|  | ||||
| export default { | ||||
|   label: '楼栋管理', | ||||
|   label: '楼栋管理(sass)', | ||||
|   name: 'AppBuildManage', | ||||
|   props: { | ||||
|     instance: Function, | ||||
| @@ -41,7 +41,7 @@ export default { | ||||
|  | ||||
|       if (data.type === 'buildmsg') { | ||||
|         this.component = 'BuildMsg' | ||||
|         this.params = { ...data.params } | ||||
|         this.params = {...data.params} | ||||
|       } | ||||
|  | ||||
|       if (data.type == 'list') { | ||||
|   | ||||
| @@ -12,18 +12,19 @@ | ||||
|           <ai-bar title="基础信息"></ai-bar> | ||||
|           <el-form-item label="小区名称" prop="communityName" class="line" ref="communityNameContent"> | ||||
|             <!-- 选择小区 --> | ||||
|             <ai-select v-if="instance" :instance="instance" v-model="formData.communityId" action="/app/appcommunityinfo/listAll" :prop="{ label: 'communityName' }"></ai-select> | ||||
|             <ai-select v-if="instance" :instance="instance" v-model="formData.communityId" action="/app/appcommunityinfo/listAll" | ||||
|                        :prop="{ label: 'communityName' }"></ai-select> | ||||
|           </el-form-item> | ||||
|  | ||||
|           <div class="flex"> | ||||
|             <!-- 楼栋号 --> | ||||
|             <el-form-item label="楼栋号" prop="buildingNumber" :rules="[{ required: true, message: '请输入楼栋号', trigger: 'blur' }]"> | ||||
|               <el-input size="small" v-model="formData.buildingNumber" placeholder="请输入" clearable :disabled="isEdit" /> | ||||
|               <el-input size="small" v-model="formData.buildingNumber" placeholder="请输入" clearable :disabled="isEdit"/> | ||||
|             </el-form-item> | ||||
|  | ||||
|             <!-- 单元数 --> | ||||
|             <el-form-item label="单元数" prop="unitNumber"> | ||||
|               <el-input size="small" v-model.number="formData.unitNumber" placeholder="请输入" clearable :disabled="isEdit" /> | ||||
|               <el-input size="small" v-model.number="formData.unitNumber" placeholder="请输入" clearable :disabled="isEdit"/> | ||||
|             </el-form-item> | ||||
|  | ||||
|             <!-- 起始计数层数 --> | ||||
| @@ -96,28 +97,22 @@ | ||||
|         <el-button type="primary" @click="confirm()">提交</el-button> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
|     <ai-dialog title="地图" :visible.sync="showMap" @opened="getCorpLocation" width="800px" class="mapDialog" @onConfirm="selectMap"> | ||||
|     <ai-dialog title="地图" :visible.sync="showMap" @opened="getCorpLocation" width="800px" class="mapDialog" @onConfirm="selectMap" fullscreen> | ||||
|       <div id="map"></div> | ||||
|       <el-form label-width="80px" style="padding: 10px 20px 0 20px;"> | ||||
|         <el-row type="flex" justify="space-between"> | ||||
|           <el-form-item label="经度"> | ||||
|             <el-input disabled size="small" v-model="placeDetail.lng"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="纬度"> | ||||
|             <el-input disabled size="small" v-model="placeDetail.lat"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-row> | ||||
|       <el-form label-position="left"> | ||||
|         <el-form-item label="经纬度">{{ [placeDetail.lng, placeDetail.lat].toString() }}</el-form-item> | ||||
|       </el-form> | ||||
|       <el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" @change="placeSearch.search(searchPlace)" placeholder="请输入关键字"> | ||||
|       <el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" | ||||
|                 @change="placeSearch.search(searchPlace)" placeholder="请输入关键字"> | ||||
|         <el-button type="primary" slot="append" @click="placeSearch.search(searchPlace)">搜索</el-button> | ||||
|       </el-input> | ||||
|       <div id="searchPlaceOutput" /> | ||||
|       <div id="searchPlaceOutput"/> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapState } from 'vuex' | ||||
| import {mapState} from 'vuex' | ||||
| import AMapLoader from '@amap/amap-jsapi-loader' | ||||
|  | ||||
| export default { | ||||
| @@ -148,33 +143,33 @@ export default { | ||||
|       }, | ||||
|       formRules: { | ||||
|         unitNumber: [ | ||||
|           { required: true, message: '请输入单元数', trigger: 'change' }, | ||||
|           {required: true, message: '请输入单元数', trigger: 'change'}, | ||||
|           { | ||||
|             validator: (r, v, cb) => (!v || /^[1-9]\d*|0$/g.test(v) ? cb() : cb('请输入正整数')), | ||||
|           }, | ||||
|         ], | ||||
|         layerStart: [ | ||||
|           { required: true, message: '请输入起始计数层数', trigger: 'change' }, | ||||
|           {required: true, message: '请输入起始计数层数', trigger: 'change'}, | ||||
|           { | ||||
|             validator: (r, v, cb) => (!v || /^[1-9]\d*|0$/g.test(v) ? cb() : cb('请输入正整数')), | ||||
|           }, | ||||
|         ], | ||||
|  | ||||
|         layerNumber: [ | ||||
|           { required: true, message: '请输入最高层数', trigger: 'change' }, | ||||
|           {required: true, message: '请输入最高层数', trigger: 'change'}, | ||||
|           { | ||||
|             validator: (r, v, cb) => (!v || /^[1-9]\d*|0$/g.test(v) ? cb() : cb('请输入正整数')), | ||||
|           }, | ||||
|         ], | ||||
|         householdStart: [ | ||||
|           { required: true, message: '请输入起始计数户数', trigger: 'change' }, | ||||
|           {required: true, message: '请输入起始计数户数', trigger: 'change'}, | ||||
|           { | ||||
|             validator: (r, v, cb) => (!v || /^[1-9]\d*|0$/g.test(v) ? cb() : cb('请输入正整数')), | ||||
|           }, | ||||
|         ], | ||||
|  | ||||
|         householdNumber: [ | ||||
|           { required: true, message: '请输入每层户数', trigger: 'change' }, | ||||
|           {required: true, message: '请输入每层户数', trigger: 'change'}, | ||||
|           { | ||||
|             validator: (r, v, cb) => (!v || /^[1-9]\d*|0$/g.test(v) ? cb() : cb('请输入正整数')), | ||||
|           }, | ||||
| @@ -226,7 +221,7 @@ export default { | ||||
|           zooms: [6, 20], | ||||
|           zoom: 11, | ||||
|         }) | ||||
|         this.placeSearch = new AMap.PlaceSearch({ map: this.map }) | ||||
|         this.placeSearch = new AMap.PlaceSearch({map: this.map}) | ||||
|         new AMap.AutoComplete({ | ||||
|           input: 'searchPlaceInput', | ||||
|           output: 'searchPlaceOutput', | ||||
| @@ -267,33 +262,33 @@ export default { | ||||
|  | ||||
|     getListinfo() { | ||||
|       return this.instance | ||||
|         .post('/app/appcommunitybuildinginfo/queryDetailById', null, { | ||||
|           params: { | ||||
|             id: this.params.id, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.data) { | ||||
|             this.formData = res.data | ||||
|           } | ||||
|         }) | ||||
|       .post('/app/appcommunitybuildinginfo/queryDetailById', null, { | ||||
|         params: { | ||||
|           id: this.params.id, | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|         if (res.data) { | ||||
|           this.formData = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     confirm() { | ||||
|       this.$refs['ruleForm'].validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.instance | ||||
|             .post(`/app/appcommunitybuildinginfo/addOrUpdate`, { | ||||
|               ...this.formData, | ||||
|             }) | ||||
|             .then((res) => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功') | ||||
|                 setTimeout(() => { | ||||
|                   this.cancel(true) | ||||
|                 }, 1000) | ||||
|               } | ||||
|             }) | ||||
|           .post(`/app/appcommunitybuildinginfo/addOrUpdate`, { | ||||
|             ...this.formData, | ||||
|           }) | ||||
|           .then((res) => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('提交成功') | ||||
|               setTimeout(() => { | ||||
|                 this.cancel(true) | ||||
|               }, 1000) | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
| @@ -317,29 +312,36 @@ export default { | ||||
| <style lang="scss" scoped> | ||||
| .AppBuildManage { | ||||
|   ::v-deep .amap-logo { | ||||
|     display: none!important; | ||||
|     display: none !important; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .amap-copyright { | ||||
|     display: none!important; | ||||
|     display: none !important; | ||||
|   } | ||||
| } | ||||
|  | ||||
| .Add { | ||||
|   height: 100%; | ||||
|  | ||||
|   .ai-detail__title { | ||||
|     background-color: #fff; | ||||
|   } | ||||
|  | ||||
|   .ai-detail__content { | ||||
|     .ai-detail__content--wrapper { | ||||
|       .el-form { | ||||
|         background-color: #fff; | ||||
|         padding: 0 60px; | ||||
|  | ||||
|         .flex { | ||||
|           display: flex; | ||||
|           flex-wrap: wrap; | ||||
|           justify-content: space-between; | ||||
|  | ||||
|           .el-form-item { | ||||
|             width: 48%; | ||||
|           } | ||||
|  | ||||
|           .buildingTypes { | ||||
|             width: 100%; | ||||
|           } | ||||
| @@ -350,11 +352,20 @@ export default { | ||||
| } | ||||
|  | ||||
| ::v-deep .mapDialog { | ||||
|   .el-dialog { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|   } | ||||
|  | ||||
|   .el-dialog__body { | ||||
|     padding: 0; | ||||
|     flex: 1; | ||||
|     min-height: 0; | ||||
|  | ||||
|     .ai-dialog__content { | ||||
|       padding: 0; | ||||
|       max-height: unset !important; | ||||
|       height: 100%; | ||||
|     } | ||||
|  | ||||
|     .ai-dialog__content--wrapper { | ||||
| @@ -364,7 +375,7 @@ export default { | ||||
|  | ||||
|     #map { | ||||
|       width: 100%; | ||||
|       height: 420px; | ||||
|       height: 100%; | ||||
|     } | ||||
|  | ||||
|     .searchPlaceInput { | ||||
| @@ -374,6 +385,21 @@ export default { | ||||
|       left: 25px; | ||||
|     } | ||||
|  | ||||
|     .el-form { | ||||
|       position: absolute; | ||||
|       width: 230px; | ||||
|       right: 25px; | ||||
|       top: 20px; | ||||
|       background: rgba(#fff, .8); | ||||
|       color: #26f; | ||||
|       padding: 0 16px; | ||||
|       box-sizing: border-box; | ||||
|  | ||||
|       .el-form-item { | ||||
|         margin: 0; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     #searchPlaceOutput { | ||||
|       position: absolute; | ||||
|       width: 250px; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user