|
|
@ -94,11 +94,13 @@ |
|
|
|
style="width: 100%"> |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
prop="name" |
|
|
|
prop="name" |
|
|
|
|
|
|
|
align="center" |
|
|
|
label="文件名称"> |
|
|
|
label="文件名称"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
prop="size" |
|
|
|
prop="size" |
|
|
|
label="文件大小" |
|
|
|
label="文件大小" |
|
|
|
|
|
|
|
align="center" |
|
|
|
width="80"> |
|
|
|
width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.size|diskSize }} |
|
|
|
{{ scope.row.size|diskSize }} |
|
|
@ -106,19 +108,20 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
label="短连接" |
|
|
|
label="短连接" |
|
|
|
|
|
|
|
align="center" |
|
|
|
width="70"> |
|
|
|
width="70"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].short }} |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].short }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
|
|
|
|
align="center" |
|
|
|
label="应用名称"> |
|
|
|
label="应用名称"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].appname }} |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].appname }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
prop="raw.lastModified" |
|
|
|
|
|
|
|
width="80" |
|
|
|
width="80" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
|
label="上传进度"> |
|
|
|
label="上传进度"> |
|
|
@ -126,6 +129,14 @@ |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].process }} % |
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].process }} % |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
|
|
width="100" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
label="上传速度"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(scope.row)]].speed }}/s |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
@ -281,10 +292,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer" v-if="currentfile&& currentfile.uid"> |
|
|
|
<span slot="footer" class="dialog-footer" v-if="currentfile&& currentfile.uid"> |
|
|
|
{{ uploadprocess[currentfile.uid] }} |
|
|
|
<span v-if="uploadflag === true"> |
|
|
|
|
|
|
|
{{ uploadprocess[uploadprocessList[multiFileList.indexOf(currentfile)]].speed }}/s |
|
|
|
<el-progress :text-inside="true" :stroke-width="26" |
|
|
|
<el-progress :text-inside="true" :stroke-width="26" |
|
|
|
:percentage="uploadprocess[uploadprocessList[multiFileList.indexOf(currentfile)]].process" |
|
|
|
:percentage="uploadprocess[uploadprocessList[multiFileList.indexOf(currentfile)]].process"/> |
|
|
|
v-if="uploadflag === true"/> |
|
|
|
</span> |
|
|
|
<el-button type="primary" plain |
|
|
|
<el-button type="primary" plain |
|
|
|
@click="uploadcloud(analyseappinfo,currentfile,false,getappsFun)" v-else>{{ analyseappinfo.is_new|get_upload_text}}</el-button> |
|
|
|
@click="uploadcloud(analyseappinfo,currentfile,false,getappsFun)" v-else>{{ analyseappinfo.is_new|get_upload_text}}</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -562,13 +574,14 @@ |
|
|
|
getUserInfoFun, |
|
|
|
getUserInfoFun, |
|
|
|
makeFiveC, |
|
|
|
makeFiveC, |
|
|
|
deepCopy, |
|
|
|
deepCopy, |
|
|
|
diskSize |
|
|
|
diskSize, |
|
|
|
|
|
|
|
upspeed |
|
|
|
} from "@/utils"; |
|
|
|
} from "@/utils"; |
|
|
|
|
|
|
|
|
|
|
|
let fiveProcess = {}; |
|
|
|
let fiveProcess = {}; |
|
|
|
let fiveProcessList = []; |
|
|
|
let fiveProcessList = []; |
|
|
|
for (const c of makeFiveC()) { |
|
|
|
for (const c of makeFiveC()) { |
|
|
|
fiveProcess[c] = {process: 0, short: '', appname: ''}; |
|
|
|
fiveProcess[c] = {process: 0, short: '', appname: '', percent: [], speed: '0 MB'}; |
|
|
|
fiveProcessList.push(c) |
|
|
|
fiveProcessList.push(c) |
|
|
|
} |
|
|
|
} |
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -771,6 +784,25 @@ |
|
|
|
}, {'methods': 'PUT', 'data': analyseappinfo}); |
|
|
|
}, {'methods': 'PUT', 'data': analyseappinfo}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
updateprocess(binaryFlag, process_key, process, analyseappinfo, rawfile) { |
|
|
|
|
|
|
|
if (binaryFlag && process_key) { |
|
|
|
|
|
|
|
this.uploadprocess[process_key].percent.push({time: Date.now(), process}); |
|
|
|
|
|
|
|
const pnumber = 20; |
|
|
|
|
|
|
|
this.uploadprocess[process_key].process = process; |
|
|
|
|
|
|
|
this.uploadprocess[process_key].short = analyseappinfo.short; |
|
|
|
|
|
|
|
this.uploadprocess[process_key].appname = analyseappinfo.appname; |
|
|
|
|
|
|
|
if (process > 0) { |
|
|
|
|
|
|
|
let percent = this.uploadprocess[process_key].percent; |
|
|
|
|
|
|
|
if (percent.length > pnumber) { |
|
|
|
|
|
|
|
this.uploadprocess[process_key].speed = upspeed(percent[percent.length - pnumber].time, rawfile.size, process - percent[percent.length - pnumber].process) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (percent.length > 1) { |
|
|
|
|
|
|
|
this.uploadprocess[process_key].speed = upspeed(percent[0].time, rawfile.size, process) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
uploadtostorage(file, analyseappinfo, multiFlag, binaryFlag, resolve) { |
|
|
|
uploadtostorage(file, analyseappinfo, multiFlag, binaryFlag, resolve) { |
|
|
|
let upload_key = analyseappinfo.png_key; |
|
|
|
let upload_key = analyseappinfo.png_key; |
|
|
|
let upload_token = analyseappinfo.png_token; |
|
|
|
let upload_token = analyseappinfo.png_token; |
|
|
@ -791,22 +823,14 @@ |
|
|
|
uploadqiniuoss(rawfile, certinfo, this, res => { |
|
|
|
uploadqiniuoss(rawfile, certinfo, this, res => { |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
}, process => { |
|
|
|
}, process => { |
|
|
|
if (binaryFlag && process_key) { |
|
|
|
this.updateprocess(binaryFlag, process_key, process, analyseappinfo, rawfile); |
|
|
|
this.uploadprocess[process_key] = {process, analyseappinfo}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (analyseappinfo.storage === 2) { |
|
|
|
} else if (analyseappinfo.storage === 2) { |
|
|
|
// eslint-disable-next-line no-unused-vars |
|
|
|
// eslint-disable-next-line no-unused-vars |
|
|
|
uploadaliyunoss(rawfile, certinfo, this, res => { |
|
|
|
uploadaliyunoss(rawfile, certinfo, this, res => { |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
}, process => { |
|
|
|
}, process => { |
|
|
|
if (binaryFlag && process_key) { |
|
|
|
this.updateprocess(binaryFlag, process_key, process, analyseappinfo, rawfile); |
|
|
|
this.uploadprocess[process_key] = { |
|
|
|
|
|
|
|
process, |
|
|
|
|
|
|
|
short: analyseappinfo.short, |
|
|
|
|
|
|
|
appname: analyseappinfo.appname |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//本地 |
|
|
|
//本地 |
|
|
@ -821,9 +845,7 @@ |
|
|
|
uploadlocalstorage(rawfile, certinfo, this, res => { |
|
|
|
uploadlocalstorage(rawfile, certinfo, this, res => { |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
this.updateappinfo(file, analyseappinfo, multiFlag, binaryFlag, resolve) |
|
|
|
}, process => { |
|
|
|
}, process => { |
|
|
|
if (binaryFlag && process_key) { |
|
|
|
this.updateprocess(binaryFlag, process_key, process, analyseappinfo, rawfile); |
|
|
|
this.uploadprocess[process_key] = {process, analyseappinfo}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|