文件样式调整
This commit is contained in:
@@ -43,21 +43,6 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
<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="list_item" v-for="(item, index) in dirList" :key="index">
|
||||||
<div class="item_download">
|
<div class="item_download">
|
||||||
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
||||||
@@ -89,7 +74,7 @@
|
|||||||
v-if="item?.type == 'file'"
|
v-if="item?.type == 'file'"
|
||||||
src="@/assets/img/wenjian.svg"
|
src="@/assets/img/wenjian.svg"
|
||||||
/>
|
/>
|
||||||
<!-- <span v-if="!item.type">暂无内容</span> -->
|
<!-- <span v-if="!item.type">暂无数据</span> -->
|
||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
item &&
|
item &&
|
||||||
@@ -102,7 +87,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-if="dirList.length == 0" />
|
<el-empty v-if="dirList.length == 0||!dirList[0].type" />
|
||||||
</div>
|
</div>
|
||||||
<popup ref="fileRef"></popup>
|
<popup ref="fileRef"></popup>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,6 +132,8 @@ const nodeClick = (e: any) => {
|
|||||||
activePathList.value.push({ path: activePath.value })
|
activePathList.value.push({ path: activePath.value })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}).catch((e)=>{
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -245,14 +232,12 @@ const handleDownLoad = async (row: any) => {
|
|||||||
}
|
}
|
||||||
//上传文件
|
//上传文件
|
||||||
const handleUpload = (e: any, fileList: any, row: any) => {
|
const handleUpload = (e: any, fileList: any, row: any) => {
|
||||||
console.log(e, fileList, row)
|
|
||||||
const obj = {
|
const obj = {
|
||||||
id: nDid.value,
|
id: nDid.value,
|
||||||
file: e.raw,
|
file: e.raw,
|
||||||
filePath: row|| row.prjDataPath
|
filePath: row|| row.prjDataPath
|
||||||
}
|
}
|
||||||
uploadDeviceFile(obj).then(res => {
|
uploadDeviceFile(obj).then(res => {
|
||||||
console.log(res, '上传文件毁掉')
|
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
ElMessage.success(res.message)
|
ElMessage.success(res.message)
|
||||||
}
|
}
|
||||||
@@ -323,7 +308,7 @@ watch(
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
height: 100%;
|
max-height: 100%;
|
||||||
padding-bottom: 200px;
|
padding-bottom: 200px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Reference in New Issue
Block a user