|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="container">
|
|
|
+ <div class="container" v-if="!showPreview">
|
|
|
<div class="logo">
|
|
|
<img src="@/assets/images/Frame_427319127.png" alt="" />
|
|
|
<div class="font">聚合智慧文档管理系统</div>
|
|
|
@@ -40,6 +40,7 @@
|
|
|
class="search_ipt"
|
|
|
v-model="searchText"
|
|
|
maxlength="32"
|
|
|
+ @keydown.enter="doSearch"
|
|
|
placeholder="请输入要查询的内容"
|
|
|
/>
|
|
|
<div class="search_btn" @click="doSearch">搜索</div>
|
|
|
@@ -56,7 +57,9 @@
|
|
|
>
|
|
|
<!-- <el-scrollbar height="200px" ref="scrollRef" id="scrollRef"> -->
|
|
|
<div class="oneBox" v-for="item in listData" :key="item.id">
|
|
|
- <span class="fileName">{{ item.content.docInfo.fileName }}</span>
|
|
|
+ <span class="fileName" @click="toPreview(item)">{{
|
|
|
+ item.content.docInfo.fileName
|
|
|
+ }}</span>
|
|
|
<div class="flieTime">
|
|
|
<img src="@/assets/images/bx:bx-time-five.png" alt="" />
|
|
|
<span>{{ item.content.docInfo.createTime }}</span>
|
|
|
@@ -76,13 +79,22 @@
|
|
|
<span>没有关于“{{ noFound }}”的结果 </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <IdentifyFont :openFile="openFile"></IdentifyFont> -->
|
|
|
</div>
|
|
|
+ <divv v-else class="preview">
|
|
|
+ <FileEdit
|
|
|
+ :docId="clickRowId"
|
|
|
+ :copyRow="copyRow"
|
|
|
+ :historyPrew="historyPrew"
|
|
|
+ :historycopyRow="historycopyRow"
|
|
|
+ :onlyView="onlyView"
|
|
|
+ ></FileEdit>
|
|
|
+ </divv>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted, ref } from "vue";
|
|
|
import { search } from "@/api/search/search.js";
|
|
|
+import FileEdit from "@/views/myfile/components/FileEdit.vue";
|
|
|
// import IdentifyFont from "@/components/IdentifyFont/IdentifyFont.vue";
|
|
|
const searchText = ref(""); //搜索ipt的值
|
|
|
const selectValue = ref(1); //文档空间类型
|
|
|
@@ -93,6 +105,12 @@ const noData = ref(false); //没有搜索出数据
|
|
|
const beEnd = ref(false); //拉到最底部了
|
|
|
const listData = ref([]);
|
|
|
const noFound = ref(); //没有结果的text
|
|
|
+const clickRowId = ref();
|
|
|
+const copyRow = ref();
|
|
|
+const historyPrew = ref();
|
|
|
+const historycopyRow = ref(false);
|
|
|
+const onlyView = ref(false);
|
|
|
+const showPreview = ref(false);
|
|
|
const selectOptions = [
|
|
|
{ label: "公共文档", value: 1 },
|
|
|
{ label: "部门文档", value: 2 },
|
|
|
@@ -165,9 +183,22 @@ const setScroll = async () => {
|
|
|
beEnd.value = true;
|
|
|
}
|
|
|
};
|
|
|
+// 预览事件
|
|
|
+const toPreview = (item) => {
|
|
|
+ console.log("item", item);
|
|
|
+ clickRowId.value = item.content.docInfo.docId;
|
|
|
+ copyRow.value = item.content.docInfo;
|
|
|
+ showPreview.value = true;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.preview {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
.container {
|
|
|
height: 100%;
|
|
|
background-color: #fff;
|