1、代码格式化

2、排水井新增位置
liujun0703-新项目开发
liujun 2024-08-10 15:41:10 +08:00
parent 2974f0185d
commit 4c0157d65a
3 changed files with 77 additions and 32 deletions

View File

@ -48,10 +48,14 @@
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px"> <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px"> <el-form ref="form" :rules="rules" :model="form" label-width="100px" style="margin-right: 50px">
<el-row>
<el-col :span="12">
<el-form-item label="名称" prop="NAME"> <el-form-item label="名称" prop="NAME">
<el-input v-model="form.NAME" placeholder="请输入名称..." /> <el-input v-model="form.NAME" placeholder="请输入名称..." />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="类型" prop="TYPE"> <el-form-item label="类型" prop="TYPE">
<Treeselect <Treeselect
:options="yjTypeData" :options="yjTypeData"
@ -63,24 +67,54 @@
@input="handleTypeChange" @input="handleTypeChange"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="ADDRESS"> <el-form-item label="地址" prop="ADDRESS">
<el-input v-model="form.ADDRESS" placeholder="请输入地址..." /> <el-input v-model="form.ADDRESS" placeholder="请输入地址..." />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="CONTACT_PERSON"> <el-form-item label="联系人" prop="CONTACT_PERSON">
<el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." /> <el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="CONTACT_PHONE"> <el-form-item label="联系电话" prop="CONTACT_PHONE">
<el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." /> <el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="DESCRIPTION"> <el-form-item label="描述" prop="DESCRIPTION">
<el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." /> <el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item :key="form.LONGITUDE" label="经度" prop="LONGITUDE">
<el-input v-model="form.LONGITUDE" placeholder="请输入内容" disabled @focus="handleMap" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :key="form.LATITUDE" label="纬度" prop="LATITUDE">
<div style="display: flex">
<el-input v-model="form.LATITUDE" placeholder="请输入内容" disabled style="width: 100%" @focus="handleMap"/>
<el-button style="margin-left:10px" @click="handleMap">
<span class="svg-container">
<svg-icon icon-class="international" />
</span>
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false">取消</el-button> <el-button @click="dialogFormEdit = false">取消</el-button>
<el-button type="primary" @click="confirm"></el-button> <el-button type="primary" @click="confirm"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<get-point ref="getPoint" @getPosition = "getPosition"/>
</div> </div>
</template> </template>
@ -89,9 +123,10 @@ import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import { Treeselect } from '@riophae/vue-treeselect' import { Treeselect } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import getPoint from '../../util/getPoint.vue'
export default { export default {
components: { Treeselect, Pagination }, components: { getPoint, Treeselect, Pagination },
data() { data() {
return { return {
listQuery: { listQuery: {
@ -113,7 +148,9 @@ export default {
ADDRESS: '', ADDRESS: '',
CONTACT_PERSON: '', CONTACT_PERSON: '',
CONTACT_PHONE: '', CONTACT_PHONE: '',
DESCRIPTION: '' DESCRIPTION: '',
LATITUDE: '',
LONGITUDE: ''
}, },
rules: { rules: {
NAME: [ NAME: [
@ -191,7 +228,9 @@ export default {
ADDRESS: data.ADDRESS, ADDRESS: data.ADDRESS,
CONTACT_PERSON: data.CONTACT_PERSON, CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_PHONE: data.CONTACT_PHONE, CONTACT_PHONE: data.CONTACT_PHONE,
DESCRIPTION: data.DESCRIPTION DESCRIPTION: data.DESCRIPTION,
LONGITUDE: data.LONGITUDE,
LATITUDE: data.LATITUDE
} }
}).catch((e) => { }).catch((e) => {
console.error('获取详情数据失败', e) console.error('获取详情数据失败', e)
@ -276,6 +315,13 @@ export default {
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
},
getPosition(e) {
this.form.LATITUDE = e.LATITUDE
this.form.LONGITUDE = e.LONGITUDE
},
handleMap() {
this.$refs.getPoint.init({ LATITUDE: this.form.LATITUDE, LONGITUDE: this.form.LONGITUDE })
} }
} }
} }

View File

@ -346,7 +346,6 @@ export default {
getPosition(e) { getPosition(e) {
this.form.LATITUDE = e.LATITUDE this.form.LATITUDE = e.LATITUDE
this.form.LONGITUDE = e.LONGITUDE this.form.LONGITUDE = e.LONGITUDE
console.log(this.form)
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :visible.sync="visible" title="编辑坐标" width="800px" class="dy-dialog"> <el-dialog :visible.sync="visible" title="编辑坐标" width="800px" class="dy-dialog" append-to-body>
<baidu-map <baidu-map
:zoom="zoom" :zoom="zoom"
:scroll-wheel-zoom="true" :scroll-wheel-zoom="true"