This commit is contained in:
2024-08-05 10:28:53 +08:00
parent fae9b69f90
commit f65f71f65c
2 changed files with 19 additions and 3 deletions

View File

@ -275,7 +275,8 @@
宣教 宣教
</div> </div>
<div class="righttextarea"> <div class="righttextarea">
<span v-if="item.templateDetail" v-html="item.templateDetail.propagandaContent"> <span @click="getimg($event)" v-if="item.templateDetail"
v-html="item.templateDetail.propagandaContent">
</span> </span>
<!-- <editor v-model="item.templateDetail" :min-height="192" style="width: 100%" /> --> <!-- <editor v-model="item.templateDetail" :min-height="192" style="width: 100%" /> -->
</div> </div>
@ -306,6 +307,12 @@
<el-button type="primary" @click="lookshow = false"> </el-button> <el-button type="primary" @click="lookshow = false"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="图片预览" :visible.sync="imageshow" width="70%">
<img :src="currentSrc" alt="" style="width:100%" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="imageshow = false"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -344,11 +351,15 @@ export default {
edges: [], edges: [],
}, },
lookshow: false, lookshow: false,
imageshow: false,
currentSrc: undefined,
}; };
}, },
created() { created() {
this.info(); this.info();
}, },
mounted() {
},
methods: { methods: {
changeswitch(e) { changeswitch(e) {
if (!e) { if (!e) {
@ -387,6 +398,12 @@ export default {
loading.close(); loading.close();
}) })
}, },
getimg(e) {
if (e.target.id == 'image') {
this.currentSrc = e.target.currentSrc
this.imageshow = true
}
},
getlist() { getlist() {
if (this.routelist.length == 0) { if (this.routelist.length == 0) {
const loading = this.$loading({ const loading = this.$loading({
@ -401,7 +418,7 @@ export default {
this.routelist.forEach(e => { this.routelist.forEach(e => {
if (e.taskNodeType == 'PROPAGANDA_ARTICLE') { if (e.taskNodeType == 'PROPAGANDA_ARTICLE') {
e.templateDetail.propagandaContent = e.templateDetail?.propagandaContent?.replace(/\<img/gi, e.templateDetail.propagandaContent = e.templateDetail?.propagandaContent?.replace(/\<img/gi,
"<img style='max-width:100%'") "<img id='image' style='max-width:100%'")
} }
}) })
this.tab = 2 this.tab = 2

View File

@ -295,7 +295,6 @@ export default {
} }
}); });
}); });
console.log(this.questiondata, " this.questiondata");
} }
}, },
mounted() {}, mounted() {},