|
|
@@ -386,7 +386,7 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="setCli" v-if="cliCC" :style="{ left: xz + 'px', top: yz - 260 + 'px' }">
|
|
|
+ <div class="setCli" v-if="cliCC" :style="{ left: xz + 'px', top: yz - 160 + 'px' }">
|
|
|
<template v-for="(item, index) in filterMouseCli()" :key="index">
|
|
|
<p @click="chooseSet(item, index, 1)" class="chooseSet">
|
|
|
<img :src="item.img" alt="">
|
|
|
@@ -420,7 +420,7 @@
|
|
|
<!-- 文件上传 -->
|
|
|
<div>
|
|
|
<el-dialog v-model="uploadModal" title="文件上传" :close-on-click-modal="false" width="30%" @close="closeUpload">
|
|
|
- <el-upload class="upload-demo" :file-list="fileArr" :before-upload="upBefore" drag :http-request="onSuccess" multiple :on-remove="handleRemove"
|
|
|
+ <el-upload class="upload-demo" :file-list="fileArr" :limit="10" :on-change="upBefore" drag :http-request="onSuccess" multiple :on-remove="handleRemove"
|
|
|
element-loading-text="上传中..."
|
|
|
element-loading-background="rgba(255, 255, 255, 0.8)"
|
|
|
v-loading="loadingUpload" >
|
|
|
@@ -799,7 +799,7 @@ export default {
|
|
|
refreshFile()
|
|
|
let obj = {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 9999,
|
|
|
isAsc: isAsc.value,
|
|
|
orderByColumn: "createTime"
|
|
|
}
|
|
|
@@ -813,20 +813,21 @@ export default {
|
|
|
if(fileGrid.value == 1){
|
|
|
fileGrid.value = 0 // 变宫格
|
|
|
pageSize.value = 30+pageSize.value
|
|
|
- if(!thisFolder.value.dirId)return
|
|
|
- const query = `${thisFolder.value.dirId}?isAsc=${isAsc.value}&orderByColumn=createTime&pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
- const res = await myfile.getById(query)
|
|
|
- console.log('filessetScrollres',res);
|
|
|
- if (res.code === 200) {
|
|
|
- // const newarr = res.rows.concat(toRaw(fileList.value))
|
|
|
- const newarr = res.rows
|
|
|
- console.log('newarr',newarr);
|
|
|
- fileList.value = JSON.parse(JSON.stringify(newarr))
|
|
|
- if(newarr.length < tableTotal.value){
|
|
|
- //获取后的数量<total就可以再次获取
|
|
|
- setTimeout(()=>{
|
|
|
- tableBeEnd.value = false
|
|
|
- },1000)
|
|
|
+ if(thisFolder.value.dirId){
|
|
|
+ const query = `${thisFolder.value.dirId}?isAsc=${isAsc.value}&orderByColumn=createTime&pageSize=${pageSize.value}&pageNum=${filePageNum.value}`
|
|
|
+ const res = await myfile.getById(query)
|
|
|
+ console.log('filessetScrollres',res);
|
|
|
+ if (res.code === 200) {
|
|
|
+ // const newarr = res.rows.concat(toRaw(fileList.value))
|
|
|
+ const newarr = res.rows
|
|
|
+ console.log('newarr',newarr);
|
|
|
+ fileList.value = JSON.parse(JSON.stringify(newarr))
|
|
|
+ if(newarr.length < tableTotal.value){
|
|
|
+ //获取后的数量<total就可以再次获取
|
|
|
+ setTimeout(()=>{
|
|
|
+ tableBeEnd.value = false
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
@@ -853,7 +854,7 @@ export default {
|
|
|
spaceName.value = userMe[0].dirPath
|
|
|
let obj = {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 9999,
|
|
|
isAsc: isAsc.value,
|
|
|
orderByColumn: "createTime",
|
|
|
}
|
|
|
@@ -1396,8 +1397,11 @@ export default {
|
|
|
|
|
|
}
|
|
|
function onSuccess(files, val) {
|
|
|
- fileBig.value = files.file.size + fileBig.value
|
|
|
- fileArr.value.push(files.file)
|
|
|
+ // console.log('suFiles',files);
|
|
|
+ const maxSize = (maxFileSize.value-0)*1024*1024
|
|
|
+ if(files.file.size<maxSize){
|
|
|
+ fileArr.value.push(files.file)
|
|
|
+ }
|
|
|
}
|
|
|
//关闭文件上传
|
|
|
const closeUpload =() =>{
|
|
|
@@ -2175,19 +2179,17 @@ export default {
|
|
|
pathLabelData.value = ([])
|
|
|
getAllTop()
|
|
|
}
|
|
|
- const upBefore = (file)=>{
|
|
|
- // console.log('filearr',toRaw(fileArr.value));
|
|
|
- // console.log('file',file);
|
|
|
+ const upBefore = (file,files)=>{
|
|
|
const maxSize = (maxFileSize.value-0)*1024*1024
|
|
|
// console.log('maxSize',maxSize);
|
|
|
if(file.size>maxSize){
|
|
|
+ files.pop()
|
|
|
ElMessage({ message: file.name+'上传失败,上传文件大小最大为'+maxFileSize.value+'M', type: 'error' })
|
|
|
- return false
|
|
|
- }
|
|
|
- if(fileArr.value.length>=10){
|
|
|
- ElMessage({ message: file.name+'上传失败,单次上传文件数量最多为10个', type: 'error' })
|
|
|
- return false
|
|
|
+ }else{
|
|
|
+ fileBig.value = file.size + fileBig.value
|
|
|
+ fileArr.value.push(file)
|
|
|
}
|
|
|
+ // console.log('filesend',files);
|
|
|
}
|
|
|
//获取扫描仪列表
|
|
|
const scannerFile =async ()=>{
|