From fde8e3bedaf5f883f38c3a0ec33d3c6a8748d1c9 Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期五, 21 六月 2024 18:02:44 +0800 Subject: [PATCH] wfs 范围查询 --- src/components/Chat/chatList.vue | 94 ++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 84 insertions(+), 10 deletions(-) diff --git a/src/components/Chat/chatList.vue b/src/components/Chat/chatList.vue index b1e8e3d..22c0501 100644 --- a/src/components/Chat/chatList.vue +++ b/src/components/Chat/chatList.vue @@ -15,16 +15,38 @@ <div class="web__main_Date"> <div> <cite> - <div> + <div style="display: flex"> {{ item.name }} + + <div style="margin-left: 10px" v-show="item.file"> + <el-select + @change="(val) => setFileChange(val)" + v-model="item.file" + size="mini" + > + <el-option + v-for="(res, key) in item.fileList" + :key="key" + :label="res.name" + :value="res.url" + > + </el-option> + </el-select> + </div> </div> + <div> {{ item.date }} </div> </cite> </div> - - <div class="web__main-text"> + <div v-show="item.markDown == true" class="web__main-text"> + <VueMarkdown + class="web_Main_markDown" + :source="item.text.text" + ></VueMarkdown> + </div> + <div v-show="item.markDown == false" class="web__main-text"> <div class="web__main-arrow"></div> <span v-html="handleDetail(item.text.text)" @@ -42,11 +64,6 @@ </div> </div> </div> - <!-- <div class="web__main-user"> - - - </div> --> - <!-- --> </div> </div> </div> @@ -77,13 +94,24 @@ <script> import emojiParser from "wechat-emoji-parser"; +import VueMarkdown from "vue-markdown"; + +import axios from "axios"; +import bus from "../../assets/js/bus"; export default { name: "JwChat_list", + arr: [], + components: { + VueMarkdown + }, filters: { setWidth(value) { let width = value; if (`${value}`.match(/^\d+$/)) { - width = value + "px"; + width = value-30 + "px"; + } + if(width=="100vh"){ + return "99vh" } return width; } @@ -120,6 +148,14 @@ } }, methods: { + setFileChange(res) { + if (res == "testUrl") return; + axios.get(res).then((response) => { + if (response.status == 200) { + bus.$emit("setInsertMarkDown", response.data); + } + }); + }, loding(index) { const size = this.list.length; if (index == size - 1) { @@ -254,6 +290,11 @@ @css { * }zoom: 1; */ vertical-align: top; font-size: 20px; + background: #555555; + padding: 10px !important; + border-radius:10px !important; + margin-top:10px ; + } .web__main-user { @@ -309,7 +350,7 @@ word-break: break-all; } .web__main_content { - width: 100%; + width: calc(100% - 50px); padding: 10px 0px; display: flex; } @@ -487,3 +528,36 @@ } } </style> + + +<style > + .web_Main_markDown h1 { + line-height: 30px !important; + font-size: 20px !important; +} +.web_Main_markDown h2 { + line-height: 25px !important; + font-size: 18px !important; + margin-left: 10px; +} +.web_Main_markDown h3 { + line-height: 25px !important; + font-size: 18px !important; + margin-left: 10px; +} +.web_Main_markDown li { + line-height: 20px !important; + font-size: 16px !important; + margin-left: 20px; +} +.web_Main_markDown p { + line-height: 20px !important; + font-size: 16px !important; + margin-left: 20px; +} +.web_Main_markDown { + background: #555555; + padding: 10px; + border-radius: 10px; +} +</style> \ No newline at end of file -- Gitblit v1.9.3