Browse Source

Merge branch 'dev-天地图'

dev-新版ui
dai 3 years ago
parent
commit
9f0b9a603e
  1. 4
      .env.development
  2. 17
      src/views/components/tinymce2/index.vue
  3. 119
      src/views/modules/communityParty/regionalParty/activitysDetail.vue
  4. 2
      src/views/modules/communityParty/regionalParty/activitysForm.vue

4
.env.development

@ -8,7 +8,7 @@ VUE_APP_API_SERVER = http://192.168.1.140/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
# VUE_APP_NODE_ENV=dev_sdtdt VUE_APP_NODE_ENV=dev_sdtdt
VUE_APP_NODE_ENV=dev # VUE_APP_NODE_ENV=dev
#项目根路径 #项目根路径
VUE_APP_PUBLIC_PATH=epmet-oper VUE_APP_PUBLIC_PATH=epmet-oper

17
src/views/components/tinymce2/index.vue

@ -93,7 +93,7 @@ export default {
toolbar: toolbar:
// "formats undo redo paste print fontsizeselect fontselect template fullpage|wordcount ltr rtl visualchars visualblocks toc spellchecker searchreplace|save preview pagebreak nonbreaking|media image|outdent indent aligncenter alignleft alignright alignjustify lineheight underline quicklink h2 h3 blockquote numlist bullist table removeformat forecolor backcolor bold italic strikethrough hr charmap link insertdatetime|subscript superscript cut codesample code |anchor preview fullscreen|help", // "formats undo redo paste print fontsizeselect fontselect template fullpage|wordcount ltr rtl visualchars visualblocks toc spellchecker searchreplace|save preview pagebreak nonbreaking|media image|outdent indent aligncenter alignleft alignright alignjustify lineheight underline quicklink h2 h3 blockquote numlist bullist table removeformat forecolor backcolor bold italic strikethrough hr charmap link insertdatetime|subscript superscript cut codesample code |anchor preview fullscreen|help",
"formats undo redo|fontsizeselect|fontselect|forecolor backcolor bold italic underline strikethrough removeformat|image media link|outdent indent|aligncenter alignleft alignright alignjustify lineheight quicklink h2 h3 blockquote numlist bullist table|subscript superscript codesample code|preview fullscreen|wordcount|help", "formats undo redo|fontsizeselect|fontselect|forecolor backcolor bold italic underline strikethrough removeformat|image media link|outdent indent|aligncenter alignleft alignright alignjustify lineheight quicklink h2 h3 blockquote numlist bullist table|subscript superscript codesample code|preview fullscreen|wordcount|help",
content_style: "p {margin: 5px 0; font-size: 14px}", content_style: "p {margin: 5px 0; font-size: 14px} img{max-width:100%;}",
fontsize_formats: "12px 14px 16px 18px 24px 36px 48px 56px 72px", fontsize_formats: "12px 14px 16px 18px 24px 36px 48px 56px 72px",
font_formats: font_formats:
"微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;", "微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;",
@ -152,6 +152,21 @@ export default {
// tinymce.init; // // tinymce.init; //
const revert_data = (content) => { const revert_data = (content) => {
// content =
// '<img> <img srt=""> <img style="width:100px;"> <img style="max-width:100%;width:100px;">';
// content = content.replace(/<(img).*?(>|\/>|<\/img>)/g, function (mats) {
// if (mats.indexOf("style") < 0) {
// return mats.replace(
// /<\s*img/,
// '<img style="max-width:100%;height:auto;"'
// );
// } else {
// return mats.replace(
// /style=("|')/,
// "style=$1max-width:100%;height:auto;"
// );
// }
// });
this.$emit("input", content); this.$emit("input", content);
}; };

119
src/views/modules/communityParty/regionalParty/activitysDetail.vue

@ -1,11 +1,8 @@
<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.gridName }}</span> <span>{{ formData.gridName }}</span>
@ -24,8 +21,7 @@
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">活动内容</span> <span class="info-title-2">活动内容</span>
<p class="text_p" <p class="text_p" v-html="formData.content"></p>
v-html="formData.content"></p>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务人数</span> <span class="info-title-2">服务人数</span>
@ -42,90 +38,70 @@
<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_activity"></div> <div id="app_detail_activity"></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>
<p class="text_p" <p class="text_p" v-html="formData.result"></p>
v-html="formData.result"></p>
</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>
</div> </div>
</template> </template>
<script> <script>
import { Loading } from "element-ui"; // Loading
import { Loading } from 'element-ui' // Loading
import daiMap from "@/utils/dai-map"; import daiMap from "@/utils/dai-map";
var map var map;
var search let loading; //
var markers
var infoWindowList
var geocoder //
let loading //
export default { export default {
data () { data() {
return { return {
formData: {}, formData: {},
initLoading: false initLoading: false,
} };
}, },
components: {}, components: {},
mounted () { mounted() {},
},
methods: { methods: {
handleCancle() {
handleCancle () { this.diaDestroy();
this.diaDestroy() this.$emit("diaDetailClose");
this.$emit('diaDetailClose')
}, },
diaDestroy () { diaDestroy() {
if (map) { if (map) {
// map.destroy() // map.destroy()
} }
}, },
async initForm (row) { async initForm(row) {
this.startLoading();
this.startLoading() const { user } = this.$store.state;
const { user } = this.$store.state this.agencyId = user.agencyId;
this.agencyId = user.agencyId
for (let item of this.serviceList) { for (let item of this.serviceList) {
if (row.serviceMatter === item.value) { if (row.serviceMatter === item.value) {
row.serviceMatterShow = item.label row.serviceMatterShow = item.label;
} }
} }
this.formData = { ...row } this.formData = { ...row };
this.initLoading = true
this.initLoading = true;
let { latitude, longitude } = this.$store.state.user; let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude) console.log("lat" + latitude + ",lon" + longitude);
if (this.formData.latitude && this.formData.longitude) { if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude latitude = this.formData.latitude;
longitude = this.formData.longitude longitude = this.formData.longitude;
} }
if (!latitude || latitude == "" || latitude == "0") { if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821; latitude = 39.9088810666821;
@ -133,23 +109,18 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
if (!map) { if (!map) {
this.initMap(latitude, longitude) this.initMap(latitude, longitude);
} else { } else {
map.setCenter(latitude, longitude); map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude); map.setMarker(latitude, longitude);
} }
});
}) this.endLoading();
this.endLoading()
}, },
// init // init
initMap (latitude, longitude) { initMap(latitude, longitude) {
map = new daiMap( map = new daiMap(
document.getElementById("app_detail_activity"), document.getElementById("app_detail_activity"),
{ latitude, longitude }, { latitude, longitude },
@ -167,51 +138,53 @@ export default {
map.setCenter(latitude, longitude); map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude); map.setMarker(latitude, longitude);
}, },
// //
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: {},
props: { props: {
serviceList: { serviceList: {
type: Array, type: Array,
default: [] default: [],
}, },
gridList: { gridList: {
type: Array, type: Array,
default: [] default: [],
}, },
} },
} };
</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>
<style lang="scss" scoped> <style lang="scss" scoped>
.text_p { /deep/ .text_p {
margin: 0 0; margin: 0 0;
border: 3px; border: 3px;
> p { > p {
margin: 0 0; margin: 0 0;
} }
img {
max-width: 100%;
height: auto;
}
} }
</style> </style>

2
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -349,7 +349,7 @@ export default {
let style_img = "style='width:50px;height:40px;' " let style_img = "style='width:50px;height:40px;' "
if (this.formData.content) { if (this.formData.content) {
this.formData.content = this.formData.content.replace(/<img/g, "<img style='width:200px;height:120px;'") // this.formData.content = this.formData.content.replace(/<img/g, "<img style='width:200px;height:120px;'")
// let array=this.formData.content.split('<img') // let array=this.formData.content.split('<img')
} }

Loading…
Cancel
Save