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