|
|
@@ -220,7 +220,8 @@
|
|
|
import { onMounted, ref, toRaw, inject } from "vue";
|
|
|
// import TopTabs from "@/components/TopTabs/index.vue"
|
|
|
import { listRecent, getRecent } from "@/api/biz/recent";
|
|
|
-import { getInfo } from "@/api/biz/info";
|
|
|
+import { getInfo, getInfoByDirId } from "@/api/biz/info";
|
|
|
+import { getSpace } from "@/api/biz/space";
|
|
|
import { getDir } from "@/api/biz/dir";
|
|
|
import documents from "@/api/document/document";
|
|
|
import ImgFile from "@/views/myfile/jsComponents/ImgFile";
|
|
|
@@ -269,6 +270,7 @@ const backFolder = ref();
|
|
|
const copyFolderName = ref();
|
|
|
const addFolderAdd = inject("addFolderAdd");
|
|
|
let collects = ref(false);
|
|
|
+const spacePath = ref()
|
|
|
let menuList = ref([
|
|
|
{
|
|
|
name: "我的空间",
|
|
|
@@ -446,51 +448,22 @@ async function chooseSet(row, index, num) {
|
|
|
}
|
|
|
console.log("chooseSetrow", row);
|
|
|
console.log("chooseSetnum", num);
|
|
|
- if (row.name == "在线编辑" || row.name == "协作") {
|
|
|
- cliCC.value = true;
|
|
|
- }
|
|
|
- if (row.name == "分享") {
|
|
|
- workOrEdit.value = num;
|
|
|
- thanks.value = true;
|
|
|
- } else {
|
|
|
- thanks.value = false;
|
|
|
- }
|
|
|
- if (row.name == "协作") {
|
|
|
- workOrEdit.value = num;
|
|
|
- if (anyP.value) {
|
|
|
- anyP.value = false;
|
|
|
- } else {
|
|
|
- anyP.value = true;
|
|
|
- }
|
|
|
- } else {
|
|
|
- anyP.value = false;
|
|
|
- }
|
|
|
- if (row.name == "删除") {
|
|
|
- myfile.delMenu(clickRowId.value).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- ElMessage({
|
|
|
- type: "success",
|
|
|
- message: "删除成功",
|
|
|
- });
|
|
|
- getAllTop();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (row.name === "复制到...") {
|
|
|
- copyOrMove.value = 0;
|
|
|
- fileTrees.value = true;
|
|
|
- }
|
|
|
- if (row.name === "移动到...") {
|
|
|
- copyOrMove.value = 1;
|
|
|
- fileTrees.value = true;
|
|
|
- }
|
|
|
if (row.name === "打开文件所在位置") {
|
|
|
- documents.getALLdocument(({parentId: clickRow.value.dirId - 0, spaceId: clickRow.value.spaceId - 0})).then((res)=>{
|
|
|
- console.log('rowres',res);
|
|
|
- })
|
|
|
+ const dirData = await getDir(clickRow.value.dirId);
|
|
|
+ const spaceData = await getSpace(clickRow.value.spaceId);
|
|
|
+ console.log("getInfoByDirId", dirData.data);
|
|
|
+ console.log("spaceData", spaceData.data);
|
|
|
+ if (spaceData.data.spaceType == "3") {
|
|
|
+ spacePath.value = "/myfile";
|
|
|
+ } else if (spaceData.data.spaceType == "1") {
|
|
|
+ spacePath.value = "/publicment";
|
|
|
+ }else{
|
|
|
+ spacePath.value = "/department";
|
|
|
+ }
|
|
|
const addData = {
|
|
|
- path: "/myfile",
|
|
|
- row: toRaw(clickRow.value),
|
|
|
+ path: spacePath.value,
|
|
|
+ name: dirData.data.dirName,
|
|
|
+ row: toRaw(dirData.data),
|
|
|
};
|
|
|
console.log("addData", addData);
|
|
|
addFolderAdd(addData);
|
|
|
@@ -520,12 +493,6 @@ async function chooseSet(row, index, num) {
|
|
|
// const res = await preview(copyFileId.value)
|
|
|
// showPreview.value = true
|
|
|
// previewData.value = URL.createObjectURL(res)
|
|
|
- } else if (row.name === "历史版本") {
|
|
|
- const resHistory = await listVersion({ docId: clickRowId.value });
|
|
|
- console.log("resHistory", resHistory);
|
|
|
- historyTotal.value = resHistory.total;
|
|
|
- fileUserTreeData.data = resHistory.rows;
|
|
|
- openForwardFile.value = true;
|
|
|
}
|
|
|
}
|
|
|
function chooseSet1(num) {
|