1.路径逻辑修改2.文件上传修改
This commit is contained in:
@@ -27,21 +27,49 @@
|
||||
></el-input>
|
||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||
<el-button @click="handleRefresh">重置</el-button>
|
||||
<el-upload
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:on-change="
|
||||
(file:any, fileList:any) => {
|
||||
handleUpload(file, fileList, activePath)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-button>
|
||||
文件上传<el-icon class="el-icon--right"><Upload /></el-icon>
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
||||
<!-- <div class="list_upload">
|
||||
<el-upload
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:on-change="
|
||||
(file:any, fileList:any) => {
|
||||
handleUpload(file, fileList, activePath)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-button>
|
||||
文件上传<el-icon class="el-icon--right"><Upload /></el-icon>
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</div> -->
|
||||
<div class="list_item" v-for="(item, index) in dirList" :key="index">
|
||||
<div class="item_download">
|
||||
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="item_upload">
|
||||
<!-- <div class="item_upload">
|
||||
<el-upload
|
||||
v-if="item?.type == 'dir'"
|
||||
style="display: inline-block"
|
||||
action=""
|
||||
class="upload-demo"
|
||||
:show-file-list="true"
|
||||
:auto-upload="false"
|
||||
:on-change="
|
||||
(file:any, fileList:any) => {
|
||||
@@ -53,7 +81,7 @@
|
||||
<el-icon><Upload /></el-icon>
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
</div> -->
|
||||
<img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" />
|
||||
<img
|
||||
class="img_file"
|
||||
@@ -221,7 +249,7 @@ const handleUpload = (e: any, fileList: any, row: any) => {
|
||||
const obj = {
|
||||
id: nDid.value,
|
||||
file: e.raw,
|
||||
filePath: row.prjDataPath
|
||||
filePath: row|| row.prjDataPath
|
||||
}
|
||||
uploadDeviceFile(obj).then(res => {
|
||||
console.log(res, '上传文件毁掉')
|
||||
@@ -297,6 +325,14 @@ watch(
|
||||
height: 100%;
|
||||
padding-bottom: 200px;
|
||||
z-index: 100;
|
||||
position: relative;
|
||||
.list_upload {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
right: 20px;
|
||||
top: 10px;
|
||||
}
|
||||
.list_item {
|
||||
flex: none;
|
||||
width: 23.3%;
|
||||
|
||||
Reference in New Issue
Block a user