From a6af009e438eea6532cb09c144b8bc39f1b0104e Mon Sep 17 00:00:00 2001 From: weijianli Date: Wed, 11 Sep 2019 20:35:09 -0500 Subject: [PATCH] analyzing page update --- src/api/user.js | 5 +- src/components/VueUploader/index.vue | 79 ++++ src/main.js | 24 +- src/router/index.js | 13 + src/views/Analyzing/analyzing.vue | 47 +- src/views/VueUploader/index.vue | 648 ++++++++++++++------------- 6 files changed, 489 insertions(+), 327 deletions(-) create mode 100644 src/components/VueUploader/index.vue diff --git a/src/api/user.js b/src/api/user.js index b0f505d6..68fbfe03 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -23,10 +23,11 @@ export function logout() { }) } -export function sendAnalyzeRequest() { +export function sendAnalyzeRequest(token) { return request({ url: '/testpredict', method: 'get', - baseURL: 'http://localhost:8010' + baseURL: 'http://localhost:8888', + params: { token } }) } diff --git a/src/components/VueUploader/index.vue b/src/components/VueUploader/index.vue new file mode 100644 index 00000000..b821b825 --- /dev/null +++ b/src/components/VueUploader/index.vue @@ -0,0 +1,79 @@ + + + + + + + diff --git a/src/main.js b/src/main.js index 9a2f0849..0b104cba 100644 --- a/src/main.js +++ b/src/main.js @@ -41,18 +41,18 @@ Vue.use(Element, { // register global utility filters Object.keys(filters).forEach(key => { Vue.filter(key, filters[key]) - Vue.filter('formatSize', function(size) { - if (size > 1024 * 1024 * 1024 * 1024) { - return (size / 1024 / 1024 / 1024 / 1024).toFixed(2) + ' TB' - } else if (size > 1024 * 1024 * 1024) { - return (size / 1024 / 1024 / 1024).toFixed(2) + ' GB' - } else if (size > 1024 * 1024) { - return (size / 1024 / 1024).toFixed(2) + ' MB' - } else if (size > 1024) { - return (size / 1024).toFixed(2) + ' KB' - } - return size.toString() + ' B' - }) + Vue.filter('formatSize', function (size) { + if (size > 1024 * 1024 * 1024 * 1024) { + return (size / 1024 / 1024 / 1024 / 1024).toFixed(2) + ' TB' + } else if (size > 1024 * 1024 * 1024) { + return (size / 1024 / 1024 / 1024).toFixed(2) + ' GB' + } else if (size > 1024 * 1024) { + return (size / 1024 / 1024).toFixed(2) + ' MB' + } else if (size > 1024) { + return (size / 1024).toFixed(2) + ' KB' + } + return size.toString() + ' B' +}) }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index e79788b2..110c0554 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -95,6 +95,19 @@ export const constantRoutes = [ } ] }, + { + path: '/analyzing', + hidden: true, + component: Layout, + children: [ + { + path: 'haha', + component: ()=>import('@/views/Analyzing/analyzing'), + name: 'analyze', + meta: { title: 'analyzing' } + } + ] + }, { path: '/documentation', component: Layout, diff --git a/src/views/Analyzing/analyzing.vue b/src/views/Analyzing/analyzing.vue index 38b92bf5..b138840e 100644 --- a/src/views/Analyzing/analyzing.vue +++ b/src/views/Analyzing/analyzing.vue @@ -1,3 +1,44 @@ -
-
-
+ + + + + + + diff --git a/src/views/VueUploader/index.vue b/src/views/VueUploader/index.vue index d15fd467..a48aa507 100644 --- a/src/views/VueUploader/index.vue +++ b/src/views/VueUploader/index.vue @@ -1,296 +1,309 @@ + + + --> \ No newline at end of file