Optimize download file

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao
2018-06-14 16:36:59 +08:00
parent a8fa459383
commit 93f54c2e13
4 changed files with 116 additions and 54 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ export default {
}
}, {
title: this.$t('modification'),
key: 'mtim',
key: 'mtime',
sortable: true,
render: (h, params) => {
if (params.row.mtim)
@@ -320,7 +320,7 @@ export default {
let code = msg.code;
if (code == rttyMsg.FileCode.START.value) {
this.downfile.loading = false;
this.downfile.filelist = JSON.parse(Utf8ArrayToStr(msg.data));
this.downfile.filelist = msg.filelist;
this.handleFilterDownFile();
}
else if (code == rttyMsg.FileCode.FILEDATA.value) {
+9
View File
@@ -1,5 +1,6 @@
syntax = "proto3";
message rtty_message {
enum Type {
UNKNOWN = 0;
@@ -37,6 +38,13 @@ message rtty_message {
DEVID_REQUIRED = 8;
}
message File {
string name = 1;
bool dir = 2;
uint64 mtime = 3;
uint64 size = 4;
}
uint32 version = 1;
Type type = 2;
string sid = 3;
@@ -52,4 +60,5 @@ message rtty_message {
string std_err = 13;
repeated string params = 14;
map<string, string> env = 15;
repeated File filelist = 16;
}