|
@@ -37,9 +37,18 @@
|
|
|
:index="String(item.id) + '-' + item.name"
|
|
|
>
|
|
|
<template #title>
|
|
|
- <div>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </div>
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="item.name"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
<template v-if="item.children">
|
|
|
<el-sub-menu
|
|
@@ -47,7 +56,20 @@
|
|
|
:key="ind"
|
|
|
:index="item.id + '-' + item2.id + '-' + item2.name"
|
|
|
>
|
|
|
- <template #title>{{ item2.name }}</template>
|
|
|
+ <template #title>
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="item2.name"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">
|
|
|
+ <span>{{ item2.name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
|
|
|
<template v-if="item2.children">
|
|
|
<el-sub-menu
|
|
@@ -55,7 +77,20 @@
|
|
|
:key="inda"
|
|
|
:index="item.id + '-' + item2.id + '-' + item3.id"
|
|
|
>
|
|
|
- <template #title>{{ item3.name }}</template>
|
|
|
+ <template #title>
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="item3.name"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">
|
|
|
+ <span>{{ item3.name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
<el-menu-item
|
|
|
v-for="(child, inx) in item3.documents"
|
|
|
:key="inx"
|
|
@@ -71,7 +106,17 @@
|
|
|
'-' +
|
|
|
item3.name
|
|
|
"
|
|
|
- >{{ child.title }}</el-menu-item
|
|
|
+ >
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="child.title"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">{{ child.title }}</div>
|
|
|
+ </template>
|
|
|
+ </el-popover></el-menu-item
|
|
|
>
|
|
|
</el-sub-menu>
|
|
|
</template>
|
|
@@ -81,7 +126,17 @@
|
|
|
:key="index"
|
|
|
@click="change(child.content, child.title)"
|
|
|
:index="item.id + '-' + item2.id + '-' + child.id"
|
|
|
- >{{ child.title }}</el-menu-item
|
|
|
+ >
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="child.title"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">{{ child.title }}</div>
|
|
|
+ </template>
|
|
|
+ </el-popover></el-menu-item
|
|
|
>
|
|
|
</template>
|
|
|
</el-sub-menu>
|
|
@@ -92,8 +147,18 @@
|
|
|
:key="index"
|
|
|
:index="item.id + '-' + child.id"
|
|
|
@click="change(child.content, child.title)"
|
|
|
- >{{ child.title }}</el-menu-item
|
|
|
>
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ :content="child.title"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div class="over">{{ child.title }}</div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </el-menu-item>
|
|
|
</template>
|
|
|
</el-sub-menu>
|
|
|
</el-menu>
|
|
@@ -176,7 +241,9 @@ const closeb = (key, keyPath) => {};
|
|
|
//搜索结果
|
|
|
if (route.query.indexid) {
|
|
|
defaultact.value = route.query.indexid;
|
|
|
- book.content.con = route.query.content;
|
|
|
+ const regex = new RegExp('<img', 'gi')
|
|
|
+ book.content.con = route.query.content.replace(regex, `<img style="width: 100%; height: auto;margin-top:20px;"`)
|
|
|
+ // book.content.con = route.query.content;
|
|
|
docu.value = route.query.title;
|
|
|
categoryname.value = route.query.category_name;
|
|
|
}
|
|
@@ -187,7 +254,9 @@ const agreement = async (code) => {
|
|
|
const { data } = await agreementAPi.agreement({
|
|
|
code: code,
|
|
|
});
|
|
|
- book.content.first = data;
|
|
|
+ const regex = new RegExp('<img', 'gi')
|
|
|
+ book.content.con = data.replace(regex, `<img style="width: 100%; height: auto;margin-top:20px;"`)
|
|
|
+ // book.content.first = data;
|
|
|
} catch (error) {}
|
|
|
};
|
|
|
if (book.content.con == "" && type_id.value == 1) {
|
|
@@ -227,13 +296,21 @@ const category = async () => {
|
|
|
};
|
|
|
onMounted(category);
|
|
|
const change = (content, title) => {
|
|
|
- book.content.con = content;
|
|
|
+ const regex = new RegExp('<img', 'gi')
|
|
|
+ book.content.con = content.replace(regex, `<img style="width: 100%; height: auto;margin-top:20px;"`)
|
|
|
+ // book.content.con = content;
|
|
|
docu.value = title;
|
|
|
categoryname.value = lastname.value;
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.over {
|
|
|
+ width: 160px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
.scroll-container {
|
|
|
height: 100vh;
|
|
|
overflow-y: scroll;
|
|
@@ -244,7 +321,7 @@ const change = (content, title) => {
|
|
|
height: 16px !important;
|
|
|
}
|
|
|
.btnline {
|
|
|
- width: 880px;
|
|
|
+ // width: 880px;
|
|
|
height: 1px;
|
|
|
background: rgba(151, 151, 151, 0.2);
|
|
|
margin-bottom: 25px;
|