文档管理增删查改
This commit is contained in:
parent
33c13838a1
commit
637d6aa67d
@ -46,3 +46,35 @@ export function getFilesPage(queryParams:any) {
|
|||||||
params:queryParams
|
params:queryParams
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//新增专项文档管理文档内容
|
||||||
|
export function addFiles(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_files/addFiles',
|
||||||
|
method: 'post',
|
||||||
|
data:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//修改专项文档管理文档内容
|
||||||
|
export function updateFiles(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_files/updateFiles',
|
||||||
|
method: 'post',
|
||||||
|
data:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//根据ID删除专项文档管理文档内容
|
||||||
|
export function deleteFilesById(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_files/deleteFilesById',
|
||||||
|
method: 'post',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//批量删除专项文档管理文档内容
|
||||||
|
export function deleteFilesByIds(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_files/deleteFilesByIds',
|
||||||
|
method: 'post',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
|
}
|
BIN
web/src/assets/MenuIcon/xia.png
Normal file
BIN
web/src/assets/MenuIcon/xia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 317 B |
BIN
web/src/assets/MenuIcon/xia1.png
Normal file
BIN
web/src/assets/MenuIcon/xia1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 280 B |
@ -52,7 +52,6 @@ const uploadFileTypeSortMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function useFileUpload() {
|
export default function useFileUpload() {
|
||||||
|
|
||||||
let { storageKey, currentPath } = useRouterData();
|
let { storageKey, currentPath } = useRouterData();
|
||||||
const maxFileUploads = storageConfigStore.globalConfig.maxFileUploads;
|
const maxFileUploads = storageConfigStore.globalConfig.maxFileUploads;
|
||||||
|
|
||||||
@ -385,14 +384,14 @@ export default function useFileUpload() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let param = {
|
let param = {
|
||||||
storageKey: 'minio',
|
storageKey: 'minio',
|
||||||
path: localStorage.getItem('filepath'),
|
path: localStorage.getItem('filepath'),
|
||||||
name: file.name,
|
name: file.name,
|
||||||
size: file.size
|
size: file.size
|
||||||
}
|
}
|
||||||
|
fileArr.value.push(param)
|
||||||
|
localStorage.setItem('fileArr',JSON.stringify(fileArr.value) );
|
||||||
console.log('当前上传信息:', param, ', 当前同时上传文件数:',uploadProgressInfoStatistics.value.totalUploading, '限制同时上传文件数:', maxFileUploads);
|
console.log('当前上传信息:', param, ', 当前同时上传文件数:',uploadProgressInfoStatistics.value.totalUploading, '限制同时上传文件数:', maxFileUploads);
|
||||||
if (uploadProgressInfoStatistics.value.totalUploading >= maxFileUploads) {
|
if (uploadProgressInfoStatistics.value.totalUploading >= maxFileUploads) {
|
||||||
console.log(`上传文件数超出 ${maxFileUploads}, 等待上传`);
|
console.log(`上传文件数超出 ${maxFileUploads}, 等待上传`);
|
||||||
@ -439,7 +438,6 @@ export default function useFileUpload() {
|
|||||||
let proxyUploadType = common.storageType.proxyType;
|
let proxyUploadType = common.storageType.proxyType;
|
||||||
let s3UploadType = common.storageType.s3Type;
|
let s3UploadType = common.storageType.s3Type;
|
||||||
let onedriveUploadType = common.storageType.micrsoftType;
|
let onedriveUploadType = common.storageType.micrsoftType;
|
||||||
|
|
||||||
if (proxyUploadType.includes( param.storageKey)) {
|
if (proxyUploadType.includes( param.storageKey)) {
|
||||||
fileProxyUpload(file, res.data, fileIndex);
|
fileProxyUpload(file, res.data, fileIndex);
|
||||||
} else if (s3UploadType.includes( param.storageKey)) {
|
} else if (s3UploadType.includes( param.storageKey)) {
|
||||||
@ -453,7 +451,6 @@ export default function useFileUpload() {
|
|||||||
baseOnUploadError(fileIndex, err)
|
baseOnUploadError(fileIndex, err)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 服务器代理上传
|
// 服务器代理上传
|
||||||
const fileProxyUpload = (file, uploadUrl, fileIndex) => {
|
const fileProxyUpload = (file, uploadUrl, fileIndex) => {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
@ -720,8 +717,9 @@ export default function useFileUpload() {
|
|||||||
cancelTokenSourceMap.delete(fileIndex);
|
cancelTokenSourceMap.delete(fileIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const fileArr = ref([])
|
||||||
const clearALlFinishedUploadFile = () => {
|
const clearALlFinishedUploadFile = () => {
|
||||||
|
fileArr.value.length = 0
|
||||||
let deleteCount = 0;
|
let deleteCount = 0;
|
||||||
for (let i = uploadingFileList.length - 1; i >= 0; i--) {
|
for (let i = uploadingFileList.length - 1; i >= 0; i--) {
|
||||||
let item = uploadingFileList[i];
|
let item = uploadingFileList[i];
|
||||||
|
@ -9,7 +9,7 @@ import { ref, onMounted, nextTick } from "vue";
|
|||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import Page from '@/components/Pagination/page.vue';
|
import Page from '@/components/Pagination/page.vue';
|
||||||
import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById,getFilesPage } from "@/api/document";
|
import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById, getFilesPage, addFiles, updateFiles, deleteFilesById, deleteFilesByIds } from "@/api/document";
|
||||||
import ZUpload from '@/components/file/ZUpload.vue'
|
import ZUpload from '@/components/file/ZUpload.vue'
|
||||||
import useFileUpload from "@/components/file/file/useFileUpload";
|
import useFileUpload from "@/components/file/file/useFileUpload";
|
||||||
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
||||||
@ -70,6 +70,7 @@ function gettreedata() {
|
|||||||
const pathid = ref()
|
const pathid = ref()
|
||||||
function handleNodeClick(data: any, node: any) {
|
function handleNodeClick(data: any, node: any) {
|
||||||
pathid.value = data.id
|
pathid.value = data.id
|
||||||
|
getdata()
|
||||||
}
|
}
|
||||||
//子项目配置
|
//子项目配置
|
||||||
const frame = ref(false)
|
const frame = ref(false)
|
||||||
@ -204,8 +205,14 @@ function delSubItem(row: any) {
|
|||||||
const queryParams: any = ref({
|
const queryParams: any = ref({
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 20,
|
size: 20,
|
||||||
name: ''
|
fileName: '',
|
||||||
|
startDate: '',
|
||||||
|
endDate: '',
|
||||||
|
keywords: '',
|
||||||
|
nodeId: '',//节点ID
|
||||||
|
projectId: '',//项目Id
|
||||||
});
|
});
|
||||||
|
const dataarr = ref([])
|
||||||
//定义表格数据
|
//定义表格数据
|
||||||
const tableData: any = ref([]);
|
const tableData: any = ref([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
@ -213,17 +220,211 @@ const total = ref(0);
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
//获取表格数据
|
//获取表格数据
|
||||||
function getdata() {
|
function getdata() {
|
||||||
|
loading.value = true
|
||||||
|
console.log(dataarr.value)
|
||||||
|
if (dataarr.value && dataarr.value.length > 0) {
|
||||||
|
queryParams.value.startDate = dataarr.value[0]
|
||||||
|
queryParams.value.endDate = dataarr.value[1]
|
||||||
|
} else {
|
||||||
|
queryParams.value.startDate = ''
|
||||||
|
queryParams.value.endDate = ''
|
||||||
}
|
}
|
||||||
|
queryParams.value.nodeId = pathid.value
|
||||||
|
queryParams.value.projectId = projectId.value
|
||||||
|
getFilesPage(queryParams.value).then((res: any) => {
|
||||||
|
queryParams.value.current = res.data.current
|
||||||
|
queryParams.value.size = res.data.size
|
||||||
|
total.value = res.data.total
|
||||||
|
loading.value = false
|
||||||
|
tableData.value = res.data.records
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新增文件对象
|
||||||
|
const fileObj: any = ref({
|
||||||
|
projectId: '', //所属项目ID
|
||||||
|
nodeId: '', //节点ID
|
||||||
|
fileName: '', //文件名称
|
||||||
|
filePath: '', //文件对象存储路径
|
||||||
|
keywords: '', //关键字
|
||||||
|
description: '', //文件描述
|
||||||
|
fileSize: '', //M
|
||||||
|
})
|
||||||
//上传组件
|
//上传组件
|
||||||
const upfile = ref(false)
|
const upfile = ref(false)
|
||||||
function openFile() {
|
function openFile() {
|
||||||
localStorage.setItem('filepath', findPathById(treedata.value, pathid.value));
|
localStorage.setItem('filepath', findPathById(treedata.value, pathid.value));
|
||||||
upfile.value = true
|
upfile.value = true
|
||||||
|
fileObj.value = {
|
||||||
|
projectId: '', //所属项目ID
|
||||||
|
nodeId: '', //节点ID
|
||||||
|
fileName: '', //文件名称
|
||||||
|
filePath: '', //文件对象存储路径
|
||||||
|
keywords: '', //关键字
|
||||||
|
description: '', //文件描述
|
||||||
|
fileSize: '', //M
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//修改文件
|
||||||
|
function editfile(row: any) {
|
||||||
|
upfile.value = true
|
||||||
|
fileObj.value = JSON.parse(JSON.stringify(row))
|
||||||
}
|
}
|
||||||
function fileClose() {
|
function fileClose() {
|
||||||
upfile.value = false
|
upfile.value = false
|
||||||
}
|
}
|
||||||
|
//字节转mb
|
||||||
|
function bytesToMB(bytes: any) {
|
||||||
|
return bytes / Math.pow(1024, 2);
|
||||||
|
}
|
||||||
|
//上传确定
|
||||||
|
function submitfile() {
|
||||||
|
// console.log( )
|
||||||
|
|
||||||
|
if (fileObj.value.id) {
|
||||||
|
updateFiles(fileObj.value).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
getdata()
|
||||||
|
upfile.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let fileArr = JSON.parse(localStorage.getItem('fileArr'))
|
||||||
|
let fileName = []
|
||||||
|
let fileSize = []
|
||||||
|
if (fileArr.length > 0) {
|
||||||
|
fileArr.forEach((item: any) => {
|
||||||
|
fileName.push(item.name)
|
||||||
|
fileSize.push(bytesToMB(item.size))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fileObj.value.projectId = projectId.value
|
||||||
|
fileObj.value.nodeId = pathid.value
|
||||||
|
fileObj.value.filePath = findPathById(treedata.value, pathid.value)
|
||||||
|
fileObj.value.fileName = fileName.join(',')
|
||||||
|
fileObj.value.fileSize = fileSize.join(',')
|
||||||
|
addFiles(fileObj.value).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('增加成功')
|
||||||
|
getdata()
|
||||||
|
upfile.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//单个删除文件
|
||||||
|
function delfile(row: any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'您确定要删除该文件吗?',
|
||||||
|
'警告',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteFilesById({ id: row.id }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
getdata()
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//多个删除文件
|
||||||
|
//表格多选
|
||||||
|
const tableIdarr = ref([])
|
||||||
|
function handleSelectionChange(val: any) {
|
||||||
|
tableIdarr.value = val
|
||||||
|
}
|
||||||
|
//多选删除
|
||||||
|
function delprojectArr() {
|
||||||
|
const ids = []
|
||||||
|
tableIdarr.value.forEach((item: any) => {
|
||||||
|
ids.push(item.id)
|
||||||
|
})
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'您确定要删除这些项目吗?',
|
||||||
|
'警告',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteFilesByIds({ ids: ids.join(',') }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功',
|
||||||
|
})
|
||||||
|
getdata()
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//下载
|
||||||
|
function xiafile(row: any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'您确定要下载该文件吗?',
|
||||||
|
'警告',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
window.open(row.url);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//多选下载
|
||||||
|
function xiafilemony() {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'您确定要下载这些项目吗?',
|
||||||
|
'警告',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
tableIdarr.value.forEach((item: any) => {
|
||||||
|
if(item.url){
|
||||||
|
downloadFileUseIframeMode(item.url);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 使用 iframe 模式下载文件
|
||||||
|
*
|
||||||
|
* @param url 下载文件 url
|
||||||
|
*/
|
||||||
|
const downloadFileUseIframeMode = (url:any) => {
|
||||||
|
const iframe:any = document.createElement("iframe");
|
||||||
|
iframe.style.display = "none"; // 防止影响页面
|
||||||
|
iframe.style.height = 0; // 防止影响页面
|
||||||
|
iframe.src = url;
|
||||||
|
document.body.appendChild(iframe);
|
||||||
|
setTimeout(()=>{
|
||||||
|
iframe.remove();
|
||||||
|
}, 5 * 60 * 1000);
|
||||||
|
}
|
||||||
function findPathById(array: any, targetId: any) {
|
function findPathById(array: any, targetId: any) {
|
||||||
// 辅助函数,用于递归查找路径
|
// 辅助函数,用于递归查找路径
|
||||||
function recursiveSearch(items: any, target: any, path: any) {
|
function recursiveSearch(items: any, target: any, path: any) {
|
||||||
@ -250,6 +451,7 @@ function findPathById(array:any, targetId:any) {
|
|||||||
let patharr = recursiveSearch(array, targetId, [])
|
let patharr = recursiveSearch(array, targetId, [])
|
||||||
return '/' + patharr; // 注意这里我们传入了一个空数组作为初始路径
|
return '/' + patharr; // 注意这里我们传入了一个空数组作为初始路径
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -294,36 +496,43 @@ function findPathById(array:any, targetId:any) {
|
|||||||
<section class="silderRight">
|
<section class="silderRight">
|
||||||
<div class="sou_title">
|
<div class="sou_title">
|
||||||
<div class="sou_title_left">
|
<div class="sou_title_left">
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
<el-input style="margin-right: 10px ;" v-model="queryParams.fileName" clearable @change="getdata()"
|
||||||
placeholder="项目编号"></el-input>
|
placeholder="文件名称"></el-input>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
<el-input style="margin-right: 10px ;" v-model="queryParams.keywords" clearable @change="getdata()"
|
||||||
placeholder="项目类型"></el-input>
|
placeholder="关键字"></el-input>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
<el-date-picker v-model="dataarr" type="daterange" @change="getdata()"
|
||||||
placeholder="项目名称"></el-input>
|
style="width: 150%;margin-right: 10px ;" start-placeholder="开始时间" end-placeholder="结束时间"
|
||||||
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD" range-separator="至" />
|
||||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- :disabled="pathid.value" -->
|
<!-- :disabled="pathid.value" -->
|
||||||
<el-button type="primary" :disabled="!pathid" @click="openFile">上传</el-button>
|
<el-button type="primary" :disabled="!pathid" @click="openFile">上传</el-button>
|
||||||
<el-button type="primary">删除</el-button>
|
<el-button type="primary" @click="delprojectArr()" :disabled="tableIdarr.length == 0">删除</el-button>
|
||||||
<el-button type="primary">下载</el-button>
|
<el-button type="primary" @click="xiafilemony()" :disabled="tableIdarr.length == 0">下载</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableData"
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
|
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
|
||||||
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
||||||
<el-table-column type="index" label="序号" width="70" align="center"></el-table-column>
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column prop="usercode" label="文件名称"></el-table-column>
|
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
|
||||||
<el-table-column prop="username" label="关键字"></el-table-column>
|
<el-table-column prop="fileName" label="文件名称"></el-table-column>
|
||||||
<el-table-column prop="requestip" label="上传人"></el-table-column>
|
<el-table-column prop="keywords" label="关键字"></el-table-column>
|
||||||
<el-table-column prop="requestip" label="上传时间"></el-table-column>
|
<el-table-column prop="description" label="文件描述"></el-table-column>
|
||||||
|
<el-table-column prop="uploader" width="80" label="上传人"></el-table-column>
|
||||||
|
<el-table-column prop="uploadTime" width="170" label="上传时间"></el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
style="display: flex;display: -webkit-flex;justify-content: space-around;-webkit-justify-content: space-around; ">
|
style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between; ">
|
||||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" title="修改" style="cursor: pointer;">
|
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" @click="editfile(scope.row)" title="修改"
|
||||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" title="删除" style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
|
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" @click="delfile(scope.row)" title="删除"
|
||||||
|
style="cursor: pointer;">
|
||||||
|
<img src="@/assets/MenuIcon/xia1.png" alt="" @click="xiafile(scope.row)" title="下载"
|
||||||
|
style="cursor: pointer;">
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -348,17 +557,32 @@ function findPathById(array:any, targetId:any) {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div class="upload">
|
<el-dialog title="上传文件" v-model="upfile" width="35%" :before-close="fileClose" top="30px" draggable
|
||||||
<el-dialog title="上传文件" v-model="upfile" width="15%" :before-close="fileClose" top="30px" draggable
|
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
|
<el-form ref="ruleFormRef" style="max-width: 600px" :model="fileObj" :rules="moderules" label-width="auto"
|
||||||
|
class="demo-ruleForm" status-icon>
|
||||||
|
<el-form-item v-if="!fileObj.id" label="文件:" prop="taskCode">
|
||||||
<el-button @click="openUploadDialog" type="primary">上传文件</el-button>
|
<el-button @click="openUploadDialog" type="primary">上传文件</el-button>
|
||||||
<el-button @click="openUploadFolderDialog" type="primary">上传文件夹</el-button>
|
<el-button @click="openUploadFolderDialog" type="primary">上传文件夹</el-button>
|
||||||
<!-- <div style="cursor: pointer;">上传文件</div>
|
|
||||||
<div style="cursor: pointer;">上传文件夹</div> -->
|
|
||||||
<ZUpload />
|
<ZUpload />
|
||||||
</el-dialog>
|
</el-form-item>
|
||||||
|
<el-form-item v-else label="文件名称:">
|
||||||
|
<el-input v-model="fileObj.fileName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字:" prop="taskName">
|
||||||
|
<el-input v-model="fileObj.keywords" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述:">
|
||||||
|
<el-input v-model="fileObj.description" :rows="2" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<div style="width: 100%;display: flex;justify-content: end;">
|
||||||
|
<el-button type="primary" @click="submitfile">确定</el-button>
|
||||||
|
<el-button @click="fileClose">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -459,9 +683,4 @@ function findPathById(array:any, targetId:any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.upload{
|
|
||||||
:deep(.el-dialog__header) {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -383,10 +383,10 @@ const vMove = {
|
|||||||
<span class="custom-tree-node">
|
<span class="custom-tree-node">
|
||||||
<span>{{ node.label }}</span>
|
<span>{{ node.label }}</span>
|
||||||
<span style="font-size: 16px;">
|
<span style="font-size: 16px;">
|
||||||
<el-icon v-hasPerm="['update:org']" class="treeediticon" title="修改" @click="() => edittree(data)">
|
<el-icon class="treeediticon" title="修改" @click="() => edittree(data)">
|
||||||
<EditPen />
|
<EditPen />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon v-hasPerm="['del:org']" class="treedelicon" title="删除" @click="() => remove(data)">
|
<el-icon class="treedelicon" title="删除" @click="() => remove(data)">
|
||||||
<Delete />
|
<Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user