Browse Source

Merge branch 'dev-tuceng0616' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-tuceng0616

feature
dai 3 years ago
parent
commit
b8e4d29687
  1. 324
      src/assets/scss/modules/visual/fiveLayerMap.scss
  2. 11
      src/views/modules/shequzhili/csgltc/csgl.vue
  3. 240
      src/views/modules/shequzhili/ggfwtc/ggfw.vue
  4. 387
      src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue
  5. 712
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue
  6. 805
      src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue
  7. 93
      src/views/modules/visual/cpts/tb.vue

324
src/assets/scss/modules/visual/fiveLayerMap.scss

@ -49,62 +49,9 @@
}
.div_data {
flex: 0 0 622px;
flex: 0 0 600px;
margin-left: 12px;
.div_search {
width: 100%;
height: 56px;
text-align: center;
background-color: #011168;
border-radius: 4px 0 0 4px;
border: none;
box-shadow: 0 0 10px inset #1a5afd;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
opacity: 0.7;
display: flex;
justify-content: space-between;
.div_search_left {
display: flex;
justify-content: flex-start;
.icon {
display: flex;
align-items: center;
margin-left: 29px;
> img {
width: 24px;
height: 24px;
}
}
> span {
line-height: 56px;
margin-left: 10px;
}
}
.btn {
text-align: center;
flex: 0 0 113px;
height: 56px;
background: linear-gradient(90deg, #1a5afd, #26c4ff);
font-size: 20px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 56px;
border-radius: 0 4px 4px 0;
}
}
.div_search:hover {
cursor: pointer;
}
.div_tips{
box-sizing: border-box;
width: 100%;
@ -115,7 +62,7 @@
background-size: 100% 100%;
.div_coverage{
padding: 30px 20px 30px 20px;
padding: 30px 10px 32px 10px;
display: flex;
justify-content: space-around;
@ -143,192 +90,155 @@
.div_category {
box-sizing: border-box;
width: 100%;
height:238px;
padding:0 20px 20px;
.info_loading {
margin-top: 50px;
}
.info_tip {
padding: 31px 0 0 19px;
.category_item {
margin-bottom: 15px;
display: flex;
> img {
height: 34px;
width: 46px;
}
.tip_title {
line-height: 34px;
margin-left: 7px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
}
}
.info_list {
margin-top: 9px;
.item {
.item_line {
margin-top: 13px;
margin-left: 24px;
width: 517px;
height: 0px;
border: 1px dotted #1797ff31;
border-width: 0.5px;
justify-content: start;
// margin:auto;
.list_item {
// padding: 18px 59px 0;
justify-content: start;
flex:0 0 135px;
> img {
height: 18px;
width: 18px;
}
.last_line {
border: 1px dotted #1797ff00;
.item_content{
width:100px;
margin-left:8px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #e5effa;
}
.list_item {
display: flex;
padding: 18px 59px 0;
justify-content: space-between;
.list_item_col {
flex: 0 0 240px;
display: flex;
> img {
height: 76px;
width: 76px;
}
.item_content {
margin-left: 10px;
height: 76px;
display: flex;
flex-direction: column;
justify-content: center;
.item_label {
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
.item_count {
margin-top: 10px;
font-size: 28px;
font-family: PingFang SC;
font-weight: bold;
color: #00fffc;
}
}
}
.item_content_sel{
color: #5da8fd;
}
}
.list_item:hover{
cursor: pointer;
}
::v-deep .el-popper {
padding: 0px;
}
//
}
}
}
.div_category {
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
}
}
.div_info {
box-sizing: border-box;
width: 100%;
margin-top:10px;
height: calc(88vh - 302px - 10px);
color: #fff;
background: url('../../../img/modules/visual/warning-box.png') no-repeat
center;
background-size: 100% 100%;
// padding: 45px 21px 35px 24px;
padding: 32px 21px 20px 20px;
.info_loading {
margin-top: 50px;
}
.info_tip {
padding: 31px 0 0 19px;
.div_search_list {
margin: 0 auto;
text-align: center;
width: 559px;
height: 48px;
background: #01106800;
border-radius: 8px;
display: flex;
> img {
height: 34px;
width: 46px;
justify-content: flex-end;
.icon {
display: flex;
align-items: center;
margin-left: 29px;
margin-top: 16px;
> img {
width: 24px;
height: 24px;
}
}
.tip_title {
line-height: 34px;
margin-left: 7px;
font-size: 22px;
.btn {
text-align: center;
flex: 0 0 113px;
height: 53px;
background: #0082fb;
border-radius: 0px 8px 8px 0px;
font-size: 20px;
font-family: PingFang SC;
font-weight: 800;
font-weight: 400;
color: #ffffff;
line-height: 53px;
}
.btn:hover {
cursor: pointer;
}
}
.info_list {
margin-top: 9px;
.item {
.item_line {
margin-top: 13px;
margin-left: 24px;
width: 517px;
height: 0px;
border: 1px dotted #1797ff31;
border-width: 0.5px;
}
.last_line {
border: 1px dotted #1797ff00;
}
.list_item {
display: flex;
padding: 18px 59px 0;
justify-content: space-between;
.list_item_col {
flex: 0 0 240px;
display: flex;
> img {
height: 76px;
width: 76px;
}
.item_content {
margin-left: 10px;
height: 76px;
display: flex;
flex-direction: column;
justify-content: center;
.item_label {
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
.item_count {
margin-top: 10px;
font-size: 28px;
font-family: PingFang SC;
font-weight: bold;
color: #00fffc;
}
}
}
}
::v-deep .el-popper {
padding: 0px;
}
//
.tb {
height: calc(88vh - 302px - 10px);
overflow-y: auto;
@include scrollBar;
margin-top:20px;
}
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 5px;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}
}
.div_tips {
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
}
}
}

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

@ -48,7 +48,10 @@
<el-button class="diy-button--delete"
size="small"
@click="handleAdd">新增</el-button>
<el-button class="diy-button--delete"
style="margin-left:10px"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
@ -58,10 +61,6 @@
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button class="diy-button--delete"
style="margin-left:10px"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入</el-button>
@ -176,7 +175,7 @@
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'单位详情'"
:title="'城市管理详情'"
width="950px"
top="5vh"
class="dialog-h"

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

@ -7,9 +7,9 @@
:label-width="'100px'">
<div>
<el-form-item label="单位名称"
prop="unitName">
<el-input v-model="formData.unitName"
<el-form-item label="场所名称"
prop="name">
<el-input v-model="formData.name"
class="item_width_1"
clearable
size="small"
@ -17,62 +17,22 @@
</el-input>
</el-form-item>
<el-form-item label="服务事项"
<el-form-item label="场所分类"
prop="serviceMatter">
<el-select class="item_width_2"
v-model="formData.serviceMatter"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in serviceList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="分类"
prop="type">
<el-select class="item_width_1"
v-model="formData.type"
v-model="formData.category"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
<el-option v-for="item in serviceList"
:key="item.categoryKey"
:label="item.categoryName"
:value="item.categoryKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="联系人"
prop="contact">
<el-input v-model="formData.contact"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile">
<el-input v-model="formData.contactMobile"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-button style="margin-left:10px"
class="diy-button--search"
class="diy-button--delete"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
@ -84,10 +44,14 @@
</div>
<div class="div_table">
<div class="div_btn">
<el-button class="diy-button--add"
<el-button class="diy-button--delete"
size="small"
@click="handleAdd">新增</el-button>
<!--
<el-button class="diy-button--delete"
style="margin-left:10px"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
@ -98,15 +62,13 @@
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入</el-button>
class="diy-button--delete"
size="small">导入</el-button>
</el-upload>
<el-button style="float:left"
class="diy-button--reset"
<el-button style="float:left;margin-left:10px"
class="diy-button--delete"
size="small"
@click="handleExport">导出</el-button>-->
@click="handleExport">导出</el-button>
</div>
<el-table class="table"
@ -122,69 +84,37 @@
type="index"
width="50"></el-table-column>
<el-table-column prop="unitName"
<el-table-column prop="name"
header-align="center"
align="center"
label="单位名称"
label="场所名称"
min-width="100">
</el-table-column>
<el-table-column prop="type"
<el-table-column prop="categoryName"
header-align="center"
align="center"
label="分类"
label="场所类别"
min-width="80">
</el-table-column>
<el-table-column prop="serviceMatterListShow"
<el-table-column prop="areaCovered"
header-align="center"
align="center"
label="服务事项"
label="占地面积"
show-overflow-tooltip
min-width="250">
<!-- <template slot-scope="scope">
<p style="text-align:center;margin:2px 0;"
v-for="(item,index) in scope.row.serviceMatterList"
:key="index">{{item}}</p>
</template> -->
</el-table-column>
<el-table-column prop="contact"
<el-table-column prop="capacity"
header-align="center"
align="center"
label="联系人"
label="容纳人数"
width="80">
</el-table-column>
<el-table-column prop="contactMobile"
<el-table-column prop="address"
header-align="center"
align="center"
label="联系电话"
label="地址"
width="120">
</el-table-column>
<el-table-column prop="memberCount"
header-align="center"
align="center"
label="在职党员数"
width="100">
</el-table-column>
<el-table-column prop="satisfaction"
header-align="center"
align="center"
label="群众满意度"
width="100">
</el-table-column>
<el-table-column prop="score"
header-align="center"
align="center"
label="积分"
width="80">
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
width="150">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="250"
@ -201,15 +131,6 @@
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleFinish(scope.row)">完成情况</el-button>
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleScore(scope.row)">积分记录</el-button>
<el-button type="text"
class="div-table-button--delete"
size="small"
@ -249,7 +170,7 @@
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'单位详情'"
:title="'公共服务详情'"
width="950px"
top="5vh"
class="dialog-h"
@ -284,16 +205,10 @@ export default {
unitList: [],//list
serviceList: [],//list
typeList: [],//list
unitId: '',
formData: {
unitName: '',
serviceMatter: '',
type: '',
contact: '',
contactMobile: ''
name: '',
category: ''
},
tableData: [],
//form
@ -310,7 +225,7 @@ export default {
files: "",
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import'
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/icPublicService/import'
}
},
@ -337,12 +252,48 @@ export default {
handleSearch () {
this.loadTable()
},
async handleExportModule () {
let url = "/gov/org/icPublicService/download";
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
const url = "/gov/org/coverage/dict-select-list/public_service"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/coverage/dict-select-list/public_service"
let params = {
// parentCategoryCode: '1010'
}
@ -379,12 +330,11 @@ export default {
async loadTable () {
this.tableLoading = true
const url = "/heart/icpartyunit/list"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/list"
const url = "/gov/org/icPublicService/list"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/list"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
agencyId: this.agencyId,
...this.formData
}
@ -392,16 +342,7 @@ export default {
if (code === 0) {
this.total = data.total
data.list.forEach(element => {
if (element.serviceMatterList.length > 0) {
element.serviceMatterListShow = element.serviceMatterList.join(',')
} else {
element.serviceMatterListShow = ''
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
}
@ -427,7 +368,7 @@ export default {
//
handleFinish (row) {
this.finishDiaTitle = row.unitName + '完成情况'
this.finishDiaTitle = row.name + '完成情况'
this.finishDiaShow = true
this.$nextTick(() => {
this.$refs.ref_finish.initTable(row)
@ -437,7 +378,7 @@ export default {
handleScore (row) {
this.scoreDiaShow = true
this.$nextTick(() => {
this.$refs.ref_score.initForm(row.id)
this.$refs.ref_score.initForm(row.icPublicServiceId)
})
},
@ -453,7 +394,7 @@ export default {
this.formTitle = '修改'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.id)
this.$refs.ref_form.initForm('edit', row.icPublicServiceId)
})
},
@ -485,11 +426,11 @@ export default {
},
async deleteUnit (row) {
const url = "/heart/icpartyunit/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
const url = "/gov/org/icPublicService/del"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/del"
let params = {
id: row.id
icPublicServiceId: row.icPublicServiceId
}
const { data, code, msg } = await requestPost(url, params)
@ -509,11 +450,8 @@ export default {
//
resetSearch () {
this.formData = {
unitName: '',
serviceMatter: '',
type: '',
contact: '',
contactMobile: ''
name: '',
category: ''
}
this.pageSize = 10
this.pageNo = 0
@ -522,9 +460,10 @@ export default {
//
async handleExport () {
let title = '联建单位列表'
let title = '公共服务图层列表'
const url = "/heart/icpartyunit/export"
const url = "/gov/org/icPublicService/export"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/export"
let params = {
agencyId: this.agencyId,
...this.formData
@ -602,7 +541,8 @@ export default {
//
this.$refs['upload'].clearFiles()
var url = '/heart/icpartyunit/import'
var url = '/gov/org/icPublicService/import'
// var url = 'http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
@ -665,6 +605,8 @@ export default {
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.div_main {
width: 100%;
}

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

@ -7,75 +7,40 @@
:model="formData"
class="form">
<el-form-item label="单位名称:"
prop="unitName"
<el-form-item label="场所名称:"
prop="name"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.unitName}}</span>
<span class="detail_span">{{formData.name}}</span>
</el-form-item>
<el-form-item label="分类:"
prop="type"
<el-form-item label="场所类别:"
prop="categoryName"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.type}}</span>
<span class="detail_span">{{formData.categoryName}}</span>
</el-form-item>
<el-form-item label="服务事项:"
prop="serviceMatterList"
<el-form-item label="占地面积:"
prop="areaCovered"
label-width="150px"
style="display: block">
<p class="detail_span"
v-for="(item,index) in formData.serviceMatterList"
:key="index">{{item}}</p>
<span class="detail_span">{{formData.areaCovered}}</span>
</el-form-item>
<el-form-item label="联系人:"
prop="contact"
<el-form-item label="容纳人数:"
prop="capacity"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.contact}}</span>
</el-form-item>
<el-form-item label="联系电话:"
prop="contactMobile"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.contactMobile}}</span>
<span class="detail_span">{{formData.capacity}}</span>
</el-form-item>
<el-form-item label="在职党员:"
<el-form-item label="地址:"
style="display: block"
prop="memberCount"
label-width="150px">
<span class="detail_span">{{formData.memberCount}}</span>
</el-form-item>
<el-form-item label="备注:"
prop="remark"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.remark?formData.remark:'无'}}</span>
</el-form-item>
<el-form-item label="地理位置:"
prop="address"
label-width="150px"
style="display: block">
label-width="150px">
<span class="detail_span">{{formData.address}}</span>
</el-form-item>
<el-form-item label="位置坐标:"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div id="app">
</div>
</div>
</el-form-item>
</el-form>
</div>
@ -89,193 +54,193 @@
<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 {
data () {
return {
formData: {},
let loading //
export default {
data () {
return {
formData: {},
}
},
components: {},
mounted () {
this.initMap()
},
}
},
components: {},
mounted () {
this.initMap()
},
methods: {
handleCancle () {
methods: {
handleCancle () {
this.$emit('diaClose')
this.$emit('diaClose')
},
},
async initForm (row) {
this.startLoading()
this.formData = { ...row }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
async initForm (row) {
this.startLoading()
this.formData = { ...row }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
this.endLoading()
this.endLoading()
},
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
//
map.on('panend', () => {
this.handleMoveCenter()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
})
},
])
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
// this.formData.address = result.result.address
//
});
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
// this.formData.address = result.result.address
//
});
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
computed: {
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
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 {
width: 500px;
font-weight: bold;
text-align: left;
margin: 0 0;
font-size: 16px;
}
.form {
margin-top: 30px;
}
.detail_span {
width: 500px;
font-weight: bold;
text-align: left;
margin: 0 0;
font-size: 16px;
}
.form {
margin-top: 30px;
}
</style>

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

@ -9,88 +9,64 @@
:disabled="formType === 'detail'"
class="form">
<el-form-item label="单位名称"
prop="unitName"
<el-form-item label="场所名称"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入单位名称"
v-model="formData.unitName">
placeholder="请输入场所名称"
v-model="formData.name">
</el-input>
</el-form-item>
<el-form-item label="分类"
prop="type"
<el-form-item label="场所类型"
prop="category"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="formData.type"
v-model="formData.category"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
<el-option v-for="item in serviceList"
:key="item.categoryKey"
:label="item.categoryName"
:value="item.categoryKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatterList"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.serviceMatterList">
<el-checkbox v-for="item in serviceList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="联系人"
prop="contact"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人姓名"
v-model="formData.contact">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人电话"
v-model="formData.contactMobile">
</el-input>
<el-form-item label="占地面积"
style="display: block"
prop="areaCovered"
label-width="150px">
<el-input-number class="item_width_4"
v-model="formData.areaCovered"
:min="0"
:max="9999"
label="占地面积"></el-input-number>
</el-form-item>
<el-form-item label="在职党员"
<el-form-item label="容纳人数"
style="display: block"
prop="memberCount"
prop="capacity"
label-width="150px">
<el-input-number class="item_width_4"
v-model="formData.memberCount"
v-model="formData.capacity"
:min="0"
:max="9999"
label="在职党员"></el-input-number>
label="容纳人数"></el-input-number>
</el-form-item>
<el-form-item label="备注"
prop="remark"
<el-form-item label="地址"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="formData.remark"></el-input>
v-model="formData.address">
</el-input>
</el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
@ -114,8 +90,7 @@
@click="handleSearchMap">查询</el-button>
</div>
</div>
<div style="margin-top: 10px">
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
@ -131,17 +106,6 @@
</div>
</div>
</el-form-item>
<el-form-item label="地理位置"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
v-model="formData.address">
</el-input>
</el-form-item>
</el-form>
</div>
@ -158,370 +122,356 @@
</template>
<script>
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 //
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
unitId: '',
keyWords: '',
formData: {
unitName: '',
serviceMatterList: [],
type: '',
contact: '',
contactMobile: '',
memberCount: 0,
remark: '', //500
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
},
serviceList: [],//list
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
}
},
components: {},
mounted () {
this.initMap()
},
methods: {
async initForm (type, unitId) {
this.startLoading()
this.$refs.ref_form.resetFields();
//
await this.loadService()
this.formType = type
if (unitId) {
this.unitId = unitId
this.formData.id = unitId
await this.loadFormData()
} else {
map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
this.setMarker(36.0722275, 120.38945519)
}
this.endLoading()
},
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
icPublicServiceId: '',
keyWords: '',
formData: {
name: '',//
category: '',
areaCovered: '',//
capacity: '',//
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
},
serviceList: [],//list
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
let params = {
type: 'usable'
// parentCategoryCode: '1010'
}
},
components: {},
mounted () {
this.initMap()
},
const { data, code, msg } = await requestPost(url, params)
methods: {
if (code === 0) {
this.serviceList = data
async initForm (type, icPublicServiceId) {
this.startLoading()
this.$refs.ref_form.resetFields();
} else {
this.$message.error(msg)
}
//
await this.loadService()
},
this.formType = type
if (icPublicServiceId) {
this.icPublicServiceId = icPublicServiceId
this.formData.icPublicServiceId = icPublicServiceId
await this.loadFormData()
} else {
map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
this.setMarker(36.0722275, 120.38945519)
}
//
async loadFormData () {
const url = '/heart/icpartyunit/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail'
let params = {
id: this.unitId
}
this.endLoading()
const { data, code, msg } = await requestPost(url, params)
},
if (code === 0) {
if (!data.serviceMatterList || !Array.isArray(data.serviceMatterList)) {
data.serviceMatterList = []
//
async loadService () {
const url = "/gov/org/coverage/dict-select-list/public_service"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/coverage/dict-select-list/public_service"
let params = {
}
this.formData = { ...data }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
} else {
this.$message.error(msg)
}
},
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
async handleComfirm () {
},
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
//
async loadFormData () {
const url = '/gov/org/icPublicService/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/detail'
let params = {
icPublicServiceId: this.icPublicServiceId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
if (!data.serviceMatterList || !Array.isArray(data.serviceMatterList)) {
data.serviceMatterList = []
}
this.formData = { ...data }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
} else {
this.addUnit()
this.$message.error(msg)
}
},
})
},
async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.contactMobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
let url = '/heart/icpartyunit/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"
// if (this.formType === 'edit') {
// this.formData.id = this.unitId
// }
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addUnit()
}
})
},
async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.contactMobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
let url = '/gov/org/icPublicService/add'
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/add"
// if (this.formType === 'edit') {
// this.formData.id = this.unitId
// }
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
handleCancle () {
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
this.$emit('dialogCancle')
},
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
},
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
}
])
},
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
},
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.address = result.result.address
//
});
},
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.address = result.result.address
//
});
},
resetData () {
this.unitId = ''
this.keyWords = ''
this.formData = {
unitName: '',
serviceMatterList: [],
type: '',
contact: '',
contactMobile: '',
memberCount: 0,
remark: '', //500
address: '', //
longitude: '', //
latitude: '' //
resetData () {
this.icPublicServiceId = ''
this.keyWords = ''
this.formData = {
name: '',
category: '',
areaCovered: '',
capacity: '',
address: '', //
longitude: '', //
latitude: '' //
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
computed: {
dataRule () {
return {
name: [
{ required: true, message: '场所名称不能为空', trigger: 'blur' },
],
category: [
{ required: true, message: '场所类别不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
],
latitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
unitName: [
{ required: true, message: '单位名称不能为空', trigger: 'blur' },
],
type: [
{ required: true, message: '分类不能为空', trigger: 'blur' }
],
contact: [
{ required: true, message: '联系人不能为空', trigger: 'blur' }
],
contactMobile: [
{ required: true, message: '联系电话不能为空', trigger: 'blur' }
],
memberCount: [
{ required: true, message: '在职党员数不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
props: {
},
props: {
typeList: {
type: Array,
default: []
},
typeList: {
type: Array,
default: []
},
}
}
}
</script>
<style scoped>
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.div_map {
position: relative;
}
.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>

805
src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue

@ -35,75 +35,85 @@
<span>{{item.label}}</span>
</div>
</div>
<div class="div_category">
<el-scrollbar style="height:98%">
<el-scrollbar style="height:98%">
<div class="div_category">
<div v-for="(item,index) in categoryListshow"
:key="index"
class="category_item">
<div class="list_item">
<div v-for="(colItem,colIndex) in item"
:key="colIndex"
class="list_item_col"
@click="handleTo(colItem)">
<img :src="colItem.dataIcon"
alt />
<div class="item_content">
<div class="item_label">{{colItem.categoryName}}</div>
</div>
</div>
<div v-for="(colItem,colIndex) in item"
:key="colIndex"
class="list_item"
@click="handleClickCategory(index,colIndex)">
<img :src="colItem.dataIcon"
alt />
<span :class="['item_content',colItem.sel?'item_content_sel':'']">{{colItem.categoryName}}
</span>
</div>
<div :class="['item_line',{'last_line':index==(categoryListshow.length-1)}]"></div>
</div>
</div>
</el-scrollbar>
</el-scrollbar>
</div>
</div>
<div class="div_info">
<!-- <el-scrollbar style="height:98%">
<div class="info_tip">
<img src="../../../../../assets/img/shuju/title-tip.png"
alt />
<div class="tip_title">分类列表</div>
</div>
<div class="div_search_list">
<el-input size="mini"
WarningColor='warning'
placeholder="请输入搜索内容"
v-model="search">
<i slot="prefix"
class="icon">
<img src="../../../../../assets/img/modules/visual/sousuo.png"
alt />
</i>
</el-input>
<div class="btn"
@click="handleSearch">搜索</div>
<div class="info_loading"
v-if="infoLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="m-tb">
<div v-if="!infoLoading"
class="info_list">
<div v-for="(item,index) in listDatashow"
:key="index"
class="item">
<div class="list_item">
<div v-for="(colItem,colIndex) in item"
:key="colIndex"
class="list_item_col"
@click="handleTo(colItem)">
<img :src="colItem.dataIcon"
alt />
<div class="item_content">
<div class="item_label">{{colItem.label}}</div>
<div class="item_count">{{colItem.count}}</div>
</div>
</div>
</div>
<div :class="['item_line',{'last_line':index==(listDatashow.length-1)}]"></div>
</div>
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@handleClickRow="handleClickRow"></cpt-tb>
</div>
</el-scrollbar> -->
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
</div>
</div>
</div>
<div id="popup"
style="display: none;"
class="ol-popup">
<a href="#"
id="popup-closer"
class="ol-popup-closer"></a>
<div id="popup-content"
class="popup-content"></div>
<a href="#"
id="popup-goMore"
class="popup-goMore">更多>>>></a>
</div>
</div>
</template>
@ -129,7 +139,7 @@ import { Loading } from 'element-ui'; //引入Loading服务
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import cptCard from "@/views/modules/visual/cpts/card";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
@ -231,7 +241,6 @@ const vueGis = {
name: 'HomeMap',
data () {
return {
centerPoint: [],//
zoom: 14,//14
minZoom: 1,//
@ -300,7 +309,39 @@ const vueGis = {
categoryKeys: [],
search: '',
pageNo: 1,
pageSize: 10
pageSize: 10,
demand: {
loading: true,
colList: [
{
align: "center",
width: "5%",
},
{
align: "center",
width: "10%",
},
],
header: ["分类", "名称"],
list: [],
pageSize: 10,
pageNo: 1,
total: 0,
},
iconUrlArray: {
'volunteer1': require('../../../../../assets/img/shuju/volunteer1.png'),
'volunteer2': require('../../../../../assets/img/shuju/volunteer2.png'),
'volunteer3': require('../../../../../assets/img/shuju/volunteer3.png'),
'volunteer4': require('../../../../../assets/img/shuju/volunteer4.png'),
'volunteer5': require('../../../../../assets/img/shuju/volunteer5.png'),
},
iconArrays: [],
overlay: null,
showPopup: false,
}
},
@ -323,13 +364,186 @@ const vueGis = {
//
this.loadPolygon(this.subAgencyArray)
this.setMapLocation()
await this.loadCategoryList()
this.getTable();
await this.getMapTable();
//icon
this.addOverlay()
this.addMapClick()
},
methods: {
//
addOverlay () {
// 使 DOM
var container = document.getElementById("popup");
var closer = document.getElementById("popup-closer");
var content = document.getElementById("popup-content");
var goMore = document.getElementById("popup-goMore") ? document.getElementById("popup-goMore") : null
// Overlay
this.overlay = new Overlay({
element: container, // Overlay DOM
autoPan: true, //
autoPanAnimation: {
duration: 250 // 9
},
zIndex: 100
});
// map
map.addOverlay(this.overlay);
let _that = this;
/**
* 为弹窗添加一个响应关闭的函数
*/
closer.onclick = function () {
_that.overlay.setPosition(undefined);
closer.blur();
return false;
};
if (goMore) {
goMore.onclick = function () {
_that.$emit('lookMore')
};
}
},
//
addMapClick () {
let _that = this
map.on("click", function (evt) {
const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) {
return feature;
});
if (feature) {
console.log(feature)
_that.clickMapVolunteer(feature.values_.properties)
}
});
},
//
async clickMapVolunteer (info) {
if (!info.id) {
return false
}
const url = "/epmetuser/icresiuser/resi-brief/" + 'dd0bd55db0ca4b629c40bc914a08368e'
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let coordinate = [info.longitude, info.latitude]
data.gridName = data.gridName ? data.gridName : '--'
data.villageName = data.villageName ? data.villageName : '--'
data.icUserName = data.icUserName ? data.icUserName : '--'
data.mobile = data.mobile ? data.mobile : '--'
data.idCard = data.idCard ? data.idCard : '--'
data.birthday = data.birthday ? data.birthday : '--'
data.contacts = data.contacts ? data.contacts : '--'
data.contactsMobile = data.contactsMobile ? data.contactsMobile : '--'
data.isBdhjShow = data.isBdhj ? data.isBdhj === '0' ? '否' : '是' : '--'
data.genderShow = data.gender ? data.gender === '0' ? '女' : '男' : '--'
let categoriesArray = []
for (let key in data.volunteerCategories) {
categoriesArray.push(data.volunteerCategories[key])
}
if (categoriesArray.length > 0) {
data.categories = categoriesArray.join(',')
} else {
data.categories = '--'
}
let showData = `
<div style='font-size:16px; color:#FFFFFF;'>居民信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>所属网格
<span>`+ data.gridName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>所属小区
<span>`+ data.villageName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>本地户籍
<span>`+ data.isBdhjShow + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>姓名
<span>`+ data.icUserName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>手机
<span>`+ data.mobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>性别
<span>`+ data.genderShow + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>身份证号
<span>`+ data.idCard + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>出生日期
<span>`+ data.birthday + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系人
<span>`+ data.contacts + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系人手机
<span>`+ data.contactsMobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>志愿者类别
<span>`+ data.categories + `</span>
</div>
`
// console.log(showData)
this.handleShowPopup(showData, coordinate, true)
} else {
this.$message.error(msg)
}
},
handleShowPopup (showData, coordinate, isShowMore) {
if (isShowMore) {
document.getElementById("popup-goMore").style.display = 'block'
} else {
document.getElementById("popup-goMore").style.display = 'none'
}
console.log(this.overlay.getElement())
let content = document.getElementById("popup-content");
this.overlay.getElement().style.display = 'block'
this.overlay.getElement().parentNode.style.display = 'block'
this.overlay.getElement().parentNode.parentNode.style.display = 'block'
content.innerHTML = showData;
this.overlay.setPosition(coordinate);
// overlay x,y
},
//
handleClosePopup () {
this.overlay.setPosition(undefined);
document.getElementById("popup-closer").blur();
return false;
},
//
handleClickCoverage (index) {
async handleClickCoverage (index) {
this.coverageTypesList[index].select = !this.coverageTypesList[index].select
let item = this.coverageTypesList[index]
@ -342,11 +556,51 @@ const vueGis = {
this.coverageTypes.push(element.value)
}
});
await this.loadCategoryList()
this.getTable();
this.getMapTable();
},
//
handleClickCategory (index) {
async handleClickCategory (index, colIndex) {
this.categoryListshow[index][colIndex].sel = !this.categoryListshow[index][colIndex].sel
// this.categoryList[index * 4 + colIndex].sel = !this.categoryList[index * 4 + colIndex].sel
let array = this.categoryListshow[index]
let item = this.categoryListshow[index][colIndex]
this.$set(this.categoryListshow[index], colIndex, item)
this.$set(this.categoryListshow, index, array)
this.categoryKeys = []
this.categoryList.forEach(element => {
if (element.sel) {
this.categoryKeys.push(element.categoryKey)
}
});
this.getTable();
this.getMapTable();
},
handleSearch () {
},
//
handleClickRow (index) {
let selData = this.tableList[index]
mapView.setCenter([selData.longitude, selData.latitude]);
this.clickMapVolunteer(selData)
// alert(index)
},
handlePageNoChange_demand (val) {
this.demand.pageNo = val;
this.getTable();
},
async loadCategoryList () {
@ -360,32 +614,359 @@ const vueGis = {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.categoryList = data
// this.categoryList = data
this.categoryList = [
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "机关直属部门"
},
{
categoryKey: "0",
categoryName: "deserunt"
},
{
categoryKey: "1",
categoryName: "deserunt"
},
{
categoryKey: "2",
categoryName: "deserunt"
},
{
categoryKey: "3",
categoryName: "deserunt"
},
{
categoryKey: "4",
categoryName: "deserunt"
},
]
this.categoryKeys = []
this.categoryListshow = []
let itemArray = []
this.categoryList.forEach((item, index) => {
if (!item.dataIcon) {
item.dataIcon = require('../../../../../assets/img/shuju/volunteer3.png')
}
if (index % 4 === 0) {//
itemArray.push(item)
} else {
itemArray.push(item)
this.categoryListshow.push(itemArray)
itemArray = []
}
item.sel = true
this.categoryKeys.push(item.categoryKey)
});
let chunk = 4
for (let i = 0, j = this.categoryList.length; i < j; i += chunk) {
this.categoryListshow.push(this.categoryList.slice(i, i + chunk))
}
console.log(this.categoryListshow)
console.log(this.categoryList)
} else {
this.$message.error(msg)
}
},
//
async getTable (isPage) {
this.demand.loading = true
// const url = "/data/aggregator/coverage/dataList";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/coverage/dataList";
let params = {
coverageTypes: this.coverageTypes,
categoryKeys: this.categoryKeys,
search: this.search,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
isPage: true
};
const { data, code, msg } = await requestPost(url, params);
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.tableList = [
{
categoryKey: "volunteer1",
content: "volunteer1",
id: "123",
latitude: "36.082230",
longitude: "120.3868167667315",
},
{
categoryKey: "volunteer2",
content: "volunteer2",
id: "123",
latitude: "36.062227",
longitude: "120.389455",
},
{
categoryKey: "volunteer3",
content: "volunteer3",
id: "123",
latitude: "36.072214",
longitude: "120.389455",
},
{
categoryKey: "volunteer4",
content: "volunteer4",
id: "123",
latitude: "36.07394505338441",
longitude: "120.3868167667315",
}
]
this.demand.list = data.list.map((item) => {
return [
item.categoryKey ? item.categoryKey : '--',
item.content ? item.content : '',
];
});
} else {
this.$message.error(msg);
}
},
//
async getMapTable () {
// const url = "/data/aggregator/coverage/dataList";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/coverage/dataList";
let params = {
coverageTypes: this.coverageTypes,
categoryKeys: this.categoryKeys,
search: this.search,
isPage: false
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.iconArrays = data.list
this.iconArrays = [
{
categoryKey: "volunteer1",
content: "volunteer1",
id: "123",
latitude: "36.082230",
longitude: "120.3868167667315",
},
{
categoryKey: "volunteer2",
content: "volunteer2",
id: "123",
latitude: "36.062227",
longitude: "120.389455",
},
{
categoryKey: "volunteer3",
content: "volunteer3",
id: "123",
latitude: "36.072214",
longitude: "120.389455",
},
{
categoryKey: "volunteer4",
content: "volunteer4",
id: "123",
latitude: "36.07394505338441",
longitude: "120.3868167667315",
}
]
this.iconArrays.forEach((item, index) => {
item.url = this.iconUrlArray[item.categoryKey]
});
console.log(this.iconArrays)
this.loadIcon()
} else {
this.$message.error(msg);
}
},
//icon
loadIcon () {
iconSource.clear()//
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
this.iconArrays.forEach((oneIcon, index) => {
//
let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
id: oneIcon.id,
properties: {
type: "icon",
info: { ...oneIcon }
}
});
// console.log('oneIcon----', this.iconUrlArray[oneIcon.urlIndex])
let iconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
// imgSize: [32, 32],
// scale: 0.5,
// src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0] || this.iconUrlArray[0]
src: oneIcon.url
}),
// text: createTextStyle(oneIcon)
});
iconItem.setStyle(iconStyle);
// if (this.distanceMax) {
// if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
// iconFeatures.push(iconItem);
// }
// } else {
iconFeatures.push(iconItem);
// }
});
iconSource.addFeatures(iconFeatures);
}
},
//
async refreshMap (isRefreshView) {
@ -401,11 +982,11 @@ const vueGis = {
//
// if (isRefreshView) {
this.setMapLocation()
// this.setMapLocation()
// }
await this.loadList()
await this.getTable(false);
},
@ -458,8 +1039,6 @@ const vueGis = {
}
mapView.setZoom(this.zoom);
},
//
@ -479,15 +1058,12 @@ const vueGis = {
this.center = this.orgData.center
this.zoom = this.orgData.zoom
this.$nextTick(() => {
this.refreshMap(true)
this.$forceUpdate()
});
},
//
@ -691,7 +1267,6 @@ const vueGis = {
},
//
setZoom (agencyLevel) {
if (agencyLevel === 'district') {
@ -751,10 +1326,6 @@ const vueGis = {
//map
})
map.on('singleclick', function (e) {
// console.log(e.coordinate)
// console.log(transform(e.coordinate, 'EPSG:3857', 'EPSG:4326'));
})
//
const dblClickInteraction = map
@ -829,11 +1400,11 @@ const vueGis = {
map.addLayer(polygonLayer)
map.addInteraction(select);
// map.addInteraction(select);
select.on('select', e => {
// select.on('select', e => {
});
// });
},
@ -851,11 +1422,6 @@ const vueGis = {
},
//
getRndBetween (lowerLimit, upperLimit) {
return Math.floor(Math.random() * (upperLimit - lowerLimit + 1)) + lowerLimit;
},
//
startLoading () {
loading = Loading.service({
@ -903,7 +1469,7 @@ const vueGis = {
...mapGetters(["clientHeight"])
},
components: { cptCard, ScreenLoading },
components: { cptTb, cptCard, ScreenLoading },
}
export default vueGis;
</script>
@ -925,5 +1491,70 @@ export default vueGis;
}
</style>
<style lang="scss" scoped>
<style lang="scss" >
.div_search_list {
.el-input__inner[WarningColor="warning"] {
border-radius: 8px 0 0 8px;
height: 53px;
background-color: #01106800;
border: 2px solid #0082fb;
padding-left: 70px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
.ol-popup {
position: absolute;
background-color: #1257c9;
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
padding: 15px;
border-radius: 10px;
border: 1px solid #1257c9;
bottom: 12px;
left: -50px;
text-align: left;
}
.ol-popup:after,
.ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: 1257c9;
border-width: 10px;
left: 48px;
margin-left: -10px;
}
.ol-popup:before {
border-top-color: #1257c9;
border-width: 11px;
left: 48px;
margin-left: -11px;
}
.ol-popup-closer {
text-decoration: none;
position: absolute;
top: 2px;
right: 8px;
}
.popup-content {
width: 300px;
}
.popup-goMore {
margin: 20px 0;
}
.ol-popup-closer:after {
content: "✖";
// color: rgba(1, 17, 104, 1);
color: #fff;
}
</style>

93
src/views/modules/visual/cpts/tb.vue

@ -1,68 +1,67 @@
<template>
<div class="m-table">
<table class="table" border="0" cellspacing="0" cellpadding="0">
<col
:align="item.align"
:width="item.width"
:key="'col' + index"
v-for="(item, index) in colList"
/>
<table class="table"
border="0"
cellspacing="0"
cellpadding="0">
<col :align="item.align"
:width="item.width"
:key="'col' + index"
v-for="(item, index) in colList" />
<thead>
<tr class="table-header">
<th class="table-header-th" v-for="item in header" :key="item">
<th class="table-header-th"
v-for="item in header"
:key="item">
{{ item }}
</th>
</tr>
</thead>
<tbody class="table-body">
<tr class="table-body-tr" v-for="(value, index) in list" :key="index">
<td class="td" v-for="(item, indexs) in value" :key="indexs">
<tr class="table-body-tr"
v-for="(value, index) in list"
:key="index"
@click="handleClickRow(index)">
<td class="td"
v-for="(item, indexs) in value"
:key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'">
{{ item }}
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'">
<img
v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt=""
/>
<img
v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt=""
/>
<img
v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt=""
/>
<img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt="" />
<img v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt="" />
<img v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt="" />
<span v-else>{{ index + 1 }}</span>
</div>
<a
v-else-if="typeof item === 'object' && item && item.type == 'operate'"
v-for="btn in item.list"
:key="'operate' + index + btn"
@click="handleClickBtn(index, btn)"
>{{ btn }}</a
>
<a
v-else-if="typeof item === 'object' && item && item.type == 'people'"
@click="handleClickPeople(item)"
>{{ item.name }}</a
>
<a v-else-if="typeof item === 'object' && item && item.type == 'operate'"
v-for="btn in item.list"
:key="'operate' + index + btn"
@click="handleClickBtn(index, btn)">{{ btn }}</a>
<a v-else-if="typeof item === 'object' && item && item.type == 'people'"
@click="handleClickPeople(item)">{{ item.name }}</a>
</td>
</tr>
</tbody>
</table>
<div class="table-status" v-if="loading">
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status" v-if="list.length == 0 && !loading">
<div class="table-status"
v-if="list.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png" class="no-data-img" />
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
@ -131,20 +130,24 @@ export default {
default: false,
},
},
data() {
data () {
return {};
},
watch: {},
mounted() {},
mounted () { },
created() {},
created () { },
methods: {
handleClickBtn(index, type) {
//
handleClickRow (index) {
this.$emit("handleClickRow", index);
},
handleClickBtn (index, type) {
this.$emit("operate", index, type);
},
handleClickPeople(item) {
handleClickPeople (item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.uid}`,
});

Loading…
Cancel
Save