|
@@ -26,21 +26,24 @@
|
|
|
@node-click="handleNodeClick"
|
|
|
>
|
|
|
<template #default="{ node, data }">
|
|
|
- <el-tree-node-content :node="node" :data="data">
|
|
|
- <svg t="1750230337349" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
|
- xmlns="http://www.w3.org/2000/svg" p-id="1538" width="1em" height="1em">
|
|
|
- <path
|
|
|
- d="M918.673 883H104.327C82.578 883 65 867.368 65 848.027V276.973C65 257.632 82.578 242 104.327 242h814.346C940.422 242 958 257.632 958 276.973v571.054C958 867.28 940.323 883 918.673 883z"
|
|
|
- fill="#FFE9B4" p-id="1539"></path>
|
|
|
- <path
|
|
|
- d="M512 411H65V210.37C65 188.597 82.598 171 104.371 171h305.92c17.4 0 32.71 11.334 37.681 28.036L512 411z"
|
|
|
- fill="#FFB02C" p-id="1540"></path>
|
|
|
- <path
|
|
|
- d="M918.673 883H104.327C82.578 883 65 865.42 65 843.668V335.332C65 313.58 82.578 296 104.327 296h814.346C940.422 296 958 313.58 958 335.332v508.336C958 865.32 940.323 883 918.673 883z"
|
|
|
- fill="#FFCA28" p-id="1541"></path>
|
|
|
- </svg>
|
|
|
- {{ data.label }}
|
|
|
- </el-tree-node-content>
|
|
|
+ <span class="custom-tree-node">
|
|
|
+ <!-- 文件夹图标 -->
|
|
|
+ <svg t="1750230337349" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg" p-id="1538" width="1em" height="1em">
|
|
|
+ <path
|
|
|
+ d="M918.673 883H104.327C82.578 883 65 867.368 65 848.027V276.973C65 257.632 82.578 242 104.327 242h814.346C940.422 242 958 257.632 958 276.973v571.054C958 867.28 940.323 883 918.673 883z"
|
|
|
+ fill="#FFE9B4" p-id="1539"></path>
|
|
|
+ <path
|
|
|
+ d="M512 411H65V210.37C65 188.597 82.598 171 104.371 171h305.92c17.4 0 32.71 11.334 37.681 28.036L512 411z"
|
|
|
+ fill="#FFB02C" p-id="1540"></path>
|
|
|
+ <path
|
|
|
+ d="M918.673 883H104.327C82.578 883 65 865.42 65 843.668V335.332C65 313.58 82.578 296 104.327 296h814.346C940.422 296 958 313.58 958 335.332v508.336C958 865.32 940.323 883 918.673 883z"
|
|
|
+ fill="#FFCA28" p-id="1541"></path>
|
|
|
+ </svg>
|
|
|
+
|
|
|
+ <!-- 文件夹名称 -->
|
|
|
+ <span style="margin-left: 6px;">{{ data.label }}</span>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-tree>
|
|
|
>
|
|
@@ -295,18 +298,6 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="NLP文件名">
|
|
|
- <el-input v-model="form.nlpName" placeholder="请输入NLP文件名" maxlength="32"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="NLP密码">
|
|
|
- <el-input v-model="form.nlpPwd" placeholder="请输入NLP密码" maxlength="32"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -364,11 +355,12 @@ import {
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
-import {folderTreeSelect} from "@/api/system/folder";
|
|
|
+import {folderTreeSelect, getFolder} from "@/api/system/folder";
|
|
|
import {addFile, delFile, getFile, listFile, updateFile} from "@/api/system/file";
|
|
|
import dict from "@/utils/dict";
|
|
|
import {parseTime} from "../../../utils/xzl";
|
|
|
import {updateFileStatus} from "@/api/system/file";
|
|
|
+import {getDept, listDeptExcludeChild} from "@/api/system/dept";
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -603,7 +595,7 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- getFile(row.fileId).then(res => {
|
|
|
+ getFolder(row.fileId).then(res => {
|
|
|
this.form = res.data;
|
|
|
this.open = true;
|
|
|
this.title = '修改文件';
|
|
@@ -671,27 +663,28 @@ export default {
|
|
|
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
|
|
this.getList();
|
|
|
},
|
|
|
- async getParentFolderName(row, column, cellValue, index) {
|
|
|
- if (!cellValue) {
|
|
|
- return '根目录';
|
|
|
- }
|
|
|
-
|
|
|
- // 如果已缓存,直接返回
|
|
|
- if (this.parentFolderCache[cellValue]) {
|
|
|
- return this.parentFolderCache[cellValue];
|
|
|
- }
|
|
|
-
|
|
|
- try {
|
|
|
- const response = await getFileParentName(cellValue); // 调用接口获取父文件夹名
|
|
|
- const folderName = response.data || '未知';
|
|
|
-
|
|
|
- // 缓存结果
|
|
|
- this.parentFolderCache[cellValue] = folderName;
|
|
|
- return folderName;
|
|
|
- } catch (error) {
|
|
|
- console.error(`获取父文件夹名称失败(文件夹ID: ${cellValue})`, error);
|
|
|
- return '错误';
|
|
|
- }
|
|
|
+ getParentFolderName(row, column, cellValue, index) {
|
|
|
+ return row.folderName
|
|
|
+ // if (!cellValue) {
|
|
|
+ // return '根目录';
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // // 如果已缓存,直接返回
|
|
|
+ // if (this.parentFolderCache[cellValue]) {
|
|
|
+ // return this.parentFolderCache[cellValue];
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // try {
|
|
|
+ // const response = await getFileParentName(cellValue); // 调用接口获取父文件夹名
|
|
|
+ // const folderName = response.data || '未知';
|
|
|
+ //
|
|
|
+ // // 缓存结果
|
|
|
+ // this.parentFolderCache[cellValue] = folderName;
|
|
|
+ // return folderName;
|
|
|
+ // } catch (error) {
|
|
|
+ // console.error(`获取父文件夹名称失败(文件夹ID: ${cellValue})`, error);
|
|
|
+ // return '错误';
|
|
|
+ // }
|
|
|
},
|
|
|
}
|
|
|
};
|