Browse Source

需求2

master
jiangyy 3 years ago
parent
commit
b23c3e92df
  1. 16
      src/views/modules/shequzhili/csgltc/csgl.vue
  2. 17
      src/views/modules/shequzhili/csgltc/csglDetail.vue
  3. 43
      src/views/modules/shequzhili/csgltc/csglForm.vue
  4. 20
      src/views/modules/shequzhili/ggfwtc/ggfw.vue
  5. 43
      src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue
  6. 72
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

16
src/views/modules/shequzhili/csgltc/csgl.vue

@ -118,10 +118,24 @@
label="地址"
mix-width="230">
</el-table-column>
<el-table-column prop="principal"
header-align="center"
align="center"
show-overflow-tooltip
label="负责人"
width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
show-overflow-tooltip
label="联系电话"
width="130">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="250"
width="200"
header-align="center"
align="center"
class="operate">

17
src/views/modules/shequzhili/csgltc/csglDetail.vue

@ -35,13 +35,26 @@
style="display: block">
<span>{{formData.capacity}}</span>
</el-form-item>
<el-form-item label="负责人:"
prop="principal"
label-width="150px"
style="display: block">
<span>{{formData.principal}}</span>
</el-form-item>
<el-form-item label="联系电话:"
prop="mobile"
label-width="150px"
style="display: block">
<span>{{formData.mobile}}</span>
</el-form-item>
<el-form-item label="地址:"
style="display: block"
prop="address"
label-width="150px">
<div class="item_width_1">
<span>{{formData.address}}</span>
<div id="app" class="div_map"></div>
<div id="app"
class="div_map"></div>
</div>
</el-form-item>
@ -100,7 +113,7 @@ export default {
initMap () {
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat'+latitude+',lon'+longitude)
console.log('lat' + latitude + ',lon' + longitude)
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;

43
src/views/modules/shequzhili/csgltc/csglForm.vue

@ -78,22 +78,39 @@
:max="9999"
label="容纳人数"></el-input-number>
</el-form-item>
<el-form-item label="负责人"
style="display: block"
label-width="150px"
prop="principal">
<el-input v-model="formData.principal"
class="item_width_1"
placeholder="请输入负责人姓名"></el-input>
</el-form-item>
<el-form-item label="联系电话"
style="display: block"
label-width="150px"
prop="mobile">
<el-input v-model="formData.mobile"
class="item_width_1"
placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="地址"
prop="address"
label-width="150px"
style="display: block">
<div class="item_width_1">
<el-input
style="width:420px"
<el-input style="width:420px"
:placeholder="'请输入所在地址'"
v-model="formData.address">
</el-input>
<el-button
style="margin-left: 10px"
<el-button style="margin-left: 10px"
type="default"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app" class="div_map"></div>
<div id="app"
class="div_map"></div>
</div>
</el-form-item>
</el-form>
@ -141,7 +158,9 @@ export default {
capacity: 0,//
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
latitude: 120.38945519, //
principal: '',
mobile: ''
},
cityManagement: {
@ -205,14 +224,14 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
if (null != data){
data : this.cityManagement
if (null != data) {
data: this.cityManagement
}
this.formData = { ...data }
// let { latitude, longitude } = this.$store.state.user;
// const lat = this.formData.latitude === null || this.formData.latitude === '' ? latitude : this.formData.latitude;
// const lon = this.formData.longitude === null || this.formData.longitude === '' ? longitude : this.formData.longitude;
if (this.formData.latitude !== null && this.formData.latitude !== '' && this.formData.longitude !== null && this.formData.longitude !== ''){
if (this.formData.latitude !== null && this.formData.latitude !== '' && this.formData.longitude !== null && this.formData.longitude !== '') {
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
}
@ -243,9 +262,9 @@ export default {
},
async addUnit () {
let url = ''
if (this.formType === 'add'){
if (this.formType === 'add') {
url = '/gov/org/icCityManagement/add'
}else {
} else {
url = '/gov/org/icCityManagement/edit'
}
const { data, code, msg, internalMsg } = await requestPost(url, this.formData)
@ -273,7 +292,7 @@ export default {
initMap () {
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat'+latitude+',lon'+longitude)
console.log('lat' + latitude + ',lon' + longitude)
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;

20
src/views/modules/shequzhili/ggfwtc/ggfw.vue

@ -116,9 +116,23 @@
label="地址"
mix-width="230">
</el-table-column>
<el-table-column prop="principal"
header-align="center"
align="center"
show-overflow-tooltip
label="负责人"
width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
show-overflow-tooltip
label="联系电话"
width="130">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="250"
width="200"
header-align="center"
align="center"
class="operate">
@ -619,8 +633,8 @@ export default {
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.div_main {
width: 100%;
}

43
src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue

@ -35,13 +35,26 @@
style="display: block">
<span>{{formData.capacity}}</span>
</el-form-item>
<el-form-item label="负责人:"
prop="principal"
label-width="150px"
style="display: block">
<span>{{formData.principal}}</span>
</el-form-item>
<el-form-item label="联系电话:"
prop="mobile"
label-width="150px"
style="display: block">
<span>{{formData.mobile}}</span>
</el-form-item>
<el-form-item label="地址:"
style="display: block"
prop="address"
label-width="150px">
<div class="item_width_1">
<span>{{formData.address}}</span>
<div id="app" class="div_map"></div>
<div id="app"
class="div_map"></div>
</div>
</el-form-item>
</el-form>
@ -57,16 +70,16 @@
<script>
import { Loading } from 'element-ui' // Loading
import { Loading } from 'element-ui' // Loading
var map
var search
var markers
var infoWindowList
var geocoder //
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
let loading //
export default {
data () {
return {
formData: {},
@ -227,23 +240,23 @@
props: {
}
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style scoped>
.detail_span {
.detail_span {
width: 500px;
font-weight: bold;
text-align: left;
margin: 0 0;
font-size: 16px;
}
}
.form {
.form {
margin-top: 30px;
}
}
</style>

72
src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

@ -60,22 +60,38 @@
:max="9999"
label="容纳人数"></el-input-number>
</el-form-item>
<el-form-item label="负责人"
style="display: block"
label-width="150px"
prop="principal">
<el-input v-model="formData.principal"
class="item_width_1"
placeholder="请输入负责人姓名"></el-input>
</el-form-item>
<el-form-item label="联系电话"
style="display: block"
label-width="150px"
prop="mobile">
<el-input v-model="formData.mobile"
class="item_width_1"
placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="地址"
prop="address"
label-width="150px"
style="display: block">
<div class="item_width_1">
<el-input
style="width:420px"
<el-input style="width:420px"
:placeholder="'请输入所在地址'"
v-model="formData.address">
</el-input>
<el-button
style="margin-left: 10px"
<el-button style="margin-left: 10px"
type="default"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app" class="div_map"></div>
<div id="app"
class="div_map"></div>
</div>
</el-form-item>
</el-form>
@ -94,20 +110,20 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
@ -123,7 +139,9 @@
capacity: '',//
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
latitude: 120.38945519, //
principal: '',
mobile: ''
},
serviceList: [],//list
publicServiceData: {},
@ -193,7 +211,7 @@
// let { latitude, longitude } = this.$store.state.user;
// const lat = this.formData.latitude === null || this.formData.latitude === '' ? '' : this.formData.latitude;
// const lon = this.formData.longitude === null || this.formData.longitude === '' ? '' : this.formData.longitude;
if (this.formData.latitude !== null && this.formData.latitude !== '' && this.formData.longitude !== null && this.formData.longitude !== ''){
if (this.formData.latitude !== null && this.formData.latitude !== '' && this.formData.longitude !== null && this.formData.longitude !== '') {
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
}
@ -224,12 +242,12 @@
},
async addUnit () {
let url = ''
if (this.formType === 'add'){
if (this.formType === 'add') {
url = '/gov/org/icPublicService/add'
}else {
} else {
url = '/gov/org/icPublicService/edit'
}
const { data, code, msg,internalMsg } = await requestPost(url, this.formData)
const { data, code, msg, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
@ -254,7 +272,7 @@
// init
initMap () {
let { latitude, longitude } = this.$store.state.user;
console.log('lat'+latitude+',lon'+longitude)
console.log('lat' + latitude + ',lon' + longitude)
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
@ -431,20 +449,20 @@
},
}
}
}
</script>
<style scoped>
.div_map {
.div_map {
position: relative;
}
.div_searchmap {
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>

Loading…
Cancel
Save