Browse Source

Merge branch 'master' into dev

dev-用户反馈
dai 3 years ago
parent
commit
4ffb99c1a1
  1. 96
      package.json
  2. 3
      src/views/modules/base/epidemic/antiInfo.vue
  3. 4
      src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue
  4. 826
      src/views/modules/communityService/fuwujilu/addForm.vue
  5. 482
      src/views/modules/communityService/fuwujilu/detailForm.vue
  6. 9
      src/views/modules/cpts/base/index.vue
  7. 170
      src/views/modules/renFangTongJi/index.vue
  8. 3
      src/views/modules/shequ/index.vue
  9. 665
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue

96
package.json

@ -19,60 +19,60 @@
"@antv/l7": "2.9.14", "@antv/l7": "2.9.14",
"@antv/l7-draw": "3.0.5", "@antv/l7-draw": "3.0.5",
"@antv/l7-maps": "2.9.14", "@antv/l7-maps": "2.9.14",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@tinymce/tinymce-vue": "^3.2.8", "@tinymce/tinymce-vue": "3.2.8",
"async-validator": "^4.2.5", "async-validator": "4.2.5",
"axios": "^0.19.0", "axios": "0.19.0",
"babel-eslint": "^8.0.1", "babel-eslint": "8.0.1",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "1.1.1",
"echarts": "^5.2.2", "echarts": "5.2.2",
"echarts-gl": "^2.0.9", "echarts-gl": "2.0.9",
"element-theme": "2.0.1", "element-theme": "2.0.1",
"element-ui": "2.13.2", "element-ui": "2.13.2",
"file-saver": "^2.0.5", "file-saver": "2.0.5",
"gulp-autoprefixer": "^6.1.0", "gulp-autoprefixer": "6.1.0",
"gulp-clean-css": "^4.2.0", "gulp-clean-css": "4.2.0",
"gulp-load-plugins": "^2.0.0", "gulp-load-plugins": "2.0.0",
"gulp-rename": "^1.4.0", "gulp-rename": "1.4.0",
"gulp-sass": "^4.0.2", "gulp-sass": "4.0.2",
"js-cookie": "^2.2.0", "js-cookie": "2.2.0",
"jsencrypt": "^3.0.3", "jsencrypt": "3.0.3",
"lodash": "^4.17.15", "lodash": "4.17.15",
"mint-ui": "^2.2.13", "mint-ui": "2.2.13",
"node-sass": "^4.12.0", "node-sass": "4.12.0",
"ol": "^6.9.0", "ol": "6.9.0",
"portfinder": "^1.0.21", "portfinder": "1.0.21",
"proj4": "^2.8.0", "proj4": "2.8.0",
"qs": "^6.7.0", "qs": "6.7.0",
"quill": "^1.3.6", "quill": "1.3.6",
"screenfull": "^4.2.1", "screenfull": "4.2.1",
"sortablejs": "^1.12.0", "sortablejs": "1.12.0",
"svg-sprite-loader": "^4.1.6", "svg-sprite-loader": "4.1.6",
"throttle-debounce": "^3.0.1", "throttle-debounce": "3.0.1",
"v-distpicker": "^1.2.2", "v-distpicker": "1.2.2",
"vue": "^2.6.11", "vue": "2.6.11",
"vue-baidu-map": "^0.21.22", "vue-baidu-map": "0.21.22",
"vue-i18n": "^8.12.0", "vue-i18n": "8.12.0",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "3.0.6",
"vue-router": "^3.0.7", "vue-router": "3.0.7",
"vuex": "^3.1.1", "vuex": "3.1.1",
"xlsx": "^0.17.1" "xlsx": "0.17.1"
}, },
"devDependencies": { "devDependencies": {
"@antv/f2": "^3.8.10-beta.1", "@antv/f2": "3.8.10-beta.1",
"@tinymce/tinymce-vue": "3.2.8", "@tinymce/tinymce-vue": "3.2.8",
"@vue/cli-plugin-babel": "^3.10.0", "@vue/cli-plugin-babel": "3.10.0",
"@vue/cli-plugin-eslint": "^3.10.0", "@vue/cli-plugin-eslint": "3.10.0",
"@vue/cli-service": "^3.10.0", "@vue/cli-service": "3.10.0",
"@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-standard": "4.0.0",
"dai-js": "^0.0.12", "dai-js": "0.0.12",
"element-theme-chalk": "^2.13.0", "element-theme-chalk": "2.13.0",
"natives": "^1.1.6", "natives": "1.1.6",
"ol": "^6.9.0", "ol": "6.9.0",
"sass-loader": "^7.3.1", "sass-loader": "7.3.1",
"script-loader": "^0.7.2", "script-loader": "0.7.2",
"tinymce": "5.8.2", "tinymce": "5.8.2",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "2.6.11"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

3
src/views/modules/base/epidemic/antiInfo.vue

@ -293,6 +293,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
width="1150px" width="1150px"
:z-index="2000"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleCnalceForm"> @closed="handleCnalceForm">
@ -878,7 +879,7 @@ export default {
let params = { let params = {
id id
} }
// this.$message.error('111')
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {

4
src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

@ -171,14 +171,14 @@
</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>
<el-button size="small" <el-button size="small"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> --> </div>
</div> </div>
</template> </template>

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>

9
src/views/modules/cpts/base/index.vue

@ -123,6 +123,7 @@
<el-table ref="ref_table" <el-table ref="ref_table"
:data="tableData" :data="tableData"
border border
:empty-text="loadInfo"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table" class="table"
style="width: 100%" style="width: 100%"
@ -386,6 +387,7 @@ export default {
data () { data () {
return { return {
tableData: [], tableData: [],
loadInfo: '',
pageNo: 1, pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20, pageSize: window.localStorage.getItem("pageSize") || 20,
@ -741,6 +743,7 @@ export default {
}, },
async getTableData () { async getTableData () {
this.loadInfo = '数据加载中'
const { tableUrl: url } = this; const { tableUrl: url } = this;
if (!url) return; if (!url) return;
@ -754,6 +757,12 @@ export default {
if (code === 0) { if (code === 0) {
this.total = data.total || 0; this.total = data.total || 0;
this.tableData = data.list ? this.cookTableData(data.list) : []; this.tableData = data.list ? this.cookTableData(data.list) : [];
if (this.tableData.length === 0) {
this.loadInfo = '暂无数据'
} else {
this.loadInfo = ''
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

170
src/views/modules/renFangTongJi/index.vue

@ -1,107 +1,86 @@
<template> <template>
<el-card class="g-cnt"> <el-card class="g-cnt">
<div class="m-cards"> <div class="m-cards">
<div <div class="item"
class="item" :key="item.name"
:key="item.name" @click="handleClickCard(item)"
@click="handleClickCard(item)" v-for="item in list">
v-for="item in list"
>
<div class="item-left"> <div class="item-left">
<div class="num">{{ item.num }}</div> <div class="num">{{ item.num }}</div>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
</div> </div>
<div class="item-right"> <!-- <div class="item-right">
<div class="hint"> <div class="hint">
<div class="hint-title">较上月</div> <div class="hint-title">较上月</div>
<b v-if="item.variation >= 0">+ {{ item.variationAbs }}</b> <b v-if="item.variation >= 0">+ {{ item.variationAbs }}</b>
<b v-else>- {{ item.variationAbs }}</b> <b v-else>- {{ item.variationAbs }}</b>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
<div class="m-tb"> <div class="m-tb">
<h3>下级平台使用进度汇总</h3> <h3>下级平台使用进度汇总</h3>
<el-table <el-table :data="tableData"
:data="tableData" border
border style="width: 100%"
style="width: 100%" class="tb"
class="tb" :empty-text="loadInfo"
:height="maxTableHeight" :height="maxTableHeight"
align="center" align="center">
> <el-table-column label="序号"
<el-table-column label="序号" type="index" align="center" width="50" /> type="index"
<el-table-column align="center"
prop="orgName" width="50" />
label="所属组织" <el-table-column prop="orgName"
width="150" label="所属组织"
align="center" width="150"
> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="usingCommunityNum"
prop="usingCommunityNum" label="开通平台社区数"
label="开通平台社区数" align="center">
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<a style="cursor: pointer" @click="showDetail(scope.row.orgId)">{{ <a style="cursor: pointer"
@click="showDetail(scope.row.orgId)">{{
scope.row.usingCommunityNum scope.row.usingCommunityNum
}}</a> }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="userTotal"
prop="userTotal" label="人口总数"
label="人口总数" align="center"></el-table-column>
align="center" <el-table-column prop="czUserTotal"
></el-table-column> label="常住人口总数"
<el-table-column align="center"></el-table-column>
prop="czUserTotal" <el-table-column prop="ldUserTotal"
label="常住人口总数" label="流动人口总数"
align="center" align="center"></el-table-column>
></el-table-column> <el-table-column prop="houseTotal"
<el-table-column label="房屋总数"
prop="ldUserTotal" align="center"></el-table-column>
label="流动人口总数" <el-table-column prop="zzHouseTotal"
align="center" label="自住房屋总数"
></el-table-column> align="center"></el-table-column>
<el-table-column <el-table-column prop="czHouseTotal"
prop="houseTotal" label="出租房屋总数"
label="房屋总数" align="center"></el-table-column>
align="center" <el-table-column prop="xzHouseTotal"
></el-table-column> label="闲置房屋总数"
<el-table-column align="center"></el-table-column>
prop="zzHouseTotal"
label="自住房屋总数"
align="center"
></el-table-column>
<el-table-column
prop="czHouseTotal"
label="出租房屋总数"
align="center"
></el-table-column>
<el-table-column
prop="xzHouseTotal"
label="闲置房屋总数"
align="center"
></el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog <el-dialog v-if="displayedDetail"
v-if="displayedDetail" :visible="true"
:visible="true" title="社区列表 "
title="社区列表 " width="1150px"
width="1150px" top="5vh"
top="5vh" @close="displayedDetail = false">
@close="displayedDetail = false" <shequtongji ref="shequtongji"
> :orgId="detailOrgId"
<shequtongji :orgIds="[orgId, detailOrgId]" />
ref="shequtongji"
:orgId="detailOrgId"
:orgIds="[orgId, detailOrgId]"
/>
</el-dialog> </el-dialog>
</el-card> </el-card>
</template> </template>
@ -115,10 +94,12 @@ import shequtongji from "./cpts/shequtongji";
export default { export default {
name: "renFangTongJi", name: "renFangTongJi",
components: { shequtongji }, components: { shequtongji },
data() { data () {
return { return {
displayedDetail: false, displayedDetail: false,
tableData: [], tableData: [],
tableLoading: false,
loadInfo: '',
orgId: "", orgId: "",
orgType: "", orgType: "",
@ -185,35 +166,35 @@ export default {
}; };
}, },
computed: { computed: {
maxTableHeight() { maxTableHeight () {
return this.clientHeight - 420; return this.clientHeight - 420;
}, },
...mapGetters(["clientHeight"]), ...mapGetters(["clientHeight"]),
}, },
watch: { watch: {
orgId() { orgId () {
this.getTableData(); this.getTableData();
}, },
}, },
mounted() { mounted () {
this.getCommunityData(); this.getCommunityData();
this.getResiData(); this.getResiData();
this.getHouseData(); this.getHouseData();
this.getTableData(); this.getTableData();
}, },
methods: { methods: {
handleClickCard(item) { handleClickCard (item) {
if (item.name == "开通平台社区数") { if (item.name == "开通平台社区数") {
this.showDetail(); this.showDetail();
} }
}, },
async showDetail(orgId = "") { async showDetail (orgId = "") {
this.displayedDetail = true; this.displayedDetail = true;
this.detailOrgId = orgId; this.detailOrgId = orgId;
}, },
async getCommunityData() { async getCommunityData () {
const url = "/gov/org/agency/usingCommunityStats"; const url = "/gov/org/agency/usingCommunityStats";
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
@ -230,7 +211,7 @@ export default {
} }
}, },
async getResiData() { async getResiData () {
const url = "/epmetuser/icresiuser/userchart"; const url = "/epmetuser/icresiuser/userchart";
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
@ -257,7 +238,7 @@ export default {
} }
}, },
async getHouseData() { async getHouseData () {
const url = "/gov/org/house/housechart"; const url = "/gov/org/house/housechart";
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
@ -286,7 +267,9 @@ export default {
} }
}, },
async getTableData() { async getTableData () {
this.loadInfo = '数据加载中'
this.tableLoading = true
const url = "/gov/org/house/subuserhouselist"; const url = "/gov/org/house/subuserhouselist";
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
@ -297,9 +280,17 @@ export default {
if (code === 0) { if (code === 0) {
this.tableData = data this.tableData = data
? data.map((item) => { ? data.map((item) => {
return item; return item;
}) })
: []; : [];
if (this.tableData.length === 0) {
this.loadInfo = '暂无数据'
} else {
this.loadInfo = ''
}
} }
}, },
}, },
@ -318,6 +309,7 @@ export default {
.item { .item {
display: flex; display: flex;
justify-content: center;
width: 24%; width: 24%;
margin-top: 15px; margin-top: 15px;
// margin-right: 1%; // margin-right: 1%;

3
src/views/modules/shequ/index.vue

@ -823,7 +823,8 @@ export default {
}); });
} }
}); });
return selectedFuncIdList.map((id) => obj[id]); console.log('88888888888888888', selectedFuncIdList)
return selectedFuncIdList.filter((id) => obj[id]).map((id) => obj[id]);
}, },
maxTableHeight() { maxTableHeight() {
// return this.clientHeight - 450; // return this.clientHeight - 450;

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

@ -1,10 +1,12 @@
<template> <template>
<div class=""> <div class="">
<el-form ref="ref_form" <el-form
:inline="false" ref="ref_form"
:model="formData" :inline="false"
:rules="dataRule" :model="formData"
label-width="100px"> :rules="dataRule"
label-width="100px"
>
<!-- <el-form-item label="事件分类" <!-- <el-form-item label="事件分类"
label-width="150px" label-width="150px"
prop="categoryId"> prop="categoryId">
@ -17,105 +19,124 @@
:show-all-levels="false" :show-all-levels="false"
@change="handleChangeCate"></el-cascader> @change="handleChangeCate"></el-cascader>
</el-form-item> --> </el-form-item> -->
<el-form-item label="服务内容" <el-form-item
label-width="150px" label="服务内容"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="content"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="content"
<el-input v-model="formData.content" >
:autosize="{ minRows: 2, maxRows: 10 }" <div :class="{ 'visiual-form': source === 'visiual' }">
type="textarea" <el-input
clearable v-model="formData.content"
class="cell-width-area" :autosize="{ minRows: 2, maxRows: 10 }"
placeholder="请输入内容"></el-input> type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务类型" <el-form-item
label-width="150px" label="服务类型"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="categoryCode"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="categoryCode"
>
<el-cascader v-model="formData.categoryCode" <div :class="{ 'visiual-form': source === 'visiual' }">
:options="demandOptions" <el-cascader
clearable v-model="formData.categoryCode"
class="cell-width-1" :options="demandOptions"
@change="handleCateSlect"></el-cascader> clearable
class="cell-width-1"
@change="handleCateSlect"
></el-cascader>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务时间" <el-form-item
label-width="150px" label="服务时间"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="wantServiceTime"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="wantServiceTime"
<el-date-picker v-model="formData.wantServiceTime" >
type="datetime" <div :class="{ 'visiual-form': source === 'visiual' }">
class="cell-width-1" <el-date-picker
clearable v-model="formData.wantServiceTime"
value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
placeholder="选择日期时间"> class="cell-width-1"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
>
</el-date-picker> </el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="需求人" <el-form-item
label-width="150px" label="需求人"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="demandUserName"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="demandUserName"
<el-input v-model="formData.demandUserName" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.demandUserName"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" <el-form-item
label-width="150px" label="联系电话"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="demandUserMobile"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="demandUserMobile"
<el-input v-model="formData.demandUserMobile" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.demandUserMobile"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务地点" <el-form-item
prop="serviceLocation" label="服务地点"
:class="{'form-item':source==='visiual'}" prop="serviceLocation"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block"> label-width="150px"
style="display: block"
<div :class="{'visiual-form':source==='visiual'}"> >
<el-input class="cell-width-1" <div :class="{ 'visiual-form': source === 'visiual' }">
v-model="formData.serviceLocation"> <el-input class="cell-width-1" v-model="formData.serviceLocation">
</el-input> </el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="位置坐标" <el-form-item
:class="{'form-item':source==='visiual'}" label="位置坐标"
prop="longitude" :class="{ 'form-item': source === 'visiual' }"
label-width="150px" prop="longitude"
style="display: block"> label-width="150px"
<div style="width:500px"> style="display: block"
>
<div style="width: 500px">
<div class="div_map"> <div class="div_map">
<div id="app_map"> <div id="app_map"></div>
</div>
<div class="div_searchmap"> <div class="div_searchmap">
<el-input class="cell-width-map" <el-input
maxlength="50" class="cell-width-map"
size="mini" maxlength="50"
placeholder="请输入关键字" size="mini"
v-model="keyWords"> placeholder="请输入关键字"
v-model="keyWords"
>
</el-input> </el-input>
<el-button style="margin-left: 10px" <el-button
type="primary" style="margin-left: 10px"
size="mini" type="primary"
@click="handleSearchMap">查询</el-button> size="mini"
@click="handleSearchMap"
>查询</el-button
>
</div> </div>
</div> </div>
@ -136,103 +157,108 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="门牌号" <el-form-item
:class="{'form-item':source==='visiual'}" label="门牌号"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="locationDetail"> label-width="150px"
<div :class="{'visiual-form':source==='visiual'}"> prop="locationDetail"
<el-input v-model="formData.locationDetail" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.locationDetail"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务方" <el-form-item
:class="{'form-item':source==='visiual'}" label="服务方"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="serverId"> label-width="150px"
prop="serverId"
>
<template> <template>
<div :class="[{'single-select':source==='visiual'},'sel-service']"> <div
<el-select v-model="formData.serviceType" :class="[{ 'single-select': source === 'visiual' }, 'sel-service']"
class="cell-width-1" >
placeholder="请选择" <el-select
clearable v-model="formData.serviceType"
@change="handleServiceChange('add', $event)"> class="cell-width-1"
<el-option v-for="item in serviceOptions" placeholder="请选择"
:key="item.value" clearable
:label="item.label" @change="handleServiceChange('add', $event)"
:value="item.value"> >
<el-option
v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
- -
<el-select v-model="formData.serverId" <el-select
class="cell-width-1" v-model="formData.serverId"
filterable class="cell-width-1"
placeholder="请选择" filterable
clearable> placeholder="请选择"
<el-option v-for="item in serviceOptiondList" clearable
:key="item.value" >
:label="item.label" <el-option
:value="item.value"> v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</template> </template>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
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 formVltHelper from "dai-js/tools/formVltHelper"; import daiMap from "@/utils/dai-map";
import { isCard } from "@/utils/validate";
let loading; // let loading; //
var map var map;
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () { function iniFmData() {
return { return {
operationType: '2',//[0: 1: 2:] operationType: "2", //[0: 1: 2:]
icEventId: '',//Id icEventId: "", //Id
gridId: '',// gridId: "", //
categoryCode: '',// categoryCode: "", //
parentCode: '',// parentCode: "", //
content: '',// 1000 content: "", // 1000
reportType: 'self_help',// communitybuilding_caption;party;self_help reportType: "self_help", // communitybuilding_caption;party;self_help
reportUserName: '',// reportUserName: "", //
reportUserMobile: '',// reportUserMobile: "", //
reportTime: '',// reportTime: "", //
demandUserId: '',// user.idic_resi_user.id demandUserId: "", // user.idic_resi_user.id
demandUserName: '',// demandUserName: "", //
demandUserMobile: '',// demandUserMobile: "", //
wantServiceTime: '',// wantServiceTime: "", //
serviceType: '', serviceType: "",
serverId: '', serverId: "",
locationDetail: '', locationDetail: "",
serviceLocation: '',// serviceLocation: "", //
latitude: '',// latitude: "", //
longitude: '',// longitude: "", //
// categoryId: '' // categoryId: ''
}; };
} }
export default { export default {
data () { data() {
return { return {
btnDisable: false, btnDisable: false,
customerId: localStorage.getItem("customerId"), customerId: localStorage.getItem("customerId"),
demandOptions: [], demandOptions: [],
serviceOptions: [ serviceOptions: [],
],
serviceOptiondList: [], serviceOptiondList: [],
casOptions: [], casOptions: [],
@ -241,25 +267,25 @@ export default {
selCateObj: {}, selCateObj: {},
optionProps: { optionProps: {
multiple: false, multiple: false,
value: 'id', value: "id",
label: 'name', label: "name",
children: 'subCategory', children: "subCategory",
}, },
formData: iniFmData(), formData: iniFmData(),
okflag: false, okflag: false,
// //
keyWords: '', keyWords: "",
eventDetailCopy: {} eventDetailCopy: {},
}; };
}, },
components: {}, components: {},
computed: {
dataRule () {
computed: {
dataRule() {
return { return {
// categoryId: [ // categoryId: [
// { required: true, message: "", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
@ -285,14 +311,11 @@ export default {
serverId: [ serverId: [
{ required: true, message: "服务方不能为空", trigger: "blur" }, { required: true, message: "服务方不能为空", trigger: "blur" },
], ],
}; };
}, },
}, },
props: {
props: {
demandUserId: { demandUserId: {
type: String, type: String,
default: "", default: "",
@ -312,156 +335,142 @@ export default {
eventDetailData: { eventDetailData: {
type: Object, type: Object,
default () { default() {
return {} return {};
} },
}, },
source: {//manage visiual source: {
//manage visiual
type: String, type: String,
default: 'manage' default: "manage",
} },
}, },
watch: { watch: {
demandUserName: function (val) { demandUserName: function (val) {
this.formData.reportUserName = val;
this.formData.reportUserName = val this.formData.demandUserName = val;
this.formData.demandUserName = val
}, },
demandUserMobile: function (val) { demandUserMobile: function (val) {
this.formData.reportUserMobile = val;
this.formData.reportUserMobile = val this.formData.demandUserMobile = val;
this.formData.demandUserMobile = val
}, },
demandUserId: function (val) { demandUserId: function (val) {
this.formData.demandUserId = val;
this.formData.demandUserId = val
}, },
}, },
created () {
}, async mounted() {
const { user } = this.$store.state;
async mounted () { this.agencyId = user.agencyId;
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption()
// this.formData = { ...this.formDataTemp }
this.initMap()
if (this.eventId) { if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.reportUserMobile = this.eventDetailCopy.mobile this.formData.reportUserMobile = this.eventDetailCopy.mobile;
this.formData.reportUserName = this.eventDetailCopy.name this.formData.reportUserName = this.eventDetailCopy.name;
this.formData.reportTime = this.eventDetailCopy.happenTime this.formData.reportTime = this.eventDetailCopy.happenTime;
this.formData.gridId = this.eventDetailCopy.gridId this.formData.gridId = this.eventDetailCopy.gridId;
this.formData.demandUserId = this.eventDetailCopy.reportUserId this.formData.demandUserId = this.eventDetailCopy.reportUserId;
this.formData.demandUserName = this.eventDetailCopy.name this.formData.demandUserName = this.eventDetailCopy.name;
this.formData.demandUserMobile = this.eventDetailCopy.mobile this.formData.demandUserMobile = this.eventDetailCopy.mobile;
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { if (
this.eventDetailCopy.parentCategoryId &&
this.eventDetailCopy.categoryId
) {
// this.selCategoryArray = [] // this.selCategoryArray = []
// this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId) // this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
// this.selCategoryArray.push(this.eventDetailCopy.categoryId) // this.selCategoryArray.push(this.eventDetailCopy.categoryId)
// this.formData.categoryId = this.eventDetailCopy.categoryId // this.formData.categoryId = this.eventDetailCopy.categoryId
// this.selCateObj = { // this.selCateObj = {
// name: this.eventDetailCopy.categoryName, // name: this.eventDetailCopy.categoryName,
// id: this.eventDetailCopy.categoryId // id: this.eventDetailCopy.categoryId
// } // }
} }
} else { } else {
this.formData.demandUserName = this.demandUserName this.formData.demandUserName = this.demandUserName;
this.formData.demandUserMobile = this.demandUserMobile this.formData.demandUserMobile = this.demandUserMobile;
this.formData.demandUserId = this.demandUserId this.formData.demandUserId = this.demandUserId;
} }
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption();
this.initMap();
}, },
methods: { methods: {
async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list";
async getCategoryList () { let params = {};
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {} const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
let treeDataNew = this.filterTree(data);
let treeDataNew = this.filterTree(data)
// //
++this.iscascaderShow ++this.iscascaderShow;
this.casOptions = [] this.casOptions = [];
this.casOptions = treeDataNew
this.casOptions = treeDataNew;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
handleChangeCate () { handleChangeCate() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data;
this.formData.categoryId = this.selCateObj.id this.formData.categoryId = this.selCateObj.id;
}, },
// //
filterTree (arr) { filterTree(arr) {
let childs = arr let childs = arr;
for (let i = childs.length; i--; i > 0) { for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) { if (childs[i].subCategory) {
if (childs[i].subCategory.length) { if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory) this.filterTree(childs[i].subCategory);
} else { } else {
delete childs[i].subCategory delete childs[i].subCategory;
} }
} }
} }
return arr return arr;
}, },
async getDemandOptions () { async getDemandOptions() {
const url = "/heart/icresidemanddict/demandoption" const url = "/heart/icresidemanddict/demandoption";
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.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(data), this.getTreeData(data),
"usableFlag" "usableFlag"
); );
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
async getServiceOption () { async getServiceOption() {
const url = "/sys/dict/data/dictlist" const url = "/sys/dict/data/dictlist";
let params = { dictType: "user_demand_service_type", } let params = { dictType: "user_demand_service_type" };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.serviceOptions = data; this.serviceOptions = data;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
getTreeData (data) { getTreeData(data) {
if (!Array.isArray(data)) return []; if (!Array.isArray(data)) return [];
let arr = data.map((item) => { let arr = data.map((item) => {
let _item = {}; let _item = {};
@ -476,7 +485,8 @@ export default {
}); });
return arr; return arr;
}, },
getFlagData (data, flag) {
getFlagData(data, flag) {
if (!Array.isArray(data)) return []; if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]); let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => { let arr2 = arr1.map((item) => {
@ -488,7 +498,7 @@ export default {
return arr2; return arr2;
}, },
handleCateSlect (val) { handleCateSlect(val) {
console.log("val", val); console.log("val", val);
if (val.length === 1) { if (val.length === 1) {
this.demandOptions.forEach((item) => { this.demandOptions.forEach((item) => {
@ -501,7 +511,7 @@ export default {
} }
}, },
handleServiceChange (type, val) { handleServiceChange(type, val) {
if (val === "social_org") { if (val === "social_org") {
if (type === "add") { if (type === "add") {
this.getServiceuserList(val, "add_demand"); this.getServiceuserList(val, "add_demand");
@ -513,8 +523,7 @@ export default {
} }
}, },
async getServiceuserList (serviceType, query) { async getServiceuserList(serviceType, query) {
if (!serviceType) return false; if (!serviceType) return false;
const { demandUserId } = this.formData; const { demandUserId } = this.formData;
const params = { const params = {
@ -523,154 +532,83 @@ export default {
queryPurpose: query, queryPurpose: query,
}; };
const url = "/heart/userdemand/servicelist";
const url = "/heart/userdemand/servicelist" const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.serviceOptiondList = data.filter( this.serviceOptiondList = data.filter(
(item) => item.value != demandUserId (item) => item.value != demandUserId
); );
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
async getDemandInfo () { async getDemandInfo() {
this.okflag = false this.okflag = false;
this.$refs["ref_form"].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
app.util.validateRule(messageObj); app.util.validateRule(messageObj);
// this.formData.categoryId = this.selCateObj.id // this.formData.categoryId = this.selCateObj.id
} else { } else {
this.okflag = true;
this.okflag = true
} }
}); });
}, },
resetData() {},
resetData () {
},
// init // init
initMap () { initMap() {
// let { latitude, longitude } = this.$store.state.user;
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_map'), {
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_map"),
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 () { //
infoWindowList.forEach((infoWindow) => { map.on("dragend", (e) => {
infoWindow.close() this.handleMoveCenter(e);
}) });
infoWindowList.length = 0
markers.setGeometries([]) map.setCenter(latitude, longitude);
// map.setMarker(latitude, longitude);
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 () { async handleMoveCenter() {
// //
const center = map.getCenter() const { lat, lng } = map.getCenter();
const lat = center.getLat() this.formData.latitude = lat;
const lng = center.getLng() this.formData.longitude = lng;
this.formData.latitude = lat map.setMarker(lat, lng);
this.formData.longitude = lng
this.setMarker(lat, lng) let { msg, data } = await map.getAddress(lat, lng);
this.convert(lat, lng) if (msg == "success") {
this.formData.address = data.address;
}
}, },
convert (lat, lng) { async handleSearchMap() {
markers.setGeometries([]); const { msg, data } = await map.searchNearby(this.keyWords);
// var input = document.getElementById('location').value.split(','); if (msg == "success") {
let location const { lat, lng } = data;
if (lat && lng) { map.setCenter(lat, lng);
location = new TMap.LatLng(lat, lng); map.setMarker(lat, lng);
this.formData.latitude = lat;
this.formData.longitude = lng;
} else { } else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude); this.$message.error("未检索到相关位置坐标");
} }
// 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({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -678,7 +616,7 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();
@ -688,14 +626,11 @@ export default {
}; };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/a_customize.scss"; @import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss"; @import "@/assets/scss/modules/shequzhili/event-info.scss";
</style> </style>
<style> <style>
.el-dialog__body { .el-dialog__body {
padding: 0 10px 20px !important; padding: 0 10px 20px !important;

Loading…
Cancel
Save