|
|
@@ -64,7 +64,10 @@ const openMaxmin = (title, path) => {
|
|
|
const oldStorage = JSON.parse(storage);
|
|
|
// 判断是否存在相同的标签
|
|
|
if (oldStorage.find((item) => item.path === path)) {
|
|
|
- ElMessage({ message: "该页面已经打开", type: "info" });
|
|
|
+ // ElMessage({ message: "该页面已经打开", type: "info" });
|
|
|
+ const thisTagId = oldStorage.find((item) => item.path === path).id;
|
|
|
+ // console.log("thisTagId", thisTagId);
|
|
|
+ layer.reset(thisTagId)
|
|
|
return;
|
|
|
}
|
|
|
const thisId = layer.open({
|
|
|
@@ -85,6 +88,18 @@ const openMaxmin = (title, path) => {
|
|
|
const newStorage = oldData.filter((item) => item.id !== id);
|
|
|
sessionStorage.setItem("tagList", JSON.stringify(newStorage));
|
|
|
},
|
|
|
+ // min: (id) => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // iframeSize();
|
|
|
+ // }, 200);
|
|
|
+ // return;
|
|
|
+ // },
|
|
|
+ // full: (id) => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // iframeSize();
|
|
|
+ // }, 200);
|
|
|
+ // return;
|
|
|
+ // },
|
|
|
});
|
|
|
item.id = thisId;
|
|
|
sessionStorage.setItem(
|
|
|
@@ -110,6 +125,18 @@ const openMaxmin = (title, path) => {
|
|
|
const newStorage = oldData.filter((item) => item.id !== id);
|
|
|
sessionStorage.setItem("tagList", JSON.stringify(newStorage));
|
|
|
},
|
|
|
+ // min: (id) => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // iframeSize();
|
|
|
+ // }, 200);
|
|
|
+ // return;
|
|
|
+ // },
|
|
|
+ // full: (id) => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // iframeSize();
|
|
|
+ // }, 200);
|
|
|
+ // return;
|
|
|
+ // },
|
|
|
});
|
|
|
item.id = thisId;
|
|
|
sessionStorage.setItem("tagList", JSON.stringify([item]));
|
|
|
@@ -135,11 +162,31 @@ const hasThis = (clickRowId) => {
|
|
|
if (oldStorage.find((item) => item.path.includes(clickRowId))) {
|
|
|
// ElMessage({ message: "该页面已经打开", type: "info" });
|
|
|
return 1;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+// // 控制iframe大小
|
|
|
+// const iframeSize = () => {
|
|
|
+// // console.log('执行ifSize',par);
|
|
|
+// const outIframe = document.getElementById("layui-layer-iframe");
|
|
|
+// const inIframe = outIframe.contentDocument.getElementsByTagName("iframe")[0];
|
|
|
+// if (inIframe == null) {
|
|
|
+// // console.log('没有inF');
|
|
|
+// setTimeout(() => {
|
|
|
+// // console.log('==============');
|
|
|
+// iframeSize();
|
|
|
+// }, 200);
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// // console.log('outIframe', outIframe);
|
|
|
+// // console.error(outIframe.parentElement);
|
|
|
+// inIframe.style.height = outIframe.style.height =
|
|
|
+// outIframe.parentElement.offsetHeight - 40 + "px";
|
|
|
+// inIframe.style.width = outIframe.style.width =
|
|
|
+// outIframe.parentElement.offsetWidth - 80 + "px";
|
|
|
+// };
|
|
|
const openTab = (title, path) => {
|
|
|
const item = {
|
|
|
title: title,
|
|
|
@@ -252,7 +299,6 @@ onUnmounted(() => {
|
|
|
clearInterval();
|
|
|
});
|
|
|
const changeSearch = async (val, text) => {
|
|
|
-
|
|
|
searchText.value = text;
|
|
|
if (val) {
|
|
|
if (searchText.value.length < 2) {
|