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/api
# VUE_APP_NODE_ENV=dev_sdtdt
VUE_APP_NODE_ENV=dev
VUE_APP_NODE_ENV=dev_sdtdt
# VUE_APP_NODE_ENV=dev
#项目根路径
VUE_APP_PUBLIC_PATH=epmet-oper

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

@ -93,7 +93,7 @@ export default {
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|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",
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;",
@ -152,6 +152,21 @@ export default {
// tinymce.init; //
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);
};

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

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

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

@ -349,7 +349,7 @@ export default {
let style_img = "style='width:50px;height:40px;' "
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')
}

Loading…
Cancel
Save