Browse Source

公共服务管理 地图坑

dev-登录返回旧业面
dai_siki 3 years ago
parent
commit
b24efb5358
  1. 4
      .env.development
  2. 826
      src/views/modules/communityService/fuwujilu/addForm.vue
  3. 482
      src/views/modules/communityService/fuwujilu/detailForm.vue
  4. 28
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue

4
.env.development

@ -1,9 +1,9 @@
NODE_ENV=development
VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api

826
src/views/modules/communityService/fuwujilu/addForm.vue

File diff suppressed because it is too large

482
src/views/modules/communityService/fuwujilu/detailForm.vue

@ -1,511 +1,377 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-row">
<div v-if="initLoading" class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">服务名称</span>
<span>{{ formData.serviceName||'--' }}</span>
<span>{{ formData.serviceName || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务组织</span>
<span>{{ serviceOrgName||'--' }}</span>
<span>{{ serviceOrgName || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务范围</span>
<span>{{ formData.gridIdListName ||'--' }}</span>
<span>{{ formData.gridIdListName || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">政策依据</span>
<span>{{ formData.policyTitle||'--' }}</span>
<el-button v-if="formData.policyId"
style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList">预览</el-button>
<span>{{ formData.policyTitle || "--" }}</span>
<el-button
v-if="formData.policyId"
style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList"
>预览</el-button
>
</div>
<div class="info-prop">
<span class="info-title-2">经办人</span>
<span>{{ formData.principalName||'--' }}</span>
<span>{{ formData.principalName || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系方式</span>
<span>{{ formData.principalContact||'--' }}</span>
<span>{{ formData.principalContact || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务时间</span>
<span>{{ formData.serviceTimeStart||'--' }}</span>
<span>{{ formData.serviceTimeEnd||'--' }}</span>
<span>{{ formData.serviceTimeStart || "--" }}</span
>
<span>{{ formData.serviceTimeEnd || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">备注</span>
<span>{{ formData.remark||'--' }}</span>
<span>{{ formData.remark || "--" }}</span>
</div>
<div v-show="formData.serviceStatus==='completed'">
<div v-show="formData.serviceStatus === 'completed'">
<h3 class="d-h3">反馈内容</h3>
<div class="info-prop">
<span class="info-title-2">服务目标</span>
<span>{{ feedbackFormData.serviceGoal||'--' }}</span>
<span>{{ feedbackFormData.serviceGoal || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务效果</span>
<span>{{ feedbackFormData.serviceEffect||'--' }}</span>
<span>{{ feedbackFormData.serviceEffect || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务人数</span>
<span>{{ feedbackFormData.servicePeopleNumber||0 }}</span>
<span>{{ feedbackFormData.servicePeopleNumber || 0 }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务状态</span>
<span>{{ feedbackFormData.serviceStatusShow||'--' }}</span>
<span>{{ feedbackFormData.serviceStatusShow || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">满意度</span>
<span>{{ feedbackFormData.satisfactionShow||'--' }}</span>
<span>{{ feedbackFormData.satisfactionShow || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地理位置</span>
<span>{{ feedbackFormData.address||'--' }}</span>
<span>{{ feedbackFormData.address || "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地图位置</span>
<div class="div_map">
<div id="app_detail"></div>
</div>
</div>
<div class="info-prop">
<span class="info-title-2">附件</span>
<file-list v-if="fileList.length>0"
:fileList="fileList"></file-list>
<file-list
v-if="fileList.length > 0"
:fileList="fileList"
></file-list>
<span v-else>--</span>
</div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small" @click="handleCancle"> </el-button>
</div>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose">
<el-dialog
v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false"
>
<person-list
ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose"
>
</person-list>
</el-dialog>
</div>
</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";
import personList from "../policy/personList";
import fileList from '@/views/components/fileList'
import fileList from "@/views/components/fileList";
import daiMap from "@/utils/dai-map";
var map;
let loading; //
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data () {
data() {
return {
initLoading: false,
keyWords: '',
keyWords: "",
formData: {},
feedbackFormData: {
serviceProjectId: '',// id
serviceName: '',
serviceGoal: '',//
serviceEffect: '',//
servicePeopleNumber: null,//
serviceStatus: 'completed',// in_servicecompleted:
satisfaction: '',//:bad:good:perfect
longitude: '',//
latitude: '',//
address: '',
fileList: [],//
serviceProjectId: "", // id
serviceName: "",
serviceGoal: "", //
serviceEffect: "", //
servicePeopleNumber: null, //
serviceStatus: "completed", // in_servicecompleted:
satisfaction: "", //:bad:good:perfect
longitude: "", //
latitude: "", //
address: "",
fileList: [], //
},
policyId: "",
showPersonList: false,
ruleList: [],
policyList: [],
}
};
},
components: { personList, fileList },
async mounted () {
await this.getPolicyList()
async mounted() {
await this.getPolicyList();
// if (this.serviceRecordId) {//
await this.loadInfo()
this.initLoading = true
await this.loadInfo();
this.initLoading = true;
if (this.formData.serviceStatus === 'completed') {
if (
this.formData.serviceStatus === "completed" &&
this.feedbackFormData.latitude
) {
this.$nextTick(() => {
this.initMap()
})
this.initMap();
});
}
},
methods: {
diaDestroy () {
if (map) {
map.destroy()
}
},
diaDestroy() {},
//
async handlePersonList () {
async handlePersonList() {
if (!this.formData.policyId) {
this.$message.info('请先选择政策')
return false
this.$message.info("请先选择政策");
return false;
}
this.policyId = this.formData.policyId
await this.loadRuleList()
this.policyId = this.formData.policyId;
await this.loadRuleList();
this.showPersonList = true;
},
async loadRuleList () {
async loadRuleList() {
const url = "/heart/policy/rulelist/" + this.policyId;
const url = "/heart/policy/rulelist/" + this.policyId
let params = {};
let params = {}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.ruleList = data
this.ruleList = data;
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
handleClose () {
this.showPersonList = false
handleClose() {
this.showPersonList = false;
},
async getPolicyList() {
const url = "/heart/policy/policyListSelect";
async getPolicyList () {
const url = '/heart/policy/policyListSelect'
let params = {}
let params = {};
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.policyList = data
this.policyList = data;
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
//
async loadInfo () {
const url = '/heart/icServiceRecordV2/detail'
async loadInfo() {
const url = "/heart/icServiceRecordV2/detail";
let params = {
serviceRecordId: this.serviceRecordId
}
serviceRecordId: this.serviceRecordId,
};
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.formData = { ...data }
this.formData.serviceRecordId = this.serviceRecordId
this.feedbackFormData = { ...data.feedback }
this.formData.policyName = ''
this.formData.gridIdListName = ''
this.feedbackFormData.serviceStatusShow = ''
this.feedbackFormData.satisfactionShow = ''
let arr = []
this.formData.gridIdList.forEach(element => {
arr.push(element.objectName)
this.formData = { ...data };
this.formData.serviceRecordId = this.serviceRecordId;
this.feedbackFormData = { ...data.feedback };
this.formData.policyName = "";
this.formData.gridIdListName = "";
this.feedbackFormData.serviceStatusShow = "";
this.feedbackFormData.satisfactionShow = "";
let arr = [];
this.formData.gridIdList.forEach((element) => {
arr.push(element.objectName);
});
this.formData.gridIdListName = arr.join(',')
this.statusArray.forEach(element => {
this.formData.gridIdListName = arr.join(",");
this.statusArray.forEach((element) => {
if (this.formData.serviceStatus === element.value) {
this.feedbackFormData.serviceStatusShow = element.label
this.feedbackFormData.serviceStatusShow = element.label;
}
});
this.satisfyArray.forEach(element => {
this.satisfyArray.forEach((element) => {
if (this.feedbackFormData.satisfaction === element.value) {
this.feedbackFormData.satisfactionShow = element.label
this.feedbackFormData.satisfactionShow = element.label;
}
});
this.policyList.forEach(element => {
this.policyList.forEach((element) => {
if (this.formData.policyId === element.policyId) {
this.formData.policyName = element.title
this.formData.policyName = element.title;
}
});
this.fileList = []
if (data.feedback && data.feedback.fileList && data.feedback.fileList.length > 0) {
data.feedback.fileList.forEach(element => {
this.fileList = [];
if (
data.feedback &&
data.feedback.fileList &&
data.feedback.fileList.length > 0
) {
data.feedback.fileList.forEach((element) => {
let obj = {
name: element.name,
format: element.format,
url: element.url,
type: element.type
}
this.fileList.push(obj)
type: element.type,
};
this.fileList.push(obj);
});
}
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
handleCancle () {
this.resetData()
this.$emit('diaDetailClose')
handleCancle() {
this.resetData();
this.$emit("diaDetailClose");
},
// init
initMap () {
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude
longitude = this.formData.longitude
}
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
var center = new window.TMap.LatLng(latitude, latitude)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_detail'), {
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()
},
initMap() {
let { latitude, longitude } = this.feedbackFormData;
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
map = new daiMap(
document.getElementById("app_detail"),
{ latitude, longitude },
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
])
},
);
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)
map.setCenter(latitude, longitude);
map.setMarker(latitude, 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
//
});
},
handleOk () {
this.showPersonList = false
handleOk() {
this.showPersonList = false;
},
resetData () {
this.formData = {}
resetData() {
this.formData = {};
},
//
startLoading () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
loading.close();
}
}
},
},
computed: {
dataRule () {
dataRule() {
return {
serviceTimeStart: [
{ required: true, message: '服务时间不能为空', trigger: 'blur' }
{ required: true, message: "服务时间不能为空", trigger: "blur" },
],
}
};
},
},
props: {
serviceRecordId: {
type: String,
required: true
required: true,
},
serviceOrgName: {
type: String,
required: true
required: true,
},
satisfyArray: {
type: Array,
default () {
return []
}
default() {
return [];
},
},
statusArray: {
type: Array,
default () {
return []
}
default() {
return [];
},
},
}
}
},
};
</script>
<style lang="scss" scoped >
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

28
src/views/modules/shequzhili/event/cpts/process-form-demand.vue

@ -607,34 +607,6 @@ export default {
}
},
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.serviceLocation = result.result.address;
//
});
},
//
startLoading() {
loading = Loading.service({

Loading…
Cancel
Save