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="地址" label="地址"
mix-width="230"> mix-width="230">
</el-table-column> </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="操作" <el-table-column label="操作"
fixed="right" fixed="right"
width="250" width="200"
header-align="center" header-align="center"
align="center" align="center"
class="operate"> class="operate">

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

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

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

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

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

@ -116,9 +116,23 @@
label="地址" label="地址"
mix-width="230"> mix-width="230">
</el-table-column> </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="操作" <el-table-column label="操作"
fixed="right" fixed="right"
width="250" width="200"
header-align="center" header-align="center"
align="center" align="center"
class="operate"> class="operate">
@ -619,8 +633,8 @@ export default {
} }
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss"; @import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss"; @import "@/assets/scss/modules/management/list-main.scss";
.div_main { .div_main {
width: 100%; width: 100%;
} }

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

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

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

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

Loading…
Cancel
Save