|
@@ -14,6 +14,7 @@
|
|
|
:allDataTotal="allDataTotal"
|
|
|
:allSearching="allSearching"
|
|
|
:highSearching="highSearching"
|
|
|
+ :tableFileData="tableFileData"
|
|
|
@changeSearch="changeSearch"
|
|
|
@openMaxmin="openMaxmin"
|
|
|
></DefaultPage>
|
|
@@ -31,6 +32,8 @@ import useUserStore from "@/store/modules/user";
|
|
|
import usePermissionStore from "@/store/modules/permission";
|
|
|
import { searchAll } from "@/api/search/search.js";
|
|
|
import { flieSearch } from "@/api/search/search.js";
|
|
|
+import { getInfo, getInfoByDirId } from "@/api/biz/info";
|
|
|
+import { listRecent, getRecent } from "@/api/biz/recent";
|
|
|
const permissionStore = usePermissionStore();
|
|
|
const sidebarRouters = computed(() => permissionStore.sidebarRouters);
|
|
|
const roles = useUserStore().roles;
|
|
@@ -50,6 +53,7 @@ const hightDataTotal = ref(); // 高级搜索数据总数
|
|
|
const allDataTotal = ref(); // 全域搜索数据总数
|
|
|
const allSearching = ref(false);
|
|
|
const highSearching = ref(false);
|
|
|
+const tableFileData = ref([]);
|
|
|
|
|
|
// 将标签信息保存到本地
|
|
|
const openMaxmin = (title, path) => {
|
|
@@ -96,6 +100,7 @@ const openMaxmin = (title, path) => {
|
|
|
setTimeout(() => {
|
|
|
iframeSize(id);
|
|
|
}, 1000);
|
|
|
+ getList();
|
|
|
return;
|
|
|
},
|
|
|
full: (id) => {
|
|
@@ -139,6 +144,7 @@ const openMaxmin = (title, path) => {
|
|
|
setTimeout(() => {
|
|
|
iframeSize(id);
|
|
|
}, 1500);
|
|
|
+ getList();
|
|
|
return;
|
|
|
},
|
|
|
full: (id) => {
|
|
@@ -158,6 +164,20 @@ const openMaxmin = (title, path) => {
|
|
|
sessionStorage.setItem("tagList", JSON.stringify([item]));
|
|
|
}
|
|
|
};
|
|
|
+// 获取最近文件数据
|
|
|
+const getList = async () => {
|
|
|
+ const resN = await listRecent({ isFolder: "N" });
|
|
|
+ if (resN.code === 200) {
|
|
|
+ tableFileData.value.length = resN.rows.length;
|
|
|
+ for (let index = 0; index < resN.rows.length; index++) {
|
|
|
+ getInfo(resN.rows[index].relaId).then(async (res) => {
|
|
|
+ // tableFileData.value.push(res.data);
|
|
|
+ tableFileData.value.splice(index, 1, res.data);
|
|
|
+ index++;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
//判断标签是否存在
|
|
|
const hasThis = (clickRowId) => {
|
|
|
const storage = sessionStorage.getItem("tagList");
|
|
@@ -191,10 +211,8 @@ const iframeSize = (id) => {
|
|
|
}
|
|
|
// console.log('outIframe', outIframe);
|
|
|
// console.log("div.parentElement", div.offsetHeight);
|
|
|
- inIframe.style.height =
|
|
|
- tagIfarme.offsetHeight + "px";
|
|
|
- inIframe.style.width =
|
|
|
- tagIfarme.offsetWidth + "px";
|
|
|
+ inIframe.style.height = tagIfarme.offsetHeight + "px";
|
|
|
+ inIframe.style.width = tagIfarme.offsetWidth + "px";
|
|
|
};
|
|
|
|
|
|
// 点击logo回到主页
|
|
@@ -204,6 +222,7 @@ const goIndex = () => {
|
|
|
|
|
|
// 页面刷新后清除标签
|
|
|
onMounted(() => {
|
|
|
+ getList();
|
|
|
// 判断是否页面刷新 刷新就清楚存储的标签
|
|
|
switch (performance.navigation.type) {
|
|
|
case 0:
|
|
@@ -240,8 +259,7 @@ onMounted(() => {
|
|
|
onUnmounted(() => {
|
|
|
clearInterval();
|
|
|
});
|
|
|
-const changeSearch = async (val, text) => {
|
|
|
-
|
|
|
+const changeSearch = (val, text) => {
|
|
|
searchText.value = text;
|
|
|
if (val) {
|
|
|
if (searchText.value.length < 2) {
|
|
@@ -263,23 +281,23 @@ const changeSearch = async (val, text) => {
|
|
|
pageSize: 99999,
|
|
|
pageNum: 1,
|
|
|
};
|
|
|
- //高级搜索
|
|
|
- searchAll(query).then((res) => {
|
|
|
- // console.log("hightData", res);
|
|
|
- allSearching.value = false;
|
|
|
- // if (res.data) {
|
|
|
- hightData.value = res.data;
|
|
|
- hightDataTotal.value = res.total;
|
|
|
- // }
|
|
|
- });
|
|
|
-
|
|
|
// 全域搜索
|
|
|
flieSearch(allQuery).then((res2) => {
|
|
|
allData.value = res2.rows;
|
|
|
allDataTotal.value = res2.total;
|
|
|
- highSearching.value = false;
|
|
|
+ allSearching.value = false;
|
|
|
+
|
|
|
// console.log("allData", res2);
|
|
|
});
|
|
|
+ //高级搜索
|
|
|
+ searchAll(query).then((res) => {
|
|
|
+ // console.log("hightData", res);
|
|
|
+ highSearching.value = false;
|
|
|
+ // if (res.data) {
|
|
|
+ hightData.value = res.data;
|
|
|
+ hightDataTotal.value = res.total;
|
|
|
+ // }
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -308,7 +326,7 @@ const changeSearch = async (val, text) => {
|
|
|
// border: 1px solid #000;
|
|
|
background-color: #b5d2ea;
|
|
|
}
|
|
|
-:deep(.is-message-box){
|
|
|
+:deep(.is-message-box) {
|
|
|
z-index: 99999999 !important;
|
|
|
}
|
|
|
</style>
|