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

Loading…
Cancel
Save