Browse Source

0727 动态数据集 完成前序文件删除 并且数据保存至mino 中,本地不存储数据。数据集的下载链接已更新。

allen 3 years ago
parent
commit
866b12680f

+ 8 - 6
src/views/modules/visi/create1.vue

@@ -292,7 +292,9 @@ export default {
       showTree: true, // 获取树的数据后 更新数据
       showInfo: false, // 属性数据预览
       showRiZhi: false, // 控制日志的显隐
-      soutRizhi: '运行过程,将会显示在这儿 。再次点击日志图标,将关闭窗口', // 输出日志内容
+
+      soutRiZhiSucess: '-------------------------------success--------------------------' + '\n\n',
+      soutRizhi: '运行过程,将会显示在这儿 。再次点击日志图标,将关闭窗口', // 输出日志内容‘
       showPreview: false, // 控制预览窗口的显隐
       showTable: false,
       userID: this.$store.state.user.id, // 用户编号
@@ -448,7 +450,7 @@ export default {
     },
     async yunXingClick () {
       this.showRiZhi = true
-      this.soutRizhi = '检测设备状态完毕,开始抽取数据....' + '\n' + '....' // 输出日志内容
+      this.soutRizhi = '检测设备状态完毕,开始抽取数据....' + '\n\n' + '....' // 输出日志内容
       this.yunXingUid = new Date().getTime()
       for (let i = 0; i < this.imsql.length; i++) {
         if (i === 0) {
@@ -475,13 +477,13 @@ export default {
         }).then(subresult => {
           var context = subresult.data
 
-          this.soutRizhi = this.soutRizhi + '\n' + context.info
+          this.soutRizhi = context.info + '\n\n' + this.soutRizhi
         })
         onlyStatic = false
       }
 
       if (this.st_imsql.length > 0) {
-        this.soutRizhi = this.soutRizhi + '\n' + '开始组合本地数据'
+        this.soutRizhi = '\n' + '开始组合本地数据' + '\n\n' + this.soutRizhi
       }
       for (let i = 0; i < this.st_imsql.length; i++) {
         if (i === 0) {
@@ -509,10 +511,10 @@ export default {
           method: 'post',
           data: this.$http.adornData(massage, false)
         }).then(subresult => {
-          this.soutRizhi = this.soutRizhi + '\n' + subresult.data.info
+          this.soutRizhi = subresult.data.info + '\n\n' + this.soutRizhi
         })
       }
-      this.soutRizhi = this.soutRizhi + '\n' + '静态数据测试抽取完成,点击确定制作数据集'
+      this.soutRizhi = this.soutRiZhiSucess + '静态数据测试抽取完成,点击确定制作数据集' + '\n\n' + this.soutRizhi
     },
     yuLanMouseOver () {
       document.getElementById('yuLan').className = 'iconfont icon-preview1'

+ 4 - 3
src/views/modules/visi/create2.vue

@@ -286,6 +286,7 @@ export default {
       showInfo: false, // 属性数据预览
       showRiZhi: false, // 控制日志的显隐
       soutRizhi: '运行过程,将会显示在这儿 。再次点击日志图标,将关闭窗口', // 输出日志内容
+      soutRiZhiSucess: '-------------------------------success--------------------------' + '\n\n',
       showPreview: false, // 控制预览窗口的显隐
       showTable: false,
       // userID: '666', // 用户编号
@@ -414,7 +415,7 @@ export default {
     },
     async yunXingClick () {
       this.showRiZhi = true
-      this.soutRizhi = '检测设备状态完毕,开始抽取数据....' + '\n' + '....' // 输出日志内容
+      this.soutRizhi = '检测设备状态完毕,开始抽取数据....' + '\n\n' + '....' // 输出日志内容
       this.yunXingUid = new Date().getTime()
       for (let i = 0; i < this.imsql.length; i++) {
         if (i === 0) {
@@ -440,10 +441,10 @@ export default {
         }).then(subresult => {
           var context = subresult.data
 
-          this.soutRizhi = this.soutRizhi + '\n' + context.info
+          this.soutRizhi = context.info + '\n\n' + this.soutRizhi
         })
       }
-      this.soutRizhi = this.soutRizhi + '\n' + '动态数据测试抽取完成,点击确定制作数据集'
+      this.soutRizhi = this.soutRiZhiSucess + '动态数据测试抽取完成,点击确定制作数据集' + '\n\n' + this.soutRizhi
     },
     yuLanMouseOver () {
       document.getElementById('yuLan').className = 'iconfont icon-preview1'

+ 6 - 3
src/views/modules/visi/dataset.vue

@@ -153,7 +153,7 @@ import dylog from './dy-schedule-log'
 // import DataPreProcess from './datapreprocess'
 import DataPreProcess from './datapreprocess_my'
 import { MessageBox } from 'element-ui'
-import { Message } from "element-ui"
+import { Message } from 'element-ui'
 export default {
   // import引入的组件需要注入到对象中才能使用
   data () {
@@ -558,14 +558,17 @@ export default {
     },
     // 下载数据集
     downloadDataset (filename) {
-
       MessageBox.confirm(`是否下载该数据集?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
+        var urls = this.$http.adornUrl('/dataset/downloadDataset')
+        if (this.status === '2') {
+          urls = this.$http.adornUrl('/datasetdy/downloadDataset')
+        }
         this.$http({
-          url: this.$http.adornUrl('/dataset/downloadDataset'),
+          url: urls,
           method: 'get',
           params: this.$http.adornParams({
             datasetName: filename + '.csv'